@unbrained/pm-cli 2026.6.30 → 2026.7.2

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 (628) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +26 -0
  3. package/dist/cli/bootstrap-args.js +89 -79
  4. package/dist/cli/bootstrap-args.js.map +1 -1
  5. package/dist/cli/commander-usage.d.ts +2 -0
  6. package/dist/cli/commander-usage.js +58 -47
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/aggregate.js +102 -79
  9. package/dist/cli/commands/aggregate.js.map +1 -1
  10. package/dist/cli/commands/calendar.js +339 -303
  11. package/dist/cli/commands/calendar.js.map +1 -1
  12. package/dist/cli/commands/close-many.js +89 -68
  13. package/dist/cli/commands/close-many.js.map +1 -1
  14. package/dist/cli/commands/close.js +157 -129
  15. package/dist/cli/commands/close.js.map +1 -1
  16. package/dist/cli/commands/comments-audit.js +50 -42
  17. package/dist/cli/commands/comments-audit.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +2 -0
  19. package/dist/cli/commands/config.js +443 -879
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/context.js +365 -287
  22. package/dist/cli/commands/context.js.map +1 -1
  23. package/dist/cli/commands/contracts.js +352 -238
  24. package/dist/cli/commands/contracts.js.map +1 -1
  25. package/dist/cli/commands/create.js +483 -434
  26. package/dist/cli/commands/create.js.map +1 -1
  27. package/dist/cli/commands/dedupe-audit.js +46 -39
  28. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  29. package/dist/cli/commands/dedupe-merge.js +88 -69
  30. package/dist/cli/commands/dedupe-merge.js.map +1 -1
  31. package/dist/cli/commands/extension/bundled-catalog.js +59 -46
  32. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  33. package/dist/cli/commands/extension/doctor.js +129 -78
  34. package/dist/cli/commands/extension/doctor.js.map +1 -1
  35. package/dist/cli/commands/extension/managed-state.js +101 -57
  36. package/dist/cli/commands/extension/managed-state.js.map +1 -1
  37. package/dist/cli/commands/extension/scaffold.d.ts +7 -0
  38. package/dist/cli/commands/extension/scaffold.js +214 -186
  39. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  40. package/dist/cli/commands/extension.d.ts +6 -1
  41. package/dist/cli/commands/extension.js +1034 -902
  42. package/dist/cli/commands/extension.js.map +1 -1
  43. package/dist/cli/commands/get.js +114 -81
  44. package/dist/cli/commands/get.js.map +1 -1
  45. package/dist/cli/commands/health.d.ts +17 -0
  46. package/dist/cli/commands/health.js +446 -307
  47. package/dist/cli/commands/health.js.map +1 -1
  48. package/dist/cli/commands/history-compact.js +209 -140
  49. package/dist/cli/commands/history-compact.js.map +1 -1
  50. package/dist/cli/commands/history-redact.js +162 -119
  51. package/dist/cli/commands/history-redact.js.map +1 -1
  52. package/dist/cli/commands/history-repair.js +120 -85
  53. package/dist/cli/commands/history-repair.js.map +1 -1
  54. package/dist/cli/commands/init.d.ts +8 -2
  55. package/dist/cli/commands/init.js +263 -162
  56. package/dist/cli/commands/init.js.map +1 -1
  57. package/dist/cli/commands/list-filter-shared.js +55 -48
  58. package/dist/cli/commands/list-filter-shared.js.map +1 -1
  59. package/dist/cli/commands/list.js +152 -102
  60. package/dist/cli/commands/list.js.map +1 -1
  61. package/dist/cli/commands/next.js +49 -32
  62. package/dist/cli/commands/next.js.map +1 -1
  63. package/dist/cli/commands/plan.js +373 -298
  64. package/dist/cli/commands/plan.js.map +1 -1
  65. package/dist/cli/commands/recurrence-parsers.js +43 -25
  66. package/dist/cli/commands/recurrence-parsers.js.map +1 -1
  67. package/dist/cli/commands/reindex.d.ts +21 -5
  68. package/dist/cli/commands/reindex.js +345 -205
  69. package/dist/cli/commands/reindex.js.map +1 -1
  70. package/dist/cli/commands/restore.d.ts +8 -7
  71. package/dist/cli/commands/restore.js +105 -69
  72. package/dist/cli/commands/restore.js.map +1 -1
  73. package/dist/cli/commands/schema.js +33 -30
  74. package/dist/cli/commands/schema.js.map +1 -1
  75. package/dist/cli/commands/search.d.ts +10 -2
  76. package/dist/cli/commands/search.js +595 -536
  77. package/dist/cli/commands/search.js.map +1 -1
  78. package/dist/cli/commands/telemetry.js +98 -87
  79. package/dist/cli/commands/telemetry.js.map +1 -1
  80. package/dist/cli/commands/test-all.js +237 -168
  81. package/dist/cli/commands/test-all.js.map +1 -1
  82. package/dist/cli/commands/test.d.ts +6 -5
  83. package/dist/cli/commands/test.js +530 -464
  84. package/dist/cli/commands/test.js.map +1 -1
  85. package/dist/cli/commands/update-many.js +57 -42
  86. package/dist/cli/commands/update-many.js.map +1 -1
  87. package/dist/cli/commands/update.d.ts +1 -1
  88. package/dist/cli/commands/update.js +764 -747
  89. package/dist/cli/commands/update.js.map +1 -1
  90. package/dist/cli/commands/validate.d.ts +18 -1
  91. package/dist/cli/commands/validate.js +466 -343
  92. package/dist/cli/commands/validate.js.map +1 -1
  93. package/dist/cli/error-guidance.js +399 -357
  94. package/dist/cli/error-guidance.js.map +1 -1
  95. package/dist/cli/extension-command-options.js +48 -21
  96. package/dist/cli/extension-command-options.js.map +1 -1
  97. package/dist/cli/main.d.ts +47 -0
  98. package/dist/cli/main.js +428 -341
  99. package/dist/cli/main.js.map +1 -1
  100. package/dist/cli/migration-gates.js +22 -45
  101. package/dist/cli/migration-gates.js.map +1 -1
  102. package/dist/cli/register-list-query.js +94 -105
  103. package/dist/cli/register-list-query.js.map +1 -1
  104. package/dist/cli/register-mutation.js +400 -416
  105. package/dist/cli/register-mutation.js.map +1 -1
  106. package/dist/cli/register-operations.js +86 -66
  107. package/dist/cli/register-operations.js.map +1 -1
  108. package/dist/cli/register-setup.js +120 -101
  109. package/dist/cli/register-setup.js.map +1 -1
  110. package/dist/cli/registration-helpers.js +117 -122
  111. package/dist/cli/registration-helpers.js.map +1 -1
  112. package/dist/cli-bundle/chunks/{activity-MVSEND6D.js → activity-CUC4JY3U.js} +9 -9
  113. package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
  114. package/dist/cli-bundle/chunks/{aggregate-MOC4TR2G.js → aggregate-DKUTRY6R.js} +109 -85
  115. package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
  116. package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js → aggregate-SW5PNGCS.js} +108 -84
  117. package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js.map → aggregate-SW5PNGCS.js.map} +2 -2
  118. package/dist/cli-bundle/chunks/{append-KDHT4GHI.js → append-H32VOR2Y.js} +6 -6
  119. package/dist/cli-bundle/chunks/{append-LEDBAM3K.js → append-UBM632FK.js} +6 -6
  120. package/dist/cli-bundle/chunks/{chunk-Z55WX4IQ.js → chunk-2227673O.js} +158 -114
  121. package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js → chunk-2ASNV4DH.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js → chunk-2CHRYUXL.js} +2 -2
  124. package/dist/cli-bundle/chunks/{chunk-QE5UFCCO.js → chunk-2KWL5NPW.js} +42 -27
  125. package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{chunk-ZEATCVAC.js → chunk-36UGKF4O.js} +21 -29
  127. package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-JZG5ADVE.js → chunk-3AZUFQK6.js} +1103 -963
  129. package/dist/cli-bundle/chunks/chunk-3AZUFQK6.js.map +1 -0
  130. package/dist/cli-bundle/chunks/{chunk-DRPF274X.js → chunk-3LCUASYG.js} +2 -2
  131. package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js → chunk-3Q2HBMTI.js} +2 -2
  132. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
  133. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-GF7EAR22.js → chunk-4NUOWFBT.js} +109 -72
  135. package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js → chunk-55XRYWEG.js} +6 -6
  137. package/dist/cli-bundle/chunks/{chunk-5IRVSKPS.js → chunk-5GVTFFTC.js} +150 -224
  138. package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +1 -0
  139. package/dist/cli-bundle/chunks/{chunk-CHRNYKNI.js → chunk-5PGBHRY3.js} +41 -26
  140. package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
  141. package/dist/cli-bundle/chunks/{chunk-53ARXF2O.js → chunk-66Z3X7ZG.js} +261 -161
  142. package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-A3UNLXNJ.js → chunk-6ITZLD4T.js} +738 -688
  144. package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{chunk-JTRKME24.js → chunk-6YCYF2AI.js} +262 -162
  146. package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-RM6MHL6A.js → chunk-6ZMBJRDJ.js} +580 -467
  148. package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
  149. package/dist/cli-bundle/chunks/{chunk-RPRW26NG.js → chunk-7MYWF4ZX.js} +110 -73
  150. package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
  151. package/dist/cli-bundle/chunks/{chunk-SNUK7H5J.js → chunk-7NSPKJUS.js} +716 -606
  152. package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-KYDYQMNW.js → chunk-7TH5NMVB.js} +95 -53
  154. package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
  155. package/dist/cli-bundle/chunks/{chunk-VD3LKZFX.js → chunk-7W4H4K26.js} +739 -689
  156. package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js → chunk-A6VOGKBA.js} +6 -6
  158. package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js → chunk-AIAIXG7I.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-NIBP3I7A.js → chunk-AJEBCRIY.js} +128 -126
  160. package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +1 -0
  161. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
  162. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
  163. package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js → chunk-BTX5MIQF.js} +2 -2
  164. package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js +809 -0
  165. package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js.map +7 -0
  166. package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js → chunk-CYBDUHNO.js} +3 -3
  167. package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js → chunk-CZPVDLD2.js} +4 -4
  168. package/dist/cli-bundle/chunks/{chunk-FDEVKXC4.js → chunk-EMPGXBUF.js} +22 -30
  169. package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js → chunk-EUKTMRN3.js} +2 -2
  171. package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js → chunk-FFOQHGNH.js} +6 -6
  172. package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js → chunk-GFMSLORL.js} +6 -6
  173. package/dist/cli-bundle/chunks/{chunk-IZQOJR2B.js → chunk-GRRG3MCT.js} +198 -189
  174. package/dist/cli-bundle/chunks/chunk-GRRG3MCT.js.map +7 -0
  175. package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js → chunk-H4GRLYJS.js} +3 -3
  176. package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js → chunk-HQTPRV4D.js} +6 -6
  177. package/dist/cli-bundle/chunks/{chunk-CY5IJMUM.js → chunk-I66WE2HE.js} +712 -602
  178. package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
  179. package/dist/cli-bundle/chunks/{chunk-ZFIEEDTJ.js → chunk-IEEJQCZ4.js} +509 -363
  180. package/dist/cli-bundle/chunks/chunk-IEEJQCZ4.js.map +7 -0
  181. package/dist/cli-bundle/chunks/{chunk-DU66JUGT.js → chunk-IG5JYZGU.js} +488 -420
  182. package/dist/cli-bundle/chunks/chunk-IG5JYZGU.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js → chunk-JMK5GCK2.js} +2 -2
  184. package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js → chunk-JXAUVO6X.js} +258 -169
  185. package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js.map → chunk-JXAUVO6X.js.map} +2 -2
  186. package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js → chunk-K2VYLVX4.js} +2 -2
  187. package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js → chunk-KCO2EAN5.js} +3 -3
  188. package/dist/cli-bundle/chunks/{chunk-T7ZMQI4J.js → chunk-KIYCOJ63.js} +198 -189
  189. package/dist/cli-bundle/chunks/chunk-KIYCOJ63.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js → chunk-KLXF7NCC.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-V3KLX7U7.js → chunk-KN3URLKS.js} +510 -364
  192. package/dist/cli-bundle/chunks/chunk-KN3URLKS.js.map +1 -0
  193. package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js → chunk-LRKMWUUV.js} +2 -2
  194. package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js → chunk-LTRAF2D7.js} +3 -3
  195. package/dist/cli-bundle/chunks/{chunk-5T6WPLRO.js → chunk-MNBPX5JS.js} +394 -354
  196. package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
  197. package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js → chunk-MRD4T5LF.js} +2 -2
  198. package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js → chunk-N2JSWVWG.js} +4 -4
  199. package/dist/cli-bundle/chunks/{chunk-7WDETKGP.js → chunk-N3QCJS4M.js} +1105 -965
  200. package/dist/cli-bundle/chunks/chunk-N3QCJS4M.js.map +7 -0
  201. package/dist/cli-bundle/chunks/{chunk-KGQ3W65B.js → chunk-NRZS637N.js} +258 -169
  202. package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
  203. package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js +799 -0
  204. package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js.map +1 -0
  205. package/dist/cli-bundle/chunks/{chunk-ZIE6WXJ2.js → chunk-Q6K2OACU.js} +153 -90
  206. package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
  207. package/dist/cli-bundle/chunks/{chunk-K46GQ265.js → chunk-Q6NXOHS6.js} +489 -421
  208. package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
  209. package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js → chunk-QH3FSKRJ.js} +2 -2
  210. package/dist/cli-bundle/chunks/{chunk-UB3V5WUI.js → chunk-RM37OPYK.js} +394 -354
  211. package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
  212. package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js → chunk-S62UANU7.js} +3 -3
  213. package/dist/cli-bundle/chunks/{chunk-NO6Y6FB2.js → chunk-SPM2XLWI.js} +37 -28
  214. package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
  215. package/dist/cli-bundle/chunks/{chunk-DORJSBGJ.js → chunk-SYNKD3ZG.js} +127 -125
  216. package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +7 -0
  217. package/dist/cli-bundle/chunks/{chunk-6YRAMXRS.js → chunk-SYVUU7EK.js} +581 -468
  218. package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{chunk-D5LYZVGB.js → chunk-TPOFWBMY.js} +95 -53
  220. package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-IHXXUIXS.js → chunk-TTHCEV5Q.js} +92 -77
  222. package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
  223. package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js → chunk-U2BEEM2X.js} +3 -3
  224. package/dist/cli-bundle/chunks/{chunk-Z5BM2FKQ.js → chunk-UGLU6Q2I.js} +91 -76
  225. package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js → chunk-UT73HUPC.js} +3 -3
  227. package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js → chunk-UTSH5GWX.js} +4 -4
  228. package/dist/cli-bundle/chunks/{chunk-AWN4PPH5.js → chunk-UWKEJMZU.js} +157 -113
  229. package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
  230. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
  231. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
  232. package/dist/cli-bundle/chunks/{chunk-KTMMTOIP.js → chunk-W47SML5B.js} +152 -89
  233. package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
  234. package/dist/cli-bundle/chunks/{chunk-UFKNF23C.js → chunk-WJAMWAHZ.js} +157 -118
  235. package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
  236. package/dist/cli-bundle/chunks/{chunk-HIBK6H4S.js → chunk-XCHUVHKU.js} +685 -544
  237. package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{chunk-DJDXAU74.js → chunk-XEWQKDYZ.js} +685 -544
  239. package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
  240. package/dist/cli-bundle/chunks/{chunk-BOWQWXLI.js → chunk-XTHQWXVC.js} +158 -119
  241. package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
  242. package/dist/cli-bundle/chunks/{chunk-6T5ZIWBS.js → chunk-XWGEMNBR.js} +150 -224
  243. package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +7 -0
  244. package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js → chunk-Y4NRKBFW.js} +3 -3
  245. package/dist/cli-bundle/chunks/{chunk-WTRUDJ3R.js → chunk-YLZZ6T54.js} +38 -29
  246. package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
  247. package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js → chunk-YPKFV2JR.js} +6 -6
  248. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
  249. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
  250. package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js → chunk-ZNHEYCDD.js} +2 -2
  251. package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js → chunk-ZNT7KEWE.js} +2 -2
  252. package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js → claim-SENTPZBN.js} +8 -8
  253. package/dist/cli-bundle/chunks/{claim-6NINZYB3.js → claim-Z7MEQCBT.js} +8 -8
  254. package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js → close-424MX4CU.js} +7 -7
  255. package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
  256. package/dist/cli-bundle/chunks/{close-many-CXJBOWWY.js → close-many-2IV4J2TR.js} +103 -82
  257. package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
  258. package/dist/cli-bundle/chunks/{close-many-BFMP6HHK.js → close-many-SWY34BII.js} +102 -81
  259. package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
  260. package/dist/cli-bundle/chunks/{comments-ETHABIY6.js → comments-4FGNTSNV.js} +8 -8
  261. package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js → comments-7YS5MY5X.js} +8 -8
  262. package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
  263. package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
  264. package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
  265. package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js → context-LHVKJSPJ.js} +12 -12
  267. package/dist/cli-bundle/chunks/{context-XDI4DKKT.js → context-ZQY54JNS.js} +12 -12
  268. package/dist/cli-bundle/chunks/{contracts-SMOAN5NF.js → contracts-CP2EZJC7.js} +320 -199
  269. package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{contracts-KP4QAGVW.js → contracts-FIZLMP7O.js} +321 -200
  271. package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
  272. package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js → copy-GYNQQPW2.js} +5 -5
  273. package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js → copy-TLW7JTQT.js} +5 -5
  274. package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js → create-VSKYSOCD.js} +12 -12
  275. package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
  276. package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js → delete-4W5JYCEG.js} +5 -5
  277. package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js → delete-ANTOTI2I.js} +5 -5
  278. package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js → deps-HPPE6MJN.js} +5 -5
  279. package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js → deps-ZQZN54EZ.js} +5 -5
  280. package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js → docs-RPOVFMP3.js} +7 -7
  281. package/dist/cli-bundle/chunks/{docs-2TIFR62T.js → docs-XJNYBJGE.js} +7 -7
  282. package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js → eval-DM6JBZTS.js} +10 -10
  283. package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js → eval-RFBI5FGS.js} +10 -10
  284. package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js → extension-B3YY4WY5.js} +11 -10
  285. package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js → extension-TTSEFQTS.js} +11 -10
  286. package/dist/cli-bundle/chunks/{files-DF3HO6XK.js → files-5D65CHGE.js} +7 -7
  287. package/dist/cli-bundle/chunks/{files-T5ODMETM.js → files-GPIG77EN.js} +7 -7
  288. package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js → focus-C3PEJV2C.js} +6 -6
  289. package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js → focus-ZHN7WIGX.js} +6 -6
  290. package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js → gc-D4JQ6OWN.js} +3 -3
  291. package/dist/cli-bundle/chunks/{gc-FULIVYR4.js → gc-VZIXDL32.js} +3 -3
  292. package/dist/cli-bundle/chunks/{get-VYPIICPC.js → get-GIBRUUOP.js} +121 -81
  293. package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
  294. package/dist/cli-bundle/chunks/{get-AWK324RS.js → get-IOVAN6RU.js} +120 -80
  295. package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
  296. package/dist/cli-bundle/chunks/{health-Q66C43GN.js → health-L2U3AFKV.js} +437 -264
  297. package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
  298. package/dist/cli-bundle/chunks/{health-FBCVZGSX.js → health-MM7AWXYF.js} +436 -263
  299. package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
  300. package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
  301. package/dist/cli-bundle/chunks/{history-X4OSES6K.js → history-IL7XCEX2.js} +8 -8
  302. package/dist/cli-bundle/chunks/{history-compact-2GHT32UX.js → history-compact-HALOTOU7.js} +214 -135
  303. package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
  304. package/dist/cli-bundle/chunks/{history-compact-WLCQEKXS.js → history-compact-MV25P7DM.js} +213 -134
  305. package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
  306. package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
  307. package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js → history-redact-VYCWQFK7.js} +9 -9
  308. package/dist/cli-bundle/chunks/{history-repair-FY75IC26.js → history-repair-44MODPQF.js} +124 -84
  309. package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
  310. package/dist/cli-bundle/chunks/{history-repair-GABSDSVD.js → history-repair-CPNAOCNF.js} +123 -83
  311. package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
  312. package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js → init-F27NHENZ.js} +12 -11
  313. package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
  314. package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js → learnings-HJVDQIGY.js} +8 -8
  315. package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js → learnings-XSFSUUWK.js} +8 -8
  316. package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js → list-HPMEKCAA.js} +8 -8
  317. package/dist/cli-bundle/chunks/{list-ROT7JF62.js → list-VMPWTURB.js} +8 -8
  318. package/dist/cli-bundle/chunks/{next-66BJB4N2.js → next-ETXF2ZCN.js} +59 -37
  319. package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
  320. package/dist/cli-bundle/chunks/{next-N5MWJTBY.js → next-QM6YJIIS.js} +60 -38
  321. package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
  322. package/dist/cli-bundle/chunks/{notes-FW6YFLND.js → notes-GDZIKGR6.js} +8 -8
  323. package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js → notes-WDDBPC4D.js} +8 -8
  324. package/dist/cli-bundle/chunks/{plan-ZHKZ7JVF.js → plan-BGDR73Z6.js} +373 -279
  325. package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
  326. package/dist/cli-bundle/chunks/{plan-DQ7G4EDC.js → plan-C5IMM335.js} +372 -278
  327. package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
  328. package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js → profile-CCOKZ2IQ.js} +9 -9
  329. package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js → profile-HUCENIEQ.js} +9 -9
  330. package/dist/cli-bundle/chunks/{register-list-query-Y2VRHPCL.js → register-list-query-ROSNIL52.js} +80 -83
  331. package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
  332. package/dist/cli-bundle/chunks/{register-list-query-KY6Z6WV7.js → register-list-query-XN4ZRHSV.js} +79 -82
  333. package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
  334. package/dist/cli-bundle/chunks/{register-mutation-PCARIGZS.js → register-mutation-CFSB2MS3.js} +406 -385
  335. package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
  336. package/dist/cli-bundle/chunks/{register-mutation-N6AYSKPM.js → register-mutation-KRLAHEL2.js} +405 -384
  337. package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
  338. package/dist/cli-bundle/chunks/{register-operations-L6CYTOIH.js → register-operations-4PASGJDB.js} +112 -93
  339. package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
  340. package/dist/cli-bundle/chunks/{register-operations-YAT6FUUB.js → register-operations-MBN4KGUM.js} +113 -94
  341. package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
  342. package/dist/cli-bundle/chunks/{register-setup-N7UGXYJC.js → register-setup-VIAWYFP5.js} +129 -104
  343. package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
  344. package/dist/cli-bundle/chunks/{register-setup-MPANILQF.js → register-setup-ZCGKHDKL.js} +128 -103
  345. package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
  346. package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js → restore-4CBWUMCX.js} +9 -9
  347. package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
  348. package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
  349. package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
  350. package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js → schema-TDGK6N3I.js} +7 -7
  351. package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js → schema-UE5KKAUX.js} +7 -7
  352. package/dist/cli-bundle/chunks/{search-KP6H7COV.js → search-FP7MEU4S.js} +10 -10
  353. package/dist/cli-bundle/chunks/{search-CX5UMV4H.js → search-K4CFLQ5S.js} +10 -10
  354. package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js → stats-NJJCALEZ.js} +6 -6
  355. package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js → stats-XT6QRKQY.js} +6 -6
  356. package/dist/cli-bundle/chunks/{telemetry-DIFPXCAT.js → telemetry-5SQ5UDXC.js} +84 -70
  357. package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
  358. package/dist/cli-bundle/chunks/{telemetry-WTYFUPRL.js → telemetry-HVXFZA2U.js} +85 -71
  359. package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
  360. package/dist/cli-bundle/chunks/{test-QNDXZQCW.js → test-UFSJ5YIO.js} +15 -14
  361. package/dist/cli-bundle/chunks/{test-HU2BS7EY.js → test-YCDAUBWF.js} +15 -14
  362. package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
  363. package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
  364. package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
  365. package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
  366. package/dist/cli-bundle/chunks/{test-runs-CA6K32RD.js → test-runs-FK5E75AA.js} +185 -147
  367. package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
  368. package/dist/cli-bundle/chunks/{test-runs-LANLLPVO.js → test-runs-H4TGWGRN.js} +184 -146
  369. package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
  370. package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
  371. package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js → update-Y5WQVT5O.js} +15 -15
  372. package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js → update-many-6YAYYRLE.js} +83 -68
  373. package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js.map → update-many-6YAYYRLE.js.map} +2 -2
  374. package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js → update-many-JTKKSA7Y.js} +84 -69
  375. package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js.map → update-many-JTKKSA7Y.js.map} +1 -1
  376. package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js → upgrade-DTAHZ236.js} +11 -10
  377. package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js.map → upgrade-DTAHZ236.js.map} +1 -1
  378. package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js → upgrade-JUDU7YL4.js} +13 -12
  379. package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js.map → upgrade-JUDU7YL4.js.map} +1 -1
  380. package/dist/cli-bundle/chunks/{validate-2G566PKQ.js → validate-732RWS5W.js} +440 -319
  381. package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
  382. package/dist/cli-bundle/chunks/{validate-BDPVXHHH.js → validate-W7H5TEDC.js} +441 -320
  383. package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
  384. package/dist/cli-bundle/main.js +986 -1500
  385. package/dist/cli-bundle/main.js.map +4 -4
  386. package/dist/core/config/nested-settings.js +89 -67
  387. package/dist/core/config/nested-settings.js.map +1 -1
  388. package/dist/core/extensions/activation-summary-markdown.js +23 -12
  389. package/dist/core/extensions/activation-summary-markdown.js.map +1 -1
  390. package/dist/core/extensions/extension-policy.d.ts +18 -3
  391. package/dist/core/extensions/extension-policy.js +116 -106
  392. package/dist/core/extensions/extension-policy.js.map +1 -1
  393. package/dist/core/extensions/loader.js +310 -232
  394. package/dist/core/extensions/loader.js.map +1 -1
  395. package/dist/core/governance/metadata-coverage.js +20 -28
  396. package/dist/core/governance/metadata-coverage.js.map +1 -1
  397. package/dist/core/history/drift-scan.js +93 -81
  398. package/dist/core/history/drift-scan.js.map +1 -1
  399. package/dist/core/item/item-format.js +523 -410
  400. package/dist/core/item/item-format.js.map +1 -1
  401. package/dist/core/item/item-type-definition.js +14 -14
  402. package/dist/core/item/item-type-definition.js.map +1 -1
  403. package/dist/core/item/type-registry.js +87 -82
  404. package/dist/core/item/type-registry.js.map +1 -1
  405. package/dist/core/output/mutation-projection.js +42 -26
  406. package/dist/core/output/mutation-projection.js.map +1 -1
  407. package/dist/core/schema/runtime-schema.js +34 -28
  408. package/dist/core/schema/runtime-schema.js.map +1 -1
  409. package/dist/core/search/semantic-defaults.js +64 -37
  410. package/dist/core/search/semantic-defaults.js.map +1 -1
  411. package/dist/core/search/vector-stores.js +32 -17
  412. package/dist/core/search/vector-stores.js.map +1 -1
  413. package/dist/core/sentry/helpers.js +31 -28
  414. package/dist/core/sentry/helpers.js.map +1 -1
  415. package/dist/core/sentry/instrument.js +54 -43
  416. package/dist/core/sentry/instrument.js.map +1 -1
  417. package/dist/core/store/front-matter-cache.js +239 -153
  418. package/dist/core/store/front-matter-cache.js.map +1 -1
  419. package/dist/core/store/item-store.js +33 -26
  420. package/dist/core/store/item-store.js.map +1 -1
  421. package/dist/core/store/settings.js +247 -203
  422. package/dist/core/store/settings.js.map +1 -1
  423. package/dist/core/test/background-runs.js +189 -160
  424. package/dist/core/test/background-runs.js.map +1 -1
  425. package/dist/mcp/server.js +387 -367
  426. package/dist/mcp/server.js.map +1 -1
  427. package/dist/sdk/cli-contracts/flag-contracts.js +111 -180
  428. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  429. package/dist/sdk/cli-contracts/tool-schema.js +76 -45
  430. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  431. package/dist/sdk/compose.d.ts +4 -1
  432. package/dist/sdk/compose.js +181 -115
  433. package/dist/sdk/compose.js.map +1 -1
  434. package/docs/RELEASING.md +2 -3
  435. package/package.json +2 -2
  436. package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
  437. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
  438. package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
  439. package/dist/cli-bundle/chunks/activity-EJBMXUBH.js +0 -16
  440. package/dist/cli-bundle/chunks/aggregate-MOC4TR2G.js.map +0 -1
  441. package/dist/cli-bundle/chunks/chunk-53ARXF2O.js.map +0 -7
  442. package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +0 -1
  443. package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +0 -7
  444. package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +0 -1
  446. package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +0 -7
  448. package/dist/cli-bundle/chunks/chunk-AWN4PPH5.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-BOWQWXLI.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js +0 -115
  451. package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js.map +0 -1
  452. package/dist/cli-bundle/chunks/chunk-CHRNYKNI.js.map +0 -7
  453. package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +0 -1
  454. package/dist/cli-bundle/chunks/chunk-D5LYZVGB.js.map +0 -1
  455. package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +0 -7
  456. package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +0 -7
  457. package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +0 -7
  458. package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js +0 -118
  459. package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js.map +0 -7
  460. package/dist/cli-bundle/chunks/chunk-FDEVKXC4.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-GF7EAR22.js.map +0 -7
  462. package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-IHXXUIXS.js.map +0 -1
  464. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
  465. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
  466. package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +0 -7
  467. package/dist/cli-bundle/chunks/chunk-JTRKME24.js.map +0 -1
  468. package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +0 -1
  469. package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +0 -1
  470. package/dist/cli-bundle/chunks/chunk-KGQ3W65B.js.map +0 -1
  471. package/dist/cli-bundle/chunks/chunk-KTMMTOIP.js.map +0 -7
  472. package/dist/cli-bundle/chunks/chunk-KYDYQMNW.js.map +0 -7
  473. package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +0 -1
  474. package/dist/cli-bundle/chunks/chunk-NO6Y6FB2.js.map +0 -7
  475. package/dist/cli-bundle/chunks/chunk-QE5UFCCO.js.map +0 -1
  476. package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +0 -7
  477. package/dist/cli-bundle/chunks/chunk-RPRW26NG.js.map +0 -1
  478. package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +0 -7
  479. package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +0 -1
  480. package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +0 -1
  481. package/dist/cli-bundle/chunks/chunk-UFKNF23C.js.map +0 -7
  482. package/dist/cli-bundle/chunks/chunk-V3KLX7U7.js.map +0 -1
  483. package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +0 -1
  484. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
  485. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
  486. package/dist/cli-bundle/chunks/chunk-WTRUDJ3R.js.map +0 -1
  487. package/dist/cli-bundle/chunks/chunk-Z55WX4IQ.js.map +0 -1
  488. package/dist/cli-bundle/chunks/chunk-Z5BM2FKQ.js.map +0 -7
  489. package/dist/cli-bundle/chunks/chunk-ZEATCVAC.js.map +0 -7
  490. package/dist/cli-bundle/chunks/chunk-ZFIEEDTJ.js.map +0 -7
  491. package/dist/cli-bundle/chunks/chunk-ZIE6WXJ2.js.map +0 -1
  492. package/dist/cli-bundle/chunks/close-37KEHLYM.js +0 -14
  493. package/dist/cli-bundle/chunks/close-many-BFMP6HHK.js.map +0 -7
  494. package/dist/cli-bundle/chunks/close-many-CXJBOWWY.js.map +0 -1
  495. package/dist/cli-bundle/chunks/config-FIXJZEQK.js +0 -1541
  496. package/dist/cli-bundle/chunks/config-FIXJZEQK.js.map +0 -7
  497. package/dist/cli-bundle/chunks/config-X3ZVCUUG.js +0 -1531
  498. package/dist/cli-bundle/chunks/config-X3ZVCUUG.js.map +0 -1
  499. package/dist/cli-bundle/chunks/contracts-KP4QAGVW.js.map +0 -1
  500. package/dist/cli-bundle/chunks/contracts-SMOAN5NF.js.map +0 -7
  501. package/dist/cli-bundle/chunks/create-DFMNBKBS.js +0 -28
  502. package/dist/cli-bundle/chunks/get-AWK324RS.js.map +0 -7
  503. package/dist/cli-bundle/chunks/get-VYPIICPC.js.map +0 -1
  504. package/dist/cli-bundle/chunks/health-FBCVZGSX.js.map +0 -7
  505. package/dist/cli-bundle/chunks/health-Q66C43GN.js.map +0 -1
  506. package/dist/cli-bundle/chunks/history-5XUSLAJA.js +0 -18
  507. package/dist/cli-bundle/chunks/history-compact-2GHT32UX.js.map +0 -1
  508. package/dist/cli-bundle/chunks/history-compact-WLCQEKXS.js.map +0 -7
  509. package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +0 -19
  510. package/dist/cli-bundle/chunks/history-repair-FY75IC26.js.map +0 -1
  511. package/dist/cli-bundle/chunks/history-repair-GABSDSVD.js.map +0 -7
  512. package/dist/cli-bundle/chunks/init-TRYJELH4.js +0 -21
  513. package/dist/cli-bundle/chunks/next-66BJB4N2.js.map +0 -7
  514. package/dist/cli-bundle/chunks/next-N5MWJTBY.js.map +0 -1
  515. package/dist/cli-bundle/chunks/plan-DQ7G4EDC.js.map +0 -7
  516. package/dist/cli-bundle/chunks/plan-ZHKZ7JVF.js.map +0 -1
  517. package/dist/cli-bundle/chunks/register-list-query-KY6Z6WV7.js.map +0 -7
  518. package/dist/cli-bundle/chunks/register-list-query-Y2VRHPCL.js.map +0 -1
  519. package/dist/cli-bundle/chunks/register-mutation-N6AYSKPM.js.map +0 -7
  520. package/dist/cli-bundle/chunks/register-mutation-PCARIGZS.js.map +0 -1
  521. package/dist/cli-bundle/chunks/register-operations-L6CYTOIH.js.map +0 -7
  522. package/dist/cli-bundle/chunks/register-operations-YAT6FUUB.js.map +0 -1
  523. package/dist/cli-bundle/chunks/register-setup-MPANILQF.js.map +0 -7
  524. package/dist/cli-bundle/chunks/register-setup-N7UGXYJC.js.map +0 -1
  525. package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +0 -17
  526. package/dist/cli-bundle/chunks/telemetry-DIFPXCAT.js.map +0 -7
  527. package/dist/cli-bundle/chunks/telemetry-WTYFUPRL.js.map +0 -1
  528. package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js +0 -360
  529. package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js.map +0 -7
  530. package/dist/cli-bundle/chunks/test-all-XLPI4USF.js +0 -357
  531. package/dist/cli-bundle/chunks/test-all-XLPI4USF.js.map +0 -1
  532. package/dist/cli-bundle/chunks/test-runs-CA6K32RD.js.map +0 -1
  533. package/dist/cli-bundle/chunks/test-runs-LANLLPVO.js.map +0 -7
  534. package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +0 -24
  535. package/dist/cli-bundle/chunks/validate-2G566PKQ.js.map +0 -7
  536. package/dist/cli-bundle/chunks/validate-BDPVXHHH.js.map +0 -1
  537. /package/dist/cli-bundle/chunks/{activity-MVSEND6D.js.map → activity-CUC4JY3U.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{activity-EJBMXUBH.js.map → activity-WEIEMM73.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{append-KDHT4GHI.js.map → append-H32VOR2Y.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{append-LEDBAM3K.js.map → append-UBM632FK.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js.map → chunk-2ASNV4DH.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js.map → chunk-2CHRYUXL.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-DRPF274X.js.map → chunk-3LCUASYG.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js.map → chunk-3Q2HBMTI.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js.map → chunk-55XRYWEG.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js.map → chunk-A6VOGKBA.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js.map → chunk-AIAIXG7I.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js.map → chunk-BTX5MIQF.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js.map → chunk-CYBDUHNO.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js.map → chunk-CZPVDLD2.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js.map → chunk-EUKTMRN3.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js.map → chunk-FFOQHGNH.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js.map → chunk-GFMSLORL.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js.map → chunk-H4GRLYJS.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js.map → chunk-HQTPRV4D.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js.map → chunk-JMK5GCK2.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js.map → chunk-K2VYLVX4.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js.map → chunk-KCO2EAN5.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js.map → chunk-KLXF7NCC.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js.map → chunk-LRKMWUUV.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js.map → chunk-LTRAF2D7.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js.map → chunk-MRD4T5LF.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js.map → chunk-N2JSWVWG.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js.map → chunk-QH3FSKRJ.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js.map → chunk-S62UANU7.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js.map → chunk-U2BEEM2X.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js.map → chunk-UT73HUPC.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js.map → chunk-UTSH5GWX.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js.map → chunk-Y4NRKBFW.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js.map → chunk-YPKFV2JR.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js.map → chunk-ZNHEYCDD.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js.map → claim-SENTPZBN.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{claim-6NINZYB3.js.map → claim-Z7MEQCBT.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js.map → close-424MX4CU.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{close-37KEHLYM.js.map → close-YCWQQPDS.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{comments-ETHABIY6.js.map → comments-4FGNTSNV.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js.map → comments-7YS5MY5X.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js.map → context-LHVKJSPJ.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{context-XDI4DKKT.js.map → context-ZQY54JNS.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js.map → copy-GYNQQPW2.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js.map → copy-TLW7JTQT.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js.map → create-VSKYSOCD.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{create-DFMNBKBS.js.map → create-XTMAPS7I.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js.map → delete-4W5JYCEG.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js.map → delete-ANTOTI2I.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js.map → deps-HPPE6MJN.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js.map → deps-ZQZN54EZ.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js.map → docs-RPOVFMP3.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{docs-2TIFR62T.js.map → docs-XJNYBJGE.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js.map → eval-DM6JBZTS.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js.map → eval-RFBI5FGS.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js.map → extension-B3YY4WY5.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js.map → extension-TTSEFQTS.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{files-DF3HO6XK.js.map → files-5D65CHGE.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{files-T5ODMETM.js.map → files-GPIG77EN.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js.map → focus-C3PEJV2C.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js.map → focus-ZHN7WIGX.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js.map → gc-D4JQ6OWN.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{gc-FULIVYR4.js.map → gc-VZIXDL32.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{history-5XUSLAJA.js.map → history-DD7L7BNL.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{history-X4OSES6K.js.map → history-IL7XCEX2.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{history-redact-BVHWDXPR.js.map → history-redact-IX4YEWMY.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js.map → history-redact-VYCWQFK7.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js.map → init-F27NHENZ.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{init-TRYJELH4.js.map → init-HHVQQP6C.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js.map → learnings-HJVDQIGY.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js.map → learnings-XSFSUUWK.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js.map → list-HPMEKCAA.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{list-ROT7JF62.js.map → list-VMPWTURB.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{notes-FW6YFLND.js.map → notes-GDZIKGR6.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js.map → notes-WDDBPC4D.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js.map → profile-CCOKZ2IQ.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js.map → profile-HUCENIEQ.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js.map → restore-4CBWUMCX.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{restore-IRAKSWIW.js.map → restore-5UEAGG3W.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js.map → schema-TDGK6N3I.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js.map → schema-UE5KKAUX.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{search-KP6H7COV.js.map → search-FP7MEU4S.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{search-CX5UMV4H.js.map → search-K4CFLQ5S.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js.map → stats-NJJCALEZ.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js.map → stats-XT6QRKQY.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{test-QNDXZQCW.js.map → test-UFSJ5YIO.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{test-HU2BS7EY.js.map → test-YCDAUBWF.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{update-UXDLTEOZ.js.map → update-MTCFES6X.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js.map → update-Y5WQVT5O.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]="83d6617e-974e-5c3a-904a-d8671268dbd1")}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]="5e1251c7-61f3-5c3e-9990-c7f3ea8385cb")}catch(e){}}();
3
3
  import {
4
4
  splitCommaList
5
5
  } from "./chunk-P4SESZGT.js";
@@ -11,25 +11,25 @@ import {
11
11
  invalidateSearchCachesForMutation,
12
12
  normalizeCreateOptions,
13
13
  normalizeUpdateOptions
14
- } from "./chunk-NIBP3I7A.js";
15
- import {
16
- CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
17
- UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS
18
- } from "./chunk-5IRVSKPS.js";
14
+ } from "./chunk-AJEBCRIY.js";
19
15
  import {
20
16
  printError,
21
17
  printResult,
22
18
  writeStdout
23
- } from "./chunk-QE5UFCCO.js";
24
- import "./chunk-D5LYZVGB.js";
25
- import "./chunk-KGQ3W65B.js";
26
- import "./chunk-V3KLX7U7.js";
27
- import "./chunk-KRASIL6M.js";
19
+ } from "./chunk-2KWL5NPW.js";
20
+ import "./chunk-TPOFWBMY.js";
21
+ import {
22
+ CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
23
+ 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";
28
28
  import {
29
29
  BUILTIN_ITEM_TYPE_VALUES,
30
30
  EXIT_CODE,
31
31
  PmCliError
32
- } from "./chunk-CY5IJMUM.js";
32
+ } from "./chunk-I66WE2HE.js";
33
33
 
34
34
  // dist/cli/register-mutation.js
35
35
  import { Option } from "commander";
@@ -397,62 +397,385 @@ function buildUpdateManyListOptions(options) {
397
397
  includeBody: true
398
398
  };
399
399
  }
400
- function registerMutationCommands(program) {
401
- 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.");
402
- registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
403
- 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(async (typeOrTitle, secondTitle, options, command) => {
404
- const globalOptions = getGlobalOptions(command);
405
- const startedAt = Date.now();
406
- let positionalType;
407
- let positionalTitle;
408
- if (typeof secondTitle === "string" && secondTitle.length > 0) {
409
- positionalType = typeOrTitle;
410
- positionalTitle = secondTitle;
411
- } else if (typeof typeOrTitle === "string" && typeOrTitle.length > 0) {
412
- const explicitTitleProvided = typeof options.title === "string" && options.title.trim().length > 0;
413
- if (explicitTitleProvided && options.type === void 0) {
414
- positionalType = typeOrTitle;
415
- } else {
416
- positionalTitle = typeOrTitle;
417
- }
400
+ function pickStringOption(...candidates) {
401
+ for (const candidate of candidates) {
402
+ if (typeof candidate === "string") {
403
+ return candidate;
418
404
  }
419
- if (positionalType === void 0 && typeof positionalTitle === "string" && positionalTitle.length > 0 && options.title === void 0 && options.type === void 0 && BUILTIN_TYPE_NAME_LOOKUP.has(positionalTitle.trim().toLowerCase())) {
420
- const matchedType = positionalTitle.trim();
421
- throw new PmCliError(`pm create needs a title \u2014 "${matchedType}" looks like an item type, not a title. Use either: pm create ${matchedType} "<title>" or pm create "<title>" --type ${matchedType}.`, EXIT_CODE.USAGE, {
422
- code: "create_positional_type_without_title",
423
- why: 'Without this guard the single positional is used as the title and the type defaults to Task \u2014 so the command would silently create a Task literally titled "' + matchedType + '".',
424
- examples: [
425
- `pm create ${matchedType} "Wire up SSO for the agent harness"`,
426
- `pm create "Wire up SSO for the agent harness" --type ${matchedType}`
427
- ],
428
- nextSteps: [
429
- `Re-run with both type and title: pm create ${matchedType} "<title>"`
430
- ]
431
- });
432
- }
433
- if (typeof positionalType === "string" && positionalType.length > 0 && options.type === void 0) {
434
- options.type = positionalType;
435
- }
436
- if (typeof positionalTitle === "string" && positionalTitle.length > 0 && options.title === void 0) {
437
- options.title = positionalTitle;
438
- }
439
- if (typeof options.bodyFile === "string") {
440
- options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
441
- delete options.bodyFile;
405
+ }
406
+ return void 0;
407
+ }
408
+ function readOptionString(options, key) {
409
+ return typeof options[key] === "string" ? options[key] : void 0;
410
+ }
411
+ function stringArrayOption(value) {
412
+ if (Array.isArray(value)) {
413
+ return value;
414
+ }
415
+ if (typeof value === "string") {
416
+ return [value];
417
+ }
418
+ return void 0;
419
+ }
420
+ function resolveCreatePositionals(typeOrTitle, secondTitle, options) {
421
+ if (typeof secondTitle === "string" && secondTitle.length > 0) {
422
+ return { positionalType: typeOrTitle, positionalTitle: secondTitle };
423
+ }
424
+ if (typeof typeOrTitle !== "string" || typeOrTitle.length === 0) {
425
+ return { positionalType: void 0, positionalTitle: void 0 };
426
+ }
427
+ const explicitTitleProvided = typeof options.title === "string" && options.title.trim().length > 0;
428
+ return explicitTitleProvided && options.type === void 0 ? { positionalType: typeOrTitle, positionalTitle: void 0 } : { positionalType: void 0, positionalTitle: typeOrTitle };
429
+ }
430
+ function assertCreatePositionalTypeHasTitle(positionalType, positionalTitle, options) {
431
+ if (positionalType !== void 0 || typeof positionalTitle !== "string" || positionalTitle.length === 0 || options.title !== void 0 || options.type !== void 0 || !BUILTIN_TYPE_NAME_LOOKUP.has(positionalTitle.trim().toLowerCase())) {
432
+ return;
433
+ }
434
+ const matchedType = positionalTitle.trim();
435
+ throw new PmCliError(`pm create needs a title \u2014 "${matchedType}" looks like an item type, not a title. Use either: pm create ${matchedType} "<title>" or pm create "<title>" --type ${matchedType}.`, EXIT_CODE.USAGE, {
436
+ code: "create_positional_type_without_title",
437
+ why: 'Without this guard the single positional is used as the title and the type defaults to Task \u2014 so the command would silently create a Task literally titled "' + matchedType + '".',
438
+ examples: [
439
+ `pm create ${matchedType} "Wire up SSO for the agent harness"`,
440
+ `pm create "Wire up SSO for the agent harness" --type ${matchedType}`
441
+ ],
442
+ nextSteps: [
443
+ `Re-run with both type and title: pm create ${matchedType} "<title>"`
444
+ ]
445
+ });
446
+ }
447
+ async function runCreateAction(typeOrTitle, secondTitle, options, command) {
448
+ const globalOptions = getGlobalOptions(command);
449
+ const startedAt = Date.now();
450
+ const positionals = resolveCreatePositionals(typeOrTitle, secondTitle, options);
451
+ assertCreatePositionalTypeHasTitle(positionals.positionalType, positionals.positionalTitle, options);
452
+ if (typeof positionals.positionalType === "string" && positionals.positionalType.length > 0 && options.type === void 0) {
453
+ options.type = positionals.positionalType;
454
+ }
455
+ if (typeof positionals.positionalTitle === "string" && positionals.positionalTitle.length > 0 && options.title === void 0) {
456
+ options.title = positionals.positionalTitle;
457
+ }
458
+ if (typeof options.bodyFile === "string") {
459
+ options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
460
+ delete options.bodyFile;
461
+ }
462
+ const normalized = normalizeCreateOptions(options, { requireType: false });
463
+ const { runCreate } = await import("./create-VSKYSOCD.js");
464
+ const result = await runCreate(normalized, globalOptions);
465
+ await invalidateSearchCachesForMutation(globalOptions, result);
466
+ printResult(result, globalOptions);
467
+ if (globalOptions.profile) {
468
+ printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
469
+ }
470
+ }
471
+ function buildCloseManyListOptions(options) {
472
+ return {
473
+ type: readOptionString(options, "filterType"),
474
+ tag: readOptionString(options, "filterTag"),
475
+ priority: readOptionString(options, "filterPriority"),
476
+ deadlineBefore: readOptionString(options, "filterDeadlineBefore"),
477
+ deadlineAfter: readOptionString(options, "filterDeadlineAfter"),
478
+ updatedAfter: readOptionString(options, "filterUpdatedAfter"),
479
+ updatedBefore: readOptionString(options, "filterUpdatedBefore"),
480
+ createdAfter: readOptionString(options, "filterCreatedAfter"),
481
+ createdBefore: readOptionString(options, "filterCreatedBefore"),
482
+ ids: readOptionString(options, "ids"),
483
+ assignee: readOptionString(options, "filterAssignee"),
484
+ assigneeFilter: pickStringOption(options.filterAssigneeFilter, options.filterAssignee_filter),
485
+ parent: readOptionString(options, "filterParent"),
486
+ sprint: readOptionString(options, "filterSprint"),
487
+ release: readOptionString(options, "filterRelease"),
488
+ ...mapBulkContentAndGovernanceFilters(options),
489
+ limit: readOptionString(options, "limit"),
490
+ offset: readOptionString(options, "offset")
491
+ };
492
+ }
493
+ async function runCloseManyAction(options, command) {
494
+ const globalOptions = getGlobalOptions(command);
495
+ const startedAt = Date.now();
496
+ const { runCloseMany } = await import("./close-many-2IV4J2TR.js");
497
+ const result = await runCloseMany({
498
+ status: readOptionString(options, "filterStatus"),
499
+ list: buildCloseManyListOptions(options),
500
+ reason: readOptionString(options, "reason"),
501
+ resolution: readOptionString(options, "resolution"),
502
+ expectedResult: pickStringOption(options.expectedResult, options.expected_result, options.expected),
503
+ actualResult: pickStringOption(options.actualResult, options.actual_result, options.actual),
504
+ validateClose: options.validateClose === true ? "warn" : readOptionString(options, "validateClose"),
505
+ author: readOptionString(options, "author"),
506
+ message: readOptionString(options, "message"),
507
+ force: Boolean(options.force),
508
+ dryRun: options.dryRun === true ? true : void 0,
509
+ rollback: readOptionString(options, "rollback"),
510
+ checkpoint: options.checkpoint === false ? false : void 0
511
+ }, globalOptions);
512
+ await invalidateSearchCachesForMutation(globalOptions, result);
513
+ printResult(result, globalOptions);
514
+ if (globalOptions.profile) {
515
+ printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
516
+ }
517
+ }
518
+ function normalizePlanAliases(options) {
519
+ const planOptions = { ...options };
520
+ const aliasPairs = [
521
+ ["blocked_by", "blockedBy"],
522
+ ["resume_context", "resumeContext"],
523
+ ["from_search", "fromSearch"],
524
+ ["step_title", "stepTitle"],
525
+ ["step_body", "stepBody"],
526
+ ["step_owner", "stepOwner"],
527
+ ["step_status", "stepStatus"],
528
+ ["step_evidence", "stepEvidence"],
529
+ ["step_blocked_reason", "stepBlockedReason"],
530
+ ["step_replacement", "stepReplacement"],
531
+ ["depends_on", "dependsOn"],
532
+ ["link_kind", "linkKind"],
533
+ ["link_note", "linkNote"],
534
+ ["promote_to_item_dep", "promoteToItemDep"],
535
+ ["allow_multiple_active", "allowMultipleActive"],
536
+ ["decision_text", "decisionText"],
537
+ ["decision_rationale", "decisionRationale"],
538
+ ["decision_evidence", "decisionEvidence"],
539
+ ["discovery_text", "discoveryText"],
540
+ ["validation_text", "validationText"],
541
+ ["validation_command", "validationCommand"],
542
+ ["validation_expected", "validationExpected"],
543
+ ["materialize_type", "materializeType"],
544
+ ["materialize_parent", "materializeParent"],
545
+ ["materialize_tags", "materializeTags"]
546
+ ];
547
+ for (const [snake, camel] of aliasPairs) {
548
+ if (planOptions[snake] !== void 0 && planOptions[camel] === void 0) {
549
+ planOptions[camel] = planOptions[snake];
442
550
  }
443
- const normalized = normalizeCreateOptions(options, { requireType: false });
444
- const { runCreate } = await import("./create-J5Q2ELZT.js");
445
- const result = await runCreate(normalized, globalOptions);
446
- await invalidateSearchCachesForMutation(globalOptions, result);
551
+ }
552
+ return planOptions;
553
+ }
554
+ function assertKnownPlanSubcommand(subcommand, normalized, allowed) {
555
+ if (!normalized) {
556
+ throw new PmCliError(`pm plan requires a subcommand. Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, {
557
+ code: "missing_required_argument",
558
+ examples: [
559
+ 'pm plan create --title "Refactor lock retry"',
560
+ "pm plan show pm-a1b2 --depth standard",
561
+ 'pm plan add-step pm-a1b2 --step-title "Read lock.ts"'
562
+ ]
563
+ });
564
+ }
565
+ if (allowed.includes(normalized)) {
566
+ return;
567
+ }
568
+ const examples = normalized === "list" || normalized === "ls" ? ["pm list --type Plan", "pm list-all --type Plan"] : void 0;
569
+ throw new PmCliError(`Unknown pm plan subcommand "${subcommand}". Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, examples ? { code: "unknown_subcommand", examples } : void 0);
570
+ }
571
+ function parsePlanReorderTo(normalizedSubcommand, reorderToken) {
572
+ if (normalizedSubcommand !== "reorder-step" || typeof reorderToken !== "string") {
573
+ return void 0;
574
+ }
575
+ const parsed = Number.parseInt(reorderToken, 10);
576
+ if (!Number.isFinite(parsed)) {
577
+ throw new PmCliError(`reorder-step requires an integer new order, got "${reorderToken}"`, EXIT_CODE.USAGE);
578
+ }
579
+ return parsed;
580
+ }
581
+ async function runPlanAction(subcommand, id, stepRef, reorderToken, options, command) {
582
+ const globalOptions = getGlobalOptions(command);
583
+ const startedAt = Date.now();
584
+ const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-BGDR73Z6.js");
585
+ const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
586
+ assertKnownPlanSubcommand(subcommand, normalizedSubcommand, PLAN_SUBCOMMANDS);
587
+ const planOptions = normalizePlanAliases(options);
588
+ const reorderTo = parsePlanReorderTo(normalizedSubcommand, reorderToken);
589
+ const planId = normalizedSubcommand === "create" && typeof id === "string" && id.length > 0 && planOptions.title === void 0 ? void 0 : id;
590
+ if (planId === void 0 && typeof id === "string" && id.length > 0) {
591
+ planOptions.title = id;
592
+ }
593
+ const result = await runPlan({
594
+ subcommand: normalizedSubcommand,
595
+ id: planId,
596
+ stepRef,
597
+ reorderTo,
598
+ options: planOptions,
599
+ global: globalOptions
600
+ });
601
+ await invalidateSearchCachesForMutation(globalOptions, result);
602
+ printResult(result, globalOptions);
603
+ if (globalOptions.profile) {
604
+ printError(`profile:command=plan took_ms=${Date.now() - startedAt}`);
605
+ }
606
+ }
607
+ function parseNonNegativeIntFlag(raw, flag) {
608
+ if (typeof raw !== "string") {
609
+ return void 0;
610
+ }
611
+ if (!/^\d+$/.test(raw.trim())) {
612
+ throw new PmCliError(`history-compact ${flag} must be a non-negative integer.`, EXIT_CODE.USAGE);
613
+ }
614
+ return Number.parseInt(raw, 10);
615
+ }
616
+ async function runHistoryCompactAction(id, options, command) {
617
+ const globalOptions = getGlobalOptions(command);
618
+ const startedAt = Date.now();
619
+ const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-HALOTOU7.js");
620
+ const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
621
+ const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
622
+ const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
623
+ if (options.closed === true && options.allStreams === true) {
624
+ throw new PmCliError("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.", EXIT_CODE.USAGE);
625
+ }
626
+ const scope = options.closed === true ? "closed" : options.allStreams === true ? "all-streams" : void 0;
627
+ const isBulk = ids !== void 0 || allOver !== void 0 || scope !== void 0;
628
+ if (isBulk && typeof options.before === "string") {
629
+ throw new PmCliError("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).", EXIT_CODE.USAGE);
630
+ }
631
+ assertHistoryCompactTarget(id, { ids, allOver, scope });
632
+ if (id === void 0) {
633
+ const result = await runHistoryCompactBulk({
634
+ ids,
635
+ scope,
636
+ allOver,
637
+ minEntries,
638
+ dryRun: options.dryRun === true,
639
+ author: readOptionString(options, "author"),
640
+ message: readOptionString(options, "message"),
641
+ force: Boolean(options.force)
642
+ }, globalOptions);
447
643
  printResult(result, globalOptions);
448
- if (globalOptions.profile) {
449
- printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
644
+ if (result.totals.items_errored > 0) {
645
+ process.exitCode = EXIT_CODE.GENERIC_FAILURE;
450
646
  }
647
+ } else {
648
+ const result = await runHistoryCompact(id, {
649
+ before: readOptionString(options, "before"),
650
+ dryRun: options.dryRun === true,
651
+ author: readOptionString(options, "author"),
652
+ message: readOptionString(options, "message"),
653
+ force: Boolean(options.force)
654
+ }, globalOptions);
655
+ printResult(result, globalOptions);
656
+ }
657
+ if (globalOptions.profile) {
658
+ printError(`profile:command=history-compact took_ms=${Date.now() - startedAt}`);
659
+ }
660
+ }
661
+ function splitCollectedCommaList(raw) {
662
+ if (!Array.isArray(raw)) {
663
+ return void 0;
664
+ }
665
+ return raw.flatMap((value) => value.split(",")).map((value) => value.trim()).filter((value) => value.length > 0);
666
+ }
667
+ async function runSchemaAction(subcommand, name, options, command) {
668
+ const globalOptions = getGlobalOptions(command);
669
+ const startedAt = Date.now();
670
+ const schemaModule = await import("./schema-TDGK6N3I.js");
671
+ const { SCHEMA_SUBCOMMANDS } = schemaModule;
672
+ let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
673
+ let typeName = name;
674
+ assertSchemaSubcommandPresent(normalizedSubcommand, SCHEMA_SUBCOMMANDS);
675
+ if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) && typeName === void 0 && !looksLikeSchemaSubcommandTypo(normalizedSubcommand)) {
676
+ typeName = subcommand;
677
+ normalizedSubcommand = "add-type";
678
+ }
679
+ if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand)) {
680
+ throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
681
+ }
682
+ const result = await dispatchSchemaSubcommand(schemaModule, {
683
+ normalizedSubcommand,
684
+ typeName,
685
+ options,
686
+ aliases: stringArrayOption(options.alias),
687
+ roles: stringArrayOption(options.role),
688
+ commands: splitCollectedCommaList(options.commands),
689
+ requiredTypes: splitCollectedCommaList(options.requiredTypes),
690
+ defaultStatus: pickStringOption(options.defaultStatus, options.default_status),
691
+ order: parseSchemaOrderOption(options.order),
692
+ minCount: parseSchemaOrderOption(options.minCount),
693
+ author: readOptionString(options, "author"),
694
+ force: Boolean(options.force),
695
+ description: readOptionString(options, "description"),
696
+ globalOptions
451
697
  });
698
+ if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
699
+ printResult(result, globalOptions);
700
+ } else if (!globalOptions.quiet) {
701
+ renderSchemaResultHuman(schemaModule, result);
702
+ }
703
+ if (globalOptions.profile) {
704
+ printError(`profile:command=schema took_ms=${Date.now() - startedAt}`);
705
+ }
706
+ }
707
+ function assertSchemaSubcommandPresent(normalizedSubcommand, allowed) {
708
+ if (normalizedSubcommand) {
709
+ return;
710
+ }
711
+ throw new PmCliError(`pm schema requires a subcommand. Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, {
712
+ code: "missing_required_argument",
713
+ examples: [
714
+ "pm schema list",
715
+ "pm schema show Task",
716
+ "pm schema show-status open",
717
+ 'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',
718
+ "pm schema remove-type Spike",
719
+ "pm schema add-status review --role active --alias in_review",
720
+ "pm schema remove-status review",
721
+ "pm schema add-field severity_level --type string --commands create,update",
722
+ "pm schema list-fields",
723
+ "pm schema apply-preset agile",
724
+ "pm schema add-type --infer --min-count 10"
725
+ ]
726
+ });
727
+ }
728
+ function resolveCommentSources(text, options) {
729
+ const editIndex = typeof options.edit === "number" ? options.edit : void 0;
730
+ const deleteIndex = typeof options.delete === "number" ? options.delete : void 0;
731
+ const addFromOption = readOptionString(options, "add");
732
+ const addFromPositional = typeof text === "string" ? text : void 0;
733
+ const readFromStdin = options.stdin === true;
734
+ const readFromFile = readOptionString(options, "file");
735
+ const sourceCount = Number(addFromOption !== void 0) + Number(addFromPositional !== void 0) + Number(readFromStdin) + Number(readFromFile !== void 0);
736
+ if (sourceCount > 1) {
737
+ if (addFromOption !== void 0 && addFromPositional !== void 0 && !readFromStdin && readFromFile === void 0) {
738
+ throw new PmCliError("Specify comment text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
739
+ }
740
+ throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
741
+ }
742
+ const add = addFromOption ?? addFromPositional;
743
+ const isMutation = typeof add === "string" || readFromStdin || readFromFile !== void 0 || editIndex !== void 0 || deleteIndex !== void 0;
744
+ return { add, readFromStdin, readFromFile, editIndex, deleteIndex, isMutation };
745
+ }
746
+ async function runCommentsAction(id, text, options, command) {
747
+ const globalOptions = getGlobalOptions(command);
748
+ const startedAt = Date.now();
749
+ const sources = resolveCommentSources(text, options);
750
+ const { runComments } = await import("./comments-7YS5MY5X.js");
751
+ const result = await runComments(id, {
752
+ add: sources.add,
753
+ stdin: sources.readFromStdin,
754
+ file: sources.readFromFile,
755
+ edit: sources.editIndex,
756
+ delete: sources.deleteIndex,
757
+ limit: readOptionString(options, "limit"),
758
+ author: readOptionString(options, "author"),
759
+ message: readOptionString(options, "message"),
760
+ allowAuditComment: Boolean(options.allowAuditComment),
761
+ force: Boolean(options.force)
762
+ }, globalOptions);
763
+ if (sources.isMutation) {
764
+ await invalidateSearchCachesForMutation(globalOptions, result);
765
+ }
766
+ printResult(result, globalOptions);
767
+ if (globalOptions.profile) {
768
+ printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
769
+ }
770
+ }
771
+ function registerMutationCommands(program) {
772
+ 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
+ registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
774
+ 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);
452
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) => {
453
776
  const globalOptions = getGlobalOptions(command);
454
777
  const startedAt = Date.now();
455
- const { runCopy } = await import("./copy-JJ3KOQW2.js");
778
+ const { runCopy } = await import("./copy-GYNQQPW2.js");
456
779
  const result = await runCopy(id, {
457
780
  title: typeof options.title === "string" ? options.title : void 0,
458
781
  author: typeof options.author === "string" ? options.author : void 0,
@@ -467,7 +790,7 @@ function registerMutationCommands(program) {
467
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) => {
468
791
  const globalOptions = getGlobalOptions(command);
469
792
  const startedAt = Date.now();
470
- const { runFocus } = await import("./focus-DLXKK4AH.js");
793
+ const { runFocus } = await import("./focus-ZHN7WIGX.js");
471
794
  const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
472
795
  printResult(result, globalOptions);
473
796
  if (globalOptions.profile) {
@@ -486,7 +809,7 @@ function registerMutationCommands(program) {
486
809
  options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
487
810
  delete options.bodyFile;
488
811
  }
489
- const { runUpdate } = await import("./update-DJKWLBWJ.js");
812
+ const { runUpdate } = await import("./update-Y5WQVT5O.js");
490
813
  const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
491
814
  await invalidateSearchCachesForMutation(globalOptions, result);
492
815
  printResult(result, globalOptions);
@@ -529,7 +852,7 @@ function registerMutationCommands(program) {
529
852
  updateManyCommand.action(async (options, command) => {
530
853
  const globalOptions = getGlobalOptions(command);
531
854
  const startedAt = Date.now();
532
- const { runUpdateMany } = await import("./update-many-VW5DGF3S.js");
855
+ const { runUpdateMany } = await import("./update-many-JTKKSA7Y.js");
533
856
  const result = await runUpdateMany({
534
857
  status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
535
858
  list: buildUpdateManyListOptions(options),
@@ -550,7 +873,7 @@ function registerMutationCommands(program) {
550
873
  closeCommand.action(async (id, text, options, command) => {
551
874
  const globalOptions = getGlobalOptions(command);
552
875
  const startedAt = Date.now();
553
- const { runClose } = await import("./close-OP3LK7Z2.js");
876
+ const { runClose } = await import("./close-424MX4CU.js");
554
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;
555
878
  const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
556
879
  const pickInlineString = (...candidates) => {
@@ -583,62 +906,11 @@ function registerMutationCommands(program) {
583
906
  addHiddenOption(closeManyCommand, "--filter-assignee_filter <value>", "Alias for --filter-assignee-filter", false);
584
907
  addHiddenOption(closeManyCommand, "--expected_result <value>", "Alias for --expected-result", false);
585
908
  addHiddenOption(closeManyCommand, "--actual_result <value>", "Alias for --actual-result", false);
586
- closeManyCommand.action(async (options, command) => {
587
- const globalOptions = getGlobalOptions(command);
588
- const startedAt = Date.now();
589
- const pickString = (...candidates) => {
590
- for (const candidate of candidates) {
591
- if (typeof candidate === "string") {
592
- return candidate;
593
- }
594
- }
595
- return void 0;
596
- };
597
- const { runCloseMany } = await import("./close-many-CXJBOWWY.js");
598
- const result = await runCloseMany({
599
- status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
600
- list: {
601
- type: typeof options.filterType === "string" ? options.filterType : void 0,
602
- tag: typeof options.filterTag === "string" ? options.filterTag : void 0,
603
- priority: typeof options.filterPriority === "string" ? options.filterPriority : void 0,
604
- deadlineBefore: typeof options.filterDeadlineBefore === "string" ? options.filterDeadlineBefore : void 0,
605
- deadlineAfter: typeof options.filterDeadlineAfter === "string" ? options.filterDeadlineAfter : void 0,
606
- updatedAfter: typeof options.filterUpdatedAfter === "string" ? options.filterUpdatedAfter : void 0,
607
- updatedBefore: typeof options.filterUpdatedBefore === "string" ? options.filterUpdatedBefore : void 0,
608
- createdAfter: typeof options.filterCreatedAfter === "string" ? options.filterCreatedAfter : void 0,
609
- createdBefore: typeof options.filterCreatedBefore === "string" ? options.filterCreatedBefore : void 0,
610
- ids: typeof options.ids === "string" ? options.ids : void 0,
611
- assignee: typeof options.filterAssignee === "string" ? options.filterAssignee : void 0,
612
- assigneeFilter: pickString(options.filterAssigneeFilter, options.filterAssignee_filter),
613
- parent: typeof options.filterParent === "string" ? options.filterParent : void 0,
614
- sprint: typeof options.filterSprint === "string" ? options.filterSprint : void 0,
615
- release: typeof options.filterRelease === "string" ? options.filterRelease : void 0,
616
- ...mapBulkContentAndGovernanceFilters(options),
617
- limit: typeof options.limit === "string" ? options.limit : void 0,
618
- offset: typeof options.offset === "string" ? options.offset : void 0
619
- },
620
- reason: typeof options.reason === "string" ? options.reason : void 0,
621
- resolution: typeof options.resolution === "string" ? options.resolution : void 0,
622
- expectedResult: pickString(options.expectedResult, options.expected_result, options.expected),
623
- actualResult: pickString(options.actualResult, options.actual_result, options.actual),
624
- validateClose: options.validateClose === true ? "warn" : typeof options.validateClose === "string" ? options.validateClose : void 0,
625
- author: typeof options.author === "string" ? options.author : void 0,
626
- message: typeof options.message === "string" ? options.message : void 0,
627
- force: Boolean(options.force),
628
- dryRun: options.dryRun === true ? true : void 0,
629
- rollback: typeof options.rollback === "string" ? options.rollback : void 0,
630
- checkpoint: options.checkpoint === false ? false : void 0
631
- }, globalOptions);
632
- await invalidateSearchCachesForMutation(globalOptions, result);
633
- printResult(result, globalOptions);
634
- if (globalOptions.profile) {
635
- printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
636
- }
637
- });
909
+ closeManyCommand.action(runCloseManyAction);
638
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) => {
639
911
  const globalOptions = getGlobalOptions(command);
640
912
  const startedAt = Date.now();
641
- const { runDelete } = await import("./delete-2GZLQEUQ.js");
913
+ const { runDelete } = await import("./delete-4W5JYCEG.js");
642
914
  const result = await runDelete(id, {
643
915
  author: typeof options.author === "string" ? options.author : void 0,
644
916
  message: typeof options.message === "string" ? options.message : void 0,
@@ -667,7 +939,7 @@ function registerMutationCommands(program) {
667
939
  if (resolvedBody === void 0) {
668
940
  throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
669
941
  }
670
- const { runAppend } = await import("./append-KDHT4GHI.js");
942
+ const { runAppend } = await import("./append-H32VOR2Y.js");
671
943
  const result = await runAppend(id, {
672
944
  body: resolvedBody,
673
945
  author: typeof options.author === "string" ? options.author : void 0,
@@ -683,7 +955,7 @@ function registerMutationCommands(program) {
683
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) => {
684
956
  const globalOptions = getGlobalOptions(command);
685
957
  const startedAt = Date.now();
686
- const { runRestore } = await import("./restore-DKMCLPI5.js");
958
+ const { runRestore } = await import("./restore-4CBWUMCX.js");
687
959
  const result = await runRestore(id, target, {
688
960
  author: typeof options.author === "string" ? options.author : void 0,
689
961
  message: typeof options.message === "string" ? options.message : void 0,
@@ -729,94 +1001,12 @@ function registerMutationCommands(program) {
729
1001
  ]) {
730
1002
  addHiddenOption(planCommand, flags, description, true);
731
1003
  }
732
- planCommand.action(async (subcommand, id, stepRef, reorderToken, options, command) => {
733
- const globalOptions = getGlobalOptions(command);
734
- const startedAt = Date.now();
735
- const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-ZHKZ7JVF.js");
736
- const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
737
- if (!normalizedSubcommand) {
738
- throw new PmCliError(`pm plan requires a subcommand. Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
739
- code: "missing_required_argument",
740
- examples: [
741
- 'pm plan create --title "Refactor lock retry"',
742
- "pm plan show pm-a1b2 --depth standard",
743
- 'pm plan add-step pm-a1b2 --step-title "Read lock.ts"'
744
- ]
745
- });
746
- }
747
- if (!PLAN_SUBCOMMANDS.includes(normalizedSubcommand)) {
748
- const didYouMean = normalizedSubcommand === "list" || normalizedSubcommand === "ls" ? ["pm list --type Plan", "pm list-all --type Plan"] : void 0;
749
- throw new PmCliError(`Unknown pm plan subcommand "${subcommand}". Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, didYouMean ? { code: "unknown_subcommand", examples: didYouMean } : void 0);
750
- }
751
- const planOptions = { ...options };
752
- const aliasPairs = [
753
- ["blocked_by", "blockedBy"],
754
- ["resume_context", "resumeContext"],
755
- ["from_search", "fromSearch"],
756
- // pm-6mit: "step" is no longer folded into stepTitle here — it is a
757
- // first-class repeatable option normalized inside runPlan (create
758
- // accumulates ordered steps; other subcommands accept a single value
759
- // as a stepTitle alias).
760
- ["step_title", "stepTitle"],
761
- ["step_body", "stepBody"],
762
- ["step_owner", "stepOwner"],
763
- ["step_status", "stepStatus"],
764
- ["step_evidence", "stepEvidence"],
765
- ["step_blocked_reason", "stepBlockedReason"],
766
- ["step_replacement", "stepReplacement"],
767
- ["depends_on", "dependsOn"],
768
- ["link_kind", "linkKind"],
769
- ["link_note", "linkNote"],
770
- ["promote_to_item_dep", "promoteToItemDep"],
771
- ["allow_multiple_active", "allowMultipleActive"],
772
- ["decision_text", "decisionText"],
773
- ["decision_rationale", "decisionRationale"],
774
- ["decision_evidence", "decisionEvidence"],
775
- ["discovery_text", "discoveryText"],
776
- ["validation_text", "validationText"],
777
- ["validation_command", "validationCommand"],
778
- ["validation_expected", "validationExpected"],
779
- ["materialize_type", "materializeType"],
780
- ["materialize_parent", "materializeParent"],
781
- ["materialize_tags", "materializeTags"]
782
- ];
783
- for (const [snake, camel] of aliasPairs) {
784
- if (planOptions[snake] !== void 0 && planOptions[camel] === void 0) {
785
- planOptions[camel] = planOptions[snake];
786
- }
787
- }
788
- let reorderTo;
789
- if (normalizedSubcommand === "reorder-step" && typeof reorderToken === "string") {
790
- const parsed = Number.parseInt(reorderToken, 10);
791
- if (!Number.isFinite(parsed)) {
792
- throw new PmCliError(`reorder-step requires an integer new order, got "${reorderToken}"`, EXIT_CODE.USAGE);
793
- }
794
- reorderTo = parsed;
795
- }
796
- let planId = id;
797
- if (normalizedSubcommand === "create" && typeof id === "string" && id.length > 0 && planOptions.title === void 0) {
798
- planOptions.title = id;
799
- planId = void 0;
800
- }
801
- const result = await runPlan({
802
- subcommand: normalizedSubcommand,
803
- id: planId,
804
- stepRef,
805
- reorderTo,
806
- options: planOptions,
807
- global: globalOptions
808
- });
809
- await invalidateSearchCachesForMutation(globalOptions, result);
810
- printResult(result, globalOptions);
811
- if (globalOptions.profile) {
812
- printError(`profile:command=plan took_ms=${Date.now() - startedAt}`);
813
- }
814
- });
1004
+ planCommand.action(runPlanAction);
815
1005
  void planCommand;
816
1006
  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) => {
817
1007
  const globalOptions = getGlobalOptions(command);
818
1008
  const startedAt = Date.now();
819
- const { runHistoryRedact } = await import("./history-redact-45YW65BK.js");
1009
+ const { runHistoryRedact } = await import("./history-redact-VYCWQFK7.js");
820
1010
  const literal = Array.isArray(options.literal) ? options.literal : void 0;
821
1011
  const regex = Array.isArray(options.regex) ? options.regex : void 0;
822
1012
  const result = await runHistoryRedact(id, {
@@ -839,7 +1029,7 @@ function registerMutationCommands(program) {
839
1029
  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) => {
840
1030
  const globalOptions = getGlobalOptions(command);
841
1031
  const startedAt = Date.now();
842
- const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-FY75IC26.js");
1032
+ const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-44MODPQF.js");
843
1033
  const all = options.all === true;
844
1034
  assertHistoryRepairTarget(id, all);
845
1035
  const repairOptions = {
@@ -862,146 +1052,15 @@ function registerMutationCommands(program) {
862
1052
  printError(`profile:command=history-repair took_ms=${Date.now() - startedAt}`);
863
1053
  }
864
1054
  });
865
- program.command("history-compact").argument("[id]", "Item id (omit when using a bulk selector)").option("--before <value>", "Compact entries strictly before this version number or ISO timestamp (single-id mode only)").option("--ids <value>", "Bulk: compact an explicit comma-separated list of item ids").option("--all-over <n>", "Bulk: compact every stream with more than N entries").option("--closed", "Bulk: compact only closed (terminal) items' streams").option("--all-streams", "Bulk: compact every history stream regardless of lifecycle state").option("--min-entries <n>", "Bulk: skip streams with at most N entries (already compact; default 3)").option("--dry-run", "Preview compaction impact without writing the history file").option("--author <value>", "Mutation author").option("--message <value>", "Audit history message for the compaction marker entry").option("--force", "Force ownership/lock override").description("Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.").action(async (id, options, command) => {
866
- const globalOptions = getGlobalOptions(command);
867
- const startedAt = Date.now();
868
- const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-2GHT32UX.js");
869
- const parseNonNegativeIntFlag = (raw, flag) => {
870
- if (typeof raw !== "string") {
871
- return void 0;
872
- }
873
- if (!/^\d+$/.test(raw.trim())) {
874
- throw new PmCliError(`history-compact ${flag} must be a non-negative integer.`, EXIT_CODE.USAGE);
875
- }
876
- return Number.parseInt(raw, 10);
877
- };
878
- const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
879
- const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
880
- const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
881
- if (options.closed === true && options.allStreams === true) {
882
- throw new PmCliError("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.", EXIT_CODE.USAGE);
883
- }
884
- const scope = options.closed === true ? "closed" : options.allStreams === true ? "all-streams" : void 0;
885
- const isBulk = ids !== void 0 || allOver !== void 0 || scope !== void 0;
886
- if (isBulk && typeof options.before === "string") {
887
- throw new PmCliError("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).", EXIT_CODE.USAGE);
888
- }
889
- assertHistoryCompactTarget(id, { ids, allOver, scope });
890
- if (id === void 0) {
891
- const result = await runHistoryCompactBulk({
892
- ids,
893
- scope,
894
- allOver,
895
- minEntries,
896
- dryRun: options.dryRun === true,
897
- author: typeof options.author === "string" ? options.author : void 0,
898
- message: typeof options.message === "string" ? options.message : void 0,
899
- force: Boolean(options.force)
900
- }, globalOptions);
901
- printResult(result, globalOptions);
902
- if (result.totals.items_errored > 0) {
903
- process.exitCode = EXIT_CODE.GENERIC_FAILURE;
904
- }
905
- } else {
906
- const result = await runHistoryCompact(id, {
907
- before: typeof options.before === "string" ? options.before : void 0,
908
- dryRun: options.dryRun === true,
909
- author: typeof options.author === "string" ? options.author : void 0,
910
- message: typeof options.message === "string" ? options.message : void 0,
911
- force: Boolean(options.force)
912
- }, globalOptions);
913
- printResult(result, globalOptions);
914
- }
915
- if (globalOptions.profile) {
916
- printError(`profile:command=history-compact took_ms=${Date.now() - startedAt}`);
917
- }
918
- });
1055
+ program.command("history-compact").argument("[id]", "Item id (omit when using a bulk selector)").option("--before <value>", "Compact entries strictly before this version number or ISO timestamp (single-id mode only)").option("--ids <value>", "Bulk: compact an explicit comma-separated list of item ids").option("--all-over <n>", "Bulk: compact every stream with more than N entries").option("--closed", "Bulk: compact only closed (terminal) items' streams").option("--all-streams", "Bulk: compact every history stream regardless of lifecycle state").option("--min-entries <n>", "Bulk: skip streams with at most N entries (already compact; default 3)").option("--dry-run", "Preview compaction impact without writing the history file").option("--author <value>", "Mutation author").option("--message <value>", "Audit history message for the compaction marker entry").option("--force", "Force ownership/lock override").description("Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.").action(runHistoryCompactAction);
919
1056
  const schemaCommand = program.command("schema").argument("[subcommand]", "Schema subcommand: list, show, show-status, add-type, remove-type, add-status, remove-status, or a custom item type name shorthand").argument("[name]", "Item type name (add-type/remove-type/show) or status id (show-status/add-status/remove-status)").option("--description <text>", "Human description for the custom item type, status, or field").option("--default-status <status>", "Default status hint recorded for the custom item type").option("--folder <dir>", "Storage folder for items of this custom type").option("--alias <name>", "Alias for the custom type, status, or field flag (repeatable, csv-friendly)", collect).option("--role <value>", "Lifecycle role for a custom status (repeatable): draft, active, blocked, terminal, terminal_done, terminal_canceled, default_open, default_close, default_cancel", collect).option("--order <n>", "Display/sort order for a custom status").option("--type <type>", "Value type for a custom field (add-field): string, number, boolean, string_array").option("--commands <list>", "Commands a custom field is wired onto (add-field; repeatable, comma-friendly): create, update, update_many, list, search, calendar, context", collect).option("--cli-flag <flag>", "Override the auto-derived CLI flag for a custom field (add-field)").option("--required", "Mark a custom field as always required (add-field)").option("--required-on-create", "Mark a custom field as required at create time (add-field)").option("--no-allow-unset", "Disallow clearing a custom field via --unset (add-field)").option("--required-types <list>", "Restrict a custom field's requirement to specific item types (add-field; repeatable, comma-friendly)", collect).option("--infer", "Infer custom item types from title-prefix conventions (add-type; preview unless --apply)").option("--min-count <n>", "Minimum items sharing a prefix for add-type --infer (default 10)").option("--apply", "Register inferred types (add-type --infer); without it the command previews only").option("--author <value>", "Mutation author").option("--force", "Force ownership/lock override").description("Inspect and manage config-driven runtime schema (types, statuses, fields, presets).");
920
1057
  addHiddenOption(schemaCommand, "--default_status <status>", "Alias for --default-status", false);
921
- schemaCommand.action(async (subcommand, name, options, command) => {
922
- const globalOptions = getGlobalOptions(command);
923
- const startedAt = Date.now();
924
- const schemaModule = await import("./schema-OLT6LVKH.js");
925
- const { SCHEMA_SUBCOMMANDS } = schemaModule;
926
- let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
927
- let typeName = name;
928
- if (!normalizedSubcommand) {
929
- throw new PmCliError(`pm schema requires a subcommand. Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
930
- code: "missing_required_argument",
931
- examples: [
932
- "pm schema list",
933
- "pm schema show Task",
934
- "pm schema show-status open",
935
- 'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',
936
- "pm schema remove-type Spike",
937
- "pm schema add-status review --role active --alias in_review",
938
- "pm schema remove-status review",
939
- "pm schema add-field severity_level --type string --commands create,update",
940
- "pm schema list-fields",
941
- "pm schema apply-preset agile",
942
- "pm schema add-type --infer --min-count 10"
943
- ]
944
- });
945
- }
946
- const aliases = (
947
- /* c8 ignore next -- --alias is registered with commander `collect`, so it is always an array here; the string arm is a defensive guard for non-CLI (programmatic) callers */
948
- typeof options.alias === "string" ? [options.alias] : Array.isArray(options.alias) ? options.alias : void 0
949
- );
950
- const roles = (
951
- /* c8 ignore next -- --role is registered with commander `collect`, so it is always an array here; the string arm is a defensive guard for non-CLI (programmatic) callers */
952
- typeof options.role === "string" ? [options.role] : Array.isArray(options.role) ? options.role : void 0
953
- );
954
- const defaultStatus = typeof options.defaultStatus === "string" ? options.defaultStatus : typeof options.default_status === "string" ? options.default_status : void 0;
955
- const order = parseSchemaOrderOption(options.order);
956
- const splitCollectedCommaList = (raw) => {
957
- if (!Array.isArray(raw)) {
958
- return void 0;
959
- }
960
- return raw.flatMap((value) => value.split(",")).map((value) => value.trim()).filter((value) => value.length > 0);
961
- };
962
- const commands = splitCollectedCommaList(options.commands);
963
- const requiredTypes = splitCollectedCommaList(options.requiredTypes);
964
- const minCount = parseSchemaOrderOption(options.minCount);
965
- if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) && typeName === void 0 && !looksLikeSchemaSubcommandTypo(normalizedSubcommand)) {
966
- typeName = subcommand;
967
- normalizedSubcommand = "add-type";
968
- }
969
- if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand)) {
970
- throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
971
- }
972
- const author = typeof options.author === "string" ? options.author : void 0;
973
- const force = Boolean(options.force);
974
- const description = typeof options.description === "string" ? options.description : void 0;
975
- const result = await dispatchSchemaSubcommand(schemaModule, {
976
- normalizedSubcommand,
977
- typeName,
978
- options,
979
- aliases,
980
- roles,
981
- commands,
982
- requiredTypes,
983
- defaultStatus,
984
- order,
985
- minCount,
986
- author,
987
- force,
988
- description,
989
- globalOptions
990
- });
991
- if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
992
- printResult(result, globalOptions);
993
- } else if (!globalOptions.quiet) {
994
- renderSchemaResultHuman(schemaModule, result);
995
- }
996
- if (globalOptions.profile) {
997
- printError(`profile:command=schema took_ms=${Date.now() - startedAt}`);
998
- }
999
- });
1058
+ schemaCommand.action(runSchemaAction);
1000
1059
  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.");
1001
1060
  profileCommand.action(async (subcommand, name, options, command) => {
1002
1061
  const globalOptions = getGlobalOptions(command);
1003
1062
  const startedAt = Date.now();
1004
- const profileModule = await import("./profile-CHAW6SEA.js");
1063
+ const profileModule = await import("./profile-CCOKZ2IQ.js");
1005
1064
  const { PROFILE_SUBCOMMANDS } = profileModule;
1006
1065
  const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
1007
1066
  if (!normalizedSubcommand) {
@@ -1026,45 +1085,7 @@ function registerMutationCommands(program) {
1026
1085
  printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
1027
1086
  }
1028
1087
  });
1029
- 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(async (id, text, options, command) => {
1030
- const globalOptions = getGlobalOptions(command);
1031
- const startedAt = Date.now();
1032
- const editIndex = typeof options.edit === "number" ? options.edit : void 0;
1033
- const deleteIndex = typeof options.delete === "number" ? options.delete : void 0;
1034
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1035
- const addFromPositional = typeof text === "string" ? text : void 0;
1036
- const readFromStdin = options.stdin === true;
1037
- const readFromFile = typeof options.file === "string" ? options.file : void 0;
1038
- const sourceCount = Number(addFromOption !== void 0) + Number(addFromPositional !== void 0) + Number(readFromStdin) + Number(readFromFile !== void 0);
1039
- if (sourceCount > 1) {
1040
- if (addFromOption !== void 0 && addFromPositional !== void 0 && !readFromStdin && readFromFile === void 0) {
1041
- throw new PmCliError("Specify comment text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1042
- }
1043
- throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
1044
- }
1045
- const add = addFromOption ?? addFromPositional;
1046
- const { runComments } = await import("./comments-MU2WMBUY.js");
1047
- const result = await runComments(id, {
1048
- add,
1049
- stdin: readFromStdin,
1050
- file: readFromFile,
1051
- edit: editIndex,
1052
- delete: deleteIndex,
1053
- limit: typeof options.limit === "string" ? options.limit : void 0,
1054
- author: typeof options.author === "string" ? options.author : void 0,
1055
- message: typeof options.message === "string" ? options.message : void 0,
1056
- allowAuditComment: Boolean(options.allowAuditComment),
1057
- force: Boolean(options.force)
1058
- }, globalOptions);
1059
- const isMutation = typeof add === "string" || readFromStdin || readFromFile !== void 0 || editIndex !== void 0 || deleteIndex !== void 0;
1060
- if (isMutation) {
1061
- await invalidateSearchCachesForMutation(globalOptions, result);
1062
- }
1063
- printResult(result, globalOptions);
1064
- if (globalOptions.profile) {
1065
- printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
1066
- }
1067
- });
1088
+ 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);
1068
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) => {
1069
1090
  const globalOptions = getGlobalOptions(command);
1070
1091
  const startedAt = Date.now();
@@ -1074,7 +1095,7 @@ function registerMutationCommands(program) {
1074
1095
  throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1075
1096
  }
1076
1097
  const add = addFromOption ?? addFromPositional;
1077
- const { runNotes } = await import("./notes-EVJZ3VAB.js");
1098
+ const { runNotes } = await import("./notes-WDDBPC4D.js");
1078
1099
  const result = await runNotes(id, {
1079
1100
  add,
1080
1101
  limit: typeof options.limit === "string" ? options.limit : void 0,
@@ -1100,7 +1121,7 @@ function registerMutationCommands(program) {
1100
1121
  throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1101
1122
  }
1102
1123
  const add = addFromOption ?? addFromPositional;
1103
- const { runLearnings } = await import("./learnings-LHZT5BHW.js");
1124
+ const { runLearnings } = await import("./learnings-HJVDQIGY.js");
1104
1125
  const result = await runLearnings(id, {
1105
1126
  add,
1106
1127
  limit: typeof options.limit === "string" ? options.limit : void 0,
@@ -1125,7 +1146,7 @@ function registerMutationCommands(program) {
1125
1146
  const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1126
1147
  const removeValues = Array.isArray(options.remove) ? options.remove : [];
1127
1148
  const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1128
- const { runFiles } = await import("./files-DF3HO6XK.js");
1149
+ const { runFiles } = await import("./files-5D65CHGE.js");
1129
1150
  const result = await runFiles(id, {
1130
1151
  add: addValues,
1131
1152
  addGlob: addGlobValues,
@@ -1152,7 +1173,7 @@ function registerMutationCommands(program) {
1152
1173
  const globalOptions = getGlobalOptions(command);
1153
1174
  const startedAt = Date.now();
1154
1175
  const mergedOptions = { ...command.optsWithGlobals(), ...options };
1155
- const { runFilesDiscover } = await import("./files-DF3HO6XK.js");
1176
+ const { runFilesDiscover } = await import("./files-5D65CHGE.js");
1156
1177
  const result = await runFilesDiscover(id, {
1157
1178
  apply: Boolean(mergedOptions.apply),
1158
1179
  note: typeof mergedOptions.note === "string" ? mergedOptions.note : void 0,
@@ -1176,7 +1197,7 @@ function registerMutationCommands(program) {
1176
1197
  const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1177
1198
  const removeValues = Array.isArray(options.remove) ? options.remove : [];
1178
1199
  const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1179
- const { runDocs } = await import("./docs-NFTBCQQC.js");
1200
+ const { runDocs } = await import("./docs-RPOVFMP3.js");
1180
1201
  const result = await runDocs(id, {
1181
1202
  add: addValues,
1182
1203
  addGlob: addGlobValues,
@@ -1201,7 +1222,7 @@ function registerMutationCommands(program) {
1201
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) => {
1202
1223
  const globalOptions = getGlobalOptions(command);
1203
1224
  const startedAt = Date.now();
1204
- const { runDeps } = await import("./deps-ZVGGCRR6.js");
1225
+ const { runDeps } = await import("./deps-ZQZN54EZ.js");
1205
1226
  const result = await runDeps(id, {
1206
1227
  format: options.format,
1207
1228
  maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : void 0,
@@ -1221,6 +1242,6 @@ export {
1221
1242
  registerCommanderOptionContracts,
1222
1243
  registerMutationCommands
1223
1244
  };
1224
- //# sourceMappingURL=register-mutation-PCARIGZS.js.map
1245
+ //# sourceMappingURL=register-mutation-CFSB2MS3.js.map
1225
1246
 
1226
- //# debugId=83d6617e-974e-5c3a-904a-d8671268dbd1
1247
+ //# debugId=5e1251c7-61f3-5c3e-9990-c7f3ea8385cb