@unbrained/pm-cli 2026.7.1 → 2026.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cli/commander-usage.d.ts +2 -0
  3. package/dist/cli/commander-usage.js +58 -47
  4. package/dist/cli/commander-usage.js.map +1 -1
  5. package/dist/cli/commands/aggregate.js +102 -79
  6. package/dist/cli/commands/aggregate.js.map +1 -1
  7. package/dist/cli/commands/calendar.js +278 -243
  8. package/dist/cli/commands/calendar.js.map +1 -1
  9. package/dist/cli/commands/close-many.js +89 -68
  10. package/dist/cli/commands/close-many.js.map +1 -1
  11. package/dist/cli/commands/close.js +157 -129
  12. package/dist/cli/commands/close.js.map +1 -1
  13. package/dist/cli/commands/comments-audit.js +50 -42
  14. package/dist/cli/commands/comments-audit.js.map +1 -1
  15. package/dist/cli/commands/config.d.ts +2 -0
  16. package/dist/cli/commands/config.js +443 -879
  17. package/dist/cli/commands/config.js.map +1 -1
  18. package/dist/cli/commands/context.js +365 -287
  19. package/dist/cli/commands/context.js.map +1 -1
  20. package/dist/cli/commands/contracts.js +352 -238
  21. package/dist/cli/commands/contracts.js.map +1 -1
  22. package/dist/cli/commands/dedupe-audit.js +46 -39
  23. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  24. package/dist/cli/commands/dedupe-merge.js +88 -69
  25. package/dist/cli/commands/dedupe-merge.js.map +1 -1
  26. package/dist/cli/commands/get.js +114 -81
  27. package/dist/cli/commands/get.js.map +1 -1
  28. package/dist/cli/commands/health.d.ts +17 -0
  29. package/dist/cli/commands/health.js +446 -307
  30. package/dist/cli/commands/health.js.map +1 -1
  31. package/dist/cli/commands/history-compact.js +209 -140
  32. package/dist/cli/commands/history-compact.js.map +1 -1
  33. package/dist/cli/commands/history-redact.js +162 -119
  34. package/dist/cli/commands/history-redact.js.map +1 -1
  35. package/dist/cli/commands/history-repair.js +120 -85
  36. package/dist/cli/commands/history-repair.js.map +1 -1
  37. package/dist/cli/commands/init.d.ts +8 -2
  38. package/dist/cli/commands/init.js +263 -162
  39. package/dist/cli/commands/init.js.map +1 -1
  40. package/dist/cli/commands/list.js +152 -102
  41. package/dist/cli/commands/list.js.map +1 -1
  42. package/dist/cli/commands/next.js +49 -32
  43. package/dist/cli/commands/next.js.map +1 -1
  44. package/dist/cli/commands/plan.js +373 -298
  45. package/dist/cli/commands/plan.js.map +1 -1
  46. package/dist/cli/commands/recurrence-parsers.js +43 -25
  47. package/dist/cli/commands/recurrence-parsers.js.map +1 -1
  48. package/dist/cli/commands/reindex.d.ts +21 -5
  49. package/dist/cli/commands/reindex.js +345 -205
  50. package/dist/cli/commands/reindex.js.map +1 -1
  51. package/dist/cli/commands/restore.d.ts +8 -7
  52. package/dist/cli/commands/restore.js +105 -69
  53. package/dist/cli/commands/restore.js.map +1 -1
  54. package/dist/cli/commands/schema.js +33 -30
  55. package/dist/cli/commands/schema.js.map +1 -1
  56. package/dist/cli/commands/search.d.ts +10 -2
  57. package/dist/cli/commands/search.js +503 -470
  58. package/dist/cli/commands/search.js.map +1 -1
  59. package/dist/cli/commands/telemetry.js +98 -87
  60. package/dist/cli/commands/telemetry.js.map +1 -1
  61. package/dist/cli/commands/test-all.js +237 -168
  62. package/dist/cli/commands/test-all.js.map +1 -1
  63. package/dist/cli/commands/test.d.ts +6 -5
  64. package/dist/cli/commands/test.js +424 -344
  65. package/dist/cli/commands/test.js.map +1 -1
  66. package/dist/cli/commands/update-many.js +57 -42
  67. package/dist/cli/commands/update-many.js.map +1 -1
  68. package/dist/cli/commands/update.d.ts +1 -1
  69. package/dist/cli/commands/update.js +738 -671
  70. package/dist/cli/commands/update.js.map +1 -1
  71. package/dist/cli/commands/validate.d.ts +18 -1
  72. package/dist/cli/commands/validate.js +466 -343
  73. package/dist/cli/commands/validate.js.map +1 -1
  74. package/dist/cli/error-guidance.js +399 -357
  75. package/dist/cli/error-guidance.js.map +1 -1
  76. package/dist/cli/main.d.ts +47 -0
  77. package/dist/cli/main.js +428 -341
  78. package/dist/cli/main.js.map +1 -1
  79. package/dist/cli/migration-gates.js +22 -45
  80. package/dist/cli/migration-gates.js.map +1 -1
  81. package/dist/cli/register-list-query.js +94 -105
  82. package/dist/cli/register-list-query.js.map +1 -1
  83. package/dist/cli/register-mutation.js +400 -416
  84. package/dist/cli/register-mutation.js.map +1 -1
  85. package/dist/cli/register-operations.js +86 -66
  86. package/dist/cli/register-operations.js.map +1 -1
  87. package/dist/cli/register-setup.js +120 -101
  88. package/dist/cli/register-setup.js.map +1 -1
  89. package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-CUC4JY3U.js} +9 -9
  90. package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
  91. package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-DKUTRY6R.js} +108 -84
  92. package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
  93. package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-SW5PNGCS.js} +107 -83
  94. package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-SW5PNGCS.js.map} +2 -2
  95. package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-H32VOR2Y.js} +6 -6
  96. package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-UBM632FK.js} +6 -6
  97. package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-2227673O.js} +158 -114
  98. package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-2ASNV4DH.js} +4 -4
  100. package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-2CHRYUXL.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-2KWL5NPW.js} +42 -27
  102. package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-36UGKF4O.js} +21 -29
  104. package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
  105. package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-3AZUFQK6.js} +6 -6
  106. package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-3LCUASYG.js} +2 -2
  107. package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-3Q2HBMTI.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-4NUOWFBT.js} +109 -72
  109. package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
  110. package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-55XRYWEG.js} +6 -6
  111. package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-5GVTFFTC.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-5PGBHRY3.js} +41 -26
  113. package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-66Z3X7ZG.js} +261 -161
  115. package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-6ITZLD4T.js} +712 -612
  117. package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-6YCYF2AI.js} +262 -162
  119. package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
  120. package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-6ZMBJRDJ.js} +492 -403
  121. package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
  122. package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-7MYWF4ZX.js} +110 -73
  123. package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-7NSPKJUS.js} +356 -285
  125. package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
  126. package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-7TH5NMVB.js} +95 -53
  127. package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-7W4H4K26.js} +713 -613
  129. package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
  130. package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-A6VOGKBA.js} +6 -6
  131. package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AIAIXG7I.js} +2 -2
  132. package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-AJEBCRIY.js} +5 -5
  133. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
  134. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-BTX5MIQF.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-BVZZN2LH.js} +3 -3
  137. package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-CYBDUHNO.js} +3 -3
  138. package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-CZPVDLD2.js} +4 -4
  139. package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-EMPGXBUF.js} +22 -30
  140. package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
  141. package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-EUKTMRN3.js} +2 -2
  142. package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-FFOQHGNH.js} +6 -6
  143. package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-GFMSLORL.js} +6 -6
  144. package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-GRRG3MCT.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-H4GRLYJS.js} +3 -3
  146. package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-HQTPRV4D.js} +6 -6
  147. package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-I66WE2HE.js} +354 -283
  148. package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
  149. package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-IEEJQCZ4.js} +3 -3
  150. package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-IG5JYZGU.js} +390 -312
  151. package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-IG5JYZGU.js.map} +2 -2
  152. package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-JMK5GCK2.js} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-JXAUVO6X.js} +258 -169
  154. package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js.map → chunk-JXAUVO6X.js.map} +2 -2
  155. package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-K2VYLVX4.js} +2 -2
  156. package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KCO2EAN5.js} +3 -3
  157. package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-KIYCOJ63.js} +4 -4
  158. package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-KLXF7NCC.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-KN3URLKS.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-LRKMWUUV.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-LTRAF2D7.js} +3 -3
  162. package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-MNBPX5JS.js} +55 -36
  163. package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
  164. package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-MRD4T5LF.js} +2 -2
  165. package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-N2JSWVWG.js} +4 -4
  166. package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-N3QCJS4M.js} +6 -6
  167. package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-NRZS637N.js} +258 -169
  168. package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
  169. package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-OTUJZKGI.js} +3 -3
  170. package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-Q6K2OACU.js} +153 -90
  171. package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
  172. package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-Q6NXOHS6.js} +391 -313
  173. package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
  174. package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-QH3FSKRJ.js} +2 -2
  175. package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-RM37OPYK.js} +56 -37
  176. package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
  177. package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-S62UANU7.js} +3 -3
  178. package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-SPM2XLWI.js} +37 -28
  179. package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
  180. package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-SYNKD3ZG.js} +5 -5
  181. package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-SYVUU7EK.js} +493 -404
  182. package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
  183. package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-TPOFWBMY.js} +95 -53
  184. package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
  185. package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-TTHCEV5Q.js} +92 -77
  186. package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
  187. package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-U2BEEM2X.js} +3 -3
  188. package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-UGLU6Q2I.js} +91 -76
  189. package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
  190. package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UT73HUPC.js} +3 -3
  191. package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-UTSH5GWX.js} +4 -4
  192. package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-UWKEJMZU.js} +157 -113
  193. package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
  194. package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-W47SML5B.js} +152 -89
  195. package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WJAMWAHZ.js} +157 -118
  197. package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-XCHUVHKU.js} +626 -484
  199. package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-XEWQKDYZ.js} +626 -484
  201. package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
  202. package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-XTHQWXVC.js} +158 -119
  203. package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
  204. package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-XWGEMNBR.js} +2 -2
  205. package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-Y4NRKBFW.js} +3 -3
  206. package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-YLZZ6T54.js} +38 -29
  207. package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
  208. package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-YPKFV2JR.js} +6 -6
  209. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
  210. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-ZNHEYCDD.js} +2 -2
  212. package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-ZNT7KEWE.js} +2 -2
  213. package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-SENTPZBN.js} +8 -8
  214. package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-Z7MEQCBT.js} +8 -8
  215. package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-424MX4CU.js} +7 -7
  216. package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
  217. package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-2IV4J2TR.js} +102 -81
  218. package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-SWY34BII.js} +101 -80
  220. package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
  221. package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-4FGNTSNV.js} +8 -8
  222. package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-7YS5MY5X.js} +8 -8
  223. package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
  224. package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
  225. package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
  226. package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
  227. package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-LHVKJSPJ.js} +12 -12
  228. package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-ZQY54JNS.js} +12 -12
  229. package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-CP2EZJC7.js} +320 -199
  230. package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
  231. package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-FIZLMP7O.js} +321 -200
  232. package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
  233. package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-GYNQQPW2.js} +5 -5
  234. package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-TLW7JTQT.js} +5 -5
  235. package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-VSKYSOCD.js} +12 -12
  236. package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
  237. package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-4W5JYCEG.js} +5 -5
  238. package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-ANTOTI2I.js} +5 -5
  239. package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-HPPE6MJN.js} +5 -5
  240. package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-ZQZN54EZ.js} +5 -5
  241. package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-RPOVFMP3.js} +7 -7
  242. package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-XJNYBJGE.js} +7 -7
  243. package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-DM6JBZTS.js} +10 -10
  244. package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-RFBI5FGS.js} +10 -10
  245. package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-B3YY4WY5.js} +11 -11
  246. package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-TTSEFQTS.js} +11 -11
  247. package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-5D65CHGE.js} +7 -7
  248. package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-GPIG77EN.js} +7 -7
  249. package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-C3PEJV2C.js} +6 -6
  250. package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-ZHN7WIGX.js} +6 -6
  251. package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-D4JQ6OWN.js} +3 -3
  252. package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-VZIXDL32.js} +3 -3
  253. package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-GIBRUUOP.js} +121 -81
  254. package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
  255. package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-IOVAN6RU.js} +120 -80
  256. package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
  257. package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-L2U3AFKV.js} +437 -265
  258. package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
  259. package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-MM7AWXYF.js} +436 -264
  260. package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
  261. package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
  262. package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-IL7XCEX2.js} +8 -8
  263. package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-HALOTOU7.js} +214 -135
  264. package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
  265. package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-MV25P7DM.js} +213 -134
  266. package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
  267. package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
  268. package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-VYCWQFK7.js} +9 -9
  269. package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-44MODPQF.js} +124 -84
  270. package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
  271. package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-CPNAOCNF.js} +123 -83
  272. package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
  273. package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-F27NHENZ.js} +12 -12
  274. package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
  275. package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-HJVDQIGY.js} +8 -8
  276. package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-XSFSUUWK.js} +8 -8
  277. package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-HPMEKCAA.js} +8 -8
  278. package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-VMPWTURB.js} +8 -8
  279. package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-ETXF2ZCN.js} +59 -37
  280. package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
  281. package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-QM6YJIIS.js} +60 -38
  282. package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
  283. package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-GDZIKGR6.js} +8 -8
  284. package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-WDDBPC4D.js} +8 -8
  285. package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-BGDR73Z6.js} +373 -279
  286. package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
  287. package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-C5IMM335.js} +372 -278
  288. package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
  289. package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-CCOKZ2IQ.js} +9 -9
  290. package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-HUCENIEQ.js} +9 -9
  291. package/dist/cli-bundle/chunks/{register-list-query-7LV46VAU.js → register-list-query-ROSNIL52.js} +80 -83
  292. package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
  293. package/dist/cli-bundle/chunks/{register-list-query-SNG5PGA4.js → register-list-query-XN4ZRHSV.js} +79 -82
  294. package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
  295. package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-CFSB2MS3.js} +403 -382
  296. package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
  297. package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-KRLAHEL2.js} +402 -381
  298. package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
  299. package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-4PASGJDB.js} +112 -93
  300. package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
  301. package/dist/cli-bundle/chunks/{register-operations-C6OWLDSH.js → register-operations-MBN4KGUM.js} +113 -94
  302. package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
  303. package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-VIAWYFP5.js} +129 -104
  304. package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
  305. package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-ZCGKHDKL.js} +128 -103
  306. package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
  307. package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-4CBWUMCX.js} +9 -9
  308. package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
  309. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
  310. package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
  311. package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-TDGK6N3I.js} +7 -7
  312. package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-UE5KKAUX.js} +7 -7
  313. package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-FP7MEU4S.js} +10 -10
  314. package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-K4CFLQ5S.js} +10 -10
  315. package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-NJJCALEZ.js} +6 -6
  316. package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-XT6QRKQY.js} +6 -6
  317. package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-5SQ5UDXC.js} +84 -70
  318. package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
  319. package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-HVXFZA2U.js} +85 -71
  320. package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-UFSJ5YIO.js} +15 -15
  322. package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-YCDAUBWF.js} +15 -15
  323. package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
  324. package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
  325. package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
  326. package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
  327. package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-FK5E75AA.js} +185 -147
  328. package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
  329. package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-H4TGWGRN.js} +184 -146
  330. package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
  331. package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
  332. package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-Y5WQVT5O.js} +15 -15
  333. package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-6YAYYRLE.js} +82 -67
  334. package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-6YAYYRLE.js.map} +2 -2
  335. package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-JTKKSA7Y.js} +83 -68
  336. package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-JTKKSA7Y.js.map} +1 -1
  337. package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-DTAHZ236.js} +11 -11
  338. package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-JUDU7YL4.js} +11 -11
  339. package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-732RWS5W.js} +440 -320
  340. package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
  341. package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-W7H5TEDC.js} +441 -321
  342. package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
  343. package/dist/cli-bundle/main.js +945 -812
  344. package/dist/cli-bundle/main.js.map +3 -3
  345. package/dist/core/config/nested-settings.js +89 -67
  346. package/dist/core/config/nested-settings.js.map +1 -1
  347. package/dist/core/governance/metadata-coverage.js +20 -28
  348. package/dist/core/governance/metadata-coverage.js.map +1 -1
  349. package/dist/core/history/drift-scan.js +93 -81
  350. package/dist/core/history/drift-scan.js.map +1 -1
  351. package/dist/core/item/item-type-definition.js +14 -14
  352. package/dist/core/item/item-type-definition.js.map +1 -1
  353. package/dist/core/item/type-registry.js +87 -82
  354. package/dist/core/item/type-registry.js.map +1 -1
  355. package/dist/core/output/mutation-projection.js +42 -26
  356. package/dist/core/output/mutation-projection.js.map +1 -1
  357. package/dist/core/schema/runtime-schema.js +34 -28
  358. package/dist/core/schema/runtime-schema.js.map +1 -1
  359. package/dist/core/search/semantic-defaults.js +64 -37
  360. package/dist/core/search/semantic-defaults.js.map +1 -1
  361. package/dist/core/search/vector-stores.js +32 -17
  362. package/dist/core/search/vector-stores.js.map +1 -1
  363. package/dist/core/sentry/helpers.js +31 -28
  364. package/dist/core/sentry/helpers.js.map +1 -1
  365. package/dist/core/sentry/instrument.js +54 -43
  366. package/dist/core/sentry/instrument.js.map +1 -1
  367. package/dist/core/store/front-matter-cache.js +239 -153
  368. package/dist/core/store/front-matter-cache.js.map +1 -1
  369. package/dist/core/store/item-store.js +33 -26
  370. package/dist/core/store/item-store.js.map +1 -1
  371. package/dist/core/store/settings.js +247 -203
  372. package/dist/core/store/settings.js.map +1 -1
  373. package/dist/core/test/background-runs.js +189 -160
  374. package/dist/core/test/background-runs.js.map +1 -1
  375. package/package.json +2 -2
  376. package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
  377. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
  378. package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
  379. package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
  380. package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
  381. package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
  382. package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
  383. package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-4DSGXSBL.js.map +0 -7
  386. package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
  387. package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
  388. package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
  389. package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
  390. package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
  391. package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
  392. package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
  393. package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
  394. package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
  395. package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
  396. package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
  397. package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
  398. package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
  399. package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
  400. package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
  401. package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
  402. package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
  403. package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
  404. package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
  405. package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
  406. package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
  407. package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-UYUYDGIB.js.map +0 -1
  409. package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
  410. package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
  411. package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
  412. package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
  413. package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
  414. package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
  415. package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
  416. package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
  417. package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
  418. package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
  419. package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
  420. package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
  421. package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
  422. package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
  423. package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
  424. package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
  425. package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
  426. package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
  427. package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
  428. package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
  429. package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
  430. package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
  431. package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
  432. package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
  433. package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
  434. package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
  435. package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
  436. package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
  437. package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
  438. package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
  439. package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
  440. package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
  441. package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
  442. package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
  443. package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
  444. package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
  445. package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
  446. package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
  447. package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
  448. package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
  449. package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
  450. package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
  451. package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
  452. package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
  453. package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
  454. package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
  455. package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
  456. package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
  457. package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
  458. /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-CUC4JY3U.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-WEIEMM73.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-H32VOR2Y.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-UBM632FK.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-2ASNV4DH.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-2CHRYUXL.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-3AZUFQK6.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-3LCUASYG.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-3Q2HBMTI.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-55XRYWEG.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js.map → chunk-5GVTFFTC.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-A6VOGKBA.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js.map → chunk-AIAIXG7I.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js.map → chunk-AJEBCRIY.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-BTX5MIQF.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-BVZZN2LH.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-CYBDUHNO.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-CZPVDLD2.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-EUKTMRN3.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-FFOQHGNH.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js.map → chunk-GFMSLORL.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-GRRG3MCT.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-H4GRLYJS.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-HQTPRV4D.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-IEEJQCZ4.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-JMK5GCK2.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js.map → chunk-K2VYLVX4.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KCO2EAN5.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-KIYCOJ63.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-KLXF7NCC.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-KN3URLKS.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-LRKMWUUV.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-LTRAF2D7.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-MRD4T5LF.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-N2JSWVWG.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-N3QCJS4M.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-OTUJZKGI.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-QH3FSKRJ.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-S62UANU7.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js.map → chunk-SYNKD3ZG.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-U2BEEM2X.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UT73HUPC.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-UTSH5GWX.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js.map → chunk-XWGEMNBR.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-Y4NRKBFW.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js.map → chunk-YPKFV2JR.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-ZNHEYCDD.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-SENTPZBN.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-Z7MEQCBT.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-424MX4CU.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-YCWQQPDS.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-4FGNTSNV.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-7YS5MY5X.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-LHVKJSPJ.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-ZQY54JNS.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-GYNQQPW2.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-TLW7JTQT.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-VSKYSOCD.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-XTMAPS7I.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-4W5JYCEG.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-ANTOTI2I.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-HPPE6MJN.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-ZQZN54EZ.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-RPOVFMP3.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-XJNYBJGE.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-DM6JBZTS.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-RFBI5FGS.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-B3YY4WY5.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-TTSEFQTS.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-5D65CHGE.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-GPIG77EN.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-C3PEJV2C.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-ZHN7WIGX.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-D4JQ6OWN.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-VZIXDL32.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-DD7L7BNL.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-IL7XCEX2.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-IX4YEWMY.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-VYCWQFK7.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-F27NHENZ.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-HHVQQP6C.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-HJVDQIGY.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-XSFSUUWK.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-HPMEKCAA.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-VMPWTURB.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-GDZIKGR6.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-WDDBPC4D.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{profile-QLER5ENE.js.map → profile-CCOKZ2IQ.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{profile-4OMM32CD.js.map → profile-HUCENIEQ.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-4CBWUMCX.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-5UEAGG3W.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-TDGK6N3I.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-UE5KKAUX.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-FP7MEU4S.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-K4CFLQ5S.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-NJJCALEZ.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-XT6QRKQY.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-UFSJ5YIO.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-YCDAUBWF.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-MTCFES6X.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-Y5WQVT5O.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-DTAHZ236.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-JUDU7YL4.js.map} +0 -0
@@ -1,1531 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="47814bbe-4193-5179-91d9-3196784af35b")}catch(e){}}();
3
- import {
4
- NESTED_SETTING_DESCRIPTORS,
5
- parseNestedSettingValue,
6
- readNestedSettingValue,
7
- resolveNestedSettingDescriptor,
8
- writeNestedSettingValue
9
- } from "./chunk-OKQ22KTH.js";
10
- import {
11
- normalizeParentReferencePolicy,
12
- normalizeSprintReleaseFormatPolicy
13
- } from "./chunk-HZZEHPRG.js";
14
- import {
15
- migrateItemFilesToFormat
16
- } from "./chunk-EVMTBV6V.js";
17
- import {
18
- buildInvalidTypeError
19
- } from "./chunk-MAUKX7JC.js";
20
- import "./chunk-QCWF6IYD.js";
21
- import "./chunk-AXIDKKAT.js";
22
- import {
23
- CONTEXT_DEPTH_VALUES,
24
- EXIT_CODE,
25
- PmCliError,
26
- getActiveExtensionRegistrations,
27
- getSettingsPath,
28
- pathExists,
29
- readSettingsWithMetadata,
30
- resolveGlobalPmRoot,
31
- resolveItemTypeRegistry,
32
- resolveItemTypesFilePath,
33
- resolvePmRoot,
34
- resolveTypeName,
35
- writeSettings
36
- } from "./chunk-7R4QEMZZ.js";
37
-
38
- // dist/core/config/positional-value.js
39
- var FORMAT_KEYS = /* @__PURE__ */ new Set(["item_format"]);
40
- var CRITERIA_KEYS = /* @__PURE__ */ new Set([
41
- "definition_of_done",
42
- "metadata_required_fields",
43
- "lifecycle_stale_blocker_reason_patterns",
44
- "lifecycle_closure_like_blocked_reason_patterns",
45
- "lifecycle_closure_like_resolution_patterns",
46
- "lifecycle_closure_like_actual_result_patterns"
47
- ]);
48
- var POLICY_KEYS = /* @__PURE__ */ new Set([
49
- "history_missing_stream_policy",
50
- "sprint_release_format_policy",
51
- "parent_reference_policy",
52
- "metadata_validation_profile",
53
- "governance_preset",
54
- "governance_ownership_enforcement",
55
- "governance_create_mode_default",
56
- "governance_close_validation_default",
57
- "governance_require_close_reason",
58
- "governance_create_default_type",
59
- "governance_workflow_enforcement",
60
- "governance_parent_reference_policy",
61
- "governance_metadata_validation_profile",
62
- "governance_force_required_for_stale_lock",
63
- "test_result_tracking",
64
- "telemetry_tracking"
65
- ]);
66
- var ENABLED_DISABLED_POLICY_KEYS = /* @__PURE__ */ new Set([
67
- "governance_require_close_reason",
68
- "governance_force_required_for_stale_lock",
69
- "test_result_tracking",
70
- "telemetry_tracking"
71
- ]);
72
- var ENABLED_DISABLED_SYNONYMS = {
73
- off: "disabled",
74
- on: "enabled",
75
- true: "enabled",
76
- false: "disabled",
77
- enabled: "enabled",
78
- disabled: "disabled"
79
- };
80
- function toCanonicalKey(keyOrAlias) {
81
- const normalized = keyOrAlias.trim().toLowerCase().replaceAll("-", "_");
82
- if (FORMAT_KEYS.has(normalized) || CRITERIA_KEYS.has(normalized) || POLICY_KEYS.has(normalized) || normalized === "context") {
83
- return normalized;
84
- }
85
- return void 0;
86
- }
87
- function normalizeEnabledDisabled(value) {
88
- const normalized = value.trim().toLowerCase();
89
- return ENABLED_DISABLED_SYNONYMS[normalized] ?? value;
90
- }
91
- function resolveConfigPositionalValue(canonicalKeyOrAlias, value) {
92
- const key = toCanonicalKey(canonicalKeyOrAlias);
93
- if (key === void 0) {
94
- return {
95
- routable: false,
96
- reason: `Unknown config key "${canonicalKeyOrAlias}" cannot route a positional value.`
97
- };
98
- }
99
- if (key === "context") {
100
- return {
101
- routable: false,
102
- reason: "Config set context does not accept a positional value. Use --default-depth, --activity-limit, --stale-threshold-days, or --section-<name> flags."
103
- };
104
- }
105
- if (FORMAT_KEYS.has(key)) {
106
- return { routable: true, flag: "format", value };
107
- }
108
- if (CRITERIA_KEYS.has(key)) {
109
- return { routable: true, flag: "criterion", values: [value] };
110
- }
111
- const policyValue = ENABLED_DISABLED_POLICY_KEYS.has(key) ? normalizeEnabledDisabled(value) : value;
112
- return { routable: true, flag: "policy", value: policyValue };
113
- }
114
-
115
- // dist/cli/commands/config.js
116
- var CONFIG_SCOPE_VALUES = ["project", "global"];
117
- var CONFIG_KEY_VALUES = [
118
- "definition-of-done",
119
- "definition_of_done",
120
- "item-format",
121
- "item_format",
122
- "history-missing-stream-policy",
123
- "history_missing_stream_policy",
124
- "sprint-release-format-policy",
125
- "sprint_release_format_policy",
126
- "parent-reference-policy",
127
- "parent_reference_policy",
128
- "metadata-validation-profile",
129
- "metadata_validation_profile",
130
- "metadata-required-fields",
131
- "metadata_required_fields",
132
- "lifecycle-stale-blocker-reason-patterns",
133
- "lifecycle_stale_blocker_reason_patterns",
134
- "lifecycle-closure-like-blocked-reason-patterns",
135
- "lifecycle_closure_like_blocked_reason_patterns",
136
- "lifecycle-closure-like-resolution-patterns",
137
- "lifecycle_closure_like_resolution_patterns",
138
- "lifecycle-closure-like-actual-result-patterns",
139
- "lifecycle_closure_like_actual_result_patterns",
140
- "governance-preset",
141
- "governance_preset",
142
- "governance-ownership-enforcement",
143
- "governance_ownership_enforcement",
144
- "governance-create-mode-default",
145
- "governance_create_mode_default",
146
- "governance-close-validation-default",
147
- "governance_close_validation_default",
148
- "governance-require-close-reason",
149
- "governance_require_close_reason",
150
- "governance-create-default-type",
151
- "governance_create_default_type",
152
- "governance-workflow-enforcement",
153
- "governance_workflow_enforcement",
154
- "governance-parent-reference-policy",
155
- "governance_parent_reference_policy",
156
- "governance-metadata-validation-profile",
157
- "governance_metadata_validation_profile",
158
- "governance-force-required-for-stale-lock",
159
- "governance_force_required_for_stale_lock",
160
- "test-result-tracking",
161
- "test_result_tracking",
162
- "telemetry-tracking",
163
- "telemetry_tracking",
164
- "context"
165
- ];
166
- var CONFIG_KEY_ALIASES = {
167
- definition_of_done: ["definition-of-done", "definition_of_done"],
168
- item_format: ["item-format", "item_format"],
169
- history_missing_stream_policy: ["history-missing-stream-policy", "history_missing_stream_policy"],
170
- sprint_release_format_policy: ["sprint-release-format-policy", "sprint_release_format_policy"],
171
- parent_reference_policy: ["parent-reference-policy", "parent_reference_policy"],
172
- metadata_validation_profile: ["metadata-validation-profile", "metadata_validation_profile"],
173
- metadata_required_fields: ["metadata-required-fields", "metadata_required_fields"],
174
- lifecycle_stale_blocker_reason_patterns: [
175
- "lifecycle-stale-blocker-reason-patterns",
176
- "lifecycle_stale_blocker_reason_patterns"
177
- ],
178
- lifecycle_closure_like_blocked_reason_patterns: [
179
- "lifecycle-closure-like-blocked-reason-patterns",
180
- "lifecycle_closure_like_blocked_reason_patterns"
181
- ],
182
- lifecycle_closure_like_resolution_patterns: [
183
- "lifecycle-closure-like-resolution-patterns",
184
- "lifecycle_closure_like_resolution_patterns"
185
- ],
186
- lifecycle_closure_like_actual_result_patterns: [
187
- "lifecycle-closure-like-actual-result-patterns",
188
- "lifecycle_closure_like_actual_result_patterns"
189
- ],
190
- governance_preset: ["governance-preset", "governance_preset"],
191
- governance_ownership_enforcement: ["governance-ownership-enforcement", "governance_ownership_enforcement"],
192
- governance_create_mode_default: ["governance-create-mode-default", "governance_create_mode_default"],
193
- governance_close_validation_default: [
194
- "governance-close-validation-default",
195
- "governance_close_validation_default"
196
- ],
197
- governance_require_close_reason: [
198
- "governance-require-close-reason",
199
- "governance_require_close_reason"
200
- ],
201
- governance_create_default_type: ["governance-create-default-type", "governance_create_default_type"],
202
- governance_workflow_enforcement: ["governance-workflow-enforcement", "governance_workflow_enforcement"],
203
- governance_parent_reference_policy: ["governance-parent-reference-policy", "governance_parent_reference_policy"],
204
- governance_metadata_validation_profile: [
205
- "governance-metadata-validation-profile",
206
- "governance_metadata_validation_profile"
207
- ],
208
- governance_force_required_for_stale_lock: [
209
- "governance-force-required-for-stale-lock",
210
- "governance_force_required_for_stale_lock"
211
- ],
212
- test_result_tracking: ["test-result-tracking", "test_result_tracking"],
213
- telemetry_tracking: ["telemetry-tracking", "telemetry_tracking"],
214
- context: ["context"]
215
- };
216
- var CANONICAL_CONFIG_KEYS = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => CONFIG_KEY_ALIASES[candidate][0]);
217
- var CONFIG_KEY_SUMMARIES = {
218
- definition_of_done: "Definition of Done criteria list.",
219
- item_format: "Default item file format.",
220
- history_missing_stream_policy: "Missing history stream handling policy.",
221
- sprint_release_format_policy: "Sprint/release format validation policy.",
222
- parent_reference_policy: "Parent reference validation policy.",
223
- metadata_validation_profile: "Validate metadata profile policy (core|strict|custom).",
224
- metadata_required_fields: "Validate custom metadata required-fields list.",
225
- lifecycle_stale_blocker_reason_patterns: "Validate lifecycle stale-blocker reason substring patterns (criteria list).",
226
- lifecycle_closure_like_blocked_reason_patterns: "Validate lifecycle closure-like blocked_reason substring patterns (criteria list).",
227
- lifecycle_closure_like_resolution_patterns: "Validate lifecycle closure-like resolution substring patterns (criteria list).",
228
- lifecycle_closure_like_actual_result_patterns: "Validate lifecycle closure-like actual_result substring patterns (criteria list).",
229
- governance_preset: "Governance preset policy (minimal|default|strict|custom).",
230
- governance_ownership_enforcement: "Governance ownership enforcement policy (none|warn|strict).",
231
- governance_create_mode_default: "Governance default create mode (progressive|strict).",
232
- governance_close_validation_default: "Governance default close validation mode (off|warn|strict).",
233
- governance_require_close_reason: "Governance close-reason requirement policy (enabled|disabled).",
234
- governance_create_default_type: "Governance default item type for `pm create` when --type is omitted.",
235
- governance_workflow_enforcement: "Governance per-type transition enforcement mode (off|warn|strict).",
236
- governance_parent_reference_policy: "Governance parent reference policy (warn|strict_error).",
237
- governance_metadata_validation_profile: "Governance metadata validation profile (core|strict|custom).",
238
- governance_force_required_for_stale_lock: "Governance stale-lock force policy (enabled|disabled).",
239
- test_result_tracking: "Item-level linked test result persistence policy.",
240
- telemetry_tracking: "Telemetry usage reporting policy.",
241
- context: "Context command settings (depth, section toggles, limits)."
242
- };
243
- var LIFECYCLE_PATTERN_CONFIG_KEYS = [
244
- "lifecycle_stale_blocker_reason_patterns",
245
- "lifecycle_closure_like_blocked_reason_patterns",
246
- "lifecycle_closure_like_resolution_patterns",
247
- "lifecycle_closure_like_actual_result_patterns"
248
- ];
249
- function isCriteriaConfigKey(key) {
250
- return key === "definition_of_done" || key === "metadata_required_fields" || LIFECYCLE_PATTERN_CONFIG_KEYS.includes(key);
251
- }
252
- function normalizeScope(value) {
253
- if (CONFIG_SCOPE_VALUES.includes(value)) {
254
- return value;
255
- }
256
- throw new PmCliError(`Invalid config scope "${value}". Allowed: ${CONFIG_SCOPE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
257
- }
258
- function normalizeAction(value) {
259
- if (value === "get" || value === "set" || value === "list" || value === "export") {
260
- return value;
261
- }
262
- throw new PmCliError(`Invalid config action "${value}". Allowed: get, set, list, export`, EXIT_CODE.USAGE);
263
- }
264
- function normalizeKey(value) {
265
- if (CONFIG_KEY_VALUES.includes(value)) {
266
- if (value === "item-format" || value === "item_format") {
267
- return "item_format";
268
- }
269
- if (value === "history-missing-stream-policy" || value === "history_missing_stream_policy") {
270
- return "history_missing_stream_policy";
271
- }
272
- if (value === "sprint-release-format-policy" || value === "sprint_release_format_policy") {
273
- return "sprint_release_format_policy";
274
- }
275
- if (value === "parent-reference-policy" || value === "parent_reference_policy") {
276
- return "parent_reference_policy";
277
- }
278
- if (value === "metadata-validation-profile" || value === "metadata_validation_profile") {
279
- return "metadata_validation_profile";
280
- }
281
- if (value === "metadata-required-fields" || value === "metadata_required_fields") {
282
- return "metadata_required_fields";
283
- }
284
- if (value === "lifecycle-stale-blocker-reason-patterns" || value === "lifecycle_stale_blocker_reason_patterns") {
285
- return "lifecycle_stale_blocker_reason_patterns";
286
- }
287
- if (value === "lifecycle-closure-like-blocked-reason-patterns" || value === "lifecycle_closure_like_blocked_reason_patterns") {
288
- return "lifecycle_closure_like_blocked_reason_patterns";
289
- }
290
- if (value === "lifecycle-closure-like-resolution-patterns" || value === "lifecycle_closure_like_resolution_patterns") {
291
- return "lifecycle_closure_like_resolution_patterns";
292
- }
293
- if (value === "lifecycle-closure-like-actual-result-patterns" || value === "lifecycle_closure_like_actual_result_patterns") {
294
- return "lifecycle_closure_like_actual_result_patterns";
295
- }
296
- if (value === "governance-preset" || value === "governance_preset") {
297
- return "governance_preset";
298
- }
299
- if (value === "governance-ownership-enforcement" || value === "governance_ownership_enforcement") {
300
- return "governance_ownership_enforcement";
301
- }
302
- if (value === "governance-create-mode-default" || value === "governance_create_mode_default") {
303
- return "governance_create_mode_default";
304
- }
305
- if (value === "governance-close-validation-default" || value === "governance_close_validation_default") {
306
- return "governance_close_validation_default";
307
- }
308
- if (value === "governance-require-close-reason" || value === "governance_require_close_reason") {
309
- return "governance_require_close_reason";
310
- }
311
- if (value === "governance-create-default-type" || value === "governance_create_default_type") {
312
- return "governance_create_default_type";
313
- }
314
- if (value === "governance-workflow-enforcement" || value === "governance_workflow_enforcement") {
315
- return "governance_workflow_enforcement";
316
- }
317
- if (value === "governance-parent-reference-policy" || value === "governance_parent_reference_policy") {
318
- return "governance_parent_reference_policy";
319
- }
320
- if (value === "governance-metadata-validation-profile" || value === "governance_metadata_validation_profile") {
321
- return "governance_metadata_validation_profile";
322
- }
323
- if (value === "governance-force-required-for-stale-lock" || value === "governance_force_required_for_stale_lock") {
324
- return "governance_force_required_for_stale_lock";
325
- }
326
- if (value === "test-result-tracking" || value === "test_result_tracking") {
327
- return "test_result_tracking";
328
- }
329
- if (value === "telemetry-tracking" || value === "telemetry_tracking") {
330
- return "telemetry_tracking";
331
- }
332
- if (value === "context") {
333
- return "context";
334
- }
335
- return "definition_of_done";
336
- }
337
- const nestedKeys = NESTED_SETTING_DESCRIPTORS.map((descriptor) => descriptor.key).join(", ");
338
- throw new PmCliError(`Invalid config key "${value}". Supported: ${CANONICAL_CONFIG_KEYS.join(", ")} (underscore variants also accepted). Nested leaf settings: ${nestedKeys}.`, EXIT_CODE.USAGE);
339
- }
340
- function normalizeCriteria(values, clearCriteria) {
341
- const normalized = [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
342
- if (clearCriteria) {
343
- if (normalized.length > 0) {
344
- throw new PmCliError("Config set definition-of-done cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
345
- }
346
- return [];
347
- }
348
- if (normalized.length === 0) {
349
- throw new PmCliError("Config set definition-of-done requires at least one non-empty --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
350
- }
351
- return normalized;
352
- }
353
- function normalizeItemFormat(value) {
354
- const normalized = value?.trim().toLowerCase();
355
- if (normalized === "toon") {
356
- return "toon";
357
- }
358
- if (normalized === "json_markdown") {
359
- throw new PmCliError("Config set item-format no longer accepts json_markdown. Markdown item files are legacy read/migration input only.", EXIT_CODE.USAGE);
360
- }
361
- throw new PmCliError("Config set item-format requires --format toon", EXIT_CODE.USAGE);
362
- }
363
- function normalizeHistoryMissingStreamPolicy(value) {
364
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
365
- if (normalized === "auto_create" || normalized === "strict_error") {
366
- return normalized;
367
- }
368
- throw new PmCliError("Config set history-missing-stream-policy requires --policy with one of: auto_create, strict_error", EXIT_CODE.USAGE);
369
- }
370
- function normalizeTestResultTrackingPolicy(value) {
371
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
372
- if (normalized === "enabled" || normalized === "disabled") {
373
- return normalized;
374
- }
375
- throw new PmCliError("Config set test-result-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
376
- }
377
- function normalizeTelemetryTrackingPolicy(value) {
378
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
379
- if (normalized === "enabled" || normalized === "disabled") {
380
- return normalized;
381
- }
382
- throw new PmCliError("Config set telemetry-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
383
- }
384
- function normalizeValidateMetadataProfile(value) {
385
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
386
- if (normalized === "core" || normalized === "strict" || normalized === "custom") {
387
- return normalized;
388
- }
389
- throw new PmCliError("Config set metadata-validation-profile requires --policy with one of: core, strict, custom", EXIT_CODE.USAGE);
390
- }
391
- function normalizeGovernancePreset(value) {
392
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
393
- if (normalized === "minimal" || normalized === "default" || normalized === "strict" || normalized === "custom") {
394
- return normalized;
395
- }
396
- throw new PmCliError("Config set governance-preset requires --policy with one of: minimal, default, strict, custom", EXIT_CODE.USAGE);
397
- }
398
- function normalizeGovernanceOwnershipEnforcement(value) {
399
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
400
- if (normalized === "none" || normalized === "warn" || normalized === "strict") {
401
- return normalized;
402
- }
403
- throw new PmCliError("Config set governance-ownership-enforcement requires --policy with one of: none, warn, strict", EXIT_CODE.USAGE);
404
- }
405
- function normalizeGovernanceCreateModeDefault(value) {
406
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
407
- if (normalized === "progressive" || normalized === "strict") {
408
- return normalized;
409
- }
410
- throw new PmCliError("Config set governance-create-mode-default requires --policy with one of: progressive, strict", EXIT_CODE.USAGE);
411
- }
412
- function normalizeGovernanceCloseValidationDefault(value) {
413
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
414
- if (normalized === "off" || normalized === "warn" || normalized === "strict") {
415
- return normalized;
416
- }
417
- if (normalized === "none" || normalized === "disabled") {
418
- return "off";
419
- }
420
- throw new PmCliError("Config set governance-close-validation-default requires --policy with one of: off, warn, strict", EXIT_CODE.USAGE);
421
- }
422
- function normalizeGovernanceWorkflowEnforcement(value) {
423
- const normalized = typeof value === "string" ? value.trim().toLowerCase().replaceAll("-", "_") : void 0;
424
- if (normalized === "off" || normalized === "warn" || normalized === "strict") {
425
- return normalized;
426
- }
427
- if (normalized === "none" || normalized === "disabled") {
428
- return "off";
429
- }
430
- throw new PmCliError("Config set governance-workflow-enforcement requires one of: off, warn, strict", EXIT_CODE.USAGE);
431
- }
432
- function normalizeGovernanceForceRequiredForStaleLockPolicy(value) {
433
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
434
- if (normalized === "enabled" || normalized === "disabled") {
435
- return normalized;
436
- }
437
- throw new PmCliError("Config set governance-force-required-for-stale-lock requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
438
- }
439
- function normalizeGovernanceRequireCloseReasonPolicy(value) {
440
- const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
441
- if (normalized === "enabled" || normalized === "disabled") {
442
- return normalized;
443
- }
444
- throw new PmCliError("Config set governance-require-close-reason requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
445
- }
446
- function normalizePolicyForConflict(key, value) {
447
- switch (key) {
448
- case "history_missing_stream_policy":
449
- return normalizeHistoryMissingStreamPolicy(value);
450
- case "sprint_release_format_policy":
451
- return normalizeSprintReleaseFormatPolicy(value);
452
- case "parent_reference_policy":
453
- case "governance_parent_reference_policy":
454
- return normalizeParentReferencePolicy(value);
455
- case "metadata_validation_profile":
456
- case "governance_metadata_validation_profile":
457
- return normalizeValidateMetadataProfile(value);
458
- case "governance_preset":
459
- return normalizeGovernancePreset(value);
460
- case "governance_ownership_enforcement":
461
- return normalizeGovernanceOwnershipEnforcement(value);
462
- case "governance_create_mode_default":
463
- return normalizeGovernanceCreateModeDefault(value);
464
- case "governance_close_validation_default":
465
- return normalizeGovernanceCloseValidationDefault(value);
466
- case "governance_require_close_reason":
467
- return normalizeGovernanceRequireCloseReasonPolicy(value);
468
- case "governance_workflow_enforcement":
469
- return normalizeGovernanceWorkflowEnforcement(value);
470
- case "governance_force_required_for_stale_lock":
471
- return normalizeGovernanceForceRequiredForStaleLockPolicy(value);
472
- case "test_result_tracking":
473
- return normalizeTestResultTrackingPolicy(value);
474
- case "telemetry_tracking":
475
- return normalizeTelemetryTrackingPolicy(value);
476
- default:
477
- return value.trim().toLowerCase().replaceAll("-", "_");
478
- }
479
- }
480
- var METADATA_REQUIRED_FIELD_ALIAS_MAP = {
481
- author: "author",
482
- acceptance_criteria: "acceptance_criteria",
483
- "acceptance-criteria": "acceptance_criteria",
484
- estimated_minutes: "estimated_minutes",
485
- "estimated-minutes": "estimated_minutes",
486
- estimate: "estimated_minutes",
487
- close_reason: "close_reason",
488
- "close-reason": "close_reason",
489
- reviewer: "reviewer",
490
- risk: "risk",
491
- confidence: "confidence",
492
- sprint: "sprint",
493
- release: "release"
494
- };
495
- var METADATA_REQUIRED_FIELD_OPTIONS = [
496
- "author",
497
- "acceptance_criteria",
498
- "estimated_minutes",
499
- "close_reason",
500
- "reviewer",
501
- "risk",
502
- "confidence",
503
- "sprint",
504
- "release"
505
- ];
506
- function normalizeMetadataRequiredFields(values, clearCriteria) {
507
- const normalized = [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))];
508
- if (clearCriteria) {
509
- if (normalized.length > 0) {
510
- throw new PmCliError("Config set metadata-required-fields cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
511
- }
512
- return [];
513
- }
514
- if (normalized.length === 0) {
515
- throw new PmCliError("Config set metadata-required-fields requires at least one --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
516
- }
517
- const lowered = normalized.map((value) => value.toLowerCase().replaceAll("-", "_"));
518
- const unsupported = lowered.filter((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value] === void 0);
519
- if (unsupported.length > 0) {
520
- throw new PmCliError(`Config set metadata-required-fields received unsupported values: ${unsupported.join(", ")}. Supported values: ${METADATA_REQUIRED_FIELD_OPTIONS.join(", ")}`, EXIT_CODE.USAGE);
521
- }
522
- return [...new Set(lowered.map((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value]))].sort((left, right) => left.localeCompare(right));
523
- }
524
- function normalizeLifecyclePatternCriteria(key, values, clearCriteria) {
525
- const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
526
- if (clearCriteria) {
527
- if (normalized.length > 0) {
528
- throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} cannot combine --clear-criteria with --criterion values`, EXIT_CODE.USAGE);
529
- }
530
- return [];
531
- }
532
- if (normalized.length === 0) {
533
- throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} requires at least one --criterion value (or --clear-criteria to clear)`, EXIT_CODE.USAGE);
534
- }
535
- return normalized;
536
- }
537
- function normalizeWarnings(values) {
538
- return [...new Set(values)].sort((left, right) => left.localeCompare(right));
539
- }
540
- function normalizeKeyForAction(action, value) {
541
- if (action === "list" || action === "export") {
542
- if (typeof value === "string" && value.trim().length > 0) {
543
- throw new PmCliError(`Config action "${action}" does not accept <key>`, EXIT_CODE.USAGE);
544
- }
545
- return void 0;
546
- }
547
- if (typeof value !== "string" || value.trim().length === 0) {
548
- throw new PmCliError(`Config action "${action}" requires <key>`, EXIT_CODE.USAGE);
549
- }
550
- return normalizeKey(value);
551
- }
552
- function assertConfigKeyDefined(key) {
553
- if (!key) {
554
- throw new PmCliError("Config action requires <key>", EXIT_CODE.USAGE);
555
- }
556
- }
557
- function readConfigValue(settings, key) {
558
- if (key === "item_format") {
559
- return settings.item_format;
560
- }
561
- if (key === "history_missing_stream_policy") {
562
- return settings.history.missing_stream;
563
- }
564
- if (key === "sprint_release_format_policy") {
565
- return settings.validation.sprint_release_format;
566
- }
567
- if (key === "parent_reference_policy") {
568
- return settings.validation.parent_reference;
569
- }
570
- if (key === "metadata_validation_profile") {
571
- return settings.validation.metadata_profile;
572
- }
573
- if (key === "metadata_required_fields") {
574
- return [...settings.validation.metadata_required_fields];
575
- }
576
- if (key === "lifecycle_stale_blocker_reason_patterns") {
577
- return [...settings.validation.lifecycle_stale_blocker_reason_patterns];
578
- }
579
- if (key === "lifecycle_closure_like_blocked_reason_patterns") {
580
- return [...settings.validation.lifecycle_closure_like_blocked_reason_patterns];
581
- }
582
- if (key === "lifecycle_closure_like_resolution_patterns") {
583
- return [...settings.validation.lifecycle_closure_like_resolution_patterns];
584
- }
585
- if (key === "lifecycle_closure_like_actual_result_patterns") {
586
- return [...settings.validation.lifecycle_closure_like_actual_result_patterns];
587
- }
588
- if (key === "governance_preset") {
589
- return settings.governance.preset;
590
- }
591
- if (key === "governance_ownership_enforcement") {
592
- return settings.governance.ownership_enforcement;
593
- }
594
- if (key === "governance_create_mode_default") {
595
- return settings.governance.create_mode_default;
596
- }
597
- if (key === "governance_close_validation_default") {
598
- return settings.governance.close_validation_default;
599
- }
600
- if (key === "governance_require_close_reason") {
601
- return settings.governance.require_close_reason ? "enabled" : "disabled";
602
- }
603
- if (key === "governance_create_default_type") {
604
- return settings.governance.create_default_type ?? "";
605
- }
606
- if (key === "governance_workflow_enforcement") {
607
- return settings.governance.workflow_enforcement ?? "off";
608
- }
609
- if (key === "governance_parent_reference_policy") {
610
- return settings.governance.parent_reference;
611
- }
612
- if (key === "governance_metadata_validation_profile") {
613
- return settings.governance.metadata_profile;
614
- }
615
- if (key === "governance_force_required_for_stale_lock") {
616
- return settings.governance.force_required_for_stale_lock ? "enabled" : "disabled";
617
- }
618
- if (key === "test_result_tracking") {
619
- return settings.testing.record_results_to_items ? "enabled" : "disabled";
620
- }
621
- if (key === "telemetry_tracking") {
622
- return settings.telemetry.enabled ? "enabled" : "disabled";
623
- }
624
- if (key === "context") {
625
- return {
626
- default_depth: settings.context.default_depth,
627
- activity_limit: settings.context.activity_limit,
628
- stale_threshold_days: settings.context.stale_threshold_days,
629
- sections: { ...settings.context.sections }
630
- };
631
- }
632
- return [...settings.workflow.definition_of_done];
633
- }
634
- function withWarnings(result, warnings) {
635
- if (warnings.length === 0) {
636
- return result;
637
- }
638
- return {
639
- ...result,
640
- warnings
641
- };
642
- }
643
- async function resolveSettingsTarget(scope, global) {
644
- const cwd = process.cwd();
645
- const pmRoot = scope === "project" ? resolvePmRoot(cwd, global.path) : resolveGlobalPmRoot(cwd);
646
- const settingsPath = getSettingsPath(pmRoot);
647
- if (scope === "project" && !await pathExists(settingsPath)) {
648
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
649
- }
650
- return { pmRoot, settingsPath };
651
- }
652
- function parseSectionToggle(raw) {
653
- if (raw === void 0)
654
- return void 0;
655
- const normalized = raw.trim().toLowerCase();
656
- if (normalized === "true" || normalized === "enabled" || normalized === "on" || normalized === "1")
657
- return true;
658
- if (normalized === "false" || normalized === "disabled" || normalized === "off" || normalized === "0")
659
- return false;
660
- throw new PmCliError(`Context section toggle must be true|false|enabled|disabled, got "${raw}"`, EXIT_CODE.USAGE);
661
- }
662
- async function applyContextConfig(settings, options, target, scope, warnings) {
663
- let changed = false;
664
- const ctx = settings.context;
665
- if (options.defaultDepth !== void 0) {
666
- const normalized = options.defaultDepth.trim().toLowerCase();
667
- if (!CONTEXT_DEPTH_VALUES.includes(normalized)) {
668
- throw new PmCliError(`Context --default-depth must be one of ${CONTEXT_DEPTH_VALUES.join("|")}`, EXIT_CODE.USAGE);
669
- }
670
- if (ctx.default_depth !== normalized) {
671
- ctx.default_depth = normalized;
672
- changed = true;
673
- }
674
- }
675
- if (options.activityLimit !== void 0) {
676
- const parsed = parseInt(options.activityLimit.trim(), 10);
677
- if (isNaN(parsed) || parsed <= 0) {
678
- throw new PmCliError("Context --activity-limit must be a positive integer", EXIT_CODE.USAGE);
679
- }
680
- if (ctx.activity_limit !== parsed) {
681
- ctx.activity_limit = parsed;
682
- changed = true;
683
- }
684
- }
685
- if (options.staleThresholdDays !== void 0) {
686
- const parsed = parseInt(options.staleThresholdDays.trim(), 10);
687
- if (isNaN(parsed) || parsed <= 0) {
688
- throw new PmCliError("Context --stale-threshold-days must be a positive integer", EXIT_CODE.USAGE);
689
- }
690
- if (ctx.stale_threshold_days !== parsed) {
691
- ctx.stale_threshold_days = parsed;
692
- changed = true;
693
- }
694
- }
695
- const sectionToggles = [
696
- ["hierarchy", options.sectionHierarchy],
697
- ["activity", options.sectionActivity],
698
- ["progress", options.sectionProgress],
699
- ["blockers", options.sectionBlockers],
700
- ["files", options.sectionFiles],
701
- ["workload", options.sectionWorkload],
702
- ["staleness", options.sectionStaleness],
703
- ["tests", options.sectionTests]
704
- ];
705
- for (const [sectionName, rawValue] of sectionToggles) {
706
- const toggle = parseSectionToggle(rawValue);
707
- if (toggle !== void 0) {
708
- const key = sectionName;
709
- if (ctx.sections[key] !== toggle) {
710
- ctx.sections[key] = toggle;
711
- changed = true;
712
- }
713
- }
714
- }
715
- if (changed) {
716
- await writeSettings(target.pmRoot, settings, "config:set:context");
717
- }
718
- return withWarnings({
719
- scope,
720
- key: "context",
721
- context_settings: {
722
- default_depth: ctx.default_depth,
723
- activity_limit: ctx.activity_limit,
724
- stale_threshold_days: ctx.stale_threshold_days,
725
- sections: { ...ctx.sections }
726
- },
727
- settings_path: target.settingsPath,
728
- changed
729
- }, warnings);
730
- }
731
- function applyPositionalValue(action, keyValue, normalizedKey, nestedSetting, valueValue, options) {
732
- if (valueValue === void 0) {
733
- return options;
734
- }
735
- if (action !== "set") {
736
- throw new PmCliError(`Config action "${action}" does not accept a positional value. Only "set" takes <value>.`, EXIT_CODE.USAGE);
737
- }
738
- if (typeof keyValue !== "string" || keyValue.trim().length === 0) {
739
- throw new PmCliError('Config action "set" requires <key> before a positional <value>.', EXIT_CODE.USAGE);
740
- }
741
- if (nestedSetting) {
742
- if (options.value !== void 0 && valueValue !== void 0 && options.value !== valueValue) {
743
- throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --value "${options.value}". Pass only one.`, EXIT_CODE.USAGE);
744
- }
745
- return { ...options, value: valueValue };
746
- }
747
- assertConfigKeyDefined(normalizedKey);
748
- const routed = resolveConfigPositionalValue(normalizedKey, valueValue);
749
- if (!routed.routable) {
750
- throw new PmCliError(routed.reason, EXIT_CODE.USAGE);
751
- }
752
- if (routed.flag === "criterion") {
753
- if (options.criterion !== void 0 && options.criterion.length > 0) {
754
- throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --criterion. Pass criteria via --criterion only when supplying more than one value.`, EXIT_CODE.USAGE);
755
- }
756
- return { ...options, criterion: routed.values };
757
- }
758
- if (routed.flag === "format") {
759
- if (options.format !== void 0 && normalizeItemFormat(options.format) !== normalizeItemFormat(routed.value)) {
760
- throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --format "${options.format}". Pass only one.`, EXIT_CODE.USAGE);
761
- }
762
- return { ...options, format: routed.value };
763
- }
764
- if (options.policy !== void 0 && normalizePolicyForConflict(normalizedKey, options.policy) !== normalizePolicyForConflict(normalizedKey, routed.value)) {
765
- throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --policy "${options.policy}". Pass only one.`, EXIT_CODE.USAGE);
766
- }
767
- return { ...options, policy: routed.value };
768
- }
769
- async function runConfig(scopeValue, actionValue, keyValue, options, global, valueValue) {
770
- const scope = normalizeScope(scopeValue);
771
- const action = normalizeAction(actionValue);
772
- const nestedSetting = action === "get" || action === "set" ? resolveNestedSettingDescriptor(keyValue) : void 0;
773
- const key = nestedSetting ? void 0 : normalizeKeyForAction(action, keyValue);
774
- options = applyPositionalValue(action, keyValue, key, nestedSetting, valueValue, options);
775
- const target = await resolveSettingsTarget(scope, global);
776
- const { settings, metadata, warnings: settingsReadWarnings } = await readSettingsWithMetadata(target.pmRoot);
777
- const warnings = normalizeWarnings(settingsReadWarnings);
778
- if (nestedSetting) {
779
- if (action === "get") {
780
- const currentValue = readNestedSettingValue(settings, nestedSetting);
781
- return withWarnings({
782
- scope,
783
- key: nestedSetting.key,
784
- nested_setting: {
785
- key: nestedSetting.key,
786
- path: nestedSetting.path,
787
- kind: nestedSetting.kind,
788
- value: currentValue
789
- },
790
- settings_path: target.settingsPath,
791
- changed: false
792
- }, warnings);
793
- }
794
- const rawValue = options.value;
795
- if (typeof rawValue !== "string") {
796
- throw new PmCliError(`Config set ${nestedSetting.key} requires a value. Pass it positionally (\`pm config ${scope} set ${nestedSetting.key} <value>\`) or via --value.`, EXIT_CODE.USAGE);
797
- }
798
- const parsed = parseNestedSettingValue(nestedSetting, rawValue);
799
- if (!parsed.ok) {
800
- throw new PmCliError(parsed.error.message, EXIT_CODE.USAGE);
801
- }
802
- const changed2 = writeNestedSettingValue(settings, nestedSetting, parsed.parsed.value);
803
- if (changed2) {
804
- await writeSettings(target.pmRoot, settings, `config:set:${nestedSetting.path}`);
805
- }
806
- return withWarnings({
807
- scope,
808
- key: nestedSetting.key,
809
- nested_setting: {
810
- key: nestedSetting.key,
811
- path: nestedSetting.path,
812
- kind: nestedSetting.kind,
813
- value: parsed.parsed.value
814
- },
815
- settings_path: target.settingsPath,
816
- changed: changed2
817
- }, warnings);
818
- }
819
- if (action === "list") {
820
- const keys = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => ({
821
- key: candidate,
822
- aliases: CONFIG_KEY_ALIASES[candidate],
823
- value_kind: candidate === "context" ? "object" : isCriteriaConfigKey(candidate) ? "string_array" : "enum",
824
- set_flags: candidate === "context" ? ["--default-depth", "--activity-limit", "--stale-threshold-days", "--section-<name>"] : isCriteriaConfigKey(candidate) ? ["--criterion", "--clear-criteria"] : candidate === "item_format" ? ["--format"] : ["--policy"],
825
- summary: CONFIG_KEY_SUMMARIES[candidate],
826
- value: readConfigValue(settings, candidate)
827
- }));
828
- const nestedSettings = NESTED_SETTING_DESCRIPTORS.map((descriptor) => ({
829
- key: descriptor.key,
830
- path: descriptor.path,
831
- kind: descriptor.kind,
832
- value: readNestedSettingValue(settings, descriptor)
833
- }));
834
- return withWarnings({
835
- scope,
836
- keys,
837
- nested_settings: nestedSettings,
838
- count: keys.length,
839
- settings_path: target.settingsPath,
840
- changed: false
841
- }, warnings);
842
- }
843
- if (action === "export") {
844
- const values = {
845
- definition_of_done: readConfigValue(settings, "definition_of_done"),
846
- item_format: readConfigValue(settings, "item_format"),
847
- history_missing_stream_policy: readConfigValue(settings, "history_missing_stream_policy"),
848
- sprint_release_format_policy: readConfigValue(settings, "sprint_release_format_policy"),
849
- parent_reference_policy: readConfigValue(settings, "parent_reference_policy"),
850
- metadata_validation_profile: readConfigValue(settings, "metadata_validation_profile"),
851
- metadata_required_fields: readConfigValue(settings, "metadata_required_fields"),
852
- lifecycle_stale_blocker_reason_patterns: readConfigValue(settings, "lifecycle_stale_blocker_reason_patterns"),
853
- lifecycle_closure_like_blocked_reason_patterns: readConfigValue(settings, "lifecycle_closure_like_blocked_reason_patterns"),
854
- lifecycle_closure_like_resolution_patterns: readConfigValue(settings, "lifecycle_closure_like_resolution_patterns"),
855
- lifecycle_closure_like_actual_result_patterns: readConfigValue(settings, "lifecycle_closure_like_actual_result_patterns"),
856
- governance_preset: readConfigValue(settings, "governance_preset"),
857
- governance_ownership_enforcement: readConfigValue(settings, "governance_ownership_enforcement"),
858
- governance_create_mode_default: readConfigValue(settings, "governance_create_mode_default"),
859
- governance_close_validation_default: readConfigValue(settings, "governance_close_validation_default"),
860
- governance_require_close_reason: readConfigValue(settings, "governance_require_close_reason"),
861
- governance_create_default_type: readConfigValue(settings, "governance_create_default_type"),
862
- governance_workflow_enforcement: readConfigValue(settings, "governance_workflow_enforcement"),
863
- governance_parent_reference_policy: readConfigValue(settings, "governance_parent_reference_policy"),
864
- governance_metadata_validation_profile: readConfigValue(settings, "governance_metadata_validation_profile"),
865
- governance_force_required_for_stale_lock: readConfigValue(settings, "governance_force_required_for_stale_lock"),
866
- test_result_tracking: readConfigValue(settings, "test_result_tracking"),
867
- telemetry_tracking: readConfigValue(settings, "telemetry_tracking"),
868
- context: readConfigValue(settings, "context")
869
- };
870
- return withWarnings({
871
- scope,
872
- values,
873
- settings_path: target.settingsPath,
874
- changed: false
875
- }, warnings);
876
- }
877
- if (action === "get") {
878
- assertConfigKeyDefined(key);
879
- if (key === "item_format") {
880
- return withWarnings({
881
- scope,
882
- key,
883
- format: settings.item_format,
884
- has_explicit_item_format: metadata.has_explicit_item_format,
885
- settings_path: target.settingsPath,
886
- changed: false
887
- }, warnings);
888
- }
889
- if (key === "history_missing_stream_policy") {
890
- return withWarnings({
891
- scope,
892
- key,
893
- policy: settings.history.missing_stream,
894
- settings_path: target.settingsPath,
895
- changed: false
896
- }, warnings);
897
- }
898
- if (key === "sprint_release_format_policy") {
899
- return withWarnings({
900
- scope,
901
- key,
902
- policy: settings.validation.sprint_release_format,
903
- settings_path: target.settingsPath,
904
- changed: false
905
- }, warnings);
906
- }
907
- if (key === "parent_reference_policy") {
908
- return withWarnings({
909
- scope,
910
- key,
911
- policy: settings.validation.parent_reference,
912
- settings_path: target.settingsPath,
913
- changed: false
914
- }, warnings);
915
- }
916
- if (key === "metadata_validation_profile") {
917
- return withWarnings({
918
- scope,
919
- key,
920
- policy: settings.validation.metadata_profile,
921
- settings_path: target.settingsPath,
922
- changed: false
923
- }, warnings);
924
- }
925
- if (key === "metadata_required_fields") {
926
- return withWarnings({
927
- scope,
928
- key,
929
- criteria: [...settings.validation.metadata_required_fields],
930
- settings_path: target.settingsPath,
931
- changed: false
932
- }, warnings);
933
- }
934
- if (key === "lifecycle_stale_blocker_reason_patterns") {
935
- return withWarnings({
936
- scope,
937
- key,
938
- criteria: [...settings.validation.lifecycle_stale_blocker_reason_patterns],
939
- settings_path: target.settingsPath,
940
- changed: false
941
- }, warnings);
942
- }
943
- if (key === "lifecycle_closure_like_blocked_reason_patterns") {
944
- return withWarnings({
945
- scope,
946
- key,
947
- criteria: [...settings.validation.lifecycle_closure_like_blocked_reason_patterns],
948
- settings_path: target.settingsPath,
949
- changed: false
950
- }, warnings);
951
- }
952
- if (key === "lifecycle_closure_like_resolution_patterns") {
953
- return withWarnings({
954
- scope,
955
- key,
956
- criteria: [...settings.validation.lifecycle_closure_like_resolution_patterns],
957
- settings_path: target.settingsPath,
958
- changed: false
959
- }, warnings);
960
- }
961
- if (key === "lifecycle_closure_like_actual_result_patterns") {
962
- return withWarnings({
963
- scope,
964
- key,
965
- criteria: [...settings.validation.lifecycle_closure_like_actual_result_patterns],
966
- settings_path: target.settingsPath,
967
- changed: false
968
- }, warnings);
969
- }
970
- if (key === "governance_preset") {
971
- return withWarnings({
972
- scope,
973
- key,
974
- policy: settings.governance.preset,
975
- settings_path: target.settingsPath,
976
- changed: false
977
- }, warnings);
978
- }
979
- if (key === "governance_ownership_enforcement") {
980
- return withWarnings({
981
- scope,
982
- key,
983
- policy: settings.governance.ownership_enforcement,
984
- settings_path: target.settingsPath,
985
- changed: false
986
- }, warnings);
987
- }
988
- if (key === "governance_create_mode_default") {
989
- return withWarnings({
990
- scope,
991
- key,
992
- policy: settings.governance.create_mode_default,
993
- settings_path: target.settingsPath,
994
- changed: false
995
- }, warnings);
996
- }
997
- if (key === "governance_close_validation_default") {
998
- return withWarnings({
999
- scope,
1000
- key,
1001
- policy: settings.governance.close_validation_default,
1002
- settings_path: target.settingsPath,
1003
- changed: false
1004
- }, warnings);
1005
- }
1006
- if (key === "governance_require_close_reason") {
1007
- return withWarnings({
1008
- scope,
1009
- key,
1010
- policy: settings.governance.require_close_reason ? "enabled" : "disabled",
1011
- settings_path: target.settingsPath,
1012
- changed: false
1013
- }, warnings);
1014
- }
1015
- if (key === "governance_create_default_type") {
1016
- return withWarnings({
1017
- scope,
1018
- key,
1019
- policy: settings.governance.create_default_type ?? "",
1020
- settings_path: target.settingsPath,
1021
- changed: false
1022
- }, warnings);
1023
- }
1024
- if (key === "governance_workflow_enforcement") {
1025
- return withWarnings({
1026
- scope,
1027
- key,
1028
- policy: settings.governance.workflow_enforcement ?? "off",
1029
- settings_path: target.settingsPath,
1030
- changed: false
1031
- }, warnings);
1032
- }
1033
- if (key === "governance_parent_reference_policy") {
1034
- return withWarnings({
1035
- scope,
1036
- key,
1037
- policy: settings.governance.parent_reference,
1038
- settings_path: target.settingsPath,
1039
- changed: false
1040
- }, warnings);
1041
- }
1042
- if (key === "governance_metadata_validation_profile") {
1043
- return withWarnings({
1044
- scope,
1045
- key,
1046
- policy: settings.governance.metadata_profile,
1047
- settings_path: target.settingsPath,
1048
- changed: false
1049
- }, warnings);
1050
- }
1051
- if (key === "governance_force_required_for_stale_lock") {
1052
- return withWarnings({
1053
- scope,
1054
- key,
1055
- policy: settings.governance.force_required_for_stale_lock ? "enabled" : "disabled",
1056
- settings_path: target.settingsPath,
1057
- changed: false
1058
- }, warnings);
1059
- }
1060
- if (key === "test_result_tracking") {
1061
- return withWarnings({
1062
- scope,
1063
- key,
1064
- policy: settings.testing.record_results_to_items ? "enabled" : "disabled",
1065
- settings_path: target.settingsPath,
1066
- changed: false
1067
- }, warnings);
1068
- }
1069
- if (key === "telemetry_tracking") {
1070
- return withWarnings({
1071
- scope,
1072
- key,
1073
- policy: settings.telemetry.enabled ? "enabled" : "disabled",
1074
- settings_path: target.settingsPath,
1075
- changed: false
1076
- }, warnings);
1077
- }
1078
- if (key === "context") {
1079
- return withWarnings({
1080
- scope,
1081
- key,
1082
- context_settings: {
1083
- default_depth: settings.context.default_depth,
1084
- activity_limit: settings.context.activity_limit,
1085
- stale_threshold_days: settings.context.stale_threshold_days,
1086
- sections: { ...settings.context.sections }
1087
- },
1088
- settings_path: target.settingsPath,
1089
- changed: false
1090
- }, warnings);
1091
- }
1092
- return withWarnings({
1093
- scope,
1094
- key,
1095
- criteria: [...settings.workflow.definition_of_done],
1096
- settings_path: target.settingsPath,
1097
- changed: false
1098
- }, warnings);
1099
- }
1100
- assertConfigKeyDefined(key);
1101
- if (options.clearCriteria === true && !isCriteriaConfigKey(key)) {
1102
- throw new PmCliError("--clear-criteria is only supported with config set criteria-list keys", EXIT_CODE.USAGE);
1103
- }
1104
- if (key === "item_format") {
1105
- const nextFormat = normalizeItemFormat(options.format);
1106
- const changed2 = settings.item_format !== nextFormat || !metadata.has_explicit_item_format;
1107
- let migration = void 0;
1108
- if (changed2) {
1109
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1110
- const migrated = await migrateItemFilesToFormat(target.pmRoot, nextFormat, "config:set:item_format:migrate", typeRegistry.type_to_folder, settings.schema);
1111
- migration = {
1112
- target_format: migrated.target_format,
1113
- scanned: migrated.scanned,
1114
- migrated: migrated.migrated,
1115
- removed: migrated.removed,
1116
- warnings: migrated.warnings
1117
- };
1118
- settings.item_format = nextFormat;
1119
- await writeSettings(target.pmRoot, settings, "config:set:item_format");
1120
- }
1121
- return withWarnings({
1122
- scope,
1123
- key,
1124
- format: settings.item_format,
1125
- has_explicit_item_format: true,
1126
- migration,
1127
- settings_path: target.settingsPath,
1128
- changed: changed2
1129
- }, warnings);
1130
- }
1131
- if (key === "history_missing_stream_policy") {
1132
- const nextPolicy = normalizeHistoryMissingStreamPolicy(options.policy);
1133
- const changed2 = settings.history.missing_stream !== nextPolicy;
1134
- settings.history.missing_stream = nextPolicy;
1135
- if (changed2) {
1136
- await writeSettings(target.pmRoot, settings, "config:set:history_missing_stream_policy");
1137
- }
1138
- return withWarnings({
1139
- scope,
1140
- key,
1141
- policy: settings.history.missing_stream,
1142
- settings_path: target.settingsPath,
1143
- changed: changed2
1144
- }, warnings);
1145
- }
1146
- if (key === "sprint_release_format_policy") {
1147
- const nextPolicy = normalizeSprintReleaseFormatPolicy(options.policy);
1148
- const changed2 = settings.validation.sprint_release_format !== nextPolicy;
1149
- settings.validation.sprint_release_format = nextPolicy;
1150
- if (changed2) {
1151
- await writeSettings(target.pmRoot, settings, "config:set:sprint_release_format_policy");
1152
- }
1153
- return withWarnings({
1154
- scope,
1155
- key,
1156
- policy: settings.validation.sprint_release_format,
1157
- settings_path: target.settingsPath,
1158
- changed: changed2
1159
- }, warnings);
1160
- }
1161
- if (key === "parent_reference_policy") {
1162
- const nextPolicy = normalizeParentReferencePolicy(options.policy);
1163
- const changed2 = settings.validation.parent_reference !== nextPolicy || settings.governance.preset !== "custom" || settings.governance.parent_reference !== nextPolicy;
1164
- settings.validation.parent_reference = nextPolicy;
1165
- settings.governance.preset = "custom";
1166
- settings.governance.parent_reference = nextPolicy;
1167
- if (changed2) {
1168
- await writeSettings(target.pmRoot, settings, "config:set:parent_reference_policy");
1169
- }
1170
- return withWarnings({
1171
- scope,
1172
- key,
1173
- policy: settings.validation.parent_reference,
1174
- settings_path: target.settingsPath,
1175
- changed: changed2
1176
- }, warnings);
1177
- }
1178
- if (key === "metadata_validation_profile") {
1179
- const nextPolicy = normalizeValidateMetadataProfile(options.policy);
1180
- const changed2 = settings.validation.metadata_profile !== nextPolicy || settings.governance.preset !== "custom" || settings.governance.metadata_profile !== nextPolicy;
1181
- settings.validation.metadata_profile = nextPolicy;
1182
- settings.governance.preset = "custom";
1183
- settings.governance.metadata_profile = nextPolicy;
1184
- if (changed2) {
1185
- await writeSettings(target.pmRoot, settings, "config:set:metadata_validation_profile");
1186
- }
1187
- return withWarnings({
1188
- scope,
1189
- key,
1190
- policy: settings.validation.metadata_profile,
1191
- settings_path: target.settingsPath,
1192
- changed: changed2
1193
- }, warnings);
1194
- }
1195
- if (key === "metadata_required_fields") {
1196
- const nextCriteria2 = normalizeMetadataRequiredFields(options.criterion, options.clearCriteria);
1197
- const changed2 = nextCriteria2.length !== settings.validation.metadata_required_fields.length || nextCriteria2.some((value, index) => value !== settings.validation.metadata_required_fields[index]);
1198
- settings.validation.metadata_required_fields = nextCriteria2;
1199
- if (changed2) {
1200
- await writeSettings(target.pmRoot, settings, "config:set:metadata_required_fields");
1201
- }
1202
- return withWarnings({
1203
- scope,
1204
- key,
1205
- criteria: [...settings.validation.metadata_required_fields],
1206
- settings_path: target.settingsPath,
1207
- changed: changed2
1208
- }, warnings);
1209
- }
1210
- if (key === "lifecycle_stale_blocker_reason_patterns") {
1211
- const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
1212
- const changed2 = nextCriteria2.length !== settings.validation.lifecycle_stale_blocker_reason_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_stale_blocker_reason_patterns[index]);
1213
- settings.validation.lifecycle_stale_blocker_reason_patterns = nextCriteria2;
1214
- if (changed2) {
1215
- await writeSettings(target.pmRoot, settings, "config:set:lifecycle_stale_blocker_reason_patterns");
1216
- }
1217
- return withWarnings({
1218
- scope,
1219
- key,
1220
- criteria: [...settings.validation.lifecycle_stale_blocker_reason_patterns],
1221
- settings_path: target.settingsPath,
1222
- changed: changed2
1223
- }, warnings);
1224
- }
1225
- if (key === "lifecycle_closure_like_blocked_reason_patterns") {
1226
- const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
1227
- const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_blocked_reason_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_blocked_reason_patterns[index]);
1228
- settings.validation.lifecycle_closure_like_blocked_reason_patterns = nextCriteria2;
1229
- if (changed2) {
1230
- await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_blocked_reason_patterns");
1231
- }
1232
- return withWarnings({
1233
- scope,
1234
- key,
1235
- criteria: [...settings.validation.lifecycle_closure_like_blocked_reason_patterns],
1236
- settings_path: target.settingsPath,
1237
- changed: changed2
1238
- }, warnings);
1239
- }
1240
- if (key === "lifecycle_closure_like_resolution_patterns") {
1241
- const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
1242
- const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_resolution_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_resolution_patterns[index]);
1243
- settings.validation.lifecycle_closure_like_resolution_patterns = nextCriteria2;
1244
- if (changed2) {
1245
- await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_resolution_patterns");
1246
- }
1247
- return withWarnings({
1248
- scope,
1249
- key,
1250
- criteria: [...settings.validation.lifecycle_closure_like_resolution_patterns],
1251
- settings_path: target.settingsPath,
1252
- changed: changed2
1253
- }, warnings);
1254
- }
1255
- if (key === "lifecycle_closure_like_actual_result_patterns") {
1256
- const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
1257
- const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_actual_result_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_actual_result_patterns[index]);
1258
- settings.validation.lifecycle_closure_like_actual_result_patterns = nextCriteria2;
1259
- if (changed2) {
1260
- await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_actual_result_patterns");
1261
- }
1262
- return withWarnings({
1263
- scope,
1264
- key,
1265
- criteria: [...settings.validation.lifecycle_closure_like_actual_result_patterns],
1266
- settings_path: target.settingsPath,
1267
- changed: changed2
1268
- }, warnings);
1269
- }
1270
- if (key === "governance_preset") {
1271
- const nextPolicy = normalizeGovernancePreset(options.policy);
1272
- const changed2 = settings.governance.preset !== nextPolicy;
1273
- settings.governance.preset = nextPolicy;
1274
- if (changed2) {
1275
- await writeSettings(target.pmRoot, settings, "config:set:governance_preset");
1276
- }
1277
- return withWarnings({
1278
- scope,
1279
- key,
1280
- policy: settings.governance.preset,
1281
- settings_path: target.settingsPath,
1282
- changed: changed2
1283
- }, warnings);
1284
- }
1285
- if (key === "governance_ownership_enforcement") {
1286
- const nextPolicy = normalizeGovernanceOwnershipEnforcement(options.policy);
1287
- const changed2 = settings.governance.preset !== "custom" || settings.governance.ownership_enforcement !== nextPolicy;
1288
- settings.governance.preset = "custom";
1289
- settings.governance.ownership_enforcement = nextPolicy;
1290
- if (changed2) {
1291
- await writeSettings(target.pmRoot, settings, "config:set:governance_ownership_enforcement");
1292
- }
1293
- return withWarnings({
1294
- scope,
1295
- key,
1296
- policy: settings.governance.ownership_enforcement,
1297
- settings_path: target.settingsPath,
1298
- changed: changed2
1299
- }, warnings);
1300
- }
1301
- if (key === "governance_create_mode_default") {
1302
- const nextPolicy = normalizeGovernanceCreateModeDefault(options.policy);
1303
- const changed2 = settings.governance.preset !== "custom" || settings.governance.create_mode_default !== nextPolicy;
1304
- settings.governance.preset = "custom";
1305
- settings.governance.create_mode_default = nextPolicy;
1306
- if (changed2) {
1307
- await writeSettings(target.pmRoot, settings, "config:set:governance_create_mode_default");
1308
- }
1309
- return withWarnings({
1310
- scope,
1311
- key,
1312
- policy: settings.governance.create_mode_default,
1313
- settings_path: target.settingsPath,
1314
- changed: changed2
1315
- }, warnings);
1316
- }
1317
- if (key === "governance_close_validation_default") {
1318
- const nextPolicy = normalizeGovernanceCloseValidationDefault(options.policy);
1319
- const changed2 = settings.governance.preset !== "custom" || settings.governance.close_validation_default !== nextPolicy;
1320
- settings.governance.preset = "custom";
1321
- settings.governance.close_validation_default = nextPolicy;
1322
- if (changed2) {
1323
- await writeSettings(target.pmRoot, settings, "config:set:governance_close_validation_default");
1324
- }
1325
- return withWarnings({
1326
- scope,
1327
- key,
1328
- policy: settings.governance.close_validation_default,
1329
- settings_path: target.settingsPath,
1330
- changed: changed2
1331
- }, warnings);
1332
- }
1333
- if (key === "governance_require_close_reason") {
1334
- const nextPolicy = normalizeGovernanceRequireCloseReasonPolicy(options.policy);
1335
- const nextEnabled = nextPolicy === "enabled";
1336
- const changed2 = settings.governance.require_close_reason !== nextEnabled;
1337
- settings.governance.require_close_reason = nextEnabled;
1338
- if (changed2) {
1339
- await writeSettings(target.pmRoot, settings, "config:set:governance_require_close_reason");
1340
- }
1341
- return withWarnings({
1342
- scope,
1343
- key,
1344
- policy: settings.governance.require_close_reason ? "enabled" : "disabled",
1345
- settings_path: target.settingsPath,
1346
- changed: changed2
1347
- }, warnings);
1348
- }
1349
- if (key === "governance_create_default_type") {
1350
- const policyProvided = typeof options.policy === "string";
1351
- const rawType = policyProvided ? options.policy.trim() : "";
1352
- if (policyProvided && rawType.length === 0) {
1353
- const changed3 = settings.governance.create_default_type !== void 0;
1354
- delete settings.governance.create_default_type;
1355
- if (changed3) {
1356
- await writeSettings(target.pmRoot, settings, "config:set:governance_create_default_type");
1357
- }
1358
- return withWarnings({
1359
- scope,
1360
- key,
1361
- policy: settings.governance.create_default_type ?? "",
1362
- settings_path: target.settingsPath,
1363
- changed: changed3
1364
- }, warnings);
1365
- }
1366
- if (rawType.length === 0) {
1367
- throw new PmCliError('Config set governance-create-default-type requires an item type value (or an empty value "" to clear it)', EXIT_CODE.USAGE);
1368
- }
1369
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1370
- const resolvedType = resolveTypeName(rawType, typeRegistry);
1371
- if (!resolvedType) {
1372
- throw new PmCliError(buildInvalidTypeError(rawType, typeRegistry.types, resolveItemTypesFilePath(target.pmRoot, settings.schema)), EXIT_CODE.USAGE);
1373
- }
1374
- const changed2 = settings.governance.create_default_type !== resolvedType;
1375
- settings.governance.create_default_type = resolvedType;
1376
- if (changed2) {
1377
- await writeSettings(target.pmRoot, settings, "config:set:governance_create_default_type");
1378
- }
1379
- return withWarnings({
1380
- scope,
1381
- key,
1382
- policy: settings.governance.create_default_type,
1383
- settings_path: target.settingsPath,
1384
- changed: changed2
1385
- }, warnings);
1386
- }
1387
- if (key === "governance_workflow_enforcement") {
1388
- const nextPolicy = normalizeGovernanceWorkflowEnforcement(options.policy);
1389
- const changed2 = (settings.governance.workflow_enforcement ?? "off") !== nextPolicy;
1390
- settings.governance.workflow_enforcement = nextPolicy;
1391
- if (changed2) {
1392
- await writeSettings(target.pmRoot, settings, "config:set:governance_workflow_enforcement");
1393
- }
1394
- return withWarnings({
1395
- scope,
1396
- key,
1397
- policy: settings.governance.workflow_enforcement,
1398
- settings_path: target.settingsPath,
1399
- changed: changed2
1400
- }, warnings);
1401
- }
1402
- if (key === "governance_parent_reference_policy") {
1403
- const nextPolicy = normalizeParentReferencePolicy(options.policy);
1404
- const changed2 = settings.governance.preset !== "custom" || settings.governance.parent_reference !== nextPolicy;
1405
- settings.governance.preset = "custom";
1406
- settings.governance.parent_reference = nextPolicy;
1407
- settings.validation.parent_reference = nextPolicy;
1408
- if (changed2) {
1409
- await writeSettings(target.pmRoot, settings, "config:set:governance_parent_reference_policy");
1410
- }
1411
- return withWarnings({
1412
- scope,
1413
- key,
1414
- policy: settings.governance.parent_reference,
1415
- settings_path: target.settingsPath,
1416
- changed: changed2
1417
- }, warnings);
1418
- }
1419
- if (key === "governance_metadata_validation_profile") {
1420
- const nextPolicy = normalizeValidateMetadataProfile(options.policy);
1421
- const changed2 = settings.governance.preset !== "custom" || settings.governance.metadata_profile !== nextPolicy;
1422
- settings.governance.preset = "custom";
1423
- settings.governance.metadata_profile = nextPolicy;
1424
- settings.validation.metadata_profile = nextPolicy;
1425
- if (changed2) {
1426
- await writeSettings(target.pmRoot, settings, "config:set:governance_metadata_validation_profile");
1427
- }
1428
- return withWarnings({
1429
- scope,
1430
- key,
1431
- policy: settings.governance.metadata_profile,
1432
- settings_path: target.settingsPath,
1433
- changed: changed2
1434
- }, warnings);
1435
- }
1436
- if (key === "governance_force_required_for_stale_lock") {
1437
- const nextPolicy = normalizeGovernanceForceRequiredForStaleLockPolicy(options.policy);
1438
- const nextEnabled = nextPolicy === "enabled";
1439
- const changed2 = settings.governance.preset !== "custom" || settings.governance.force_required_for_stale_lock !== nextEnabled;
1440
- settings.governance.preset = "custom";
1441
- settings.governance.force_required_for_stale_lock = nextEnabled;
1442
- if (changed2) {
1443
- await writeSettings(target.pmRoot, settings, "config:set:governance_force_required_for_stale_lock");
1444
- }
1445
- return withWarnings({
1446
- scope,
1447
- key,
1448
- policy: settings.governance.force_required_for_stale_lock ? "enabled" : "disabled",
1449
- settings_path: target.settingsPath,
1450
- changed: changed2
1451
- }, warnings);
1452
- }
1453
- if (key === "test_result_tracking") {
1454
- const nextPolicy = normalizeTestResultTrackingPolicy(options.policy);
1455
- const nextEnabled = nextPolicy === "enabled";
1456
- const changed2 = settings.testing.record_results_to_items !== nextEnabled;
1457
- settings.testing.record_results_to_items = nextEnabled;
1458
- if (changed2) {
1459
- await writeSettings(target.pmRoot, settings, "config:set:test_result_tracking");
1460
- }
1461
- return withWarnings({
1462
- scope,
1463
- key,
1464
- policy: settings.testing.record_results_to_items ? "enabled" : "disabled",
1465
- settings_path: target.settingsPath,
1466
- changed: changed2
1467
- }, warnings);
1468
- }
1469
- if (key === "telemetry_tracking") {
1470
- const nextPolicy = normalizeTelemetryTrackingPolicy(options.policy);
1471
- const nextEnabled = nextPolicy === "enabled";
1472
- const changed2 = settings.telemetry.enabled !== nextEnabled || !settings.telemetry.first_run_prompt_completed;
1473
- settings.telemetry.enabled = nextEnabled;
1474
- settings.telemetry.first_run_prompt_completed = true;
1475
- if (changed2) {
1476
- await writeSettings(target.pmRoot, settings, "config:set:telemetry_tracking");
1477
- }
1478
- return withWarnings({
1479
- scope,
1480
- key,
1481
- policy: settings.telemetry.enabled ? "enabled" : "disabled",
1482
- settings_path: target.settingsPath,
1483
- changed: changed2
1484
- }, warnings);
1485
- }
1486
- if (key === "context") {
1487
- return applyContextConfig(settings, options, target, scope, warnings);
1488
- }
1489
- const nextCriteria = normalizeCriteria(options.criterion, options.clearCriteria);
1490
- const changed = nextCriteria.length !== settings.workflow.definition_of_done.length || nextCriteria.some((value, index) => value !== settings.workflow.definition_of_done[index]);
1491
- settings.workflow.definition_of_done = nextCriteria;
1492
- if (changed) {
1493
- await writeSettings(target.pmRoot, settings, "config:set:definition_of_done");
1494
- }
1495
- return withWarnings({
1496
- scope,
1497
- key,
1498
- criteria: [...settings.workflow.definition_of_done],
1499
- settings_path: target.settingsPath,
1500
- changed
1501
- }, warnings);
1502
- }
1503
- var _testOnlyConfigCommand = {
1504
- applyPositionalValue,
1505
- normalizeAction,
1506
- normalizeCriteria,
1507
- normalizeGovernanceCloseValidationDefault,
1508
- normalizeGovernanceCreateModeDefault,
1509
- normalizeGovernanceForceRequiredForStaleLockPolicy,
1510
- normalizeGovernanceOwnershipEnforcement,
1511
- normalizeGovernancePreset,
1512
- normalizeGovernanceRequireCloseReasonPolicy,
1513
- normalizeGovernanceWorkflowEnforcement,
1514
- normalizeHistoryMissingStreamPolicy,
1515
- normalizeItemFormat,
1516
- normalizeKey,
1517
- normalizeMetadataRequiredFields,
1518
- normalizePolicyForConflict,
1519
- normalizeScope,
1520
- normalizeTelemetryTrackingPolicy,
1521
- normalizeTestResultTrackingPolicy,
1522
- normalizeValidateMetadataProfile,
1523
- normalizeWarnings
1524
- };
1525
- export {
1526
- _testOnlyConfigCommand,
1527
- runConfig
1528
- };
1529
- //# sourceMappingURL=config-QH2DICD6.js.map
1530
-
1531
- //# debugId=47814bbe-4193-5179-91d9-3196784af35b