@unbrained/pm-cli 2026.7.2 → 2026.7.3

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 (476) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +19 -0
  3. package/CONTRIBUTING.md +2 -2
  4. package/README.md +1 -1
  5. package/dist/cli/commander-usage.js +54 -41
  6. package/dist/cli/commander-usage.js.map +1 -1
  7. package/dist/cli/commands/activity.js +79 -57
  8. package/dist/cli/commands/activity.js.map +1 -1
  9. package/dist/cli/commands/close-many.js +106 -65
  10. package/dist/cli/commands/close-many.js.map +1 -1
  11. package/dist/cli/commands/create.js +32 -17
  12. package/dist/cli/commands/create.js.map +1 -1
  13. package/dist/cli/commands/extension/doctor.js +56 -67
  14. package/dist/cli/commands/extension/doctor.js.map +1 -1
  15. package/dist/cli/commands/extension/shared.js +21 -15
  16. package/dist/cli/commands/extension/shared.js.map +1 -1
  17. package/dist/cli/commands/health.js +101 -112
  18. package/dist/cli/commands/health.js.map +1 -1
  19. package/dist/cli/commands/init-agent-guidance.js +32 -19
  20. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  21. package/dist/cli/commands/next.js +13 -10
  22. package/dist/cli/commands/next.js.map +1 -1
  23. package/dist/cli/commands/profile.js +23 -15
  24. package/dist/cli/commands/profile.js.map +1 -1
  25. package/dist/cli/commands/validate.d.ts +2 -0
  26. package/dist/cli/commands/validate.js +14 -2
  27. package/dist/cli/commands/validate.js.map +1 -1
  28. package/dist/cli/error-guidance.js +9 -6
  29. package/dist/cli/error-guidance.js.map +1 -1
  30. package/dist/cli/extension-command-help.js +27 -19
  31. package/dist/cli/extension-command-help.js.map +1 -1
  32. package/dist/cli/help-json-payload.js +57 -49
  33. package/dist/cli/help-json-payload.js.map +1 -1
  34. package/dist/cli/main.js +48 -32
  35. package/dist/cli/main.js.map +1 -1
  36. package/dist/cli/register-list-query.js +213 -213
  37. package/dist/cli/register-list-query.js.map +1 -1
  38. package/dist/cli/register-mutation.js +368 -368
  39. package/dist/cli/register-mutation.js.map +1 -1
  40. package/dist/cli/register-operations.js +303 -299
  41. package/dist/cli/register-operations.js.map +1 -1
  42. package/dist/cli/registration-helpers.d.ts +4 -0
  43. package/dist/cli/registration-helpers.js +45 -56
  44. package/dist/cli/registration-helpers.js.map +1 -1
  45. package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js → activity-5YWLSPGE.js} +9 -9
  46. package/dist/cli-bundle/chunks/activity-BIML7K2D.js +16 -0
  47. package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js → aggregate-2V2M3JZU.js} +8 -8
  48. package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js → aggregate-EK7DXML7.js} +8 -8
  49. package/dist/cli-bundle/chunks/{append-UBM632FK.js → append-EZESUVJT.js} +8 -8
  50. package/dist/cli-bundle/chunks/{append-H32VOR2Y.js → append-JFG4WQMG.js} +8 -8
  51. package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js → chunk-32IUNTG4.js} +5 -5
  52. package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js → chunk-3W2HJKJX.js} +3 -3
  53. package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js → chunk-4EXFFP7T.js} +42 -27
  54. package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js.map → chunk-4EXFFP7T.js.map} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js → chunk-4PFVUUYV.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-NRZS637N.js → chunk-4WB6S4YX.js} +56 -21
  57. package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +1 -0
  58. package/dist/cli-bundle/chunks/{chunk-5GVTFFTC.js → chunk-572FKBRL.js} +61 -102
  59. package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +1 -0
  60. package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js → chunk-5E7N4T2Z.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-S62UANU7.js → chunk-5IZUBZBR.js} +3 -3
  62. package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js → chunk-5JIWFWOZ.js} +2 -2
  63. package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js → chunk-67LARBDL.js} +9 -9
  64. package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js → chunk-6CDCWKSX.js} +4 -4
  65. package/dist/cli-bundle/chunks/{chunk-JXAUVO6X.js → chunk-6KRFL33E.js} +55 -20
  66. package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +7 -0
  67. package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js → chunk-6NYJGMTY.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js → chunk-7CLLC75T.js} +4 -4
  69. package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js → chunk-7LYO6S5A.js} +8 -8
  70. package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js → chunk-A3OQ7TFW.js} +8 -8
  71. package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js → chunk-AIKU3IIL.js} +7 -7
  72. package/dist/cli-bundle/chunks/{chunk-AIAIXG7I.js → chunk-AJHYQCBJ.js} +39 -5
  73. package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +7 -0
  74. package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js → chunk-BE2SR6QL.js} +4 -4
  75. package/dist/cli-bundle/chunks/{chunk-GFMSLORL.js → chunk-BI4R7HI2.js} +75 -53
  76. package/dist/cli-bundle/chunks/chunk-BI4R7HI2.js.map +7 -0
  77. package/dist/cli-bundle/chunks/{chunk-K2VYLVX4.js → chunk-CXR3CMBQ.js} +33 -6
  78. package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +1 -0
  79. package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js → chunk-ECU6MMTQ.js} +10 -10
  80. package/dist/cli-bundle/chunks/{chunk-YLZZ6T54.js → chunk-EJ2OCBHF.js} +23 -8
  81. package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js → chunk-EQURFOMH.js} +2 -2
  83. package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js → chunk-ER4ME5U2.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js → chunk-ERG65A2L.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js → chunk-F6WNBITZ.js} +7 -7
  86. package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js → chunk-FH2H3CBD.js} +3 -3
  87. package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js → chunk-FUFFPIYA.js} +2 -2
  88. package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js → chunk-FZJM2TXF.js} +7 -7
  89. package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js → chunk-GUYNUXQT.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js → chunk-GVJE5T7Q.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-SYNKD3ZG.js → chunk-HB4FAT3O.js} +42 -60
  92. package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +7 -0
  93. package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js → chunk-HQAF23Q2.js} +8 -8
  94. package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js → chunk-JBZ2NTKX.js} +2 -2
  95. package/dist/cli-bundle/chunks/{chunk-SPM2XLWI.js → chunk-JPATY4SE.js} +22 -7
  96. package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js → chunk-K5DT2YKM.js} +7 -7
  98. package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js → chunk-KEZOIPCR.js} +3 -3
  99. package/dist/cli-bundle/chunks/{chunk-7NSPKJUS.js → chunk-KHVGM5CS.js} +113 -83
  100. package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +7 -0
  101. package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js → chunk-KS6ATO47.js} +33 -20
  102. package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js.map → chunk-KS6ATO47.js.map} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-I66WE2HE.js → chunk-L4SLHV6G.js} +112 -82
  104. package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +1 -0
  105. package/dist/cli-bundle/chunks/{chunk-2227673O.js → chunk-LBE5QFMZ.js} +7 -7
  106. package/dist/cli-bundle/chunks/{chunk-YPKFV2JR.js → chunk-LCWQP6NM.js} +76 -54
  107. package/dist/cli-bundle/chunks/chunk-LCWQP6NM.js.map +1 -0
  108. package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js → chunk-LOWVNZBZ.js} +4 -4
  109. package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js → chunk-MDHWWBNZ.js} +3 -3
  110. package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js → chunk-MEZZZBYX.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js → chunk-MHRS5FUX.js} +34 -21
  112. package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js.map → chunk-MHRS5FUX.js.map} +1 -1
  113. package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js → chunk-NOIEVOK5.js} +7 -7
  114. package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js → chunk-NZ7QIUP5.js} +4 -4
  115. package/dist/cli-bundle/chunks/{chunk-TPOFWBMY.js → chunk-OGLGI22K.js} +26 -20
  116. package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js → chunk-P5L7Z2O6.js} +2 -2
  118. package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js → chunk-PULUSQAV.js} +9 -9
  119. package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js → chunk-QCDTQCMW.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js → chunk-QNNQAAZ5.js} +24 -18
  121. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js.map → chunk-QNNQAAZ5.js.map} +1 -1
  122. package/dist/cli-bundle/chunks/{chunk-XWGEMNBR.js → chunk-RAHINBVP.js} +60 -101
  123. package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +7 -0
  124. package/dist/cli-bundle/chunks/{chunk-AJEBCRIY.js → chunk-RJH5VQHW.js} +43 -61
  125. package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js → chunk-SU2E4AWU.js} +6 -6
  127. package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js → chunk-SU3TB4NS.js} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js → chunk-SYE6WMV6.js} +8 -8
  129. package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js → chunk-T3P7PMZP.js} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js → chunk-T4XBKJ3F.js} +4 -4
  131. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js → chunk-T6AXEBOP.js} +23 -17
  132. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js.map → chunk-T6AXEBOP.js.map} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js → chunk-TQ6AX5SQ.js} +58 -69
  134. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js.map → chunk-TQ6AX5SQ.js.map} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js → chunk-U3S2B7TA.js} +43 -28
  136. package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js.map → chunk-U3S2B7TA.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js → chunk-U5TR4N7J.js} +7 -7
  138. package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js → chunk-UMNQZS4H.js} +3 -3
  139. package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js → chunk-WJA3PXW7.js} +7 -7
  140. package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js → chunk-WRYERRZX.js} +5 -5
  141. package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js → chunk-WYOIIFSE.js} +10 -10
  142. package/dist/cli-bundle/chunks/{chunk-7TH5NMVB.js → chunk-XRYSCRZR.js} +25 -19
  143. package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +7 -0
  144. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js → chunk-YF746GTH.js} +59 -70
  145. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js.map → chunk-YF746GTH.js.map} +1 -1
  146. package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js → chunk-YPWUSH72.js} +7 -7
  147. package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js → chunk-YSDFIY7N.js} +3 -3
  148. package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js → chunk-YSGTMDWC.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js → chunk-YVKZ3ANP.js} +2 -2
  150. package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js → chunk-Z5F6XZXE.js} +6 -6
  151. package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js → chunk-Z7RPDF2Y.js} +3 -3
  152. package/dist/cli-bundle/chunks/{chunk-W47SML5B.js → chunk-ZFTKYWIF.js} +7 -7
  153. package/dist/cli-bundle/chunks/{claim-SENTPZBN.js → claim-2BGBGSVI.js} +8 -8
  154. package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js → claim-5GU7OE67.js} +8 -8
  155. package/dist/cli-bundle/chunks/close-6YODBUIV.js +14 -0
  156. package/dist/cli-bundle/chunks/{close-424MX4CU.js → close-AFVKPR57.js} +7 -7
  157. package/dist/cli-bundle/chunks/{close-many-SWY34BII.js → close-many-7KLOSYLP.js} +119 -76
  158. package/dist/cli-bundle/chunks/close-many-7KLOSYLP.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{close-many-2IV4J2TR.js → close-many-JKUJMHLG.js} +120 -77
  160. package/dist/cli-bundle/chunks/close-many-JKUJMHLG.js.map +1 -0
  161. package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js → comments-DNWHEBOS.js} +9 -9
  162. package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js → comments-RW23R3VE.js} +9 -9
  163. package/dist/cli-bundle/chunks/{config-G74GISC4.js → config-AUM5WBYA.js} +7 -7
  164. package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js → config-OZWSA2NP.js} +7 -7
  165. package/dist/cli-bundle/chunks/{context-ZQY54JNS.js → context-OYXRGY7S.js} +12 -12
  166. package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js → context-PKCEHQY3.js} +12 -12
  167. package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js → contracts-L6ODXNUM.js} +3 -3
  168. package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js → contracts-X74F2GSM.js} +3 -3
  169. package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js → copy-6XOR3HKN.js} +5 -5
  170. package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js → copy-I4NCLBR4.js} +5 -5
  171. package/dist/cli-bundle/chunks/{create-VSKYSOCD.js → create-PM45M6PE.js} +12 -12
  172. package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +28 -0
  173. package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js → delete-7YXHYG67.js} +5 -5
  174. package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js → delete-LPISP43T.js} +5 -5
  175. package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js → deps-N2T26FME.js} +5 -5
  176. package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js → deps-WATKQDE3.js} +5 -5
  177. package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js → docs-6LQ3GLM7.js} +7 -7
  178. package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js → docs-Z3X6JZLT.js} +7 -7
  179. package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js → eval-6DCLG52D.js} +10 -10
  180. package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js → eval-Y3ZCUTHK.js} +10 -10
  181. package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js → extension-BNINIMT7.js} +11 -11
  182. package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js → extension-QWE4YYK5.js} +11 -11
  183. package/dist/cli-bundle/chunks/{files-5D65CHGE.js → files-6SGKHS6O.js} +7 -7
  184. package/dist/cli-bundle/chunks/{files-GPIG77EN.js → files-FUYPSOFJ.js} +7 -7
  185. package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js → focus-2Q3K76G2.js} +6 -6
  186. package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js → focus-ATLBWXXD.js} +6 -6
  187. package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js → gc-RUYEMNRF.js} +3 -3
  188. package/dist/cli-bundle/chunks/{gc-VZIXDL32.js → gc-TDWSDR66.js} +3 -3
  189. package/dist/cli-bundle/chunks/{get-IOVAN6RU.js → get-2WGLX74N.js} +10 -10
  190. package/dist/cli-bundle/chunks/{get-GIBRUUOP.js → get-LY6M2JIM.js} +10 -10
  191. package/dist/cli-bundle/chunks/{health-L2U3AFKV.js → health-4RKHYS3T.js} +115 -123
  192. package/dist/cli-bundle/chunks/health-4RKHYS3T.js.map +1 -0
  193. package/dist/cli-bundle/chunks/{health-MM7AWXYF.js → health-TMFVNYRA.js} +114 -122
  194. package/dist/cli-bundle/chunks/health-TMFVNYRA.js.map +7 -0
  195. package/dist/cli-bundle/chunks/history-CGNQJXFE.js +18 -0
  196. package/dist/cli-bundle/chunks/{history-IL7XCEX2.js → history-SGRRS72R.js} +8 -8
  197. package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js → history-compact-LOED43R3.js} +10 -10
  198. package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js → history-compact-V5DNAQHH.js} +10 -10
  199. package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js → history-redact-IRL7WJ3E.js} +9 -9
  200. package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +19 -0
  201. package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js → history-repair-4WVBVHFR.js} +10 -10
  202. package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js → history-repair-PGYQJMGD.js} +10 -10
  203. package/dist/cli-bundle/chunks/{init-F27NHENZ.js → init-4GESW7RM.js} +12 -12
  204. package/dist/cli-bundle/chunks/init-XIDPABA4.js +22 -0
  205. package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js → learnings-4BHWFFUV.js} +9 -9
  206. package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js → learnings-4FJY7WIW.js} +9 -9
  207. package/dist/cli-bundle/chunks/{list-HPMEKCAA.js → list-472TIOVK.js} +8 -8
  208. package/dist/cli-bundle/chunks/{list-VMPWTURB.js → list-D7BF5CL2.js} +8 -8
  209. package/dist/cli-bundle/chunks/{next-QM6YJIIS.js → next-D5STGWI2.js} +26 -23
  210. package/dist/cli-bundle/chunks/next-D5STGWI2.js.map +1 -0
  211. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js → next-SFQZVX2B.js} +25 -22
  212. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js.map → next-SFQZVX2B.js.map} +2 -2
  213. package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js → notes-6KNOSLIT.js} +9 -9
  214. package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js → notes-W4UEICGF.js} +9 -9
  215. package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js → plan-JO6V7BXO.js} +12 -12
  216. package/dist/cli-bundle/chunks/{plan-C5IMM335.js → plan-MJQW5XK3.js} +12 -12
  217. package/dist/cli-bundle/chunks/{profile-HUCENIEQ.js → profile-3TOTMUR4.js} +26 -18
  218. package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{profile-CCOKZ2IQ.js → profile-WIQY2KCV.js} +27 -19
  220. package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{register-list-query-XN4ZRHSV.js → register-list-query-ELBHCCFI.js} +179 -170
  222. package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js.map +7 -0
  223. package/dist/cli-bundle/chunks/{register-list-query-ROSNIL52.js → register-list-query-GAPQ6DM3.js} +180 -171
  224. package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +1 -0
  225. package/dist/cli-bundle/chunks/{register-mutation-KRLAHEL2.js → register-mutation-ROFE2YPC.js} +367 -361
  226. package/dist/cli-bundle/chunks/register-mutation-ROFE2YPC.js.map +7 -0
  227. package/dist/cli-bundle/chunks/{register-mutation-CFSB2MS3.js → register-mutation-SJWMVIJ2.js} +368 -362
  228. package/dist/cli-bundle/chunks/register-mutation-SJWMVIJ2.js.map +1 -0
  229. package/dist/cli-bundle/chunks/{register-operations-4PASGJDB.js → register-operations-IADFVH53.js} +309 -304
  230. package/dist/cli-bundle/chunks/register-operations-IADFVH53.js.map +7 -0
  231. package/dist/cli-bundle/chunks/{register-operations-MBN4KGUM.js → register-operations-MEKU3AKC.js} +310 -305
  232. package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js.map +1 -0
  233. package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js → register-setup-3QJY43CY.js} +15 -15
  234. package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js → register-setup-AJWUSSQX.js} +15 -15
  235. package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js → restore-44IHMMZZ.js} +9 -9
  236. package/dist/cli-bundle/chunks/restore-EXHU34EU.js +17 -0
  237. package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js → scheduling-shortcuts-OLHNLAZY.js} +12 -12
  238. package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js → scheduling-shortcuts-TSBK4AY5.js} +12 -12
  239. package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js → schema-IB2NZZWD.js} +7 -7
  240. package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js → schema-VBCELP5G.js} +7 -7
  241. package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js → search-7UBETML4.js} +10 -10
  242. package/dist/cli-bundle/chunks/{search-FP7MEU4S.js → search-R227JOL6.js} +10 -10
  243. package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js → stats-FAG7COEH.js} +6 -6
  244. package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js → stats-MCK7PLYS.js} +6 -6
  245. package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js → telemetry-DRPDZMAO.js} +4 -4
  246. package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js → telemetry-GVVUQSJQ.js} +4 -4
  247. package/dist/cli-bundle/chunks/{test-YCDAUBWF.js → test-QY44WAMR.js} +15 -15
  248. package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js → test-SY76DZTO.js} +15 -15
  249. package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js → test-all-QD6QAEG7.js} +17 -17
  250. package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js → test-all-USPJHXFR.js} +17 -17
  251. package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js → test-runs-MG5VIGSK.js} +4 -4
  252. package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js → test-runs-QIR5MJPL.js} +4 -4
  253. package/dist/cli-bundle/chunks/update-A7EICML6.js +24 -0
  254. package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js → update-IKJZWLQC.js} +15 -15
  255. package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js → update-many-BEMTDA2X.js} +28 -28
  256. package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js → update-many-RATAARHU.js} +28 -28
  257. package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js → upgrade-NWMR3VQL.js} +11 -11
  258. package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js → upgrade-VU46BLJZ.js} +11 -11
  259. package/dist/cli-bundle/chunks/{validate-W7H5TEDC.js → validate-GAJ6FUSI.js} +32 -22
  260. package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{validate-732RWS5W.js → validate-NRY6MFXN.js} +31 -21
  262. package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +7 -0
  263. package/dist/cli-bundle/main.js +180 -122
  264. package/dist/cli-bundle/main.js.map +3 -3
  265. package/dist/core/item/type-registry.js +29 -19
  266. package/dist/core/item/type-registry.js.map +1 -1
  267. package/dist/core/schema/runtime-schema.js +65 -54
  268. package/dist/core/schema/runtime-schema.js.map +1 -1
  269. package/dist/core/schema/status-defs-file.js +26 -3
  270. package/dist/core/schema/status-defs-file.js.map +1 -1
  271. package/dist/core/search/corpus.js +25 -19
  272. package/dist/core/search/corpus.js.map +1 -1
  273. package/dist/core/shared/memo.d.ts +12 -0
  274. package/dist/core/shared/memo.js +25 -0
  275. package/dist/core/shared/memo.js.map +1 -0
  276. package/dist/core/shared/serialization.js +24 -14
  277. package/dist/core/shared/serialization.js.map +1 -1
  278. package/dist/core/shared/time.js +26 -4
  279. package/dist/core/shared/time.js.map +1 -1
  280. package/dist/core/store/front-matter-cache.d.ts +5 -0
  281. package/dist/core/store/front-matter-cache.js +79 -20
  282. package/dist/core/store/front-matter-cache.js.map +1 -1
  283. package/dist/sdk/cli-contracts/flag-contracts.js +71 -99
  284. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  285. package/dist/sdk/compose.js +51 -42
  286. package/dist/sdk/compose.js.map +1 -1
  287. package/docs/AGENT_GUIDE.md +2 -2
  288. package/docs/ARCHITECTURE.md +2 -2
  289. package/docs/COMMANDS.md +8 -4
  290. package/docs/CONFIGURATION.md +1 -1
  291. package/docs/EXTENSIONS.md +12 -12
  292. package/docs/ONBOARDING.md +4 -2
  293. package/docs/README.md +2 -0
  294. package/docs/examples/starter-extension/README.md +11 -10
  295. package/marketplace.json +3 -3
  296. package/package.json +1 -1
  297. package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
  298. package/plugins/pm-claude/README.md +6 -3
  299. package/plugins/pm-claude/commands/pm-init.md +1 -1
  300. package/dist/cli-bundle/chunks/activity-WEIEMM73.js +0 -16
  301. package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +0 -1
  302. package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +0 -7
  303. package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +0 -7
  304. package/dist/cli-bundle/chunks/chunk-AIAIXG7I.js.map +0 -7
  305. package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +0 -1
  306. package/dist/cli-bundle/chunks/chunk-GFMSLORL.js.map +0 -7
  307. package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +0 -1
  308. package/dist/cli-bundle/chunks/chunk-JXAUVO6X.js.map +0 -7
  309. package/dist/cli-bundle/chunks/chunk-K2VYLVX4.js.map +0 -1
  310. package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +0 -1
  311. package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +0 -7
  312. package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +0 -7
  313. package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +0 -1
  314. package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +0 -7
  315. package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +0 -1
  316. package/dist/cli-bundle/chunks/chunk-YPKFV2JR.js.map +0 -1
  317. package/dist/cli-bundle/chunks/close-YCWQQPDS.js +0 -14
  318. package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +0 -1
  319. package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +0 -7
  320. package/dist/cli-bundle/chunks/create-XTMAPS7I.js +0 -28
  321. package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +0 -1
  322. package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +0 -7
  323. package/dist/cli-bundle/chunks/history-DD7L7BNL.js +0 -18
  324. package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +0 -19
  325. package/dist/cli-bundle/chunks/init-HHVQQP6C.js +0 -22
  326. package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +0 -1
  327. package/dist/cli-bundle/chunks/profile-CCOKZ2IQ.js.map +0 -1
  328. package/dist/cli-bundle/chunks/profile-HUCENIEQ.js.map +0 -7
  329. package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +0 -1
  330. package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +0 -7
  331. package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +0 -1
  332. package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +0 -7
  333. package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +0 -7
  334. package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +0 -1
  335. package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +0 -17
  336. package/dist/cli-bundle/chunks/update-MTCFES6X.js +0 -24
  337. package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +0 -7
  338. package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +0 -1
  339. /package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js.map → activity-5YWLSPGE.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{activity-WEIEMM73.js.map → activity-BIML7K2D.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js.map → aggregate-2V2M3JZU.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js.map → aggregate-EK7DXML7.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{append-UBM632FK.js.map → append-EZESUVJT.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{append-H32VOR2Y.js.map → append-JFG4WQMG.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js.map → chunk-32IUNTG4.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js.map → chunk-3W2HJKJX.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js.map → chunk-4PFVUUYV.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js.map → chunk-5E7N4T2Z.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-S62UANU7.js.map → chunk-5IZUBZBR.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js.map → chunk-5JIWFWOZ.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js.map → chunk-67LARBDL.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js.map → chunk-6CDCWKSX.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js.map → chunk-6NYJGMTY.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js.map → chunk-7CLLC75T.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js.map → chunk-7LYO6S5A.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js.map → chunk-A3OQ7TFW.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js.map → chunk-AIKU3IIL.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js.map → chunk-BE2SR6QL.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js.map → chunk-ECU6MMTQ.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js.map → chunk-EQURFOMH.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js.map → chunk-ER4ME5U2.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js.map → chunk-ERG65A2L.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js.map → chunk-F6WNBITZ.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js.map → chunk-FH2H3CBD.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js.map → chunk-FUFFPIYA.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js.map → chunk-FZJM2TXF.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js.map → chunk-GUYNUXQT.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js.map → chunk-GVJE5T7Q.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js.map → chunk-HQAF23Q2.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js.map → chunk-JBZ2NTKX.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js.map → chunk-K5DT2YKM.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js.map → chunk-KEZOIPCR.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-2227673O.js.map → chunk-LBE5QFMZ.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js.map → chunk-LOWVNZBZ.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js.map → chunk-MDHWWBNZ.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js.map → chunk-MEZZZBYX.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js.map → chunk-NOIEVOK5.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js.map → chunk-NZ7QIUP5.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js.map → chunk-P5L7Z2O6.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js.map → chunk-PULUSQAV.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js.map → chunk-QCDTQCMW.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js.map → chunk-SU2E4AWU.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js.map → chunk-SU3TB4NS.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js.map → chunk-SYE6WMV6.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js.map → chunk-T3P7PMZP.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js.map → chunk-T4XBKJ3F.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js.map → chunk-U5TR4N7J.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js.map → chunk-UMNQZS4H.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js.map → chunk-WJA3PXW7.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js.map → chunk-WRYERRZX.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js.map → chunk-WYOIIFSE.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js.map → chunk-YPWUSH72.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js.map → chunk-YSDFIY7N.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js.map → chunk-YSGTMDWC.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js.map → chunk-YVKZ3ANP.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js.map → chunk-Z5F6XZXE.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js.map → chunk-Z7RPDF2Y.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-W47SML5B.js.map → chunk-ZFTKYWIF.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{claim-SENTPZBN.js.map → claim-2BGBGSVI.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js.map → claim-5GU7OE67.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{close-YCWQQPDS.js.map → close-6YODBUIV.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{close-424MX4CU.js.map → close-AFVKPR57.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js.map → comments-DNWHEBOS.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js.map → comments-RW23R3VE.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{config-G74GISC4.js.map → config-AUM5WBYA.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js.map → config-OZWSA2NP.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{context-ZQY54JNS.js.map → context-OYXRGY7S.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js.map → context-PKCEHQY3.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js.map → contracts-L6ODXNUM.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js.map → contracts-X74F2GSM.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js.map → copy-6XOR3HKN.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js.map → copy-I4NCLBR4.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{create-VSKYSOCD.js.map → create-PM45M6PE.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{create-XTMAPS7I.js.map → create-Z7YCH3BE.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js.map → delete-7YXHYG67.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js.map → delete-LPISP43T.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js.map → deps-N2T26FME.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js.map → deps-WATKQDE3.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js.map → docs-6LQ3GLM7.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js.map → docs-Z3X6JZLT.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js.map → eval-6DCLG52D.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js.map → eval-Y3ZCUTHK.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js.map → extension-BNINIMT7.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js.map → extension-QWE4YYK5.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{files-5D65CHGE.js.map → files-6SGKHS6O.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{files-GPIG77EN.js.map → files-FUYPSOFJ.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js.map → focus-2Q3K76G2.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js.map → focus-ATLBWXXD.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js.map → gc-RUYEMNRF.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{gc-VZIXDL32.js.map → gc-TDWSDR66.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{get-IOVAN6RU.js.map → get-2WGLX74N.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{get-GIBRUUOP.js.map → get-LY6M2JIM.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{history-DD7L7BNL.js.map → history-CGNQJXFE.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{history-IL7XCEX2.js.map → history-SGRRS72R.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js.map → history-compact-LOED43R3.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js.map → history-compact-V5DNAQHH.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js.map → history-redact-IRL7WJ3E.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{history-redact-IX4YEWMY.js.map → history-redact-N3JK7VBW.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js.map → history-repair-4WVBVHFR.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js.map → history-repair-PGYQJMGD.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{init-F27NHENZ.js.map → init-4GESW7RM.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{init-HHVQQP6C.js.map → init-XIDPABA4.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js.map → learnings-4BHWFFUV.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js.map → learnings-4FJY7WIW.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{list-HPMEKCAA.js.map → list-472TIOVK.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{list-VMPWTURB.js.map → list-D7BF5CL2.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js.map → notes-6KNOSLIT.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js.map → notes-W4UEICGF.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js.map → plan-JO6V7BXO.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{plan-C5IMM335.js.map → plan-MJQW5XK3.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js.map → register-setup-3QJY43CY.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js.map → register-setup-AJWUSSQX.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js.map → restore-44IHMMZZ.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{restore-5UEAGG3W.js.map → restore-EXHU34EU.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js.map → scheduling-shortcuts-OLHNLAZY.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js.map → scheduling-shortcuts-TSBK4AY5.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js.map → schema-IB2NZZWD.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js.map → schema-VBCELP5G.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js.map → search-7UBETML4.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{search-FP7MEU4S.js.map → search-R227JOL6.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js.map → stats-FAG7COEH.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js.map → stats-MCK7PLYS.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js.map → telemetry-DRPDZMAO.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js.map → telemetry-GVVUQSJQ.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{test-YCDAUBWF.js.map → test-QY44WAMR.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js.map → test-SY76DZTO.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js.map → test-all-QD6QAEG7.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js.map → test-all-USPJHXFR.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js.map → test-runs-MG5VIGSK.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js.map → test-runs-QIR5MJPL.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{update-MTCFES6X.js.map → update-A7EICML6.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js.map → update-IKJZWLQC.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js.map → update-many-BEMTDA2X.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js.map → update-many-RATAARHU.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js.map → upgrade-NWMR3VQL.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js.map → upgrade-VU46BLJZ.js.map} +0 -0
@@ -8,26 +8,27 @@ import {
8
8
  getGlobalOptions,
9
9
  invalidateSearchCachesForMutation,
10
10
  normalizeCreateOptions,
11
- normalizeUpdateOptions
12
- } from "./chunk-SYNKD3ZG.js";
11
+ normalizeUpdateOptions,
12
+ readOptionString
13
+ } from "./chunk-HB4FAT3O.js";
13
14
  import {
14
15
  printError,
15
16
  printResult,
16
17
  writeStdout
17
- } from "./chunk-5PGBHRY3.js";
18
- import "./chunk-7TH5NMVB.js";
18
+ } from "./chunk-EQURFOMH.js";
19
+ import "./chunk-XRYSCRZR.js";
19
20
  import {
20
21
  CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
21
22
  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";
23
+ } from "./chunk-RAHINBVP.js";
24
+ import "./chunk-6KRFL33E.js";
25
+ import "./chunk-3W2HJKJX.js";
26
+ import "./chunk-AJHYQCBJ.js";
26
27
  import {
27
28
  BUILTIN_ITEM_TYPE_VALUES,
28
29
  EXIT_CODE,
29
30
  PmCliError
30
- } from "./chunk-7NSPKJUS.js";
31
+ } from "./chunk-KHVGM5CS.js";
31
32
 
32
33
  // dist/cli/register-mutation.js
33
34
  import { Option } from "commander";
@@ -109,7 +110,7 @@ function isPureSnakeCaseAlias(canonicalFlagSpec, aliasFlagSpec) {
109
110
  !(function() {
110
111
  try {
111
112
  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] = "6581ddaf-4643-5ccc-9aff-1569d1759846");
113
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "506e1f95-1444-5306-9a5e-c1fb3726b2df");
113
114
  } catch (e2) {
114
115
  }
115
116
  })();
@@ -121,6 +122,11 @@ function addHiddenOption(command, flags, description, repeatable) {
121
122
  }
122
123
  command.addOption(option);
123
124
  }
125
+ function addHiddenOptions(command, aliases, repeatable) {
126
+ for (const [flags, description] of aliases) {
127
+ addHiddenOption(command, flags, description, repeatable);
128
+ }
129
+ }
124
130
  var SCHEMA_SHORTHAND_RESERVED_PREFIXES = ["add-", "apply-", "list-", "remove-", "show-"];
125
131
  var SCHEMA_SHORTHAND_RESERVED_TOKENS = /* @__PURE__ */ new Set([
126
132
  "field",
@@ -424,9 +430,6 @@ function pickStringOption(...candidates) {
424
430
  }
425
431
  return void 0;
426
432
  }
427
- function readOptionString(options, key) {
428
- return typeof options[key] === "string" ? options[key] : void 0;
429
- }
430
433
  function stringArrayOption(value) {
431
434
  if (Array.isArray(value)) {
432
435
  return value;
@@ -479,7 +482,7 @@ async function runCreateAction(typeOrTitle, secondTitle, options, command) {
479
482
  delete options.bodyFile;
480
483
  }
481
484
  const normalized = normalizeCreateOptions(options, { requireType: false });
482
- const { runCreate } = await import("./create-XTMAPS7I.js");
485
+ const { runCreate } = await import("./create-Z7YCH3BE.js");
483
486
  const result = await runCreate(normalized, globalOptions);
484
487
  await invalidateSearchCachesForMutation(globalOptions, result);
485
488
  printResult(result, globalOptions);
@@ -512,7 +515,7 @@ function buildCloseManyListOptions(options) {
512
515
  async function runCloseManyAction(options, command) {
513
516
  const globalOptions = getGlobalOptions(command);
514
517
  const startedAt = Date.now();
515
- const { runCloseMany } = await import("./close-many-SWY34BII.js");
518
+ const { runCloseMany } = await import("./close-many-7KLOSYLP.js");
516
519
  const result = await runCloseMany({
517
520
  status: readOptionString(options, "filterStatus"),
518
521
  list: buildCloseManyListOptions(options),
@@ -534,6 +537,46 @@ async function runCloseManyAction(options, command) {
534
537
  printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
535
538
  }
536
539
  }
540
+ async function runUpdateManyAction(options, command) {
541
+ const globalOptions = getGlobalOptions(command);
542
+ const startedAt = Date.now();
543
+ const { runUpdateMany } = await import("./update-many-RATAARHU.js");
544
+ const result = await runUpdateMany({
545
+ status: readOptionString(options, "filterStatus"),
546
+ list: buildUpdateManyListOptions(options),
547
+ update: normalizeUpdateOptions(extractUpdateManyMutationOptionSource(options)),
548
+ dryRun: options.dryRun === true ? true : void 0,
549
+ rollback: readOptionString(options, "rollback"),
550
+ checkpoint: options.checkpoint === false ? false : void 0
551
+ }, globalOptions);
552
+ await invalidateSearchCachesForMutation(globalOptions, result);
553
+ printResult(result, globalOptions);
554
+ if (globalOptions.profile) {
555
+ printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
556
+ }
557
+ }
558
+ async function runCloseAction(id, text, options, command) {
559
+ const globalOptions = getGlobalOptions(command);
560
+ const startedAt = Date.now();
561
+ const { runClose } = await import("./close-6YODBUIV.js");
562
+ 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;
563
+ const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
564
+ const result = await runClose(id, resolvedText, {
565
+ author: readOptionString(options, "author"),
566
+ message: readOptionString(options, "message"),
567
+ validateClose: options.validateClose === true ? "warn" : readOptionString(options, "validateClose"),
568
+ force: Boolean(options.force),
569
+ duplicateOf: readOptionString(options, "duplicateOf"),
570
+ resolution: readOptionString(options, "resolution"),
571
+ expectedResult: pickStringOption(options.expectedResult, options.expected_result, options.expected),
572
+ actualResult: pickStringOption(options.actualResult, options.actual_result, options.actual)
573
+ }, globalOptions);
574
+ await invalidateSearchCachesForMutation(globalOptions, result);
575
+ printResult(result, globalOptions);
576
+ if (globalOptions.profile) {
577
+ printError(`profile:command=close took_ms=${Date.now() - startedAt}`);
578
+ }
579
+ }
537
580
  function normalizePlanAliases(options) {
538
581
  const planOptions = { ...options };
539
582
  const aliasPairs = [
@@ -600,7 +643,7 @@ function parsePlanReorderTo(normalizedSubcommand, reorderToken) {
600
643
  async function runPlanAction(subcommand, id, stepRef, reorderToken, options, command) {
601
644
  const globalOptions = getGlobalOptions(command);
602
645
  const startedAt = Date.now();
603
- const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-C5IMM335.js");
646
+ const { runPlan, PLAN_SUBCOMMANDS } = await import("./plan-MJQW5XK3.js");
604
647
  const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
605
648
  assertKnownPlanSubcommand(subcommand, normalizedSubcommand, PLAN_SUBCOMMANDS);
606
649
  const planOptions = normalizePlanAliases(options);
@@ -635,7 +678,7 @@ function parseNonNegativeIntFlag(raw, flag) {
635
678
  async function runHistoryCompactAction(id, options, command) {
636
679
  const globalOptions = getGlobalOptions(command);
637
680
  const startedAt = Date.now();
638
- const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-MV25P7DM.js");
681
+ const { runHistoryCompact, runHistoryCompactBulk, assertHistoryCompactTarget } = await import("./history-compact-LOED43R3.js");
639
682
  const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : void 0;
640
683
  const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
641
684
  const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
@@ -686,7 +729,7 @@ function splitCollectedCommaList(raw) {
686
729
  async function runSchemaAction(subcommand, name, options, command) {
687
730
  const globalOptions = getGlobalOptions(command);
688
731
  const startedAt = Date.now();
689
- const schemaModule = await import("./schema-UE5KKAUX.js");
732
+ const schemaModule = await import("./schema-VBCELP5G.js");
690
733
  const { SCHEMA_SUBCOMMANDS } = schemaModule;
691
734
  let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
692
735
  let typeName = name;
@@ -766,7 +809,7 @@ async function runCommentsAction(id, text, options, command) {
766
809
  const globalOptions = getGlobalOptions(command);
767
810
  const startedAt = Date.now();
768
811
  const sources = resolveCommentSources(text, options);
769
- const { runComments } = await import("./comments-4FGNTSNV.js");
812
+ const { runComments } = await import("./comments-DNWHEBOS.js");
770
813
  const result = await runComments(id, {
771
814
  add: sources.add,
772
815
  stdin: sources.readFromStdin,
@@ -787,59 +830,301 @@ async function runCommentsAction(id, text, options, command) {
787
830
  printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
788
831
  }
789
832
  }
833
+ async function runCopyAction(id, options, command) {
834
+ const globalOptions = getGlobalOptions(command);
835
+ const startedAt = Date.now();
836
+ const { runCopy } = await import("./copy-I4NCLBR4.js");
837
+ const result = await runCopy(id, {
838
+ title: readOptionString(options, "title"),
839
+ author: readOptionString(options, "author"),
840
+ message: readOptionString(options, "message")
841
+ }, globalOptions);
842
+ await invalidateSearchCachesForMutation(globalOptions, result);
843
+ printResult(result, globalOptions);
844
+ if (globalOptions.profile) {
845
+ printError(`profile:command=copy took_ms=${Date.now() - startedAt}`);
846
+ }
847
+ }
848
+ async function runFocusAction(id, options, command) {
849
+ const globalOptions = getGlobalOptions(command);
850
+ const startedAt = Date.now();
851
+ const { runFocus } = await import("./focus-ATLBWXXD.js");
852
+ const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
853
+ printResult(result, globalOptions);
854
+ if (globalOptions.profile) {
855
+ printError(`profile:command=focus took_ms=${Date.now() - startedAt}`);
856
+ }
857
+ }
858
+ async function runUpdateAction(id, options, command) {
859
+ const globalOptions = getGlobalOptions(command);
860
+ const startedAt = Date.now();
861
+ if (typeof options.bodyFile === "string") {
862
+ options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
863
+ delete options.bodyFile;
864
+ }
865
+ const { runUpdate } = await import("./update-A7EICML6.js");
866
+ const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
867
+ await invalidateSearchCachesForMutation(globalOptions, result);
868
+ printResult(result, globalOptions);
869
+ if (globalOptions.profile) {
870
+ printError(`profile:command=update took_ms=${Date.now() - startedAt}`);
871
+ }
872
+ }
873
+ async function runDeleteAction(id, options, command) {
874
+ const globalOptions = getGlobalOptions(command);
875
+ const startedAt = Date.now();
876
+ const { runDelete } = await import("./delete-7YXHYG67.js");
877
+ const result = await runDelete(id, {
878
+ author: readOptionString(options, "author"),
879
+ message: readOptionString(options, "message"),
880
+ force: Boolean(options.force),
881
+ dryRun: options.dryRun === true
882
+ }, globalOptions);
883
+ if (result.dry_run !== true) {
884
+ await invalidateSearchCachesForMutation(globalOptions, result);
885
+ }
886
+ printResult(result, globalOptions);
887
+ if (globalOptions.profile) {
888
+ printError(`profile:command=delete took_ms=${Date.now() - startedAt}`);
889
+ }
890
+ }
891
+ function resolveSingleTextSource(label, positional, options) {
892
+ const addFromOption = readOptionString(options, "add");
893
+ const addFromPositional = typeof positional === "string" ? positional : void 0;
894
+ if (addFromOption !== void 0 && addFromPositional !== void 0) {
895
+ throw new PmCliError(`Specify ${label} text either as positional [text] or with --add, not both`, EXIT_CODE.USAGE);
896
+ }
897
+ return addFromOption ?? addFromPositional;
898
+ }
899
+ function resolveAppendBody(text, options) {
900
+ const bodyFromOption = readOptionString(options, "body");
901
+ const bodyFromAlias = readOptionString(options, "text");
902
+ const bodyFromPositional = typeof text === "string" ? text : void 0;
903
+ const bodySourceCount = [bodyFromOption, bodyFromAlias, bodyFromPositional].filter((value) => value !== void 0).length;
904
+ if (bodySourceCount > 1) {
905
+ throw new PmCliError("Specify append text with exactly one source: positional [text], --body, or --text", EXIT_CODE.USAGE);
906
+ }
907
+ const resolvedBody = bodyFromOption ?? bodyFromAlias ?? bodyFromPositional;
908
+ if (resolvedBody === void 0) {
909
+ throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
910
+ }
911
+ return resolvedBody;
912
+ }
913
+ async function runAppendAction(id, text, options, command) {
914
+ const globalOptions = getGlobalOptions(command);
915
+ const startedAt = Date.now();
916
+ const { runAppend } = await import("./append-EZESUVJT.js");
917
+ const result = await runAppend(id, {
918
+ body: resolveAppendBody(text, options),
919
+ author: readOptionString(options, "author"),
920
+ message: readOptionString(options, "message"),
921
+ force: Boolean(options.force)
922
+ }, globalOptions);
923
+ await invalidateSearchCachesForMutation(globalOptions, result);
924
+ printResult(result, globalOptions);
925
+ if (globalOptions.profile) {
926
+ printError(`profile:command=append took_ms=${Date.now() - startedAt}`);
927
+ }
928
+ }
929
+ async function runRestoreAction(id, target, options, command) {
930
+ const globalOptions = getGlobalOptions(command);
931
+ const startedAt = Date.now();
932
+ const { runRestore } = await import("./restore-EXHU34EU.js");
933
+ const result = await runRestore(id, target, {
934
+ author: readOptionString(options, "author"),
935
+ message: readOptionString(options, "message"),
936
+ force: Boolean(options.force)
937
+ }, globalOptions);
938
+ await invalidateSearchCachesForMutation(globalOptions, result);
939
+ printResult(result, globalOptions);
940
+ if (globalOptions.profile) {
941
+ printError(`profile:command=restore took_ms=${Date.now() - startedAt}`);
942
+ }
943
+ }
944
+ async function runProfileAction(subcommand, name, options, command) {
945
+ const globalOptions = getGlobalOptions(command);
946
+ const startedAt = Date.now();
947
+ const profileModule = await import("./profile-3TOTMUR4.js");
948
+ const { PROFILE_SUBCOMMANDS } = profileModule;
949
+ const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
950
+ if (!normalizedSubcommand) {
951
+ throw new PmCliError(`pm profile requires a subcommand. Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
952
+ code: "missing_required_argument",
953
+ examples: ["pm profile list", "pm profile show agile", "pm profile apply agile --dry-run", "pm profile lint agile"]
954
+ });
955
+ }
956
+ if (!PROFILE_SUBCOMMANDS.includes(normalizedSubcommand)) {
957
+ throw new PmCliError(`Unknown pm profile subcommand "${subcommand}". Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
958
+ }
959
+ const result = await dispatchProfileSubcommand(profileModule, normalizedSubcommand, name, options, globalOptions);
960
+ if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
961
+ printResult(result, globalOptions);
962
+ } else if (!globalOptions.quiet) {
963
+ renderProfileResultHuman(profileModule, result);
964
+ }
965
+ if (result.action === "lint" && !result.ok) {
966
+ process.exitCode = EXIT_CODE.GENERIC_FAILURE;
967
+ }
968
+ if (globalOptions.profile) {
969
+ printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
970
+ }
971
+ }
972
+ async function runNotesAction(id, text, options, command) {
973
+ const globalOptions = getGlobalOptions(command);
974
+ const startedAt = Date.now();
975
+ const add = resolveSingleTextSource("note", text, options);
976
+ const { runNotes } = await import("./notes-6KNOSLIT.js");
977
+ const result = await runNotes(id, {
978
+ add,
979
+ limit: readOptionString(options, "limit"),
980
+ author: readOptionString(options, "author"),
981
+ message: readOptionString(options, "message"),
982
+ allowAuditComment: Boolean(options.allowAuditNote || options.allowAuditComment),
983
+ force: Boolean(options.force)
984
+ }, globalOptions);
985
+ if (typeof add === "string") {
986
+ await invalidateSearchCachesForMutation(globalOptions, result);
987
+ }
988
+ printResult(result, globalOptions);
989
+ if (globalOptions.profile) {
990
+ printError(`profile:command=notes took_ms=${Date.now() - startedAt}`);
991
+ }
992
+ }
993
+ async function runLearningsAction(id, text, options, command) {
994
+ const globalOptions = getGlobalOptions(command);
995
+ const startedAt = Date.now();
996
+ const add = resolveSingleTextSource("learning", text, options);
997
+ const { runLearnings } = await import("./learnings-4FJY7WIW.js");
998
+ const result = await runLearnings(id, {
999
+ add,
1000
+ limit: readOptionString(options, "limit"),
1001
+ author: readOptionString(options, "author"),
1002
+ message: readOptionString(options, "message"),
1003
+ allowAuditComment: Boolean(options.allowAuditLearning || options.allowAuditComment),
1004
+ force: Boolean(options.force)
1005
+ }, globalOptions);
1006
+ if (typeof add === "string") {
1007
+ await invalidateSearchCachesForMutation(globalOptions, result);
1008
+ }
1009
+ printResult(result, globalOptions);
1010
+ if (globalOptions.profile) {
1011
+ printError(`profile:command=learnings took_ms=${Date.now() - startedAt}`);
1012
+ }
1013
+ }
1014
+ function readStringArrayOption(options, key) {
1015
+ return stringArrayOption(options[key]) ?? [];
1016
+ }
1017
+ async function runFilesAction(id, options, command) {
1018
+ const globalOptions = getGlobalOptions(command);
1019
+ const startedAt = Date.now();
1020
+ const addValues = readStringArrayOption(options, "add");
1021
+ const addGlobValues = readStringArrayOption(options, "addGlob");
1022
+ const removeValues = readStringArrayOption(options, "remove");
1023
+ const migrateValues = readStringArrayOption(options, "migrate");
1024
+ const { runFiles } = await import("./files-FUYPSOFJ.js");
1025
+ const result = await runFiles(id, {
1026
+ add: addValues,
1027
+ addGlob: addGlobValues,
1028
+ remove: removeValues,
1029
+ migrate: migrateValues,
1030
+ note: readOptionString(options, "note"),
1031
+ list: Boolean(options.list),
1032
+ appendStable: Boolean(options.appendStable),
1033
+ validatePaths: Boolean(options.validatePaths),
1034
+ audit: Boolean(options.audit),
1035
+ author: readOptionString(options, "author"),
1036
+ message: readOptionString(options, "message"),
1037
+ force: Boolean(options.force)
1038
+ }, globalOptions);
1039
+ if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1040
+ await invalidateSearchCachesForMutation(globalOptions, result);
1041
+ }
1042
+ printResult(result, globalOptions);
1043
+ if (globalOptions.profile) {
1044
+ printError(`profile:command=files took_ms=${Date.now() - startedAt}`);
1045
+ }
1046
+ }
1047
+ async function runFilesDiscoverAction(id, options, command) {
1048
+ const globalOptions = getGlobalOptions(command);
1049
+ const startedAt = Date.now();
1050
+ const mergedOptions = { ...command.optsWithGlobals(), ...options };
1051
+ const { runFilesDiscover } = await import("./files-FUYPSOFJ.js");
1052
+ const result = await runFilesDiscover(id, {
1053
+ apply: Boolean(mergedOptions.apply),
1054
+ note: readOptionString(mergedOptions, "note"),
1055
+ appendStable: Boolean(mergedOptions.appendStable),
1056
+ author: readOptionString(mergedOptions, "author"),
1057
+ message: readOptionString(mergedOptions, "message"),
1058
+ force: Boolean(mergedOptions.force)
1059
+ }, globalOptions);
1060
+ if (result.changed) {
1061
+ await invalidateSearchCachesForMutation(globalOptions, result);
1062
+ }
1063
+ printResult(result, globalOptions);
1064
+ if (globalOptions.profile) {
1065
+ printError(`profile:command=files.discover took_ms=${Date.now() - startedAt}`);
1066
+ }
1067
+ }
1068
+ async function runDocsAction(id, options, command) {
1069
+ const globalOptions = getGlobalOptions(command);
1070
+ const startedAt = Date.now();
1071
+ const addValues = readStringArrayOption(options, "add");
1072
+ const addGlobValues = readStringArrayOption(options, "addGlob");
1073
+ const removeValues = readStringArrayOption(options, "remove");
1074
+ const migrateValues = readStringArrayOption(options, "migrate");
1075
+ const { runDocs } = await import("./docs-Z3X6JZLT.js");
1076
+ const result = await runDocs(id, {
1077
+ add: addValues,
1078
+ addGlob: addGlobValues,
1079
+ remove: removeValues,
1080
+ migrate: migrateValues,
1081
+ note: readOptionString(options, "note"),
1082
+ list: Boolean(options.list),
1083
+ validatePaths: Boolean(options.validatePaths),
1084
+ audit: Boolean(options.audit),
1085
+ author: readOptionString(options, "author"),
1086
+ message: readOptionString(options, "message"),
1087
+ force: Boolean(options.force)
1088
+ }, globalOptions);
1089
+ if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1090
+ await invalidateSearchCachesForMutation(globalOptions, result);
1091
+ }
1092
+ printResult(result, globalOptions);
1093
+ if (globalOptions.profile) {
1094
+ printError(`profile:command=docs took_ms=${Date.now() - startedAt}`);
1095
+ }
1096
+ }
1097
+ async function runDepsAction(id, options, command) {
1098
+ const globalOptions = getGlobalOptions(command);
1099
+ const startedAt = Date.now();
1100
+ const { runDeps } = await import("./deps-N2T26FME.js");
1101
+ const result = await runDeps(id, {
1102
+ format: options.format,
1103
+ maxDepth: readOptionString(options, "maxDepth"),
1104
+ collapse: options.collapse,
1105
+ summary: options.summary === true
1106
+ }, globalOptions);
1107
+ printResult(result, globalOptions);
1108
+ if (globalOptions.profile) {
1109
+ printError(`profile:command=deps took_ms=${Date.now() - startedAt}`);
1110
+ }
1111
+ }
790
1112
  function registerMutationCommands(program) {
791
1113
  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
1114
  registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
793
1115
  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);
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) => {
795
- const globalOptions = getGlobalOptions(command);
796
- const startedAt = Date.now();
797
- const { runCopy } = await import("./copy-TLW7JTQT.js");
798
- const result = await runCopy(id, {
799
- title: typeof options.title === "string" ? options.title : void 0,
800
- author: typeof options.author === "string" ? options.author : void 0,
801
- message: typeof options.message === "string" ? options.message : void 0
802
- }, globalOptions);
803
- await invalidateSearchCachesForMutation(globalOptions, result);
804
- printResult(result, globalOptions);
805
- if (globalOptions.profile) {
806
- printError(`profile:command=copy took_ms=${Date.now() - startedAt}`);
807
- }
808
- });
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) => {
810
- const globalOptions = getGlobalOptions(command);
811
- const startedAt = Date.now();
812
- const { runFocus } = await import("./focus-C3PEJV2C.js");
813
- const result = await runFocus(id, { clear: options.clear === true }, globalOptions);
814
- printResult(result, globalOptions);
815
- if (globalOptions.profile) {
816
- printError(`profile:command=focus took_ms=${Date.now() - startedAt}`);
817
- }
818
- });
1116
+ program.command("copy").argument("<id>", "Source item id").option("--title <value>", "Optional title override for the copied item").option("--author <value>", "Mutation author").option("--message <value>", "History message").description("Copy an item into a new item id while resetting lifecycle fields.").action(runCopyAction);
1117
+ program.command("focus").argument("[id]", "Item id to focus (omit to show current focus)").option("--clear", "Clear the focused item").description("Set/clear/show the session focused item that new items default --parent to.").action(runFocusAction);
819
1118
  const updateCommand = program.command("update").argument("<id>", "Item id").description("Update item fields and metadata.");
820
1119
  registerCommanderOptionContracts(updateCommand, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
821
1120
  updateCommand.option("--body-file <path>", "Load the item markdown body from a file (mutually exclusive with --body)").option("--replace-deps", "Atomically replace dependency entries with the provided --dep values").option("--replace-tests", "Atomically replace linked test entries with the provided --test values").option("--clear-deps", "Clear dependency entries").option("--clear-comments", "Clear comments").option("--clear-notes", "Clear notes").option("--clear-learnings", "Clear learnings").option("--clear-files", "Clear linked files").option("--clear-tests", "Clear linked tests").option("--clear-docs", "Clear linked docs").option("--clear-reminders", "Clear reminders").option("--clear-events", "Clear events").option("--clear-type-options", "Clear type options").option("--allow-audit-update", "Allow non-owner metadata-only audit updates without requiring --force").option("--allow-audit-dep-update", "Allow non-owner append-only dependency updates without requiring --force").option("--force", "Force ownership override");
822
1121
  addHiddenOption(updateCommand, "--allow_audit_update", "Alias for --allow-audit-update", false);
823
1122
  addHiddenOption(updateCommand, "--allow_audit_dep_update", "Alias for --allow-audit-dep-update", false);
824
- updateCommand.action(async (id, options, command) => {
825
- const globalOptions = getGlobalOptions(command);
826
- const startedAt = Date.now();
827
- if (typeof options.bodyFile === "string") {
828
- options.body = await resolveBodyFileContent(options.bodyFile, options.body !== void 0 ? String(options.body) : void 0);
829
- delete options.bodyFile;
830
- }
831
- const { runUpdate } = await import("./update-MTCFES6X.js");
832
- const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
833
- await invalidateSearchCachesForMutation(globalOptions, result);
834
- printResult(result, globalOptions);
835
- if (globalOptions.profile) {
836
- printError(`profile:command=update took_ms=${Date.now() - startedAt}`);
837
- }
838
- });
1123
+ updateCommand.action(runUpdateAction);
839
1124
  const updateManyCommand = program.command("update-many").description("Bulk-update matched items with dry-run plans and rollback checkpoints.").option("--filter-status <value>", "Filter by status before applying updates").option("--filter-type <value>", "Filter by item type before applying updates").option("--filter-tag <value>", "Filter by tag before applying updates").option("--filter-priority <value>", "Filter by priority before applying updates").option("--filter-deadline-before <value>", "Filter by deadline upper bound before applying updates").option("--filter-deadline-after <value>", "Filter by deadline lower bound before applying updates").option("--filter-updated-after <value>", "Filter by updated_at lower bound before applying updates (ISO/relative)").option("--filter-updated-before <value>", "Filter by updated_at upper bound before applying updates (ISO/relative)").option("--filter-created-after <value>", "Filter by created_at lower bound before applying updates (ISO/relative)").option("--filter-created-before <value>", "Filter by created_at upper bound before applying updates (ISO/relative)").option("--filter-assignee <value>", "Filter by assignee before applying updates").option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before applying updates").option("--filter-parent <value>", "Filter by parent item ID before applying updates").option("--filter-sprint <value>", "Filter by sprint before applying updates").option("--filter-release <value>", "Filter by release before applying updates").option("--filter-ac-missing", "Select only items missing acceptance_criteria (bulk backfill)").option("--filter-estimates-missing", "Select only items missing estimated_minutes (bulk backfill)").option("--filter-resolution-missing", "Select only terminal items missing resolution (bulk backfill)").option("--filter-metadata-missing", "Select only items missing any tracked metadata (AC, estimate, or resolution)");
840
1125
  registerBulkContentAndGovernanceFilters(updateManyCommand, "applying updates");
841
1126
  updateManyCommand.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)").option("--limit <n>", "Limit matched item count before apply/preview").option("--offset <n>", "Skip first n matched rows before apply/preview").option("--dry-run", "Preview per-item diffs and checkpoint intent without mutating").option("--rollback <value>", "Rollback a prior update-many checkpoint ID").option("--no-checkpoint", "Disable checkpoint creation during apply mode").option("--title, -t <value>", "Set title").option("--description, -d <value>", "Set description").option("--body, -b <value>", "Set body (allow empty string)").option("--status, -s <value>", "Set status (use close command for closed)").option("--priority, -p <value>", "Set priority").option("--type <value>", "Set type").option("--tags <value>", "Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively.").option("--add-tags <value>", "Add tags additively without replacing existing (repeatable; CSV accepted)", collect).option("--remove-tags <value>", "Remove tags from the existing list (repeatable; CSV accepted)", collect).option("--deadline <value>", "Set deadline (ISO/date string or relative)").option("--estimate, --estimated-minutes <value>", "Set estimated minutes").option("--acceptance-criteria <value>", "Set acceptance criteria").option("--ac <value>", "Alias for --acceptance-criteria").option("--definition-of-ready <value>", "Set definition of ready").option("--order <value>", "Set planning order/rank integer").option("--rank <value>", "Alias for --order").option("--goal <value>", "Set goal identifier").option("--objective <value>", "Set objective identifier").option("--value <value>", "Set business value summary").option("--impact <value>", "Set business impact summary").option("--outcome <value>", "Set expected outcome summary").option("--why-now <value>", "Set why-now rationale").option("--assignee <value>", "Set assignee").option("--parent <value>", "Set parent item ID").option("--reviewer <value>", "Set reviewer").option("--risk <value>", "Set risk level").option("--confidence <value>", "Set confidence level").option("--sprint <value>", "Set sprint identifier").option("--release <value>", "Set release identifier").option("--blocked-by <value>", "Set blocked-by item ID or reason").option("--blocked-reason <value>", "Set blocked reason").option("--unblock-note <value>", "Set unblock rationale note").option("--reporter <value>", "Set issue reporter").option("--severity <value>", "Set issue severity").option("--environment <value>", "Set issue environment context").option("--repro-steps <value>", "Set issue reproduction steps").option("--resolution <value>", "Set issue resolution summary").option("--expected-result <value>", "Set issue expected behavior").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Set issue observed behavior").option("--actual <value>", "Short alias for --actual-result").option("--affected-version <value>", "Set affected version identifier").option("--fixed-version <value>", "Set fixed version identifier").option("--component <value>", "Set issue component ownership").option("--regression <value>", "Set regression marker: true|false|1|0").option("--customer-impact <value>", "Set customer impact summary").option("--dep <value>", "Add dependency entry id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>", collect).option("--dep-remove <value>", "Remove dependency entries by id/kind/author/timestamp signature", collect).option("--replace-deps", "Atomically replace dependency entries with provided --dep values").option("--replace-tests", "Atomically replace linked tests with provided --test values").option("--comment <value>", "Add comment seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--note <value>", "Add note seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--learning <value>", "Add learning seed author=<value>,created_at=<iso|now>,text=<value>", collect).option("--file <value>", "Add linked file path=<value>,scope=<project|global>,note=<text>", collect).option("--test <value>", "Add linked test command=<value>,path=<value>,scope=<project|global>", collect).option("--doc <value>", "Add linked doc path=<value>,scope=<project|global>,note=<text>", collect).option("--reminder <value>", "Add reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>", collect).option("--event <value>", "Add event entry start=<iso|relative>,end=<iso|relative>,recur_*", collect).option("--type-option <value>", "Set type options key=value (repeatable)", collect).option("--unset <field>", "Clear scalar metadata field by name (repeatable)", collect).option("--clear-deps", "Clear dependency entries").option("--clear-comments", "Clear comments").option("--clear-notes", "Clear notes").option("--clear-learnings", "Clear learnings").option("--clear-files", "Clear linked files").option("--clear-tests", "Clear linked tests").option("--clear-docs", "Clear linked docs").option("--clear-reminders", "Clear reminders").option("--clear-events", "Clear events").option("--clear-type-options", "Clear type options").option("--allow-audit-update", "Allow non-owner metadata-only audit updates without requiring --force").option("--allow-audit-dep-update", "Allow non-owner append-only dependency updates without requiring --force").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override");
842
- for (const [flags, description] of [
1127
+ addHiddenOptions(updateManyCommand, [
843
1128
  ["--filter-assignee_filter <value>", "Alias for --filter-assignee-filter"],
844
1129
  ["--estimated_minutes <value>", "Alias for --estimated-minutes"],
845
1130
  ["--acceptance_criteria <value>", "Alias for --acceptance-criteria"],
@@ -857,68 +1142,18 @@ function registerMutationCommands(program) {
857
1142
  ["--allow_audit_update", "Alias for --allow-audit-update"],
858
1143
  ["--allow_audit_dep_update", "Alias for --allow-audit-dep-update"],
859
1144
  ["--filter-estimate-missing", "Alias for --filter-estimates-missing"]
860
- ]) {
861
- addHiddenOption(updateManyCommand, flags, description, false);
862
- }
863
- for (const [flags, description] of [
1145
+ ], false);
1146
+ addHiddenOptions(updateManyCommand, [
864
1147
  ["--dep_remove <value>", "Alias for --dep-remove"],
865
1148
  ["--type_option <value>", "Alias for --type-option"],
866
1149
  ["--add_tags <value>", "Alias for --add-tags"],
867
1150
  ["--remove_tags <value>", "Alias for --remove-tags"]
868
- ]) {
869
- addHiddenOption(updateManyCommand, flags, description, true);
870
- }
871
- updateManyCommand.action(async (options, command) => {
872
- const globalOptions = getGlobalOptions(command);
873
- const startedAt = Date.now();
874
- const { runUpdateMany } = await import("./update-many-6YAYYRLE.js");
875
- const result = await runUpdateMany({
876
- status: typeof options.filterStatus === "string" ? options.filterStatus : void 0,
877
- list: buildUpdateManyListOptions(options),
878
- update: normalizeUpdateOptions(extractUpdateManyMutationOptionSource(options)),
879
- dryRun: options.dryRun === true ? true : void 0,
880
- rollback: typeof options.rollback === "string" ? options.rollback : void 0,
881
- checkpoint: options.checkpoint === false ? false : void 0
882
- }, globalOptions);
883
- await invalidateSearchCachesForMutation(globalOptions, result);
884
- printResult(result, globalOptions);
885
- if (globalOptions.profile) {
886
- printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
887
- }
888
- });
1151
+ ], true);
1152
+ updateManyCommand.action(runUpdateManyAction);
889
1153
  const closeCommand = program.command("close").argument("<id>", "Item id").argument("[text]", "Close reason text (alias: --reason)").option("-r, --reason <value>", "Close reason text (alias for positional <text>)").option("--close-reason <value>", "Close reason text (alias for positional <text>)").option("-d, --duplicate-of <id>", "Close as a duplicate of the canonical item id and auto-fill duplicate closure metadata").option("--author <value>", "Mutation author").option("-m, --message <value>", "History message").option("--validate-close [mode]", 'Validate closure metadata before close: "off", "warn", or "strict" (default: settings governance preset)').option("--resolution <value>", "Set the closure resolution summary inline (same field --validate-close strict checks; previously required a prior pm update)").option("--expected-result <value>", "Set the expected-result note inline (closure validation field)").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Set the actual-result note inline (closure validation field)").option("--actual <value>", "Short alias for --actual-result").option("--force", "Force ownership override").description("Close an item. Close reason requirement follows governance.require_close_reason.");
890
1154
  addHiddenOption(closeCommand, "--expected_result <value>", "Alias for --expected-result", false);
891
1155
  addHiddenOption(closeCommand, "--actual_result <value>", "Alias for --actual-result", false);
892
- closeCommand.action(async (id, text, options, command) => {
893
- const globalOptions = getGlobalOptions(command);
894
- const startedAt = Date.now();
895
- const { runClose } = await import("./close-YCWQQPDS.js");
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;
897
- const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
898
- const pickInlineString = (...candidates) => {
899
- for (const candidate of candidates) {
900
- if (typeof candidate === "string") {
901
- return candidate;
902
- }
903
- }
904
- return void 0;
905
- };
906
- const result = await runClose(id, resolvedText, {
907
- author: typeof options.author === "string" ? options.author : void 0,
908
- message: typeof options.message === "string" ? options.message : void 0,
909
- validateClose: options.validateClose === true ? "warn" : typeof options.validateClose === "string" ? options.validateClose : void 0,
910
- force: Boolean(options.force),
911
- duplicateOf: typeof options.duplicateOf === "string" ? options.duplicateOf : void 0,
912
- resolution: typeof options.resolution === "string" ? options.resolution : void 0,
913
- expectedResult: pickInlineString(options.expectedResult, options.expected_result, options.expected),
914
- actualResult: pickInlineString(options.actualResult, options.actual_result, options.actual)
915
- }, globalOptions);
916
- await invalidateSearchCachesForMutation(globalOptions, result);
917
- printResult(result, globalOptions);
918
- if (globalOptions.profile) {
919
- printError(`profile:command=close took_ms=${Date.now() - startedAt}`);
920
- }
921
- });
1156
+ closeCommand.action(runCloseAction);
922
1157
  const closeManyCommand = program.command("close-many").description("Bulk-close matched items with a shared reason and full runClose semantics (dry-run + rollback checkpoint).").option("--filter-status <value>", "Filter by status before closing").option("--filter-type <value>", "Filter by item type before closing").option("--filter-tag <value>", "Filter by tag before closing").option("--filter-priority <value>", "Filter by priority before closing").option("--filter-deadline-before <value>", "Filter by deadline upper bound before closing").option("--filter-deadline-after <value>", "Filter by deadline lower bound before closing").option("--filter-updated-after <value>", "Filter by updated_at lower bound before closing (ISO/relative)").option("--filter-updated-before <value>", "Filter by updated_at upper bound before closing (ISO/relative)").option("--filter-created-after <value>", "Filter by created_at lower bound before closing (ISO/relative)").option("--filter-created-before <value>", "Filter by created_at upper bound before closing (ISO/relative)").option("--filter-assignee <value>", "Filter by assignee before closing").option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before closing").option("--filter-parent <value>", "Filter by parent item ID before closing").option("--filter-sprint <value>", "Filter by sprint before closing").option("--filter-release <value>", "Filter by release before closing");
923
1158
  registerBulkContentAndGovernanceFilters(closeManyCommand, "closing");
924
1159
  closeManyCommand.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)").option("--limit <n>", "Limit matched item count before apply/preview").option("--offset <n>", "Skip first n matched rows before apply/preview").option("--reason <value>", "Shared close reason applied to matched items (required when governance.require_close_reason is enabled)").option("--resolution <value>", "Shared closure resolution applied to every matched item (closure-validation field)").option("--expected-result <value>", "Shared expected-result note (closure-validation field)").option("--expected <value>", "Short alias for --expected-result").option("--actual-result <value>", "Shared actual-result note (closure-validation field)").option("--actual <value>", "Short alias for --actual-result").option("--validate-close [mode]", 'Validate closure metadata per item: "off", "warn", or "strict" (default: settings governance preset)').option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Re-close already-terminal matches and override ownership").option("--dry-run", "Preview matched items + per-item skip/active-child plan without mutating").option("--rollback <value>", "Rollback a prior close-many checkpoint ID").option("--no-checkpoint", "Disable checkpoint creation during apply mode");
@@ -926,68 +1161,11 @@ function registerMutationCommands(program) {
926
1161
  addHiddenOption(closeManyCommand, "--expected_result <value>", "Alias for --expected-result", false);
927
1162
  addHiddenOption(closeManyCommand, "--actual_result <value>", "Alias for --actual-result", false);
928
1163
  closeManyCommand.action(runCloseManyAction);
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) => {
930
- const globalOptions = getGlobalOptions(command);
931
- const startedAt = Date.now();
932
- const { runDelete } = await import("./delete-ANTOTI2I.js");
933
- const result = await runDelete(id, {
934
- author: typeof options.author === "string" ? options.author : void 0,
935
- message: typeof options.message === "string" ? options.message : void 0,
936
- force: Boolean(options.force),
937
- dryRun: options.dryRun === true
938
- }, globalOptions);
939
- if (result.dry_run !== true) {
940
- await invalidateSearchCachesForMutation(globalOptions, result);
941
- }
942
- printResult(result, globalOptions);
943
- if (globalOptions.profile) {
944
- printError(`profile:command=delete took_ms=${Date.now() - startedAt}`);
945
- }
946
- });
947
- program.command("append").argument("<id>", "Item id").argument("[text]", "Optional body text shorthand (equivalent to --body; use - for stdin)").option("--body <value>", "Text to append to body (or - for stdin)").option("--text <value>", "Alias for --body").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override").description("Append text to an item's body.").action(async (id, text, options, command) => {
948
- const globalOptions = getGlobalOptions(command);
949
- const startedAt = Date.now();
950
- const bodyFromOption = typeof options.body === "string" ? options.body : void 0;
951
- const bodyFromAlias = typeof options.text === "string" ? options.text : void 0;
952
- const bodyFromPositional = typeof text === "string" ? text : void 0;
953
- const bodySourceCount = [bodyFromOption, bodyFromAlias, bodyFromPositional].filter((value) => value !== void 0).length;
954
- if (bodySourceCount > 1) {
955
- throw new PmCliError("Specify append text with exactly one source: positional [text], --body, or --text", EXIT_CODE.USAGE);
956
- }
957
- const resolvedBody = bodyFromOption ?? bodyFromAlias ?? bodyFromPositional;
958
- if (resolvedBody === void 0) {
959
- throw new PmCliError("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).", EXIT_CODE.USAGE);
960
- }
961
- const { runAppend } = await import("./append-UBM632FK.js");
962
- const result = await runAppend(id, {
963
- body: resolvedBody,
964
- author: typeof options.author === "string" ? options.author : void 0,
965
- message: typeof options.message === "string" ? options.message : void 0,
966
- force: Boolean(options.force)
967
- }, globalOptions);
968
- await invalidateSearchCachesForMutation(globalOptions, result);
969
- printResult(result, globalOptions);
970
- if (globalOptions.profile) {
971
- printError(`profile:command=append took_ms=${Date.now() - startedAt}`);
972
- }
973
- });
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) => {
975
- const globalOptions = getGlobalOptions(command);
976
- const startedAt = Date.now();
977
- const { runRestore } = await import("./restore-5UEAGG3W.js");
978
- const result = await runRestore(id, target, {
979
- author: typeof options.author === "string" ? options.author : void 0,
980
- message: typeof options.message === "string" ? options.message : void 0,
981
- force: Boolean(options.force)
982
- }, globalOptions);
983
- await invalidateSearchCachesForMutation(globalOptions, result);
984
- printResult(result, globalOptions);
985
- if (globalOptions.profile) {
986
- printError(`profile:command=restore took_ms=${Date.now() - startedAt}`);
987
- }
988
- });
1164
+ program.command("delete").argument("<id>", "Item id").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").option("--dry-run", "Preview the item file that would be deleted without mutating").description("Delete an item and record the change in history.").action(runDeleteAction);
1165
+ program.command("append").argument("<id>", "Item id").argument("[text]", "Optional body text shorthand (equivalent to --body; use - for stdin)").option("--body <value>", "Text to append to body (or - for stdin)").option("--text <value>", "Alias for --body").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override").description("Append text to an item's body.").action(runAppendAction);
1166
+ program.command("restore").argument("<id>", "Item id").argument("<target>", "Restore target timestamp or version number").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(runRestoreAction);
989
1167
  const planCommand = program.command("plan").description("Agent-optimized Plan item workflow: create, manage steps, link dependencies, approve, and materialize.").argument("[subcommand]", "Plan subcommand: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize").argument("[id]", "Plan id (required for non-create subcommands); for create this may be the positional title").argument("[stepRef]", "Step reference: stable id (plan-step-001) or order integer").argument("[reorderTo]", "New order integer for reorder-step").option("--title <value>", "Plan title").option("--description <value>", "Plan description").option("--scope <value>", "Short scope statement of the target change or investigation").option("--parent <value>", "Parent pm item id").option("--related <value>", "Related pm item ids (repeatable, csv-friendly)", collect).option("--blocks <value>", "Pm item ids this plan blocks (repeatable, csv-friendly)", collect).option("--blocked-by <value>", "Pm item ids that block this plan (repeatable, csv-friendly)", collect).option("--harness <value>", "Plan harness provenance: codex|claude-code|cursor|generic").option("--mode <value>", "Plan mode: draft|research|review|approved|executing|paused|completed|superseded").option("--resume-context <value>", "Compact context summary for a future stateless agent").option("--tags <value>", "Comma-separated tags").option("--priority <value>", "Priority 0-4").option("--body <value>", "Plan item body").option("--claim", "Claim the plan on create for the author").option("--from-search <value>", "Record the search query that led to plan creation").option("--template <value>", "Seed plan steps from a built-in template: bug-investigation|feature-implementation|refactoring-sprint").option("--step-title <value>", "Step title for add-step / update-step").option("--step <value>", "Step title (repeatable on create: each --step appends an ordered step; elsewhere a single value aliases --step-title)", collect).option("--step-body <value>", "Step body text").option("--step-owner <value>", "Step owner").option("--step-status <value>", "Step status: pending|in_progress|completed|blocked|skipped|superseded").option("--step-evidence <value>", "Step evidence text (used by update-step/complete-step)").option("--step-blocked-reason <value>", "Step blocked reason (required when blocking)").option("--step-replacement <value>", "Replacement reference for a superseded step").option("--depends-on <value>", "Pm item ids the step depends on (repeatable, csv-friendly)", collect).option("--link <value>", "Pm item id to link (repeatable, csv-friendly)", collect).option("--link-kind <value>", "Link kind: related|blocks|blocked_by|depends_on|discovered_from|implements|verifies|supersedes").option("--link-note <value>", "Optional note for the link").option("--promote-to-item-dep", "Also add the linked id as a top-level item dependency when linking").option("--allow-multiple-active", "Allow multiple steps to be in_progress at once").option("--file <value>", "Step linked file path=<value>[,scope=project|global,note=<text>] (repeatable)", collect).option("--test <value>", "Step linked test command=<value>[,path=<value>,note=<text>] (repeatable)", collect).option("--doc <value>", "Step linked doc path=<value>[,scope=project|global,note=<text>] (repeatable)", collect).option("--decision-text <value>", "Decision log entry text").option("--decision <value>", "Alias for --decision-text").option("--decision-rationale <value>", "Decision log entry rationale").option("--decision-evidence <value>", "Decision log entry evidence").option("--discovery-text <value>", "Discovery log entry text").option("--discovery <value>", "Alias for --discovery-text").option("--validation-text <value>", "Validation log entry text").option("--validation <value>", "Alias for --validation-text").option("--validation-command <value>", "Validation log entry command").option("--validation-expected <value>", "Validation log entry expected outcome").option("--depth <value>", "Show depth: brief|standard|deep (default: brief)").option("--fields <value>", "Comma-separated field projection for show output").option("--steps <value>", "Comma-separated step ids/orders for materialize").option("--materialize-type <value>", "Item type for materialized steps (default: Task)").option("--materialize-parent <value>", "Parent item id for materialized children (default: the plan)").option("--materialize-tags <value>", "Comma-separated tags for materialized children").option("--author <value>", "Mutation author").option("--message <value>", "Mutation message").option("--force", "Force ownership override");
990
- for (const [flags, description] of [
1168
+ addHiddenOptions(planCommand, [
991
1169
  ["--resume_context <value>", "Alias for --resume-context"],
992
1170
  ["--from_search <value>", "Alias for --from-search"],
993
1171
  ["--step_title <value>", "Alias for --step-title"],
@@ -1011,21 +1189,17 @@ function registerMutationCommands(program) {
1011
1189
  ["--materialize_type <value>", "Alias for --materialize-type"],
1012
1190
  ["--materialize_parent <value>", "Alias for --materialize-parent"],
1013
1191
  ["--materialize_tags <value>", "Alias for --materialize-tags"]
1014
- ]) {
1015
- addHiddenOption(planCommand, flags, description, false);
1016
- }
1017
- for (const [flags, description] of [
1192
+ ], false);
1193
+ addHiddenOptions(planCommand, [
1018
1194
  ["--blocked_by <value>", "Alias for --blocked-by"],
1019
1195
  ["--depends_on <value>", "Alias for --depends-on"]
1020
- ]) {
1021
- addHiddenOption(planCommand, flags, description, true);
1022
- }
1196
+ ], true);
1023
1197
  planCommand.action(runPlanAction);
1024
1198
  void planCommand;
1025
1199
  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) => {
1026
1200
  const globalOptions = getGlobalOptions(command);
1027
1201
  const startedAt = Date.now();
1028
- const { runHistoryRedact } = await import("./history-redact-IX4YEWMY.js");
1202
+ const { runHistoryRedact } = await import("./history-redact-N3JK7VBW.js");
1029
1203
  const literal = Array.isArray(options.literal) ? options.literal : void 0;
1030
1204
  const regex = Array.isArray(options.regex) ? options.regex : void 0;
1031
1205
  const result = await runHistoryRedact(id, {
@@ -1048,7 +1222,7 @@ function registerMutationCommands(program) {
1048
1222
  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) => {
1049
1223
  const globalOptions = getGlobalOptions(command);
1050
1224
  const startedAt = Date.now();
1051
- const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-CPNAOCNF.js");
1225
+ const { runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget } = await import("./history-repair-PGYQJMGD.js");
1052
1226
  const all = options.all === true;
1053
1227
  assertHistoryRepairTarget(id, all);
1054
1228
  const repairOptions = {
@@ -1076,183 +1250,15 @@ function registerMutationCommands(program) {
1076
1250
  addHiddenOption(schemaCommand, "--default_status <status>", "Alias for --default-status", false);
1077
1251
  schemaCommand.action(runSchemaAction);
1078
1252
  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.");
1079
- profileCommand.action(async (subcommand, name, options, command) => {
1080
- const globalOptions = getGlobalOptions(command);
1081
- const startedAt = Date.now();
1082
- const profileModule = await import("./profile-HUCENIEQ.js");
1083
- const { PROFILE_SUBCOMMANDS } = profileModule;
1084
- const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
1085
- if (!normalizedSubcommand) {
1086
- throw new PmCliError(`pm profile requires a subcommand. Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
1087
- code: "missing_required_argument",
1088
- examples: ["pm profile list", "pm profile show agile", "pm profile apply agile --dry-run", "pm profile lint agile"]
1089
- });
1090
- }
1091
- if (!PROFILE_SUBCOMMANDS.includes(normalizedSubcommand)) {
1092
- throw new PmCliError(`Unknown pm profile subcommand "${subcommand}". Allowed: ${PROFILE_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
1093
- }
1094
- const result = await dispatchProfileSubcommand(profileModule, normalizedSubcommand, name, options, globalOptions);
1095
- if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
1096
- printResult(result, globalOptions);
1097
- } else if (!globalOptions.quiet) {
1098
- renderProfileResultHuman(profileModule, result);
1099
- }
1100
- if (result.action === "lint" && !result.ok) {
1101
- process.exitCode = EXIT_CODE.GENERIC_FAILURE;
1102
- }
1103
- if (globalOptions.profile) {
1104
- printError(`profile:command=profile took_ms=${Date.now() - startedAt}`);
1105
- }
1106
- });
1253
+ profileCommand.action(runProfileAction);
1107
1254
  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);
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) => {
1109
- const globalOptions = getGlobalOptions(command);
1110
- const startedAt = Date.now();
1111
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1112
- const addFromPositional = typeof text === "string" ? text : void 0;
1113
- if (addFromOption !== void 0 && addFromPositional !== void 0) {
1114
- throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1115
- }
1116
- const add = addFromOption ?? addFromPositional;
1117
- const { runNotes } = await import("./notes-GDZIKGR6.js");
1118
- const result = await runNotes(id, {
1119
- add,
1120
- limit: typeof options.limit === "string" ? options.limit : void 0,
1121
- author: typeof options.author === "string" ? options.author : void 0,
1122
- message: typeof options.message === "string" ? options.message : void 0,
1123
- allowAuditComment: Boolean(options.allowAuditNote || options.allowAuditComment),
1124
- force: Boolean(options.force)
1125
- }, globalOptions);
1126
- if (typeof add === "string") {
1127
- await invalidateSearchCachesForMutation(globalOptions, result);
1128
- }
1129
- printResult(result, globalOptions);
1130
- if (globalOptions.profile) {
1131
- printError(`profile:command=notes took_ms=${Date.now() - startedAt}`);
1132
- }
1133
- });
1134
- program.command("learnings").argument("<id>", "Item id").argument("[text]", "Optional learning text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one learning entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n learnings").option("--author [value]", "Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-learning", "Allow non-owner append-only learning audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-learning").option("--force", "Force ownership override").description("List or add learnings for an item.").action(async (id, text, options, command) => {
1135
- const globalOptions = getGlobalOptions(command);
1136
- const startedAt = Date.now();
1137
- const addFromOption = typeof options.add === "string" ? options.add : void 0;
1138
- const addFromPositional = typeof text === "string" ? text : void 0;
1139
- if (addFromOption !== void 0 && addFromPositional !== void 0) {
1140
- throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
1141
- }
1142
- const add = addFromOption ?? addFromPositional;
1143
- const { runLearnings } = await import("./learnings-XSFSUUWK.js");
1144
- const result = await runLearnings(id, {
1145
- add,
1146
- limit: typeof options.limit === "string" ? options.limit : void 0,
1147
- author: typeof options.author === "string" ? options.author : void 0,
1148
- message: typeof options.message === "string" ? options.message : void 0,
1149
- allowAuditComment: Boolean(options.allowAuditLearning || options.allowAuditComment),
1150
- force: Boolean(options.force)
1151
- }, globalOptions);
1152
- if (typeof add === "string") {
1153
- await invalidateSearchCachesForMutation(globalOptions, result);
1154
- }
1155
- printResult(result, globalOptions);
1156
- if (globalOptions.profile) {
1157
- printError(`profile:command=learnings took_ms=${Date.now() - startedAt}`);
1158
- }
1159
- });
1255
+ program.command("notes").argument("<id>", "Item id").argument("[text]", "Optional note text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one note entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n notes").option("--author [value]", "Note author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-note", "Allow non-owner append-only note audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-note").option("--force", "Force ownership override").description("List or add notes for an item.").action(runNotesAction);
1256
+ program.command("learnings").argument("<id>", "Item id").argument("[text]", "Optional learning text shorthand (equivalent to --add; use - for stdin)").option("--add <text>", "Add one learning entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)").option("--limit <n>", "Return only latest n learnings").option("--author [value]", "Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>", "History message").option("--allow-audit-learning", "Allow non-owner append-only learning audits without requiring --force").option("--allow-audit-comment", "Backward-compatible alias for --allow-audit-learning").option("--force", "Force ownership override").description("List or add learnings for an item.").action(runLearningsAction);
1160
1257
  const filesCommand = program.command("files").description("Manage files linked to an item.");
1161
- filesCommand.argument("<id>", "Item id").option("--add <value>", "Add linked file entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked file by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked files without mutating").option("--append-stable", "Preserve existing linked-file order and append new links without full-array resorting").option("--validate-paths", "Validate linked file paths for existence and file shape").option("--audit", "Audit linked file usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").action(async (id, options, command) => {
1162
- const globalOptions = getGlobalOptions(command);
1163
- const startedAt = Date.now();
1164
- const addValues = Array.isArray(options.add) ? options.add : [];
1165
- const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1166
- const removeValues = Array.isArray(options.remove) ? options.remove : [];
1167
- const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1168
- const { runFiles } = await import("./files-GPIG77EN.js");
1169
- const result = await runFiles(id, {
1170
- add: addValues,
1171
- addGlob: addGlobValues,
1172
- remove: removeValues,
1173
- migrate: migrateValues,
1174
- note: typeof options.note === "string" ? options.note : void 0,
1175
- list: Boolean(options.list),
1176
- appendStable: Boolean(options.appendStable),
1177
- validatePaths: Boolean(options.validatePaths),
1178
- audit: Boolean(options.audit),
1179
- author: typeof options.author === "string" ? options.author : void 0,
1180
- message: typeof options.message === "string" ? options.message : void 0,
1181
- force: Boolean(options.force)
1182
- }, globalOptions);
1183
- if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1184
- await invalidateSearchCachesForMutation(globalOptions, result);
1185
- }
1186
- printResult(result, globalOptions);
1187
- if (globalOptions.profile) {
1188
- printError(`profile:command=files took_ms=${Date.now() - startedAt}`);
1189
- }
1190
- });
1191
- filesCommand.command("discover").argument("<id>", "Item id").option("--apply", "Add discovered missing files to the item").option("--note <value>", "Note to attach to discovered file links").option("--append-stable", "Preserve existing linked-file order and append discovered links without full-array resorting").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Discover existing file paths referenced in item text and optionally link missing files.").action(async (id, options, command) => {
1192
- const globalOptions = getGlobalOptions(command);
1193
- const startedAt = Date.now();
1194
- const mergedOptions = { ...command.optsWithGlobals(), ...options };
1195
- const { runFilesDiscover } = await import("./files-GPIG77EN.js");
1196
- const result = await runFilesDiscover(id, {
1197
- apply: Boolean(mergedOptions.apply),
1198
- note: typeof mergedOptions.note === "string" ? mergedOptions.note : void 0,
1199
- appendStable: Boolean(mergedOptions.appendStable),
1200
- author: typeof mergedOptions.author === "string" ? mergedOptions.author : void 0,
1201
- message: typeof mergedOptions.message === "string" ? mergedOptions.message : void 0,
1202
- force: Boolean(mergedOptions.force)
1203
- }, globalOptions);
1204
- if (result.changed) {
1205
- await invalidateSearchCachesForMutation(globalOptions, result);
1206
- }
1207
- printResult(result, globalOptions);
1208
- if (globalOptions.profile) {
1209
- printError(`profile:command=files.discover took_ms=${Date.now() - startedAt}`);
1210
- }
1211
- });
1212
- program.command("docs").argument("<id>", "Item id").option("--add <value>", "Add linked doc entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked doc by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked docs without mutating").option("--validate-paths", "Validate linked doc paths for existence and file shape").option("--audit", "Audit linked doc usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Manage docs linked to an item.").action(async (id, options, command) => {
1213
- const globalOptions = getGlobalOptions(command);
1214
- const startedAt = Date.now();
1215
- const addValues = Array.isArray(options.add) ? options.add : [];
1216
- const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
1217
- const removeValues = Array.isArray(options.remove) ? options.remove : [];
1218
- const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
1219
- const { runDocs } = await import("./docs-XJNYBJGE.js");
1220
- const result = await runDocs(id, {
1221
- add: addValues,
1222
- addGlob: addGlobValues,
1223
- remove: removeValues,
1224
- migrate: migrateValues,
1225
- note: typeof options.note === "string" ? options.note : void 0,
1226
- list: Boolean(options.list),
1227
- validatePaths: Boolean(options.validatePaths),
1228
- audit: Boolean(options.audit),
1229
- author: typeof options.author === "string" ? options.author : void 0,
1230
- message: typeof options.message === "string" ? options.message : void 0,
1231
- force: Boolean(options.force)
1232
- }, globalOptions);
1233
- if (addValues.length > 0 || addGlobValues.length > 0 || removeValues.length > 0 || migrateValues.length > 0) {
1234
- await invalidateSearchCachesForMutation(globalOptions, result);
1235
- }
1236
- printResult(result, globalOptions);
1237
- if (globalOptions.profile) {
1238
- printError(`profile:command=docs took_ms=${Date.now() - startedAt}`);
1239
- }
1240
- });
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) => {
1242
- const globalOptions = getGlobalOptions(command);
1243
- const startedAt = Date.now();
1244
- const { runDeps } = await import("./deps-HPPE6MJN.js");
1245
- const result = await runDeps(id, {
1246
- format: options.format,
1247
- maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : void 0,
1248
- collapse: options.collapse,
1249
- summary: options.summary === true
1250
- }, globalOptions);
1251
- printResult(result, globalOptions);
1252
- if (globalOptions.profile) {
1253
- printError(`profile:command=deps took_ms=${Date.now() - startedAt}`);
1254
- }
1255
- });
1258
+ filesCommand.argument("<id>", "Item id").option("--add <value>", "Add linked file entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked file by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked files without mutating").option("--append-stable", "Preserve existing linked-file order and append new links without full-array resorting").option("--validate-paths", "Validate linked file paths for existence and file shape").option("--audit", "Audit linked file usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").action(runFilesAction);
1259
+ filesCommand.command("discover").argument("<id>", "Item id").option("--apply", "Add discovered missing files to the item").option("--note <value>", "Note to attach to discovered file links").option("--append-stable", "Preserve existing linked-file order and append discovered links without full-array resorting").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Discover existing file paths referenced in item text and optionally link missing files.").action(runFilesDiscoverAction);
1260
+ program.command("docs").argument("<id>", "Item id").option("--add <value>", "Add linked doc entry (CSV/markdown pairs or - for stdin)", collect).option("--add-glob <value>", "Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)", collect).option("--remove <value>", "Remove linked doc by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message", collect).option("--migrate <value>", "Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)", collect).option("--note <value>", "Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list", "List linked docs without mutating").option("--validate-paths", "Validate linked doc paths for existence and file shape").option("--audit", "Audit linked doc usage across all items for this item's linked paths").option("--author <value>", "Mutation author").option("--message <value>", "History message").option("--force", "Force ownership override").description("Manage docs linked to an item.").action(runDocsAction);
1261
+ program.command("deps").argument("<id>", "Item id").option("--format <value>", "Output format (tree or graph)", "tree").option("--max-depth <value>", "Maximum dependency traversal depth (0 keeps only the root)").option("--collapse <value>", "Collapse mode (none or repeated)", "none").option("--summary", "Return counts only without full tree/graph payload").description("Show dependency relationships for an item.").action(runDepsAction);
1256
1262
  }
1257
1263
  export {
1258
1264
  looksLikeSchemaSubcommandTypo,
@@ -1261,4 +1267,4 @@ export {
1261
1267
  registerCommanderOptionContracts,
1262
1268
  registerMutationCommands
1263
1269
  };
1264
- //# sourceMappingURL=register-mutation-KRLAHEL2.js.map
1270
+ //# sourceMappingURL=register-mutation-ROFE2YPC.js.map