@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
@@ -9,25 +9,25 @@ import {
9
9
  invalidateSearchCachesForMutation,
10
10
  normalizeCreateOptions,
11
11
  normalizeUpdateOptions
12
- } from "./chunk-DORJSBGJ.js";
13
- import {
14
- CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
15
- UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS
16
- } from "./chunk-6T5ZIWBS.js";
12
+ } from "./chunk-SYNKD3ZG.js";
17
13
  import {
18
14
  printError,
19
15
  printResult,
20
16
  writeStdout
21
- } from "./chunk-CHRNYKNI.js";
22
- import "./chunk-KYDYQMNW.js";
23
- import "./chunk-LBH7UYKY.js";
24
- import "./chunk-ZFIEEDTJ.js";
25
- import "./chunk-MLHX6DN5.js";
17
+ } from "./chunk-5PGBHRY3.js";
18
+ import "./chunk-7TH5NMVB.js";
19
+ import {
20
+ CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
21
+ UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS
22
+ } from "./chunk-XWGEMNBR.js";
23
+ import "./chunk-JXAUVO6X.js";
24
+ import "./chunk-IEEJQCZ4.js";
25
+ import "./chunk-AIAIXG7I.js";
26
26
  import {
27
27
  BUILTIN_ITEM_TYPE_VALUES,
28
28
  EXIT_CODE,
29
29
  PmCliError
30
- } from "./chunk-SNUK7H5J.js";
30
+ } from "./chunk-7NSPKJUS.js";
31
31
 
32
32
  // dist/cli/register-mutation.js
33
33
  import { Option } from "commander";
@@ -109,7 +109,7 @@ function isPureSnakeCaseAlias(canonicalFlagSpec, aliasFlagSpec) {
109
109
  !(function() {
110
110
  try {
111
111
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
112
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "703247b2-e81d-5a78-999d-6d493a4cf9bf");
112
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6581ddaf-4643-5ccc-9aff-1569d1759846");
113
113
  } catch (e2) {
114
114
  }
115
115
  })();
@@ -416,62 +416,385 @@ function buildUpdateManyListOptions(options) {
416
416
  includeBody: true
417
417
  };
418
418
  }
419
- function registerMutationCommands(program) {
420
- 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.");
421
- registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
422
- 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) => {
423
- const globalOptions = getGlobalOptions(command);
424
- const startedAt = Date.now();
425
- let positionalType;
426
- let positionalTitle;
427
- if (typeof secondTitle === "string" && secondTitle.length > 0) {
428
- positionalType = typeOrTitle;
429
- positionalTitle = secondTitle;
430
- } else if (typeof typeOrTitle === "string" && typeOrTitle.length > 0) {
431
- const explicitTitleProvided = typeof options.title === "string" && options.title.trim().length > 0;
432
- if (explicitTitleProvided && options.type === void 0) {
433
- positionalType = typeOrTitle;
434
- } else {
435
- positionalTitle = typeOrTitle;
436
- }
419
+ function pickStringOption(...candidates) {
420
+ for (const candidate of candidates) {
421
+ if (typeof candidate === "string") {
422
+ return candidate;
437
423
  }
438
- 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())) {
439
- const matchedType = positionalTitle.trim();
440
- 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, {
441
- code: "create_positional_type_without_title",
442
- 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 + '".',
443
- examples: [
444
- `pm create ${matchedType} "Wire up SSO for the agent harness"`,
445
- `pm create "Wire up SSO for the agent harness" --type ${matchedType}`
446
- ],
447
- nextSteps: [
448
- `Re-run with both type and title: pm create ${matchedType} "<title>"`
449
- ]
450
- });
451
- }
452
- if (typeof positionalType === "string" && positionalType.length > 0 && options.type === void 0) {
453
- options.type = positionalType;
454
- }
455
- if (typeof positionalTitle === "string" && positionalTitle.length > 0 && options.title === void 0) {
456
- options.title = 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;
424
+ }
425
+ return void 0;
426
+ }
427
+ function readOptionString(options, key) {
428
+ return typeof options[key] === "string" ? options[key] : void 0;
429
+ }
430
+ function stringArrayOption(value) {
431
+ if (Array.isArray(value)) {
432
+ return value;
433
+ }
434
+ if (typeof value === "string") {
435
+ return [value];
436
+ }
437
+ return void 0;
438
+ }
439
+ function resolveCreatePositionals(typeOrTitle, secondTitle, options) {
440
+ if (typeof secondTitle === "string" && secondTitle.length > 0) {
441
+ return { positionalType: typeOrTitle, positionalTitle: secondTitle };
442
+ }
443
+ if (typeof typeOrTitle !== "string" || typeOrTitle.length === 0) {
444
+ return { positionalType: void 0, positionalTitle: void 0 };
445
+ }
446
+ const explicitTitleProvided = typeof options.title === "string" && options.title.trim().length > 0;
447
+ return explicitTitleProvided && options.type === void 0 ? { positionalType: typeOrTitle, positionalTitle: void 0 } : { positionalType: void 0, positionalTitle: typeOrTitle };
448
+ }
449
+ function assertCreatePositionalTypeHasTitle(positionalType, positionalTitle, options) {
450
+ 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())) {
451
+ return;
452
+ }
453
+ const matchedType = positionalTitle.trim();
454
+ 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, {
455
+ code: "create_positional_type_without_title",
456
+ 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 + '".',
457
+ examples: [
458
+ `pm create ${matchedType} "Wire up SSO for the agent harness"`,
459
+ `pm create "Wire up SSO for the agent harness" --type ${matchedType}`
460
+ ],
461
+ nextSteps: [
462
+ `Re-run with both type and title: pm create ${matchedType} "<title>"`
463
+ ]
464
+ });
465
+ }
466
+ async function runCreateAction(typeOrTitle, secondTitle, options, command) {
467
+ const globalOptions = getGlobalOptions(command);
468
+ const startedAt = Date.now();
469
+ const positionals = resolveCreatePositionals(typeOrTitle, secondTitle, options);
470
+ assertCreatePositionalTypeHasTitle(positionals.positionalType, positionals.positionalTitle, options);
471
+ if (typeof positionals.positionalType === "string" && positionals.positionalType.length > 0 && options.type === void 0) {
472
+ options.type = positionals.positionalType;
473
+ }
474
+ if (typeof positionals.positionalTitle === "string" && positionals.positionalTitle.length > 0 && options.title === void 0) {
475
+ options.title = positionals.positionalTitle;
476
+ }
477
+ if (typeof options.bodyFile === "string") {
478
+ options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
479
+ delete options.bodyFile;
480
+ }
481
+ const normalized = normalizeCreateOptions(options, { requireType: false });
482
+ const { runCreate } = await import("./create-XTMAPS7I.js");
483
+ const result = await runCreate(normalized, globalOptions);
484
+ await invalidateSearchCachesForMutation(globalOptions, result);
485
+ printResult(result, globalOptions);
486
+ if (globalOptions.profile) {
487
+ printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
488
+ }
489
+ }
490
+ function buildCloseManyListOptions(options) {
491
+ return {
492
+ type: readOptionString(options, "filterType"),
493
+ tag: readOptionString(options, "filterTag"),
494
+ priority: readOptionString(options, "filterPriority"),
495
+ deadlineBefore: readOptionString(options, "filterDeadlineBefore"),
496
+ deadlineAfter: readOptionString(options, "filterDeadlineAfter"),
497
+ updatedAfter: readOptionString(options, "filterUpdatedAfter"),
498
+ updatedBefore: readOptionString(options, "filterUpdatedBefore"),
499
+ createdAfter: readOptionString(options, "filterCreatedAfter"),
500
+ createdBefore: readOptionString(options, "filterCreatedBefore"),
501
+ ids: readOptionString(options, "ids"),
502
+ assignee: readOptionString(options, "filterAssignee"),
503
+ assigneeFilter: pickStringOption(options.filterAssigneeFilter, options.filterAssignee_filter),
504
+ parent: readOptionString(options, "filterParent"),
505
+ sprint: readOptionString(options, "filterSprint"),
506
+ release: readOptionString(options, "filterRelease"),
507
+ ...mapBulkContentAndGovernanceFilters(options),
508
+ limit: readOptionString(options, "limit"),
509
+ offset: readOptionString(options, "offset")
510
+ };
511
+ }
512
+ async function runCloseManyAction(options, command) {
513
+ const globalOptions = getGlobalOptions(command);
514
+ const startedAt = Date.now();
515
+ const { runCloseMany } = await import("./close-many-SWY34BII.js");
516
+ const result = await runCloseMany({
517
+ status: readOptionString(options, "filterStatus"),
518
+ list: buildCloseManyListOptions(options),
519
+ reason: readOptionString(options, "reason"),
520
+ resolution: readOptionString(options, "resolution"),
521
+ expectedResult: pickStringOption(options.expectedResult, options.expected_result, options.expected),
522
+ actualResult: pickStringOption(options.actualResult, options.actual_result, options.actual),
523
+ validateClose: options.validateClose === true ? "warn" : readOptionString(options, "validateClose"),
524
+ author: readOptionString(options, "author"),
525
+ message: readOptionString(options, "message"),
526
+ force: Boolean(options.force),
527
+ dryRun: options.dryRun === true ? true : void 0,
528
+ rollback: readOptionString(options, "rollback"),
529
+ checkpoint: options.checkpoint === false ? false : void 0
530
+ }, globalOptions);
531
+ await invalidateSearchCachesForMutation(globalOptions, result);
532
+ printResult(result, globalOptions);
533
+ if (globalOptions.profile) {
534
+ printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
535
+ }
536
+ }
537
+ function normalizePlanAliases(options) {
538
+ const planOptions = { ...options };
539
+ const aliasPairs = [
540
+ ["blocked_by", "blockedBy"],
541
+ ["resume_context", "resumeContext"],
542
+ ["from_search", "fromSearch"],
543
+ ["step_title", "stepTitle"],
544
+ ["step_body", "stepBody"],
545
+ ["step_owner", "stepOwner"],
546
+ ["step_status", "stepStatus"],
547
+ ["step_evidence", "stepEvidence"],
548
+ ["step_blocked_reason", "stepBlockedReason"],
549
+ ["step_replacement", "stepReplacement"],
550
+ ["depends_on", "dependsOn"],
551
+ ["link_kind", "linkKind"],
552
+ ["link_note", "linkNote"],
553
+ ["promote_to_item_dep", "promoteToItemDep"],
554
+ ["allow_multiple_active", "allowMultipleActive"],
555
+ ["decision_text", "decisionText"],
556
+ ["decision_rationale", "decisionRationale"],
557
+ ["decision_evidence", "decisionEvidence"],
558
+ ["discovery_text", "discoveryText"],
559
+ ["validation_text", "validationText"],
560
+ ["validation_command", "validationCommand"],
561
+ ["validation_expected", "validationExpected"],
562
+ ["materialize_type", "materializeType"],
563
+ ["materialize_parent", "materializeParent"],
564
+ ["materialize_tags", "materializeTags"]
565
+ ];
566
+ for (const [snake, camel] of aliasPairs) {
567
+ if (planOptions[snake] !== void 0 && planOptions[camel] === void 0) {
568
+ planOptions[camel] = planOptions[snake];
461
569
  }
462
- const normalized = normalizeCreateOptions(options, { requireType: false });
463
- const { runCreate } = await import("./create-DFMNBKBS.js");
464
- const result = await runCreate(normalized, globalOptions);
465
- await invalidateSearchCachesForMutation(globalOptions, result);
570
+ }
571
+ return planOptions;
572
+ }
573
+ function assertKnownPlanSubcommand(subcommand, normalized, allowed) {
574
+ if (!normalized) {
575
+ throw new PmCliError(`pm plan requires a subcommand. Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, {
576
+ code: "missing_required_argument",
577
+ examples: [
578
+ 'pm plan create --title "Refactor lock retry"',
579
+ "pm plan show pm-a1b2 --depth standard",
580
+ 'pm plan add-step pm-a1b2 --step-title "Read lock.ts"'
581
+ ]
582
+ });
583
+ }
584
+ if (allowed.includes(normalized)) {
585
+ return;
586
+ }
587
+ const examples = normalized === "list" || normalized === "ls" ? ["pm list --type Plan", "pm list-all --type Plan"] : void 0;
588
+ throw new PmCliError(`Unknown pm plan subcommand "${subcommand}". Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, examples ? { code: "unknown_subcommand", examples } : void 0);
589
+ }
590
+ function parsePlanReorderTo(normalizedSubcommand, reorderToken) {
591
+ if (normalizedSubcommand !== "reorder-step" || typeof reorderToken !== "string") {
592
+ return void 0;
593
+ }
594
+ const parsed = Number.parseInt(reorderToken, 10);
595
+ if (!Number.isFinite(parsed)) {
596
+ throw new PmCliError(`reorder-step requires an integer new order, got "${reorderToken}"`, EXIT_CODE.USAGE);
597
+ }
598
+ return parsed;
599
+ }
600
+ async function runPlanAction(subcommand, id, stepRef, reorderToken, options, command) {
601
+ const globalOptions = getGlobalOptions(command);
602
+ const startedAt = Date.now();
603
+ const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-C5IMM335.js");
604
+ const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
605
+ assertKnownPlanSubcommand(subcommand, normalizedSubcommand, PLAN_SUBCOMMANDS);
606
+ const planOptions = normalizePlanAliases(options);
607
+ const reorderTo = parsePlanReorderTo(normalizedSubcommand, reorderToken);
608
+ const planId = normalizedSubcommand === "create" && typeof id === "string" && id.length > 0 && planOptions.title === void 0 ? void 0 : id;
609
+ if (planId === void 0 && typeof id === "string" && id.length > 0) {
610
+ planOptions.title = id;
611
+ }
612
+ const result = await runPlan({
613
+ subcommand: normalizedSubcommand,
614
+ id: planId,
615
+ stepRef,
616
+ reorderTo,
617
+ options: planOptions,
618
+ global: globalOptions
619
+ });
620
+ await invalidateSearchCachesForMutation(globalOptions, result);
621
+ printResult(result, globalOptions);
622
+ if (globalOptions.profile) {
623
+ printError(`profile:command=plan took_ms=${Date.now() - startedAt}`);
624
+ }
625
+ }
626
+ function parseNonNegativeIntFlag(raw, flag) {
627
+ if (typeof raw !== "string") {
628
+ return void 0;
629
+ }
630
+ if (!/^\d+$/.test(raw.trim())) {
631
+ throw new PmCliError(`history-compact ${flag} must be a non-negative integer.`, EXIT_CODE.USAGE);
632
+ }
633
+ return Number.parseInt(raw, 10);
634
+ }
635
+ async function runHistoryCompactAction(id, options, command) {
636
+ const globalOptions = getGlobalOptions(command);
637
+ const startedAt = Date.now();
638
+ const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-MV25P7DM.js");
639
+ const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
640
+ const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
641
+ const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
642
+ if (options.closed === true && options.allStreams === true) {
643
+ throw new PmCliError("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.", EXIT_CODE.USAGE);
644
+ }
645
+ const scope = options.closed === true ? "closed" : options.allStreams === true ? "all-streams" : void 0;
646
+ const isBulk = ids !== void 0 || allOver !== void 0 || scope !== void 0;
647
+ if (isBulk && typeof options.before === "string") {
648
+ throw new PmCliError("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).", EXIT_CODE.USAGE);
649
+ }
650
+ assertHistoryCompactTarget(id, { ids, allOver, scope });
651
+ if (id === void 0) {
652
+ const result = await runHistoryCompactBulk({
653
+ ids,
654
+ scope,
655
+ allOver,
656
+ minEntries,
657
+ dryRun: options.dryRun === true,
658
+ author: readOptionString(options, "author"),
659
+ message: readOptionString(options, "message"),
660
+ force: Boolean(options.force)
661
+ }, globalOptions);
466
662
  printResult(result, globalOptions);
467
- if (globalOptions.profile) {
468
- printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
663
+ if (result.totals.items_errored > 0) {
664
+ process.exitCode = EXIT_CODE.GENERIC_FAILURE;
469
665
  }
666
+ } else {
667
+ const result = await runHistoryCompact(id, {
668
+ before: readOptionString(options, "before"),
669
+ dryRun: options.dryRun === true,
670
+ author: readOptionString(options, "author"),
671
+ message: readOptionString(options, "message"),
672
+ force: Boolean(options.force)
673
+ }, globalOptions);
674
+ printResult(result, globalOptions);
675
+ }
676
+ if (globalOptions.profile) {
677
+ printError(`profile:command=history-compact took_ms=${Date.now() - startedAt}`);
678
+ }
679
+ }
680
+ function splitCollectedCommaList(raw) {
681
+ if (!Array.isArray(raw)) {
682
+ return void 0;
683
+ }
684
+ return raw.flatMap((value) => value.split(",")).map((value) => value.trim()).filter((value) => value.length > 0);
685
+ }
686
+ async function runSchemaAction(subcommand, name, options, command) {
687
+ const globalOptions = getGlobalOptions(command);
688
+ const startedAt = Date.now();
689
+ const schemaModule = await import("./schema-UE5KKAUX.js");
690
+ const { SCHEMA_SUBCOMMANDS } = schemaModule;
691
+ let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
692
+ let typeName = name;
693
+ assertSchemaSubcommandPresent(normalizedSubcommand, SCHEMA_SUBCOMMANDS);
694
+ if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) && typeName === void 0 && !looksLikeSchemaSubcommandTypo(normalizedSubcommand)) {
695
+ typeName = subcommand;
696
+ normalizedSubcommand = "add-type";
697
+ }
698
+ if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand)) {
699
+ throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
700
+ }
701
+ const result = await dispatchSchemaSubcommand(schemaModule, {
702
+ normalizedSubcommand,
703
+ typeName,
704
+ options,
705
+ aliases: stringArrayOption(options.alias),
706
+ roles: stringArrayOption(options.role),
707
+ commands: splitCollectedCommaList(options.commands),
708
+ requiredTypes: splitCollectedCommaList(options.requiredTypes),
709
+ defaultStatus: pickStringOption(options.defaultStatus, options.default_status),
710
+ order: parseSchemaOrderOption(options.order),
711
+ minCount: parseSchemaOrderOption(options.minCount),
712
+ author: readOptionString(options, "author"),
713
+ force: Boolean(options.force),
714
+ description: readOptionString(options, "description"),
715
+ globalOptions
470
716
  });
717
+ if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
718
+ printResult(result, globalOptions);
719
+ } else if (!globalOptions.quiet) {
720
+ renderSchemaResultHuman(schemaModule, result);
721
+ }
722
+ if (globalOptions.profile) {
723
+ printError(`profile:command=schema took_ms=${Date.now() - startedAt}`);
724
+ }
725
+ }
726
+ function assertSchemaSubcommandPresent(normalizedSubcommand, allowed) {
727
+ if (normalizedSubcommand) {
728
+ return;
729
+ }
730
+ throw new PmCliError(`pm schema requires a subcommand. Allowed: ${allowed.join(", ")}`, EXIT_CODE.USAGE, {
731
+ code: "missing_required_argument",
732
+ examples: [
733
+ "pm schema list",
734
+ "pm schema show Task",
735
+ "pm schema show-status open",
736
+ 'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',
737
+ "pm schema remove-type Spike",
738
+ "pm schema add-status review --role active --alias in_review",
739
+ "pm schema remove-status review",
740
+ "pm schema add-field severity_level --type string --commands create,update",
741
+ "pm schema list-fields",
742
+ "pm schema apply-preset agile",
743
+ "pm schema add-type --infer --min-count 10"
744
+ ]
745
+ });
746
+ }
747
+ function resolveCommentSources(text, options) {
748
+ const editIndex = typeof options.edit === "number" ? options.edit : void 0;
749
+ const deleteIndex = typeof options.delete === "number" ? options.delete : void 0;
750
+ const addFromOption = readOptionString(options, "add");
751
+ const addFromPositional = typeof text === "string" ? text : void 0;
752
+ const readFromStdin = options.stdin === true;
753
+ const readFromFile = readOptionString(options, "file");
754
+ const sourceCount = Number(addFromOption !== void 0) + Number(addFromPositional !== void 0) + Number(readFromStdin) + Number(readFromFile !== void 0);
755
+ if (sourceCount > 1) {
756
+ if (addFromOption !== void 0 && addFromPositional !== void 0 && !readFromStdin && readFromFile === void 0) {
757
+ throw new PmCliError("Specify comment text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
758
+ }
759
+ throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
760
+ }
761
+ const add = addFromOption ?? addFromPositional;
762
+ const isMutation = typeof add === "string" || readFromStdin || readFromFile !== void 0 || editIndex !== void 0 || deleteIndex !== void 0;
763
+ return { add, readFromStdin, readFromFile, editIndex, deleteIndex, isMutation };
764
+ }
765
+ async function runCommentsAction(id, text, options, command) {
766
+ const globalOptions = getGlobalOptions(command);
767
+ const startedAt = Date.now();
768
+ const sources = resolveCommentSources(text, options);
769
+ const { runComments } = await import("./comments-4FGNTSNV.js");
770
+ const result = await runComments(id, {
771
+ add: sources.add,
772
+ stdin: sources.readFromStdin,
773
+ file: sources.readFromFile,
774
+ edit: sources.editIndex,
775
+ delete: sources.deleteIndex,
776
+ limit: readOptionString(options, "limit"),
777
+ author: readOptionString(options, "author"),
778
+ message: readOptionString(options, "message"),
779
+ allowAuditComment: Boolean(options.allowAuditComment),
780
+ force: Boolean(options.force)
781
+ }, globalOptions);
782
+ if (sources.isMutation) {
783
+ await invalidateSearchCachesForMutation(globalOptions, result);
784
+ }
785
+ printResult(result, globalOptions);
786
+ if (globalOptions.profile) {
787
+ printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
788
+ }
789
+ }
790
+ function registerMutationCommands(program) {
791
+ 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.");
792
+ registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
793
+ 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);
471
794
  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) => {
472
795
  const globalOptions = getGlobalOptions(command);
473
796
  const startedAt = Date.now();
474
- const { runCopy } = await import("./copy-CWM6SBY6.js");
797
+ const { runCopy } = await import("./copy-TLW7JTQT.js");
475
798
  const result = await runCopy(id, {
476
799
  title: typeof options.title === "string" ? options.title : void 0,
477
800
  author: typeof options.author === "string" ? options.author : void 0,
@@ -486,7 +809,7 @@ function registerMutationCommands(program) {
486
809
  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) => {
487
810
  const globalOptions = getGlobalOptions(command);
488
811
  const startedAt = Date.now();
489
- const { runFocus } = await import("./focus-MY5ARIEK.js");
812
+ const { runFocus } = await import("./focus-C3PEJV2C.js");
490
813
  const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
491
814
  printResult(result, globalOptions);
492
815
  if (globalOptions.profile) {
@@ -505,7 +828,7 @@ function registerMutationCommands(program) {
505
828
  options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
506
829
  delete options.bodyFile;
507
830
  }
508
- const { runUpdate } = await import("./update-UXDLTEOZ.js");
831
+ const { runUpdate } = await import("./update-MTCFES6X.js");
509
832
  const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
510
833
  await invalidateSearchCachesForMutation(globalOptions, result);
511
834
  printResult(result, globalOptions);
@@ -548,7 +871,7 @@ function registerMutationCommands(program) {
548
871
  updateManyCommand.action(async (options, command) => {
549
872
  const globalOptions = getGlobalOptions(command);
550
873
  const startedAt = Date.now();
551
- const { runUpdateMany } = await import("./update-many-LU3SCNK5.js");
874
+ const { runUpdateMany } = await import("./update-many-6YAYYRLE.js");
552
875
  const result = await runUpdateMany({
553
876
  status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
554
877
  list: buildUpdateManyListOptions(options),
@@ -569,7 +892,7 @@ function registerMutationCommands(program) {
569
892
  closeCommand.action(async (id, text, options, command) => {
570
893
  const globalOptions = getGlobalOptions(command);
571
894
  const startedAt = Date.now();
572
- const { runClose } = await import("./close-37KEHLYM.js");
895
+ const { runClose } = await import("./close-YCWQQPDS.js");
573
896
  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;
574
897
  const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
575
898
  const pickInlineString = (...candidates) => {
@@ -602,62 +925,11 @@ function registerMutationCommands(program) {
602
925
  addHiddenOption(closeManyCommand, "--filter-assignee_filter <value>", "Alias for --filter-assignee-filter", false);
603
926
  addHiddenOption(closeManyCommand, "--expected_result <value>", "Alias for --expected-result", false);
604
927
  addHiddenOption(closeManyCommand, "--actual_result <value>", "Alias for --actual-result", false);
605
- closeManyCommand.action(async (options, command) => {
606
- const globalOptions = getGlobalOptions(command);
607
- const startedAt = Date.now();
608
- const pickString = (...candidates) => {
609
- for (const candidate of candidates) {
610
- if (typeof candidate === "string") {
611
- return candidate;
612
- }
613
- }
614
- return void 0;
615
- };
616
- const { runCloseMany } = await import("./close-many-BFMP6HHK.js");
617
- const result = await runCloseMany({
618
- status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
619
- list: {
620
- type: typeof options.filterType === "string" ? options.filterType : void 0,
621
- tag: typeof options.filterTag === "string" ? options.filterTag : void 0,
622
- priority: typeof options.filterPriority === "string" ? options.filterPriority : void 0,
623
- deadlineBefore: typeof options.filterDeadlineBefore === "string" ? options.filterDeadlineBefore : void 0,
624
- deadlineAfter: typeof options.filterDeadlineAfter === "string" ? options.filterDeadlineAfter : void 0,
625
- updatedAfter: typeof options.filterUpdatedAfter === "string" ? options.filterUpdatedAfter : void 0,
626
- updatedBefore: typeof options.filterUpdatedBefore === "string" ? options.filterUpdatedBefore : void 0,
627
- createdAfter: typeof options.filterCreatedAfter === "string" ? options.filterCreatedAfter : void 0,
628
- createdBefore: typeof options.filterCreatedBefore === "string" ? options.filterCreatedBefore : void 0,
629
- ids: typeof options.ids === "string" ? options.ids : void 0,
630
- assignee: typeof options.filterAssignee === "string" ? options.filterAssignee : void 0,
631
- assigneeFilter: pickString(options.filterAssigneeFilter, options.filterAssignee_filter),
632
- parent: typeof options.filterParent === "string" ? options.filterParent : void 0,
633
- sprint: typeof options.filterSprint === "string" ? options.filterSprint : void 0,
634
- release: typeof options.filterRelease === "string" ? options.filterRelease : void 0,
635
- ...mapBulkContentAndGovernanceFilters(options),
636
- limit: typeof options.limit === "string" ? options.limit : void 0,
637
- offset: typeof options.offset === "string" ? options.offset : void 0
638
- },
639
- reason: typeof options.reason === "string" ? options.reason : void 0,
640
- resolution: typeof options.resolution === "string" ? options.resolution : void 0,
641
- expectedResult: pickString(options.expectedResult, options.expected_result, options.expected),
642
- actualResult: pickString(options.actualResult, options.actual_result, options.actual),
643
- validateClose: options.validateClose === true ? "warn" : typeof options.validateClose === "string" ? options.validateClose : void 0,
644
- author: typeof options.author === "string" ? options.author : void 0,
645
- message: typeof options.message === "string" ? options.message : void 0,
646
- force: Boolean(options.force),
647
- dryRun: options.dryRun === true ? true : void 0,
648
- rollback: typeof options.rollback === "string" ? options.rollback : void 0,
649
- checkpoint: options.checkpoint === false ? false : void 0
650
- }, globalOptions);
651
- await invalidateSearchCachesForMutation(globalOptions, result);
652
- printResult(result, globalOptions);
653
- if (globalOptions.profile) {
654
- printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
655
- }
656
- });
928
+ closeManyCommand.action(runCloseManyAction);
657
929
  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) => {
658
930
  const globalOptions = getGlobalOptions(command);
659
931
  const startedAt = Date.now();
660
- const { runDelete } = await import("./delete-OOQS4KVD.js");
932
+ const { runDelete } = await import("./delete-ANTOTI2I.js");
661
933
  const result = await runDelete(id, {
662
934
  author: typeof options.author === "string" ? options.author : void 0,
663
935
  message: typeof options.message === "string" ? options.message : void 0,
@@ -686,7 +958,7 @@ function registerMutationCommands(program) {
686
958
  if (resolvedBody === void 0) {
687
959
  throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
688
960
  }
689
- const { runAppend } = await import("./append-LEDBAM3K.js");
961
+ const { runAppend } = await import("./append-UBM632FK.js");
690
962
  const result = await runAppend(id, {
691
963
  body: resolvedBody,
692
964
  author: typeof options.author === "string" ? options.author : void 0,
@@ -702,7 +974,7 @@ function registerMutationCommands(program) {
702
974
  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) => {
703
975
  const globalOptions = getGlobalOptions(command);
704
976
  const startedAt = Date.now();
705
- const { runRestore } = await import("./restore-IRAKSWIW.js");
977
+ const { runRestore } = await import("./restore-5UEAGG3W.js");
706
978
  const result = await runRestore(id, target, {
707
979
  author: typeof options.author === "string" ? options.author : void 0,
708
980
  message: typeof options.message === "string" ? options.message : void 0,
@@ -748,94 +1020,12 @@ function registerMutationCommands(program) {
748
1020
  ]) {
749
1021
  addHiddenOption(planCommand, flags, description, true);
750
1022
  }
751
- planCommand.action(async (subcommand, id, stepRef, reorderToken, options, command) => {
752
- const globalOptions = getGlobalOptions(command);
753
- const startedAt = Date.now();
754
- const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-DQ7G4EDC.js");
755
- const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
756
- if (!normalizedSubcommand) {
757
- throw new PmCliError(`pm plan requires a subcommand. Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
758
- code: "missing_required_argument",
759
- examples: [
760
- 'pm plan create --title "Refactor lock retry"',
761
- "pm plan show pm-a1b2 --depth standard",
762
- 'pm plan add-step pm-a1b2 --step-title "Read lock.ts"'
763
- ]
764
- });
765
- }
766
- if (!PLAN_SUBCOMMANDS.includes(normalizedSubcommand)) {
767
- const didYouMean = normalizedSubcommand === "list" || normalizedSubcommand === "ls" ? ["pm list --type Plan", "pm list-all --type Plan"] : void 0;
768
- throw new PmCliError(`Unknown pm plan subcommand "${subcommand}". Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, didYouMean ? { code: "unknown_subcommand", examples: didYouMean } : void 0);
769
- }
770
- const planOptions = { ...options };
771
- const aliasPairs = [
772
- ["blocked_by", "blockedBy"],
773
- ["resume_context", "resumeContext"],
774
- ["from_search", "fromSearch"],
775
- // pm-6mit: "step" is no longer folded into stepTitle here — it is a
776
- // first-class repeatable option normalized inside runPlan (create
777
- // accumulates ordered steps; other subcommands accept a single value
778
- // as a stepTitle alias).
779
- ["step_title", "stepTitle"],
780
- ["step_body", "stepBody"],
781
- ["step_owner", "stepOwner"],
782
- ["step_status", "stepStatus"],
783
- ["step_evidence", "stepEvidence"],
784
- ["step_blocked_reason", "stepBlockedReason"],
785
- ["step_replacement", "stepReplacement"],
786
- ["depends_on", "dependsOn"],
787
- ["link_kind", "linkKind"],
788
- ["link_note", "linkNote"],
789
- ["promote_to_item_dep", "promoteToItemDep"],
790
- ["allow_multiple_active", "allowMultipleActive"],
791
- ["decision_text", "decisionText"],
792
- ["decision_rationale", "decisionRationale"],
793
- ["decision_evidence", "decisionEvidence"],
794
- ["discovery_text", "discoveryText"],
795
- ["validation_text", "validationText"],
796
- ["validation_command", "validationCommand"],
797
- ["validation_expected", "validationExpected"],
798
- ["materialize_type", "materializeType"],
799
- ["materialize_parent", "materializeParent"],
800
- ["materialize_tags", "materializeTags"]
801
- ];
802
- for (const [snake, camel] of aliasPairs) {
803
- if (planOptions[snake] !== void 0 && planOptions[camel] === void 0) {
804
- planOptions[camel] = planOptions[snake];
805
- }
806
- }
807
- let reorderTo;
808
- if (normalizedSubcommand === "reorder-step" && typeof reorderToken === "string") {
809
- const parsed = Number.parseInt(reorderToken, 10);
810
- if (!Number.isFinite(parsed)) {
811
- throw new PmCliError(`reorder-step requires an integer new order, got "${reorderToken}"`, EXIT_CODE.USAGE);
812
- }
813
- reorderTo = parsed;
814
- }
815
- let planId = id;
816
- if (normalizedSubcommand === "create" && typeof id === "string" && id.length > 0 && planOptions.title === void 0) {
817
- planOptions.title = id;
818
- planId = void 0;
819
- }
820
- const result = await runPlan({
821
- subcommand: normalizedSubcommand,
822
- id: planId,
823
- stepRef,
824
- reorderTo,
825
- options: planOptions,
826
- global: globalOptions
827
- });
828
- await invalidateSearchCachesForMutation(globalOptions, result);
829
- printResult(result, globalOptions);
830
- if (globalOptions.profile) {
831
- printError(`profile:command=plan took_ms=${Date.now() - startedAt}`);
832
- }
833
- });
1023
+ planCommand.action(runPlanAction);
834
1024
  void planCommand;
835
1025
  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) => {
836
1026
  const globalOptions = getGlobalOptions(command);
837
1027
  const startedAt = Date.now();
838
- const { runHistoryRedact } = await import("./history-redact-BVHWDXPR.js");
1028
+ const { runHistoryRedact } = await import("./history-redact-IX4YEWMY.js");
839
1029
  const literal = Array.isArray(options.literal) ? options.literal : void 0;
840
1030
  const regex = Array.isArray(options.regex) ? options.regex : void 0;
841
1031
  const result = await runHistoryRedact(id, {
@@ -858,7 +1048,7 @@ function registerMutationCommands(program) {
858
1048
  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) => {
859
1049
  const globalOptions = getGlobalOptions(command);
860
1050
  const startedAt = Date.now();
861
- const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-GABSDSVD.js");
1051
+ const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-CPNAOCNF.js");
862
1052
  const all = options.all === true;
863
1053
  assertHistoryRepairTarget(id, all);
864
1054
  const repairOptions = {
@@ -881,146 +1071,15 @@ function registerMutationCommands(program) {
881
1071
  printError(`profile:command=history-repair took_ms=${Date.now() - startedAt}`);
882
1072
  }
883
1073
  });
884
- 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) => {
885
- const globalOptions = getGlobalOptions(command);
886
- const startedAt = Date.now();
887
- const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-WLCQEKXS.js");
888
- const parseNonNegativeIntFlag = (raw, flag) => {
889
- if (typeof raw !== "string") {
890
- return void 0;
891
- }
892
- if (!/^\d+$/.test(raw.trim())) {
893
- throw new PmCliError(`history-compact ${flag} must be a non-negative integer.`, EXIT_CODE.USAGE);
894
- }
895
- return Number.parseInt(raw, 10);
896
- };
897
- const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
898
- const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
899
- const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
900
- if (options.closed === true && options.allStreams === true) {
901
- throw new PmCliError("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.", EXIT_CODE.USAGE);
902
- }
903
- const scope = options.closed === true ? "closed" : options.allStreams === true ? "all-streams" : void 0;
904
- const isBulk = ids !== void 0 || allOver !== void 0 || scope !== void 0;
905
- if (isBulk && typeof options.before === "string") {
906
- throw new PmCliError("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).", EXIT_CODE.USAGE);
907
- }
908
- assertHistoryCompactTarget(id, { ids, allOver, scope });
909
- if (id === void 0) {
910
- const result = await runHistoryCompactBulk({
911
- ids,
912
- scope,
913
- allOver,
914
- minEntries,
915
- dryRun: options.dryRun === true,
916
- author: typeof options.author === "string" ? options.author : void 0,
917
- message: typeof options.message === "string" ? options.message : void 0,
918
- force: Boolean(options.force)
919
- }, globalOptions);
920
- printResult(result, globalOptions);
921
- if (result.totals.items_errored > 0) {
922
- process.exitCode = EXIT_CODE.GENERIC_FAILURE;
923
- }
924
- } else {
925
- const result = await runHistoryCompact(id, {
926
- before: typeof options.before === "string" ? options.before : void 0,
927
- dryRun: options.dryRun === true,
928
- author: typeof options.author === "string" ? options.author : void 0,
929
- message: typeof options.message === "string" ? options.message : void 0,
930
- force: Boolean(options.force)
931
- }, globalOptions);
932
- printResult(result, globalOptions);
933
- }
934
- if (globalOptions.profile) {
935
- printError(`profile:command=history-compact took_ms=${Date.now() - startedAt}`);
936
- }
937
- });
1074
+ 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);
938
1075
  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).");
939
1076
  addHiddenOption(schemaCommand, "--default_status <status>", "Alias for --default-status", false);
940
- schemaCommand.action(async (subcommand, name, options, command) => {
941
- const globalOptions = getGlobalOptions(command);
942
- const startedAt = Date.now();
943
- const schemaModule = await import("./schema-XJXKJQF5.js");
944
- const { SCHEMA_SUBCOMMANDS } = schemaModule;
945
- let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
946
- let typeName = name;
947
- if (!normalizedSubcommand) {
948
- throw new PmCliError(`pm schema requires a subcommand. Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
949
- code: "missing_required_argument",
950
- examples: [
951
- "pm schema list",
952
- "pm schema show Task",
953
- "pm schema show-status open",
954
- 'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',
955
- "pm schema remove-type Spike",
956
- "pm schema add-status review --role active --alias in_review",
957
- "pm schema remove-status review",
958
- "pm schema add-field severity_level --type string --commands create,update",
959
- "pm schema list-fields",
960
- "pm schema apply-preset agile",
961
- "pm schema add-type --infer --min-count 10"
962
- ]
963
- });
964
- }
965
- const aliases = (
966
- /* 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 */
967
- typeof options.alias === "string" ? [options.alias] : Array.isArray(options.alias) ? options.alias : void 0
968
- );
969
- const roles = (
970
- /* 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 */
971
- typeof options.role === "string" ? [options.role] : Array.isArray(options.role) ? options.role : void 0
972
- );
973
- const defaultStatus = typeof options.defaultStatus === "string" ? options.defaultStatus : typeof options.default_status === "string" ? options.default_status : void 0;
974
- const order = parseSchemaOrderOption(options.order);
975
- const splitCollectedCommaList = (raw) => {
976
- if (!Array.isArray(raw)) {
977
- return void 0;
978
- }
979
- return raw.flatMap((value) => value.split(",")).map((value) => value.trim()).filter((value) => value.length > 0);
980
- };
981
- const commands = splitCollectedCommaList(options.commands);
982
- const requiredTypes = splitCollectedCommaList(options.requiredTypes);
983
- const minCount = parseSchemaOrderOption(options.minCount);
984
- if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) && typeName === void 0 && !looksLikeSchemaSubcommandTypo(normalizedSubcommand)) {
985
- typeName = subcommand;
986
- normalizedSubcommand = "add-type";
987
- }
988
- if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand)) {
989
- throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
990
- }
991
- const author = typeof options.author === "string" ? options.author : void 0;
992
- const force = Boolean(options.force);
993
- const description = typeof options.description === "string" ? options.description : void 0;
994
- const result = await dispatchSchemaSubcommand(schemaModule, {
995
- normalizedSubcommand,
996
- typeName,
997
- options,
998
- aliases,
999
- roles,
1000
- commands,
1001
- requiredTypes,
1002
- defaultStatus,
1003
- order,
1004
- minCount,
1005
- author,
1006
- force,
1007
- description,
1008
- globalOptions
1009
- });
1010
- if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
1011
- printResult(result, globalOptions);
1012
- } else if (!globalOptions.quiet) {
1013
- renderSchemaResultHuman(schemaModule, result);
1014
- }
1015
- if (globalOptions.profile) {
1016
- printError(`profile:command=schema took_ms=${Date.now() - startedAt}`);
1017
- }
1018
- });
1077
+ schemaCommand.action(runSchemaAction);
1019
1078
  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.");
1020
1079
  profileCommand.action(async (subcommand, name, options, command) => {
1021
1080
  const globalOptions = getGlobalOptions(command);
1022
1081
  const startedAt = Date.now();
1023
- const profileModule = await import("./profile-UPZGCDOG.js");
1082
+ const profileModule = await import("./profile-HUCENIEQ.js");
1024
1083
  const { PROFILE_SUBCOMMANDS } = profileModule;
1025
1084
  const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
1026
1085
  if (!normalizedSubcommand) {
@@ -1045,45 +1104,7 @@ function registerMutationCommands(program) {
1045
1104
  printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
1046
1105
  }
1047
1106
  });
1048
- 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) => {
1049
- const globalOptions = getGlobalOptions(command);
1050
- const startedAt = Date.now();
1051
- const editIndex = typeof options.edit === "number" ? options.edit : void 0;
1052
- const deleteIndex = typeof options.delete === "number" ? options.delete : void 0;
1053
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1054
- const addFromPositional = typeof text === "string" ? text : void 0;
1055
- const readFromStdin = options.stdin === true;
1056
- const readFromFile = typeof options.file === "string" ? options.file : void 0;
1057
- const sourceCount = Number(addFromOption !== void 0) + Number(addFromPositional !== void 0) + Number(readFromStdin) + Number(readFromFile !== void 0);
1058
- if (sourceCount > 1) {
1059
- if (addFromOption !== void 0 && addFromPositional !== void 0 && !readFromStdin && readFromFile === void 0) {
1060
- throw new PmCliError("Specify comment text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1061
- }
1062
- throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
1063
- }
1064
- const add = addFromOption ?? addFromPositional;
1065
- const { runComments } = await import("./comments-ETHABIY6.js");
1066
- const result = await runComments(id, {
1067
- add,
1068
- stdin: readFromStdin,
1069
- file: readFromFile,
1070
- edit: editIndex,
1071
- delete: deleteIndex,
1072
- limit: typeof options.limit === "string" ? options.limit : void 0,
1073
- author: typeof options.author === "string" ? options.author : void 0,
1074
- message: typeof options.message === "string" ? options.message : void 0,
1075
- allowAuditComment: Boolean(options.allowAuditComment),
1076
- force: Boolean(options.force)
1077
- }, globalOptions);
1078
- const isMutation = typeof add === "string" || readFromStdin || readFromFile !== void 0 || editIndex !== void 0 || deleteIndex !== void 0;
1079
- if (isMutation) {
1080
- await invalidateSearchCachesForMutation(globalOptions, result);
1081
- }
1082
- printResult(result, globalOptions);
1083
- if (globalOptions.profile) {
1084
- printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
1085
- }
1086
- });
1107
+ 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);
1087
1108
  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) => {
1088
1109
  const globalOptions = getGlobalOptions(command);
1089
1110
  const startedAt = Date.now();
@@ -1093,7 +1114,7 @@ function registerMutationCommands(program) {
1093
1114
  throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1094
1115
  }
1095
1116
  const add = addFromOption ?? addFromPositional;
1096
- const { runNotes } = await import("./notes-FW6YFLND.js");
1117
+ const { runNotes } = await import("./notes-GDZIKGR6.js");
1097
1118
  const result = await runNotes(id, {
1098
1119
  add,
1099
1120
  limit: typeof options.limit === "string" ? options.limit : void 0,
@@ -1119,7 +1140,7 @@ function registerMutationCommands(program) {
1119
1140
  throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1120
1141
  }
1121
1142
  const add = addFromOption ?? addFromPositional;
1122
- const { runLearnings } = await import("./learnings-3F7YLI45.js");
1143
+ const { runLearnings } = await import("./learnings-XSFSUUWK.js");
1123
1144
  const result = await runLearnings(id, {
1124
1145
  add,
1125
1146
  limit: typeof options.limit === "string" ? options.limit : void 0,
@@ -1144,7 +1165,7 @@ function registerMutationCommands(program) {
1144
1165
  const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1145
1166
  const removeValues = Array.isArray(options.remove) ? options.remove : [];
1146
1167
  const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1147
- const { runFiles } = await import("./files-T5ODMETM.js");
1168
+ const { runFiles } = await import("./files-GPIG77EN.js");
1148
1169
  const result = await runFiles(id, {
1149
1170
  add: addValues,
1150
1171
  addGlob: addGlobValues,
@@ -1171,7 +1192,7 @@ function registerMutationCommands(program) {
1171
1192
  const globalOptions = getGlobalOptions(command);
1172
1193
  const startedAt = Date.now();
1173
1194
  const mergedOptions = { ...command.optsWithGlobals(), ...options };
1174
- const { runFilesDiscover } = await import("./files-T5ODMETM.js");
1195
+ const { runFilesDiscover } = await import("./files-GPIG77EN.js");
1175
1196
  const result = await runFilesDiscover(id, {
1176
1197
  apply: Boolean(mergedOptions.apply),
1177
1198
  note: typeof mergedOptions.note === "string" ? mergedOptions.note : void 0,
@@ -1195,7 +1216,7 @@ function registerMutationCommands(program) {
1195
1216
  const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1196
1217
  const removeValues = Array.isArray(options.remove) ? options.remove : [];
1197
1218
  const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1198
- const { runDocs } = await import("./docs-2TIFR62T.js");
1219
+ const { runDocs } = await import("./docs-XJNYBJGE.js");
1199
1220
  const result = await runDocs(id, {
1200
1221
  add: addValues,
1201
1222
  addGlob: addGlobValues,
@@ -1220,7 +1241,7 @@ function registerMutationCommands(program) {
1220
1241
  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) => {
1221
1242
  const globalOptions = getGlobalOptions(command);
1222
1243
  const startedAt = Date.now();
1223
- const { runDeps } = await import("./deps-IF4IGL4R.js");
1244
+ const { runDeps } = await import("./deps-HPPE6MJN.js");
1224
1245
  const result = await runDeps(id, {
1225
1246
  format: options.format,
1226
1247
  maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : void 0,
@@ -1240,4 +1261,4 @@ export {
1240
1261
  registerCommanderOptionContracts,
1241
1262
  registerMutationCommands
1242
1263
  };
1243
- //# sourceMappingURL=register-mutation-N6AYSKPM.js.map
1264
+ //# sourceMappingURL=register-mutation-KRLAHEL2.js.map