@unbrained/pm-cli 2026.7.1 → 2026.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (625) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +25 -0
  3. package/CONTRIBUTING.md +2 -2
  4. package/README.md +1 -1
  5. package/dist/cli/commander-usage.d.ts +2 -0
  6. package/dist/cli/commander-usage.js +110 -86
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/activity.js +79 -57
  9. package/dist/cli/commands/activity.js.map +1 -1
  10. package/dist/cli/commands/aggregate.js +102 -79
  11. package/dist/cli/commands/aggregate.js.map +1 -1
  12. package/dist/cli/commands/calendar.js +278 -243
  13. package/dist/cli/commands/calendar.js.map +1 -1
  14. package/dist/cli/commands/close-many.js +176 -114
  15. package/dist/cli/commands/close-many.js.map +1 -1
  16. package/dist/cli/commands/close.js +157 -129
  17. package/dist/cli/commands/close.js.map +1 -1
  18. package/dist/cli/commands/comments-audit.js +50 -42
  19. package/dist/cli/commands/comments-audit.js.map +1 -1
  20. package/dist/cli/commands/config.d.ts +2 -0
  21. package/dist/cli/commands/config.js +443 -879
  22. package/dist/cli/commands/config.js.map +1 -1
  23. package/dist/cli/commands/context.js +365 -287
  24. package/dist/cli/commands/context.js.map +1 -1
  25. package/dist/cli/commands/contracts.js +352 -238
  26. package/dist/cli/commands/contracts.js.map +1 -1
  27. package/dist/cli/commands/create.js +32 -17
  28. package/dist/cli/commands/create.js.map +1 -1
  29. package/dist/cli/commands/dedupe-audit.js +46 -39
  30. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  31. package/dist/cli/commands/dedupe-merge.js +88 -69
  32. package/dist/cli/commands/dedupe-merge.js.map +1 -1
  33. package/dist/cli/commands/extension/doctor.js +56 -67
  34. package/dist/cli/commands/extension/doctor.js.map +1 -1
  35. package/dist/cli/commands/extension/shared.js +21 -15
  36. package/dist/cli/commands/extension/shared.js.map +1 -1
  37. package/dist/cli/commands/get.js +114 -81
  38. package/dist/cli/commands/get.js.map +1 -1
  39. package/dist/cli/commands/health.d.ts +17 -0
  40. package/dist/cli/commands/health.js +545 -417
  41. package/dist/cli/commands/health.js.map +1 -1
  42. package/dist/cli/commands/history-compact.js +209 -140
  43. package/dist/cli/commands/history-compact.js.map +1 -1
  44. package/dist/cli/commands/history-redact.js +162 -119
  45. package/dist/cli/commands/history-redact.js.map +1 -1
  46. package/dist/cli/commands/history-repair.js +120 -85
  47. package/dist/cli/commands/history-repair.js.map +1 -1
  48. package/dist/cli/commands/init-agent-guidance.js +32 -19
  49. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  50. package/dist/cli/commands/init.d.ts +8 -2
  51. package/dist/cli/commands/init.js +263 -162
  52. package/dist/cli/commands/init.js.map +1 -1
  53. package/dist/cli/commands/list.js +152 -102
  54. package/dist/cli/commands/list.js.map +1 -1
  55. package/dist/cli/commands/next.js +60 -40
  56. package/dist/cli/commands/next.js.map +1 -1
  57. package/dist/cli/commands/plan.js +373 -298
  58. package/dist/cli/commands/plan.js.map +1 -1
  59. package/dist/cli/commands/profile.js +23 -15
  60. package/dist/cli/commands/profile.js.map +1 -1
  61. package/dist/cli/commands/recurrence-parsers.js +43 -25
  62. package/dist/cli/commands/recurrence-parsers.js.map +1 -1
  63. package/dist/cli/commands/reindex.d.ts +21 -5
  64. package/dist/cli/commands/reindex.js +345 -205
  65. package/dist/cli/commands/reindex.js.map +1 -1
  66. package/dist/cli/commands/restore.d.ts +8 -7
  67. package/dist/cli/commands/restore.js +105 -69
  68. package/dist/cli/commands/restore.js.map +1 -1
  69. package/dist/cli/commands/schema.js +33 -30
  70. package/dist/cli/commands/schema.js.map +1 -1
  71. package/dist/cli/commands/search.d.ts +10 -2
  72. package/dist/cli/commands/search.js +503 -470
  73. package/dist/cli/commands/search.js.map +1 -1
  74. package/dist/cli/commands/telemetry.js +98 -87
  75. package/dist/cli/commands/telemetry.js.map +1 -1
  76. package/dist/cli/commands/test-all.js +237 -168
  77. package/dist/cli/commands/test-all.js.map +1 -1
  78. package/dist/cli/commands/test.d.ts +6 -5
  79. package/dist/cli/commands/test.js +424 -344
  80. package/dist/cli/commands/test.js.map +1 -1
  81. package/dist/cli/commands/update-many.js +57 -42
  82. package/dist/cli/commands/update-many.js.map +1 -1
  83. package/dist/cli/commands/update.d.ts +1 -1
  84. package/dist/cli/commands/update.js +738 -671
  85. package/dist/cli/commands/update.js.map +1 -1
  86. package/dist/cli/commands/validate.d.ts +20 -1
  87. package/dist/cli/commands/validate.js +478 -343
  88. package/dist/cli/commands/validate.js.map +1 -1
  89. package/dist/cli/error-guidance.js +406 -361
  90. package/dist/cli/error-guidance.js.map +1 -1
  91. package/dist/cli/extension-command-help.js +27 -19
  92. package/dist/cli/extension-command-help.js.map +1 -1
  93. package/dist/cli/help-json-payload.js +57 -49
  94. package/dist/cli/help-json-payload.js.map +1 -1
  95. package/dist/cli/main.d.ts +47 -0
  96. package/dist/cli/main.js +474 -371
  97. package/dist/cli/main.js.map +1 -1
  98. package/dist/cli/migration-gates.js +22 -45
  99. package/dist/cli/migration-gates.js.map +1 -1
  100. package/dist/cli/register-list-query.js +299 -310
  101. package/dist/cli/register-list-query.js.map +1 -1
  102. package/dist/cli/register-mutation.js +763 -779
  103. package/dist/cli/register-mutation.js.map +1 -1
  104. package/dist/cli/register-operations.js +386 -362
  105. package/dist/cli/register-operations.js.map +1 -1
  106. package/dist/cli/register-setup.js +120 -101
  107. package/dist/cli/register-setup.js.map +1 -1
  108. package/dist/cli/registration-helpers.d.ts +4 -0
  109. package/dist/cli/registration-helpers.js +45 -56
  110. package/dist/cli/registration-helpers.js.map +1 -1
  111. package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-5YWLSPGE.js} +9 -9
  112. package/dist/cli-bundle/chunks/activity-BIML7K2D.js +16 -0
  113. package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-2V2M3JZU.js} +107 -83
  114. package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-2V2M3JZU.js.map} +2 -2
  115. package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-EK7DXML7.js} +108 -84
  116. package/dist/cli-bundle/chunks/aggregate-EK7DXML7.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-EZESUVJT.js} +8 -8
  118. package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-JFG4WQMG.js} +8 -8
  119. package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-32IUNTG4.js} +158 -119
  120. package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +1 -0
  121. package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-3W2HJKJX.js} +3 -3
  122. package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-4EXFFP7T.js} +86 -52
  123. package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +7 -0
  124. package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-4PFVUUYV.js} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-4WB6S4YX.js} +308 -184
  126. package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +1 -0
  127. package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-572FKBRL.js} +61 -102
  128. package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-5E7N4T2Z.js} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-5IZUBZBR.js} +3 -3
  131. package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-5JIWFWOZ.js} +2 -2
  132. package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-67LARBDL.js} +493 -404
  133. package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +1 -0
  134. package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-6CDCWKSX.js} +4 -4
  135. package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-6KRFL33E.js} +308 -184
  136. package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +7 -0
  137. package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-6NYJGMTY.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-7CLLC75T.js} +4 -4
  139. package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-7LYO6S5A.js} +8 -8
  140. package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-A3OQ7TFW.js} +8 -8
  141. package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-AIKU3IIL.js} +153 -90
  142. package/dist/cli-bundle/chunks/chunk-AIKU3IIL.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AJHYQCBJ.js} +39 -5
  144. package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
  146. package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
  147. package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-BE2SR6QL.js} +92 -77
  148. package/dist/cli-bundle/chunks/chunk-BE2SR6QL.js.map +1 -0
  149. package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-BI4R7HI2.js} +75 -53
  150. package/dist/cli-bundle/chunks/chunk-BI4R7HI2.js.map +7 -0
  151. package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-CXR3CMBQ.js} +33 -6
  152. package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-ECU6MMTQ.js} +713 -613
  154. package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +1 -0
  155. package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-EJ2OCBHF.js} +54 -30
  156. package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-EQURFOMH.js} +41 -26
  158. package/dist/cli-bundle/chunks/chunk-EQURFOMH.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-ER4ME5U2.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-ERG65A2L.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-F6WNBITZ.js} +157 -113
  162. package/dist/cli-bundle/chunks/chunk-F6WNBITZ.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-FH2H3CBD.js} +3 -3
  164. package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-FUFFPIYA.js} +2 -2
  165. package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-FZJM2TXF.js} +110 -73
  166. package/dist/cli-bundle/chunks/chunk-FZJM2TXF.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-GUYNUXQT.js} +3 -3
  168. package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-GVJE5T7Q.js} +2 -2
  169. package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-HB4FAT3O.js} +42 -60
  170. package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +7 -0
  171. package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-HQAF23Q2.js} +626 -484
  172. package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +7 -0
  173. package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-JBZ2NTKX.js} +2 -2
  174. package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-JPATY4SE.js} +54 -30
  175. package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-K5DT2YKM.js} +109 -72
  177. package/dist/cli-bundle/chunks/chunk-K5DT2YKM.js.map +7 -0
  178. package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KEZOIPCR.js} +3 -3
  179. package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-KHVGM5CS.js} +466 -365
  180. package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +7 -0
  181. package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-KS6ATO47.js} +288 -175
  182. package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-L4SLHV6G.js} +463 -362
  184. package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +1 -0
  185. package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-LBE5QFMZ.js} +158 -114
  186. package/dist/cli-bundle/chunks/chunk-LBE5QFMZ.js.map +1 -0
  187. package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-LCWQP6NM.js} +76 -54
  188. package/dist/cli-bundle/chunks/chunk-LCWQP6NM.js.map +1 -0
  189. package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-LOWVNZBZ.js} +91 -76
  190. package/dist/cli-bundle/chunks/chunk-LOWVNZBZ.js.map +7 -0
  191. package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-MDHWWBNZ.js} +3 -3
  192. package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-MEZZZBYX.js} +2 -2
  193. package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-MHRS5FUX.js} +288 -175
  194. package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +1 -0
  195. package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-NOIEVOK5.js} +391 -313
  196. package/dist/cli-bundle/chunks/chunk-NOIEVOK5.js.map +1 -0
  197. package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-NZ7QIUP5.js} +4 -4
  198. package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-OGLGI22K.js} +115 -67
  199. package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js.map → chunk-OGLGI22K.js.map} +1 -1
  200. package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-P5L7Z2O6.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-PULUSQAV.js} +492 -403
  202. package/dist/cli-bundle/chunks/chunk-PULUSQAV.js.map +7 -0
  203. package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-QCDTQCMW.js} +22 -30
  204. package/dist/cli-bundle/chunks/chunk-QCDTQCMW.js.map +1 -0
  205. package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-QNNQAAZ5.js} +24 -18
  206. package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-QNNQAAZ5.js.map} +1 -1
  207. package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-RAHINBVP.js} +60 -101
  208. package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +7 -0
  209. package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-RJH5VQHW.js} +43 -61
  210. package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +1 -0
  211. package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-SU2E4AWU.js} +6 -6
  212. package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-SU3TB4NS.js} +2 -2
  213. package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-SYE6WMV6.js} +626 -484
  214. package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-T3P7PMZP.js} +42 -27
  216. package/dist/cli-bundle/chunks/chunk-T3P7PMZP.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-T4XBKJ3F.js} +4 -4
  218. package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-T6AXEBOP.js} +23 -17
  219. package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-T6AXEBOP.js.map} +2 -2
  220. package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-TQ6AX5SQ.js} +58 -69
  221. package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-TQ6AX5SQ.js.map} +2 -2
  222. package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-U3S2B7TA.js} +86 -52
  223. package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-U5TR4N7J.js} +7 -7
  225. package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UMNQZS4H.js} +3 -3
  226. package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-WJA3PXW7.js} +7 -7
  227. package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WRYERRZX.js} +157 -118
  228. package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +7 -0
  229. package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-WYOIIFSE.js} +712 -612
  230. package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +7 -0
  231. package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-XRYSCRZR.js} +116 -68
  232. package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js.map → chunk-XRYSCRZR.js.map} +3 -3
  233. package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-YF746GTH.js} +59 -70
  234. package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-YF746GTH.js.map} +1 -1
  235. package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-YPWUSH72.js} +390 -312
  236. package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-YPWUSH72.js.map} +2 -2
  237. package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-YSDFIY7N.js} +3 -3
  238. package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-YSGTMDWC.js} +2 -2
  239. package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-YVKZ3ANP.js} +21 -29
  240. package/dist/cli-bundle/chunks/chunk-YVKZ3ANP.js.map +7 -0
  241. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
  242. package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
  243. package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-Z5F6XZXE.js} +6 -6
  244. package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-Z7RPDF2Y.js} +3 -3
  245. package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-ZFTKYWIF.js} +152 -89
  246. package/dist/cli-bundle/chunks/chunk-ZFTKYWIF.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-2BGBGSVI.js} +8 -8
  248. package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-5GU7OE67.js} +8 -8
  249. package/dist/cli-bundle/chunks/close-6YODBUIV.js +14 -0
  250. package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-AFVKPR57.js} +7 -7
  251. package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-7KLOSYLP.js} +186 -122
  252. package/dist/cli-bundle/chunks/close-many-7KLOSYLP.js.map +7 -0
  253. package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-JKUJMHLG.js} +187 -123
  254. package/dist/cli-bundle/chunks/close-many-JKUJMHLG.js.map +1 -0
  255. package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-DNWHEBOS.js} +9 -9
  256. package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-RW23R3VE.js} +9 -9
  257. package/dist/cli-bundle/chunks/config-AUM5WBYA.js +1072 -0
  258. package/dist/cli-bundle/chunks/config-AUM5WBYA.js.map +7 -0
  259. package/dist/cli-bundle/chunks/config-OZWSA2NP.js +1062 -0
  260. package/dist/cli-bundle/chunks/config-OZWSA2NP.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-OYXRGY7S.js} +12 -12
  262. package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-PKCEHQY3.js} +12 -12
  263. package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-L6ODXNUM.js} +320 -199
  264. package/dist/cli-bundle/chunks/contracts-L6ODXNUM.js.map +7 -0
  265. package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-X74F2GSM.js} +321 -200
  266. package/dist/cli-bundle/chunks/contracts-X74F2GSM.js.map +1 -0
  267. package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-6XOR3HKN.js} +5 -5
  268. package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-I4NCLBR4.js} +5 -5
  269. package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-PM45M6PE.js} +12 -12
  270. package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +28 -0
  271. package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-7YXHYG67.js} +5 -5
  272. package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-LPISP43T.js} +5 -5
  273. package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-N2T26FME.js} +5 -5
  274. package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-WATKQDE3.js} +5 -5
  275. package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-6LQ3GLM7.js} +7 -7
  276. package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-Z3X6JZLT.js} +7 -7
  277. package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-6DCLG52D.js} +10 -10
  278. package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-Y3ZCUTHK.js} +10 -10
  279. package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-BNINIMT7.js} +11 -11
  280. package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-QWE4YYK5.js} +11 -11
  281. package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-6SGKHS6O.js} +7 -7
  282. package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-FUYPSOFJ.js} +7 -7
  283. package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-2Q3K76G2.js} +6 -6
  284. package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-ATLBWXXD.js} +6 -6
  285. package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-RUYEMNRF.js} +3 -3
  286. package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-TDWSDR66.js} +3 -3
  287. package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-2WGLX74N.js} +120 -80
  288. package/dist/cli-bundle/chunks/get-2WGLX74N.js.map +7 -0
  289. package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-LY6M2JIM.js} +121 -81
  290. package/dist/cli-bundle/chunks/get-LY6M2JIM.js.map +1 -0
  291. package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-4RKHYS3T.js} +535 -371
  292. package/dist/cli-bundle/chunks/health-4RKHYS3T.js.map +1 -0
  293. package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-TMFVNYRA.js} +534 -370
  294. package/dist/cli-bundle/chunks/health-TMFVNYRA.js.map +7 -0
  295. package/dist/cli-bundle/chunks/history-CGNQJXFE.js +18 -0
  296. package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-SGRRS72R.js} +8 -8
  297. package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-LOED43R3.js} +213 -134
  298. package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +7 -0
  299. package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-V5DNAQHH.js} +214 -135
  300. package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +1 -0
  301. package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-IRL7WJ3E.js} +9 -9
  302. package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +19 -0
  303. package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-4WVBVHFR.js} +124 -84
  304. package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +1 -0
  305. package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-PGYQJMGD.js} +123 -83
  306. package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +7 -0
  307. package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-4GESW7RM.js} +12 -12
  308. package/dist/cli-bundle/chunks/init-XIDPABA4.js +22 -0
  309. package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-4BHWFFUV.js} +9 -9
  310. package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-4FJY7WIW.js} +9 -9
  311. package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-472TIOVK.js} +8 -8
  312. package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-D7BF5CL2.js} +8 -8
  313. package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-D5STGWI2.js} +71 -46
  314. package/dist/cli-bundle/chunks/next-D5STGWI2.js.map +1 -0
  315. package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-SFQZVX2B.js} +70 -45
  316. package/dist/cli-bundle/chunks/next-SFQZVX2B.js.map +7 -0
  317. package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-6KNOSLIT.js} +9 -9
  318. package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-W4UEICGF.js} +9 -9
  319. package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-JO6V7BXO.js} +373 -279
  320. package/dist/cli-bundle/chunks/plan-JO6V7BXO.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-MJQW5XK3.js} +372 -278
  322. package/dist/cli-bundle/chunks/plan-MJQW5XK3.js.map +7 -0
  323. package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-3TOTMUR4.js} +27 -19
  324. package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +7 -0
  325. package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-WIQY2KCV.js} +28 -20
  326. package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +1 -0
  327. package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js +416 -0
  328. package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js.map +7 -0
  329. package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js +406 -0
  330. package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +1 -0
  331. package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-ROFE2YPC.js} +729 -702
  332. package/dist/cli-bundle/chunks/register-mutation-ROFE2YPC.js.map +7 -0
  333. package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-SJWMVIJ2.js} +730 -703
  334. package/dist/cli-bundle/chunks/register-mutation-SJWMVIJ2.js.map +1 -0
  335. package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-IADFVH53.js} +389 -365
  336. package/dist/cli-bundle/chunks/register-operations-IADFVH53.js.map +7 -0
  337. package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js +510 -0
  338. package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js.map +1 -0
  339. package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-3QJY43CY.js} +128 -103
  340. package/dist/cli-bundle/chunks/register-setup-3QJY43CY.js.map +7 -0
  341. package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-AJWUSSQX.js} +129 -104
  342. package/dist/cli-bundle/chunks/register-setup-AJWUSSQX.js.map +1 -0
  343. package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-44IHMMZZ.js} +9 -9
  344. package/dist/cli-bundle/chunks/restore-EXHU34EU.js +17 -0
  345. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-OLHNLAZY.js} +12 -12
  346. package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-TSBK4AY5.js} +12 -12
  347. package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-IB2NZZWD.js} +7 -7
  348. package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-VBCELP5G.js} +7 -7
  349. package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-7UBETML4.js} +10 -10
  350. package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-R227JOL6.js} +10 -10
  351. package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-FAG7COEH.js} +6 -6
  352. package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-MCK7PLYS.js} +6 -6
  353. package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-DRPDZMAO.js} +84 -70
  354. package/dist/cli-bundle/chunks/telemetry-DRPDZMAO.js.map +7 -0
  355. package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-GVVUQSJQ.js} +85 -71
  356. package/dist/cli-bundle/chunks/telemetry-GVVUQSJQ.js.map +1 -0
  357. package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-QY44WAMR.js} +15 -15
  358. package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-SY76DZTO.js} +15 -15
  359. package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js +430 -0
  360. package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js.map +7 -0
  361. package/dist/cli-bundle/chunks/test-all-USPJHXFR.js +427 -0
  362. package/dist/cli-bundle/chunks/test-all-USPJHXFR.js.map +1 -0
  363. package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-MG5VIGSK.js} +185 -147
  364. package/dist/cli-bundle/chunks/test-runs-MG5VIGSK.js.map +1 -0
  365. package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-QIR5MJPL.js} +184 -146
  366. package/dist/cli-bundle/chunks/test-runs-QIR5MJPL.js.map +7 -0
  367. package/dist/cli-bundle/chunks/update-A7EICML6.js +24 -0
  368. package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-IKJZWLQC.js} +15 -15
  369. package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-BEMTDA2X.js} +84 -69
  370. package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-BEMTDA2X.js.map} +1 -1
  371. package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-RATAARHU.js} +83 -68
  372. package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-RATAARHU.js.map} +2 -2
  373. package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-NWMR3VQL.js} +11 -11
  374. package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-VU46BLJZ.js} +11 -11
  375. package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-GAJ6FUSI.js} +451 -321
  376. package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +1 -0
  377. package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-NRY6MFXN.js} +450 -320
  378. package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +7 -0
  379. package/dist/cli-bundle/main.js +1107 -916
  380. package/dist/cli-bundle/main.js.map +3 -3
  381. package/dist/core/config/nested-settings.js +89 -67
  382. package/dist/core/config/nested-settings.js.map +1 -1
  383. package/dist/core/governance/metadata-coverage.js +20 -28
  384. package/dist/core/governance/metadata-coverage.js.map +1 -1
  385. package/dist/core/history/drift-scan.js +93 -81
  386. package/dist/core/history/drift-scan.js.map +1 -1
  387. package/dist/core/item/item-type-definition.js +14 -14
  388. package/dist/core/item/item-type-definition.js.map +1 -1
  389. package/dist/core/item/type-registry.js +114 -99
  390. package/dist/core/item/type-registry.js.map +1 -1
  391. package/dist/core/output/mutation-projection.js +42 -26
  392. package/dist/core/output/mutation-projection.js.map +1 -1
  393. package/dist/core/schema/runtime-schema.js +97 -80
  394. package/dist/core/schema/runtime-schema.js.map +1 -1
  395. package/dist/core/schema/status-defs-file.js +26 -3
  396. package/dist/core/schema/status-defs-file.js.map +1 -1
  397. package/dist/core/search/corpus.js +25 -19
  398. package/dist/core/search/corpus.js.map +1 -1
  399. package/dist/core/search/semantic-defaults.js +64 -37
  400. package/dist/core/search/semantic-defaults.js.map +1 -1
  401. package/dist/core/search/vector-stores.js +32 -17
  402. package/dist/core/search/vector-stores.js.map +1 -1
  403. package/dist/core/sentry/helpers.js +31 -28
  404. package/dist/core/sentry/helpers.js.map +1 -1
  405. package/dist/core/sentry/instrument.js +54 -43
  406. package/dist/core/sentry/instrument.js.map +1 -1
  407. package/dist/core/shared/memo.d.ts +12 -0
  408. package/dist/core/shared/memo.js +25 -0
  409. package/dist/core/shared/memo.js.map +1 -0
  410. package/dist/core/shared/serialization.js +24 -14
  411. package/dist/core/shared/serialization.js.map +1 -1
  412. package/dist/core/shared/time.js +26 -4
  413. package/dist/core/shared/time.js.map +1 -1
  414. package/dist/core/store/front-matter-cache.d.ts +5 -0
  415. package/dist/core/store/front-matter-cache.js +316 -171
  416. package/dist/core/store/front-matter-cache.js.map +1 -1
  417. package/dist/core/store/item-store.js +33 -26
  418. package/dist/core/store/item-store.js.map +1 -1
  419. package/dist/core/store/settings.js +247 -203
  420. package/dist/core/store/settings.js.map +1 -1
  421. package/dist/core/test/background-runs.js +189 -160
  422. package/dist/core/test/background-runs.js.map +1 -1
  423. package/dist/sdk/cli-contracts/flag-contracts.js +71 -99
  424. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  425. package/dist/sdk/compose.js +51 -42
  426. package/dist/sdk/compose.js.map +1 -1
  427. package/docs/AGENT_GUIDE.md +2 -2
  428. package/docs/ARCHITECTURE.md +2 -2
  429. package/docs/COMMANDS.md +8 -4
  430. package/docs/CONFIGURATION.md +1 -1
  431. package/docs/EXTENSIONS.md +12 -12
  432. package/docs/ONBOARDING.md +4 -2
  433. package/docs/README.md +2 -0
  434. package/docs/examples/starter-extension/README.md +11 -10
  435. package/marketplace.json +3 -3
  436. package/package.json +2 -2
  437. package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
  438. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
  439. package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
  440. package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
  441. package/plugins/pm-claude/README.md +6 -3
  442. package/plugins/pm-claude/commands/pm-init.md +1 -1
  443. package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
  444. package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
  445. package/dist/cli-bundle/chunks/chunk-22WKIL3H.js.map +0 -1
  446. package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
  447. package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +0 -7
  448. package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
  450. package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
  451. package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
  452. package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
  455. package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
  456. package/dist/cli-bundle/chunks/chunk-AXIDKKAT.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
  458. package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
  459. package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
  460. package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
  462. package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
  464. package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-JLM7BHI7.js.map +0 -7
  466. package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
  467. package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
  468. package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
  469. package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +0 -7
  470. package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
  472. package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
  473. package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
  474. package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
  475. package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
  476. package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
  477. package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
  478. package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
  479. package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
  480. package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
  481. package/dist/cli-bundle/chunks/chunk-WYDHYJPO.js.map +0 -7
  482. package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
  483. package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
  484. package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
  485. package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
  486. package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
  487. package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
  488. package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
  489. package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
  490. package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
  491. package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
  492. package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
  493. package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
  494. package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
  495. package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
  496. package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
  497. package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
  498. package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
  499. package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
  500. package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
  501. package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
  502. package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
  503. package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
  504. package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
  505. package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
  506. package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
  507. package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
  508. package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
  509. package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +0 -7
  510. package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +0 -1
  511. package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js +0 -400
  512. package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
  513. package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js +0 -410
  514. package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
  515. package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
  516. package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
  517. package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js +0 -486
  518. package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
  519. package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
  520. package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
  521. package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
  522. package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
  523. package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
  524. package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
  525. package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
  526. package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
  527. package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
  528. package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
  529. package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
  530. package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
  531. package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
  532. package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
  533. package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
  534. /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-5YWLSPGE.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-BIML7K2D.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-EZESUVJT.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-JFG4WQMG.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-3W2HJKJX.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-4PFVUUYV.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-5E7N4T2Z.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-5IZUBZBR.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-5JIWFWOZ.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-6CDCWKSX.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-6NYJGMTY.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-7CLLC75T.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-7LYO6S5A.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-A3OQ7TFW.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-ER4ME5U2.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-ERG65A2L.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-FH2H3CBD.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-FUFFPIYA.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-GUYNUXQT.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-GVJE5T7Q.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-JBZ2NTKX.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KEZOIPCR.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-MDHWWBNZ.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-MEZZZBYX.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-NZ7QIUP5.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-P5L7Z2O6.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-SU2E4AWU.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-SU3TB4NS.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-T4XBKJ3F.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-U5TR4N7J.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UMNQZS4H.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-WJA3PXW7.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-YSDFIY7N.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-YSGTMDWC.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-Z5F6XZXE.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-Z7RPDF2Y.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-2BGBGSVI.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-5GU7OE67.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-6YODBUIV.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-AFVKPR57.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-DNWHEBOS.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-RW23R3VE.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-OYXRGY7S.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-PKCEHQY3.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-6XOR3HKN.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-I4NCLBR4.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-PM45M6PE.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-Z7YCH3BE.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-7YXHYG67.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-LPISP43T.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-N2T26FME.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-WATKQDE3.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-6LQ3GLM7.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-Z3X6JZLT.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-6DCLG52D.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-Y3ZCUTHK.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-BNINIMT7.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-QWE4YYK5.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-6SGKHS6O.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-FUYPSOFJ.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-2Q3K76G2.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-ATLBWXXD.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-RUYEMNRF.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-TDWSDR66.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-CGNQJXFE.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-SGRRS72R.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-IRL7WJ3E.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-N3JK7VBW.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-4GESW7RM.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-XIDPABA4.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-4BHWFFUV.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-4FJY7WIW.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-472TIOVK.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-D7BF5CL2.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-6KNOSLIT.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-W4UEICGF.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-44IHMMZZ.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-EXHU34EU.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-OLHNLAZY.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-TSBK4AY5.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-IB2NZZWD.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-VBCELP5G.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-7UBETML4.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-R227JOL6.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-FAG7COEH.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-MCK7PLYS.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-QY44WAMR.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-SY76DZTO.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-A7EICML6.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-IKJZWLQC.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-NWMR3VQL.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-VU46BLJZ.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