@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,10 +1,10 @@
1
1
  import {
2
2
  createStdinTokenResolver,
3
3
  parseCsvKv
4
- } from "./chunk-A5EQPNV7.js";
4
+ } from "./chunk-GVT754PX.js";
5
5
  import {
6
6
  parseLimit
7
- } from "./chunk-7CHWLT2J.js";
7
+ } from "./chunk-UVN66B3M.js";
8
8
  import {
9
9
  resolveAuthor
10
10
  } from "./chunk-YRYYFGV3.js";
@@ -15,7 +15,7 @@ import {
15
15
  nowIso,
16
16
  readLocatedItem,
17
17
  readSettings
18
- } from "./chunk-RLLOZAM2.js";
18
+ } from "./chunk-IY6VZ3IW.js";
19
19
  import {
20
20
  EXIT_CODE,
21
21
  PmCliError,
@@ -23,14 +23,14 @@ import {
23
23
  pathExists,
24
24
  resolveItemTypeRegistry,
25
25
  resolvePmRoot
26
- } from "./chunk-WCBB6VI3.js";
26
+ } from "./chunk-7AVEY74G.js";
27
27
 
28
28
  // dist/sdk/annotations.js
29
29
  import { readFile } from "node:fs/promises";
30
30
  !(function() {
31
31
  try {
32
32
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
33
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c7504b88-d784-5b2b-9037-a42002ec439b");
33
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8be9d5fc-c3fd-5e9e-b4e3-7a0ed25f3d97");
34
34
  } catch (e2) {
35
35
  }
36
36
  })();
@@ -168,7 +168,22 @@ function assertAnnotationAddValueIsNotFlagLike(raw, config) {
168
168
  ]
169
169
  });
170
170
  }
171
+ function assertAnnotationMessageHasTextSource(config, options) {
172
+ if (config.input.mode !== "list" || options.message === void 0) {
173
+ return;
174
+ }
175
+ const noun = config.collectionKey.replace(/s$/, "");
176
+ throw new PmCliError(`--message labels a ${noun} mutation but does not provide ${noun} text. Pass text positionally or with --add, --stdin, or --file.`, EXIT_CODE.USAGE, {
177
+ code: "annotation_message_without_text",
178
+ required: `Provide ${noun} text through a content source; --message only annotates the history entry of a mutation.`,
179
+ examples: [
180
+ `pm ${config.collectionKey} <id> --add "text" --message "why"`,
181
+ `pm ${config.collectionKey} <id> ${annotationStdinHint(config.collectionKey)}`
182
+ ]
183
+ });
184
+ }
171
185
  async function runAnnotationCommand(id, options, global2, config) {
186
+ assertAnnotationMessageHasTextSource(config, options);
172
187
  const pmRoot = resolvePmRoot(process.cwd(), global2.path);
173
188
  if (!await pathExists(getSettingsPath(pmRoot))) {
174
189
  throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
@@ -313,4 +328,4 @@ export {
313
328
  runAnnotationCommand,
314
329
  resolveAnnotationIndex
315
330
  };
316
- //# sourceMappingURL=chunk-GKCEEXMA.js.map
331
+ //# sourceMappingURL=chunk-HQ3SB4CN.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../sdk/annotations.ts"],
4
- "sourcesContent": ["/**\n * @module sdk/annotations\n *\n * Implements the pm annotation command command surface and its agent-facing runtime behavior.\n */\nimport { readFile } from \"node:fs/promises\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { createStdinTokenResolver, parseCsvKv } from \"../core/item/parse.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { parseLimit } from \"../core/shared/numeric-parsers.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport { resolveAuthor } from \"../core/shared/author.js\";\nimport {\n locateItem,\n mutateItem,\n readLocatedItem,\n} from \"../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\n\n/** Common persisted shape shared by comments, notes, and learnings. */\nexport interface AnnotationEntry {\n /** Creation timestamp for the persisted entry. */\n created_at: string;\n /** Stable author attribution recorded with the entry. */\n author: string;\n /** Human-readable annotation body. */\n text: string;\n /** Last edit timestamp when the entry was changed in place. */\n edited_at?: string;\n}\n\n/** Common options accepted by annotation primitive operations. */\nexport interface AnnotationCommandOptions {\n /** Maximum number of newest entries returned. */\n limit?: string;\n /** Author override for mutation attribution. */\n author?: string;\n /** Optional history message describing the mutation. */\n message?: string;\n /** Whether to override an active ownership conflict. */\n force?: boolean;\n /** Whether list results include paging metadata. */\n includeMeta?: boolean;\n}\n\n/** Presentation-layer inputs accepted by the shared annotation source resolver. */\nexport interface AnnotationSourceOptions {\n /** Inline annotation text or the stdin token (`-`). */\n add?: string;\n /** Read annotation text directly from stdin. */\n stdin?: boolean;\n /** Read annotation text from a UTF-8 file. */\n file?: string;\n /** One-based entry index to replace. */\n edit?: number;\n /** One-based entry index to delete. */\n delete?: number;\n}\n\n/** Normalized annotation operation supplied by a presentation layer. */\nexport interface AnnotationInput {\n /** Normalized operation selected by the presentation layer. */\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n /** Resolved annotation text. */\n value?: string;\n /** Original input used for flag-like value validation. */\n rawValue?: string;\n /** Flag name used in validation messages. */\n emptyFlag?: string;\n /** One-based entry index for edit and delete operations. */\n index?: number;\n}\n\n/** Agent-facing recovery guidance for ownership conflicts. */\nexport interface OwnershipConflictGuidance {\n /** Actionable requirement shown to the caller. */\n required: string;\n /** Copyable retry examples. */\n examples: string[];\n /** Ordered recovery guidance. */\n nextSteps: string[];\n}\n\n/** Domain configuration for one annotation collection primitive. */\nexport interface AnnotationCommandConfig<TKey extends string> {\n /** Normalized annotation operation. */\n input: AnnotationInput;\n /** Metadata collection that stores this annotation family. */\n collectionKey: TKey;\n /** History operation used for additions. */\n op: Parameters<typeof mutateItem>[0][\"op\"];\n /** History operation used for edits. */\n editOp?: Parameters<typeof mutateItem>[0][\"op\"];\n /** History operation used for deletions. */\n deleteOp?: Parameters<typeof mutateItem>[0][\"op\"];\n /** Domain parser that normalizes resolved text. */\n parseText: (raw: string) => string;\n /** Whether this operation may bypass ownership for a caller-authorized annotation workflow. */\n bypassOwnershipConflict: boolean;\n /** Recovery guidance for ownership conflicts. */\n conflictGuidance: OwnershipConflictGuidance;\n}\n\n/** Structured result returned by an annotation primitive. */\nexport type AnnotationCommandResult<\n TKey extends string,\n TEntry extends AnnotationEntry,\n> = {\n id: string;\n count: number;\n} & Record<TKey, TEntry[]> & {\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n };\n\n/** Implements limit annotation entries for the public runtime surface of this module. */\nexport function limitAnnotationEntries<TEntry>(\n values: TEntry[],\n limit: number | undefined,\n): TEntry[] {\n if (limit === undefined) return values;\n if (limit === 0) return [];\n return values.slice(Math.max(0, values.length - limit));\n}\n\n/** Implements read annotation entries for the public runtime surface of this module. */\nexport function readAnnotationEntries<TEntry>(\n source: Record<string, unknown>,\n collectionKey: string,\n): TEntry[] {\n const value = source[collectionKey];\n return Array.isArray(value) ? (value as TEntry[]) : [];\n}\n\n/** Implements parse annotation text input for the public runtime surface of this module. */\nexport function parseAnnotationTextInput(\n raw: string,\n options: { stripPlainTextPrefix?: boolean } = {},\n): string {\n const trimmed = raw.trim();\n if (!trimmed) {\n return \"\";\n }\n const textPrefixMatch = /^(?:[-*+]\\s*)?text\\s*[:=]/i.exec(trimmed);\n if (\n options.stripPlainTextPrefix === true &&\n textPrefixMatch &&\n !trimmed.startsWith(\"```\")\n ) {\n const text = trimmed.slice(textPrefixMatch[0].length).trim();\n return text || trimmed;\n }\n const looksStructured =\n /^(?:[-*+]\\s*)?text\\s*[:=]/im.test(trimmed) || trimmed.startsWith(\"```\");\n if (!looksStructured) {\n return trimmed;\n }\n try {\n const kv = parseCsvKv(trimmed, \"--add\");\n const keys = Object.keys(kv).map((key) => key.trim().toLowerCase());\n if (keys.some((key) => key !== \"text\")) {\n return trimmed;\n }\n const text = kv.text?.trim();\n return text || trimmed;\n } catch {\n return trimmed;\n }\n}\n\n/** Returns whether an unknown file-system failure exposes an errno-like code. */\nexport function isErrnoError(error: unknown): error is { code?: unknown } {\n return typeof error === \"object\" && error !== null && \"code\" in error;\n}\n\nasync function resolveAnnotationTextSource(\n options: AnnotationSourceOptions,\n noun: string,\n): Promise<\n { value: string; rawValue?: string; emptyFlag: string } | undefined\n> {\n const sourceCount =\n Number(options.add !== undefined) +\n Number(options.stdin === true) +\n Number(typeof options.file === \"string\");\n if (sourceCount > 1) {\n throw new PmCliError(\n `Specify ${noun} text using only one input source: --add, --stdin, or --file`,\n EXIT_CODE.USAGE,\n );\n }\n const stdinResolver = createStdinTokenResolver();\n if (options.add !== undefined) {\n return {\n value: (await stdinResolver.resolveValue(options.add, \"--add\")) ?? \"\",\n rawValue: options.add,\n emptyFlag: \"--add\",\n };\n }\n if (options.stdin === true) {\n return {\n value: (await stdinResolver.resolveValue(\"-\", \"--stdin\")) ?? \"\",\n emptyFlag: \"--stdin\",\n };\n }\n if (typeof options.file !== \"string\") return undefined;\n const filePath = options.file.trim();\n if (!filePath) {\n throw new PmCliError(\"--file path cannot be empty\", EXIT_CODE.USAGE);\n }\n try {\n return { value: await readFile(filePath, \"utf8\"), emptyFlag: \"--file\" };\n } catch (error: unknown) {\n if (isErrnoError(error) && error.code === \"ENOENT\") {\n throw new PmCliError(\n `--file path not found: ${filePath}`,\n EXIT_CODE.USAGE,\n );\n }\n const detail = error instanceof Error ? error.message : String(error);\n throw new PmCliError(\n `Failed to read --file path \"${filePath}\": ${detail}`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\n/** Resolves mutually exclusive annotation input flags into one normalized SDK operation. */\nexport async function resolveAnnotationInput(\n options: AnnotationSourceOptions,\n noun: string,\n): Promise<AnnotationInput> {\n if (options.edit !== undefined && options.delete !== undefined) {\n throw new PmCliError(\n \"Specify only one of --edit or --delete\",\n EXIT_CODE.USAGE,\n );\n }\n if (options.delete !== undefined) {\n if (\n options.add !== undefined ||\n options.stdin === true ||\n typeof options.file === \"string\"\n ) {\n throw new PmCliError(\n \"--delete cannot be combined with replacement text\",\n EXIT_CODE.USAGE,\n );\n }\n if (!Number.isInteger(options.delete) || options.delete < 1) {\n throw new PmCliError(\n \"--delete must be a positive integer\",\n EXIT_CODE.USAGE,\n );\n }\n return { mode: \"delete\", index: options.delete };\n }\n if (\n options.edit !== undefined &&\n (!Number.isInteger(options.edit) || options.edit < 1)\n ) {\n throw new PmCliError(\"--edit must be a positive integer\", EXIT_CODE.USAGE);\n }\n const resolved = await resolveAnnotationTextSource(options, noun);\n if (options.edit !== undefined) {\n if (!resolved) {\n throw new PmCliError(\n \"--edit requires replacement text from --add, --stdin, or --file\",\n EXIT_CODE.USAGE,\n );\n }\n return { mode: \"edit\", index: options.edit, ...resolved };\n }\n return resolved ? { mode: \"add\", ...resolved } : { mode: \"list\" };\n}\n\n/** Implements wrap ownership conflict for the public runtime surface of this module. */\nexport function wrapOwnershipConflict(\n error: unknown,\n guidance: OwnershipConflictGuidance,\n): never {\n if (\n error instanceof PmCliError &&\n error.exitCode === EXIT_CODE.CONFLICT &&\n error.message.includes(\"is assigned to\") &&\n error.message.includes(\"Use --force to override\")\n ) {\n throw new PmCliError(error.message, error.exitCode, {\n code: \"ownership_conflict\",\n required: guidance.required,\n examples: guidance.examples,\n nextSteps: guidance.nextSteps,\n });\n }\n throw error;\n}\n\nfunction annotationStdinHint(collectionKey: string): string {\n return collectionKey === \"comments\" ? \"--stdin\" : \"--add -\";\n}\n\nfunction assertAnnotationAddValueIsNotFlagLike(\n raw: string,\n config: AnnotationCommandConfig<string>,\n): void {\n const emptyFlag = config.input.emptyFlag ?? \"--add\";\n if (emptyFlag !== \"--add\") {\n return;\n }\n const trimmed = raw.trim();\n if (!/^-{1,2}[A-Za-z][\\w-]*(?:=.*)?$/.test(trimmed)) {\n return;\n }\n const stdinHint = annotationStdinHint(config.collectionKey);\n const commandPrefix =\n config.input.mode === \"edit\"\n ? `pm ${config.collectionKey} <id> --edit <index>`\n : `pm ${config.collectionKey} <id>`;\n throw new PmCliError(\n `--add value \"${trimmed}\" looks like an option, not annotation text. Use ${stdinHint} to read stdin, or use text=${trimmed} for literal dash-leading text.`,\n EXIT_CODE.USAGE,\n {\n code: \"annotation_flag_like_value\",\n required: `Use ${stdinHint} for stdin input, pass plain text, or use text=${trimmed} when the text really starts with \"-\".`,\n examples: [\n `${commandPrefix} ${stdinHint}`,\n `${commandPrefix} --add text=${trimmed}`,\n ],\n },\n );\n}\n\n/** Implements run annotation command for the public runtime surface of this module. */\nexport async function runAnnotationCommand<\n TKey extends string,\n TEntry extends AnnotationEntry,\n>(\n id: string,\n options: AnnotationCommandOptions,\n global: GlobalOptions,\n config: AnnotationCommandConfig<TKey>,\n): Promise<AnnotationCommandResult<TKey, TEntry>> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const limit = parseLimit(options.limit);\n\n if (config.input.mode === \"list\") {\n const located = await locateItem(\n pmRoot,\n id,\n settings.id_prefix,\n settings.item_format,\n typeRegistry.type_to_folder,\n );\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const allEntries = readAnnotationEntries<TEntry>(\n loaded.document.metadata,\n config.collectionKey,\n );\n return renderAnnotationResult(\n located.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n\n if (config.input.mode === \"delete\") {\n const op = config.deleteOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n const arrayIndex = resolveAnnotationIndex(\n config.input.index,\n entries.length,\n config.collectionKey,\n );\n entries.splice(arrayIndex, 1);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n const rawText = config.input.rawValue ?? config.input.value ?? \"\";\n assertAnnotationAddValueIsNotFlagLike(rawText, config);\n const text = config.parseText(config.input.value ?? \"\");\n if (!text.trim()) {\n throw new PmCliError(\n `${config.input.emptyFlag ?? \"--add\"} text cannot be empty`,\n EXIT_CODE.USAGE,\n );\n }\n\n if (config.input.mode === \"edit\") {\n const op = config.editOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n const arrayIndex = resolveAnnotationIndex(\n config.input.index,\n entries.length,\n config.collectionKey,\n );\n const existing = entries[arrayIndex];\n entries[arrayIndex] = {\n ...existing,\n text,\n edited_at: nowIso(),\n } as TEntry;\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n entries.push({\n created_at: nowIso(),\n author,\n text,\n } as TEntry);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n}\n\n/** Implements resolve annotation index for the public runtime surface of this module. */\nexport function resolveAnnotationIndex(\n oneBasedIndex: number | undefined,\n count: number,\n collectionKey: string,\n): number {\n if (\n oneBasedIndex === undefined ||\n !Number.isInteger(oneBasedIndex) ||\n oneBasedIndex < 1 ||\n oneBasedIndex > count\n ) {\n const singular = collectionKey.replace(/s$/, \"\");\n const label = `${singular.charAt(0).toUpperCase()}${singular.slice(1)}`;\n const noun = count === 1 ? `1 ${singular}` : `${count} ${collectionKey}`;\n throw new PmCliError(\n `${label} index ${oneBasedIndex ?? \"(missing)\"} out of range (item has ${noun})`,\n EXIT_CODE.USAGE,\n );\n }\n return oneBasedIndex - 1;\n}\n\nfunction renderAnnotationResult<\n TKey extends string,\n TEntry extends AnnotationEntry,\n>(\n id: string,\n collectionKey: TKey,\n allEntries: TEntry[],\n limit: number | undefined,\n includeMeta: boolean,\n): AnnotationCommandResult<TKey, TEntry> {\n const entries = limitAnnotationEntries(allEntries, limit);\n return {\n id,\n [collectionKey]: entries,\n count: entries.length,\n ...(includeMeta\n ? {\n total_count: allEntries.length,\n returned_count: entries.length,\n has_more: entries.length < allEntries.length,\n ...(limit !== undefined ? { limit } : {}),\n }\n : {}),\n } as AnnotationCommandResult<TKey, TEntry>;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAAS,gBAAgB;;;;;;;;AAsHnB,SAAU,uBACd,QACA,OAAyB;AAEzB,MAAI,UAAU;AAAW,WAAO;AAChC,MAAI,UAAU;AAAG,WAAO,CAAA;AACxB,SAAO,OAAO,MAAM,KAAK,IAAI,GAAG,OAAO,SAAS,KAAK,CAAC;AACxD;AAGM,SAAU,sBACd,QACA,eAAqB;AAErB,QAAM,QAAQ,OAAO,aAAa;AAClC,SAAO,MAAM,QAAQ,KAAK,IAAK,QAAqB,CAAA;AACtD;AAGM,SAAU,yBACd,KACA,UAA8C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AAO;MAC/B,OAAO,UAAQ;AACb,cAAM,UAAU,sBACd,SAAS,UACT,OAAO,aAAa;AAEtB,gBAAQ,KAAK;UACX,YAAY,OAAM;UAClB;UACA;SACS;AACX,iBAAS,SAAS,OAAO,aAAa,IAAI;AAC1C,eAAO,EAAE,eAAe,CAAC,OAAO,aAAa,EAAC;MAChD;KACD;EACH,SAAS,OAAgB;AACvB,0BAAsB,OAAO,OAAO,gBAAgB;EACtD;AAEA,QAAM,aAAa,sBACjB,OAAO,MACP,OAAO,aAAa;AAEtB,SAAO,uBACL,OAAO,KAAK,IACZ,OAAO,eACP,YACA,OACA,QAAQ,gBAAgB,IAAI;AAEhC;AAGM,SAAU,uBACd,eACA,OACA,eAAqB;AAErB,MACE,kBAAkB,UAClB,CAAC,OAAO,UAAU,aAAa,KAC/B,gBAAgB,KAChB,gBAAgB,OAChB;AACA,UAAM,WAAW,cAAc,QAAQ,MAAM,EAAE;AAC/C,UAAM,QAAQ,GAAG,SAAS,OAAO,CAAC,EAAE,YAAW,CAAE,GAAG,SAAS,MAAM,CAAC,CAAC;AACrE,UAAM,OAAO,UAAU,IAAI,KAAK,QAAQ,KAAK,GAAG,KAAK,IAAI,aAAa;AACtE,UAAM,IAAI,WACR,GAAG,KAAK,UAAU,iBAAiB,WAAW,2BAA2B,IAAI,KAC7E,UAAU,KAAK;EAEnB;AACA,SAAO,gBAAgB;AACzB;AAEA,SAAS,uBAIP,IACA,eACA,YACA,OACA,aAAoB;AAEpB,QAAM,UAAU,uBAAuB,YAAY,KAAK;AACxD,SAAO;IACL;IACA,CAAC,aAAa,GAAG;IACjB,OAAO,QAAQ;IACf,GAAI,cACA;MACE,aAAa,WAAW;MACxB,gBAAgB,QAAQ;MACxB,UAAU,QAAQ,SAAS,WAAW;MACtC,GAAI,UAAU,SAAY,EAAE,MAAK,IAAK,CAAA;QAExC,CAAA;;AAER;",
4
+ "sourcesContent": ["/**\n * @module sdk/annotations\n *\n * Implements the pm annotation command command surface and its agent-facing runtime behavior.\n */\nimport { readFile } from \"node:fs/promises\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { createStdinTokenResolver, parseCsvKv } from \"../core/item/parse.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { parseLimit } from \"../core/shared/numeric-parsers.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport { resolveAuthor } from \"../core/shared/author.js\";\nimport {\n locateItem,\n mutateItem,\n readLocatedItem,\n} from \"../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\n\n/** Common persisted shape shared by comments, notes, and learnings. */\nexport interface AnnotationEntry {\n /** Creation timestamp for the persisted entry. */\n created_at: string;\n /** Stable author attribution recorded with the entry. */\n author: string;\n /** Human-readable annotation body. */\n text: string;\n /** Last edit timestamp when the entry was changed in place. */\n edited_at?: string;\n}\n\n/** Common options accepted by annotation primitive operations. */\nexport interface AnnotationCommandOptions {\n /** Maximum number of newest entries returned. */\n limit?: string;\n /** Author override for mutation attribution. */\n author?: string;\n /** Optional history message describing the mutation. */\n message?: string;\n /** Whether to override an active ownership conflict. */\n force?: boolean;\n /** Whether list results include paging metadata. */\n includeMeta?: boolean;\n}\n\n/** Presentation-layer inputs accepted by the shared annotation source resolver. */\nexport interface AnnotationSourceOptions {\n /** Inline annotation text or the stdin token (`-`). */\n add?: string;\n /** Read annotation text directly from stdin. */\n stdin?: boolean;\n /** Read annotation text from a UTF-8 file. */\n file?: string;\n /** One-based entry index to replace. */\n edit?: number;\n /** One-based entry index to delete. */\n delete?: number;\n}\n\n/** Normalized annotation operation supplied by a presentation layer. */\nexport interface AnnotationInput {\n /** Normalized operation selected by the presentation layer. */\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n /** Resolved annotation text. */\n value?: string;\n /** Original input used for flag-like value validation. */\n rawValue?: string;\n /** Flag name used in validation messages. */\n emptyFlag?: string;\n /** One-based entry index for edit and delete operations. */\n index?: number;\n}\n\n/** Agent-facing recovery guidance for ownership conflicts. */\nexport interface OwnershipConflictGuidance {\n /** Actionable requirement shown to the caller. */\n required: string;\n /** Copyable retry examples. */\n examples: string[];\n /** Ordered recovery guidance. */\n nextSteps: string[];\n}\n\n/** Domain configuration for one annotation collection primitive. */\nexport interface AnnotationCommandConfig<TKey extends string> {\n /** Normalized annotation operation. */\n input: AnnotationInput;\n /** Metadata collection that stores this annotation family. */\n collectionKey: TKey;\n /** History operation used for additions. */\n op: Parameters<typeof mutateItem>[0][\"op\"];\n /** History operation used for edits. */\n editOp?: Parameters<typeof mutateItem>[0][\"op\"];\n /** History operation used for deletions. */\n deleteOp?: Parameters<typeof mutateItem>[0][\"op\"];\n /** Domain parser that normalizes resolved text. */\n parseText: (raw: string) => string;\n /** Whether this operation may bypass ownership for a caller-authorized annotation workflow. */\n bypassOwnershipConflict: boolean;\n /** Recovery guidance for ownership conflicts. */\n conflictGuidance: OwnershipConflictGuidance;\n}\n\n/** Structured result returned by an annotation primitive. */\nexport type AnnotationCommandResult<\n TKey extends string,\n TEntry extends AnnotationEntry,\n> = {\n id: string;\n count: number;\n} & Record<TKey, TEntry[]> & {\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n };\n\n/** Implements limit annotation entries for the public runtime surface of this module. */\nexport function limitAnnotationEntries<TEntry>(\n values: TEntry[],\n limit: number | undefined,\n): TEntry[] {\n if (limit === undefined) return values;\n if (limit === 0) return [];\n return values.slice(Math.max(0, values.length - limit));\n}\n\n/** Implements read annotation entries for the public runtime surface of this module. */\nexport function readAnnotationEntries<TEntry>(\n source: Record<string, unknown>,\n collectionKey: string,\n): TEntry[] {\n const value = source[collectionKey];\n return Array.isArray(value) ? (value as TEntry[]) : [];\n}\n\n/** Implements parse annotation text input for the public runtime surface of this module. */\nexport function parseAnnotationTextInput(\n raw: string,\n options: { stripPlainTextPrefix?: boolean } = {},\n): string {\n const trimmed = raw.trim();\n if (!trimmed) {\n return \"\";\n }\n const textPrefixMatch = /^(?:[-*+]\\s*)?text\\s*[:=]/i.exec(trimmed);\n if (\n options.stripPlainTextPrefix === true &&\n textPrefixMatch &&\n !trimmed.startsWith(\"```\")\n ) {\n const text = trimmed.slice(textPrefixMatch[0].length).trim();\n return text || trimmed;\n }\n const looksStructured =\n /^(?:[-*+]\\s*)?text\\s*[:=]/im.test(trimmed) || trimmed.startsWith(\"```\");\n if (!looksStructured) {\n return trimmed;\n }\n try {\n const kv = parseCsvKv(trimmed, \"--add\");\n const keys = Object.keys(kv).map((key) => key.trim().toLowerCase());\n if (keys.some((key) => key !== \"text\")) {\n return trimmed;\n }\n const text = kv.text?.trim();\n return text || trimmed;\n } catch {\n return trimmed;\n }\n}\n\n/** Returns whether an unknown file-system failure exposes an errno-like code. */\nexport function isErrnoError(error: unknown): error is { code?: unknown } {\n return typeof error === \"object\" && error !== null && \"code\" in error;\n}\n\nasync function resolveAnnotationTextSource(\n options: AnnotationSourceOptions,\n noun: string,\n): Promise<\n { value: string; rawValue?: string; emptyFlag: string } | undefined\n> {\n const sourceCount =\n Number(options.add !== undefined) +\n Number(options.stdin === true) +\n Number(typeof options.file === \"string\");\n if (sourceCount > 1) {\n throw new PmCliError(\n `Specify ${noun} text using only one input source: --add, --stdin, or --file`,\n EXIT_CODE.USAGE,\n );\n }\n const stdinResolver = createStdinTokenResolver();\n if (options.add !== undefined) {\n return {\n value: (await stdinResolver.resolveValue(options.add, \"--add\")) ?? \"\",\n rawValue: options.add,\n emptyFlag: \"--add\",\n };\n }\n if (options.stdin === true) {\n return {\n value: (await stdinResolver.resolveValue(\"-\", \"--stdin\")) ?? \"\",\n emptyFlag: \"--stdin\",\n };\n }\n if (typeof options.file !== \"string\") return undefined;\n const filePath = options.file.trim();\n if (!filePath) {\n throw new PmCliError(\"--file path cannot be empty\", EXIT_CODE.USAGE);\n }\n try {\n return { value: await readFile(filePath, \"utf8\"), emptyFlag: \"--file\" };\n } catch (error: unknown) {\n if (isErrnoError(error) && error.code === \"ENOENT\") {\n throw new PmCliError(\n `--file path not found: ${filePath}`,\n EXIT_CODE.USAGE,\n );\n }\n const detail = error instanceof Error ? error.message : String(error);\n throw new PmCliError(\n `Failed to read --file path \"${filePath}\": ${detail}`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\n/** Resolves mutually exclusive annotation input flags into one normalized SDK operation. */\nexport async function resolveAnnotationInput(\n options: AnnotationSourceOptions,\n noun: string,\n): Promise<AnnotationInput> {\n if (options.edit !== undefined && options.delete !== undefined) {\n throw new PmCliError(\n \"Specify only one of --edit or --delete\",\n EXIT_CODE.USAGE,\n );\n }\n if (options.delete !== undefined) {\n if (\n options.add !== undefined ||\n options.stdin === true ||\n typeof options.file === \"string\"\n ) {\n throw new PmCliError(\n \"--delete cannot be combined with replacement text\",\n EXIT_CODE.USAGE,\n );\n }\n if (!Number.isInteger(options.delete) || options.delete < 1) {\n throw new PmCliError(\n \"--delete must be a positive integer\",\n EXIT_CODE.USAGE,\n );\n }\n return { mode: \"delete\", index: options.delete };\n }\n if (\n options.edit !== undefined &&\n (!Number.isInteger(options.edit) || options.edit < 1)\n ) {\n throw new PmCliError(\"--edit must be a positive integer\", EXIT_CODE.USAGE);\n }\n const resolved = await resolveAnnotationTextSource(options, noun);\n if (options.edit !== undefined) {\n if (!resolved) {\n throw new PmCliError(\n \"--edit requires replacement text from --add, --stdin, or --file\",\n EXIT_CODE.USAGE,\n );\n }\n return { mode: \"edit\", index: options.edit, ...resolved };\n }\n return resolved ? { mode: \"add\", ...resolved } : { mode: \"list\" };\n}\n\n/** Implements wrap ownership conflict for the public runtime surface of this module. */\nexport function wrapOwnershipConflict(\n error: unknown,\n guidance: OwnershipConflictGuidance,\n): never {\n if (\n error instanceof PmCliError &&\n error.exitCode === EXIT_CODE.CONFLICT &&\n error.message.includes(\"is assigned to\") &&\n error.message.includes(\"Use --force to override\")\n ) {\n throw new PmCliError(error.message, error.exitCode, {\n code: \"ownership_conflict\",\n required: guidance.required,\n examples: guidance.examples,\n nextSteps: guidance.nextSteps,\n });\n }\n throw error;\n}\n\nfunction annotationStdinHint(collectionKey: string): string {\n return collectionKey === \"comments\" ? \"--stdin\" : \"--add -\";\n}\n\nfunction assertAnnotationAddValueIsNotFlagLike(\n raw: string,\n config: AnnotationCommandConfig<string>,\n): void {\n const emptyFlag = config.input.emptyFlag ?? \"--add\";\n if (emptyFlag !== \"--add\") {\n return;\n }\n const trimmed = raw.trim();\n if (!/^-{1,2}[A-Za-z][\\w-]*(?:=.*)?$/.test(trimmed)) {\n return;\n }\n const stdinHint = annotationStdinHint(config.collectionKey);\n const commandPrefix =\n config.input.mode === \"edit\"\n ? `pm ${config.collectionKey} <id> --edit <index>`\n : `pm ${config.collectionKey} <id>`;\n throw new PmCliError(\n `--add value \"${trimmed}\" looks like an option, not annotation text. Use ${stdinHint} to read stdin, or use text=${trimmed} for literal dash-leading text.`,\n EXIT_CODE.USAGE,\n {\n code: \"annotation_flag_like_value\",\n required: `Use ${stdinHint} for stdin input, pass plain text, or use text=${trimmed} when the text really starts with \"-\".`,\n examples: [\n `${commandPrefix} ${stdinHint}`,\n `${commandPrefix} --add text=${trimmed}`,\n ],\n },\n );\n}\n\n/**\n * Reject list-mode invocations that pass `--message` without any content\n * source. `--message` only labels a mutation's history entry, so accepting it\n * alone would exit 0 while recording nothing — the GH-588/GH-615 silent\n * data-loss trap. Shared here so comments, notes, and learnings all fail fast\n * with the same structured recovery bundle.\n */\nfunction assertAnnotationMessageHasTextSource(\n config: AnnotationCommandConfig<string>,\n options: AnnotationCommandOptions,\n): void {\n if (config.input.mode !== \"list\" || options.message === undefined) {\n return;\n }\n const noun = config.collectionKey.replace(/s$/, \"\");\n throw new PmCliError(\n `--message labels a ${noun} mutation but does not provide ${noun} text. Pass text positionally or with --add, --stdin, or --file.`,\n EXIT_CODE.USAGE,\n {\n code: \"annotation_message_without_text\",\n required: `Provide ${noun} text through a content source; --message only annotates the history entry of a mutation.`,\n examples: [\n `pm ${config.collectionKey} <id> --add \"text\" --message \"why\"`,\n `pm ${config.collectionKey} <id> ${annotationStdinHint(config.collectionKey)}`,\n ],\n },\n );\n}\n\n/** Implements run annotation command for the public runtime surface of this module. */\nexport async function runAnnotationCommand<\n TKey extends string,\n TEntry extends AnnotationEntry,\n>(\n id: string,\n options: AnnotationCommandOptions,\n global: GlobalOptions,\n config: AnnotationCommandConfig<TKey>,\n): Promise<AnnotationCommandResult<TKey, TEntry>> {\n assertAnnotationMessageHasTextSource(config, options);\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const limit = parseLimit(options.limit);\n\n if (config.input.mode === \"list\") {\n const located = await locateItem(\n pmRoot,\n id,\n settings.id_prefix,\n settings.item_format,\n typeRegistry.type_to_folder,\n );\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const allEntries = readAnnotationEntries<TEntry>(\n loaded.document.metadata,\n config.collectionKey,\n );\n return renderAnnotationResult(\n located.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n\n if (config.input.mode === \"delete\") {\n const op = config.deleteOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n const arrayIndex = resolveAnnotationIndex(\n config.input.index,\n entries.length,\n config.collectionKey,\n );\n entries.splice(arrayIndex, 1);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n const rawText = config.input.rawValue ?? config.input.value ?? \"\";\n assertAnnotationAddValueIsNotFlagLike(rawText, config);\n const text = config.parseText(config.input.value ?? \"\");\n if (!text.trim()) {\n throw new PmCliError(\n `${config.input.emptyFlag ?? \"--add\"} text cannot be empty`,\n EXIT_CODE.USAGE,\n );\n }\n\n if (config.input.mode === \"edit\") {\n const op = config.editOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n const arrayIndex = resolveAnnotationIndex(\n config.input.index,\n entries.length,\n config.collectionKey,\n );\n const existing = entries[arrayIndex];\n entries[arrayIndex] = {\n ...existing,\n text,\n edited_at: nowIso(),\n } as TEntry;\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n }\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.bypassOwnershipConflict,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(\n document.metadata,\n config.collectionKey,\n );\n entries.push({\n created_at: nowIso(),\n author,\n text,\n } as TEntry);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n\n const allEntries = readAnnotationEntries<TEntry>(\n result.item,\n config.collectionKey,\n );\n return renderAnnotationResult(\n result.item.id,\n config.collectionKey,\n allEntries,\n limit,\n options.includeMeta === true,\n );\n}\n\n/** Implements resolve annotation index for the public runtime surface of this module. */\nexport function resolveAnnotationIndex(\n oneBasedIndex: number | undefined,\n count: number,\n collectionKey: string,\n): number {\n if (\n oneBasedIndex === undefined ||\n !Number.isInteger(oneBasedIndex) ||\n oneBasedIndex < 1 ||\n oneBasedIndex > count\n ) {\n const singular = collectionKey.replace(/s$/, \"\");\n const label = `${singular.charAt(0).toUpperCase()}${singular.slice(1)}`;\n const noun = count === 1 ? `1 ${singular}` : `${count} ${collectionKey}`;\n throw new PmCliError(\n `${label} index ${oneBasedIndex ?? \"(missing)\"} out of range (item has ${noun})`,\n EXIT_CODE.USAGE,\n );\n }\n return oneBasedIndex - 1;\n}\n\nfunction renderAnnotationResult<\n TKey extends string,\n TEntry extends AnnotationEntry,\n>(\n id: string,\n collectionKey: TKey,\n allEntries: TEntry[],\n limit: number | undefined,\n includeMeta: boolean,\n): AnnotationCommandResult<TKey, TEntry> {\n const entries = limitAnnotationEntries(allEntries, limit);\n return {\n id,\n [collectionKey]: entries,\n count: entries.length,\n ...(includeMeta\n ? {\n total_count: allEntries.length,\n returned_count: entries.length,\n has_more: entries.length < allEntries.length,\n ...(limit !== undefined ? { limit } : {}),\n }\n : {}),\n } as AnnotationCommandResult<TKey, TEntry>;\n}\n"],
5
+ "mappings": ";;;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ClB,CAAC,OAAO,UAAU,aAAa,KAC/B,gBAAgB,KAChB,gBAAgB,OAChB;AACA,UAAM,WAAW,cAAc,QAAQ,MAAM,EAAE;AAC/C,UAAM,QAAQ,GAAG,SAAS,OAAO,CAAC,EAAE,YAAW,CAAE,GAAG,SAAS,MAAM,CAAC,CAAC;AACrE,UAAM,OAAO,UAAU,IAAI,KAAK,QAAQ,KAAK,GAAG,KAAK,IAAI,aAAa;AACtE,UAAM,IAAI,WACR,GAAG,KAAK,UAAU,iBAAiB,WAAW,2BAA2B,IAAI,KAC7E,UAAU,KAAK;EAEnB;AACA,SAAO,gBAAgB;AACzB;AAEA,SAAS,uBAIP,IACA,eACA,YACA,OACA,aAAoB;AAEpB,QAAM,UAAU,uBAAuB,YAAY,KAAK;AACxD,SAAO;IACL;IACA,CAAC,aAAa,GAAG;IACjB,OAAO,QAAQ;IACf,GAAI,cACA;MACE,aAAa,WAAW;MACxB,gBAAgB,QAAQ;MACxB,UAAU,QAAQ,SAAS,WAAW;MACtC,GAAI,UAAU,SAAY,EAAE,MAAK,IAAK,CAAA;QAExC,CAAA;;AAER;",
6
6
  "names": ["global", "allEntries", "result"]
7
7
  }
@@ -5,19 +5,19 @@ import {
5
5
  loadMutationCheckpoint,
6
6
  restoreCheckpointItems,
7
7
  writeMutationCheckpoint
8
- } from "./chunk-V4QHAMI5.js";
8
+ } from "./chunk-GROYI4RB.js";
9
9
  import {
10
10
  hasListFilters
11
11
  } from "./chunk-N7V7TI6J.js";
12
12
  import {
13
13
  runList
14
- } from "./chunk-YG56M3NE.js";
14
+ } from "./chunk-7DOJC3HS.js";
15
15
  import {
16
16
  runClose
17
- } from "./chunk-EI3UIMZM.js";
17
+ } from "./chunk-OWXOPDHD.js";
18
18
  import {
19
19
  runRestore
20
- } from "./chunk-FQF6VVPH.js";
20
+ } from "./chunk-MYSS5H2A.js";
21
21
  import {
22
22
  resolveAuthor
23
23
  } from "./chunk-CUFW7ITY.js";
@@ -27,7 +27,7 @@ import {
27
27
  listAllItemMetadataLight,
28
28
  nowIso,
29
29
  readSettings
30
- } from "./chunk-QFG4MB7P.js";
30
+ } from "./chunk-POG76WWZ.js";
31
31
  import {
32
32
  EXIT_CODE,
33
33
  PmCliError,
@@ -37,7 +37,7 @@ import {
37
37
  resolvePmRoot,
38
38
  resolveRuntimeStatusRegistry,
39
39
  toErrorMessage
40
- } from "./chunk-D35WYXWC.js";
40
+ } from "./chunk-HYW67VJ5.js";
41
41
 
42
42
  // dist/cli/commands/close-many.js
43
43
  var CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
@@ -399,6 +399,6 @@ export {
399
399
  runCloseMany,
400
400
  _testOnly
401
401
  };
402
- //# sourceMappingURL=chunk-U6RYD446.js.map
402
+ //# sourceMappingURL=chunk-HRW7GF6T.js.map
403
403
 
404
404
  //# debugId=25f9bc90-a71d-54c0-916a-8c3972f6df68
@@ -1,6 +1,6 @@
1
1
  // dist/core/fs/fs-utils.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]="236f0bc3-3408-510b-9449-4755558bc2fb")}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]="3af22af8-c497-5963-8e12-98ea9732ce39")}catch(e){}}();
4
4
  import * as fs from "node:fs/promises";
5
5
  import path from "node:path";
6
6
  import crypto from "node:crypto";
@@ -450,6 +450,9 @@ function cloneOptionalArray(values) {
450
450
  var SETTINGS_DEFAULTS = {
451
451
  version: 1,
452
452
  id_prefix: "pm-",
453
+ ids: {
454
+ token_length: 4
455
+ },
453
456
  author_default: "",
454
457
  item_format: "toon",
455
458
  locks: {
@@ -6855,6 +6858,6 @@ export {
6855
6858
  parseRegisteredItemFieldAssignments,
6856
6859
  applyRegisteredItemFieldDefaultsAndValidation
6857
6860
  };
6858
- //# sourceMappingURL=chunk-D35WYXWC.js.map
6861
+ //# sourceMappingURL=chunk-HYW67VJ5.js.map
6859
6862
 
6860
- //# debugId=236f0bc3-3408-510b-9449-4755558bc2fb
6863
+ //# debugId=3af22af8-c497-5963-8e12-98ea9732ce39