@unbrained/pm-cli 2026.7.2 → 2026.7.4

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 (546) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +29 -0
  3. package/CONTRIBUTING.md +38 -9
  4. package/README.md +1 -5
  5. package/dist/cli/commander-usage.js +54 -41
  6. package/dist/cli/commander-usage.js.map +1 -1
  7. package/dist/cli/commands/activity.js +79 -57
  8. package/dist/cli/commands/activity.js.map +1 -1
  9. package/dist/cli/commands/calendar.js +3 -3
  10. package/dist/cli/commands/calendar.js.map +1 -1
  11. package/dist/cli/commands/close-many.js +106 -65
  12. package/dist/cli/commands/close-many.js.map +1 -1
  13. package/dist/cli/commands/completion.js +231 -345
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/create.d.ts +2 -59
  16. package/dist/cli/commands/create.js +38 -39
  17. package/dist/cli/commands/create.js.map +1 -1
  18. package/dist/cli/commands/extension/doctor.js +56 -67
  19. package/dist/cli/commands/extension/doctor.js.map +1 -1
  20. package/dist/cli/commands/extension/scaffold.js +54 -133
  21. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  22. package/dist/cli/commands/extension/shared.js +21 -15
  23. package/dist/cli/commands/extension/shared.js.map +1 -1
  24. package/dist/cli/commands/files.js +3 -3
  25. package/dist/cli/commands/files.js.map +1 -1
  26. package/dist/cli/commands/health.js +101 -112
  27. package/dist/cli/commands/health.js.map +1 -1
  28. package/dist/cli/commands/history-compact.js +9 -18
  29. package/dist/cli/commands/history-compact.js.map +1 -1
  30. package/dist/cli/commands/history-repair.js +9 -19
  31. package/dist/cli/commands/history-repair.js.map +1 -1
  32. package/dist/cli/commands/init-agent-guidance.js +160 -111
  33. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  34. package/dist/cli/commands/init.js +3 -3
  35. package/dist/cli/commands/init.js.map +1 -1
  36. package/dist/cli/commands/item-filter-options.d.ts +2 -0
  37. package/dist/cli/commands/item-filter-options.js +2 -2
  38. package/dist/cli/commands/item-filter-options.js.map +1 -1
  39. package/dist/cli/commands/mutation-command-options.d.ts +78 -0
  40. package/dist/cli/commands/mutation-command-options.js +10 -0
  41. package/dist/cli/commands/mutation-command-options.js.map +1 -0
  42. package/dist/cli/commands/next.js +13 -10
  43. package/dist/cli/commands/next.js.map +1 -1
  44. package/dist/cli/commands/profile.js +23 -15
  45. package/dist/cli/commands/profile.js.map +1 -1
  46. package/dist/cli/commands/reindex.js +3 -3
  47. package/dist/cli/commands/reindex.js.map +1 -1
  48. package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
  49. package/dist/cli/commands/shared-unset-fields.js +31 -2
  50. package/dist/cli/commands/shared-unset-fields.js.map +1 -1
  51. package/dist/cli/commands/update.d.ts +2 -59
  52. package/dist/cli/commands/update.js +26 -97
  53. package/dist/cli/commands/update.js.map +1 -1
  54. package/dist/cli/commands/validate.d.ts +2 -0
  55. package/dist/cli/commands/validate.js +16 -4
  56. package/dist/cli/commands/validate.js.map +1 -1
  57. package/dist/cli/error-guidance.js +9 -6
  58. package/dist/cli/error-guidance.js.map +1 -1
  59. package/dist/cli/extension-command-help.js +27 -19
  60. package/dist/cli/extension-command-help.js.map +1 -1
  61. package/dist/cli/help-json-payload.js +57 -49
  62. package/dist/cli/help-json-payload.js.map +1 -1
  63. package/dist/cli/main.js +48 -32
  64. package/dist/cli/main.js.map +1 -1
  65. package/dist/cli/register-list-query.js +215 -213
  66. package/dist/cli/register-list-query.js.map +1 -1
  67. package/dist/cli/register-mutation.js +368 -368
  68. package/dist/cli/register-mutation.js.map +1 -1
  69. package/dist/cli/register-operations.js +303 -299
  70. package/dist/cli/register-operations.js.map +1 -1
  71. package/dist/cli/registration-helpers.d.ts +4 -0
  72. package/dist/cli/registration-helpers.js +51 -56
  73. package/dist/cli/registration-helpers.js.map +1 -1
  74. package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +16 -0
  75. package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js → activity-OENQCYZD.js} +9 -9
  76. package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js → aggregate-EC4LWS3U.js} +8 -8
  77. package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js → aggregate-RCB3QJJE.js} +8 -8
  78. package/dist/cli-bundle/chunks/{append-H32VOR2Y.js → append-ADBOI3A6.js} +8 -8
  79. package/dist/cli-bundle/chunks/{append-UBM632FK.js → append-XLEKVVWB.js} +8 -8
  80. package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js → chunk-2LRMWMZ6.js} +7 -7
  81. package/dist/cli-bundle/chunks/{chunk-2227673O.js → chunk-2ONH3WG6.js} +32 -13
  82. package/dist/cli-bundle/chunks/{chunk-2227673O.js.map → chunk-2ONH3WG6.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js → chunk-2VK677OA.js} +72 -49
  84. package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +7 -0
  85. package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js → chunk-3C5T3ZEO.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js → chunk-3MLQZI3H.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js → chunk-4EVY7CQN.js} +2 -2
  88. package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js → chunk-4IW7STMB.js} +7 -7
  89. package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js → chunk-4KPQQ42D.js} +166 -110
  90. package/dist/cli-bundle/chunks/chunk-4KPQQ42D.js.map +1 -0
  91. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js → chunk-4OXNQHKQ.js} +23 -17
  92. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js.map → chunk-4OXNQHKQ.js.map} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js → chunk-4PJYRA3V.js} +31 -12
  94. package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js.map → chunk-4PJYRA3V.js.map} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js → chunk-4SHME4VR.js} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js → chunk-5FYY76HR.js} +28 -99
  97. package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js → chunk-6QY2NA2M.js} +24 -18
  99. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js.map → chunk-6QY2NA2M.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js → chunk-6YB7HG2J.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js → chunk-724VLYDJ.js} +2 -2
  102. package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js → chunk-75VMARGO.js} +11 -11
  103. package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-XWGEMNBR.js → chunk-7745CXNI.js} +119 -195
  105. package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +7 -0
  106. package/dist/cli-bundle/chunks/{chunk-YPKFV2JR.js → chunk-7G5SUU6F.js} +76 -54
  107. package/dist/cli-bundle/chunks/chunk-7G5SUU6F.js.map +1 -0
  108. package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js → chunk-7ITQSEBL.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-W47SML5B.js → chunk-A222YWOQ.js} +7 -7
  110. package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js → chunk-A2W3XKAD.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js → chunk-AOP2EMK3.js} +3 -3
  112. package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js → chunk-AZMPKLIA.js} +72 -49
  113. package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-7NSPKJUS.js → chunk-BDDYM4LH.js} +262 -252
  115. package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-JXAUVO6X.js → chunk-CN4OAA2G.js} +55 -20
  117. package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js → chunk-CQFZRLXQ.js} +3 -3
  119. package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js → chunk-CQISNF3Z.js} +7 -7
  120. package/dist/cli-bundle/chunks/{chunk-S62UANU7.js → chunk-D2LDM35X.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js → chunk-DEIDJQZK.js} +57 -136
  122. package/dist/cli-bundle/chunks/chunk-DEIDJQZK.js.map +7 -0
  123. package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js → chunk-DJ5S2LDY.js} +7 -7
  124. package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js → chunk-EB4BBEZD.js} +6 -6
  125. package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js → chunk-EH23N5FX.js} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js → chunk-FDNJMYZB.js} +6 -6
  127. package/dist/cli-bundle/chunks/{chunk-K2VYLVX4.js → chunk-FMWQRMHS.js} +33 -6
  128. package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js → chunk-HL742IBM.js} +4 -4
  130. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js → chunk-J4KNRDI3.js} +59 -70
  131. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js.map → chunk-J4KNRDI3.js.map} +1 -1
  132. package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js → chunk-JYLFF7GJ.js} +166 -110
  133. package/dist/cli-bundle/chunks/chunk-JYLFF7GJ.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-GFMSLORL.js → chunk-JZJJEJBR.js} +75 -53
  135. package/dist/cli-bundle/chunks/chunk-JZJJEJBR.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-7TH5NMVB.js → chunk-KKHIQOTN.js} +25 -19
  137. package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-5GVTFFTC.js → chunk-LLQLLAKU.js} +118 -194
  139. package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +1 -0
  140. package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js → chunk-M34MVAOP.js} +58 -137
  141. package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +1 -0
  142. package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js → chunk-M6PR5BC6.js} +7 -7
  143. package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js → chunk-MTB4PRA3.js} +10 -10
  144. package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js → chunk-MZ4NH46V.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-AIAIXG7I.js → chunk-MZG6I2Q2.js} +39 -5
  147. package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js → chunk-N2LOJUBB.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js → chunk-NGDK3KEZ.js} +5 -5
  150. package/dist/cli-bundle/chunks/{chunk-SYNKD3ZG.js → chunk-NHDR3UCW.js} +46 -60
  151. package/dist/cli-bundle/chunks/chunk-NHDR3UCW.js.map +7 -0
  152. package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js → chunk-NHKXOMZ5.js} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js → chunk-OTSP6UEX.js} +7 -7
  154. package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js → chunk-PUVPC5DL.js} +4 -4
  155. package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js → chunk-PV5JS7MP.js} +3 -3
  156. package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js → chunk-Q2266G4S.js} +3 -3
  157. package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js → chunk-Q3XVLRCJ.js} +9 -9
  158. package/dist/cli-bundle/chunks/{chunk-AJEBCRIY.js → chunk-QFXFKYNQ.js} +47 -61
  159. package/dist/cli-bundle/chunks/chunk-QFXFKYNQ.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js → chunk-R7EMP4JG.js} +9 -9
  161. package/dist/cli-bundle/chunks/{chunk-SPM2XLWI.js → chunk-SBNT6SLO.js} +22 -7
  162. package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-I66WE2HE.js → chunk-SL2ANJSV.js} +260 -250
  164. package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +1 -0
  165. package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js → chunk-T5RTYLZJ.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js → chunk-TGYDJEJH.js} +7 -7
  167. package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js → chunk-TO4KCIOT.js} +3 -3
  168. package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js → chunk-TUV7SIWZ.js} +2 -2
  169. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js → chunk-UGDONITK.js} +58 -69
  170. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js.map → chunk-UGDONITK.js.map} +2 -2
  171. package/dist/cli-bundle/chunks/{chunk-NRZS637N.js → chunk-UYLA5ROU.js} +56 -21
  172. package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +1 -0
  173. package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js → chunk-V655JQ5J.js} +8 -8
  174. package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js → chunk-W5X3AHJN.js} +2 -2
  175. package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js → chunk-WBWRQS32.js} +5 -5
  176. package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js → chunk-WOOB7PV7.js} +3 -3
  177. package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js → chunk-WSDIALO4.js} +2 -2
  178. package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js → chunk-WTXDLBSZ.js} +2 -2
  179. package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js → chunk-XBIYI23P.js} +8 -8
  180. package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js → chunk-XFO2NJY6.js} +29 -100
  181. package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +1 -0
  182. package/dist/cli-bundle/chunks/{chunk-TPOFWBMY.js → chunk-XQCWTSLO.js} +26 -20
  183. package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js → chunk-Y2VSCQ77.js} +4 -4
  185. package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js → chunk-YZR7UMZ6.js} +2 -2
  186. package/dist/cli-bundle/chunks/{chunk-YLZZ6T54.js → chunk-YZWXMDNH.js} +23 -8
  187. package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js → chunk-ZIEGTQCY.js} +3 -3
  189. package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js → chunk-ZZWMJVW2.js} +4 -4
  190. package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js → claim-D6L33A5Y.js} +8 -8
  191. package/dist/cli-bundle/chunks/{claim-SENTPZBN.js → claim-YAFUTPVK.js} +8 -8
  192. package/dist/cli-bundle/chunks/close-KLDLHAOP.js +14 -0
  193. package/dist/cli-bundle/chunks/{close-424MX4CU.js → close-TGYXG7TV.js} +7 -7
  194. package/dist/cli-bundle/chunks/{close-many-SWY34BII.js → close-many-4QSWKCRU.js} +119 -76
  195. package/dist/cli-bundle/chunks/close-many-4QSWKCRU.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{close-many-2IV4J2TR.js → close-many-SNA6LNZH.js} +120 -77
  197. package/dist/cli-bundle/chunks/close-many-SNA6LNZH.js.map +1 -0
  198. package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js → comments-QC6ARR5X.js} +9 -9
  199. package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js → comments-ZHVYGUVC.js} +9 -9
  200. package/dist/cli-bundle/chunks/{config-G74GISC4.js → config-O6W2EU2G.js} +7 -7
  201. package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js → config-XQRFJXJP.js} +7 -7
  202. package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js → context-IHE3IXN5.js} +12 -12
  203. package/dist/cli-bundle/chunks/{context-ZQY54JNS.js → context-WSYWBEUL.js} +12 -12
  204. package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js → contracts-CVBINC7C.js} +3 -3
  205. package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js → contracts-NLCDIZAT.js} +3 -3
  206. package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js → copy-7MUQC44A.js} +5 -5
  207. package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js → copy-ANWXDJVC.js} +5 -5
  208. package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +28 -0
  209. package/dist/cli-bundle/chunks/{create-VSKYSOCD.js → create-JIA2IFCO.js} +12 -12
  210. package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js → delete-5OLYWQIC.js} +5 -5
  211. package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js → delete-INHKCIRN.js} +5 -5
  212. package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js → deps-CCSWGZW7.js} +5 -5
  213. package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js → deps-IYEID3QX.js} +5 -5
  214. package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js → docs-3XZK22WF.js} +7 -7
  215. package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js → docs-PKO7OEIM.js} +7 -7
  216. package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js → eval-5XYP6NMY.js} +10 -10
  217. package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js → eval-O4WGQYDI.js} +10 -10
  218. package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js → extension-PVGRRZZG.js} +11 -11
  219. package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js → extension-T7JNTAAA.js} +11 -11
  220. package/dist/cli-bundle/chunks/{files-5D65CHGE.js → files-7IU56S6R.js} +10 -10
  221. package/dist/cli-bundle/chunks/files-7IU56S6R.js.map +1 -0
  222. package/dist/cli-bundle/chunks/{files-GPIG77EN.js → files-W7HH5EOD.js} +9 -9
  223. package/dist/cli-bundle/chunks/{files-GPIG77EN.js.map → files-W7HH5EOD.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js → focus-6FA5KYRY.js} +6 -6
  225. package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js → focus-CQ63JFDG.js} +6 -6
  226. package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js → gc-3BG67KTO.js} +3 -3
  227. package/dist/cli-bundle/chunks/{gc-VZIXDL32.js → gc-PEZYGNVB.js} +3 -3
  228. package/dist/cli-bundle/chunks/{get-GIBRUUOP.js → get-J6CSJ4SX.js} +10 -10
  229. package/dist/cli-bundle/chunks/{get-IOVAN6RU.js → get-KJTKGNEQ.js} +10 -10
  230. package/dist/cli-bundle/chunks/{health-L2U3AFKV.js → health-32UQICEL.js} +115 -123
  231. package/dist/cli-bundle/chunks/health-32UQICEL.js.map +1 -0
  232. package/dist/cli-bundle/chunks/{health-MM7AWXYF.js → health-ZUZG5ULV.js} +114 -122
  233. package/dist/cli-bundle/chunks/health-ZUZG5ULV.js.map +7 -0
  234. package/dist/cli-bundle/chunks/history-IOH6FKG7.js +18 -0
  235. package/dist/cli-bundle/chunks/{history-IL7XCEX2.js → history-W6QVR6FA.js} +8 -8
  236. package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js → history-compact-F355EGL4.js} +20 -27
  237. package/dist/cli-bundle/chunks/history-compact-F355EGL4.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js → history-compact-JQ6ZGYSJ.js} +19 -26
  239. package/dist/cli-bundle/chunks/history-compact-JQ6ZGYSJ.js.map +7 -0
  240. package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js → history-redact-TUWOUYX5.js} +9 -9
  241. package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +19 -0
  242. package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js → history-repair-MPCAIKYE.js} +20 -28
  243. package/dist/cli-bundle/chunks/history-repair-MPCAIKYE.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js → history-repair-ZKS3LKPV.js} +19 -27
  245. package/dist/cli-bundle/chunks/history-repair-ZKS3LKPV.js.map +7 -0
  246. package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +22 -0
  247. package/dist/cli-bundle/chunks/{init-F27NHENZ.js → init-MAA6UMNQ.js} +12 -12
  248. package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js → learnings-EYC3OKS2.js} +9 -9
  249. package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js → learnings-HKJJUVTA.js} +9 -9
  250. package/dist/cli-bundle/chunks/{list-VMPWTURB.js → list-HFD5737R.js} +8 -8
  251. package/dist/cli-bundle/chunks/{list-HPMEKCAA.js → list-KN3TL5Y5.js} +8 -8
  252. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js → next-DQUMFAHG.js} +25 -22
  253. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js.map → next-DQUMFAHG.js.map} +2 -2
  254. package/dist/cli-bundle/chunks/{next-QM6YJIIS.js → next-JUEYC5HE.js} +26 -23
  255. package/dist/cli-bundle/chunks/next-JUEYC5HE.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js → notes-XATYT43P.js} +9 -9
  257. package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js → notes-ZG6RLZXB.js} +9 -9
  258. package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js → plan-5NWQL2DH.js} +12 -12
  259. package/dist/cli-bundle/chunks/{plan-C5IMM335.js → plan-DVVLX7LK.js} +12 -12
  260. package/dist/cli-bundle/chunks/{profile-CCOKZ2IQ.js → profile-54DZ4CLB.js} +27 -19
  261. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +1 -0
  262. package/dist/cli-bundle/chunks/{profile-HUCENIEQ.js → profile-PLIQVEOY.js} +26 -18
  263. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{register-list-query-ROSNIL52.js → register-list-query-PNRAHNIQ.js} +181 -172
  265. package/dist/cli-bundle/chunks/register-list-query-PNRAHNIQ.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{register-list-query-XN4ZRHSV.js → register-list-query-WRS6ACUW.js} +180 -171
  267. package/dist/cli-bundle/chunks/register-list-query-WRS6ACUW.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{register-mutation-KRLAHEL2.js → register-mutation-ET6E4VLE.js} +367 -361
  269. package/dist/cli-bundle/chunks/register-mutation-ET6E4VLE.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{register-mutation-CFSB2MS3.js → register-mutation-K2MNRWGI.js} +368 -362
  271. package/dist/cli-bundle/chunks/register-mutation-K2MNRWGI.js.map +1 -0
  272. package/dist/cli-bundle/chunks/{register-operations-MBN4KGUM.js → register-operations-6DQRUTIX.js} +310 -305
  273. package/dist/cli-bundle/chunks/register-operations-6DQRUTIX.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{register-operations-4PASGJDB.js → register-operations-73UDWMVB.js} +309 -304
  275. package/dist/cli-bundle/chunks/register-operations-73UDWMVB.js.map +7 -0
  276. package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js → register-setup-FXZJ2CEJ.js} +15 -15
  277. package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js → register-setup-LYYCMQFV.js} +15 -15
  278. package/dist/cli-bundle/chunks/restore-L27TMMCF.js +17 -0
  279. package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js → restore-R6YJHQK3.js} +9 -9
  280. package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js → scheduling-shortcuts-LE4S7OI7.js} +12 -12
  281. package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js → scheduling-shortcuts-OGODPUBL.js} +12 -12
  282. package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js → schema-ICCD3HOP.js} +7 -7
  283. package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js → schema-RHH23PQX.js} +7 -7
  284. package/dist/cli-bundle/chunks/{search-FP7MEU4S.js → search-HDDKOPFE.js} +10 -10
  285. package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js → search-Z2VGP2Q5.js} +10 -10
  286. package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js → stats-DHMRXHOB.js} +6 -6
  287. package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js → stats-ETFP37MB.js} +6 -6
  288. package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js → telemetry-NUZNKDCP.js} +4 -4
  289. package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js → telemetry-ZRBM22QD.js} +4 -4
  290. package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js → test-H36PM746.js} +15 -15
  291. package/dist/cli-bundle/chunks/{test-YCDAUBWF.js → test-XNKTIP4Y.js} +15 -15
  292. package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js → test-all-APCBSXQI.js} +17 -17
  293. package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js → test-all-KIK3OYBY.js} +17 -17
  294. package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js → test-runs-5SLLV3XU.js} +4 -4
  295. package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js → test-runs-L3WKLO67.js} +4 -4
  296. package/dist/cli-bundle/chunks/update-RQKI3AMW.js +24 -0
  297. package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js → update-ZM7NJWHY.js} +15 -15
  298. package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js → update-many-GFCQG6ZQ.js} +28 -28
  299. package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js → update-many-XGTJ7QIU.js} +28 -28
  300. package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js → upgrade-KJ3JGELR.js} +11 -11
  301. package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js → upgrade-RBRQ7PQU.js} +11 -11
  302. package/dist/cli-bundle/chunks/{validate-732RWS5W.js → validate-EW6TGC7R.js} +31 -21
  303. package/dist/cli-bundle/chunks/validate-EW6TGC7R.js.map +7 -0
  304. package/dist/cli-bundle/chunks/{validate-W7H5TEDC.js → validate-T6PR5WAL.js} +32 -22
  305. package/dist/cli-bundle/chunks/validate-T6PR5WAL.js.map +1 -0
  306. package/dist/cli-bundle/main.js +180 -122
  307. package/dist/cli-bundle/main.js.map +3 -3
  308. package/dist/core/extensions/extension-types.d.ts +1 -2
  309. package/dist/core/extensions/extension-types.js +2 -2
  310. package/dist/core/extensions/extension-types.js.map +1 -1
  311. package/dist/core/history/history-rewrite.d.ts +10 -0
  312. package/dist/core/history/history-rewrite.js +27 -3
  313. package/dist/core/history/history-rewrite.js.map +1 -1
  314. package/dist/core/item/type-registry.d.ts +1 -0
  315. package/dist/core/item/type-registry.js +180 -194
  316. package/dist/core/item/type-registry.js.map +1 -1
  317. package/dist/core/schema/runtime-schema.js +65 -54
  318. package/dist/core/schema/runtime-schema.js.map +1 -1
  319. package/dist/core/schema/status-defs-file.js +26 -3
  320. package/dist/core/schema/status-defs-file.js.map +1 -1
  321. package/dist/core/search/corpus.js +25 -19
  322. package/dist/core/search/corpus.js.map +1 -1
  323. package/dist/core/shared/memo.d.ts +12 -0
  324. package/dist/core/shared/memo.js +25 -0
  325. package/dist/core/shared/memo.js.map +1 -0
  326. package/dist/core/shared/serialization.js +24 -14
  327. package/dist/core/shared/serialization.js.map +1 -1
  328. package/dist/core/shared/time.js +26 -4
  329. package/dist/core/shared/time.js.map +1 -1
  330. package/dist/core/store/front-matter-cache.d.ts +5 -0
  331. package/dist/core/store/front-matter-cache.js +79 -20
  332. package/dist/core/store/front-matter-cache.js.map +1 -1
  333. package/dist/sdk/cli-contracts/flag-contracts.js +73 -99
  334. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  335. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  336. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  337. package/dist/sdk/cli-contracts/tool-schema.js +55 -94
  338. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  339. package/dist/sdk/compose.js +51 -42
  340. package/dist/sdk/compose.js.map +1 -1
  341. package/dist/sdk/package-import-adapters.d.ts +90 -2
  342. package/dist/sdk/package-import-adapters.js +274 -2
  343. package/dist/sdk/package-import-adapters.js.map +1 -1
  344. package/dist/sdk/runtime.d.ts +1 -1
  345. package/dist/sdk/runtime.js +3 -3
  346. package/dist/sdk/runtime.js.map +1 -1
  347. package/docs/AGENT_GUIDE.md +2 -2
  348. package/docs/ARCHITECTURE.md +2 -2
  349. package/docs/COMMANDS.md +8 -4
  350. package/docs/CONFIGURATION.md +1 -1
  351. package/docs/EXTENSIONS.md +12 -12
  352. package/docs/ONBOARDING.md +4 -2
  353. package/docs/README.md +2 -0
  354. package/docs/examples/starter-extension/README.md +11 -10
  355. package/marketplace.json +3 -3
  356. package/package.json +4 -3
  357. package/packages/pm-beads/extensions/beads/runtime-loader.ts +27 -40
  358. package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
  359. package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
  360. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
  361. package/packages/pm-todos/extensions/todos/runtime-loader.ts +48 -76
  362. package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
  363. package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
  364. package/plugins/pm-claude/README.md +6 -3
  365. package/plugins/pm-claude/commands/pm-init.md +1 -1
  366. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
  367. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
  368. package/scripts/install.ps1 +7 -7
  369. package/dist/cli-bundle/chunks/activity-WEIEMM73.js +0 -16
  370. package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +0 -7
  372. package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +0 -7
  373. package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +0 -7
  375. package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +0 -1
  377. package/dist/cli-bundle/chunks/chunk-AIAIXG7I.js.map +0 -7
  378. package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +0 -1
  379. package/dist/cli-bundle/chunks/chunk-GFMSLORL.js.map +0 -7
  380. package/dist/cli-bundle/chunks/chunk-GRRG3MCT.js.map +0 -7
  381. package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +0 -1
  382. package/dist/cli-bundle/chunks/chunk-JXAUVO6X.js.map +0 -7
  383. package/dist/cli-bundle/chunks/chunk-K2VYLVX4.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-KIYCOJ63.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +0 -7
  386. package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +0 -1
  387. package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +0 -1
  388. package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +0 -7
  389. package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +0 -7
  390. package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +0 -1
  391. package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +0 -1
  392. package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +0 -7
  393. package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +0 -7
  394. package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +0 -1
  395. package/dist/cli-bundle/chunks/chunk-YPKFV2JR.js.map +0 -1
  396. package/dist/cli-bundle/chunks/close-YCWQQPDS.js +0 -14
  397. package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +0 -1
  398. package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +0 -7
  399. package/dist/cli-bundle/chunks/create-XTMAPS7I.js +0 -28
  400. package/dist/cli-bundle/chunks/files-5D65CHGE.js.map +0 -1
  401. package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +0 -1
  402. package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +0 -7
  403. package/dist/cli-bundle/chunks/history-DD7L7BNL.js +0 -18
  404. package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +0 -1
  405. package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +0 -7
  406. package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +0 -19
  407. package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +0 -1
  408. package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +0 -7
  409. package/dist/cli-bundle/chunks/init-HHVQQP6C.js +0 -22
  410. package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +0 -1
  411. package/dist/cli-bundle/chunks/profile-CCOKZ2IQ.js.map +0 -1
  412. package/dist/cli-bundle/chunks/profile-HUCENIEQ.js.map +0 -7
  413. package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +0 -1
  414. package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +0 -7
  415. package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +0 -1
  416. package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +0 -7
  417. package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +0 -7
  418. package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +0 -1
  419. package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +0 -17
  420. package/dist/cli-bundle/chunks/update-MTCFES6X.js +0 -24
  421. package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +0 -7
  422. package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +0 -1
  423. /package/dist/cli-bundle/chunks/{activity-WEIEMM73.js.map → activity-IDS5GSYG.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js.map → activity-OENQCYZD.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js.map → aggregate-EC4LWS3U.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js.map → aggregate-RCB3QJJE.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{append-H32VOR2Y.js.map → append-ADBOI3A6.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{append-UBM632FK.js.map → append-XLEKVVWB.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js.map → chunk-2LRMWMZ6.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js.map → chunk-3C5T3ZEO.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js.map → chunk-3MLQZI3H.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js.map → chunk-4EVY7CQN.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js.map → chunk-4IW7STMB.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js.map → chunk-4SHME4VR.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js.map → chunk-6YB7HG2J.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js.map → chunk-724VLYDJ.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js.map → chunk-7ITQSEBL.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-W47SML5B.js.map → chunk-A222YWOQ.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js.map → chunk-A2W3XKAD.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js.map → chunk-AOP2EMK3.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js.map → chunk-CQFZRLXQ.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js.map → chunk-CQISNF3Z.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-S62UANU7.js.map → chunk-D2LDM35X.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js.map → chunk-DJ5S2LDY.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js.map → chunk-EB4BBEZD.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js.map → chunk-EH23N5FX.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js.map → chunk-FDNJMYZB.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js.map → chunk-HL742IBM.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js.map → chunk-M6PR5BC6.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js.map → chunk-MZ4NH46V.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js.map → chunk-N2LOJUBB.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js.map → chunk-NGDK3KEZ.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js.map → chunk-NHKXOMZ5.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js.map → chunk-OTSP6UEX.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js.map → chunk-PUVPC5DL.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js.map → chunk-PV5JS7MP.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js.map → chunk-Q2266G4S.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js.map → chunk-Q3XVLRCJ.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js.map → chunk-R7EMP4JG.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js.map → chunk-T5RTYLZJ.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js.map → chunk-TGYDJEJH.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js.map → chunk-TO4KCIOT.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js.map → chunk-TUV7SIWZ.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js.map → chunk-V655JQ5J.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js.map → chunk-W5X3AHJN.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js.map → chunk-WBWRQS32.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js.map → chunk-WOOB7PV7.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js.map → chunk-WSDIALO4.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js.map → chunk-WTXDLBSZ.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js.map → chunk-XBIYI23P.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js.map → chunk-Y2VSCQ77.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js.map → chunk-YZR7UMZ6.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js.map → chunk-ZIEGTQCY.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js.map → chunk-ZZWMJVW2.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js.map → claim-D6L33A5Y.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{claim-SENTPZBN.js.map → claim-YAFUTPVK.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{close-YCWQQPDS.js.map → close-KLDLHAOP.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{close-424MX4CU.js.map → close-TGYXG7TV.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js.map → comments-QC6ARR5X.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js.map → comments-ZHVYGUVC.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{config-G74GISC4.js.map → config-O6W2EU2G.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js.map → config-XQRFJXJP.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js.map → context-IHE3IXN5.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{context-ZQY54JNS.js.map → context-WSYWBEUL.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js.map → contracts-CVBINC7C.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js.map → contracts-NLCDIZAT.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js.map → copy-7MUQC44A.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js.map → copy-ANWXDJVC.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{create-XTMAPS7I.js.map → create-AJ6HUR5W.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{create-VSKYSOCD.js.map → create-JIA2IFCO.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js.map → delete-5OLYWQIC.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js.map → delete-INHKCIRN.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js.map → deps-CCSWGZW7.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js.map → deps-IYEID3QX.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js.map → docs-3XZK22WF.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js.map → docs-PKO7OEIM.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js.map → eval-5XYP6NMY.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js.map → eval-O4WGQYDI.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js.map → extension-PVGRRZZG.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js.map → extension-T7JNTAAA.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js.map → focus-6FA5KYRY.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js.map → focus-CQ63JFDG.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js.map → gc-3BG67KTO.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{gc-VZIXDL32.js.map → gc-PEZYGNVB.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{get-GIBRUUOP.js.map → get-J6CSJ4SX.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{get-IOVAN6RU.js.map → get-KJTKGNEQ.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{history-DD7L7BNL.js.map → history-IOH6FKG7.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{history-IL7XCEX2.js.map → history-W6QVR6FA.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js.map → history-redact-TUWOUYX5.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{history-redact-IX4YEWMY.js.map → history-redact-VVDOARNO.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{init-HHVQQP6C.js.map → init-CZLEEE6Q.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{init-F27NHENZ.js.map → init-MAA6UMNQ.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js.map → learnings-EYC3OKS2.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js.map → learnings-HKJJUVTA.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{list-VMPWTURB.js.map → list-HFD5737R.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{list-HPMEKCAA.js.map → list-KN3TL5Y5.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js.map → notes-XATYT43P.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js.map → notes-ZG6RLZXB.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js.map → plan-5NWQL2DH.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{plan-C5IMM335.js.map → plan-DVVLX7LK.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js.map → register-setup-FXZJ2CEJ.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js.map → register-setup-LYYCMQFV.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{restore-5UEAGG3W.js.map → restore-L27TMMCF.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js.map → restore-R6YJHQK3.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js.map → scheduling-shortcuts-LE4S7OI7.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js.map → scheduling-shortcuts-OGODPUBL.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js.map → schema-ICCD3HOP.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js.map → schema-RHH23PQX.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{search-FP7MEU4S.js.map → search-HDDKOPFE.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js.map → search-Z2VGP2Q5.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js.map → stats-DHMRXHOB.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js.map → stats-ETFP37MB.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js.map → telemetry-NUZNKDCP.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js.map → telemetry-ZRBM22QD.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js.map → test-H36PM746.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{test-YCDAUBWF.js.map → test-XNKTIP4Y.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js.map → test-all-APCBSXQI.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js.map → test-all-KIK3OYBY.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js.map → test-runs-5SLLV3XU.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js.map → test-runs-L3WKLO67.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{update-MTCFES6X.js.map → update-RQKI3AMW.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js.map → update-ZM7NJWHY.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js.map → update-many-GFCQG6ZQ.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js.map → update-many-XGTJ7QIU.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js.map → upgrade-KJ3JGELR.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js.map → upgrade-RBRQ7PQU.js.map} +0 -0
@@ -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]="5e1251c7-61f3-5c3e-9990-c7f3ea8385cb")}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]="919c1fe0-eaf0-51d1-9788-48d73b423eb3")}catch(e){}}();
3
3
  import {
4
4
  splitCommaList
5
5
  } from "./chunk-P4SESZGT.js";
@@ -10,26 +10,27 @@ import {
10
10
  getGlobalOptions,
11
11
  invalidateSearchCachesForMutation,
12
12
  normalizeCreateOptions,
13
- normalizeUpdateOptions
14
- } from "./chunk-AJEBCRIY.js";
13
+ normalizeUpdateOptions,
14
+ readOptionString
15
+ } from "./chunk-QFXFKYNQ.js";
15
16
  import {
16
17
  printError,
17
18
  printResult,
18
19
  writeStdout
19
- } from "./chunk-2KWL5NPW.js";
20
- import "./chunk-TPOFWBMY.js";
20
+ } from "./chunk-6YB7HG2J.js";
21
+ import "./chunk-XQCWTSLO.js";
21
22
  import {
22
23
  CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
23
24
  UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS
24
- } from "./chunk-5GVTFFTC.js";
25
- import "./chunk-NRZS637N.js";
26
- import "./chunk-KN3URLKS.js";
27
- import "./chunk-K2VYLVX4.js";
25
+ } from "./chunk-LLQLLAKU.js";
26
+ import "./chunk-UYLA5ROU.js";
27
+ import "./chunk-AOP2EMK3.js";
28
+ import "./chunk-FMWQRMHS.js";
28
29
  import {
29
30
  BUILTIN_ITEM_TYPE_VALUES,
30
31
  EXIT_CODE,
31
32
  PmCliError
32
- } from "./chunk-I66WE2HE.js";
33
+ } from "./chunk-SL2ANJSV.js";
33
34
 
34
35
  // dist/cli/register-mutation.js
35
36
  import { Option } from "commander";
@@ -102,6 +103,11 @@ function addHiddenOption(command, flags, description, repeatable) {
102
103
  }
103
104
  command.addOption(option);
104
105
  }
106
+ function addHiddenOptions(command, aliases, repeatable) {
107
+ for (const [flags, description] of aliases) {
108
+ addHiddenOption(command, flags, description, repeatable);
109
+ }
110
+ }
105
111
  var SCHEMA_SHORTHAND_RESERVED_PREFIXES = ["add-", "apply-", "list-", "remove-", "show-"];
106
112
  var SCHEMA_SHORTHAND_RESERVED_TOKENS = /* @__PURE__ */ new Set([
107
113
  "field",
@@ -405,9 +411,6 @@ function pickStringOption(...candidates) {
405
411
  }
406
412
  return void 0;
407
413
  }
408
- function readOptionString(options, key) {
409
- return typeof options[key] === "string" ? options[key] : void 0;
410
- }
411
414
  function stringArrayOption(value) {
412
415
  if (Array.isArray(value)) {
413
416
  return value;
@@ -460,7 +463,7 @@ async function runCreateAction(typeOrTitle, secondTitle, options, command) {
460
463
  delete options.bodyFile;
461
464
  }
462
465
  const normalized = normalizeCreateOptions(options, { requireType: false });
463
- const { runCreate } = await import("./create-VSKYSOCD.js");
466
+ const { runCreate } = await import("./create-JIA2IFCO.js");
464
467
  const result = await runCreate(normalized, globalOptions);
465
468
  await invalidateSearchCachesForMutation(globalOptions, result);
466
469
  printResult(result, globalOptions);
@@ -493,7 +496,7 @@ function buildCloseManyListOptions(options) {
493
496
  async function runCloseManyAction(options, command) {
494
497
  const globalOptions = getGlobalOptions(command);
495
498
  const startedAt = Date.now();
496
- const { runCloseMany } = await import("./close-many-2IV4J2TR.js");
499
+ const { runCloseMany } = await import("./close-many-SNA6LNZH.js");
497
500
  const result = await runCloseMany({
498
501
  status: readOptionString(options, "filterStatus"),
499
502
  list: buildCloseManyListOptions(options),
@@ -515,6 +518,46 @@ async function runCloseManyAction(options, command) {
515
518
  printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
516
519
  }
517
520
  }
521
+ async function runUpdateManyAction(options, command) {
522
+ const globalOptions = getGlobalOptions(command);
523
+ const startedAt = Date.now();
524
+ const { runUpdateMany } = await import("./update-many-GFCQG6ZQ.js");
525
+ const result = await runUpdateMany({
526
+ status: readOptionString(options, "filterStatus"),
527
+ list: buildUpdateManyListOptions(options),
528
+ update: normalizeUpdateOptions(extractUpdateManyMutationOptionSource(options)),
529
+ dryRun: options.dryRun === true ? true : void 0,
530
+ rollback: readOptionString(options, "rollback"),
531
+ checkpoint: options.checkpoint === false ? false : void 0
532
+ }, globalOptions);
533
+ await invalidateSearchCachesForMutation(globalOptions, result);
534
+ printResult(result, globalOptions);
535
+ if (globalOptions.profile) {
536
+ printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
537
+ }
538
+ }
539
+ async function runCloseAction(id, text, options, command) {
540
+ const globalOptions = getGlobalOptions(command);
541
+ const startedAt = Date.now();
542
+ const { runClose } = await import("./close-TGYXG7TV.js");
543
+ const reasonFromOption = typeof options.reason === "string" && options.reason.trim().length > 0 && options.reason || typeof options.closeReason === "string" && options.closeReason.trim().length > 0 && options.closeReason || void 0;
544
+ const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
545
+ const result = await runClose(id, resolvedText, {
546
+ author: readOptionString(options, "author"),
547
+ message: readOptionString(options, "message"),
548
+ validateClose: options.validateClose === true ? "warn" : readOptionString(options, "validateClose"),
549
+ force: Boolean(options.force),
550
+ duplicateOf: readOptionString(options, "duplicateOf"),
551
+ resolution: readOptionString(options, "resolution"),
552
+ expectedResult: pickStringOption(options.expectedResult, options.expected_result, options.expected),
553
+ actualResult: pickStringOption(options.actualResult, options.actual_result, options.actual)
554
+ }, globalOptions);
555
+ await invalidateSearchCachesForMutation(globalOptions, result);
556
+ printResult(result, globalOptions);
557
+ if (globalOptions.profile) {
558
+ printError(`profile:command=close took_ms=${Date.now() - startedAt}`);
559
+ }
560
+ }
518
561
  function normalizePlanAliases(options) {
519
562
  const planOptions = { ...options };
520
563
  const aliasPairs = [
@@ -581,7 +624,7 @@ function parsePlanReorderTo(normalizedSubcommand, reorderToken) {
581
624
  async function runPlanAction(subcommand, id, stepRef, reorderToken, options, command) {
582
625
  const globalOptions = getGlobalOptions(command);
583
626
  const startedAt = Date.now();
584
- const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-BGDR73Z6.js");
627
+ const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-5NWQL2DH.js");
585
628
  const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
586
629
  assertKnownPlanSubcommand(subcommand, normalizedSubcommand, PLAN_SUBCOMMANDS);
587
630
  const planOptions = normalizePlanAliases(options);
@@ -616,7 +659,7 @@ function parseNonNegativeIntFlag(raw, flag) {
616
659
  async function runHistoryCompactAction(id, options, command) {
617
660
  const globalOptions = getGlobalOptions(command);
618
661
  const startedAt = Date.now();
619
- const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-HALOTOU7.js");
662
+ const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-F355EGL4.js");
620
663
  const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
621
664
  const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
622
665
  const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
@@ -667,7 +710,7 @@ function splitCollectedCommaList(raw) {
667
710
  async function runSchemaAction(subcommand, name, options, command) {
668
711
  const globalOptions = getGlobalOptions(command);
669
712
  const startedAt = Date.now();
670
- const schemaModule = await import("./schema-TDGK6N3I.js");
713
+ const schemaModule = await import("./schema-RHH23PQX.js");
671
714
  const { SCHEMA_SUBCOMMANDS } = schemaModule;
672
715
  let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
673
716
  let typeName = name;
@@ -747,7 +790,7 @@ async function runCommentsAction(id, text, options, command) {
747
790
  const globalOptions = getGlobalOptions(command);
748
791
  const startedAt = Date.now();
749
792
  const sources = resolveCommentSources(text, options);
750
- const { runComments } = await import("./comments-7YS5MY5X.js");
793
+ const { runComments } = await import("./comments-ZHVYGUVC.js");
751
794
  const result = await runComments(id, {
752
795
  add: sources.add,
753
796
  stdin: sources.readFromStdin,
@@ -768,59 +811,301 @@ async function runCommentsAction(id, text, options, command) {
768
811
  printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
769
812
  }
770
813
  }
814
+ async function runCopyAction(id, options, command) {
815
+ const globalOptions = getGlobalOptions(command);
816
+ const startedAt = Date.now();
817
+ const { runCopy } = await import("./copy-ANWXDJVC.js");
818
+ const result = await runCopy(id, {
819
+ title: readOptionString(options, "title"),
820
+ author: readOptionString(options, "author"),
821
+ message: readOptionString(options, "message")
822
+ }, globalOptions);
823
+ await invalidateSearchCachesForMutation(globalOptions, result);
824
+ printResult(result, globalOptions);
825
+ if (globalOptions.profile) {
826
+ printError(`profile:command=copy took_ms=${Date.now() - startedAt}`);
827
+ }
828
+ }
829
+ async function runFocusAction(id, options, command) {
830
+ const globalOptions = getGlobalOptions(command);
831
+ const startedAt = Date.now();
832
+ const { runFocus } = await import("./focus-6FA5KYRY.js");
833
+ const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
834
+ printResult(result, globalOptions);
835
+ if (globalOptions.profile) {
836
+ printError(`profile:command=focus took_ms=${Date.now() - startedAt}`);
837
+ }
838
+ }
839
+ async function runUpdateAction(id, options, command) {
840
+ const globalOptions = getGlobalOptions(command);
841
+ const startedAt = Date.now();
842
+ if (typeof options.bodyFile === "string") {
843
+ options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
844
+ delete options.bodyFile;
845
+ }
846
+ const { runUpdate } = await import("./update-ZM7NJWHY.js");
847
+ const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
848
+ await invalidateSearchCachesForMutation(globalOptions, result);
849
+ printResult(result, globalOptions);
850
+ if (globalOptions.profile) {
851
+ printError(`profile:command=update took_ms=${Date.now() - startedAt}`);
852
+ }
853
+ }
854
+ async function runDeleteAction(id, options, command) {
855
+ const globalOptions = getGlobalOptions(command);
856
+ const startedAt = Date.now();
857
+ const { runDelete } = await import("./delete-INHKCIRN.js");
858
+ const result = await runDelete(id, {
859
+ author: readOptionString(options, "author"),
860
+ message: readOptionString(options, "message"),
861
+ force: Boolean(options.force),
862
+ dryRun: options.dryRun === true
863
+ }, globalOptions);
864
+ if (result.dry_run !== true) {
865
+ await invalidateSearchCachesForMutation(globalOptions, result);
866
+ }
867
+ printResult(result, globalOptions);
868
+ if (globalOptions.profile) {
869
+ printError(`profile:command=delete took_ms=${Date.now() - startedAt}`);
870
+ }
871
+ }
872
+ function resolveSingleTextSource(label, positional, options) {
873
+ const addFromOption = readOptionString(options, "add");
874
+ const addFromPositional = typeof positional === "string" ? positional : void 0;
875
+ if (addFromOption !== void 0 && addFromPositional !== void 0) {
876
+ throw new PmCliError(`Specify ${label} text either as positional [text] or with --add, not both`, EXIT_CODE.USAGE);
877
+ }
878
+ return addFromOption ?? addFromPositional;
879
+ }
880
+ function resolveAppendBody(text, options) {
881
+ const bodyFromOption = readOptionString(options, "body");
882
+ const bodyFromAlias = readOptionString(options, "text");
883
+ const bodyFromPositional = typeof text === "string" ? text : void 0;
884
+ const bodySourceCount = [bodyFromOption, bodyFromAlias, bodyFromPositional].filter((value) => value !== void 0).length;
885
+ if (bodySourceCount > 1) {
886
+ throw new PmCliError("Specify append text with exactly one source: positional [text], --body, or --text", EXIT_CODE.USAGE);
887
+ }
888
+ const resolvedBody = bodyFromOption ?? bodyFromAlias ?? bodyFromPositional;
889
+ if (resolvedBody === void 0) {
890
+ throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
891
+ }
892
+ return resolvedBody;
893
+ }
894
+ async function runAppendAction(id, text, options, command) {
895
+ const globalOptions = getGlobalOptions(command);
896
+ const startedAt = Date.now();
897
+ const { runAppend } = await import("./append-ADBOI3A6.js");
898
+ const result = await runAppend(id, {
899
+ body: resolveAppendBody(text, options),
900
+ author: readOptionString(options, "author"),
901
+ message: readOptionString(options, "message"),
902
+ force: Boolean(options.force)
903
+ }, globalOptions);
904
+ await invalidateSearchCachesForMutation(globalOptions, result);
905
+ printResult(result, globalOptions);
906
+ if (globalOptions.profile) {
907
+ printError(`profile:command=append took_ms=${Date.now() - startedAt}`);
908
+ }
909
+ }
910
+ async function runRestoreAction(id, target, options, command) {
911
+ const globalOptions = getGlobalOptions(command);
912
+ const startedAt = Date.now();
913
+ const { runRestore } = await import("./restore-R6YJHQK3.js");
914
+ const result = await runRestore(id, target, {
915
+ author: readOptionString(options, "author"),
916
+ message: readOptionString(options, "message"),
917
+ force: Boolean(options.force)
918
+ }, globalOptions);
919
+ await invalidateSearchCachesForMutation(globalOptions, result);
920
+ printResult(result, globalOptions);
921
+ if (globalOptions.profile) {
922
+ printError(`profile:command=restore took_ms=${Date.now() - startedAt}`);
923
+ }
924
+ }
925
+ async function runProfileAction(subcommand, name, options, command) {
926
+ const globalOptions = getGlobalOptions(command);
927
+ const startedAt = Date.now();
928
+ const profileModule = await import("./profile-54DZ4CLB.js");
929
+ const { PROFILE_SUBCOMMANDS } = profileModule;
930
+ const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
931
+ if (!normalizedSubcommand) {
932
+ throw new PmCliError(`pm profile requires a subcommand. Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
933
+ code: "missing_required_argument",
934
+ examples: ["pm profile list", "pm profile show agile", "pm profile apply agile --dry-run", "pm profile lint agile"]
935
+ });
936
+ }
937
+ if (!PROFILE_SUBCOMMANDS.includes(normalizedSubcommand)) {
938
+ throw new PmCliError(`Unknown pm profile subcommand "${subcommand}". Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
939
+ }
940
+ const result = await dispatchProfileSubcommand(profileModule, normalizedSubcommand, name, options, globalOptions);
941
+ if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
942
+ printResult(result, globalOptions);
943
+ } else if (!globalOptions.quiet) {
944
+ renderProfileResultHuman(profileModule, result);
945
+ }
946
+ if (result.action === "lint" && !result.ok) {
947
+ process.exitCode = EXIT_CODE.GENERIC_FAILURE;
948
+ }
949
+ if (globalOptions.profile) {
950
+ printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
951
+ }
952
+ }
953
+ async function runNotesAction(id, text, options, command) {
954
+ const globalOptions = getGlobalOptions(command);
955
+ const startedAt = Date.now();
956
+ const add = resolveSingleTextSource("note", text, options);
957
+ const { runNotes } = await import("./notes-XATYT43P.js");
958
+ const result = await runNotes(id, {
959
+ add,
960
+ limit: readOptionString(options, "limit"),
961
+ author: readOptionString(options, "author"),
962
+ message: readOptionString(options, "message"),
963
+ allowAuditComment: Boolean(options.allowAuditNote || options.allowAuditComment),
964
+ force: Boolean(options.force)
965
+ }, globalOptions);
966
+ if (typeof add === "string") {
967
+ await invalidateSearchCachesForMutation(globalOptions, result);
968
+ }
969
+ printResult(result, globalOptions);
970
+ if (globalOptions.profile) {
971
+ printError(`profile:command=notes took_ms=${Date.now() - startedAt}`);
972
+ }
973
+ }
974
+ async function runLearningsAction(id, text, options, command) {
975
+ const globalOptions = getGlobalOptions(command);
976
+ const startedAt = Date.now();
977
+ const add = resolveSingleTextSource("learning", text, options);
978
+ const { runLearnings } = await import("./learnings-HKJJUVTA.js");
979
+ const result = await runLearnings(id, {
980
+ add,
981
+ limit: readOptionString(options, "limit"),
982
+ author: readOptionString(options, "author"),
983
+ message: readOptionString(options, "message"),
984
+ allowAuditComment: Boolean(options.allowAuditLearning || options.allowAuditComment),
985
+ force: Boolean(options.force)
986
+ }, globalOptions);
987
+ if (typeof add === "string") {
988
+ await invalidateSearchCachesForMutation(globalOptions, result);
989
+ }
990
+ printResult(result, globalOptions);
991
+ if (globalOptions.profile) {
992
+ printError(`profile:command=learnings took_ms=${Date.now() - startedAt}`);
993
+ }
994
+ }
995
+ function readStringArrayOption(options, key) {
996
+ return stringArrayOption(options[key]) ?? [];
997
+ }
998
+ async function runFilesAction(id, options, command) {
999
+ const globalOptions = getGlobalOptions(command);
1000
+ const startedAt = Date.now();
1001
+ const addValues = readStringArrayOption(options, "add");
1002
+ const addGlobValues = readStringArrayOption(options, "addGlob");
1003
+ const removeValues = readStringArrayOption(options, "remove");
1004
+ const migrateValues = readStringArrayOption(options, "migrate");
1005
+ const { runFiles } = await import("./files-7IU56S6R.js");
1006
+ const result = await runFiles(id, {
1007
+ add: addValues,
1008
+ addGlob: addGlobValues,
1009
+ remove: removeValues,
1010
+ migrate: migrateValues,
1011
+ note: readOptionString(options, "note"),
1012
+ list: Boolean(options.list),
1013
+ appendStable: Boolean(options.appendStable),
1014
+ validatePaths: Boolean(options.validatePaths),
1015
+ audit: Boolean(options.audit),
1016
+ author: readOptionString(options, "author"),
1017
+ message: readOptionString(options, "message"),
1018
+ force: Boolean(options.force)
1019
+ }, globalOptions);
1020
+ if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1021
+ await invalidateSearchCachesForMutation(globalOptions, result);
1022
+ }
1023
+ printResult(result, globalOptions);
1024
+ if (globalOptions.profile) {
1025
+ printError(`profile:command=files took_ms=${Date.now() - startedAt}`);
1026
+ }
1027
+ }
1028
+ async function runFilesDiscoverAction(id, options, command) {
1029
+ const globalOptions = getGlobalOptions(command);
1030
+ const startedAt = Date.now();
1031
+ const mergedOptions = { ...command.optsWithGlobals(), ...options };
1032
+ const { runFilesDiscover } = await import("./files-7IU56S6R.js");
1033
+ const result = await runFilesDiscover(id, {
1034
+ apply: Boolean(mergedOptions.apply),
1035
+ note: readOptionString(mergedOptions, "note"),
1036
+ appendStable: Boolean(mergedOptions.appendStable),
1037
+ author: readOptionString(mergedOptions, "author"),
1038
+ message: readOptionString(mergedOptions, "message"),
1039
+ force: Boolean(mergedOptions.force)
1040
+ }, globalOptions);
1041
+ if (result.changed) {
1042
+ await invalidateSearchCachesForMutation(globalOptions, result);
1043
+ }
1044
+ printResult(result, globalOptions);
1045
+ if (globalOptions.profile) {
1046
+ printError(`profile:command=files.discover took_ms=${Date.now() - startedAt}`);
1047
+ }
1048
+ }
1049
+ async function runDocsAction(id, options, command) {
1050
+ const globalOptions = getGlobalOptions(command);
1051
+ const startedAt = Date.now();
1052
+ const addValues = readStringArrayOption(options, "add");
1053
+ const addGlobValues = readStringArrayOption(options, "addGlob");
1054
+ const removeValues = readStringArrayOption(options, "remove");
1055
+ const migrateValues = readStringArrayOption(options, "migrate");
1056
+ const { runDocs } = await import("./docs-PKO7OEIM.js");
1057
+ const result = await runDocs(id, {
1058
+ add: addValues,
1059
+ addGlob: addGlobValues,
1060
+ remove: removeValues,
1061
+ migrate: migrateValues,
1062
+ note: readOptionString(options, "note"),
1063
+ list: Boolean(options.list),
1064
+ validatePaths: Boolean(options.validatePaths),
1065
+ audit: Boolean(options.audit),
1066
+ author: readOptionString(options, "author"),
1067
+ message: readOptionString(options, "message"),
1068
+ force: Boolean(options.force)
1069
+ }, globalOptions);
1070
+ if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1071
+ await invalidateSearchCachesForMutation(globalOptions, result);
1072
+ }
1073
+ printResult(result, globalOptions);
1074
+ if (globalOptions.profile) {
1075
+ printError(`profile:command=docs took_ms=${Date.now() - startedAt}`);
1076
+ }
1077
+ }
1078
+ async function runDepsAction(id, options, command) {
1079
+ const globalOptions = getGlobalOptions(command);
1080
+ const startedAt = Date.now();
1081
+ const { runDeps } = await import("./deps-IYEID3QX.js");
1082
+ const result = await runDeps(id, {
1083
+ format: options.format,
1084
+ maxDepth: readOptionString(options, "maxDepth"),
1085
+ collapse: options.collapse,
1086
+ summary: options.summary === true
1087
+ }, globalOptions);
1088
+ printResult(result, globalOptions);
1089
+ if (globalOptions.profile) {
1090
+ printError(`profile:command=deps took_ms=${Date.now() - startedAt}`);
1091
+ }
1092
+ }
771
1093
  function registerMutationCommands(program) {
772
1094
  const createCommand = program.command("create").argument("[typeOrTitle]", 'Item title, or item type when a title follows (e.g. `pm create task "Fix bug"`)').argument("[title]", "Item title when the first argument is an item type").description("Create a new project management item.");
773
1095
  registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
774
1096
  createCommand.option("--body-file <path>", "Load the item markdown body from a file (mutually exclusive with --body)").option("--clear-deps", "Clear dependency entries").option("--clear-comments", "Clear comments").option("--clear-notes", "Clear notes").option("--clear-learnings", "Clear learnings").option("--clear-files", "Clear linked files").option("--clear-tests", "Clear linked tests").option("--clear-docs", "Clear linked docs").option("--clear-reminders", "Clear reminders").option("--clear-events", "Clear events").option("--clear-type-options", "Clear type options").action(runCreateAction);
775
- program.command("copy").argument("<id>", "Source item id").option("--title <value>", "Optional title override for the copied item").option("--author <value>", "Mutation author").option("--message <value>", "History message").description("Copy an item into a new item id while resetting lifecycle fields.").action(async (id, options, command) => {
776
- const globalOptions = getGlobalOptions(command);
777
- const startedAt = Date.now();
778
- const { runCopy } = await import("./copy-GYNQQPW2.js");
779
- const result = await runCopy(id, {
780
- title: typeof options.title === "string" ? options.title : void 0,
781
- author: typeof options.author === "string" ? options.author : void 0,
782
- message: typeof options.message === "string" ? options.message : void 0
783
- }, globalOptions);
784
- await invalidateSearchCachesForMutation(globalOptions, result);
785
- printResult(result, globalOptions);
786
- if (globalOptions.profile) {
787
- printError(`profile:command=copy took_ms=${Date.now() - startedAt}`);
788
- }
789
- });
790
- program.command("focus").argument("[id]", "Item id to focus (omit to show current focus)").option("--clear", "Clear the focused item").description("Set/clear/show the session focused item that new items default --parent to.").action(async (id, options, command) => {
791
- const globalOptions = getGlobalOptions(command);
792
- const startedAt = Date.now();
793
- const { runFocus } = await import("./focus-ZHN7WIGX.js");
794
- const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
795
- printResult(result, globalOptions);
796
- if (globalOptions.profile) {
797
- printError(`profile:command=focus took_ms=${Date.now() - startedAt}`);
798
- }
799
- });
1097
+ program.command("copy").argument("<id>", "Source item id").option("--title <value>", "Optional title override for the copied item").option("--author <value>", "Mutation author").option("--message <value>", "History message").description("Copy an item into a new item id while resetting lifecycle fields.").action(runCopyAction);
1098
+ program.command("focus").argument("[id]", "Item id to focus (omit to show current focus)").option("--clear", "Clear the focused item").description("Set/clear/show the session focused item that new items default --parent to.").action(runFocusAction);
800
1099
  const updateCommand = program.command("update").argument("<id>", "Item id").description("Update item fields and metadata.");
801
1100
  registerCommanderOptionContracts(updateCommand, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
802
1101
  updateCommand.option("--body-file <path>", "Load the item markdown body from a file (mutually exclusive with --body)").option("--replace-deps", "Atomically replace dependency entries with the provided --dep values").option("--replace-tests", "Atomically replace linked test entries with the provided --test values").option("--clear-deps", "Clear dependency entries").option("--clear-comments", "Clear comments").option("--clear-notes", "Clear notes").option("--clear-learnings", "Clear learnings").option("--clear-files", "Clear linked files").option("--clear-tests", "Clear linked tests").option("--clear-docs", "Clear linked docs").option("--clear-reminders", "Clear reminders").option("--clear-events", "Clear events").option("--clear-type-options", "Clear type options").option("--allow-audit-update", "Allow non-owner metadata-only audit updates without requiring --force").option("--allow-audit-dep-update", "Allow non-owner append-only dependency updates without requiring --force").option("--force", "Force ownership override");
803
1102
  addHiddenOption(updateCommand, "--allow_audit_update", "Alias for --allow-audit-update", false);
804
1103
  addHiddenOption(updateCommand, "--allow_audit_dep_update", "Alias for --allow-audit-dep-update", false);
805
- updateCommand.action(async (id, options, command) => {
806
- const globalOptions = getGlobalOptions(command);
807
- const startedAt = Date.now();
808
- if (typeof options.bodyFile === "string") {
809
- options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
810
- delete options.bodyFile;
811
- }
812
- const { runUpdate } = await import("./update-Y5WQVT5O.js");
813
- const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
814
- await invalidateSearchCachesForMutation(globalOptions, result);
815
- printResult(result, globalOptions);
816
- if (globalOptions.profile) {
817
- printError(`profile:command=update took_ms=${Date.now() - startedAt}`);
818
- }
819
- });
1104
+ updateCommand.action(runUpdateAction);
820
1105
  const updateManyCommand = program.command("update-many").description("Bulk-update matched items with dry-run plans and rollback checkpoints.").option("--filter-status <value>", "Filter by status before applying updates").option("--filter-type <value>", "Filter by item type before applying updates").option("--filter-tag <value>", "Filter by tag before applying updates").option("--filter-priority <value>", "Filter by priority before applying updates").option("--filter-deadline-before <value>", "Filter by deadline upper bound before applying updates").option("--filter-deadline-after <value>", "Filter by deadline lower bound before applying updates").option("--filter-updated-after <value>", "Filter by updated_at lower bound before applying updates (ISO/relative)").option("--filter-updated-before <value>", "Filter by updated_at upper bound before applying updates (ISO/relative)").option("--filter-created-after <value>", "Filter by created_at lower bound before applying updates (ISO/relative)").option("--filter-created-before <value>", "Filter by created_at upper bound before applying updates (ISO/relative)").option("--filter-assignee <value>", "Filter by assignee before applying updates").option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before applying updates").option("--filter-parent <value>", "Filter by parent item ID before applying updates").option("--filter-sprint <value>", "Filter by sprint before applying updates").option("--filter-release <value>", "Filter by release before applying updates").option("--filter-ac-missing", "Select only items missing acceptance_criteria (bulk backfill)").option("--filter-estimates-missing", "Select only items missing estimated_minutes (bulk backfill)").option("--filter-resolution-missing", "Select only terminal items missing resolution (bulk backfill)").option("--filter-metadata-missing", "Select only items missing any tracked metadata (AC, estimate, or resolution)");
821
1106
  registerBulkContentAndGovernanceFilters(updateManyCommand, "applying updates");
822
1107
  updateManyCommand.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)").option("--limit <n>", "Limit matched item count before apply/preview").option("--offset <n>", "Skip first n matched rows before apply/preview").option("--dry-run", "Preview per-item diffs and checkpoint intent without mutating").option("--rollback <value>", "Rollback a prior update-many checkpoint ID").option("--no-checkpoint", "Disable checkpoint creation during apply mode").option("--title, -t <value>", "Set title").option("--description, -d <value>", "Set description").option("--body, -b <value>", "Set body (allow empty string)").option("--status, -s <value>", "Set status (use close command for closed)").option("--priority, -p <value>", "Set priority").option("--type <value>", "Set type").option("--tags <value>", "Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively.").option("--add-tags <value>", "Add tags additively without replacing existing (repeatable; CSV accepted)", collect).option("--remove-tags <value>", "Remove tags from the existing list (repeatable; CSV accepted)", collect).option("--deadline <value>", "Set deadline (ISO/date string or relative)").option("--estimate, --estimated-minutes <value>", "Set estimated minutes").option("--acceptance-criteria <value>", "Set acceptance criteria").option("--ac <value>", "Alias for --acceptance-criteria").option("--definition-of-ready <value>", "Set definition of ready").option("--order <value>", "Set planning order/rank integer").option("--rank <value>", "Alias for --order").option("--goal <value>", "Set goal identifier").option("--objective <value>", "Set objective identifier").option("--value <value>", "Set business value summary").option("--impact <value>", "Set business impact summary").option("--outcome <value>", "Set expected outcome summary").option("--why-now <value>", "Set why-now rationale").option("--assignee <value>", "Set assignee").option("--parent <value>", "Set parent item ID").option("--reviewer <value>", "Set reviewer").option("--risk <value>", "Set risk level").option("--confidence <value>", "Set confidence level").option("--sprint <value>", "Set sprint identifier").option("--release <value>", "Set release identifier").option("--blocked-by <value>", "Set blocked-by item ID or reason").option("--blocked-reason <value>", "Set blocked reason").option("--unblock-note <value>", "Set unblock rationale note").option("--reporter <value>", "Set issue reporter").option("--severity <value>", "Set issue severity").option("--environment <value>", "Set issue environment context").option("--repro-steps <value>", "Set issue reproduction steps").option("--resolution <value>", "Set issue resolution summary").option("--expected-result <value>", "Set issue expected behavior").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Set issue observed behavior").option("--actual <value>", "Short alias for --actual-result").option("--affected-version <value>", "Set affected version identifier").option("--fixed-version <value>", "Set fixed version identifier").option("--component <value>", "Set issue component ownership").option("--regression <value>", "Set regression marker: true|false|1|0").option("--customer-impact <value>", "Set customer impact summary").option("--dep <value>", "Add dependency entry id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>", collect).option("--dep-remove <value>", "Remove dependency entries by id/kind/author/timestamp signature", collect).option("--replace-deps", "Atomically replace dependency entries with provided --dep values").option("--replace-tests", "Atomically replace linked tests with provided --test values").option("--comment <value>", "Add comment seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--note <value>", "Add note seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--learning <value>", "Add learning seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--file <value>", "Add linked file path=<value>,scope=<project|global>,note=<text>", collect).option("--test <value>", "Add linked test command=<value>,path=<value>,scope=<project|global>", collect).option("--doc <value>", "Add linked doc path=<value>,scope=<project|global>,note=<text>", collect).option("--reminder <value>", "Add reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>", collect).option("--event <value>", "Add event entry start=<iso|relative>,end=<iso|relative>,recur_*", collect).option("--type-option <value>", "Set type options key=value (repeatable)", collect).option("--unset <field>", "Clear scalar metadata field by name (repeatable)", collect).option("--clear-deps", "Clear dependency entries").option("--clear-comments", "Clear comments").option("--clear-notes", "Clear notes").option("--clear-learnings", "Clear learnings").option("--clear-files", "Clear linked files").option("--clear-tests", "Clear linked tests").option("--clear-docs", "Clear linked docs").option("--clear-reminders", "Clear reminders").option("--clear-events", "Clear events").option("--clear-type-options", "Clear type options").option("--allow-audit-update", "Allow non-owner metadata-only audit updates without requiring --force").option("--allow-audit-dep-update", "Allow non-owner append-only dependency updates without requiring --force").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override");
823
- for (const [flags, description] of [
1108
+ addHiddenOptions(updateManyCommand, [
824
1109
  ["--filter-assignee_filter <value>", "Alias for --filter-assignee-filter"],
825
1110
  ["--estimated_minutes <value>", "Alias for --estimated-minutes"],
826
1111
  ["--acceptance_criteria <value>", "Alias for --acceptance-criteria"],
@@ -838,68 +1123,18 @@ function registerMutationCommands(program) {
838
1123
  ["--allow_audit_update", "Alias for --allow-audit-update"],
839
1124
  ["--allow_audit_dep_update", "Alias for --allow-audit-dep-update"],
840
1125
  ["--filter-estimate-missing", "Alias for --filter-estimates-missing"]
841
- ]) {
842
- addHiddenOption(updateManyCommand, flags, description, false);
843
- }
844
- for (const [flags, description] of [
1126
+ ], false);
1127
+ addHiddenOptions(updateManyCommand, [
845
1128
  ["--dep_remove <value>", "Alias for --dep-remove"],
846
1129
  ["--type_option <value>", "Alias for --type-option"],
847
1130
  ["--add_tags <value>", "Alias for --add-tags"],
848
1131
  ["--remove_tags <value>", "Alias for --remove-tags"]
849
- ]) {
850
- addHiddenOption(updateManyCommand, flags, description, true);
851
- }
852
- updateManyCommand.action(async (options, command) => {
853
- const globalOptions = getGlobalOptions(command);
854
- const startedAt = Date.now();
855
- const { runUpdateMany } = await import("./update-many-JTKKSA7Y.js");
856
- const result = await runUpdateMany({
857
- status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
858
- list: buildUpdateManyListOptions(options),
859
- update: normalizeUpdateOptions(extractUpdateManyMutationOptionSource(options)),
860
- dryRun: options.dryRun === true ? true : void 0,
861
- rollback: typeof options.rollback === "string" ? options.rollback : void 0,
862
- checkpoint: options.checkpoint === false ? false : void 0
863
- }, globalOptions);
864
- await invalidateSearchCachesForMutation(globalOptions, result);
865
- printResult(result, globalOptions);
866
- if (globalOptions.profile) {
867
- printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
868
- }
869
- });
1132
+ ], true);
1133
+ updateManyCommand.action(runUpdateManyAction);
870
1134
  const closeCommand = program.command("close").argument("<id>", "Item id").argument("[text]", "Close reason text (alias: --reason)").option("-r, --reason <value>", "Close reason text (alias for positional <text>)").option("--close-reason <value>", "Close reason text (alias for positional <text>)").option("-d, --duplicate-of <id>", "Close as a duplicate of the canonical item id and auto-fill duplicate closure metadata").option("--author <value>", "Mutation author").option("-m, --message <value>", "History message").option("--validate-close [mode]", 'Validate closure metadata before close: "off", "warn", or "strict" (default: settings governance preset)').option("--resolution <value>", "Set the closure resolution summary inline (same field --validate-close strict checks; previously required a prior pm update)").option("--expected-result <value>", "Set the expected-result note inline (closure validation field)").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Set the actual-result note inline (closure validation field)").option("--actual <value>", "Short alias for --actual-result").option("--force", "Force ownership override").description("Close an item. Close reason requirement follows governance.require_close_reason.");
871
1135
  addHiddenOption(closeCommand, "--expected_result <value>", "Alias for --expected-result", false);
872
1136
  addHiddenOption(closeCommand, "--actual_result <value>", "Alias for --actual-result", false);
873
- closeCommand.action(async (id, text, options, command) => {
874
- const globalOptions = getGlobalOptions(command);
875
- const startedAt = Date.now();
876
- const { runClose } = await import("./close-424MX4CU.js");
877
- const reasonFromOption = typeof options.reason === "string" && options.reason.trim().length > 0 && options.reason || typeof options.closeReason === "string" && options.closeReason.trim().length > 0 && options.closeReason || void 0;
878
- const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
879
- const pickInlineString = (...candidates) => {
880
- for (const candidate of candidates) {
881
- if (typeof candidate === "string") {
882
- return candidate;
883
- }
884
- }
885
- return void 0;
886
- };
887
- const result = await runClose(id, resolvedText, {
888
- author: typeof options.author === "string" ? options.author : void 0,
889
- message: typeof options.message === "string" ? options.message : void 0,
890
- validateClose: options.validateClose === true ? "warn" : typeof options.validateClose === "string" ? options.validateClose : void 0,
891
- force: Boolean(options.force),
892
- duplicateOf: typeof options.duplicateOf === "string" ? options.duplicateOf : void 0,
893
- resolution: typeof options.resolution === "string" ? options.resolution : void 0,
894
- expectedResult: pickInlineString(options.expectedResult, options.expected_result, options.expected),
895
- actualResult: pickInlineString(options.actualResult, options.actual_result, options.actual)
896
- }, globalOptions);
897
- await invalidateSearchCachesForMutation(globalOptions, result);
898
- printResult(result, globalOptions);
899
- if (globalOptions.profile) {
900
- printError(`profile:command=close took_ms=${Date.now() - startedAt}`);
901
- }
902
- });
1137
+ closeCommand.action(runCloseAction);
903
1138
  const closeManyCommand = program.command("close-many").description("Bulk-close matched items with a shared reason and full runClose semantics (dry-run + rollback checkpoint).").option("--filter-status <value>", "Filter by status before closing").option("--filter-type <value>", "Filter by item type before closing").option("--filter-tag <value>", "Filter by tag before closing").option("--filter-priority <value>", "Filter by priority before closing").option("--filter-deadline-before <value>", "Filter by deadline upper bound before closing").option("--filter-deadline-after <value>", "Filter by deadline lower bound before closing").option("--filter-updated-after <value>", "Filter by updated_at lower bound before closing (ISO/relative)").option("--filter-updated-before <value>", "Filter by updated_at upper bound before closing (ISO/relative)").option("--filter-created-after <value>", "Filter by created_at lower bound before closing (ISO/relative)").option("--filter-created-before <value>", "Filter by created_at upper bound before closing (ISO/relative)").option("--filter-assignee <value>", "Filter by assignee before closing").option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before closing").option("--filter-parent <value>", "Filter by parent item ID before closing").option("--filter-sprint <value>", "Filter by sprint before closing").option("--filter-release <value>", "Filter by release before closing");
904
1139
  registerBulkContentAndGovernanceFilters(closeManyCommand, "closing");
905
1140
  closeManyCommand.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)").option("--limit <n>", "Limit matched item count before apply/preview").option("--offset <n>", "Skip first n matched rows before apply/preview").option("--reason <value>", "Shared close reason applied to matched items (required when governance.require_close_reason is enabled)").option("--resolution <value>", "Shared closure resolution applied to every matched item (closure-validation field)").option("--expected-result <value>", "Shared expected-result note (closure-validation field)").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Shared actual-result note (closure-validation field)").option("--actual <value>", "Short alias for --actual-result").option("--validate-close [mode]", 'Validate closure metadata per item: "off", "warn", or "strict" (default: settings governance preset)').option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Re-close already-terminal matches and override ownership").option("--dry-run", "Preview matched items + per-item skip/active-child plan without mutating").option("--rollback <value>", "Rollback a prior close-many checkpoint ID").option("--no-checkpoint", "Disable checkpoint creation during apply mode");
@@ -907,68 +1142,11 @@ function registerMutationCommands(program) {
907
1142
  addHiddenOption(closeManyCommand, "--expected_result <value>", "Alias for --expected-result", false);
908
1143
  addHiddenOption(closeManyCommand, "--actual_result <value>", "Alias for --actual-result", false);
909
1144
  closeManyCommand.action(runCloseManyAction);
910
- program.command("delete").argument("<id>", "Item id").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").option("--dry-run", "Preview the item file that would be deleted without mutating").description("Delete an item and record the change in history.").action(async (id, options, command) => {
911
- const globalOptions = getGlobalOptions(command);
912
- const startedAt = Date.now();
913
- const { runDelete } = await import("./delete-4W5JYCEG.js");
914
- const result = await runDelete(id, {
915
- author: typeof options.author === "string" ? options.author : void 0,
916
- message: typeof options.message === "string" ? options.message : void 0,
917
- force: Boolean(options.force),
918
- dryRun: options.dryRun === true
919
- }, globalOptions);
920
- if (result.dry_run !== true) {
921
- await invalidateSearchCachesForMutation(globalOptions, result);
922
- }
923
- printResult(result, globalOptions);
924
- if (globalOptions.profile) {
925
- printError(`profile:command=delete took_ms=${Date.now() - startedAt}`);
926
- }
927
- });
928
- program.command("append").argument("<id>", "Item id").argument("[text]", "Optional body text shorthand (equivalent to --body; use - for stdin)").option("--body <value>", "Text to append to body (or - for stdin)").option("--text <value>", "Alias for --body").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override").description("Append text to an item's body.").action(async (id, text, options, command) => {
929
- const globalOptions = getGlobalOptions(command);
930
- const startedAt = Date.now();
931
- const bodyFromOption = typeof options.body === "string" ? options.body : void 0;
932
- const bodyFromAlias = typeof options.text === "string" ? options.text : void 0;
933
- const bodyFromPositional = typeof text === "string" ? text : void 0;
934
- const bodySourceCount = [bodyFromOption, bodyFromAlias, bodyFromPositional].filter((value) => value !== void 0).length;
935
- if (bodySourceCount > 1) {
936
- throw new PmCliError("Specify append text with exactly one source: positional [text], --body, or --text", EXIT_CODE.USAGE);
937
- }
938
- const resolvedBody = bodyFromOption ?? bodyFromAlias ?? bodyFromPositional;
939
- if (resolvedBody === void 0) {
940
- throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
941
- }
942
- const { runAppend } = await import("./append-H32VOR2Y.js");
943
- const result = await runAppend(id, {
944
- body: resolvedBody,
945
- author: typeof options.author === "string" ? options.author : void 0,
946
- message: typeof options.message === "string" ? options.message : void 0,
947
- force: Boolean(options.force)
948
- }, globalOptions);
949
- await invalidateSearchCachesForMutation(globalOptions, result);
950
- printResult(result, globalOptions);
951
- if (globalOptions.profile) {
952
- printError(`profile:command=append took_ms=${Date.now() - startedAt}`);
953
- }
954
- });
955
- program.command("restore").argument("<id>", "Item id").argument("<target>", "Restore target timestamp or version number").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(async (id, target, options, command) => {
956
- const globalOptions = getGlobalOptions(command);
957
- const startedAt = Date.now();
958
- const { runRestore } = await import("./restore-4CBWUMCX.js");
959
- const result = await runRestore(id, target, {
960
- author: typeof options.author === "string" ? options.author : void 0,
961
- message: typeof options.message === "string" ? options.message : void 0,
962
- force: Boolean(options.force)
963
- }, globalOptions);
964
- await invalidateSearchCachesForMutation(globalOptions, result);
965
- printResult(result, globalOptions);
966
- if (globalOptions.profile) {
967
- printError(`profile:command=restore took_ms=${Date.now() - startedAt}`);
968
- }
969
- });
1145
+ program.command("delete").argument("<id>", "Item id").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").option("--dry-run", "Preview the item file that would be deleted without mutating").description("Delete an item and record the change in history.").action(runDeleteAction);
1146
+ program.command("append").argument("<id>", "Item id").argument("[text]", "Optional body text shorthand (equivalent to --body; use - for stdin)").option("--body <value>", "Text to append to body (or - for stdin)").option("--text <value>", "Alias for --body").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override").description("Append text to an item's body.").action(runAppendAction);
1147
+ program.command("restore").argument("<id>", "Item id").argument("<target>", "Restore target timestamp or version number").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(runRestoreAction);
970
1148
  const planCommand = program.command("plan").description("Agent-optimized Plan item workflow: create, manage steps, link dependencies, approve, and materialize.").argument("[subcommand]", "Plan subcommand: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize").argument("[id]", "Plan id (required for non-create subcommands); for create this may be the positional title").argument("[stepRef]", "Step reference: stable id (plan-step-001) or order integer").argument("[reorderTo]", "New order integer for reorder-step").option("--title <value>", "Plan title").option("--description <value>", "Plan description").option("--scope <value>", "Short scope statement of the target change or investigation").option("--parent <value>", "Parent pm item id").option("--related <value>", "Related pm item ids (repeatable, csv-friendly)", collect).option("--blocks <value>", "Pm item ids this plan blocks (repeatable, csv-friendly)", collect).option("--blocked-by <value>", "Pm item ids that block this plan (repeatable, csv-friendly)", collect).option("--harness <value>", "Plan harness provenance: codex|claude-code|cursor|generic").option("--mode <value>", "Plan mode: draft|research|review|approved|executing|paused|completed|superseded").option("--resume-context <value>", "Compact context summary for a future stateless agent").option("--tags <value>", "Comma-separated tags").option("--priority <value>", "Priority 0-4").option("--body <value>", "Plan item body").option("--claim", "Claim the plan on create for the author").option("--from-search <value>", "Record the search query that led to plan creation").option("--template <value>", "Seed plan steps from a built-in template: bug-investigation|feature-implementation|refactoring-sprint").option("--step-title <value>", "Step title for add-step / update-step").option("--step <value>", "Step title (repeatable on create: each --step appends an ordered step; elsewhere a single value aliases --step-title)", collect).option("--step-body <value>", "Step body text").option("--step-owner <value>", "Step owner").option("--step-status <value>", "Step status: pending|in_progress|completed|blocked|skipped|superseded").option("--step-evidence <value>", "Step evidence text (used by update-step/complete-step)").option("--step-blocked-reason <value>", "Step blocked reason (required when blocking)").option("--step-replacement <value>", "Replacement reference for a superseded step").option("--depends-on <value>", "Pm item ids the step depends on (repeatable, csv-friendly)", collect).option("--link <value>", "Pm item id to link (repeatable, csv-friendly)", collect).option("--link-kind <value>", "Link kind: related|blocks|blocked_by|depends_on|discovered_from|implements|verifies|supersedes").option("--link-note <value>", "Optional note for the link").option("--promote-to-item-dep", "Also add the linked id as a top-level item dependency when linking").option("--allow-multiple-active", "Allow multiple steps to be in_progress at once").option("--file <value>", "Step linked file path=<value>[,scope=project|global,note=<text>] (repeatable)", collect).option("--test <value>", "Step linked test command=<value>[,path=<value>,note=<text>] (repeatable)", collect).option("--doc <value>", "Step linked doc path=<value>[,scope=project|global,note=<text>] (repeatable)", collect).option("--decision-text <value>", "Decision log entry text").option("--decision <value>", "Alias for --decision-text").option("--decision-rationale <value>", "Decision log entry rationale").option("--decision-evidence <value>", "Decision log entry evidence").option("--discovery-text <value>", "Discovery log entry text").option("--discovery <value>", "Alias for --discovery-text").option("--validation-text <value>", "Validation log entry text").option("--validation <value>", "Alias for --validation-text").option("--validation-command <value>", "Validation log entry command").option("--validation-expected <value>", "Validation log entry expected outcome").option("--depth <value>", "Show depth: brief|standard|deep (default: brief)").option("--fields <value>", "Comma-separated field projection for show output").option("--steps <value>", "Comma-separated step ids/orders for materialize").option("--materialize-type <value>", "Item type for materialized steps (default: Task)").option("--materialize-parent <value>", "Parent item id for materialized children (default: the plan)").option("--materialize-tags <value>", "Comma-separated tags for materialized children").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override");
971
- for (const [flags, description] of [
1149
+ addHiddenOptions(planCommand, [
972
1150
  ["--resume_context <value>", "Alias for --resume-context"],
973
1151
  ["--from_search <value>", "Alias for --from-search"],
974
1152
  ["--step_title <value>", "Alias for --step-title"],
@@ -992,21 +1170,17 @@ function registerMutationCommands(program) {
992
1170
  ["--materialize_type <value>", "Alias for --materialize-type"],
993
1171
  ["--materialize_parent <value>", "Alias for --materialize-parent"],
994
1172
  ["--materialize_tags <value>", "Alias for --materialize-tags"]
995
- ]) {
996
- addHiddenOption(planCommand, flags, description, false);
997
- }
998
- for (const [flags, description] of [
1173
+ ], false);
1174
+ addHiddenOptions(planCommand, [
999
1175
  ["--blocked_by <value>", "Alias for --blocked-by"],
1000
1176
  ["--depends_on <value>", "Alias for --depends-on"]
1001
- ]) {
1002
- addHiddenOption(planCommand, flags, description, true);
1003
- }
1177
+ ], true);
1004
1178
  planCommand.action(runPlanAction);
1005
1179
  void planCommand;
1006
1180
  program.command("history-redact").argument("<id>", "Item id").option("--literal <value>", "Literal string to redact (repeatable)", collect).option("--regex <value>", "Regex pattern to redact (repeatable; accepts /pattern/flags or raw pattern)", collect).option("--replacement <value>", 'Replacement string (default: "[redacted]")').option("--dry-run", "Preview redaction impact without writing item/history files").option("--author <value>", "Mutation author").option("--message <value>", "Audit history message for the redaction marker entry").option("--force", "Force ownership/lock override").description("Redact sensitive literals/patterns from an item history stream and recompute hashes.").action(async (id, options, command) => {
1007
1181
  const globalOptions = getGlobalOptions(command);
1008
1182
  const startedAt = Date.now();
1009
- const { runHistoryRedact } = await import("./history-redact-VYCWQFK7.js");
1183
+ const { runHistoryRedact } = await import("./history-redact-TUWOUYX5.js");
1010
1184
  const literal = Array.isArray(options.literal) ? options.literal : void 0;
1011
1185
  const regex = Array.isArray(options.regex) ? options.regex : void 0;
1012
1186
  const result = await runHistoryRedact(id, {
@@ -1029,7 +1203,7 @@ function registerMutationCommands(program) {
1029
1203
  program.command("history-repair").argument("[id]", "Item id (omit with --all)").option("--all", "Scan every stream for drift and repair each drifted stream in one audited pass").option("--dry-run", "Preview the re-anchor impact without writing the history file").option("--author <value>", "Mutation author").option("--message <value>", "Audit history message for the repair marker entry").option("--force", "Force ownership/lock override").description("Re-anchor a drifted item history chain (recompute hashes, reconcile with the on-disk item) and record an audit marker. Use --all to repair every drifted stream.").action(async (id, options, command) => {
1030
1204
  const globalOptions = getGlobalOptions(command);
1031
1205
  const startedAt = Date.now();
1032
- const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-44MODPQF.js");
1206
+ const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-MPCAIKYE.js");
1033
1207
  const all = options.all === true;
1034
1208
  assertHistoryRepairTarget(id, all);
1035
1209
  const repairOptions = {
@@ -1057,183 +1231,15 @@ function registerMutationCommands(program) {
1057
1231
  addHiddenOption(schemaCommand, "--default_status <status>", "Alias for --default-status", false);
1058
1232
  schemaCommand.action(runSchemaAction);
1059
1233
  const profileCommand = program.command("profile").argument("[subcommand]", "Profile subcommand: list, show, apply, or lint").argument("[name]", "Profile name for show/apply/lint: agile, ops, or research").option("--dry-run", "Preview the apply diff without writing any files (apply)").option("--author <value>", "Mutation author").option("--force", "Force ownership/lock override").description("List, show, apply, and lint project profiles \u2014 archetype bundles of item types, statuses, fields, workflows, config, templates, and recommended packages.");
1060
- profileCommand.action(async (subcommand, name, options, command) => {
1061
- const globalOptions = getGlobalOptions(command);
1062
- const startedAt = Date.now();
1063
- const profileModule = await import("./profile-CCOKZ2IQ.js");
1064
- const { PROFILE_SUBCOMMANDS } = profileModule;
1065
- const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
1066
- if (!normalizedSubcommand) {
1067
- throw new PmCliError(`pm profile requires a subcommand. Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
1068
- code: "missing_required_argument",
1069
- examples: ["pm profile list", "pm profile show agile", "pm profile apply agile --dry-run", "pm profile lint agile"]
1070
- });
1071
- }
1072
- if (!PROFILE_SUBCOMMANDS.includes(normalizedSubcommand)) {
1073
- throw new PmCliError(`Unknown pm profile subcommand "${subcommand}". Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
1074
- }
1075
- const result = await dispatchProfileSubcommand(profileModule, normalizedSubcommand, name, options, globalOptions);
1076
- if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
1077
- printResult(result, globalOptions);
1078
- } else if (!globalOptions.quiet) {
1079
- renderProfileResultHuman(profileModule, result);
1080
- }
1081
- if (result.action === "lint" && !result.ok) {
1082
- process.exitCode = EXIT_CODE.GENERIC_FAILURE;
1083
- }
1084
- if (globalOptions.profile) {
1085
- printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
1086
- }
1087
- });
1234
+ profileCommand.action(runProfileAction);
1088
1235
  program.command("comments").argument("<id>", "Item id").argument("[text]", "Optional comment text shorthand (equivalent to --add)").option("--add <text>", "Add one comment entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--stdin", "Read comment text from stdin (supports multiline markdown)").option("--file <path>", "Read comment text from file (supports multiline markdown)").option("--edit <index>", "Replace the comment at 1-based <index> (replacement text from positional [text], --add, --stdin, or --file)", parsePositiveIntOption("--edit")).option("--delete <index>", "Delete the comment at 1-based <index>", parsePositiveIntOption("--delete")).option("--limit <n>", "Return only latest n comments").option("--author [value]", "Comment author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-comment", "Allow non-owner append-only comment audits (add/edit/delete) without requiring --force").option("--force", "Force ownership override").description("List, add, edit, or delete comments for an item.").action(runCommentsAction);
1089
- program.command("notes").argument("<id>", "Item id").argument("[text]", "Optional note text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one note entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n notes").option("--author [value]", "Note author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-note", "Allow non-owner append-only note audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-note").option("--force", "Force ownership override").description("List or add notes for an item.").action(async (id, text, options, command) => {
1090
- const globalOptions = getGlobalOptions(command);
1091
- const startedAt = Date.now();
1092
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1093
- const addFromPositional = typeof text === "string" ? text : void 0;
1094
- if (addFromOption !== void 0 && addFromPositional !== void 0) {
1095
- throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1096
- }
1097
- const add = addFromOption ?? addFromPositional;
1098
- const { runNotes } = await import("./notes-WDDBPC4D.js");
1099
- const result = await runNotes(id, {
1100
- add,
1101
- limit: typeof options.limit === "string" ? options.limit : void 0,
1102
- author: typeof options.author === "string" ? options.author : void 0,
1103
- message: typeof options.message === "string" ? options.message : void 0,
1104
- allowAuditComment: Boolean(options.allowAuditNote || options.allowAuditComment),
1105
- force: Boolean(options.force)
1106
- }, globalOptions);
1107
- if (typeof add === "string") {
1108
- await invalidateSearchCachesForMutation(globalOptions, result);
1109
- }
1110
- printResult(result, globalOptions);
1111
- if (globalOptions.profile) {
1112
- printError(`profile:command=notes took_ms=${Date.now() - startedAt}`);
1113
- }
1114
- });
1115
- program.command("learnings").argument("<id>", "Item id").argument("[text]", "Optional learning text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one learning entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n learnings").option("--author [value]", "Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-learning", "Allow non-owner append-only learning audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-learning").option("--force", "Force ownership override").description("List or add learnings for an item.").action(async (id, text, options, command) => {
1116
- const globalOptions = getGlobalOptions(command);
1117
- const startedAt = Date.now();
1118
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1119
- const addFromPositional = typeof text === "string" ? text : void 0;
1120
- if (addFromOption !== void 0 && addFromPositional !== void 0) {
1121
- throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1122
- }
1123
- const add = addFromOption ?? addFromPositional;
1124
- const { runLearnings } = await import("./learnings-HJVDQIGY.js");
1125
- const result = await runLearnings(id, {
1126
- add,
1127
- limit: typeof options.limit === "string" ? options.limit : void 0,
1128
- author: typeof options.author === "string" ? options.author : void 0,
1129
- message: typeof options.message === "string" ? options.message : void 0,
1130
- allowAuditComment: Boolean(options.allowAuditLearning || options.allowAuditComment),
1131
- force: Boolean(options.force)
1132
- }, globalOptions);
1133
- if (typeof add === "string") {
1134
- await invalidateSearchCachesForMutation(globalOptions, result);
1135
- }
1136
- printResult(result, globalOptions);
1137
- if (globalOptions.profile) {
1138
- printError(`profile:command=learnings took_ms=${Date.now() - startedAt}`);
1139
- }
1140
- });
1236
+ program.command("notes").argument("<id>", "Item id").argument("[text]", "Optional note text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one note entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n notes").option("--author [value]", "Note author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-note", "Allow non-owner append-only note audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-note").option("--force", "Force ownership override").description("List or add notes for an item.").action(runNotesAction);
1237
+ program.command("learnings").argument("<id>", "Item id").argument("[text]", "Optional learning text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one learning entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n learnings").option("--author [value]", "Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-learning", "Allow non-owner append-only learning audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-learning").option("--force", "Force ownership override").description("List or add learnings for an item.").action(runLearningsAction);
1141
1238
  const filesCommand = program.command("files").description("Manage files linked to an item.");
1142
- filesCommand.argument("<id>", "Item id").option("--add <value>", "Add linked file entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked file by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked files without mutating").option("--append-stable", "Preserve existing linked-file order and append new links without full-array resorting").option("--validate-paths", "Validate linked file paths for existence and file shape").option("--audit", "Audit linked file usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").action(async (id, options, command) => {
1143
- const globalOptions = getGlobalOptions(command);
1144
- const startedAt = Date.now();
1145
- const addValues = Array.isArray(options.add) ? options.add : [];
1146
- const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1147
- const removeValues = Array.isArray(options.remove) ? options.remove : [];
1148
- const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1149
- const { runFiles } = await import("./files-5D65CHGE.js");
1150
- const result = await runFiles(id, {
1151
- add: addValues,
1152
- addGlob: addGlobValues,
1153
- remove: removeValues,
1154
- migrate: migrateValues,
1155
- note: typeof options.note === "string" ? options.note : void 0,
1156
- list: Boolean(options.list),
1157
- appendStable: Boolean(options.appendStable),
1158
- validatePaths: Boolean(options.validatePaths),
1159
- audit: Boolean(options.audit),
1160
- author: typeof options.author === "string" ? options.author : void 0,
1161
- message: typeof options.message === "string" ? options.message : void 0,
1162
- force: Boolean(options.force)
1163
- }, globalOptions);
1164
- if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1165
- await invalidateSearchCachesForMutation(globalOptions, result);
1166
- }
1167
- printResult(result, globalOptions);
1168
- if (globalOptions.profile) {
1169
- printError(`profile:command=files took_ms=${Date.now() - startedAt}`);
1170
- }
1171
- });
1172
- filesCommand.command("discover").argument("<id>", "Item id").option("--apply", "Add discovered missing files to the item").option("--note <value>", "Note to attach to discovered file links").option("--append-stable", "Preserve existing linked-file order and append discovered links without full-array resorting").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Discover existing file paths referenced in item text and optionally link missing files.").action(async (id, options, command) => {
1173
- const globalOptions = getGlobalOptions(command);
1174
- const startedAt = Date.now();
1175
- const mergedOptions = { ...command.optsWithGlobals(), ...options };
1176
- const { runFilesDiscover } = await import("./files-5D65CHGE.js");
1177
- const result = await runFilesDiscover(id, {
1178
- apply: Boolean(mergedOptions.apply),
1179
- note: typeof mergedOptions.note === "string" ? mergedOptions.note : void 0,
1180
- appendStable: Boolean(mergedOptions.appendStable),
1181
- author: typeof mergedOptions.author === "string" ? mergedOptions.author : void 0,
1182
- message: typeof mergedOptions.message === "string" ? mergedOptions.message : void 0,
1183
- force: Boolean(mergedOptions.force)
1184
- }, globalOptions);
1185
- if (result.changed) {
1186
- await invalidateSearchCachesForMutation(globalOptions, result);
1187
- }
1188
- printResult(result, globalOptions);
1189
- if (globalOptions.profile) {
1190
- printError(`profile:command=files.discover took_ms=${Date.now() - startedAt}`);
1191
- }
1192
- });
1193
- program.command("docs").argument("<id>", "Item id").option("--add <value>", "Add linked doc entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked doc by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked docs without mutating").option("--validate-paths", "Validate linked doc paths for existence and file shape").option("--audit", "Audit linked doc usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Manage docs linked to an item.").action(async (id, options, command) => {
1194
- const globalOptions = getGlobalOptions(command);
1195
- const startedAt = Date.now();
1196
- const addValues = Array.isArray(options.add) ? options.add : [];
1197
- const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1198
- const removeValues = Array.isArray(options.remove) ? options.remove : [];
1199
- const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1200
- const { runDocs } = await import("./docs-RPOVFMP3.js");
1201
- const result = await runDocs(id, {
1202
- add: addValues,
1203
- addGlob: addGlobValues,
1204
- remove: removeValues,
1205
- migrate: migrateValues,
1206
- note: typeof options.note === "string" ? options.note : void 0,
1207
- list: Boolean(options.list),
1208
- validatePaths: Boolean(options.validatePaths),
1209
- audit: Boolean(options.audit),
1210
- author: typeof options.author === "string" ? options.author : void 0,
1211
- message: typeof options.message === "string" ? options.message : void 0,
1212
- force: Boolean(options.force)
1213
- }, globalOptions);
1214
- if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1215
- await invalidateSearchCachesForMutation(globalOptions, result);
1216
- }
1217
- printResult(result, globalOptions);
1218
- if (globalOptions.profile) {
1219
- printError(`profile:command=docs took_ms=${Date.now() - startedAt}`);
1220
- }
1221
- });
1222
- program.command("deps").argument("<id>", "Item id").option("--format <value>", "Output format (tree or graph)", "tree").option("--max-depth <value>", "Maximum dependency traversal depth (0 keeps only the root)").option("--collapse <value>", "Collapse mode (none or repeated)", "none").option("--summary", "Return counts only without full tree/graph payload").description("Show dependency relationships for an item.").action(async (id, options, command) => {
1223
- const globalOptions = getGlobalOptions(command);
1224
- const startedAt = Date.now();
1225
- const { runDeps } = await import("./deps-ZQZN54EZ.js");
1226
- const result = await runDeps(id, {
1227
- format: options.format,
1228
- maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : void 0,
1229
- collapse: options.collapse,
1230
- summary: options.summary === true
1231
- }, globalOptions);
1232
- printResult(result, globalOptions);
1233
- if (globalOptions.profile) {
1234
- printError(`profile:command=deps took_ms=${Date.now() - startedAt}`);
1235
- }
1236
- });
1239
+ filesCommand.argument("<id>", "Item id").option("--add <value>", "Add linked file entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked file by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked files without mutating").option("--append-stable", "Preserve existing linked-file order and append new links without full-array resorting").option("--validate-paths", "Validate linked file paths for existence and file shape").option("--audit", "Audit linked file usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").action(runFilesAction);
1240
+ filesCommand.command("discover").argument("<id>", "Item id").option("--apply", "Add discovered missing files to the item").option("--note <value>", "Note to attach to discovered file links").option("--append-stable", "Preserve existing linked-file order and append discovered links without full-array resorting").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Discover existing file paths referenced in item text and optionally link missing files.").action(runFilesDiscoverAction);
1241
+ program.command("docs").argument("<id>", "Item id").option("--add <value>", "Add linked doc entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked doc by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked docs without mutating").option("--validate-paths", "Validate linked doc paths for existence and file shape").option("--audit", "Audit linked doc usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Manage docs linked to an item.").action(runDocsAction);
1242
+ program.command("deps").argument("<id>", "Item id").option("--format <value>", "Output format (tree or graph)", "tree").option("--max-depth <value>", "Maximum dependency traversal depth (0 keeps only the root)").option("--collapse <value>", "Collapse mode (none or repeated)", "none").option("--summary", "Return counts only without full tree/graph payload").description("Show dependency relationships for an item.").action(runDepsAction);
1237
1243
  }
1238
1244
  export {
1239
1245
  looksLikeSchemaSubcommandTypo,
@@ -1242,6 +1248,6 @@ export {
1242
1248
  registerCommanderOptionContracts,
1243
1249
  registerMutationCommands
1244
1250
  };
1245
- //# sourceMappingURL=register-mutation-CFSB2MS3.js.map
1251
+ //# sourceMappingURL=register-mutation-K2MNRWGI.js.map
1246
1252
 
1247
- //# debugId=5e1251c7-61f3-5c3e-9990-c7f3ea8385cb
1253
+ //# debugId=919c1fe0-eaf0-51d1-9788-48d73b423eb3