@unbrained/pm-cli 2026.7.19 → 2026.7.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (600) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +2 -0
  3. package/CHANGELOG.md +36 -0
  4. package/dist/cli/commands/append.js +13 -6
  5. package/dist/cli/commands/append.js.map +1 -1
  6. package/dist/cli/commands/calendar.d.ts +1 -1
  7. package/dist/cli/commands/calendar.js +2 -2
  8. package/dist/cli/commands/calendar.js.map +1 -1
  9. package/dist/cli/commands/comments.js +2 -5
  10. package/dist/cli/commands/comments.js.map +1 -1
  11. package/dist/cli/commands/completion.js +11 -3
  12. package/dist/cli/commands/completion.js.map +1 -1
  13. package/dist/cli/commands/context.d.ts +1 -1
  14. package/dist/cli/commands/context.js +2 -2
  15. package/dist/cli/commands/context.js.map +1 -1
  16. package/dist/cli/commands/contracts.js +4 -3
  17. package/dist/cli/commands/contracts.js.map +1 -1
  18. package/dist/cli/commands/copy.js +5 -3
  19. package/dist/cli/commands/copy.js.map +1 -1
  20. package/dist/cli/commands/create.d.ts +3 -1
  21. package/dist/cli/commands/create.js +5 -3
  22. package/dist/cli/commands/create.js.map +1 -1
  23. package/dist/cli/commands/merge.d.ts +8 -0
  24. package/dist/cli/commands/merge.js +12 -0
  25. package/dist/cli/commands/merge.js.map +1 -0
  26. package/dist/cli/commands/plan.d.ts +1 -1
  27. package/dist/cli/commands/plan.js +2 -2
  28. package/dist/cli/commands/plan.js.map +1 -1
  29. package/dist/cli/commands/update-many.d.ts +5 -0
  30. package/dist/cli/commands/update-many.js +81 -6
  31. package/dist/cli/commands/update-many.js.map +1 -1
  32. package/dist/cli/commands/update.d.ts +5 -1
  33. package/dist/cli/commands/update.js +50 -4
  34. package/dist/cli/commands/update.js.map +1 -1
  35. package/dist/cli/register-list-query.js +14 -2
  36. package/dist/cli/register-list-query.js.map +1 -1
  37. package/dist/cli/register-mutation.js +61 -2
  38. package/dist/cli/register-mutation.js.map +1 -1
  39. package/dist/cli/register-operations.js +5 -3
  40. package/dist/cli/register-operations.js.map +1 -1
  41. package/dist/cli/registration-helpers.js +4 -2
  42. package/dist/cli/registration-helpers.js.map +1 -1
  43. package/dist/cli-bundle/bundle-manifest.json +365 -333
  44. package/dist/cli-bundle/chunks/{append-MBXHNWSX.js → append-E6V54WOQ.js} +5 -5
  45. package/dist/cli-bundle/chunks/append-NNJ3EFIT.js +11 -0
  46. package/dist/cli-bundle/chunks/{chunk-M4B4RK4J.js → chunk-2BO4CA46.js} +14 -238
  47. package/dist/cli-bundle/chunks/{chunk-M4B4RK4J.js.map → chunk-2BO4CA46.js.map} +1 -1
  48. package/dist/cli-bundle/chunks/{chunk-MQOSMBWV.js → chunk-3AO5VSDR.js} +25 -6
  49. package/dist/cli-bundle/chunks/chunk-3AO5VSDR.js.map +7 -0
  50. package/dist/cli-bundle/chunks/{chunk-ODEIDKGW.js → chunk-3LPFHE3P.js} +596 -154
  51. package/dist/cli-bundle/chunks/chunk-3LPFHE3P.js.map +1 -0
  52. package/dist/cli-bundle/chunks/{chunk-YGEA4CLH.js → chunk-3MCTMJXI.js} +4 -4
  53. package/dist/cli-bundle/chunks/{chunk-N7FCFJ76.js → chunk-3P7UJQOX.js} +2 -2
  54. package/dist/cli-bundle/chunks/{chunk-7B7IHMLH.js → chunk-3VY6MIEO.js} +3 -3
  55. package/dist/cli-bundle/chunks/{chunk-3EZZTFL2.js → chunk-4F6BWJ4J.js} +51 -43
  56. package/dist/cli-bundle/chunks/chunk-4F6BWJ4J.js.map +7 -0
  57. package/dist/cli-bundle/chunks/{chunk-VA3H7VVC.js → chunk-4L23AGQ7.js} +9 -7
  58. package/dist/cli-bundle/chunks/chunk-4L23AGQ7.js.map +1 -0
  59. package/dist/cli-bundle/chunks/{chunk-5S6IZXK7.js → chunk-4U4Z6AHI.js} +7 -7
  60. package/dist/cli-bundle/chunks/{chunk-UOIFZ66L.js → chunk-4XGJLADW.js} +3 -3
  61. package/dist/cli-bundle/chunks/{chunk-SUNZKVAH.js → chunk-5IZJWSDB.js} +5 -5
  62. package/dist/cli-bundle/chunks/{chunk-QQ77W23U.js → chunk-5NTE36LD.js} +4 -4
  63. package/dist/cli-bundle/chunks/{chunk-EVAN5VJA.js → chunk-5OK4UGFV.js} +5 -8
  64. package/dist/cli-bundle/chunks/{chunk-EVAN5VJA.js.map → chunk-5OK4UGFV.js.map} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-H3YKUVDR.js → chunk-5UX66S6U.js} +26 -7
  66. package/dist/cli-bundle/chunks/chunk-5UX66S6U.js.map +1 -0
  67. package/dist/cli-bundle/chunks/{chunk-KGPLSHJD.js → chunk-6C2ZZX5Z.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-Q5NHJ6RO.js → chunk-6JUTHVQS.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-NTS2RKHN.js → chunk-6VIJ7UA5.js} +15 -15
  70. package/dist/cli-bundle/chunks/{chunk-BBGR4FKQ.js → chunk-6XMUURSS.js} +6 -6
  71. package/dist/cli-bundle/chunks/chunk-6XMUURSS.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-XVB6BATY.js → chunk-72LQ4TKV.js} +3 -3
  73. package/dist/cli-bundle/chunks/{chunk-WCBB6VI3.js → chunk-7AVEY74G.js} +8 -5
  74. package/dist/cli-bundle/chunks/chunk-7AVEY74G.js.map +7 -0
  75. package/dist/cli-bundle/chunks/{chunk-YG56M3NE.js → chunk-7DOJC3HS.js} +8 -8
  76. package/dist/cli-bundle/chunks/chunk-7DOJC3HS.js.map +1 -0
  77. package/dist/cli-bundle/chunks/{chunk-KZ5AC6B5.js → chunk-7WCE6Y64.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-VQOG2ETB.js → chunk-AF2CCM5U.js} +4 -4
  79. package/dist/cli-bundle/chunks/{chunk-P24ZU5QV.js → chunk-AOEOYL3S.js} +49 -12
  80. package/dist/cli-bundle/chunks/chunk-AOEOYL3S.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-BZKE2O5V.js → chunk-BKIAH72N.js} +8 -6
  82. package/dist/cli-bundle/chunks/chunk-BKIAH72N.js.map +1 -0
  83. package/dist/cli-bundle/chunks/{chunk-RWAIRGBC.js → chunk-C3KD7U3T.js} +12 -243
  84. package/dist/cli-bundle/chunks/chunk-C3KD7U3T.js.map +7 -0
  85. package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js +334 -0
  86. package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{chunk-TELI67UP.js → chunk-CQTQKUUV.js} +6 -9
  88. package/dist/cli-bundle/chunks/{chunk-TELI67UP.js.map → chunk-CQTQKUUV.js.map} +1 -1
  89. package/dist/cli-bundle/chunks/{chunk-ZUCBPXNA.js → chunk-D6NXDNP3.js} +5 -5
  90. package/dist/cli-bundle/chunks/chunk-D6NXDNP3.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-EAV3P54W.js → chunk-DAQ45GCS.js} +5 -5
  92. package/dist/cli-bundle/chunks/{chunk-6V4T4RD3.js → chunk-DVDBQA3B.js} +79 -22
  93. package/dist/cli-bundle/chunks/chunk-DVDBQA3B.js.map +1 -0
  94. package/dist/cli-bundle/chunks/chunk-E6LEMURX.js +249 -0
  95. package/dist/cli-bundle/chunks/chunk-E6LEMURX.js.map +7 -0
  96. package/dist/cli-bundle/chunks/{chunk-ZF52NVRT.js → chunk-E7ICD63T.js} +131 -179
  97. package/dist/cli-bundle/chunks/chunk-E7ICD63T.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-RX53WHFI.js → chunk-EJDGV4GR.js} +3 -3
  99. package/dist/cli-bundle/chunks/{chunk-IXG5CMBR.js → chunk-FDHPAVVB.js} +4 -4
  100. package/dist/cli-bundle/chunks/{chunk-KAE727L2.js → chunk-FSRHYUDA.js} +2 -2
  101. package/dist/cli-bundle/chunks/chunk-FSRHYUDA.js.map +7 -0
  102. package/dist/cli-bundle/chunks/{chunk-46Z6FAVP.js → chunk-G3COA6GS.js} +51 -43
  103. package/dist/cli-bundle/chunks/chunk-G3COA6GS.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-A4FVWFZY.js → chunk-GFQP7HAZ.js} +8 -6
  105. package/dist/cli-bundle/chunks/chunk-GFQP7HAZ.js.map +7 -0
  106. package/dist/cli-bundle/chunks/{chunk-2XPDCXK5.js → chunk-GIQSU6S2.js} +6 -6
  107. package/dist/cli-bundle/chunks/chunk-GIQSU6S2.js.map +1 -0
  108. package/dist/cli-bundle/chunks/{chunk-V4QHAMI5.js → chunk-GROYI4RB.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-77XFQRTD.js → chunk-GSJSM5BJ.js} +3 -3
  110. package/dist/cli-bundle/chunks/{chunk-QYGK2XQ3.js → chunk-GTLCVJOE.js} +3 -3
  111. package/dist/cli-bundle/chunks/{chunk-VSQE43NO.js → chunk-GV2262OF.js} +4 -4
  112. package/dist/cli-bundle/chunks/{chunk-N2TEEOXJ.js → chunk-GVI6FAFG.js} +8 -6
  113. package/dist/cli-bundle/chunks/chunk-GVI6FAFG.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-A5EQPNV7.js → chunk-GVT754PX.js} +44 -3
  115. package/dist/cli-bundle/chunks/chunk-GVT754PX.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-Y2VSGFT4.js → chunk-HB3P4M52.js} +22 -7
  117. package/dist/cli-bundle/chunks/chunk-HB3P4M52.js.map +1 -0
  118. package/dist/cli-bundle/chunks/{chunk-STBCBDKF.js → chunk-HCEBZNC3.js} +6 -6
  119. package/dist/cli-bundle/chunks/{chunk-EEECAV5M.js → chunk-HEWM6CEN.js} +80 -25
  120. package/dist/cli-bundle/chunks/chunk-HEWM6CEN.js.map +7 -0
  121. package/dist/cli-bundle/chunks/{chunk-GKCEEXMA.js → chunk-HQ3SB4CN.js} +21 -6
  122. package/dist/cli-bundle/chunks/{chunk-GKCEEXMA.js.map → chunk-HQ3SB4CN.js.map} +2 -2
  123. package/dist/cli-bundle/chunks/{chunk-U6RYD446.js → chunk-HRW7GF6T.js} +7 -7
  124. package/dist/cli-bundle/chunks/{chunk-D35WYXWC.js → chunk-HYW67VJ5.js} +6 -3
  125. package/dist/cli-bundle/chunks/chunk-HYW67VJ5.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{chunk-OKWJUL6F.js → chunk-I577UHC7.js} +16 -9
  127. package/dist/cli-bundle/chunks/{chunk-OKWJUL6F.js.map → chunk-I577UHC7.js.map} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-XDWXPG2E.js → chunk-IAQE32BI.js} +4 -4
  129. package/dist/cli-bundle/chunks/{chunk-66SRNEBK.js → chunk-IJNK6WW2.js} +3 -3
  130. package/dist/cli-bundle/chunks/chunk-INSTSQNZ.js +623 -0
  131. package/dist/cli-bundle/chunks/chunk-INSTSQNZ.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-A3GAQLBH.js → chunk-IX677TRO.js} +75 -12
  133. package/dist/cli-bundle/chunks/chunk-IX677TRO.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-RLLOZAM2.js → chunk-IY6VZ3IW.js} +29 -8
  135. package/dist/cli-bundle/chunks/chunk-IY6VZ3IW.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-SVAWG7EE.js → chunk-J4FBIFU6.js} +45 -4
  137. package/dist/cli-bundle/chunks/chunk-J4FBIFU6.js.map +1 -0
  138. package/dist/cli-bundle/chunks/{chunk-AGEBQRBG.js → chunk-JAPE62Y5.js} +9 -9
  139. package/dist/cli-bundle/chunks/{chunk-UWAQI3B7.js → chunk-JGUKMMRS.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-UU6EP25G.js → chunk-JH2ZSLO3.js} +2 -2
  141. package/dist/cli-bundle/chunks/{chunk-GRDK25BN.js → chunk-JHJSFOAM.js} +6 -6
  142. package/dist/cli-bundle/chunks/{chunk-FQO5THHM.js → chunk-JM6YAXTR.js} +2 -2
  143. package/dist/cli-bundle/chunks/{chunk-E7KBMWEF.js → chunk-JSLT7WVE.js} +2 -2
  144. package/dist/cli-bundle/chunks/{chunk-FIUTBFC6.js → chunk-K4CI6Y45.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-IEMXESIS.js → chunk-KSPWRNVP.js} +7 -7
  146. package/dist/cli-bundle/chunks/{chunk-3QNUDDY2.js → chunk-KZEANWJS.js} +14 -12
  147. package/dist/cli-bundle/chunks/{chunk-3QNUDDY2.js.map → chunk-KZEANWJS.js.map} +2 -2
  148. package/dist/cli-bundle/chunks/{chunk-BFJP4VYC.js → chunk-L7BH7IWU.js} +4 -4
  149. package/dist/cli-bundle/chunks/{chunk-2UCG5H6B.js → chunk-LPEYZRUR.js} +3 -3
  150. package/dist/cli-bundle/chunks/{chunk-FQF6VVPH.js → chunk-MYSS5H2A.js} +9 -7
  151. package/dist/cli-bundle/chunks/{chunk-FQF6VVPH.js.map → chunk-MYSS5H2A.js.map} +1 -1
  152. package/dist/cli-bundle/chunks/{chunk-IR3GOO6E.js → chunk-NHT3F4WZ.js} +15 -15
  153. package/dist/cli-bundle/chunks/{chunk-6BNV3G6C.js → chunk-NLR32VFS.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-BDC4TW4B.js → chunk-OV7MSW3I.js} +15 -13
  155. package/dist/cli-bundle/chunks/chunk-OV7MSW3I.js.map +1 -0
  156. package/dist/cli-bundle/chunks/{chunk-EI3UIMZM.js → chunk-OWXOPDHD.js} +4 -4
  157. package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js +246 -0
  158. package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-AQUNTB7G.js → chunk-PEQGTJ5Q.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-QFG4MB7P.js → chunk-POG76WWZ.js} +28 -7
  161. package/dist/cli-bundle/chunks/chunk-POG76WWZ.js.map +1 -0
  162. package/dist/cli-bundle/chunks/{chunk-MI3346YW.js → chunk-QANSTTC7.js} +129 -170
  163. package/dist/cli-bundle/chunks/chunk-QANSTTC7.js.map +1 -0
  164. package/dist/cli-bundle/chunks/{chunk-T6MOTLOJ.js → chunk-QJKL5PHS.js} +2 -2
  165. package/dist/cli-bundle/chunks/{chunk-SBW7EQC4.js → chunk-QLZ643FM.js} +76 -13
  166. package/dist/cli-bundle/chunks/chunk-QLZ643FM.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-XKVHL3MB.js → chunk-QWRVBJ4D.js} +2 -2
  168. package/dist/cli-bundle/chunks/chunk-R3EWPG4A.js +106 -0
  169. package/dist/cli-bundle/chunks/chunk-R3EWPG4A.js.map +1 -0
  170. package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js +344 -0
  171. package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js.map +7 -0
  172. package/dist/cli-bundle/chunks/{chunk-VFA5EIEN.js → chunk-R7QV7ICM.js} +4 -4
  173. package/dist/cli-bundle/chunks/{chunk-NPEYH6CE.js → chunk-RDV4ZFYS.js} +12 -10
  174. package/dist/cli-bundle/chunks/{chunk-NPEYH6CE.js.map → chunk-RDV4ZFYS.js.map} +1 -1
  175. package/dist/cli-bundle/chunks/{chunk-K2L6FZBX.js → chunk-RJO3YAFM.js} +4 -4
  176. package/dist/cli-bundle/chunks/{chunk-YIC5NGXF.js → chunk-RMF7LMBS.js} +7 -7
  177. package/dist/cli-bundle/chunks/{chunk-YIC5NGXF.js.map → chunk-RMF7LMBS.js.map} +2 -2
  178. package/dist/cli-bundle/chunks/{chunk-MRXAHR4B.js → chunk-RZJLNXFG.js} +50 -13
  179. package/dist/cli-bundle/chunks/chunk-RZJLNXFG.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{chunk-DJAGYYCQ.js → chunk-SC2HMDGB.js} +19 -3
  181. package/dist/cli-bundle/chunks/chunk-SC2HMDGB.js.map +1 -0
  182. package/dist/cli-bundle/chunks/{chunk-SGJB6PXA.js → chunk-SF3DT5HJ.js} +3 -3
  183. package/dist/cli-bundle/chunks/chunk-SG74J6MV.js +604 -0
  184. package/dist/cli-bundle/chunks/chunk-SG74J6MV.js.map +1 -0
  185. package/dist/cli-bundle/chunks/{chunk-Q3K5XPAQ.js → chunk-SR3JOATZ.js} +18 -2
  186. package/dist/cli-bundle/chunks/chunk-SR3JOATZ.js.map +7 -0
  187. package/dist/cli-bundle/chunks/{chunk-DUDLSQFG.js → chunk-SSKOQNMS.js} +14 -12
  188. package/dist/cli-bundle/chunks/{chunk-DUDLSQFG.js.map → chunk-SSKOQNMS.js.map} +1 -1
  189. package/dist/cli-bundle/chunks/{chunk-UNNCT5QY.js → chunk-SZVB53Y3.js} +3 -3
  190. package/dist/cli-bundle/chunks/{chunk-JBW2S2C6.js → chunk-T44FMVRL.js} +613 -157
  191. package/dist/cli-bundle/chunks/chunk-T44FMVRL.js.map +7 -0
  192. package/dist/cli-bundle/chunks/{chunk-GFZB5CLP.js → chunk-T6PPNM7V.js} +4 -4
  193. package/dist/cli-bundle/chunks/{chunk-UE7LK3RE.js → chunk-THAOZG4U.js} +9 -7
  194. package/dist/cli-bundle/chunks/chunk-THAOZG4U.js.map +1 -0
  195. package/dist/cli-bundle/chunks/{chunk-IGBBTPM5.js → chunk-TOBGV45Y.js} +4 -4
  196. package/dist/cli-bundle/chunks/chunk-TOBGV45Y.js.map +1 -0
  197. package/dist/cli-bundle/chunks/{chunk-W6IEJXNC.js → chunk-TVYYO5A7.js} +2 -2
  198. package/dist/cli-bundle/chunks/chunk-TYHJDFYW.js +109 -0
  199. package/dist/cli-bundle/chunks/chunk-TYHJDFYW.js.map +7 -0
  200. package/dist/cli-bundle/chunks/{chunk-DOASIOQR.js → chunk-UQLXSG72.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-IDUTGRDM.js → chunk-URXVHN3L.js} +3 -3
  202. package/dist/cli-bundle/chunks/chunk-URXVHN3L.js.map +1 -0
  203. package/dist/cli-bundle/chunks/{chunk-7CHWLT2J.js → chunk-UVN66B3M.js} +2 -2
  204. package/dist/cli-bundle/chunks/{chunk-Q6JPYR7I.js → chunk-UX6SSO2I.js} +2 -2
  205. package/dist/cli-bundle/chunks/{chunk-JPWUZOMR.js → chunk-UZDQXNUB.js} +75 -20
  206. package/dist/cli-bundle/chunks/chunk-UZDQXNUB.js.map +1 -0
  207. package/dist/cli-bundle/chunks/{chunk-OK7VSX3N.js → chunk-UZLJOEAC.js} +3 -3
  208. package/dist/cli-bundle/chunks/{chunk-4PSJVGRE.js → chunk-VDO2JMD4.js} +7 -7
  209. package/dist/cli-bundle/chunks/{chunk-IRJ6F23W.js → chunk-VQIHNHMJ.js} +2 -2
  210. package/dist/cli-bundle/chunks/{chunk-FQODDTE7.js → chunk-WUVEBQW6.js} +7 -5
  211. package/dist/cli-bundle/chunks/{chunk-FQODDTE7.js.map → chunk-WUVEBQW6.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{chunk-Q4PSG2GV.js → chunk-WVA4DVNV.js} +5 -5
  213. package/dist/cli-bundle/chunks/{chunk-Q4PSG2GV.js.map → chunk-WVA4DVNV.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/{chunk-4M6RZJXF.js → chunk-WWNL6WMH.js} +3 -3
  215. package/dist/cli-bundle/chunks/chunk-WWNL6WMH.js.map +7 -0
  216. package/dist/cli-bundle/chunks/{chunk-3KPNOZOH.js → chunk-X6K5XTTN.js} +78 -21
  217. package/dist/cli-bundle/chunks/chunk-X6K5XTTN.js.map +7 -0
  218. package/dist/cli-bundle/chunks/{chunk-G33XIMRT.js → chunk-XJF7CDNH.js} +17 -10
  219. package/dist/cli-bundle/chunks/{chunk-G33XIMRT.js.map → chunk-XJF7CDNH.js.map} +1 -1
  220. package/dist/cli-bundle/chunks/{chunk-AR24KW26.js → chunk-YBT7O4KT.js} +17 -112
  221. package/dist/cli-bundle/chunks/chunk-YBT7O4KT.js.map +7 -0
  222. package/dist/cli-bundle/chunks/{chunk-CZA2DXCV.js → chunk-YQQNAKW3.js} +17 -105
  223. package/dist/cli-bundle/chunks/chunk-YQQNAKW3.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-OKPZDH43.js → chunk-YQWCZ5AC.js} +7 -5
  225. package/dist/cli-bundle/chunks/{chunk-OKPZDH43.js.map → chunk-YQWCZ5AC.js.map} +2 -2
  226. package/dist/cli-bundle/chunks/{chunk-LT5UWU7H.js → chunk-ZOJ3LR7O.js} +2 -2
  227. package/dist/cli-bundle/chunks/{chunk-3HSRP6T2.js → chunk-ZOY5K4D3.js} +2 -2
  228. package/dist/cli-bundle/chunks/{chunk-XXWDEQ6O.js → chunk-ZV2NTVMJ.js} +4 -4
  229. package/dist/cli-bundle/chunks/{chunk-UW6HCMP2.js → chunk-ZYPFOO3L.js} +9 -9
  230. package/dist/cli-bundle/chunks/close-O5QVZ6ET.js +12 -0
  231. package/dist/cli-bundle/chunks/{close-7NWA3GLA.js → close-QEMOYZN3.js} +5 -5
  232. package/dist/cli-bundle/chunks/close-many-SDA426VT.js +24 -0
  233. package/dist/cli-bundle/chunks/{close-many-YALQ7AXS.js → close-many-UTZANOCQ.js} +15 -14
  234. package/dist/cli-bundle/chunks/{comments-SQIQ5WYR.js → comments-LZN6FXXC.js} +7 -7
  235. package/dist/cli-bundle/chunks/comments-VBQ345ND.js +13 -0
  236. package/dist/cli-bundle/chunks/{copy-YDAMENCP.js → copy-DKTSSCK7.js} +4 -4
  237. package/dist/cli-bundle/chunks/copy-M7DDI6LS.js +9 -0
  238. package/dist/cli-bundle/chunks/{create-JSL6CXU3.js → create-GG4RBCGC.js} +11 -11
  239. package/dist/cli-bundle/chunks/create-JBC5KUW6.js +29 -0
  240. package/dist/cli-bundle/chunks/{delete-IGVOZEU2.js → delete-LCS3VPDH.js} +4 -4
  241. package/dist/cli-bundle/chunks/delete-MD7YXQLH.js +10 -0
  242. package/dist/cli-bundle/chunks/{deps-BQAXUQAK.js → deps-DELOO4TL.js} +6 -6
  243. package/dist/cli-bundle/chunks/{deps-CBPPSS6J.js → deps-FI4O6NQS.js} +6 -6
  244. package/dist/cli-bundle/chunks/docs-2UYBP5D6.js +14 -0
  245. package/dist/cli-bundle/chunks/{docs-NS2AZWCN.js → docs-6Z2MP526.js} +6 -6
  246. package/dist/cli-bundle/chunks/{files-XUUBQ76I.js → files-HEUGSJZL.js} +6 -6
  247. package/dist/cli-bundle/chunks/{files-PVWEPT5J.js → files-HKEAN5MA.js} +6 -6
  248. package/dist/cli-bundle/chunks/{focus-DHBHKK3E.js → focus-7SOUT5PZ.js} +5 -5
  249. package/dist/cli-bundle/chunks/focus-DRQ6FQH6.js +10 -0
  250. package/dist/cli-bundle/chunks/history-compact-65YVN5DB.js +17 -0
  251. package/dist/cli-bundle/chunks/{history-compact-3TNPYVFG.js → history-compact-7NDVP3PT.js} +7 -6
  252. package/dist/cli-bundle/chunks/{history-redact-KKFDICCF.js → history-redact-7YBL4XSG.js} +5 -4
  253. package/dist/cli-bundle/chunks/{history-redact-ELRL73XN.js → history-redact-IZGNJBU4.js} +5 -4
  254. package/dist/cli-bundle/chunks/{history-repair-J7WKZFAG.js → history-repair-7M4PYQUH.js} +8 -6
  255. package/dist/cli-bundle/chunks/history-repair-GNGETJLI.js +18 -0
  256. package/dist/cli-bundle/chunks/learnings-3YXDRWFT.js +13 -0
  257. package/dist/cli-bundle/chunks/{learnings-X4D6JCCG.js → learnings-ALC6IMNL.js} +7 -7
  258. package/dist/cli-bundle/chunks/notes-7JMLQ447.js +13 -0
  259. package/dist/cli-bundle/chunks/{notes-UQC6VS6N.js → notes-JFCLTC5C.js} +7 -7
  260. package/dist/cli-bundle/chunks/plan-KOIPWVOZ.js +26 -0
  261. package/dist/cli-bundle/chunks/{plan-5GKRBJJO.js → plan-T3XB3WTK.js} +12 -12
  262. package/dist/cli-bundle/chunks/{profile-5PQAPCLF.js → profile-OILJHKUW.js} +12 -11
  263. package/dist/cli-bundle/chunks/{profile-CW4BD3FO.js → profile-RJXA7PGS.js} +12 -11
  264. package/dist/cli-bundle/chunks/{register-list-query-PHIPDFP2.js → register-list-query-CFVG75P3.js} +30 -21
  265. package/dist/cli-bundle/chunks/{register-list-query-PHIPDFP2.js.map → register-list-query-CFVG75P3.js.map} +1 -1
  266. package/dist/cli-bundle/chunks/{register-list-query-HTDQE6VI.js → register-list-query-E7UVY4TN.js} +29 -20
  267. package/dist/cli-bundle/chunks/{register-list-query-HTDQE6VI.js.map → register-list-query-E7UVY4TN.js.map} +2 -2
  268. package/dist/cli-bundle/chunks/{register-mutation-BLEWM5I6.js → register-mutation-4VJTXBZW.js} +86 -32
  269. package/dist/cli-bundle/chunks/register-mutation-4VJTXBZW.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{register-mutation-OTYHR7J6.js → register-mutation-IQ55E25C.js} +78 -33
  271. package/dist/cli-bundle/chunks/register-mutation-IQ55E25C.js.map +1 -0
  272. package/dist/cli-bundle/chunks/{register-operations-AMCUFYEW.js → register-operations-AR7RMX4W.js} +42 -38
  273. package/dist/cli-bundle/chunks/register-operations-AR7RMX4W.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{register-operations-MRLHOZYR.js → register-operations-NOLZGORC.js} +41 -37
  275. package/dist/cli-bundle/chunks/register-operations-NOLZGORC.js.map +7 -0
  276. package/dist/cli-bundle/chunks/{register-setup-ZVKTDL4G.js → register-setup-BB77VUEE.js} +17 -16
  277. package/dist/cli-bundle/chunks/{register-setup-ZVKTDL4G.js.map → register-setup-BB77VUEE.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{register-setup-N2FOSWAG.js → register-setup-EYZ7VTPZ.js} +15 -14
  279. package/dist/cli-bundle/chunks/{register-setup-N2FOSWAG.js.map → register-setup-EYZ7VTPZ.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/restore-L6IAGOD7.js +15 -0
  281. package/dist/cli-bundle/chunks/{restore-HEQAG6EK.js → restore-ZH65GZFB.js} +7 -6
  282. package/dist/cli-bundle/chunks/{schema-Q5DAWJ2S.js → schema-4ERWM5QJ.js} +7 -6
  283. package/dist/cli-bundle/chunks/{schema-MAXAIHEC.js → schema-55DL3Q52.js} +7 -6
  284. package/dist/cli-bundle/chunks/{update-DWFXXJKP.js → update-FW6FKDOP.js} +15 -15
  285. package/dist/cli-bundle/chunks/update-TJHSPRPT.js +23 -0
  286. package/dist/cli-bundle/chunks/update-many-NNALYQCN.js +35 -0
  287. package/dist/cli-bundle/chunks/update-many-PWXX5WHO.js +39 -0
  288. package/dist/cli-bundle/main.js +62 -59
  289. package/dist/cli-bundle/main.js.map +1 -1
  290. package/dist/cli-bundle/sdk-runtime.js +62 -59
  291. package/dist/cli-bundle/sdk-testing.js +8 -8
  292. package/dist/cli-bundle/sdk.js +327 -57
  293. package/dist/cli-bundle/sdk.js.map +4 -4
  294. package/dist/core/config/nested-settings.d.ts +2 -0
  295. package/dist/core/config/nested-settings.js +18 -2
  296. package/dist/core/config/nested-settings.js.map +1 -1
  297. package/dist/core/diagnostics/remediation.js +38 -2
  298. package/dist/core/diagnostics/remediation.js.map +1 -1
  299. package/dist/core/extensions/extension-types.d.ts +1 -1
  300. package/dist/core/extensions/extension-types.js +2 -2
  301. package/dist/core/extensions/extension-types.js.map +1 -1
  302. package/dist/core/item/id.d.ts +19 -2
  303. package/dist/core/item/id.js +27 -6
  304. package/dist/core/item/id.js.map +1 -1
  305. package/dist/core/item/parse.d.ts +7 -0
  306. package/dist/core/item/parse.js +48 -2
  307. package/dist/core/item/parse.js.map +1 -1
  308. package/dist/core/schema/item-types-file.d.ts +2 -2
  309. package/dist/core/schema/item-types-file.js +2 -2
  310. package/dist/core/schema/item-types-file.js.map +1 -1
  311. package/dist/core/schema/runtime-schema.d.ts +3 -3
  312. package/dist/core/schema/runtime-schema.js +2 -2
  313. package/dist/core/schema/runtime-schema.js.map +1 -1
  314. package/dist/core/schema/type-workflows.d.ts +2 -2
  315. package/dist/core/schema/type-workflows.js +2 -2
  316. package/dist/core/schema/type-workflows.js.map +1 -1
  317. package/dist/core/shared/constants.js +5 -2
  318. package/dist/core/shared/constants.js.map +1 -1
  319. package/dist/core/store/settings-validator.d.ts +4 -0
  320. package/dist/core/store/settings-validator.js +8 -2
  321. package/dist/core/store/settings-validator.js.map +1 -1
  322. package/dist/core/store/settings.js +8 -2
  323. package/dist/core/store/settings.js.map +1 -1
  324. package/dist/sdk/annotations.js +24 -2
  325. package/dist/sdk/annotations.js.map +1 -1
  326. package/dist/sdk/cli-bootstrap.d.ts +1 -1
  327. package/dist/sdk/cli-bootstrap.js +3 -3
  328. package/dist/sdk/cli-bootstrap.js.map +1 -1
  329. package/dist/sdk/cli-contracts/commander-mutation-options.js +22 -2
  330. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  331. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  332. package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
  333. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  334. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  335. package/dist/sdk/cli-contracts/flag-contracts.js +17 -2
  336. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  337. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +512 -0
  338. package/dist/sdk/cli-contracts/tool-option-contracts.js +21 -11
  339. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  340. package/dist/sdk/cli-contracts/tool-parameter-tables.js +13 -3
  341. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  342. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -0
  343. package/dist/sdk/cli-contracts/tool-schema.js +14 -10
  344. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  345. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +69 -0
  346. package/dist/sdk/cli-contracts/typed-action-inputs.js +5 -0
  347. package/dist/sdk/cli-contracts/typed-action-inputs.js.map +1 -0
  348. package/dist/sdk/cli-contracts.d.ts +4 -3
  349. package/dist/sdk/cli-contracts.js +5 -5
  350. package/dist/sdk/cli-contracts.js.map +1 -1
  351. package/dist/sdk/extension/describe.d.ts +1 -1
  352. package/dist/sdk/extension/describe.js +2 -2
  353. package/dist/sdk/extension/describe.js.map +1 -1
  354. package/dist/sdk/extension/install-runtime.js +5 -3
  355. package/dist/sdk/extension/install-runtime.js.map +1 -1
  356. package/dist/sdk/extension.d.ts +2 -2
  357. package/dist/sdk/extension.js +2 -2
  358. package/dist/sdk/extension.js.map +1 -1
  359. package/dist/sdk/governance/gc.d.ts +14 -1
  360. package/dist/sdk/governance/gc.js +38 -2
  361. package/dist/sdk/governance/gc.js.map +1 -1
  362. package/dist/sdk/governance/storage-integrity.d.ts +84 -0
  363. package/dist/sdk/governance/storage-integrity.js +240 -0
  364. package/dist/sdk/governance/storage-integrity.js.map +1 -0
  365. package/dist/sdk/governance/validate.d.ts +3 -1
  366. package/dist/sdk/governance/validate.js +56 -2
  367. package/dist/sdk/governance/validate.js.map +1 -1
  368. package/dist/sdk/history-read.d.ts +1 -1
  369. package/dist/sdk/history-read.js +2 -2
  370. package/dist/sdk/history-read.js.map +1 -1
  371. package/dist/sdk/history-repair.d.ts +36 -0
  372. package/dist/sdk/history-repair.js +69 -4
  373. package/dist/sdk/history-repair.js.map +1 -1
  374. package/dist/sdk/index.d.ts +5 -2
  375. package/dist/sdk/index.js +5 -2
  376. package/dist/sdk/index.js.map +1 -1
  377. package/dist/sdk/init.js +3 -3
  378. package/dist/sdk/init.js.map +1 -1
  379. package/dist/sdk/item-transaction.d.ts +131 -0
  380. package/dist/sdk/item-transaction.js +280 -0
  381. package/dist/sdk/item-transaction.js.map +1 -0
  382. package/dist/sdk/merge/driver.d.ts +75 -0
  383. package/dist/sdk/merge/driver.js +166 -0
  384. package/dist/sdk/merge/driver.js.map +1 -0
  385. package/dist/sdk/merge/index.d.ts +11 -0
  386. package/dist/sdk/merge/index.js +15 -0
  387. package/dist/sdk/merge/index.js.map +1 -0
  388. package/dist/sdk/merge/install.d.ts +90 -0
  389. package/dist/sdk/merge/install.js +318 -0
  390. package/dist/sdk/merge/install.js.map +1 -0
  391. package/dist/sdk/merge/three-way.d.ts +126 -0
  392. package/dist/sdk/merge/three-way.js +545 -0
  393. package/dist/sdk/merge/three-way.js.map +1 -0
  394. package/dist/sdk/query/list.d.ts +19 -2
  395. package/dist/sdk/query/list.js +5 -2
  396. package/dist/sdk/query/list.js.map +1 -1
  397. package/dist/sdk/runtime.d.ts +17 -14
  398. package/dist/sdk/runtime.js +5 -5
  399. package/dist/sdk/runtime.js.map +1 -1
  400. package/dist/sdk/schema.d.ts +2 -2
  401. package/dist/sdk/schema.js +29 -2
  402. package/dist/sdk/schema.js.map +1 -1
  403. package/dist/sdk/stats.d.ts +1 -1
  404. package/dist/sdk/stats.js +2 -2
  405. package/dist/sdk/stats.js.map +1 -1
  406. package/dist/sdk/workspace-transaction-gc.d.ts +46 -0
  407. package/dist/sdk/workspace-transaction-gc.js +155 -0
  408. package/dist/sdk/workspace-transaction-gc.js.map +1 -0
  409. package/dist/sdk/workspace.d.ts +28 -4
  410. package/dist/sdk/workspace.js +61 -15
  411. package/dist/sdk/workspace.js.map +1 -1
  412. package/dist/types.d.ts +11 -7
  413. package/dist/types.js +2 -2
  414. package/dist/types.js.map +1 -1
  415. package/docs/AGENT_GUIDE.md +58 -47
  416. package/docs/COMMANDS.md +7 -0
  417. package/docs/CONFIGURATION.md +2 -0
  418. package/docs/MERGE_SAFETY.md +99 -0
  419. package/docs/README.md +1 -0
  420. package/docs/SDK.md +56 -0
  421. package/marketplace.json +2 -2
  422. package/package.json +3 -2
  423. package/packages/pm-beads/package.json +1 -1
  424. package/packages/pm-calendar/package.json +1 -1
  425. package/packages/pm-command-kit/package.json +1 -1
  426. package/packages/pm-governance-audit/package.json +1 -1
  427. package/packages/pm-guide-shell/package.json +1 -1
  428. package/packages/pm-kanban/package.json +1 -1
  429. package/packages/pm-lifecycle-hooks/package.json +1 -1
  430. package/packages/pm-linked-test-adapters/package.json +1 -1
  431. package/packages/pm-search-advanced/package.json +1 -1
  432. package/packages/pm-templates/package.json +1 -1
  433. package/packages/pm-todos/package.json +1 -1
  434. package/packages/pm-vcs/package.json +1 -1
  435. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  436. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  437. package/dist/cli-bundle/chunks/append-XUYF7NON.js +0 -11
  438. package/dist/cli-bundle/chunks/chunk-2XPDCXK5.js.map +0 -1
  439. package/dist/cli-bundle/chunks/chunk-3EZZTFL2.js.map +0 -7
  440. package/dist/cli-bundle/chunks/chunk-3KPNOZOH.js.map +0 -7
  441. package/dist/cli-bundle/chunks/chunk-46Z6FAVP.js.map +0 -1
  442. package/dist/cli-bundle/chunks/chunk-4M6RZJXF.js.map +0 -7
  443. package/dist/cli-bundle/chunks/chunk-6V4T4RD3.js.map +0 -1
  444. package/dist/cli-bundle/chunks/chunk-A3GAQLBH.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-A4FVWFZY.js.map +0 -7
  446. package/dist/cli-bundle/chunks/chunk-A5EQPNV7.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-AR24KW26.js.map +0 -7
  448. package/dist/cli-bundle/chunks/chunk-BBGR4FKQ.js.map +0 -1
  449. package/dist/cli-bundle/chunks/chunk-BDC4TW4B.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-BZKE2O5V.js.map +0 -1
  451. package/dist/cli-bundle/chunks/chunk-CZA2DXCV.js.map +0 -1
  452. package/dist/cli-bundle/chunks/chunk-D35WYXWC.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-DJAGYYCQ.js.map +0 -1
  454. package/dist/cli-bundle/chunks/chunk-EEECAV5M.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-H3YKUVDR.js.map +0 -1
  456. package/dist/cli-bundle/chunks/chunk-IDUTGRDM.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-IGBBTPM5.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-JBW2S2C6.js.map +0 -7
  459. package/dist/cli-bundle/chunks/chunk-JPWUZOMR.js.map +0 -1
  460. package/dist/cli-bundle/chunks/chunk-KAE727L2.js.map +0 -7
  461. package/dist/cli-bundle/chunks/chunk-MI3346YW.js.map +0 -1
  462. package/dist/cli-bundle/chunks/chunk-MQOSMBWV.js.map +0 -7
  463. package/dist/cli-bundle/chunks/chunk-MRXAHR4B.js.map +0 -1
  464. package/dist/cli-bundle/chunks/chunk-N2TEEOXJ.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-ODEIDKGW.js.map +0 -1
  466. package/dist/cli-bundle/chunks/chunk-P24ZU5QV.js.map +0 -7
  467. package/dist/cli-bundle/chunks/chunk-Q3K5XPAQ.js.map +0 -7
  468. package/dist/cli-bundle/chunks/chunk-QFG4MB7P.js.map +0 -1
  469. package/dist/cli-bundle/chunks/chunk-RLLOZAM2.js.map +0 -7
  470. package/dist/cli-bundle/chunks/chunk-RWAIRGBC.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-SBW7EQC4.js.map +0 -1
  472. package/dist/cli-bundle/chunks/chunk-SVAWG7EE.js.map +0 -1
  473. package/dist/cli-bundle/chunks/chunk-UE7LK3RE.js.map +0 -1
  474. package/dist/cli-bundle/chunks/chunk-VA3H7VVC.js.map +0 -1
  475. package/dist/cli-bundle/chunks/chunk-WCBB6VI3.js.map +0 -7
  476. package/dist/cli-bundle/chunks/chunk-Y2VSGFT4.js.map +0 -1
  477. package/dist/cli-bundle/chunks/chunk-YG56M3NE.js.map +0 -1
  478. package/dist/cli-bundle/chunks/chunk-ZF52NVRT.js.map +0 -7
  479. package/dist/cli-bundle/chunks/chunk-ZUCBPXNA.js.map +0 -7
  480. package/dist/cli-bundle/chunks/close-ZZCDDWJT.js +0 -12
  481. package/dist/cli-bundle/chunks/close-many-QCZHFCON.js +0 -23
  482. package/dist/cli-bundle/chunks/comments-FMQNYPSZ.js +0 -13
  483. package/dist/cli-bundle/chunks/copy-GI3RCVZP.js +0 -9
  484. package/dist/cli-bundle/chunks/create-LXMLYJNM.js +0 -29
  485. package/dist/cli-bundle/chunks/delete-5DFAXJNI.js +0 -10
  486. package/dist/cli-bundle/chunks/docs-KCWPLQOV.js +0 -14
  487. package/dist/cli-bundle/chunks/focus-3EJVFI3D.js +0 -10
  488. package/dist/cli-bundle/chunks/history-compact-JHYVDYLW.js +0 -16
  489. package/dist/cli-bundle/chunks/history-repair-REMI7DDI.js +0 -16
  490. package/dist/cli-bundle/chunks/learnings-O6V5WDCV.js +0 -13
  491. package/dist/cli-bundle/chunks/notes-ZSZREWZA.js +0 -13
  492. package/dist/cli-bundle/chunks/plan-EZW2YDDY.js +0 -26
  493. package/dist/cli-bundle/chunks/register-mutation-BLEWM5I6.js.map +0 -7
  494. package/dist/cli-bundle/chunks/register-mutation-OTYHR7J6.js.map +0 -1
  495. package/dist/cli-bundle/chunks/register-operations-AMCUFYEW.js.map +0 -1
  496. package/dist/cli-bundle/chunks/register-operations-MRLHOZYR.js.map +0 -7
  497. package/dist/cli-bundle/chunks/restore-A55MLFAI.js +0 -14
  498. package/dist/cli-bundle/chunks/update-5DTSCWVF.js +0 -23
  499. package/dist/cli-bundle/chunks/update-many-6T4ZLZS7.js +0 -34
  500. package/dist/cli-bundle/chunks/update-many-MYRK6VBJ.js +0 -38
  501. /package/dist/cli-bundle/chunks/{append-MBXHNWSX.js.map → append-E6V54WOQ.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{append-XUYF7NON.js.map → append-NNJ3EFIT.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{chunk-YGEA4CLH.js.map → chunk-3MCTMJXI.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{chunk-N7FCFJ76.js.map → chunk-3P7UJQOX.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{chunk-7B7IHMLH.js.map → chunk-3VY6MIEO.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{chunk-5S6IZXK7.js.map → chunk-4U4Z6AHI.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{chunk-UOIFZ66L.js.map → chunk-4XGJLADW.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{chunk-SUNZKVAH.js.map → chunk-5IZJWSDB.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{chunk-QQ77W23U.js.map → chunk-5NTE36LD.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{chunk-KGPLSHJD.js.map → chunk-6C2ZZX5Z.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{chunk-Q5NHJ6RO.js.map → chunk-6JUTHVQS.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{chunk-NTS2RKHN.js.map → chunk-6VIJ7UA5.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{chunk-XVB6BATY.js.map → chunk-72LQ4TKV.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{chunk-KZ5AC6B5.js.map → chunk-7WCE6Y64.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{chunk-VQOG2ETB.js.map → chunk-AF2CCM5U.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{chunk-EAV3P54W.js.map → chunk-DAQ45GCS.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{chunk-RX53WHFI.js.map → chunk-EJDGV4GR.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{chunk-IXG5CMBR.js.map → chunk-FDHPAVVB.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{chunk-V4QHAMI5.js.map → chunk-GROYI4RB.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{chunk-77XFQRTD.js.map → chunk-GSJSM5BJ.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{chunk-QYGK2XQ3.js.map → chunk-GTLCVJOE.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{chunk-VSQE43NO.js.map → chunk-GV2262OF.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{chunk-STBCBDKF.js.map → chunk-HCEBZNC3.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{chunk-U6RYD446.js.map → chunk-HRW7GF6T.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{chunk-XDWXPG2E.js.map → chunk-IAQE32BI.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{chunk-66SRNEBK.js.map → chunk-IJNK6WW2.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{chunk-AGEBQRBG.js.map → chunk-JAPE62Y5.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{chunk-UWAQI3B7.js.map → chunk-JGUKMMRS.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{chunk-UU6EP25G.js.map → chunk-JH2ZSLO3.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{chunk-GRDK25BN.js.map → chunk-JHJSFOAM.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{chunk-FQO5THHM.js.map → chunk-JM6YAXTR.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{chunk-E7KBMWEF.js.map → chunk-JSLT7WVE.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{chunk-FIUTBFC6.js.map → chunk-K4CI6Y45.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{chunk-IEMXESIS.js.map → chunk-KSPWRNVP.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{chunk-BFJP4VYC.js.map → chunk-L7BH7IWU.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{chunk-2UCG5H6B.js.map → chunk-LPEYZRUR.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{chunk-IR3GOO6E.js.map → chunk-NHT3F4WZ.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{chunk-6BNV3G6C.js.map → chunk-NLR32VFS.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{chunk-EI3UIMZM.js.map → chunk-OWXOPDHD.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{chunk-AQUNTB7G.js.map → chunk-PEQGTJ5Q.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-T6MOTLOJ.js.map → chunk-QJKL5PHS.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-XKVHL3MB.js.map → chunk-QWRVBJ4D.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-VFA5EIEN.js.map → chunk-R7QV7ICM.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-K2L6FZBX.js.map → chunk-RJO3YAFM.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-SGJB6PXA.js.map → chunk-SF3DT5HJ.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-UNNCT5QY.js.map → chunk-SZVB53Y3.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-GFZB5CLP.js.map → chunk-T6PPNM7V.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-W6IEJXNC.js.map → chunk-TVYYO5A7.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-DOASIOQR.js.map → chunk-UQLXSG72.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-7CHWLT2J.js.map → chunk-UVN66B3M.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-Q6JPYR7I.js.map → chunk-UX6SSO2I.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-OK7VSX3N.js.map → chunk-UZLJOEAC.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-4PSJVGRE.js.map → chunk-VDO2JMD4.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-IRJ6F23W.js.map → chunk-VQIHNHMJ.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-LT5UWU7H.js.map → chunk-ZOJ3LR7O.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-3HSRP6T2.js.map → chunk-ZOY5K4D3.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-XXWDEQ6O.js.map → chunk-ZV2NTVMJ.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-UW6HCMP2.js.map → chunk-ZYPFOO3L.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{close-ZZCDDWJT.js.map → close-O5QVZ6ET.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{close-7NWA3GLA.js.map → close-QEMOYZN3.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{close-many-QCZHFCON.js.map → close-many-SDA426VT.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{close-many-YALQ7AXS.js.map → close-many-UTZANOCQ.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{comments-SQIQ5WYR.js.map → comments-LZN6FXXC.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{comments-FMQNYPSZ.js.map → comments-VBQ345ND.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{copy-YDAMENCP.js.map → copy-DKTSSCK7.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{copy-GI3RCVZP.js.map → copy-M7DDI6LS.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{create-JSL6CXU3.js.map → create-GG4RBCGC.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{create-LXMLYJNM.js.map → create-JBC5KUW6.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{delete-IGVOZEU2.js.map → delete-LCS3VPDH.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{delete-5DFAXJNI.js.map → delete-MD7YXQLH.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{deps-BQAXUQAK.js.map → deps-DELOO4TL.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{deps-CBPPSS6J.js.map → deps-FI4O6NQS.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{docs-KCWPLQOV.js.map → docs-2UYBP5D6.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{docs-NS2AZWCN.js.map → docs-6Z2MP526.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{files-XUUBQ76I.js.map → files-HEUGSJZL.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{files-PVWEPT5J.js.map → files-HKEAN5MA.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{focus-DHBHKK3E.js.map → focus-7SOUT5PZ.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{focus-3EJVFI3D.js.map → focus-DRQ6FQH6.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{history-compact-JHYVDYLW.js.map → history-compact-65YVN5DB.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{history-compact-3TNPYVFG.js.map → history-compact-7NDVP3PT.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{history-redact-KKFDICCF.js.map → history-redact-7YBL4XSG.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{history-redact-ELRL73XN.js.map → history-redact-IZGNJBU4.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{history-repair-J7WKZFAG.js.map → history-repair-7M4PYQUH.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{history-repair-REMI7DDI.js.map → history-repair-GNGETJLI.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{learnings-O6V5WDCV.js.map → learnings-3YXDRWFT.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{learnings-X4D6JCCG.js.map → learnings-ALC6IMNL.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{notes-ZSZREWZA.js.map → notes-7JMLQ447.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{notes-UQC6VS6N.js.map → notes-JFCLTC5C.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{plan-EZW2YDDY.js.map → plan-KOIPWVOZ.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{plan-5GKRBJJO.js.map → plan-T3XB3WTK.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{profile-5PQAPCLF.js.map → profile-OILJHKUW.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{profile-CW4BD3FO.js.map → profile-RJXA7PGS.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{restore-A55MLFAI.js.map → restore-L6IAGOD7.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{restore-HEQAG6EK.js.map → restore-ZH65GZFB.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{schema-Q5DAWJ2S.js.map → schema-4ERWM5QJ.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{schema-MAXAIHEC.js.map → schema-55DL3Q52.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{update-DWFXXJKP.js.map → update-FW6FKDOP.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{update-5DTSCWVF.js.map → update-TJHSPRPT.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{update-many-6T4ZLZS7.js.map → update-many-NNALYQCN.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{update-many-MYRK6VBJ.js.map → update-many-PWXX5WHO.js.map} +0 -0
@@ -1,9 +1,9 @@
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]="74723401-1f8b-51b4-ab46-a5cd94e0f9f2")}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]="a810fa9a-5882-5c6c-a0e8-52338dae3ad9")}catch(e){}}();
3
3
  import {
4
4
  BUILTIN_ITEM_TYPE_VALUES,
5
5
  toDefaultFolder
6
- } from "./chunk-D35WYXWC.js";
6
+ } from "./chunk-HYW67VJ5.js";
7
7
 
8
8
  // dist/core/schema/item-types-file.js
9
9
  var BUILTIN_NAME_LOOKUP = new Map(BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]));
@@ -258,6 +258,6 @@ export {
258
258
  buildInvalidTypeHint,
259
259
  buildInvalidTypeError
260
260
  };
261
- //# sourceMappingURL=chunk-IGBBTPM5.js.map
261
+ //# sourceMappingURL=chunk-TOBGV45Y.js.map
262
262
 
263
- //# debugId=74723401-1f8b-51b4-ab46-a5cd94e0f9f2
263
+ //# debugId=a810fa9a-5882-5c6c-a0e8-52338dae3ad9
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../core/schema/item-types-file.ts"],"sourcesContent":["/**\n * @module core/schema/item-types-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Item Types File.\n */\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport type { ItemTypeDefinition } from \"../../types/index.js\";\nimport { toDefaultFolder } from \"../item/type-registry.js\";\n\nexport type { ItemTypeDefinition } from \"../../types/index.js\";\n\n/** Pure logic for the `pm schema add-type` command and the create/update invalid-type discoverability hint. The CLI command file (schema.ts) handles IO/governance; everything testable and side-effect-free lives here so it can be coverage-gated to 100%. */\n\nconst BUILTIN_NAME_LOOKUP = new Map<string, string>(\n BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]),\n);\n\n/** The shape persisted at `.agents/pm/schema/types.json`. */\nexport interface ItemTypesFile {\n /** Value that configures or reports definitions for this contract. */\n definitions: ItemTypeDefinition[];\n}\n\n/** Documents the normalized add type input payload exchanged by command, SDK, and package integrations. */\nexport interface NormalizedAddTypeInput {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Default status id newly created items of this type receive. */\n defaultStatus?: string;\n /** Value that configures or reports folder for this contract. */\n folder?: string;\n /** Value that configures or reports aliases for this contract. */\n aliases: string[];\n}\n\n/** Documents the raw add type input payload exchanged by command, SDK, and package integrations. */\nexport interface RawAddTypeInput {\n /** Value that configures or reports name for this contract. */\n name: string | undefined;\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Default status id newly created items of this type receive. */\n defaultStatus?: string;\n /** Value that configures or reports folder for this contract. */\n folder?: string;\n /** Value that configures or reports aliases for this contract. */\n aliases?: string[];\n}\n\n/** Documents the upsert item type result payload exchanged by command, SDK, and package integrations. */\nexport interface UpsertItemTypeResult {\n /** Value that configures or reports file for this contract. */\n file: ItemTypesFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: ItemTypeDefinition;\n /** True when an existing definition with the same (case-insensitive) name was replaced. */\n replaced: boolean;\n /** The canonical name of the replaced definition (only present when `replaced`). Lets the caller detect a silent recase (e.g. \"Spike\" -> \"spike\") and warn. */\n previousName?: string;\n}\n\n/** Custom item type names (and aliases) must be a single letter-led identifier token: letters, digits, hyphen, or underscore — no whitespace or other punctuation. This keeps names copy-pasteable as shell arguments and folder slugs deterministic, matching the single-token PascalCase shape of every built-in type. Folder/slug overlap between two distinct valid tokens (e.g. \"Spike\"/\"Spikes\", \"code-review\"/\"code_review\") is rejected separately by assertTypeFolderAvailable. */\nconst TYPE_NAME_TOKEN_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/;\n\nfunction assertValidTypeToken(value: string, label: string): void {\n if (!TYPE_NAME_TOKEN_PATTERN.test(value)) {\n throw new Error(\n `${label} \"${value}\" is not a valid identifier. Use a single letter-led token of letters, digits, hyphen, or underscore with no spaces or punctuation (e.g. \"Spike\" or \"code-review\").`,\n );\n }\n}\n\n/** Documents the remove item type result payload exchanged by command, SDK, and package integrations. */\nexport interface RemoveItemTypeResult {\n /** Value that configures or reports file for this contract. */\n file: ItemTypesFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched (case-insensitively) the requested name. */\n definition?: ItemTypeDefinition;\n}\n\n/** Returns the canonical built-in name when `name` collides (case-insensitively) with a reserved built-in item type, otherwise undefined. */\nexport function matchBuiltinTypeName(name: string): string | undefined {\n return BUILTIN_NAME_LOOKUP.get(name.trim().toLowerCase());\n}\n\n/** Coerces a persisted `aliases` value into a string array, tolerating malformed data (a non-array, or an array containing non-string entries) without throwing or exploding a stray string into character aliases. */\nfunction coerceAliasArray(value: unknown): string[] {\n return Array.isArray(value)\n ? value.filter((entry): entry is string => typeof entry === \"string\")\n : [];\n}\n\n/** Escapes a value for safe interpolation inside a double-quoted shell string so suggested copy-pasteable commands stay well-formed for names containing `\"`, `` ` ``, `$`, or `\\`. */\nexport function escapeForDoubleQuotes(value: string): string {\n return value.replace(/[\\\\\"`$]/g, (char) => `\\\\${char}`);\n}\n\nfunction dedupeAliases(values: Iterable<string>): string[] {\n const seen = new Map<string, string>();\n for (const value of values) {\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const key = trimmed.toLowerCase();\n if (!seen.has(key)) {\n seen.set(key, trimmed);\n }\n }\n return [...seen.values()].sort((left, right) => left.localeCompare(right));\n}\n\n/** Validates and normalizes raw add-type CLI input. Throws a plain Error with a stable message when the name is missing/empty or collides with a built-in; the CLI layer maps these to PmCliError exit codes. */\nexport function normalizeAddTypeInput(\n raw: RawAddTypeInput,\n): NormalizedAddTypeInput {\n const name = (raw.name ?? \"\").trim();\n if (name.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n assertValidTypeToken(name, \"Type name\");\n const builtinMatch = matchBuiltinTypeName(name);\n if (builtinMatch) {\n throw new Error(\n `Cannot redefine built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const description = raw.description?.trim();\n const defaultStatus = raw.defaultStatus?.trim();\n const folder = raw.folder?.trim();\n const aliases = dedupeAliases(raw.aliases ?? []);\n for (const alias of aliases) {\n assertValidTypeToken(alias, \"Alias\");\n const aliasBuiltin = matchBuiltinTypeName(alias);\n if (aliasBuiltin) {\n throw new Error(\n `Alias \"${alias}\" collides with built-in item type \"${aliasBuiltin}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n }\n return {\n name,\n description:\n description && description.length > 0 ? description : undefined,\n defaultStatus:\n defaultStatus && defaultStatus.length > 0 ? defaultStatus : undefined,\n folder: folder && folder.length > 0 ? folder : undefined,\n aliases,\n };\n}\n\n/** Throws when the requested name or any alias collides (case-insensitively) with the canonical name or an alias of a DIFFERENT existing definition. Such collisions would make `pm create`/`pm update --type` resolve ambiguously (the runtime registry keys a single lowercase alias map), so they are rejected. Tokens belonging to the same-named definition being upserted are ignored, keeping re-runs idempotent. */\nexport function assertAliasesAvailable(\n input: NormalizedAddTypeInput,\n existing: ItemTypesFile,\n): void {\n const selfLower = input.name.toLowerCase();\n const taken = new Map<string, string>();\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (\n definitionName.length === 0 ||\n definitionName.toLowerCase() === selfLower\n ) {\n continue;\n }\n taken.set(definitionName.toLowerCase(), definitionName);\n for (const alias of coerceAliasArray(definition.aliases)) {\n if (alias.trim().length > 0) {\n taken.set(alias.trim().toLowerCase(), definitionName);\n }\n }\n }\n const nameOwner = taken.get(selfLower);\n if (nameOwner) {\n throw new Error(\n `Type name \"${input.name}\" collides with an alias of existing item type \"${nameOwner}\".`,\n );\n }\n for (const alias of input.aliases) {\n const owner = taken.get(alias.toLowerCase());\n if (owner) {\n throw new Error(\n `Alias \"${alias}\" already maps to existing item type \"${owner}\".`,\n );\n }\n }\n}\n\n/** Resolves the storage folder a definition would use: an explicit non-empty `folder` wins, otherwise the deterministic slug derived from the name (the same derivation the runtime registry applies, single-sourced from type-registry.toDefaultFolder). */\nfunction resolveDefinitionFolder(name: string, folder: unknown): string {\n if (typeof folder === \"string\" && folder.trim().length > 0) {\n return folder.trim().toLowerCase();\n }\n return toDefaultFolder(name).toLowerCase();\n}\n\n/**\n * Throws when the requested type's storage folder would collide with a\n * DIFFERENT existing definition's folder. Two distinct type names can slug to\n * one folder (\"Spike\"/\"Spikes\", \"code-review\"/\"code_review\"), which would make\n * their item files share a directory and silently corrupt the taxonomy. The\n * same-named definition being upserted is ignored (folder reuse on re-run is\n * expected). Resolving the collision is a matter of passing a distinct\n * `--folder`, so the error says so.\n *\n * `reservedFolders` carries the folders already owned by built-in and extension\n * types (folder-slug → owner name); a custom type whose slug matches one of\n * those (e.g. \"Tasks\" → \"tasks\", owned by the built-in Task) is just as\n * corrupting as a custom-vs-custom collision, so both are checked.\n */\nexport function assertTypeFolderAvailable(\n input: NormalizedAddTypeInput,\n existing: ItemTypesFile,\n reservedFolders?: ReadonlyMap<string, string>,\n): void {\n const selfLower = input.name.toLowerCase();\n const inputFolder = resolveDefinitionFolder(input.name, input.folder);\n const fail = (ownerName: string): never => {\n throw new Error(\n `Item type \"${input.name}\" would store items in folder \"${inputFolder}\", which already belongs to existing item type \"${ownerName}\". Pass a distinct --folder to keep their storage separate.`,\n );\n };\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (\n definitionName.length === 0 ||\n definitionName.toLowerCase() === selfLower\n ) {\n continue;\n }\n if (\n resolveDefinitionFolder(definitionName, definition.folder) === inputFolder\n ) {\n fail(definitionName);\n }\n }\n const reservedOwner = reservedFolders?.get(inputFolder);\n if (\n reservedOwner !== undefined &&\n reservedOwner.toLowerCase() !== selfLower\n ) {\n fail(reservedOwner);\n }\n}\n\n/** Coerces an arbitrary parsed value from types.json into an ItemTypesFile. Accepts the canonical `{ definitions: [...] }` shape, a bare array of definitions, or a nested `{ item_types: { definitions: [...] } }` form, and tolerates a missing/invalid file by returning an empty definitions list. */\nexport function parseItemTypesFile(\n raw: string | null | undefined,\n): ItemTypesFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { definitions: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/types.json contains invalid JSON.\");\n }\n return { definitions: extractDefinitions(parsed) };\n}\n\nfunction extractDefinitions(parsed: unknown): ItemTypeDefinition[] {\n const candidate = selectDefinitionsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.name !== \"string\" || record.name.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as ItemTypeDefinition);\n }\n return definitions;\n}\n\nfunction selectDefinitionsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n if (typeof record.item_types === \"object\" && record.item_types !== null) {\n const nested = record.item_types as Record<string, unknown>;\n if (Array.isArray(nested.definitions)) {\n return nested.definitions;\n }\n }\n return undefined;\n}\n\n/** Idempotent UPSERT of a custom item type into the parsed file. Matching is case-insensitive by name. When a definition already exists, fields supplied in `input` override the previous values; aliases are merged (deduped); other fields not addressed by add-type flags are preserved untouched. */\nexport function upsertItemType(\n file: ItemTypesFile,\n input: NormalizedAddTypeInput,\n): UpsertItemTypeResult {\n const lowerName = input.name.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) =>\n typeof definition.name === \"string\" &&\n definition.name.trim().toLowerCase() === lowerName,\n );\n const existing = existingIndex >= 0 ? definitions[existingIndex] : undefined;\n\n const mergedAliases = dedupeAliases([\n ...coerceAliasArray(existing?.aliases),\n ...input.aliases,\n ]);\n\n const next: ItemTypeDefinition = {\n ...existing,\n name: input.name,\n };\n if (input.folder !== undefined) {\n next.folder = input.folder;\n }\n if (mergedAliases.length > 0) {\n next.aliases = mergedAliases;\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n applyAttribute(next, \"description\", input.description);\n applyAttribute(next, \"default_status\", input.defaultStatus);\n\n if (existingIndex >= 0) {\n definitions[existingIndex] = next;\n } else {\n definitions.push(next);\n }\n definitions.sort((left, right) => left.name.localeCompare(right.name));\n\n return {\n file: { definitions },\n definition: next,\n replaced: existingIndex >= 0,\n ...(existing && typeof existing.name === \"string\"\n ? { previousName: existing.name }\n : {}),\n };\n}\n\n/** Removes a custom item type definition from the parsed file by name (case-insensitive). Throws a plain Error when `name` is empty or collides with a reserved built-in type (built-ins are not stored in the file and must never be deletable). Returns `removed: false` when no matching custom definition exists so the CLI layer can treat the call as an idempotent no-op. */\nexport function removeItemType(\n file: ItemTypesFile,\n name: string | undefined,\n): RemoveItemTypeResult {\n const trimmed = (name ?? \"\").trim();\n if (trimmed.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n const builtinMatch = matchBuiltinTypeName(trimmed);\n if (builtinMatch) {\n throw new Error(\n `Cannot remove built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const lowerName = trimmed.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) =>\n typeof definition.name === \"string\" &&\n definition.name.trim().toLowerCase() === lowerName,\n );\n if (existingIndex < 0) {\n return { file: { definitions }, removed: false };\n }\n const [definition] = definitions.splice(existingIndex, 1);\n return { file: { definitions }, removed: true, definition };\n}\n\nfunction applyAttribute(\n definition: ItemTypeDefinition,\n key: string,\n value: string | undefined,\n): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined) {\n record[key] = value;\n }\n}\n\n/** Serializes the item types file with a trailing newline (matches the rest of the schema scaffold files written by pm). */\nexport function serializeItemTypesFile(file: ItemTypesFile): string {\n return `${JSON.stringify({ definitions: file.definitions }, null, 2)}\\n`;\n}\n\n/** Appends a discoverable hint to the \"Invalid type\" error so agents learn that custom types exist and how to register one. Quotes are chosen so the printed line is copy-pasteable as a shell command. */\nexport function buildInvalidTypeHint(\n name: string,\n typesFilePath?: string,\n): string {\n const safeName = name.trim().length > 0 ? name.trim() : name;\n const target = typesFilePath?.trim() || \".agents/pm/schema/types.json\";\n return `To register a custom type, run: pm schema add-type \"${escapeForDoubleQuotes(safeName)}\" (writes ${target}).`;\n}\n\n/**\n * Builds the full invalid-type error message used by create/update: the\n * existing \"Invalid type ... Allowed: ...\" line plus the discoverable hint.\n * `typesFilePath` should be the resolved schema/types.json path for the active\n * tracker (see {@link resolveItemTypesFilePath}) so the hint reflects a custom\n * `--pm-path` instead of the hardcoded `.agents/pm` default.\n */\nexport function buildInvalidTypeError(\n name: string,\n allowedTypes: readonly string[],\n typesFilePath?: string,\n): string {\n return `Invalid type value \"${name}\". Allowed: ${allowedTypes.join(\", \")}. ${buildInvalidTypeHint(name, typesFilePath)}`;\n}\n"],"names":["definition"],"mappings":";;;;;;;;AAaA,IAAM,sBAAsB,IAAI,IAC9B,yBAAyB,IAAI,CAAC,SAAS,CAAC,KAAK,YAAW,GAAI,IAAI,CAAC,CAAC;AAkDpE,IAAM,0BAA0B;AAEhC,SAAS,qBAAqB,OAAe,OAAa;AACxD,MAAI,CAAC,wBAAwB,KAAK,KAAK,GAAG;AACxC,UAAM,IAAI,MACR,GAAG,KAAK,KAAK,KAAK,qKAAqK;EAE3L;AACF;AAaM,SAAU,qBAAqB,MAAY;AAC/C,SAAO,oBAAoB,IAAI,KAAK,KAAI,EAAG,YAAW,CAAE;AAC1D;AAGA,SAAS,iBAAiB,OAAc;AACtC,SAAO,MAAM,QAAQ,KAAK,IACtB,MAAM,OAAO,CAAC,UAA2B,OAAO,UAAU,QAAQ,IAClE,CAAA;AACN;AAGM,SAAU,sBAAsB,OAAa;AACjD,SAAO,MAAM,QAAQ,YAAY,CAAC,SAAS,KAAK,IAAI,EAAE;AACxD;AAEA,SAAS,cAAc,QAAwB;AAC7C,QAAM,OAAO,oBAAI,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,UAAM,IAAI,MACR,qCAAqC,YAAY,mCAAmC,yBAAyB,KAAK,IAAI,CAAC,GAAG;EAE9H;AACA,QAAM,YAAY,QAAQ,YAAW;AACrC,QAAM,cAAc,KAAK,YAAY,MAAK;AAC1C,QAAM,gBAAgB,YAAY,UAChC,CAACA,gBACC,OAAOA,YAAW,SAAS,YAC3BA,YAAW,KAAK,KAAI,EAAG,YAAW,MAAO,SAAS;AAEtD,MAAI,gBAAgB,GAAG;AACrB,WAAO,EAAE,MAAM,EAAE,YAAW,GAAI,SAAS,MAAK;EAChD;AACA,QAAM,CAAC,UAAU,IAAI,YAAY,OAAO,eAAe,CAAC;AACxD,SAAO,EAAE,MAAM,EAAE,YAAW,GAAI,SAAS,MAAM,WAAU;AAC3D;AAEA,SAAS,eACP,YACA,KACA,OAAyB;AAEzB,QAAM,SAAS;AACf,MAAI,UAAU,QAAW;AACvB,WAAO,GAAG,IAAI;EAChB;AACF;AAGM,SAAU,uBAAuB,MAAmB;AACxD,SAAO,GAAG,KAAK,UAAU,EAAE,aAAa,KAAK,YAAW,GAAI,MAAM,CAAC,CAAC;;AACtE;AAGM,SAAU,qBACd,MACA,eAAsB;AAEtB,QAAM,WAAW,KAAK,KAAI,EAAG,SAAS,IAAI,KAAK,KAAI,IAAK;AACxD,QAAM,SAAS,eAAe,KAAI,KAAM;AACxC,SAAO,uDAAuD,sBAAsB,QAAQ,CAAC,aAAa,MAAM;AAClH;AASM,SAAU,sBACd,MACA,cACA,eAAsB;AAEtB,SAAO,uBAAuB,IAAI,eAAe,aAAa,KAAK,IAAI,CAAC,KAAK,qBAAqB,MAAM,aAAa,CAAC;AACxH","debugId":"a810fa9a-5882-5c6c-a0e8-52338dae3ad9"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isTerminalStatus,
3
3
  normalizeStatusForRegistry
4
- } from "./chunk-RLLOZAM2.js";
4
+ } from "./chunk-IY6VZ3IW.js";
5
5
 
6
6
  // dist/core/item/actionability.js
7
7
  !(function() {
@@ -159,4 +159,4 @@ export {
159
159
  collectDependencyBlockedIds,
160
160
  computeActionabilityReport
161
161
  };
162
- //# sourceMappingURL=chunk-W6IEJXNC.js.map
162
+ //# sourceMappingURL=chunk-TVYYO5A7.js.map
@@ -0,0 +1,109 @@
1
+ import {
2
+ cloneEmptyReplayDocument,
3
+ tryApplyReplayPatch
4
+ } from "./chunk-E6LEMURX.js";
5
+
6
+ // dist/core/history/history-diff.js
7
+ !(function() {
8
+ try {
9
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
10
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "86354a77-3238-519c-818f-c2989d885298");
11
+ } catch (e2) {
12
+ }
13
+ })();
14
+ function decodeJsonPointerSegment(segment) {
15
+ return segment.replaceAll("~1", "/").replaceAll("~0", "~");
16
+ }
17
+ function patchPathToChangedField(path) {
18
+ if (path === "/body" || path.startsWith("/body/"))
19
+ return "body";
20
+ if (path === "/metadata" || path.startsWith("/metadata/") || path === "/front_matter" || path.startsWith("/front_matter/")) {
21
+ const segment2 = path.replace(/^\/(?:metadata|front_matter)\/?/, "").split("/")[0];
22
+ if (!segment2)
23
+ return "metadata";
24
+ return decodeJsonPointerSegment(segment2);
25
+ }
26
+ const segment = path.replace(/^\//, "").split("/")[0];
27
+ return segment ? decodeJsonPointerSegment(segment) : "root";
28
+ }
29
+ function readFieldValue(doc, field) {
30
+ if (field === "body")
31
+ return doc.body;
32
+ if (field === "metadata")
33
+ return doc.metadata;
34
+ if (field === "root")
35
+ return doc;
36
+ return doc.metadata[field];
37
+ }
38
+ function computeHistoryDiff(fullEntries, options) {
39
+ const windowStartIndex = options?.windowStartIndex ?? 0;
40
+ const fieldFilter = options?.field;
41
+ if (fullEntries.length === 0 || windowStartIndex >= fullEntries.length) {
42
+ return [];
43
+ }
44
+ let current = cloneEmptyReplayDocument();
45
+ const result = [];
46
+ for (let p = 0; p < fullEntries.length; p += 1) {
47
+ const entry = fullEntries[p];
48
+ const beforeDoc = current;
49
+ const applied = tryApplyReplayPatch(current, entry.patch);
50
+ let afterDoc;
51
+ if (applied.ok) {
52
+ afterDoc = applied.document;
53
+ current = afterDoc;
54
+ } else {
55
+ afterDoc = beforeDoc;
56
+ }
57
+ const changedFieldSet = /* @__PURE__ */ new Set();
58
+ for (const patchOp of entry.patch) {
59
+ changedFieldSet.add(patchPathToChangedField(patchOp.path));
60
+ if (patchOp.from !== void 0) {
61
+ changedFieldSet.add(patchPathToChangedField(patchOp.from));
62
+ }
63
+ }
64
+ const sortedFields = [...changedFieldSet].sort((a, b) => a.localeCompare(b));
65
+ if (p >= windowStartIndex) {
66
+ if (fieldFilter !== void 0) {
67
+ if (!changedFieldSet.has(fieldFilter)) {
68
+ continue;
69
+ }
70
+ const change = {
71
+ field: fieldFilter,
72
+ before: readFieldValue(beforeDoc, fieldFilter),
73
+ after: readFieldValue(afterDoc, fieldFilter)
74
+ };
75
+ result.push({
76
+ index: p + 1,
77
+ ts: entry.ts,
78
+ op: entry.op,
79
+ author: entry.author,
80
+ patch_ops: entry.patch.length,
81
+ changed_fields: [fieldFilter],
82
+ changes: [change]
83
+ });
84
+ } else {
85
+ const changes = sortedFields.map((field) => ({
86
+ field,
87
+ before: readFieldValue(beforeDoc, field),
88
+ after: readFieldValue(afterDoc, field)
89
+ }));
90
+ result.push({
91
+ index: p + 1,
92
+ ts: entry.ts,
93
+ op: entry.op,
94
+ author: entry.author,
95
+ patch_ops: entry.patch.length,
96
+ changed_fields: sortedFields,
97
+ changes
98
+ });
99
+ }
100
+ }
101
+ }
102
+ return result;
103
+ }
104
+
105
+ export {
106
+ patchPathToChangedField,
107
+ computeHistoryDiff
108
+ };
109
+ //# sourceMappingURL=chunk-TYHJDFYW.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../core/history/history-diff.ts"],
4
+ "sourcesContent": ["/**\n * @module core/history/history-diff\n *\n * Implements append-only history and replay behavior for History Diff.\n */\nimport {\n cloneEmptyReplayDocument,\n tryApplyReplayPatch,\n type ReplayDocument,\n} from \"./replay.js\";\nimport type { HistoryEntry } from \"../../types/index.js\";\n\n/** Documents the history field change payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryFieldChange {\n /** Value that configures or reports field for this contract. */\n field: string;\n // before and after are the raw field values captured by replaying the history chain.\n // `undefined` is intentional: it signals that the field was absent in the document at\n // that point (e.g. after a JSON-Patch `remove` op). JSON serialization will omit\n // undefined values, which correctly communicates \"field did not exist\".\n /** Value that configures or reports before for this contract. */\n before: unknown;\n /** Value that configures or reports after for this contract. */\n after: unknown;\n}\n\n/** Documents the history diff value entry payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryDiffValueEntry {\n /** 1-based position in the FULL stream (fullEntries index + 1). */\n index: number;\n /** Value that configures or reports ts for this contract. */\n ts: string;\n /** Value that configures or reports op for this contract. */\n op: string;\n /** Value that configures or reports author for this contract. */\n author: string;\n /** Number of JSON-patch operations in this entry (entry.patch.length). */\n patch_ops: number;\n /** Unique field names touched by this entry, sorted by localeCompare. */\n changed_fields: string[];\n /** Per-field before/after values, sorted by field name (localeCompare). */\n changes: HistoryFieldChange[];\n}\n\n// ---------------------------------------------------------------------------\n// JSON-Pointer helpers (ported from src/cli/commands/history.ts so the\n// orchestrator can replace the private copy there with an import from here).\n// ---------------------------------------------------------------------------\n\nfunction decodeJsonPointerSegment(segment: string): string {\n return segment.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\");\n}\n\n/**\n * Map a JSON-Patch path string to a human-readable changed-field name.\n *\n * Rules (in priority order):\n * - \"/body\" or \"/body/…\" → \"body\"\n * - \"/metadata/…\" or \"/front_matter/…\"\n * with a first segment → that decoded segment (e.g. \"status\")\n * without a first segment (bare prefix) → \"metadata\"\n * - \"/\" (root pointer, empty segment after strip) → \"root\"\n * - anything else → decoded first path segment\n */\nexport function patchPathToChangedField(path: string): string {\n if (path === \"/body\" || path.startsWith(\"/body/\")) return \"body\";\n if (\n path === \"/metadata\" ||\n path.startsWith(\"/metadata/\") ||\n path === \"/front_matter\" ||\n path.startsWith(\"/front_matter/\")\n ) {\n const segment = path\n .replace(/^\\/(?:metadata|front_matter)\\/?/, \"\")\n .split(\"/\")[0];\n if (!segment) return \"metadata\";\n return decodeJsonPointerSegment(segment);\n }\n const segment = path.replace(/^\\//, \"\").split(\"/\")[0];\n return segment ? decodeJsonPointerSegment(segment) : \"root\";\n}\n\n// ---------------------------------------------------------------------------\n// Field-value reader\n// ---------------------------------------------------------------------------\n\n/**\n * Extract the before/after value for a logical field from a replay document.\n *\n * - \"body\" → doc.body\n * - \"metadata\" → doc.metadata (the whole object, for a bare /metadata replace)\n * - \"root\" → the whole document (for a bare \"/\" patch op)\n * - other → doc.metadata[field] (may be undefined when the field was absent)\n */\nfunction readFieldValue(doc: ReplayDocument, field: string): unknown {\n if (field === \"body\") return doc.body;\n if (field === \"metadata\") return doc.metadata;\n if (field === \"root\") return doc;\n return doc.metadata[field];\n}\n\n// ---------------------------------------------------------------------------\n// Main export\n// ---------------------------------------------------------------------------\n\n/**\n * Replay a full history entry stream and produce enriched diff entries with\n * per-field before/after values.\n *\n * @param fullEntries The complete ordered history chain to replay.\n * @param options.windowStartIndex 0-based index into fullEntries at which the\n * DISPLAYED window begins. Entries before this index are still replayed (so\n * state is accurate) but are not emitted. Defaults to 0.\n * @param options.field When supplied, only entries that changed this field are\n * emitted, and each emitted entry's `changes` and `changed_fields` are\n * restricted to that single field.\n */\nexport function computeHistoryDiff(\n fullEntries: HistoryEntry[],\n options?: { windowStartIndex?: number; field?: string },\n): HistoryDiffValueEntry[] {\n const windowStartIndex = options?.windowStartIndex ?? 0;\n const fieldFilter = options?.field;\n\n if (fullEntries.length === 0 || windowStartIndex >= fullEntries.length) {\n return [];\n }\n\n let current = cloneEmptyReplayDocument();\n const result: HistoryDiffValueEntry[] = [];\n\n for (let p = 0; p < fullEntries.length; p += 1) {\n const entry = fullEntries[p];\n\n // Capture before state.\n const beforeDoc = current;\n\n // Attempt to apply patch.\n const applied = tryApplyReplayPatch(current, entry.patch);\n let afterDoc: ReplayDocument;\n if (applied.ok) {\n afterDoc = applied.document;\n current = afterDoc;\n } else {\n // Patch failed — use before state as after (cannot trust partial result).\n // Do NOT advance current; keep prior replay state.\n afterDoc = beforeDoc;\n }\n\n // Collect changed field names from patch paths (and from: paths for move/copy).\n const changedFieldSet = new Set<string>();\n for (const patchOp of entry.patch) {\n changedFieldSet.add(patchPathToChangedField(patchOp.path));\n if (patchOp.from !== undefined) {\n changedFieldSet.add(patchPathToChangedField(patchOp.from));\n }\n }\n const sortedFields = [...changedFieldSet].sort((a, b) =>\n a.localeCompare(b),\n );\n\n // Only emit entries in the display window.\n if (p >= windowStartIndex) {\n // Apply field filter: skip this entry entirely if it doesn't touch the\n // requested field; otherwise narrow down to only that field.\n if (fieldFilter !== undefined) {\n if (!changedFieldSet.has(fieldFilter)) {\n // This entry does not touch the requested field — skip it.\n continue;\n }\n // Emit only the filtered field.\n const change: HistoryFieldChange = {\n field: fieldFilter,\n before: readFieldValue(beforeDoc, fieldFilter),\n after: readFieldValue(afterDoc, fieldFilter),\n };\n result.push({\n index: p + 1,\n ts: entry.ts,\n op: entry.op,\n author: entry.author,\n patch_ops: entry.patch.length,\n changed_fields: [fieldFilter],\n changes: [change],\n });\n } else {\n // Emit all changed fields.\n const changes: HistoryFieldChange[] = sortedFields.map((field) => ({\n field,\n before: readFieldValue(beforeDoc, field),\n after: readFieldValue(afterDoc, field),\n }));\n result.push({\n index: p + 1,\n ts: entry.ts,\n op: entry.op,\n author: entry.author,\n patch_ops: entry.patch.length,\n changed_fields: sortedFields,\n changes,\n });\n }\n }\n }\n\n return result;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAiDA,SAAS,yBAAyB,SAAe;AAC/C,SAAO,QAAQ,WAAW,MAAM,GAAG,EAAE,WAAW,MAAM,GAAG;AAC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,IAAI,wBAAwB,QAAQ,IAAI,CAAC;MAC3D;IACF;AACA,UAAM,eAAe,CAAC,GAAG,eAAe,EAAE,KAAK,CAAC,GAAG,MACjD,EAAE,cAAc,CAAC,CAAC;AAIpB,QAAI,KAAK,kBAAkB;AAGzB,UAAI,gBAAgB,QAAW;AAC7B,YAAI,CAAC,gBAAgB,IAAI,WAAW,GAAG;AAErC;QACF;AAEA,cAAM,SAA6B;UACjC,OAAO;UACP,QAAQ,eAAe,WAAW,WAAW;UAC7C,OAAO,eAAe,UAAU,WAAW;;AAE7C,eAAO,KAAK;UACV,OAAO,IAAI;UACX,IAAI,MAAM;UACV,IAAI,MAAM;UACV,QAAQ,MAAM;UACd,WAAW,MAAM,MAAM;UACvB,gBAAgB,CAAC,WAAW;UAC5B,SAAS,CAAC,MAAM;SACjB;MACH,OAAO;AAEL,cAAM,UAAgC,aAAa,IAAI,CAAC,WAAW;UACjE;UACA,QAAQ,eAAe,WAAW,KAAK;UACvC,OAAO,eAAe,UAAU,KAAK;UACrC;AACF,eAAO,KAAK;UACV,OAAO,IAAI;UACX,IAAI,MAAM;UACV,IAAI,MAAM;UACV,QAAQ,MAAM;UACd,WAAW,MAAM,MAAM;UACvB,gBAAgB;UAChB;SACD;MACH;IACF;EACF;AAEA,SAAO;AACT;",
6
+ "names": ["segment"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRelationshipKindRegistry
3
- } from "./chunk-WCBB6VI3.js";
3
+ } from "./chunk-7AVEY74G.js";
4
4
 
5
5
  // dist/sdk/relationship-analytics.js
6
6
  !(function() {
@@ -286,4 +286,4 @@ export {
286
286
  analyzeKnowledgeGraph,
287
287
  compareRelationshipSnapshots
288
288
  };
289
- //# sourceMappingURL=chunk-DOASIOQR.js.map
289
+ //# sourceMappingURL=chunk-UQLXSG72.js.map
@@ -1,6 +1,6 @@
1
1
  // dist/core/schema/type-workflows.js
2
2
 
3
- !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]="682cdb08-f71c-57df-9d72-8ba95a81c069")}catch(e){}}();
3
+ !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]="39c639fc-defa-54d2-a310-dad8a424f4cc")}catch(e){}}();
4
4
  function normalizeStatusToken(value) {
5
5
  return typeof value === "string" ? value.trim().toLowerCase().replaceAll(/[\s-]+/g, "_") : "";
6
6
  }
@@ -87,6 +87,6 @@ export {
87
87
  evaluateTransition,
88
88
  describeAllowedTransitions
89
89
  };
90
- //# sourceMappingURL=chunk-IDUTGRDM.js.map
90
+ //# sourceMappingURL=chunk-URXVHN3L.js.map
91
91
 
92
- //# debugId=682cdb08-f71c-57df-9d72-8ba95a81c069
92
+ //# debugId=39c639fc-defa-54d2-a310-dad8a424f4cc
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../core/schema/type-workflows.ts"],"sourcesContent":["/**\n * @module core/schema/type-workflows\n *\n * Resolves configurable schema, fields, statuses, and workflows for Type Workflows.\n */\nimport type {\n RuntimeSchemaSettings,\n TypeWorkflowDefinition,\n} from \"../../types/index.js\";\n\n/**\n * Per-type allowed-transition support (governance.workflow_enforcement).\n *\n * Rule semantics:\n * - A type with NO matching type_workflows entry is UNRESTRICTED (every\n * transition is allowed).\n * - A type WITH an entry allows only the listed [from, to] pairs. from/to are\n * compared as normalized status ids (resolved through the status registry's\n * alias_to_id map when available, otherwise via token normalization).\n * - A same-status no-op (from === to) is ALWAYS allowed.\n *\n * This module is intentionally dependency-light and fully unit-testable; the\n * CLI enforcement point (src/cli/commands/update.ts) is the only consumer.\n */\n\nexport interface NormalizedTypeWorkflow {\n /** Lower-cased type name used for case-insensitive matching. */\n type: string;\n /** Allowed [from, to] pairs as normalized status ids. */\n allowed_transitions: [string, string][];\n}\n\n/** Minimal status-registry surface needed to resolve a status token to its id. */\nexport interface StatusTokenResolver {\n /** Value that configures or reports alias to id for this contract. */\n alias_to_id: Map<string, string>;\n}\n\n/** Documents the evaluate transition input payload exchanged by command, SDK, and package integrations. */\nexport interface EvaluateTransitionInput {\n /** Value that configures or reports type name for this contract. */\n typeName: string;\n /** Status id the workflow transition starts from. */\n fromStatus: string;\n /** Status id the workflow transition moves to. */\n toStatus: string;\n /** Value that configures or reports type workflows for this contract. */\n typeWorkflows: NormalizedTypeWorkflow[];\n /** Value that configures or reports status registry for this contract. */\n statusRegistry?: StatusTokenResolver;\n}\n\n/** Documents the evaluate transition result payload exchanged by command, SDK, and package integrations. */\nexport interface EvaluateTransitionResult {\n /** Whether the transition is permitted. */\n allowed: boolean;\n /** Whether a matching per-type rule constrained the transition. */\n hasRule: boolean;\n /** Allowed [from, to] pairs for the matched type (normalized ids). Empty when the type is unrestricted. */\n allowedTransitions: [string, string][];\n}\n\n/** Normalize a status token the same way runtime-schema statuses are normalized. */\nexport function normalizeStatusToken(value: unknown): string {\n return typeof value === \"string\"\n ? value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s-]+/g, \"_\")\n : \"\";\n}\n\nfunction normalizeTypeName(value: unknown): string {\n return typeof value === \"string\" ? value.trim().toLowerCase() : \"\";\n}\n\nfunction resolveStatusId(\n value: string,\n statusRegistry: StatusTokenResolver | undefined,\n): string {\n const token = normalizeStatusToken(value);\n if (token.length === 0) {\n return \"\";\n }\n return statusRegistry?.alias_to_id?.get(token) ?? token;\n}\n\n/**\n * Normalize the raw type_workflows from a runtime schema into a deduped,\n * lower-cased-type list with normalized status tokens.\n *\n * An entry is kept when it has a valid (non-empty) `type` AND its\n * `allowed_transitions` is an ARRAY — even when that array is empty. An explicit\n * empty array is a deliberate DENY-ALL rule (only same-status no-ops are\n * permitted, see evaluateTransition), so it must NOT collapse into \"no rule\"\n * (which would leave the type unrestricted). Entries with a missing/empty type\n * or a non-array `allowed_transitions` are dropped, as are malformed/short pairs.\n */\nexport function resolveTypeWorkflows(\n schema: Pick<RuntimeSchemaSettings, \"type_workflows\"> | undefined,\n): NormalizedTypeWorkflow[] {\n const rawWorkflows: TypeWorkflowDefinition[] = Array.isArray(\n schema?.type_workflows,\n )\n ? schema!.type_workflows!\n : [];\n const byType = new Map<\n string,\n { pairs: [string, string][]; denyAll: boolean }\n >();\n for (const entry of rawWorkflows) {\n const type = normalizeTypeName(entry?.type);\n if (type.length === 0) {\n continue;\n }\n if (!Array.isArray(entry?.allowed_transitions)) {\n continue;\n }\n const pairs = entry.allowed_transitions;\n const record = byType.get(type) ?? { pairs: [], denyAll: false };\n // Only an explicitly empty array is an intentional deny-all; a nonempty array\n // whose pairs are all malformed is a typo and must be dropped (not deny-all).\n if (pairs.length === 0) {\n record.denyAll = true;\n }\n for (const pair of pairs) {\n if (!Array.isArray(pair) || pair.length !== 2) {\n continue;\n }\n const from = normalizeStatusToken(pair[0]);\n const to = normalizeStatusToken(pair[1]);\n if (from.length === 0 || to.length === 0) {\n continue;\n }\n if (\n record.pairs.some(\n (candidate) => candidate[0] === from && candidate[1] === to,\n )\n ) {\n continue;\n }\n record.pairs.push([from, to]);\n }\n byType.set(type, record);\n }\n return [...byType.entries()]\n .filter(([, record]) => record.pairs.length > 0 || record.denyAll)\n .map(([type, record]) => ({ type, allowed_transitions: record.pairs }))\n .sort((left, right) => left.type.localeCompare(right.type));\n}\n\n/** Evaluate whether a status transition is allowed for the given item type. Returns hasRule=false (allowed) when the type is unrestricted. */\nexport function evaluateTransition(\n input: EvaluateTransitionInput,\n): EvaluateTransitionResult {\n const typeName = normalizeTypeName(input.typeName);\n const matched = input.typeWorkflows.find(\n (workflow) => workflow.type === typeName,\n );\n if (!matched) {\n return { allowed: true, hasRule: false, allowedTransitions: [] };\n }\n const from = resolveStatusId(input.fromStatus, input.statusRegistry);\n const to = resolveStatusId(input.toStatus, input.statusRegistry);\n // A no-op self-transition is always permitted, even under a restricting rule.\n if (from.length > 0 && from === to) {\n return {\n allowed: true,\n hasRule: true,\n allowedTransitions: matched.allowed_transitions,\n };\n }\n const allowed = matched.allowed_transitions.some((pair) => {\n const ruleFrom = resolveStatusId(pair[0], input.statusRegistry);\n const ruleTo = resolveStatusId(pair[1], input.statusRegistry);\n return ruleFrom === from && ruleTo === to;\n });\n return {\n allowed,\n hasRule: true,\n allowedTransitions: matched.allowed_transitions,\n };\n}\n\n/** Render the allowed transitions for an error/warning hint. */\nexport function describeAllowedTransitions(\n allowedTransitions: [string, string][],\n): string {\n if (allowedTransitions.length === 0) {\n return \"(no transitions allowed)\";\n }\n return allowedTransitions\n .map((pair) => `${pair[0]} -> ${pair[1]}`)\n .join(\", \");\n}\n"],"names":[],"mappings":";;;AA+DM,SAAU,qBAAqB,OAAc;AACjD,SAAO,OAAO,UAAU,WACpB,MACG,KAAI,EACJ,YAAW,EACX,WAAW,WAAW,GAAG,IAC5B;AACN;AAEA,SAAS,kBAAkB,OAAc;AACvC,SAAO,OAAO,UAAU,WAAW,MAAM,KAAI,EAAG,YAAW,IAAK;AAClE;AAEA,SAAS,gBACP,OACA,gBAA+C;AAE/C,QAAM,QAAQ,qBAAqB,KAAK;AACxC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO;EACT;AACA,SAAO,gBAAgB,aAAa,IAAI,KAAK,KAAK;AACpD;AAaM,SAAU,qBACd,QAAiE;AAEjE,QAAM,eAAyC,MAAM,QACnD,QAAQ,cAAc,IAEpB,OAAQ,iBACR,CAAA;AACJ,QAAM,SAAS,oBAAI,IAAG;AAItB,aAAW,SAAS,cAAc;AAChC,UAAM,OAAO,kBAAkB,OAAO,IAAI;AAC1C,QAAI,KAAK,WAAW,GAAG;AACrB;IACF;AACA,QAAI,CAAC,MAAM,QAAQ,OAAO,mBAAmB,GAAG;AAC9C;IACF;AACA,UAAM,QAAQ,MAAM;AACpB,UAAM,SAAS,OAAO,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AAoB,QAAQ;;EAEhC;AACA,QAAM,UAAU,QAAQ,oBAAoB,KAAK,CAAC,SAAQ;AACxD,UAAM,WAAW,gBAAgB,KAAK,CAAC,GAAG,MAAM,cAAc;AAC9D,UAAM,SAAS,gBAAgB,KAAK,CAAC,GAAG,MAAM,cAAc;AAC5D,WAAO,aAAa,QAAQ,WAAW;EACzC,CAAC;AACD,SAAO;IACL;IACA,SAAS;IACT,oBAAoB,QAAQ;;AAEhC;AAGM,SAAU,2BACd,oBAAsC;AAEtC,MAAI,mBAAmB,WAAW,GAAG;AACnC,WAAO;EACT;AACA,SAAO,mBACJ,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,EAAE,EACxC,KAAK,IAAI;AACd","debugId":"39c639fc-defa-54d2-a310-dad8a424f4cc"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EXIT_CODE,
3
3
  PmCliError
4
- } from "./chunk-WCBB6VI3.js";
4
+ } from "./chunk-7AVEY74G.js";
5
5
 
6
6
  // dist/core/shared/numeric-parsers.js
7
7
  !(function() {
@@ -24,4 +24,4 @@ function parseLimit(raw, label = "--limit") {
24
24
  export {
25
25
  parseLimit
26
26
  };
27
- //# sourceMappingURL=chunk-7CHWLT2J.js.map
27
+ //# sourceMappingURL=chunk-UVN66B3M.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renameArtifactsResultKey,
3
3
  runLinkedArtifacts
4
- } from "./chunk-K2L6FZBX.js";
4
+ } from "./chunk-RJO3YAFM.js";
5
5
 
6
6
  // dist/sdk/docs.js
7
7
  !(function() {
@@ -24,4 +24,4 @@ async function runDocs(id, options, global2) {
24
24
  export {
25
25
  runDocs
26
26
  };
27
- //# sourceMappingURL=chunk-Q6JPYR7I.js.map
27
+ //# sourceMappingURL=chunk-UX6SSO2I.js.map
@@ -1,5 +1,5 @@
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]="ebed3dd6-7ac3-5ba9-81af-461fa44a9c47")}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]="57709eb3-e447-5777-876c-5164ce6a821d")}catch(e){}}();
3
3
  import {
4
4
  KNOWN_EXTENSION_CAPABILITIES,
5
5
  KNOWN_EXTENSION_POLICY_MODES,
@@ -11,7 +11,7 @@ import {
11
11
  PLAN_MODE_VALUES,
12
12
  PLAN_STEP_LINK_KIND_VALUES,
13
13
  PLAN_STEP_STATUS_VALUES
14
- } from "./chunk-D35WYXWC.js";
14
+ } from "./chunk-HYW67VJ5.js";
15
15
 
16
16
  // dist/sdk/cli-contracts/command-aliases.js
17
17
  var EXECUTABLE_COMMAND_ALIASES = {
@@ -774,6 +774,26 @@ var UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
774
774
  }
775
775
  ]
776
776
  },
777
+ {
778
+ target: "addAc",
779
+ keys: ["addAc", "add_ac"],
780
+ option: "--add-ac <value>",
781
+ description: "Add one semicolon-free acceptance criterion without replacing the existing list (repeatable)",
782
+ repeatable: true,
783
+ aliasOptions: [
784
+ { option: "--add_ac <value>", description: "Alias for --add-ac" }
785
+ ]
786
+ },
787
+ {
788
+ target: "removeAc",
789
+ keys: ["removeAc", "remove_ac"],
790
+ option: "--remove-ac <value>",
791
+ description: "Remove one semicolon-free acceptance criterion by exact text match (repeatable)",
792
+ repeatable: true,
793
+ aliasOptions: [
794
+ { option: "--remove_ac <value>", description: "Alias for --remove-ac" }
795
+ ]
796
+ },
777
797
  {
778
798
  target: "definitionOfReady",
779
799
  keys: ["definitionOfReady", "definition_of_ready"],
@@ -1200,6 +1220,7 @@ var PM_CORE_COMMAND_NAMES = [
1200
1220
  "history-redact",
1201
1221
  "history-repair",
1202
1222
  "history-compact",
1223
+ "merge",
1203
1224
  "schema",
1204
1225
  "profile",
1205
1226
  "activity",
@@ -1460,7 +1481,7 @@ var TOOL_SEARCH_FILTER_OPTION_CONTRACTS = [
1460
1481
  { param: "limit", flag: "--limit" },
1461
1482
  { param: "after", flag: "--after" }
1462
1483
  ];
1463
- var TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
1484
+ var TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE = [
1464
1485
  { param: "parent", flag: "--parent" },
1465
1486
  { param: "reviewer", flag: "--reviewer" },
1466
1487
  { param: "risk", flag: "--risk" },
@@ -1495,7 +1516,9 @@ var TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
1495
1516
  { param: "outcome", flag: "--outcome" },
1496
1517
  { param: "whyNow", flag: "--why-now" }
1497
1518
  ];
1498
- var TOOL_CREATE_OPTION_CONTRACTS = [
1519
+ var TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = cloneOptionContracts(TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE);
1520
+ var TOOL_CREATE_OPTION_CONTRACT_SOURCE = [
1521
+ { param: "id", flag: "--id" },
1499
1522
  { param: "title", flag: "--title" },
1500
1523
  { param: "description", flag: "--description", allowEmpty: true },
1501
1524
  { param: "type", flag: "--type" },
@@ -1541,7 +1564,8 @@ var TOOL_CREATE_OPTION_CONTRACTS = [
1541
1564
  { param: "clearEvents", flag: "--clear-events" },
1542
1565
  { param: "clearTypeOptions", flag: "--clear-type-options" }
1543
1566
  ];
1544
- var TOOL_UPDATE_OPTION_CONTRACTS = [
1567
+ var TOOL_CREATE_OPTION_CONTRACTS = cloneOptionContracts(TOOL_CREATE_OPTION_CONTRACT_SOURCE);
1568
+ var TOOL_UPDATE_OPTION_CONTRACT_SOURCE = [
1545
1569
  { param: "title", flag: "--title" },
1546
1570
  { param: "description", flag: "--description", allowEmpty: true },
1547
1571
  { param: "body", flag: "--body", allowEmpty: true },
@@ -1559,6 +1583,8 @@ var TOOL_UPDATE_OPTION_CONTRACTS = [
1559
1583
  flag: "--acceptance-criteria",
1560
1584
  allowEmpty: true
1561
1585
  },
1586
+ { param: "addAc", flag: "--add-ac", repeatable: true },
1587
+ { param: "removeAc", flag: "--remove-ac", repeatable: true },
1562
1588
  { param: "author", flag: "--author" },
1563
1589
  { param: "message", flag: "--message", allowEmpty: true },
1564
1590
  { param: "assignee", flag: "--assignee" },
@@ -1588,7 +1614,8 @@ var TOOL_UPDATE_OPTION_CONTRACTS = [
1588
1614
  { param: "clearEvents", flag: "--clear-events" },
1589
1615
  { param: "clearTypeOptions", flag: "--clear-type-options" }
1590
1616
  ];
1591
- var TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACTS = [
1617
+ var TOOL_UPDATE_OPTION_CONTRACTS = cloneOptionContracts(TOOL_UPDATE_OPTION_CONTRACT_SOURCE);
1618
+ var TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE = [
1592
1619
  { param: "filterStatus", flag: "--filter-status" },
1593
1620
  { param: "filterType", flag: "--filter-type" },
1594
1621
  { param: "filterTag", flag: "--filter-tag" },
@@ -1631,8 +1658,8 @@ var TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACTS = [
1631
1658
  { param: "limit", flag: "--limit" },
1632
1659
  { param: "offset", flag: "--offset" }
1633
1660
  ];
1634
- var TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [...cloneOptionContracts(TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACTS)];
1635
- var TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS = [...cloneOptionContracts(TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACTS)];
1661
+ var TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = cloneOptionContracts(TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE);
1662
+ var TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS = cloneOptionContracts(TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE);
1636
1663
  var TOOL_CALENDAR_OPTION_CONTRACTS = [
1637
1664
  { param: "view", flag: "--view" },
1638
1665
  { param: "date", flag: "--date" },
@@ -1950,8 +1977,16 @@ var HISTORY_FLAG_CONTRACTS = [
1950
1977
  { flag: "--diff" },
1951
1978
  { flag: "--field" },
1952
1979
  { flag: "--verify" },
1980
+ { flag: "--strict-exit" },
1981
+ { flag: "--fail-on-warn" },
1953
1982
  { flag: "--format" }
1954
1983
  ];
1984
+ var MERGE_FLAG_CONTRACTS = [
1985
+ { flag: "--dry-run" },
1986
+ { flag: "--output" },
1987
+ { flag: "--item-path" },
1988
+ { flag: "--prefer" }
1989
+ ];
1955
1990
  var HISTORY_REDACT_FLAG_CONTRACTS = [
1956
1991
  { flag: "--literal" },
1957
1992
  { flag: "--regex" },
@@ -2454,7 +2489,8 @@ var VALIDATE_FLAG_CONTRACTS = [
2454
2489
  { flag: "--fix-scope" },
2455
2490
  { flag: "--prune-missing" },
2456
2491
  { flag: "--check-history-drift" },
2457
- { flag: "--check-command-references" }
2492
+ { flag: "--check-command-references" },
2493
+ { flag: "--check-storage-integrity" }
2458
2494
  ];
2459
2495
  var CREATE_FLAG_CONTRACTS = [
2460
2496
  { short: "-t", flag: "--title" },
@@ -2583,6 +2619,8 @@ var UPDATE_FLAG_CONTRACTS = [
2583
2619
  { flag: "--acceptance-criteria" },
2584
2620
  { flag: "--acceptance_criteria" },
2585
2621
  { flag: "--ac" },
2622
+ { flag: "--add-ac", aliases: ["--add_ac"] },
2623
+ { flag: "--remove-ac", aliases: ["--remove_ac"] },
2586
2624
  { flag: "--assignee" },
2587
2625
  { flag: "--parent" },
2588
2626
  { flag: "--reviewer" },
@@ -2704,6 +2742,8 @@ var UPDATE_MANY_FLAG_CONTRACTS = [
2704
2742
  { flag: "--acceptance-criteria" },
2705
2743
  { flag: "--acceptance_criteria" },
2706
2744
  { flag: "--ac" },
2745
+ { flag: "--add-ac", aliases: ["--add_ac"] },
2746
+ { flag: "--remove-ac", aliases: ["--remove_ac"] },
2707
2747
  { flag: "--definition-of-ready" },
2708
2748
  { flag: "--definition_of_ready" },
2709
2749
  { flag: "--order" },
@@ -3001,6 +3041,7 @@ var SUBCOMMAND_FLAG_CONTRACTS_BY_COMMAND = new Map([
3001
3041
  ["history-redact", HISTORY_REDACT_FLAG_CONTRACTS],
3002
3042
  ["history-repair", HISTORY_REPAIR_FLAG_CONTRACTS],
3003
3043
  ["history-compact", HISTORY_COMPACT_FLAG_CONTRACTS],
3044
+ ["merge", MERGE_FLAG_CONTRACTS],
3004
3045
  ["schema", SCHEMA_FLAG_CONTRACTS],
3005
3046
  ["profile", PROFILE_FLAG_CONTRACTS],
3006
3047
  ["plan", PLAN_FLAG_CONTRACTS],
@@ -3172,6 +3213,8 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
3172
3213
  tags: { type: "string" },
3173
3214
  addTags: { type: "array", items: { type: "string" } },
3174
3215
  removeTags: { type: "array", items: { type: "string" } },
3216
+ addAc: { type: "array", items: { type: "string" } },
3217
+ removeAc: { type: "array", items: { type: "string" } },
3175
3218
  body: { type: "string" },
3176
3219
  deadline: { type: "string" },
3177
3220
  estimate: { anyOf: [{ type: "string" }, { type: "number" }] },
@@ -3875,6 +3918,14 @@ var PM_TOOL_PARAMETER_METADATA = {
3875
3918
  description: "Tags to add to the existing list without replacing it. Each entry may be CSV or a JSON array.",
3876
3919
  examples: [["agent-ux"], ["fix", "security"]]
3877
3920
  },
3921
+ addAc: {
3922
+ description: "Acceptance criteria appended individually without replacing the existing list (one criterion per entry).",
3923
+ examples: [["error path covered by a regression test"]]
3924
+ },
3925
+ removeAc: {
3926
+ description: "Acceptance criteria removed individually by exact text match (one criterion per entry).",
3927
+ examples: [["superseded manual QA step"]]
3928
+ },
3878
3929
  removeTags: {
3879
3930
  description: "Tags to remove from the existing list. Each entry may be CSV or a JSON array.",
3880
3931
  examples: [["stale"], ["legacy", "wontfix"]]
@@ -4057,7 +4108,7 @@ var PM_TOOL_PARAMETER_METADATA = {
4057
4108
  description: "For focus action: clear the session focused item instead of setting it (mutually exclusive with id)."
4058
4109
  },
4059
4110
  gcScope: {
4060
- description: "Repeatable gc scope selector values (index, embeddings, runtime, locks, checkpoints).",
4111
+ description: "Repeatable gc scope selector values (index, embeddings, runtime, locks, checkpoints, transactions).",
4061
4112
  examples: [
4062
4113
  ["index", "embeddings"],
4063
4114
  ["runtime"],
@@ -4646,6 +4697,16 @@ var NEXT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
4646
4697
  "includeDecisions"
4647
4698
  ]);
4648
4699
  var AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = ["author", "message", "force"];
4700
+ var CLOSE_ACTION_OPTION_KEYS = [
4701
+ "text",
4702
+ "reason",
4703
+ "closeReason",
4704
+ "duplicateOf",
4705
+ "validateClose",
4706
+ "resolution",
4707
+ "expectedResult",
4708
+ "actualResult"
4709
+ ];
4649
4710
  var LIFECYCLE_AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = [
4650
4711
  "author",
4651
4712
  "assignee",
@@ -4986,14 +5047,7 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
4986
5047
  close: {
4987
5048
  required: ["id"],
4988
5049
  optional: [
4989
- "text",
4990
- "reason",
4991
- "closeReason",
4992
- "duplicateOf",
4993
- "validateClose",
4994
- "resolution",
4995
- "expectedResult",
4996
- "actualResult",
5050
+ ...CLOSE_ACTION_OPTION_KEYS,
4997
5051
  ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
4998
5052
  ]
4999
5053
  },
@@ -5577,6 +5631,7 @@ export {
5577
5631
  FILES_FLAG_CONTRACTS,
5578
5632
  DOCS_FLAG_CONTRACTS,
5579
5633
  HISTORY_FLAG_CONTRACTS,
5634
+ MERGE_FLAG_CONTRACTS,
5580
5635
  HISTORY_REDACT_FLAG_CONTRACTS,
5581
5636
  HISTORY_REPAIR_FLAG_CONTRACTS,
5582
5637
  HISTORY_COMPACT_FLAG_CONTRACTS,
@@ -5651,6 +5706,6 @@ export {
5651
5706
  PM_TOOL_PARAMETERS_SCHEMA,
5652
5707
  PM_PROVIDER_TOOL_PARAMETERS_SCHEMA
5653
5708
  };
5654
- //# sourceMappingURL=chunk-JPWUZOMR.js.map
5709
+ //# sourceMappingURL=chunk-UZDQXNUB.js.map
5655
5710
 
5656
- //# debugId=ebed3dd6-7ac3-5ba9-81af-461fa44a9c47
5711
+ //# debugId=57709eb3-e447-5777-876c-5164ce6a821d