@unbrained/pm-cli 2026.6.24 → 2026.6.30

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 (712) hide show
  1. package/CHANGELOG.md +93 -1
  2. package/CONTRIBUTING.md +30 -0
  3. package/README.md +16 -3
  4. package/dist/cli/commander-usage.js +3 -3
  5. package/dist/cli/commander-usage.js.map +1 -1
  6. package/dist/cli/commands/aggregate.js +8 -7
  7. package/dist/cli/commands/aggregate.js.map +1 -1
  8. package/dist/cli/commands/close.d.ts +2 -4
  9. package/dist/cli/commands/close.js +5 -17
  10. package/dist/cli/commands/close.js.map +1 -1
  11. package/dist/cli/commands/completion.js +158 -9
  12. package/dist/cli/commands/completion.js.map +1 -1
  13. package/dist/cli/commands/config.d.ts +1 -1
  14. package/dist/cli/commands/config.js +2 -2
  15. package/dist/cli/commands/config.js.map +1 -1
  16. package/dist/cli/commands/context.d.ts +31 -4
  17. package/dist/cli/commands/context.js +33 -10
  18. package/dist/cli/commands/context.js.map +1 -1
  19. package/dist/cli/commands/contracts.js +48 -8
  20. package/dist/cli/commands/contracts.js.map +1 -1
  21. package/dist/cli/commands/create.d.ts +1 -6
  22. package/dist/cli/commands/create.js +10 -155
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/extension/describe.d.ts +15 -0
  25. package/dist/cli/commands/extension/describe.js +48 -2
  26. package/dist/cli/commands/extension/describe.js.map +1 -1
  27. package/dist/cli/commands/extension/doctor.js +5 -2
  28. package/dist/cli/commands/extension/doctor.js.map +1 -1
  29. package/dist/cli/commands/extension/install-sources.js +37 -7
  30. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  31. package/dist/cli/commands/extension/scaffold.d.ts +31 -8
  32. package/dist/cli/commands/extension/scaffold.js +1891 -205
  33. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  34. package/dist/cli/commands/extension.d.ts +22 -2
  35. package/dist/cli/commands/extension.js +186 -17
  36. package/dist/cli/commands/extension.js.map +1 -1
  37. package/dist/cli/commands/index.d.ts +3 -1
  38. package/dist/cli/commands/index.js +5 -3
  39. package/dist/cli/commands/index.js.map +1 -1
  40. package/dist/cli/commands/item-filter-options.d.ts +63 -0
  41. package/dist/cli/commands/item-filter-options.js +10 -0
  42. package/dist/cli/commands/item-filter-options.js.map +1 -0
  43. package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
  44. package/dist/cli/commands/legacy-none-tokens.js +31 -2
  45. package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
  46. package/dist/cli/commands/linked-artifacts.d.ts +7 -0
  47. package/dist/cli/commands/linked-artifacts.js +12 -2
  48. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  49. package/dist/cli/commands/list.d.ts +16 -39
  50. package/dist/cli/commands/list.js +127 -118
  51. package/dist/cli/commands/list.js.map +1 -1
  52. package/dist/cli/commands/next.d.ts +98 -0
  53. package/dist/cli/commands/next.js +304 -0
  54. package/dist/cli/commands/next.js.map +1 -0
  55. package/dist/cli/commands/profile.d.ts +208 -0
  56. package/dist/cli/commands/profile.js +418 -0
  57. package/dist/cli/commands/profile.js.map +1 -0
  58. package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
  59. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
  60. package/dist/cli/commands/schema.d.ts +7 -0
  61. package/dist/cli/commands/schema.js +9 -3
  62. package/dist/cli/commands/schema.js.map +1 -1
  63. package/dist/cli/commands/search.d.ts +2 -39
  64. package/dist/cli/commands/search.js +104 -106
  65. package/dist/cli/commands/search.js.map +1 -1
  66. package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
  67. package/dist/cli/commands/shared-unset-fields.js +161 -0
  68. package/dist/cli/commands/shared-unset-fields.js.map +1 -0
  69. package/dist/cli/commands/stats.js +15 -3
  70. package/dist/cli/commands/stats.js.map +1 -1
  71. package/dist/cli/commands/test.js +9 -5
  72. package/dist/cli/commands/test.js.map +1 -1
  73. package/dist/cli/commands/update.d.ts +1 -6
  74. package/dist/cli/commands/update.js +12 -157
  75. package/dist/cli/commands/update.js.map +1 -1
  76. package/dist/cli/commands/validate.js +20 -5
  77. package/dist/cli/commands/validate.js.map +1 -1
  78. package/dist/cli/help-content.js +26 -2
  79. package/dist/cli/help-content.js.map +1 -1
  80. package/dist/cli/help-json-payload.js +3 -3
  81. package/dist/cli/help-json-payload.js.map +1 -1
  82. package/dist/cli/main.js +27 -12
  83. package/dist/cli/main.js.map +1 -1
  84. package/dist/cli/register-list-query.js +42 -3
  85. package/dist/cli/register-list-query.js.map +1 -1
  86. package/dist/cli/register-mutation.js +86 -2
  87. package/dist/cli/register-mutation.js.map +1 -1
  88. package/dist/cli/register-setup.js +67 -6
  89. package/dist/cli/register-setup.js.map +1 -1
  90. package/dist/cli/registration-helpers.d.ts +9 -1
  91. package/dist/cli/registration-helpers.js +34 -3
  92. package/dist/cli/registration-helpers.js.map +1 -1
  93. package/dist/cli-bundle/chunks/activity-EJBMXUBH.js +16 -0
  94. package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js → activity-MVSEND6D.js} +9 -11
  95. package/dist/cli-bundle/chunks/{aggregate-63NWNIBR.js → aggregate-MOC4TR2G.js} +16 -17
  96. package/dist/cli-bundle/chunks/aggregate-MOC4TR2G.js.map +1 -0
  97. package/dist/cli-bundle/chunks/{aggregate-YHCYX2EV.js → aggregate-XJHLZQ5X.js} +15 -16
  98. package/dist/cli-bundle/chunks/aggregate-XJHLZQ5X.js.map +7 -0
  99. package/dist/cli-bundle/chunks/{append-PUKREFV5.js → append-KDHT4GHI.js} +10 -12
  100. package/dist/cli-bundle/chunks/{append-PUKREFV5.js.map → append-KDHT4GHI.js.map} +1 -1
  101. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js → append-LEDBAM3K.js} +8 -10
  102. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js.map → append-LEDBAM3K.js.map} +1 -1
  103. package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js → chunk-3JWQCLR5.js} +3 -3
  104. package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js → chunk-4TXTVZL3.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js → chunk-4YIMPANT.js} +3 -3
  106. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js → chunk-53ARXF2O.js} +9 -11
  107. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js.map → chunk-53ARXF2O.js.map} +1 -1
  108. package/dist/cli-bundle/chunks/chunk-5ABGFWR4.js +116 -0
  109. package/dist/cli-bundle/chunks/chunk-5ABGFWR4.js.map +1 -0
  110. package/dist/cli-bundle/chunks/{chunk-OF7V47P3.js → chunk-5IRVSKPS.js} +2990 -2890
  111. package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +1 -0
  112. package/dist/cli-bundle/chunks/{chunk-XXKV4UWE.js → chunk-5T6WPLRO.js} +233 -190
  113. package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-SMXSDY7J.js → chunk-6T5ZIWBS.js} +3011 -2888
  115. package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-RAWA3Y7O.js → chunk-6YRAMXRS.js} +111 -114
  117. package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +1 -0
  118. package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js → chunk-73PTKMAE.js} +3 -3
  119. package/dist/cli-bundle/chunks/{chunk-GQYJEEFX.js → chunk-74PUWBGN.js} +53 -54
  120. package/dist/cli-bundle/chunks/chunk-74PUWBGN.js.map +1 -0
  121. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js → chunk-7L6TXOOC.js} +4 -6
  122. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js.map → chunk-7L6TXOOC.js.map} +1 -1
  123. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
  124. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
  125. package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js → chunk-7RIJGN4R.js} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-JKL6HRMV.js → chunk-7WDETKGP.js} +191 -117
  127. package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-HBAEFWX3.js → chunk-A3UNLXNJ.js} +40 -260
  129. package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +7 -0
  130. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js → chunk-AWN4PPH5.js} +10 -14
  131. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js.map → chunk-AWN4PPH5.js.map} +1 -1
  132. package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js → chunk-BN3CWK6G.js} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-SUREE24M.js → chunk-BOWQWXLI.js} +12 -24
  134. package/dist/cli-bundle/chunks/chunk-BOWQWXLI.js.map +1 -0
  135. package/dist/cli-bundle/chunks/{chunk-J3NMWFIN.js → chunk-C2KCIZKZ.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js → chunk-CHRNYKNI.js} +2 -2
  137. package/dist/cli-bundle/chunks/{chunk-VSAABFGQ.js → chunk-CY5IJMUM.js} +1136 -419
  138. package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +1 -0
  139. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
  140. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
  141. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js → chunk-D5LYZVGB.js} +7 -9
  142. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js.map → chunk-D5LYZVGB.js.map} +1 -1
  143. package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js → chunk-D6USKAMA.js} +2 -2
  144. package/dist/cli-bundle/chunks/{context-5LB7UGKE.js → chunk-DJDXAU74.js} +19 -21
  145. package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +7 -0
  146. package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js → chunk-DLDCPF5X.js} +3 -3
  147. package/dist/cli-bundle/chunks/{chunk-J7I4C5ZB.js → chunk-DORJSBGJ.js} +35 -9
  148. package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +7 -0
  149. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js → chunk-DRPF274X.js} +5 -7
  150. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js.map → chunk-DRPF274X.js.map} +2 -2
  151. package/dist/cli-bundle/chunks/{chunk-6EL7SW5C.js → chunk-DU66JUGT.js} +16 -14
  152. package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js → chunk-E2Q2ULMR.js} +4 -4
  154. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js → chunk-EVWYAG46.js} +9 -11
  155. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js.map → chunk-EVWYAG46.js.map} +1 -1
  156. package/dist/cli-bundle/chunks/{chunk-PEL2NLQE.js → chunk-F6VH3LFC.js} +2 -2
  157. package/dist/cli-bundle/chunks/{chunk-AEACLRVH.js → chunk-F7G53BOA.js} +18 -11
  158. package/dist/cli-bundle/chunks/chunk-F7G53BOA.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js → chunk-FBZ5XAAF.js} +9 -11
  160. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js.map → chunk-FBZ5XAAF.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js → chunk-FDEVKXC4.js} +2 -2
  162. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js → chunk-GF7EAR22.js} +10 -14
  163. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js.map → chunk-GF7EAR22.js.map} +1 -1
  164. package/dist/cli-bundle/chunks/{context-55VEOYI3.js → chunk-HIBK6H4S.js} +20 -22
  165. package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +1 -0
  166. package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js → chunk-HUYYMTGW.js} +2 -2
  167. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
  168. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
  169. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js → chunk-IBU2LLWM.js} +8 -12
  170. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js.map → chunk-IBU2LLWM.js.map} +1 -1
  171. package/dist/cli-bundle/chunks/{chunk-MEXZ5XUM.js → chunk-IDYCAK35.js} +53 -54
  172. package/dist/cli-bundle/chunks/chunk-IDYCAK35.js.map +7 -0
  173. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js → chunk-IF4ERU6A.js} +7 -9
  174. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js.map → chunk-IF4ERU6A.js.map} +1 -1
  175. package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js → chunk-IHXXUIXS.js} +4 -4
  176. package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js +2459 -0
  177. package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +7 -0
  178. package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js → chunk-JIP67N2K.js} +3 -3
  179. package/dist/cli-bundle/chunks/chunk-JJ4SG243.js +119 -0
  180. package/dist/cli-bundle/chunks/chunk-JJ4SG243.js.map +7 -0
  181. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js → chunk-JTRKME24.js} +11 -13
  182. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js.map → chunk-JTRKME24.js.map} +1 -1
  183. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js → chunk-JVQ7UOYC.js} +6 -8
  184. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js.map → chunk-JVQ7UOYC.js.map} +1 -1
  185. package/dist/cli-bundle/chunks/{chunk-L7UXKP2I.js → chunk-JZG5ADVE.js} +190 -102
  186. package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +1 -0
  187. package/dist/cli-bundle/chunks/{chunk-N5B6WZC5.js → chunk-K46GQ265.js} +17 -15
  188. package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +1 -0
  189. package/dist/cli-bundle/chunks/{chunk-KJZOSF7J.js → chunk-KGQ3W65B.js} +100 -35
  190. package/dist/cli-bundle/chunks/chunk-KGQ3W65B.js.map +1 -0
  191. package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js → chunk-KRASIL6M.js} +2 -2
  192. package/dist/cli-bundle/chunks/{chunk-XVYKWZNL.js → chunk-KTMMTOIP.js} +127 -127
  193. package/dist/cli-bundle/chunks/chunk-KTMMTOIP.js.map +7 -0
  194. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js → chunk-KYDYQMNW.js} +5 -7
  195. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js.map → chunk-KYDYQMNW.js.map} +1 -1
  196. package/dist/cli-bundle/chunks/{chunk-OHDQNKJB.js → chunk-LBH7UYKY.js} +106 -34
  197. package/dist/cli-bundle/chunks/chunk-LBH7UYKY.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js → chunk-MLHX6DN5.js} +2 -2
  199. package/dist/cli-bundle/chunks/{chunk-HC2S36NB.js → chunk-NIBP3I7A.js} +36 -10
  200. package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +1 -0
  201. package/dist/cli-bundle/chunks/{schema-C6QA367T.js → chunk-NO6Y6FB2.js} +144 -67
  202. package/dist/cli-bundle/chunks/chunk-NO6Y6FB2.js.map +7 -0
  203. package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js → chunk-OB3RJV5F.js} +2 -2
  204. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
  205. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js → chunk-OUQ5JEFM.js} +3 -3
  207. package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js → chunk-QE5UFCCO.js} +2 -2
  208. package/dist/cli-bundle/chunks/{chunk-6W3Y65PL.js → chunk-RM6MHL6A.js} +110 -113
  209. package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js → chunk-RPRW26NG.js} +12 -16
  211. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js.map → chunk-RPRW26NG.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js → chunk-SJZTPVFT.js} +4 -4
  213. package/dist/cli-bundle/chunks/{chunk-EYPINTFR.js → chunk-SNUK7H5J.js} +1164 -440
  214. package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +7 -0
  215. package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js +2435 -0
  216. package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js → chunk-TQ6E76BE.js} +11 -13
  218. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js.map → chunk-TQ6E76BE.js.map} +1 -1
  219. package/dist/cli-bundle/chunks/{chunk-IAP5KYBQ.js → chunk-UB3V5WUI.js} +225 -189
  220. package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-PRVTGX64.js → chunk-UFKNF23C.js} +11 -23
  222. package/dist/cli-bundle/chunks/chunk-UFKNF23C.js.map +7 -0
  223. package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js → chunk-V3KLX7U7.js} +3 -3
  224. package/dist/cli-bundle/chunks/{chunk-LNEDHJNQ.js → chunk-VD3LKZFX.js} +41 -254
  225. package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +1 -0
  226. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js → chunk-VMY7MZEM.js} +10 -14
  227. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js.map → chunk-VMY7MZEM.js.map} +1 -1
  228. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
  229. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{chunk-M6TUBOGW.js → chunk-WFJZDUM7.js} +19 -12
  231. package/dist/cli-bundle/chunks/chunk-WFJZDUM7.js.map +1 -0
  232. package/dist/cli-bundle/chunks/{schema-QO5I4FBL.js → chunk-WTRUDJ3R.js} +136 -66
  233. package/dist/cli-bundle/chunks/chunk-WTRUDJ3R.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js → chunk-YEDFE4DC.js} +6 -8
  235. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js.map → chunk-YEDFE4DC.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
  237. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js → chunk-Z55WX4IQ.js} +12 -16
  239. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js.map → chunk-Z55WX4IQ.js.map} +1 -1
  240. package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js → chunk-Z5BM2FKQ.js} +4 -4
  241. package/dist/cli-bundle/chunks/{chunk-IXAZI443.js → chunk-ZEATCVAC.js} +2 -2
  242. package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js → chunk-ZFIEEDTJ.js} +3 -3
  243. package/dist/cli-bundle/chunks/{chunk-BFFO3AIB.js → chunk-ZIE6WXJ2.js} +128 -128
  244. package/dist/cli-bundle/chunks/chunk-ZIE6WXJ2.js.map +1 -0
  245. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js → claim-6NINZYB3.js} +10 -12
  246. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js.map → claim-6NINZYB3.js.map} +1 -1
  247. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js → claim-HMCLSLUE.js} +8 -10
  248. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js.map → claim-HMCLSLUE.js.map} +1 -1
  249. package/dist/cli-bundle/chunks/close-37KEHLYM.js +14 -0
  250. package/dist/cli-bundle/chunks/{close-QHMVWM7M.js → close-OP3LK7Z2.js} +7 -8
  251. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js → close-many-BFMP6HHK.js} +15 -17
  252. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js.map → close-many-BFMP6HHK.js.map} +1 -1
  253. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js → close-many-CXJBOWWY.js} +17 -19
  254. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js.map → close-many-CXJBOWWY.js.map} +1 -1
  255. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js → comments-ETHABIY6.js} +9 -11
  256. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js.map → comments-ETHABIY6.js.map} +1 -1
  257. package/dist/cli-bundle/chunks/{comments-5YM62D75.js → comments-MU2WMBUY.js} +11 -13
  258. package/dist/cli-bundle/chunks/{comments-5YM62D75.js.map → comments-MU2WMBUY.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/{config-NCNNWF6R.js → config-FIXJZEQK.js} +18 -387
  260. package/dist/cli-bundle/chunks/config-FIXJZEQK.js.map +7 -0
  261. package/dist/cli-bundle/chunks/{config-SW3U7XP2.js → config-X3ZVCUUG.js} +18 -380
  262. package/dist/cli-bundle/chunks/config-X3ZVCUUG.js.map +1 -0
  263. package/dist/cli-bundle/chunks/context-7ZEZV3BV.js +42 -0
  264. package/dist/cli-bundle/chunks/context-XDI4DKKT.js +46 -0
  265. package/dist/cli-bundle/chunks/{contracts-JXFGBOYT.js → contracts-KP4QAGVW.js} +72 -15
  266. package/dist/cli-bundle/chunks/contracts-KP4QAGVW.js.map +1 -0
  267. package/dist/cli-bundle/chunks/{contracts-SY6PDFIK.js → contracts-SMOAN5NF.js} +72 -15
  268. package/dist/cli-bundle/chunks/contracts-SMOAN5NF.js.map +7 -0
  269. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js → copy-CWM6SBY6.js} +7 -11
  270. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js.map → copy-CWM6SBY6.js.map} +1 -1
  271. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js → copy-JJ3KOQW2.js} +9 -13
  272. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js.map → copy-JJ3KOQW2.js.map} +1 -1
  273. package/dist/cli-bundle/chunks/create-DFMNBKBS.js +28 -0
  274. package/dist/cli-bundle/chunks/{create-O4VONGPG.js → create-J5Q2ELZT.js} +12 -14
  275. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js → delete-2GZLQEUQ.js} +7 -9
  276. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js.map → delete-2GZLQEUQ.js.map} +1 -1
  277. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js → delete-OOQS4KVD.js} +5 -7
  278. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js.map → delete-OOQS4KVD.js.map} +1 -1
  279. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js → deps-IF4IGL4R.js} +6 -9
  280. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js.map → deps-IF4IGL4R.js.map} +1 -1
  281. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js → deps-ZVGGCRR6.js} +8 -11
  282. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js.map → deps-ZVGGCRR6.js.map} +1 -1
  283. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js → docs-2TIFR62T.js} +8 -9
  284. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js.map → docs-2TIFR62T.js.map} +1 -1
  285. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js → docs-NFTBCQQC.js} +10 -11
  286. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js.map → docs-NFTBCQQC.js.map} +1 -1
  287. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js → eval-2F6EH4XN.js} +12 -14
  288. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js.map → eval-2F6EH4XN.js.map} +1 -1
  289. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js → eval-PFKXQR3B.js} +10 -12
  290. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js.map → eval-PFKXQR3B.js.map} +1 -1
  291. package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js → extension-3LRYX7SW.js} +11 -7
  292. package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js → extension-GMVOIP4O.js} +11 -7
  293. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js → files-DF3HO6XK.js} +11 -13
  294. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js.map → files-DF3HO6XK.js.map} +1 -1
  295. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js → files-T5ODMETM.js} +9 -11
  296. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js.map → files-T5ODMETM.js.map} +1 -1
  297. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js → focus-DLXKK4AH.js} +10 -14
  298. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js.map → focus-DLXKK4AH.js.map} +1 -1
  299. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js → focus-MY5ARIEK.js} +8 -12
  300. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js.map → focus-MY5ARIEK.js.map} +1 -1
  301. package/dist/cli-bundle/chunks/{gc-BEJMQT64.js → gc-FULIVYR4.js} +3 -3
  302. package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js → gc-MDGRR2SU.js} +3 -3
  303. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js → get-AWK324RS.js} +10 -13
  304. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js.map → get-AWK324RS.js.map} +1 -1
  305. package/dist/cli-bundle/chunks/{get-WVN75H42.js → get-VYPIICPC.js} +12 -15
  306. package/dist/cli-bundle/chunks/{get-WVN75H42.js.map → get-VYPIICPC.js.map} +1 -1
  307. package/dist/cli-bundle/chunks/{health-P67NZ6TT.js → health-FBCVZGSX.js} +16 -17
  308. package/dist/cli-bundle/chunks/{health-P67NZ6TT.js.map → health-FBCVZGSX.js.map} +1 -1
  309. package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js → health-Q66C43GN.js} +18 -19
  310. package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js.map → health-Q66C43GN.js.map} +1 -1
  311. package/dist/cli-bundle/chunks/history-5XUSLAJA.js +18 -0
  312. package/dist/cli-bundle/chunks/{history-RUKPKNY7.js → history-X4OSES6K.js} +8 -10
  313. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js → history-compact-2GHT32UX.js} +13 -16
  314. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js.map → history-compact-2GHT32UX.js.map} +1 -1
  315. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js → history-compact-WLCQEKXS.js} +11 -14
  316. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js.map → history-compact-WLCQEKXS.js.map} +1 -1
  317. package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js → history-redact-45YW65BK.js} +9 -11
  318. package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +19 -0
  319. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js → history-repair-FY75IC26.js} +13 -16
  320. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js.map → history-repair-FY75IC26.js.map} +1 -1
  321. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js → history-repair-GABSDSVD.js} +11 -14
  322. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js.map → history-repair-GABSDSVD.js.map} +1 -1
  323. package/dist/cli-bundle/chunks/{init-HBFGYS66.js → init-KO7CGIRQ.js} +11 -11
  324. package/dist/cli-bundle/chunks/init-TRYJELH4.js +21 -0
  325. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js → learnings-3F7YLI45.js} +9 -11
  326. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js.map → learnings-3F7YLI45.js.map} +1 -1
  327. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js → learnings-LHZT5BHW.js} +11 -13
  328. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js.map → learnings-LHZT5BHW.js.map} +1 -1
  329. package/dist/cli-bundle/chunks/{list-C7R33MD5.js → list-ROT7JF62.js} +10 -10
  330. package/dist/cli-bundle/chunks/{list-DSN6UNFB.js → list-Y6AU5BJS.js} +10 -10
  331. package/dist/cli-bundle/chunks/next-66BJB4N2.js +277 -0
  332. package/dist/cli-bundle/chunks/next-66BJB4N2.js.map +7 -0
  333. package/dist/cli-bundle/chunks/next-N5MWJTBY.js +274 -0
  334. package/dist/cli-bundle/chunks/next-N5MWJTBY.js.map +1 -0
  335. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js → notes-EVJZ3VAB.js} +11 -13
  336. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js.map → notes-EVJZ3VAB.js.map} +1 -1
  337. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js → notes-FW6YFLND.js} +9 -11
  338. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js.map → notes-FW6YFLND.js.map} +1 -1
  339. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js → plan-DQ7G4EDC.js} +15 -18
  340. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js.map → plan-DQ7G4EDC.js.map} +1 -1
  341. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js → plan-ZHKZ7JVF.js} +17 -20
  342. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js.map → plan-ZHKZ7JVF.js.map} +1 -1
  343. package/dist/cli-bundle/chunks/profile-CHAW6SEA.js +1197 -0
  344. package/dist/cli-bundle/chunks/profile-CHAW6SEA.js.map +1 -0
  345. package/dist/cli-bundle/chunks/profile-UPZGCDOG.js +1235 -0
  346. package/dist/cli-bundle/chunks/profile-UPZGCDOG.js.map +7 -0
  347. package/dist/cli-bundle/chunks/{register-list-query-CCMHGZTF.js → register-list-query-KY6Z6WV7.js} +44 -20
  348. package/dist/cli-bundle/chunks/register-list-query-KY6Z6WV7.js.map +7 -0
  349. package/dist/cli-bundle/chunks/{register-list-query-OM3E2KMY.js → register-list-query-Y2VRHPCL.js} +45 -21
  350. package/dist/cli-bundle/chunks/register-list-query-Y2VRHPCL.js.map +1 -0
  351. package/dist/cli-bundle/chunks/{register-mutation-UXTTWL6N.js → register-mutation-N6AYSKPM.js} +103 -37
  352. package/dist/cli-bundle/chunks/register-mutation-N6AYSKPM.js.map +7 -0
  353. package/dist/cli-bundle/chunks/{register-mutation-N3CDEGZU.js → register-mutation-PCARIGZS.js} +104 -38
  354. package/dist/cli-bundle/chunks/register-mutation-PCARIGZS.js.map +1 -0
  355. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js → register-operations-L6CYTOIH.js} +30 -32
  356. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js.map → register-operations-L6CYTOIH.js.map} +1 -1
  357. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js → register-operations-YAT6FUUB.js} +32 -34
  358. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js.map → register-operations-YAT6FUUB.js.map} +1 -1
  359. package/dist/cli-bundle/chunks/{register-setup-TWHKICM2.js → register-setup-MPANILQF.js} +67 -24
  360. package/dist/cli-bundle/chunks/register-setup-MPANILQF.js.map +7 -0
  361. package/dist/cli-bundle/chunks/{register-setup-G5LTSFYK.js → register-setup-N7UGXYJC.js} +68 -25
  362. package/dist/cli-bundle/chunks/register-setup-N7UGXYJC.js.map +1 -0
  363. package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js → restore-DKMCLPI5.js} +9 -11
  364. package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +17 -0
  365. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js → scheduling-shortcuts-3F4QUEDH.js} +14 -16
  366. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js.map → scheduling-shortcuts-3F4QUEDH.js.map} +1 -1
  367. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js → scheduling-shortcuts-BNZLQK36.js} +12 -14
  368. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js.map → scheduling-shortcuts-BNZLQK36.js.map} +1 -1
  369. package/dist/cli-bundle/chunks/schema-OLT6LVKH.js +75 -0
  370. package/dist/cli-bundle/chunks/schema-XJXKJQF5.js +71 -0
  371. package/dist/cli-bundle/chunks/{search-2EI6EAXH.js → search-CX5UMV4H.js} +10 -12
  372. package/dist/cli-bundle/chunks/{search-QBFBLQRO.js → search-KP6H7COV.js} +10 -12
  373. package/dist/cli-bundle/chunks/{stats-TCW2SZQG.js → stats-7XW4OEMK.js} +20 -12
  374. package/dist/cli-bundle/chunks/stats-7XW4OEMK.js.map +7 -0
  375. package/dist/cli-bundle/chunks/{stats-TKC6CAKB.js → stats-QZUG6MX5.js} +21 -13
  376. package/dist/cli-bundle/chunks/stats-QZUG6MX5.js.map +1 -0
  377. package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js → telemetry-DIFPXCAT.js} +4 -4
  378. package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js → telemetry-WTYFUPRL.js} +4 -4
  379. package/dist/cli-bundle/chunks/{test-NV2DRPUS.js → test-HU2BS7EY.js} +14 -16
  380. package/dist/cli-bundle/chunks/test-HU2BS7EY.js.map +1 -0
  381. package/dist/cli-bundle/chunks/test-QNDXZQCW.js +34 -0
  382. package/dist/cli-bundle/chunks/test-QNDXZQCW.js.map +7 -0
  383. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js → test-all-PZTBLLQ6.js} +17 -20
  384. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js.map → test-all-PZTBLLQ6.js.map} +1 -1
  385. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js → test-all-XLPI4USF.js} +19 -22
  386. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js.map → test-all-XLPI4USF.js.map} +1 -1
  387. package/dist/cli-bundle/chunks/{test-runs-FQ5WNQLP.js → test-runs-CA6K32RD.js} +6 -7
  388. package/dist/cli-bundle/chunks/test-runs-CA6K32RD.js.map +1 -0
  389. package/dist/cli-bundle/chunks/{test-runs-PX73DMMI.js → test-runs-LANLLPVO.js} +5 -6
  390. package/dist/cli-bundle/chunks/test-runs-LANLLPVO.js.map +7 -0
  391. package/dist/cli-bundle/chunks/update-DJKWLBWJ.js +28 -0
  392. package/dist/cli-bundle/chunks/update-DJKWLBWJ.js.map +1 -0
  393. package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +24 -0
  394. package/dist/cli-bundle/chunks/update-UXDLTEOZ.js.map +7 -0
  395. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js → update-many-LU3SCNK5.js} +32 -33
  396. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js.map → update-many-LU3SCNK5.js.map} +1 -1
  397. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js → update-many-VW5DGF3S.js} +34 -35
  398. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js.map → update-many-VW5DGF3S.js.map} +1 -1
  399. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js → upgrade-77FRUAXN.js} +12 -8
  400. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js.map → upgrade-77FRUAXN.js.map} +1 -1
  401. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js → upgrade-ICXY244R.js} +10 -6
  402. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js.map → upgrade-ICXY244R.js.map} +1 -1
  403. package/dist/cli-bundle/chunks/{validate-HYZNIB6W.js → validate-2G566PKQ.js} +37 -28
  404. package/dist/cli-bundle/chunks/validate-2G566PKQ.js.map +7 -0
  405. package/dist/cli-bundle/chunks/{validate-54SYJ7QW.js → validate-BDPVXHHH.js} +38 -29
  406. package/dist/cli-bundle/chunks/validate-BDPVXHHH.js.map +1 -0
  407. package/dist/cli-bundle/main.js +56 -38
  408. package/dist/cli-bundle/main.js.map +2 -2
  409. package/dist/core/config/positional-value.d.ts +2 -0
  410. package/dist/core/config/positional-value.js +2 -2
  411. package/dist/core/config/positional-value.js.map +1 -1
  412. package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
  413. package/dist/core/extensions/activation-summary-markdown.js +140 -0
  414. package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
  415. package/dist/core/extensions/activation-summary.d.ts +2 -0
  416. package/dist/core/extensions/activation-summary.js +3 -2
  417. package/dist/core/extensions/activation-summary.js.map +1 -1
  418. package/dist/core/extensions/capability-usage.d.ts +1 -1
  419. package/dist/core/extensions/capability-usage.js +4 -3
  420. package/dist/core/extensions/capability-usage.js.map +1 -1
  421. package/dist/core/extensions/extension-registries.js +3 -2
  422. package/dist/core/extensions/extension-registries.js.map +1 -1
  423. package/dist/core/extensions/extension-types.d.ts +21 -1
  424. package/dist/core/extensions/extension-types.js +3 -2
  425. package/dist/core/extensions/extension-types.js.map +1 -1
  426. package/dist/core/extensions/loader.js +131 -2
  427. package/dist/core/extensions/loader.js.map +1 -1
  428. package/dist/core/fs/fs-utils.js +27 -2
  429. package/dist/core/fs/fs-utils.js.map +1 -1
  430. package/dist/core/item/actionability.d.ts +57 -0
  431. package/dist/core/item/actionability.js +178 -0
  432. package/dist/core/item/actionability.js.map +1 -0
  433. package/dist/core/item/type-registry.js +18 -45
  434. package/dist/core/item/type-registry.js.map +1 -1
  435. package/dist/core/profile/profile-describe.d.ts +64 -0
  436. package/dist/core/profile/profile-describe.js +83 -0
  437. package/dist/core/profile/profile-describe.js.map +1 -0
  438. package/dist/core/profile/profile-lint.d.ts +53 -0
  439. package/dist/core/profile/profile-lint.js +422 -0
  440. package/dist/core/profile/profile-lint.js.map +1 -0
  441. package/dist/core/profile/profile-plan.d.ts +145 -0
  442. package/dist/core/profile/profile-plan.js +0 -0
  443. package/dist/core/profile/profile-plan.js.map +1 -0
  444. package/dist/core/profile/profile-presets.d.ts +218 -0
  445. package/dist/core/profile/profile-presets.js +325 -0
  446. package/dist/core/profile/profile-presets.js.map +1 -0
  447. package/dist/core/schema/fields-file.js +25 -25
  448. package/dist/core/schema/fields-file.js.map +1 -1
  449. package/dist/core/schema/item-types-file.js +3 -3
  450. package/dist/core/schema/item-types-file.js.map +1 -1
  451. package/dist/core/schema/runtime-schema.js +4 -4
  452. package/dist/core/schema/runtime-schema.js.map +1 -1
  453. package/dist/core/schema/status-defs-file.js +3 -3
  454. package/dist/core/schema/status-defs-file.js.map +1 -1
  455. package/dist/core/shared/serialization.js +83 -62
  456. package/dist/core/shared/serialization.js.map +1 -1
  457. package/dist/core/store/item-store.d.ts +1 -0
  458. package/dist/core/store/item-store.js +16 -8
  459. package/dist/core/store/item-store.js.map +1 -1
  460. package/dist/core/store/paths.js +4 -32
  461. package/dist/core/store/paths.js.map +1 -1
  462. package/dist/core/store/settings.js +14 -14
  463. package/dist/core/store/settings.js.map +1 -1
  464. package/dist/core/telemetry/observability.js +50 -54
  465. package/dist/core/telemetry/observability.js.map +1 -1
  466. package/dist/core/telemetry/runtime.js +11 -2
  467. package/dist/core/telemetry/runtime.js.map +1 -1
  468. package/dist/core/test/background-runs.js +3 -2
  469. package/dist/core/test/background-runs.js.map +1 -1
  470. package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
  471. package/dist/core/validate/linked-artifact-reference.js +41 -0
  472. package/dist/core/validate/linked-artifact-reference.js.map +1 -0
  473. package/dist/mcp/server.js +183 -83
  474. package/dist/mcp/server.js.map +1 -1
  475. package/dist/mcp/tool-definitions.js +33 -2
  476. package/dist/mcp/tool-definitions.js.map +1 -1
  477. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  478. package/dist/sdk/cli-contracts/commander-types.js +15 -2
  479. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  480. package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
  481. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  482. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  483. package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
  484. package/dist/sdk/cli-contracts/flag-contracts.js +1583 -0
  485. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
  486. package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
  487. package/dist/sdk/cli-contracts/string-lists.js +20 -0
  488. package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
  489. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
  490. package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
  491. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  492. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
  493. package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
  494. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  495. package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
  496. package/dist/sdk/cli-contracts/tool-schema.js +840 -0
  497. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
  498. package/dist/sdk/cli-contracts.d.ts +13 -193
  499. package/dist/sdk/cli-contracts.js +5 -2277
  500. package/dist/sdk/cli-contracts.js.map +1 -1
  501. package/dist/sdk/compose.d.ts +7 -4
  502. package/dist/sdk/compose.js +64 -14
  503. package/dist/sdk/compose.js.map +1 -1
  504. package/dist/sdk/define.d.ts +14 -0
  505. package/dist/sdk/define.js +17 -2
  506. package/dist/sdk/define.js.map +1 -1
  507. package/dist/sdk/index.d.ts +14 -3
  508. package/dist/sdk/index.js +14 -3
  509. package/dist/sdk/index.js.map +1 -1
  510. package/dist/sdk/testing.d.ts +82 -2
  511. package/dist/sdk/testing.js +74 -3
  512. package/dist/sdk/testing.js.map +1 -1
  513. package/docs/AGENT_GUIDE.md +2 -0
  514. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  515. package/docs/COMMANDS.md +37 -0
  516. package/docs/EXTENSIONS.md +12 -13
  517. package/docs/RELEASING.md +6 -1
  518. package/docs/SDK.md +184 -17
  519. package/docs/TESTING.md +12 -0
  520. package/docs/examples/policy-restricted-extension/README.md +6 -0
  521. package/docs/examples/policy-restricted-extension/index.ts +40 -0
  522. package/docs/examples/policy-restricted-extension/manifest.json +2 -2
  523. package/docs/examples/starter-extension/README.md +14 -2
  524. package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
  525. package/docs/examples/starter-extension/manifest.json +2 -2
  526. package/package.json +20 -7
  527. package/packages/pm-beads/extensions/beads/index.ts +3 -3
  528. package/packages/pm-beads/extensions/beads/manifest.json +2 -2
  529. package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
  530. package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
  531. package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
  532. package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
  533. package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
  534. package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
  535. package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
  536. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
  537. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
  538. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
  539. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
  540. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
  541. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
  542. package/packages/pm-kanban/README.md +97 -0
  543. package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
  544. package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
  545. package/packages/pm-kanban/package.json +57 -0
  546. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
  547. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
  548. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
  549. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
  550. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
  551. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
  552. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
  553. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
  554. package/packages/pm-templates/extensions/templates/index.ts +2 -2
  555. package/packages/pm-templates/extensions/templates/manifest.json +2 -2
  556. package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
  557. package/packages/pm-todos/extensions/todos/index.ts +3 -3
  558. package/packages/pm-todos/extensions/todos/manifest.json +2 -2
  559. package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
  560. package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
  561. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
  562. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
  563. package/scripts/bundle-cli.mjs +1 -1
  564. package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +0 -18
  565. package/dist/cli-bundle/chunks/aggregate-63NWNIBR.js.map +0 -1
  566. package/dist/cli-bundle/chunks/aggregate-YHCYX2EV.js.map +0 -7
  567. package/dist/cli-bundle/chunks/chunk-6EL7SW5C.js.map +0 -7
  568. package/dist/cli-bundle/chunks/chunk-6W3Y65PL.js.map +0 -7
  569. package/dist/cli-bundle/chunks/chunk-AEACLRVH.js.map +0 -7
  570. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js +0 -78
  571. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js.map +0 -7
  572. package/dist/cli-bundle/chunks/chunk-BFFO3AIB.js.map +0 -1
  573. package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +0 -7
  574. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js +0 -75
  575. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js.map +0 -1
  576. package/dist/cli-bundle/chunks/chunk-GQYJEEFX.js.map +0 -1
  577. package/dist/cli-bundle/chunks/chunk-HBAEFWX3.js.map +0 -7
  578. package/dist/cli-bundle/chunks/chunk-HC2S36NB.js.map +0 -1
  579. package/dist/cli-bundle/chunks/chunk-IAP5KYBQ.js.map +0 -1
  580. package/dist/cli-bundle/chunks/chunk-INPHFO33.js +0 -764
  581. package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +0 -7
  582. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js +0 -86
  583. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js.map +0 -7
  584. package/dist/cli-bundle/chunks/chunk-J7I4C5ZB.js.map +0 -7
  585. package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +0 -7
  586. package/dist/cli-bundle/chunks/chunk-KJZOSF7J.js.map +0 -1
  587. package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +0 -1
  588. package/dist/cli-bundle/chunks/chunk-LNEDHJNQ.js.map +0 -1
  589. package/dist/cli-bundle/chunks/chunk-M6TUBOGW.js.map +0 -1
  590. package/dist/cli-bundle/chunks/chunk-MEXZ5XUM.js.map +0 -7
  591. package/dist/cli-bundle/chunks/chunk-N5B6WZC5.js.map +0 -1
  592. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js +0 -761
  593. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +0 -1
  594. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js +0 -83
  595. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js.map +0 -1
  596. package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +0 -1
  597. package/dist/cli-bundle/chunks/chunk-OHDQNKJB.js.map +0 -7
  598. package/dist/cli-bundle/chunks/chunk-PRVTGX64.js.map +0 -7
  599. package/dist/cli-bundle/chunks/chunk-RAWA3Y7O.js.map +0 -1
  600. package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +0 -7
  601. package/dist/cli-bundle/chunks/chunk-SUREE24M.js.map +0 -1
  602. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js +0 -654
  603. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js.map +0 -1
  604. package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +0 -1
  605. package/dist/cli-bundle/chunks/chunk-XVYKWZNL.js.map +0 -7
  606. package/dist/cli-bundle/chunks/chunk-XXKV4UWE.js.map +0 -7
  607. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js +0 -657
  608. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js.map +0 -7
  609. package/dist/cli-bundle/chunks/close-JEBZXONN.js +0 -15
  610. package/dist/cli-bundle/chunks/config-NCNNWF6R.js.map +0 -7
  611. package/dist/cli-bundle/chunks/config-SW3U7XP2.js.map +0 -1
  612. package/dist/cli-bundle/chunks/context-55VEOYI3.js.map +0 -1
  613. package/dist/cli-bundle/chunks/context-5LB7UGKE.js.map +0 -7
  614. package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +0 -1
  615. package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +0 -7
  616. package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +0 -30
  617. package/dist/cli-bundle/chunks/history-ALTM2RRP.js +0 -20
  618. package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +0 -21
  619. package/dist/cli-bundle/chunks/init-C4CRHW22.js +0 -21
  620. package/dist/cli-bundle/chunks/register-list-query-CCMHGZTF.js.map +0 -7
  621. package/dist/cli-bundle/chunks/register-list-query-OM3E2KMY.js.map +0 -1
  622. package/dist/cli-bundle/chunks/register-mutation-N3CDEGZU.js.map +0 -1
  623. package/dist/cli-bundle/chunks/register-mutation-UXTTWL6N.js.map +0 -7
  624. package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +0 -1
  625. package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +0 -7
  626. package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +0 -19
  627. package/dist/cli-bundle/chunks/schema-C6QA367T.js.map +0 -7
  628. package/dist/cli-bundle/chunks/schema-QO5I4FBL.js.map +0 -1
  629. package/dist/cli-bundle/chunks/stats-TCW2SZQG.js.map +0 -7
  630. package/dist/cli-bundle/chunks/stats-TKC6CAKB.js.map +0 -1
  631. package/dist/cli-bundle/chunks/test-WA6RZGM2.js +0 -36
  632. package/dist/cli-bundle/chunks/test-runs-FQ5WNQLP.js.map +0 -1
  633. package/dist/cli-bundle/chunks/test-runs-PX73DMMI.js.map +0 -7
  634. package/dist/cli-bundle/chunks/update-BSKMQOYH.js +0 -28
  635. package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +0 -24
  636. package/dist/cli-bundle/chunks/validate-54SYJ7QW.js.map +0 -1
  637. package/dist/cli-bundle/chunks/validate-HYZNIB6W.js.map +0 -7
  638. package/docs/examples/policy-restricted-extension/index.js +0 -21
  639. package/packages/pm-beads/extensions/beads/index.js +0 -64
  640. package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
  641. package/packages/pm-beads/extensions/beads/runtime.js +0 -482
  642. package/packages/pm-calendar/extensions/calendar/index.js +0 -150
  643. package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
  644. package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
  645. package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
  646. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
  647. package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
  648. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
  649. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
  650. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
  651. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
  652. package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
  653. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
  654. package/packages/pm-templates/extensions/templates/index.js +0 -132
  655. package/packages/pm-templates/extensions/templates/runtime.js +0 -35
  656. package/packages/pm-todos/extensions/todos/index.js +0 -81
  657. package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
  658. package/packages/pm-todos/extensions/todos/runtime.js +0 -545
  659. /package/dist/cli-bundle/chunks/{activity-54TXGJ2T.js.map → activity-EJBMXUBH.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js.map → activity-MVSEND6D.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js.map → chunk-3JWQCLR5.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js.map → chunk-4TXTVZL3.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js.map → chunk-4YIMPANT.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js.map → chunk-73PTKMAE.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js.map → chunk-7RIJGN4R.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js.map → chunk-BN3CWK6G.js.map} +0 -0
  667. /package/dist/cli-bundle/chunks/{chunk-J3NMWFIN.js.map → chunk-C2KCIZKZ.js.map} +0 -0
  668. /package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js.map → chunk-CHRNYKNI.js.map} +0 -0
  669. /package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js.map → chunk-D6USKAMA.js.map} +0 -0
  670. /package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js.map → chunk-DLDCPF5X.js.map} +0 -0
  671. /package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js.map → chunk-E2Q2ULMR.js.map} +0 -0
  672. /package/dist/cli-bundle/chunks/{chunk-PEL2NLQE.js.map → chunk-F6VH3LFC.js.map} +0 -0
  673. /package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js.map → chunk-FDEVKXC4.js.map} +0 -0
  674. /package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js.map → chunk-HUYYMTGW.js.map} +0 -0
  675. /package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js.map → chunk-IHXXUIXS.js.map} +0 -0
  676. /package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js.map → chunk-JIP67N2K.js.map} +0 -0
  677. /package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js.map → chunk-KRASIL6M.js.map} +0 -0
  678. /package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js.map → chunk-MLHX6DN5.js.map} +0 -0
  679. /package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js.map → chunk-OB3RJV5F.js.map} +0 -0
  680. /package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js.map → chunk-OUQ5JEFM.js.map} +0 -0
  681. /package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js.map → chunk-QE5UFCCO.js.map} +0 -0
  682. /package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js.map → chunk-SJZTPVFT.js.map} +0 -0
  683. /package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js.map → chunk-V3KLX7U7.js.map} +0 -0
  684. /package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js.map → chunk-Z5BM2FKQ.js.map} +0 -0
  685. /package/dist/cli-bundle/chunks/{chunk-IXAZI443.js.map → chunk-ZEATCVAC.js.map} +0 -0
  686. /package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js.map → chunk-ZFIEEDTJ.js.map} +0 -0
  687. /package/dist/cli-bundle/chunks/{close-JEBZXONN.js.map → close-37KEHLYM.js.map} +0 -0
  688. /package/dist/cli-bundle/chunks/{close-QHMVWM7M.js.map → close-OP3LK7Z2.js.map} +0 -0
  689. /package/dist/cli-bundle/chunks/{create-CLSCHGJJ.js.map → context-7ZEZV3BV.js.map} +0 -0
  690. /package/dist/cli-bundle/chunks/{create-O4VONGPG.js.map → context-XDI4DKKT.js.map} +0 -0
  691. /package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js.map → create-DFMNBKBS.js.map} +0 -0
  692. /package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js.map → create-J5Q2ELZT.js.map} +0 -0
  693. /package/dist/cli-bundle/chunks/{history-RUKPKNY7.js.map → extension-3LRYX7SW.js.map} +0 -0
  694. /package/dist/cli-bundle/chunks/{history-ALTM2RRP.js.map → extension-GMVOIP4O.js.map} +0 -0
  695. /package/dist/cli-bundle/chunks/{gc-BEJMQT64.js.map → gc-FULIVYR4.js.map} +0 -0
  696. /package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js.map → gc-MDGRR2SU.js.map} +0 -0
  697. /package/dist/cli-bundle/chunks/{history-redact-5YGLWUDH.js.map → history-5XUSLAJA.js.map} +0 -0
  698. /package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js.map → history-X4OSES6K.js.map} +0 -0
  699. /package/dist/cli-bundle/chunks/{init-HBFGYS66.js.map → history-redact-45YW65BK.js.map} +0 -0
  700. /package/dist/cli-bundle/chunks/{init-C4CRHW22.js.map → history-redact-BVHWDXPR.js.map} +0 -0
  701. /package/dist/cli-bundle/chunks/{list-C7R33MD5.js.map → init-KO7CGIRQ.js.map} +0 -0
  702. /package/dist/cli-bundle/chunks/{list-DSN6UNFB.js.map → init-TRYJELH4.js.map} +0 -0
  703. /package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js.map → list-ROT7JF62.js.map} +0 -0
  704. /package/dist/cli-bundle/chunks/{restore-LQHXBAY5.js.map → list-Y6AU5BJS.js.map} +0 -0
  705. /package/dist/cli-bundle/chunks/{search-2EI6EAXH.js.map → restore-DKMCLPI5.js.map} +0 -0
  706. /package/dist/cli-bundle/chunks/{search-QBFBLQRO.js.map → restore-IRAKSWIW.js.map} +0 -0
  707. /package/dist/cli-bundle/chunks/{test-NV2DRPUS.js.map → schema-OLT6LVKH.js.map} +0 -0
  708. /package/dist/cli-bundle/chunks/{test-WA6RZGM2.js.map → schema-XJXKJQF5.js.map} +0 -0
  709. /package/dist/cli-bundle/chunks/{update-BSKMQOYH.js.map → search-CX5UMV4H.js.map} +0 -0
  710. /package/dist/cli-bundle/chunks/{update-FIGYNQ2I.js.map → search-KP6H7COV.js.map} +0 -0
  711. /package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js.map → telemetry-DIFPXCAT.js.map} +0 -0
  712. /package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js.map → telemetry-WTYFUPRL.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a1b19ca-247e-5b4a-a916-b17be9b5c95d")}catch(e){}}();
3
- export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
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]="b8aa5310-bff0-59b5-9a34-c6fc6a46582d")}catch(e){}}();
3
+ export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
4
4
  export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, } from "./cli-contracts/commander-mutation-options.js";
5
5
  // PM_* enum/guard contracts and the bulk tool-parameter property/metadata data
6
6
  // tables live in sibling modules and are re-exported here so existing import
@@ -8,2279 +8,7 @@ export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEAT
8
8
  // keep importing everything from "./cli-contracts.js" unchanged.
9
9
  export { PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
10
10
  export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, } from "./cli-contracts/tool-option-contracts.js";
11
- import { PM_TOOL_ACTIONS } from "./cli-contracts/enum-contracts.js";
12
- import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, } from "./cli-contracts/tool-option-contracts.js";
13
- import { PM_TOOL_PARAMETER_PROPERTIES, PM_TOOL_PARAMETER_METADATA, PLAN_ACTION_PARAMETER_PROPERTIES, PLAN_ACTION_PARAMETER_METADATA, } from "./cli-contracts/tool-parameter-tables.js";
14
- function normalizeUniqueStringList(values) {
15
- return [...new Set(Array.from(values).filter((value) => value.trim().length > 0))];
16
- }
17
- function normalizeFlagAliasKey(flag) {
18
- if (!flag.startsWith("--")) {
19
- return flag;
20
- }
21
- return `--${flag.slice(2).replaceAll("_", "-")}`;
22
- }
23
- /**
24
- * Implements with flag alias metadata for the public runtime surface of this module.
25
- */
26
- export function withFlagAliasMetadata(flagContracts) {
27
- const aliasesByCanonical = new Map();
28
- for (const contract of flagContracts) {
29
- const canonical = normalizeFlagAliasKey(contract.flag);
30
- const bucket = aliasesByCanonical.get(canonical) ?? new Set();
31
- if (contract.flag !== canonical) {
32
- bucket.add(contract.flag);
33
- }
34
- for (const alias of contract.aliases ?? []) {
35
- if (alias !== canonical) {
36
- bucket.add(alias);
37
- }
38
- }
39
- aliasesByCanonical.set(canonical, bucket);
40
- }
41
- return flagContracts.map((contract) => {
42
- const canonical = normalizeFlagAliasKey(contract.flag);
43
- if (contract.flag !== canonical) {
44
- return contract;
45
- }
46
- const aliases = normalizeUniqueStringList([
47
- ...(contract.aliases ?? []),
48
- ...aliasesByCanonical.get(canonical),
49
- ]).filter((alias) => alias !== canonical);
50
- if (aliases.length === 0) {
51
- return contract;
52
- }
53
- return {
54
- ...contract,
55
- aliases,
56
- };
57
- });
58
- }
59
- /**
60
- * Implements compact flag alias contracts for the public runtime surface of this module.
61
- */
62
- export function compactFlagAliasContracts(flagContracts) {
63
- const withAliases = withFlagAliasMetadata(flagContracts);
64
- const canonicalFlags = new Set(withAliases.map((contract) => contract.flag));
65
- return withAliases.filter((contract) => {
66
- const canonical = normalizeFlagAliasKey(contract.flag);
67
- return contract.flag === canonical || !canonicalFlags.has(canonical);
68
- });
69
- }
70
- export const SUBCOMMAND_GLOBAL_FLAG_CONTRACTS = [
71
- { flag: "--json" },
72
- { flag: "--quiet" },
73
- { flag: "--no-changed-fields" },
74
- { flag: "--id-only" },
75
- { flag: "--pm-path", aliases: ["--path"] },
76
- { flag: "--no-extensions" },
77
- { flag: "--no-pager" },
78
- { flag: "--profile" },
79
- { flag: "--help" },
80
- ];
81
- export const GLOBAL_FLAG_CONTRACTS = [
82
- ...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,
83
- { flag: "--version" },
84
- ];
85
- export const LIST_FILTER_FLAG_CONTRACTS = [
86
- { flag: "--status", list: true },
87
- { flag: "--type" },
88
- { flag: "--tag", aliases: ["--tags"] },
89
- { flag: "--priority" },
90
- { flag: "--deadline-before" },
91
- { flag: "--deadline-after" },
92
- { flag: "--updated-after" },
93
- { flag: "--updated-before" },
94
- { flag: "--created-after" },
95
- { flag: "--created-before" },
96
- { flag: "--ids", list: true },
97
- { flag: "--assignee" },
98
- { flag: "--assignee-filter" },
99
- { flag: "--assignee_filter" },
100
- { flag: "--parent" },
101
- { flag: "--sprint" },
102
- { flag: "--release" },
103
- { flag: "--filter-ac-missing" },
104
- { flag: "--filter-estimates-missing", aliases: ["--filter-estimate-missing"] },
105
- { flag: "--filter-resolution-missing" },
106
- { flag: "--filter-metadata-missing" },
107
- { flag: "--filter-reviewer-missing" },
108
- { flag: "--filter-risk-missing" },
109
- { flag: "--filter-confidence-missing" },
110
- { flag: "--filter-sprint-missing" },
111
- { flag: "--filter-release-missing" },
112
- { flag: "--has-notes" },
113
- { flag: "--no-notes" },
114
- { flag: "--has-learnings" },
115
- { flag: "--no-learnings" },
116
- { flag: "--has-files" },
117
- { flag: "--no-files" },
118
- { flag: "--has-docs" },
119
- { flag: "--no-docs" },
120
- { flag: "--has-tests" },
121
- { flag: "--no-tests" },
122
- { flag: "--has-comments" },
123
- { flag: "--no-comments" },
124
- { flag: "--has-deps" },
125
- { flag: "--no-deps" },
126
- { flag: "--has-body" },
127
- { flag: "--empty-body" },
128
- { flag: "--has-linked-command" },
129
- { flag: "--no-linked-command" },
130
- { flag: "--limit" },
131
- { flag: "--offset" },
132
- { flag: "--no-truncate", aliases: ["--all"] },
133
- { flag: "--compact" },
134
- { flag: "--brief" },
135
- { flag: "--full" },
136
- { flag: "--fields", list: true },
137
- { flag: "--sort" },
138
- { flag: "--order" },
139
- { flag: "--tree" },
140
- { flag: "--tree-depth" },
141
- { flag: "--tree_depth" },
142
- { flag: "--include-body" },
143
- { flag: "--format" },
144
- { flag: "--stream" },
145
- ];
146
- export const AGGREGATE_FLAG_CONTRACTS = [
147
- { flag: "--group-by", list: true },
148
- { flag: "--count" },
149
- { flag: "--completion" },
150
- { flag: "--sum" },
151
- { flag: "--avg" },
152
- { flag: "--include-unparented" },
153
- { flag: "--include_unparented" },
154
- { flag: "--status" },
155
- { flag: "--type" },
156
- { flag: "--tag" },
157
- { flag: "--priority" },
158
- { flag: "--deadline-before" },
159
- { flag: "--deadline-after" },
160
- { flag: "--assignee" },
161
- { flag: "--assignee-filter" },
162
- { flag: "--assignee_filter" },
163
- { flag: "--parent" },
164
- { flag: "--sprint" },
165
- { flag: "--release" },
166
- ];
167
- export const DEDUPE_AUDIT_FLAG_CONTRACTS = [
168
- { flag: "--mode" },
169
- { flag: "--limit" },
170
- { flag: "--threshold" },
171
- { flag: "--status" },
172
- { flag: "--type" },
173
- { flag: "--tag" },
174
- { flag: "--priority" },
175
- { flag: "--deadline-before" },
176
- { flag: "--deadline-after" },
177
- { flag: "--assignee" },
178
- { flag: "--assignee-filter" },
179
- { flag: "--assignee_filter" },
180
- { flag: "--parent" },
181
- { flag: "--sprint" },
182
- { flag: "--release" },
183
- ];
184
- export const DEDUPE_MERGE_FLAG_CONTRACTS = [
185
- { flag: "--keep" },
186
- { flag: "--close", list: true },
187
- { flag: "--apply" },
188
- { flag: "--dry-run" },
189
- { flag: "--skip-children" },
190
- { flag: "--author" },
191
- { flag: "--message" },
192
- ];
193
- export const COMMENTS_AUDIT_FLAG_CONTRACTS = [
194
- { flag: "--status" },
195
- { flag: "--type" },
196
- { flag: "--assignee" },
197
- { flag: "--assignee-filter" },
198
- { flag: "--assignee_filter" },
199
- { flag: "--parent" },
200
- { flag: "--tag" },
201
- { flag: "--sprint" },
202
- { flag: "--release" },
203
- { flag: "--priority" },
204
- { flag: "--limit-items" },
205
- { flag: "--limit" },
206
- { flag: "--full-history" },
207
- { flag: "--latest" },
208
- ];
209
- export const COMMENTS_FLAG_CONTRACTS = [
210
- { flag: "--add", aliases: ["--comment"] },
211
- { flag: "--stdin" },
212
- { flag: "--file" },
213
- { flag: "--edit" },
214
- { flag: "--delete" },
215
- { flag: "--limit" },
216
- { flag: "--author" },
217
- { flag: "--message" },
218
- { flag: "--allow-audit-comment" },
219
- { flag: "--force" },
220
- ];
221
- export const NOTES_FLAG_CONTRACTS = [
222
- { flag: "--add", aliases: ["--note"] },
223
- { flag: "--limit" },
224
- { flag: "--author" },
225
- { flag: "--message" },
226
- { flag: "--allow-audit-note" },
227
- { flag: "--allow-audit-comment" },
228
- { flag: "--force" },
229
- ];
230
- export const LEARNINGS_FLAG_CONTRACTS = [
231
- { flag: "--add", aliases: ["--learning"] },
232
- { flag: "--limit" },
233
- { flag: "--author" },
234
- { flag: "--message" },
235
- { flag: "--allow-audit-learning" },
236
- { flag: "--allow-audit-comment" },
237
- { flag: "--force" },
238
- ];
239
- export const FILES_FLAG_CONTRACTS = [
240
- { flag: "--add" },
241
- { flag: "--add-glob" },
242
- { flag: "--remove" },
243
- { flag: "--migrate" },
244
- // GH-170 (pm-pfnx): single-value note applied to every --add/--add-glob link
245
- // in the invocation (embedded note= wins; usage error without an add).
246
- { flag: "--note" },
247
- { flag: "--list" },
248
- { flag: "--append-stable" },
249
- { flag: "--validate-paths" },
250
- { flag: "--audit" },
251
- { flag: "--author" },
252
- { flag: "--message" },
253
- { flag: "--force" },
254
- ];
255
- export const DOCS_FLAG_CONTRACTS = [
256
- { flag: "--add" },
257
- { flag: "--add-glob" },
258
- { flag: "--remove" },
259
- { flag: "--migrate" },
260
- // GH-170 (pm-pfnx): see FILES_FLAG_CONTRACTS --note.
261
- { flag: "--note" },
262
- { flag: "--list" },
263
- { flag: "--validate-paths" },
264
- { flag: "--audit" },
265
- { flag: "--author" },
266
- { flag: "--message" },
267
- { flag: "--force" },
268
- ];
269
- export const HISTORY_FLAG_CONTRACTS = [
270
- { flag: "--limit" },
271
- { flag: "--compact" },
272
- { flag: "--full" },
273
- { flag: "--diff" },
274
- { flag: "--field" },
275
- { flag: "--verify" },
276
- { flag: "--format" },
277
- ];
278
- export const HISTORY_REDACT_FLAG_CONTRACTS = [
279
- { flag: "--literal" },
280
- { flag: "--regex" },
281
- { flag: "--replacement" },
282
- { flag: "--dry-run" },
283
- { flag: "--author" },
284
- { flag: "--message" },
285
- { flag: "--force" },
286
- ];
287
- export const HISTORY_REPAIR_FLAG_CONTRACTS = [
288
- { flag: "--all" },
289
- { flag: "--dry-run" },
290
- { flag: "--author" },
291
- { flag: "--message" },
292
- { flag: "--force" },
293
- ];
294
- export const HISTORY_COMPACT_FLAG_CONTRACTS = [
295
- { flag: "--before" },
296
- { flag: "--ids", list: true },
297
- { flag: "--all-over", value_type: "number" },
298
- { flag: "--closed" },
299
- { flag: "--all-streams" },
300
- { flag: "--min-entries", value_type: "number" },
301
- { flag: "--dry-run" },
302
- { flag: "--author" },
303
- { flag: "--message" },
304
- { flag: "--force" },
305
- ];
306
- export const SCHEMA_FLAG_CONTRACTS = [
307
- { flag: "--description" },
308
- { flag: "--default-status", aliases: ["--default_status"] },
309
- { flag: "--folder" },
310
- { flag: "--alias" },
311
- // --role is a repeatable Commander collect flag (NOT a comma-list contract),
312
- // mirroring --alias; list:false keeps the bootstrap coalescer from corrupting
313
- // values.
314
- { flag: "--role" },
315
- { flag: "--order" },
316
- // add-field flags (custom runtime fields). --commands/--required-types are
317
- // repeatable Commander collect flags (comma-splitting handled in the action),
318
- // so they stay off the comma-list contract for the same reason as --alias.
319
- { flag: "--type" },
320
- { flag: "--commands" },
321
- { flag: "--cli-flag" },
322
- { flag: "--required" },
323
- { flag: "--required-on-create" },
324
- { flag: "--no-allow-unset" },
325
- { flag: "--required-types" },
326
- // add-type --infer flags (title-prefix type inference).
327
- { flag: "--infer" },
328
- { flag: "--min-count" },
329
- { flag: "--apply" },
330
- { flag: "--author" },
331
- { flag: "--force" },
332
- ];
333
- export const PLAN_FLAG_CONTRACTS = [
334
- { flag: "--title" },
335
- { flag: "--description" },
336
- { flag: "--scope" },
337
- { flag: "--parent" },
338
- { flag: "--related" },
339
- { flag: "--blocks" },
340
- { flag: "--blocked-by", aliases: ["--blocked_by"] },
341
- { flag: "--harness" },
342
- { flag: "--mode" },
343
- { flag: "--resume-context", aliases: ["--resume_context"] },
344
- { flag: "--tags", aliases: ["--tag"], list: true },
345
- { flag: "--priority" },
346
- { flag: "--body" },
347
- { flag: "--claim" },
348
- { flag: "--from-search", aliases: ["--from_search"] },
349
- { flag: "--template" },
350
- { flag: "--step-title", aliases: ["--step_title"] },
351
- // pm-6mit: --step is a Commander collect repeatable (ordered step titles on
352
- // create; single-value stepTitle alias elsewhere). It must NOT be list:true —
353
- // the bootstrap coalescer comma-joins list flags and would corrupt titles
354
- // containing commas.
355
- { flag: "--step" },
356
- { flag: "--step-body", aliases: ["--step_body"] },
357
- { flag: "--step-owner", aliases: ["--step_owner"] },
358
- { flag: "--step-status", aliases: ["--step_status"] },
359
- { flag: "--step-evidence", aliases: ["--step_evidence"] },
360
- { flag: "--step-blocked-reason", aliases: ["--step_blocked_reason"] },
361
- { flag: "--step-replacement", aliases: ["--step_replacement"] },
362
- { flag: "--depends-on", aliases: ["--depends_on"] },
363
- { flag: "--link" },
364
- { flag: "--link-kind", aliases: ["--link_kind"] },
365
- { flag: "--link-note", aliases: ["--link_note"] },
366
- { flag: "--promote-to-item-dep", aliases: ["--promote_to_item_dep"] },
367
- { flag: "--allow-multiple-active", aliases: ["--allow_multiple_active"] },
368
- { flag: "--file" },
369
- { flag: "--test" },
370
- { flag: "--doc" },
371
- { flag: "--decision-text", aliases: ["--decision_text", "--decision"] },
372
- { flag: "--decision-rationale", aliases: ["--decision_rationale"] },
373
- { flag: "--decision-evidence", aliases: ["--decision_evidence"] },
374
- { flag: "--discovery-text", aliases: ["--discovery_text", "--discovery"] },
375
- { flag: "--validation-text", aliases: ["--validation_text", "--validation"] },
376
- { flag: "--validation-command", aliases: ["--validation_command"] },
377
- { flag: "--validation-expected", aliases: ["--validation_expected"] },
378
- { flag: "--depth" },
379
- { flag: "--fields", list: true },
380
- { flag: "--steps" },
381
- { flag: "--materialize-type", aliases: ["--materialize_type"] },
382
- { flag: "--materialize-parent", aliases: ["--materialize_parent"] },
383
- { flag: "--materialize-tags", aliases: ["--materialize_tags"] },
384
- { flag: "--author" },
385
- { flag: "--message" },
386
- { flag: "--force" },
387
- ];
388
- export const INIT_FLAG_CONTRACTS = [
389
- { flag: "--preset" },
390
- { flag: "--type-preset" },
391
- { flag: "--defaults", short: "-y", aliases: ["--yes"] },
392
- { flag: "--author" },
393
- { flag: "--agent-guidance" },
394
- { flag: "--with-packages" },
395
- { flag: "--force" },
396
- { flag: "--verbose" },
397
- ];
398
- export const CONFIG_FLAG_CONTRACTS = [
399
- { flag: "--criterion" },
400
- { flag: "--clear-criteria" },
401
- { flag: "--format" },
402
- { flag: "--policy" },
403
- { flag: "--default-depth" },
404
- { flag: "--activity-limit" },
405
- { flag: "--stale-threshold-days" },
406
- { flag: "--section-hierarchy" },
407
- { flag: "--section-activity" },
408
- { flag: "--section-progress" },
409
- { flag: "--section-blockers" },
410
- { flag: "--section-files" },
411
- { flag: "--section-workload" },
412
- { flag: "--section-staleness" },
413
- { flag: "--section-tests" },
414
- ];
415
- export const EXTENSION_FLAG_CONTRACTS = [
416
- { flag: "--init" },
417
- { flag: "--scaffold" },
418
- { flag: "--capability" },
419
- { flag: "--install" },
420
- { flag: "--uninstall" },
421
- { flag: "--explore" },
422
- { flag: "--list" },
423
- { flag: "--manage" },
424
- { flag: "--describe" },
425
- { flag: "--reload" },
426
- { flag: "--watch" },
427
- { flag: "--doctor" },
428
- { flag: "--catalog" },
429
- { flag: "--adopt" },
430
- { flag: "--adopt-all" },
431
- { flag: "--activate" },
432
- { flag: "--deactivate" },
433
- { flag: "--project" },
434
- { flag: "--local" },
435
- { flag: "--global" },
436
- { flag: "--gh" },
437
- { flag: "--github" },
438
- { flag: "--ref" },
439
- { flag: "--detail" },
440
- { flag: "--trace" },
441
- { flag: "--runtime-probe" },
442
- { flag: "--fix-managed-state" },
443
- { flag: "--strict-exit" },
444
- { flag: "--fail-on-warn" },
445
- ];
446
- export const EXTENSION_SCOPE_FLAG_CONTRACTS = [
447
- { flag: "--project" },
448
- { flag: "--local" },
449
- { flag: "--global" },
450
- ];
451
- export const EXTENSION_INIT_FLAG_CONTRACTS = [
452
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
453
- { flag: "--capability" },
454
- ];
455
- export const EXTENSION_INSTALL_FLAG_CONTRACTS = [
456
- { flag: "--project" },
457
- { flag: "--local" },
458
- { flag: "--global" },
459
- { flag: "--gh" },
460
- { flag: "--github" },
461
- { flag: "--ref" },
462
- ];
463
- export const EXTENSION_UNINSTALL_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
464
- export const EXTENSION_EXPLORE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
465
- export const EXTENSION_DESCRIBE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
466
- export const EXTENSION_ADOPT_ALL_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
467
- export const EXTENSION_ACTIVATE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
468
- export const EXTENSION_DEACTIVATE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
469
- export const EXTENSION_MANAGE_FLAG_CONTRACTS = [
470
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
471
- { flag: "--runtime-probe" },
472
- { flag: "--fix-managed-state" },
473
- ];
474
- export const EXTENSION_RELOAD_FLAG_CONTRACTS = [
475
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
476
- { flag: "--watch" },
477
- ];
478
- export const EXTENSION_DOCTOR_FLAG_CONTRACTS = [
479
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
480
- { flag: "--detail" },
481
- { flag: "--trace" },
482
- { flag: "--fix-managed-state" },
483
- { flag: "--strict-exit" },
484
- { flag: "--fail-on-warn" },
485
- ];
486
- export const EXTENSION_CATALOG_FLAG_CONTRACTS = [
487
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
488
- { flag: "--fields", list: true },
489
- ];
490
- export const EXTENSION_ADOPT_FLAG_CONTRACTS = [
491
- ...EXTENSION_SCOPE_FLAG_CONTRACTS,
492
- { flag: "--gh" },
493
- { flag: "--github" },
494
- { flag: "--ref" },
495
- ];
496
- export const INSTALL_FLAG_CONTRACTS = [
497
- { flag: "--project" },
498
- { flag: "--local" },
499
- { flag: "--global" },
500
- { flag: "--gh" },
501
- { flag: "--github" },
502
- { flag: "--ref" },
503
- ];
504
- export const UPGRADE_FLAG_CONTRACTS = [
505
- { flag: "--dry-run" },
506
- { flag: "--cli-only" },
507
- { flag: "--packages-only" },
508
- { flag: "--project" },
509
- { flag: "--local" },
510
- { flag: "--global" },
511
- { flag: "--repair" },
512
- { flag: "--tag" },
513
- { flag: "--package-name" },
514
- ];
515
- export const REINDEX_FLAG_CONTRACTS = [
516
- { flag: "--mode" },
517
- { flag: "--progress" },
518
- ];
519
- export const CLOSE_FLAG_CONTRACTS = [
520
- { flag: "--reason" },
521
- { flag: "--close-reason" },
522
- { flag: "--duplicate-of" },
523
- { flag: "--author" },
524
- { flag: "--message" },
525
- { flag: "--validate-close" },
526
- // pm-fl0c #11 (2026-05-28) + Codex P2 follow-up: inline closure-validation
527
- // fields. Surface them through the contract so `pm contracts --command
528
- // close`, the JSON help payload, and bootstrap flag normalization /
529
- // suggestions all stay consistent with the commander registration.
530
- { flag: "--resolution" },
531
- { flag: "--expected-result", aliases: ["--expected_result", "--expected"] },
532
- { flag: "--actual-result", aliases: ["--actual_result", "--actual"] },
533
- { flag: "--force" },
534
- ];
535
- // close-many shares update-many's `--filter-*` scoping family and close's
536
- // inline closure-validation fields. The shared close reason is required for the
537
- // audited bulk close (each matched item routes through runClose semantics).
538
- export const CLOSE_MANY_FLAG_CONTRACTS = [
539
- { flag: "--filter-status", list: true },
540
- { flag: "--filter-type" },
541
- { flag: "--filter-tag" },
542
- { flag: "--filter-priority" },
543
- { flag: "--filter-deadline-before" },
544
- { flag: "--filter-deadline-after" },
545
- { flag: "--filter-updated-after" },
546
- { flag: "--filter-updated-before" },
547
- { flag: "--filter-created-after" },
548
- { flag: "--filter-created-before" },
549
- { flag: "--filter-assignee" },
550
- { flag: "--filter-assignee-filter" },
551
- { flag: "--filter-assignee_filter" },
552
- { flag: "--filter-parent" },
553
- { flag: "--filter-sprint" },
554
- { flag: "--filter-release" },
555
- { flag: "--filter-reviewer-missing" },
556
- { flag: "--filter-risk-missing" },
557
- { flag: "--filter-confidence-missing" },
558
- { flag: "--filter-sprint-missing" },
559
- { flag: "--filter-release-missing" },
560
- { flag: "--filter-has-notes" },
561
- { flag: "--filter-no-notes" },
562
- { flag: "--filter-has-learnings" },
563
- { flag: "--filter-no-learnings" },
564
- { flag: "--filter-has-files" },
565
- { flag: "--filter-no-files" },
566
- { flag: "--filter-has-docs" },
567
- { flag: "--filter-no-docs" },
568
- { flag: "--filter-has-tests" },
569
- { flag: "--filter-no-tests" },
570
- { flag: "--filter-has-comments" },
571
- { flag: "--filter-no-comments" },
572
- { flag: "--filter-has-deps" },
573
- { flag: "--filter-no-deps" },
574
- { flag: "--filter-has-body" },
575
- { flag: "--filter-empty-body" },
576
- { flag: "--filter-has-linked-command" },
577
- { flag: "--filter-no-linked-command" },
578
- { flag: "--ids", list: true },
579
- { flag: "--limit" },
580
- { flag: "--offset" },
581
- { flag: "--reason" },
582
- { flag: "--resolution" },
583
- { flag: "--expected-result", aliases: ["--expected_result", "--expected"] },
584
- { flag: "--actual-result", aliases: ["--actual_result", "--actual"] },
585
- { flag: "--validate-close" },
586
- { flag: "--author" },
587
- { flag: "--message" },
588
- { flag: "--force" },
589
- { flag: "--dry-run" },
590
- { flag: "--rollback" },
591
- { flag: "--no-checkpoint" },
592
- ];
593
- export const APPEND_FLAG_CONTRACTS = [
594
- { flag: "--body", short: "-b" },
595
- { flag: "--author" },
596
- { flag: "--message" },
597
- { flag: "--force" },
598
- ];
599
- export const CLAIM_FLAG_CONTRACTS = [
600
- { flag: "--author" },
601
- { flag: "--message" },
602
- { flag: "--force" },
603
- ];
604
- export const RESTORE_FLAG_CONTRACTS = [
605
- { flag: "--author" },
606
- { flag: "--message" },
607
- { flag: "--force" },
608
- ];
609
- export const DELETE_FLAG_CONTRACTS = [
610
- { flag: "--dry-run" },
611
- { flag: "--author" },
612
- { flag: "--message" },
613
- { flag: "--force" },
614
- ];
615
- export const RELEASE_FLAG_CONTRACTS = [
616
- { flag: "--author" },
617
- { flag: "--message" },
618
- { flag: "--allow-audit-release" },
619
- { flag: "--force" },
620
- ];
621
- export const START_TASK_FLAG_CONTRACTS = [
622
- { flag: "--author" },
623
- { flag: "--message" },
624
- { flag: "--force" },
625
- ];
626
- export const PAUSE_TASK_FLAG_CONTRACTS = [
627
- { flag: "--author" },
628
- { flag: "--message" },
629
- { flag: "--force" },
630
- ];
631
- export const CLOSE_TASK_FLAG_CONTRACTS = [
632
- { flag: "--author" },
633
- { flag: "--message" },
634
- { flag: "--validate-close" },
635
- { flag: "--force" },
636
- ];
637
- /** Shared create-passthrough flags for every scheduling shortcut (GH-217). */
638
- const SCHEDULING_SHORTCUT_COMMON_FLAG_CONTRACTS = [
639
- { flag: "--parent" },
640
- { flag: "--allow-missing-parent" },
641
- { flag: "--tags" },
642
- { flag: "--priority" },
643
- { flag: "--body" },
644
- { flag: "--description" },
645
- { flag: "--author" },
646
- { flag: "--message" },
647
- ];
648
- export const MEET_FLAG_CONTRACTS = [
649
- { flag: "--start" },
650
- { flag: "--duration" },
651
- { flag: "--end" },
652
- { flag: "--location" },
653
- { flag: "--timezone" },
654
- { flag: "--all-day" },
655
- ...SCHEDULING_SHORTCUT_COMMON_FLAG_CONTRACTS,
656
- ];
657
- export const EVENT_FLAG_CONTRACTS = MEET_FLAG_CONTRACTS;
658
- export const REMIND_FLAG_CONTRACTS = [
659
- { flag: "--at" },
660
- { flag: "--text" },
661
- ...SCHEDULING_SHORTCUT_COMMON_FLAG_CONTRACTS,
662
- ];
663
- export const TEST_FLAG_CONTRACTS = [
664
- { flag: "--add" },
665
- { flag: "--add-json" },
666
- { flag: "--remove" },
667
- { flag: "--run" },
668
- { flag: "--match" },
669
- { flag: "--only-index" },
670
- { flag: "--only-last" },
671
- { flag: "--background" },
672
- { flag: "--timeout" },
673
- { flag: "--progress" },
674
- { flag: "--env-set" },
675
- { flag: "--env-clear" },
676
- { flag: "--shared-host-safe" },
677
- { flag: "--pm-context" },
678
- { flag: "--override-linked-pm-context" },
679
- { flag: "--fail-on-context-mismatch" },
680
- { flag: "--fail-on-skipped" },
681
- { flag: "--fail-on-empty-test-run" },
682
- { flag: "--require-assertions-for-pm" },
683
- { flag: "--check-context" },
684
- { flag: "--auto-pm-context" },
685
- { flag: "--author" },
686
- { flag: "--message" },
687
- { flag: "--force" },
688
- ];
689
- export const TEST_ALL_FLAG_CONTRACTS = [
690
- { flag: "--status" },
691
- { flag: "--limit" },
692
- { flag: "--offset" },
693
- { flag: "--background" },
694
- { flag: "--timeout" },
695
- { flag: "--progress" },
696
- { flag: "--env-set" },
697
- { flag: "--env-clear" },
698
- { flag: "--shared-host-safe" },
699
- { flag: "--pm-context" },
700
- { flag: "--override-linked-pm-context" },
701
- { flag: "--fail-on-context-mismatch" },
702
- { flag: "--fail-on-skipped" },
703
- { flag: "--fail-on-empty-test-run" },
704
- { flag: "--require-assertions-for-pm" },
705
- { flag: "--check-context" },
706
- { flag: "--auto-pm-context" },
707
- ];
708
- export const TELEMETRY_FLAG_CONTRACTS = [
709
- { flag: "--limit" },
710
- ];
711
- export const TEST_RUNS_FLAG_CONTRACTS = [
712
- { flag: "--status" },
713
- { flag: "--limit" },
714
- { flag: "--stream" },
715
- { flag: "--tail" },
716
- { flag: "--force" },
717
- { flag: "--author" },
718
- ];
719
- export const GC_FLAG_CONTRACTS = [
720
- { flag: "--dry-run" },
721
- { flag: "--scope" },
722
- ];
723
- export const STATS_FLAG_CONTRACTS = [
724
- { flag: "--storage" },
725
- { flag: "--metadata-coverage" },
726
- { flag: "--field-utilization" },
727
- { flag: "--by-assignee" },
728
- { flag: "--by-tag" },
729
- { flag: "--by-priority" },
730
- { flag: "--tag-prefix" },
731
- ];
732
- export const HEALTH_FLAG_CONTRACTS = [
733
- { flag: "--strict-directories" },
734
- { flag: "--strict-exit" },
735
- { flag: "--fail-on-warn" },
736
- { flag: "--check-only" },
737
- { flag: "--check-telemetry" },
738
- { flag: "--no-refresh" },
739
- { flag: "--refresh-vectors" },
740
- { flag: "--verbose-stale-items" },
741
- { flag: "--brief" },
742
- { flag: "--summary" },
743
- { flag: "--skip-vectors" },
744
- { flag: "--skip-integrity" },
745
- { flag: "--skip-drift" },
746
- { flag: "--full" },
747
- ];
748
- export const VALIDATE_FLAG_CONTRACTS = [
749
- { flag: "--check-metadata" },
750
- { flag: "--metadata-profile" },
751
- { flag: "--check-resolution" },
752
- { flag: "--check-lifecycle" },
753
- { flag: "--check-stale-blockers" },
754
- { flag: "--dependency-cycle-severity" },
755
- { flag: "--parent-cycle-severity" },
756
- { flag: "--check-files" },
757
- { flag: "--scan-mode" },
758
- { flag: "--include-pm-internals" },
759
- { flag: "--verbose-file-lists" },
760
- { flag: "--verbose-diagnostics" },
761
- { flag: "--all-affected-ids" },
762
- { flag: "--strict-exit" },
763
- { flag: "--fail-on-warn" },
764
- { flag: "--fix-hints" },
765
- { flag: "--auto-fix" },
766
- { flag: "--dry-run" },
767
- // NOT list:true — repeatable via Commander's collector; the bootstrap
768
- // coalescer must not comma-join occurrences (values may also be
769
- // comma-separated lists which the resolver splits itself).
770
- { flag: "--fix-scope" },
771
- { flag: "--prune-missing" },
772
- { flag: "--check-history-drift" },
773
- { flag: "--check-command-references" },
774
- ];
775
- export const CREATE_FLAG_CONTRACTS = [
776
- { short: "-t", flag: "--title" },
777
- { short: "-d", flag: "--description" },
778
- { flag: "--type" },
779
- { flag: "--template" },
780
- { flag: "--create-mode" },
781
- { flag: "--create_mode" },
782
- { flag: "--schedule-preset" },
783
- { flag: "--schedule_preset" },
784
- { short: "-s", flag: "--status" },
785
- { short: "-p", flag: "--priority" },
786
- { flag: "--tags", aliases: ["--tag"], list: true },
787
- // NOT list:true — these use Commander's repeatable collector. Marking them
788
- // list:true would make the bootstrap coalescer comma-join repeated
789
- // occurrences (`--add-tags '["a","b"]' --add-tags c` -> `["a","b"],c`),
790
- // corrupting the JSON-array value form before parseTags sees it.
791
- { flag: "--add-tags", aliases: ["--add_tags"] },
792
- { short: "-b", flag: "--body" },
793
- { flag: "--body-file" },
794
- { flag: "--deadline" },
795
- { flag: "--estimate" },
796
- { flag: "--estimated-minutes" },
797
- { flag: "--estimated_minutes" },
798
- { flag: "--acceptance-criteria" },
799
- { flag: "--acceptance_criteria" },
800
- { flag: "--ac" },
801
- { flag: "--author" },
802
- { flag: "--message" },
803
- { flag: "--assignee" },
804
- { flag: "--parent" },
805
- { flag: "--allow-missing-parent" },
806
- { flag: "--reviewer" },
807
- { flag: "--risk" },
808
- { flag: "--confidence" },
809
- { flag: "--sprint" },
810
- { flag: "--release" },
811
- { flag: "--blocked-by" },
812
- { flag: "--blocked-reason" },
813
- { flag: "--unblock-note" },
814
- { flag: "--reporter" },
815
- { flag: "--severity" },
816
- { flag: "--environment" },
817
- { flag: "--repro-steps" },
818
- { flag: "--resolution" },
819
- { flag: "--expected-result" },
820
- { flag: "--actual-result" },
821
- { flag: "--affected-version" },
822
- { flag: "--fixed-version" },
823
- { flag: "--component" },
824
- { flag: "--regression" },
825
- { flag: "--customer-impact" },
826
- { flag: "--customer_impact" },
827
- { flag: "--definition-of-ready" },
828
- { flag: "--definition_of_ready" },
829
- { flag: "--order" },
830
- { flag: "--rank" },
831
- { flag: "--goal" },
832
- { flag: "--objective" },
833
- { flag: "--value" },
834
- { flag: "--impact" },
835
- { flag: "--outcome" },
836
- { flag: "--why-now" },
837
- { flag: "--why_now" },
838
- { flag: "--blocked_by" },
839
- { flag: "--blocked_reason" },
840
- { flag: "--unblock_note" },
841
- { flag: "--repro_steps" },
842
- { flag: "--expected_result" },
843
- { flag: "--actual_result" },
844
- { flag: "--expected" },
845
- { flag: "--actual" },
846
- { flag: "--affected_version" },
847
- { flag: "--fixed_version" },
848
- { flag: "--dep" },
849
- { flag: "--type-option" },
850
- { flag: "--type_option" },
851
- { flag: "--field" },
852
- { flag: "--reminder" },
853
- { flag: "--event" },
854
- { flag: "--comment" },
855
- { flag: "--note" },
856
- { flag: "--learning" },
857
- { flag: "--file" },
858
- { flag: "--test" },
859
- { flag: "--doc" },
860
- { flag: "--unset" },
861
- { flag: "--clear-deps" },
862
- { flag: "--clear-comments" },
863
- { flag: "--clear-notes" },
864
- { flag: "--clear-learnings" },
865
- { flag: "--clear-files" },
866
- { flag: "--clear-tests" },
867
- { flag: "--clear-docs" },
868
- { flag: "--clear-reminders" },
869
- { flag: "--clear-events" },
870
- { flag: "--clear-type-options" },
871
- ];
872
- export const COPY_FLAG_CONTRACTS = [
873
- { flag: "--title" },
874
- { flag: "--author" },
875
- { flag: "--message" },
876
- ];
877
- export const FOCUS_FLAG_CONTRACTS = [
878
- { flag: "--clear" },
879
- ];
880
- export const UPDATE_FLAG_CONTRACTS = [
881
- { short: "-t", flag: "--title" },
882
- { short: "-d", flag: "--description" },
883
- { short: "-b", flag: "--body" },
884
- { flag: "--body-file" },
885
- { short: "-s", flag: "--status" },
886
- { flag: "--close-reason" },
887
- { flag: "--close_reason" },
888
- { short: "-p", flag: "--priority" },
889
- { flag: "--type" },
890
- { flag: "--tags", aliases: ["--tag"], list: true },
891
- // NOT list:true — Commander's repeatable collector accumulates these, so
892
- // bootstrap coalescing must not comma-join repeated occurrences (it would
893
- // corrupt JSON-array values like `--add-tags '["a","b"]' --add-tags c`).
894
- { flag: "--add-tags", aliases: ["--add_tags"] },
895
- { flag: "--remove-tags", aliases: ["--remove_tags"] },
896
- { flag: "--deadline" },
897
- { flag: "--estimate" },
898
- { flag: "--estimated-minutes" },
899
- { flag: "--estimated_minutes" },
900
- { flag: "--acceptance-criteria" },
901
- { flag: "--acceptance_criteria" },
902
- { flag: "--ac" },
903
- { flag: "--assignee" },
904
- { flag: "--parent" },
905
- { flag: "--reviewer" },
906
- { flag: "--risk" },
907
- { flag: "--confidence" },
908
- { flag: "--sprint" },
909
- { flag: "--release" },
910
- { flag: "--blocked-by" },
911
- { flag: "--blocked-reason" },
912
- { flag: "--unblock-note" },
913
- { flag: "--reporter" },
914
- { flag: "--severity" },
915
- { flag: "--environment" },
916
- { flag: "--repro-steps" },
917
- { flag: "--resolution" },
918
- { flag: "--expected-result" },
919
- { flag: "--actual-result" },
920
- { flag: "--affected-version" },
921
- { flag: "--fixed-version" },
922
- { flag: "--fixed_version" },
923
- { flag: "--component" },
924
- { flag: "--regression" },
925
- { flag: "--customer-impact" },
926
- { flag: "--customer_impact" },
927
- { flag: "--definition-of-ready" },
928
- { flag: "--definition_of_ready" },
929
- { flag: "--order" },
930
- { flag: "--rank" },
931
- { flag: "--goal" },
932
- { flag: "--objective" },
933
- { flag: "--value" },
934
- { flag: "--impact" },
935
- { flag: "--outcome" },
936
- { flag: "--why-now" },
937
- { flag: "--why_now" },
938
- { flag: "--author" },
939
- { flag: "--message" },
940
- { flag: "--blocked_by" },
941
- { flag: "--blocked_reason" },
942
- { flag: "--unblock_note" },
943
- { flag: "--repro_steps" },
944
- { flag: "--expected_result" },
945
- { flag: "--actual_result" },
946
- { flag: "--expected" },
947
- { flag: "--actual" },
948
- { flag: "--affected_version" },
949
- { flag: "--dep" },
950
- { flag: "--dep-remove" },
951
- { flag: "--dep_remove" },
952
- { flag: "--replace-deps" },
953
- { flag: "--replace-tests" },
954
- { flag: "--comment" },
955
- { flag: "--note" },
956
- { flag: "--learning" },
957
- { flag: "--file" },
958
- { flag: "--test" },
959
- { flag: "--doc" },
960
- { flag: "--reminder" },
961
- { flag: "--event" },
962
- { flag: "--type-option" },
963
- { flag: "--type_option" },
964
- { flag: "--field" },
965
- { flag: "--unset" },
966
- { flag: "--clear-deps" },
967
- { flag: "--clear-comments" },
968
- { flag: "--clear-notes" },
969
- { flag: "--clear-learnings" },
970
- { flag: "--clear-files" },
971
- { flag: "--clear-tests" },
972
- { flag: "--clear-docs" },
973
- { flag: "--clear-reminders" },
974
- { flag: "--clear-events" },
975
- { flag: "--clear-type-options" },
976
- { flag: "--allow-audit-update" },
977
- { flag: "--allow_audit_update" },
978
- { flag: "--allow-audit-dep-update" },
979
- { flag: "--allow_audit_dep_update" },
980
- { flag: "--force" },
981
- ];
982
- export const UPDATE_MANY_FLAG_CONTRACTS = [
983
- { flag: "--filter-status" },
984
- { flag: "--filter-type" },
985
- { flag: "--filter-tag" },
986
- { flag: "--filter-priority" },
987
- { flag: "--filter-deadline-before" },
988
- { flag: "--filter-deadline-after" },
989
- { flag: "--filter-updated-after" },
990
- { flag: "--filter-updated-before" },
991
- { flag: "--filter-created-after" },
992
- { flag: "--filter-created-before" },
993
- { flag: "--filter-assignee" },
994
- { flag: "--filter-assignee-filter" },
995
- { flag: "--filter-assignee_filter" },
996
- { flag: "--filter-parent" },
997
- { flag: "--filter-sprint" },
998
- { flag: "--filter-release" },
999
- { flag: "--filter-ac-missing" },
1000
- { flag: "--filter-estimates-missing", aliases: ["--filter-estimate-missing"] },
1001
- { flag: "--filter-resolution-missing" },
1002
- { flag: "--filter-metadata-missing" },
1003
- { flag: "--filter-reviewer-missing" },
1004
- { flag: "--filter-risk-missing" },
1005
- { flag: "--filter-confidence-missing" },
1006
- { flag: "--filter-sprint-missing" },
1007
- { flag: "--filter-release-missing" },
1008
- { flag: "--filter-has-notes" },
1009
- { flag: "--filter-no-notes" },
1010
- { flag: "--filter-has-learnings" },
1011
- { flag: "--filter-no-learnings" },
1012
- { flag: "--filter-has-files" },
1013
- { flag: "--filter-no-files" },
1014
- { flag: "--filter-has-docs" },
1015
- { flag: "--filter-no-docs" },
1016
- { flag: "--filter-has-tests" },
1017
- { flag: "--filter-no-tests" },
1018
- { flag: "--filter-has-comments" },
1019
- { flag: "--filter-no-comments" },
1020
- { flag: "--filter-has-deps" },
1021
- { flag: "--filter-no-deps" },
1022
- { flag: "--filter-has-body" },
1023
- { flag: "--filter-empty-body" },
1024
- { flag: "--filter-has-linked-command" },
1025
- { flag: "--filter-no-linked-command" },
1026
- { flag: "--ids", list: true },
1027
- { flag: "--limit" },
1028
- { flag: "--offset" },
1029
- { flag: "--dry-run" },
1030
- { flag: "--rollback" },
1031
- { flag: "--no-checkpoint" },
1032
- { short: "-t", flag: "--title" },
1033
- { short: "-d", flag: "--description" },
1034
- { short: "-b", flag: "--body" },
1035
- { short: "-p", flag: "--priority" },
1036
- { flag: "--type" },
1037
- { flag: "--tags", aliases: ["--tag"], list: true },
1038
- // NOT list:true — Commander's repeatable collector accumulates these, so
1039
- // bootstrap coalescing must not comma-join repeated occurrences (it would
1040
- // corrupt JSON-array values like `--add-tags '["a","b"]' --add-tags c`).
1041
- { flag: "--add-tags", aliases: ["--add_tags"] },
1042
- { flag: "--remove-tags", aliases: ["--remove_tags"] },
1043
- { flag: "--deadline" },
1044
- { flag: "--estimate" },
1045
- { flag: "--estimated-minutes" },
1046
- { flag: "--estimated_minutes" },
1047
- { flag: "--acceptance-criteria" },
1048
- { flag: "--acceptance_criteria" },
1049
- { flag: "--ac" },
1050
- { flag: "--definition-of-ready" },
1051
- { flag: "--definition_of_ready" },
1052
- { flag: "--order" },
1053
- { flag: "--rank" },
1054
- { flag: "--goal" },
1055
- { flag: "--objective" },
1056
- { flag: "--value" },
1057
- { flag: "--impact" },
1058
- { flag: "--outcome" },
1059
- { flag: "--why-now" },
1060
- { flag: "--why_now" },
1061
- { flag: "--reviewer" },
1062
- { flag: "--risk" },
1063
- { flag: "--confidence" },
1064
- { flag: "--sprint" },
1065
- { flag: "--release" },
1066
- { flag: "--reporter" },
1067
- { flag: "--severity" },
1068
- { flag: "--environment" },
1069
- { flag: "--repro-steps" },
1070
- { flag: "--repro_steps" },
1071
- { flag: "--resolution" },
1072
- { flag: "--expected-result" },
1073
- { flag: "--expected_result" },
1074
- { flag: "--expected" },
1075
- { flag: "--actual-result" },
1076
- { flag: "--actual_result" },
1077
- { flag: "--actual" },
1078
- { flag: "--affected-version" },
1079
- { flag: "--affected_version" },
1080
- { flag: "--fixed-version" },
1081
- { flag: "--fixed_version" },
1082
- { flag: "--component" },
1083
- { flag: "--regression" },
1084
- { flag: "--customer-impact" },
1085
- { flag: "--customer_impact" },
1086
- { flag: "--dep" },
1087
- { flag: "--dep-remove" },
1088
- { flag: "--dep_remove" },
1089
- { flag: "--replace-deps" },
1090
- { flag: "--replace-tests" },
1091
- { flag: "--comment" },
1092
- { flag: "--note" },
1093
- { flag: "--learning" },
1094
- { flag: "--file" },
1095
- { flag: "--test" },
1096
- { flag: "--doc" },
1097
- { flag: "--reminder" },
1098
- { flag: "--event" },
1099
- { flag: "--type-option" },
1100
- { flag: "--type_option" },
1101
- { flag: "--unset" },
1102
- { flag: "--clear-deps" },
1103
- { flag: "--clear-comments" },
1104
- { flag: "--clear-notes" },
1105
- { flag: "--clear-learnings" },
1106
- { flag: "--clear-files" },
1107
- { flag: "--clear-tests" },
1108
- { flag: "--clear-docs" },
1109
- { flag: "--clear-reminders" },
1110
- { flag: "--clear-events" },
1111
- { flag: "--clear-type-options" },
1112
- { flag: "--allow-audit-update" },
1113
- { flag: "--allow_audit_update" },
1114
- { flag: "--allow-audit-dep-update" },
1115
- { flag: "--allow_audit_dep_update" },
1116
- { flag: "--author" },
1117
- { flag: "--message" },
1118
- { flag: "--force" },
1119
- ];
1120
- export const NORMALIZE_FLAG_CONTRACTS = [
1121
- { flag: "--filter-status" },
1122
- { flag: "--filter-type" },
1123
- { flag: "--filter-tag" },
1124
- { flag: "--filter-priority" },
1125
- { flag: "--filter-deadline-before" },
1126
- { flag: "--filter-deadline-after" },
1127
- { flag: "--filter-assignee" },
1128
- { flag: "--filter-assignee-filter" },
1129
- { flag: "--filter-assignee_filter" },
1130
- { flag: "--filter-parent" },
1131
- { flag: "--filter-sprint" },
1132
- { flag: "--filter-release" },
1133
- { flag: "--limit" },
1134
- { flag: "--offset" },
1135
- { flag: "--dry-run" },
1136
- { flag: "--apply" },
1137
- { flag: "--author" },
1138
- { flag: "--message" },
1139
- { flag: "--allow-audit-update" },
1140
- { flag: "--allow_audit_update" },
1141
- { flag: "--force" },
1142
- ];
1143
- export const CALENDAR_FLAG_CONTRACTS = [
1144
- { flag: "--view" },
1145
- { flag: "--date" },
1146
- { flag: "--from" },
1147
- { flag: "--to" },
1148
- { flag: "--past" },
1149
- { flag: "--full-period" },
1150
- { flag: "--full_period" },
1151
- { flag: "--type" },
1152
- { flag: "--tag" },
1153
- { flag: "--priority" },
1154
- { flag: "--status" },
1155
- { flag: "--assignee" },
1156
- { flag: "--assignee-filter" },
1157
- { flag: "--assignee_filter" },
1158
- { flag: "--sprint" },
1159
- { flag: "--release" },
1160
- { flag: "--include" },
1161
- { flag: "--recurrence-lookahead-days" },
1162
- { flag: "--recurrence-lookback-days" },
1163
- { flag: "--occurrence-limit" },
1164
- { flag: "--limit" },
1165
- { flag: "--format" },
1166
- ];
1167
- export const ACTIVITY_FLAG_CONTRACTS = [
1168
- { flag: "--id" },
1169
- { flag: "--op" },
1170
- { flag: "--author" },
1171
- { flag: "--from" },
1172
- { flag: "--to" },
1173
- { flag: "--limit" },
1174
- { flag: "--compact" },
1175
- { flag: "--full" },
1176
- { flag: "--stream" },
1177
- ];
1178
- export const CONTEXT_FLAG_CONTRACTS = [
1179
- { flag: "--date" },
1180
- { flag: "--from" },
1181
- { flag: "--to" },
1182
- { flag: "--past" },
1183
- { flag: "--type" },
1184
- { flag: "--tag" },
1185
- { flag: "--priority" },
1186
- { flag: "--assignee" },
1187
- { flag: "--assignee-filter" },
1188
- { flag: "--assignee_filter" },
1189
- { flag: "--sprint" },
1190
- { flag: "--release" },
1191
- { flag: "--parent" },
1192
- { flag: "--limit" },
1193
- { flag: "--format" },
1194
- { flag: "--depth" },
1195
- { flag: "--fields", list: true },
1196
- { flag: "--section" },
1197
- { flag: "--activity-limit" },
1198
- { flag: "--stale-threshold" },
1199
- ];
1200
- export const GET_FLAG_CONTRACTS = [
1201
- { flag: "--depth" },
1202
- { flag: "--full" },
1203
- { flag: "--fields", list: true },
1204
- { flag: "--tree" },
1205
- { flag: "--tree-depth" },
1206
- { flag: "--tree_depth" },
1207
- { flag: "--format" },
1208
- ];
1209
- export const GUIDE_FLAG_CONTRACTS = [
1210
- { flag: "--list" },
1211
- { flag: "--format" },
1212
- { flag: "--depth" },
1213
- ];
1214
- export const DEPS_FLAG_CONTRACTS = [
1215
- { flag: "--format" },
1216
- { flag: "--max-depth" },
1217
- { flag: "--collapse" },
1218
- { flag: "--summary" },
1219
- ];
1220
- export const EVAL_FLAG_CONTRACTS = [
1221
- { flag: "--mode" },
1222
- { flag: "--k" },
1223
- { flag: "--fail-under" },
1224
- { flag: "--queries" },
1225
- { flag: "--format" },
1226
- ];
1227
- export const SEARCH_FLAG_CONTRACTS = [
1228
- { flag: "--mode" },
1229
- { flag: "--semantic" },
1230
- { flag: "--hybrid" },
1231
- { flag: "--match-mode" },
1232
- { flag: "--min-score" },
1233
- { flag: "--count" },
1234
- { flag: "--semantic-weight" },
1235
- { flag: "--include-linked" },
1236
- { flag: "--title-exact" },
1237
- { flag: "--phrase-exact" },
1238
- { flag: "--highlight" },
1239
- { flag: "--compact" },
1240
- { flag: "--full" },
1241
- { flag: "--fields", list: true },
1242
- { flag: "--format" },
1243
- { flag: "--limit" },
1244
- { flag: "--status", list: true },
1245
- { flag: "--type" },
1246
- { flag: "--tag", aliases: ["--tags"] },
1247
- { flag: "--priority" },
1248
- { flag: "--deadline-before" },
1249
- { flag: "--deadline-after" },
1250
- { flag: "--updated-after" },
1251
- { flag: "--updated-before" },
1252
- { flag: "--created-after" },
1253
- { flag: "--created-before" },
1254
- { flag: "--assignee" },
1255
- { flag: "--sprint" },
1256
- { flag: "--release" },
1257
- { flag: "--parent" },
1258
- { flag: "--filter-reviewer-missing" },
1259
- { flag: "--filter-risk-missing" },
1260
- { flag: "--filter-confidence-missing" },
1261
- { flag: "--filter-sprint-missing" },
1262
- { flag: "--filter-release-missing" },
1263
- { flag: "--has-notes" },
1264
- { flag: "--no-notes" },
1265
- { flag: "--has-learnings" },
1266
- { flag: "--no-learnings" },
1267
- { flag: "--has-files" },
1268
- { flag: "--no-files" },
1269
- { flag: "--has-docs" },
1270
- { flag: "--no-docs" },
1271
- { flag: "--has-tests" },
1272
- { flag: "--no-tests" },
1273
- { flag: "--has-comments" },
1274
- { flag: "--no-comments" },
1275
- { flag: "--has-deps" },
1276
- { flag: "--no-deps" },
1277
- { flag: "--has-body" },
1278
- { flag: "--empty-body" },
1279
- { flag: "--has-linked-command" },
1280
- { flag: "--no-linked-command" },
1281
- ];
1282
- export const CONTRACTS_FLAG_CONTRACTS = [
1283
- { flag: "--action" },
1284
- { flag: "--command" },
1285
- { flag: "--schema-only" },
1286
- { flag: "--flags-only" },
1287
- { flag: "--availability-only" },
1288
- { flag: "--runtime-only" },
1289
- { flag: "--active-only" },
1290
- { flag: "--full" },
1291
- ];
1292
- export const COMPLETION_FLAG_CONTRACTS = [
1293
- { flag: "--eager-tags" },
1294
- ];
1295
- function toUniqueFlagContracts(contracts) {
1296
- const seen = new Set();
1297
- const unique = [];
1298
- for (const contract of contracts) {
1299
- const aliasKey = (contract.aliases ?? []).join(",");
1300
- const key = `${contract.flag}|${contract.short ?? ""}|${aliasKey}`;
1301
- if (seen.has(key)) {
1302
- continue;
1303
- }
1304
- seen.add(key);
1305
- unique.push(contract);
1306
- }
1307
- return unique;
1308
- }
1309
- function withSubcommandGlobalFlags(contracts) {
1310
- return withFlagAliasMetadata(toUniqueFlagContracts([...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, ...contracts]));
1311
- }
1312
- const LIST_COMMAND_NAME_CONTRACTS = new Set([
1313
- "list",
1314
- "list-all",
1315
- "list-draft",
1316
- "list-open",
1317
- "list-in-progress",
1318
- "list-blocked",
1319
- "list-closed",
1320
- "list-canceled",
1321
- ]);
1322
- const NO_SURFACE_COMMAND_NAME_CONTRACTS = new Set([
1323
- "reindex",
1324
- "help",
1325
- ]);
1326
- function normalizeCommandNameForContracts(commandName) {
1327
- if (typeof commandName !== "string") {
1328
- return "";
1329
- }
1330
- return commandName.trim().toLowerCase();
1331
- }
1332
- /**
1333
- * Implements resolve subcommand flag contracts for command for the public runtime surface of this module.
1334
- */
1335
- export function resolveSubcommandFlagContractsForCommand(commandName) {
1336
- const normalized = normalizeCommandNameForContracts(commandName);
1337
- if (normalized.length === 0) {
1338
- return withSubcommandGlobalFlags([]);
1339
- }
1340
- if (LIST_COMMAND_NAME_CONTRACTS.has(normalized)) {
1341
- return withSubcommandGlobalFlags(LIST_FILTER_FLAG_CONTRACTS);
1342
- }
1343
- if (NO_SURFACE_COMMAND_NAME_CONTRACTS.has(normalized)) {
1344
- return withSubcommandGlobalFlags([]);
1345
- }
1346
- if (normalized === "templates") {
1347
- return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
1348
- }
1349
- if (normalized === "cal") {
1350
- return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
1351
- }
1352
- if (normalized === "ctx") {
1353
- return withSubcommandGlobalFlags(CONTEXT_FLAG_CONTRACTS);
1354
- }
1355
- if (normalized === "test-runs-worker") {
1356
- return withSubcommandGlobalFlags(TEST_RUNS_FLAG_CONTRACTS);
1357
- }
1358
- const [rootCommand, lifecycleSubcommand, ...extraParts] = normalized.split(/\s+/);
1359
- if ((rootCommand === "extension" || rootCommand === "package" || rootCommand === "packages") &&
1360
- lifecycleSubcommand &&
1361
- extraParts.length === 0) {
1362
- switch (lifecycleSubcommand) {
1363
- case "init":
1364
- return withSubcommandGlobalFlags(EXTENSION_INIT_FLAG_CONTRACTS);
1365
- case "install":
1366
- return withSubcommandGlobalFlags(EXTENSION_INSTALL_FLAG_CONTRACTS);
1367
- case "uninstall":
1368
- return withSubcommandGlobalFlags(EXTENSION_UNINSTALL_FLAG_CONTRACTS);
1369
- case "explore":
1370
- return withSubcommandGlobalFlags(EXTENSION_EXPLORE_FLAG_CONTRACTS);
1371
- case "manage":
1372
- return withSubcommandGlobalFlags(EXTENSION_MANAGE_FLAG_CONTRACTS);
1373
- case "describe":
1374
- return withSubcommandGlobalFlags(EXTENSION_DESCRIBE_FLAG_CONTRACTS);
1375
- case "reload":
1376
- return withSubcommandGlobalFlags(EXTENSION_RELOAD_FLAG_CONTRACTS);
1377
- case "doctor":
1378
- return withSubcommandGlobalFlags(EXTENSION_DOCTOR_FLAG_CONTRACTS);
1379
- case "catalog":
1380
- return withSubcommandGlobalFlags(EXTENSION_CATALOG_FLAG_CONTRACTS);
1381
- case "adopt":
1382
- return withSubcommandGlobalFlags(EXTENSION_ADOPT_FLAG_CONTRACTS);
1383
- case "adopt-all":
1384
- return withSubcommandGlobalFlags(EXTENSION_ADOPT_ALL_FLAG_CONTRACTS);
1385
- case "activate":
1386
- return withSubcommandGlobalFlags(EXTENSION_ACTIVATE_FLAG_CONTRACTS);
1387
- case "deactivate":
1388
- return withSubcommandGlobalFlags(EXTENSION_DEACTIVATE_FLAG_CONTRACTS);
1389
- default:
1390
- return withSubcommandGlobalFlags([]);
1391
- }
1392
- }
1393
- switch (normalized) {
1394
- case "init":
1395
- return withSubcommandGlobalFlags(INIT_FLAG_CONTRACTS);
1396
- case "config":
1397
- return withSubcommandGlobalFlags(CONFIG_FLAG_CONTRACTS);
1398
- case "extension":
1399
- case "package":
1400
- case "packages":
1401
- return withSubcommandGlobalFlags(EXTENSION_FLAG_CONTRACTS);
1402
- case "install":
1403
- return withSubcommandGlobalFlags(INSTALL_FLAG_CONTRACTS);
1404
- case "upgrade":
1405
- return withSubcommandGlobalFlags(UPGRADE_FLAG_CONTRACTS);
1406
- case "create":
1407
- return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
1408
- case "copy":
1409
- return withSubcommandGlobalFlags(COPY_FLAG_CONTRACTS);
1410
- case "focus":
1411
- return withSubcommandGlobalFlags(FOCUS_FLAG_CONTRACTS);
1412
- case "aggregate":
1413
- return withSubcommandGlobalFlags(AGGREGATE_FLAG_CONTRACTS);
1414
- case "calendar":
1415
- return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
1416
- case "context":
1417
- return withSubcommandGlobalFlags(CONTEXT_FLAG_CONTRACTS);
1418
- case "get":
1419
- return withSubcommandGlobalFlags(GET_FLAG_CONTRACTS);
1420
- case "search":
1421
- return withSubcommandGlobalFlags(SEARCH_FLAG_CONTRACTS);
1422
- case "eval":
1423
- return withSubcommandGlobalFlags(EVAL_FLAG_CONTRACTS);
1424
- case "history":
1425
- return withSubcommandGlobalFlags(HISTORY_FLAG_CONTRACTS);
1426
- case "history-redact":
1427
- return withSubcommandGlobalFlags(HISTORY_REDACT_FLAG_CONTRACTS);
1428
- case "history-repair":
1429
- return withSubcommandGlobalFlags(HISTORY_REPAIR_FLAG_CONTRACTS);
1430
- case "history-compact":
1431
- return withSubcommandGlobalFlags(HISTORY_COMPACT_FLAG_CONTRACTS);
1432
- case "schema":
1433
- return withSubcommandGlobalFlags(SCHEMA_FLAG_CONTRACTS);
1434
- case "plan":
1435
- return withSubcommandGlobalFlags(PLAN_FLAG_CONTRACTS);
1436
- case "activity":
1437
- return withSubcommandGlobalFlags(ACTIVITY_FLAG_CONTRACTS);
1438
- case "restore":
1439
- return withSubcommandGlobalFlags(RESTORE_FLAG_CONTRACTS);
1440
- case "update":
1441
- return withSubcommandGlobalFlags(UPDATE_FLAG_CONTRACTS);
1442
- case "update-many":
1443
- return withSubcommandGlobalFlags(UPDATE_MANY_FLAG_CONTRACTS);
1444
- case "close":
1445
- return withSubcommandGlobalFlags(CLOSE_FLAG_CONTRACTS);
1446
- case "close-many":
1447
- return withSubcommandGlobalFlags(CLOSE_MANY_FLAG_CONTRACTS);
1448
- case "delete":
1449
- return withSubcommandGlobalFlags(DELETE_FLAG_CONTRACTS);
1450
- case "append":
1451
- return withSubcommandGlobalFlags(APPEND_FLAG_CONTRACTS);
1452
- case "comments":
1453
- return withSubcommandGlobalFlags(COMMENTS_FLAG_CONTRACTS);
1454
- case "notes":
1455
- return withSubcommandGlobalFlags(NOTES_FLAG_CONTRACTS);
1456
- case "learnings":
1457
- return withSubcommandGlobalFlags(LEARNINGS_FLAG_CONTRACTS);
1458
- case "files":
1459
- return withSubcommandGlobalFlags(FILES_FLAG_CONTRACTS);
1460
- case "docs":
1461
- return withSubcommandGlobalFlags(DOCS_FLAG_CONTRACTS);
1462
- case "deps":
1463
- return withSubcommandGlobalFlags(DEPS_FLAG_CONTRACTS);
1464
- case "test":
1465
- return withSubcommandGlobalFlags(TEST_FLAG_CONTRACTS);
1466
- case "test-all":
1467
- return withSubcommandGlobalFlags(TEST_ALL_FLAG_CONTRACTS);
1468
- case "telemetry":
1469
- return withSubcommandGlobalFlags(TELEMETRY_FLAG_CONTRACTS);
1470
- case "health":
1471
- return withSubcommandGlobalFlags(HEALTH_FLAG_CONTRACTS);
1472
- case "validate":
1473
- return withSubcommandGlobalFlags(VALIDATE_FLAG_CONTRACTS);
1474
- case "gc":
1475
- return withSubcommandGlobalFlags(GC_FLAG_CONTRACTS);
1476
- case "stats":
1477
- return withSubcommandGlobalFlags(STATS_FLAG_CONTRACTS);
1478
- case "contracts":
1479
- return withSubcommandGlobalFlags(CONTRACTS_FLAG_CONTRACTS);
1480
- case "claim":
1481
- return withSubcommandGlobalFlags(CLAIM_FLAG_CONTRACTS);
1482
- case "release":
1483
- return withSubcommandGlobalFlags(RELEASE_FLAG_CONTRACTS);
1484
- case "start-task":
1485
- return withSubcommandGlobalFlags(START_TASK_FLAG_CONTRACTS);
1486
- case "pause-task":
1487
- return withSubcommandGlobalFlags(PAUSE_TASK_FLAG_CONTRACTS);
1488
- case "close-task":
1489
- return withSubcommandGlobalFlags(CLOSE_TASK_FLAG_CONTRACTS);
1490
- case "meet":
1491
- return withSubcommandGlobalFlags(MEET_FLAG_CONTRACTS);
1492
- case "event":
1493
- return withSubcommandGlobalFlags(EVENT_FLAG_CONTRACTS);
1494
- case "remind":
1495
- return withSubcommandGlobalFlags(REMIND_FLAG_CONTRACTS);
1496
- default:
1497
- return withSubcommandGlobalFlags([]);
1498
- }
1499
- }
1500
- /**
1501
- * Implements to completion flag string for the public runtime surface of this module.
1502
- */
1503
- export function toCompletionFlagString(flagContracts, includeGlobal = true) {
1504
- const aliasAwareContracts = withFlagAliasMetadata(flagContracts);
1505
- const scoped = aliasAwareContracts
1506
- .flatMap((entry) => [entry.short, entry.flag, ...(entry.aliases ?? [])])
1507
- .filter((value) => Boolean(value));
1508
- const all = includeGlobal
1509
- ? [
1510
- ...scoped,
1511
- ...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS.flatMap((entry) => [entry.short, entry.flag, ...(entry.aliases ?? [])]).filter((value) => Boolean(value)),
1512
- ]
1513
- : scoped;
1514
- return normalizeUniqueStringList(all).join(" ");
1515
- }
1516
- const PM_TOOL_GLOBAL_PARAMETER_KEYS = [
1517
- "json",
1518
- "quiet",
1519
- "profile",
1520
- "noExtensions",
1521
- "noPager",
1522
- "path",
1523
- "pmExecutable",
1524
- "timeoutMs",
1525
- ];
1526
- const PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS = {
1527
- create: ["fullChangedFields", "idOnly"],
1528
- copy: ["fullChangedFields", "idOnly"],
1529
- update: ["fullChangedFields", "idOnly"],
1530
- close: ["fullChangedFields", "idOnly"],
1531
- append: ["fullChangedFields"],
1532
- "update-many": ["fullChangedFields"],
1533
- "close-many": ["fullChangedFields"],
1534
- };
1535
- function toSchemaKeyList(values) {
1536
- return normalizeUniqueStringList(values);
1537
- }
1538
- const CREATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1539
- ...TOOL_CREATE_OPTION_CONTRACTS.map((entry) => entry.param),
1540
- ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1541
- "assignee",
1542
- ]);
1543
- const UPDATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1544
- ...TOOL_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1545
- ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1546
- "force",
1547
- ]);
1548
- const UPDATE_MANY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1549
- ...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1550
- ...UPDATE_CONTRACT_PARAMETER_KEYS,
1551
- "dryRun",
1552
- "rollback",
1553
- "noCheckpoint",
1554
- ]);
1555
- const NORMALIZE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1556
- ...TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1557
- "dryRun",
1558
- "apply",
1559
- "author",
1560
- "message",
1561
- "allowAuditUpdate",
1562
- "force",
1563
- ]);
1564
- const CLOSE_MANY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1565
- ...TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1566
- "reason",
1567
- "resolution",
1568
- "expectedResult",
1569
- "actualResult",
1570
- "validateClose",
1571
- "dryRun",
1572
- "rollback",
1573
- "noCheckpoint",
1574
- "author",
1575
- "message",
1576
- "force",
1577
- ]);
1578
- const CONTEXT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1579
- ...TOOL_CONTEXT_OPTION_CONTRACTS.map((entry) => entry.param),
1580
- "past",
1581
- "section",
1582
- ]);
1583
- const ACTIVITY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1584
- ...TOOL_ACTIVITY_OPTION_CONTRACTS.map((entry) => entry.param),
1585
- "stream",
1586
- ]);
1587
- const LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1588
- ...TOOL_LIST_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1589
- "includeBody",
1590
- "noTruncate",
1591
- "compact",
1592
- "brief",
1593
- "full",
1594
- ]);
1595
- const AGGREGATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1596
- ...TOOL_AGGREGATE_OPTION_CONTRACTS.map((entry) => entry.param),
1597
- "count",
1598
- "completion",
1599
- "includeUnparented",
1600
- ]);
1601
- const DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS.map((entry) => entry.param));
1602
- const SEARCH_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1603
- "query",
1604
- "keywords",
1605
- "mode",
1606
- "semantic",
1607
- "hybrid",
1608
- "includeLinked",
1609
- "titleExact",
1610
- "phraseExact",
1611
- "highlight",
1612
- "compact",
1613
- "full",
1614
- ...TOOL_SEARCH_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1615
- ]);
1616
- const AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = ["author", "message", "force"];
1617
- const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1618
- init: { optional: ["prefix", "preset", "typePreset", "defaults", "author", "agentGuidance", "withPackages", "force", "verbose"] },
1619
- config: {
1620
- required: ["scope", "configAction"],
1621
- optional: ["key", "value", "criterion", "clearCriteria", "format", "policy"],
1622
- },
1623
- "extension-init": { required: ["target"], optional: ["scope"] },
1624
- "extension-install": {
1625
- optional: ["target", "github", "scope", "ref"],
1626
- anyOfRequired: [["target"], ["github"]],
1627
- },
1628
- "extension-uninstall": { required: ["target"], optional: ["scope"] },
1629
- "extension-explore": { optional: ["scope"] },
1630
- "extension-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
1631
- "extension-describe": { optional: ["target", "scope"] },
1632
- "extension-reload": { optional: ["scope", "watch"] },
1633
- "extension-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
1634
- "extension-catalog": { optional: ["scope", "fields"] },
1635
- "extension-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
1636
- "extension-adopt-all": { optional: ["scope"] },
1637
- "extension-activate": { required: ["target"], optional: ["scope"] },
1638
- "extension-deactivate": { required: ["target"], optional: ["scope"] },
1639
- extension: {
1640
- optional: [
1641
- "target",
1642
- "scope",
1643
- "github",
1644
- "ref",
1645
- "init",
1646
- "install",
1647
- "uninstall",
1648
- "explore",
1649
- "manage",
1650
- "describe",
1651
- "reload",
1652
- "doctor",
1653
- "catalog",
1654
- "adopt",
1655
- "adoptAll",
1656
- "activate",
1657
- "deactivate",
1658
- "runtimeProbe",
1659
- "fixManagedState",
1660
- "detail",
1661
- "trace",
1662
- "watch",
1663
- "strictExit",
1664
- "failOnWarn",
1665
- ],
1666
- },
1667
- "package-init": { required: ["target"], optional: ["scope"] },
1668
- "package-install": {
1669
- optional: ["target", "github", "scope", "ref"],
1670
- anyOfRequired: [["target"], ["github"]],
1671
- },
1672
- "package-uninstall": { required: ["target"], optional: ["scope"] },
1673
- "package-explore": { optional: ["scope"] },
1674
- "package-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
1675
- "package-describe": { optional: ["target", "scope"] },
1676
- "package-reload": { optional: ["scope", "watch"] },
1677
- "package-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
1678
- "package-catalog": { optional: ["scope", "fields"] },
1679
- "package-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
1680
- "package-adopt-all": { optional: ["scope"] },
1681
- "package-activate": { required: ["target"], optional: ["scope"] },
1682
- "package-deactivate": { required: ["target"], optional: ["scope"] },
1683
- package: {
1684
- optional: [
1685
- "target",
1686
- "scope",
1687
- "github",
1688
- "ref",
1689
- "init",
1690
- "install",
1691
- "uninstall",
1692
- "explore",
1693
- "manage",
1694
- "describe",
1695
- "reload",
1696
- "doctor",
1697
- "catalog",
1698
- "adopt",
1699
- "adoptAll",
1700
- "activate",
1701
- "deactivate",
1702
- "runtimeProbe",
1703
- "fixManagedState",
1704
- "detail",
1705
- "trace",
1706
- "watch",
1707
- "strictExit",
1708
- "failOnWarn",
1709
- ],
1710
- },
1711
- install: {
1712
- optional: ["target", "github", "scope", "ref"],
1713
- anyOfRequired: [["target"], ["github"]],
1714
- },
1715
- upgrade: {
1716
- optional: ["target", "scope", "dryRun", "cliOnly", "packagesOnly", "repair", "tag", "packageName"],
1717
- },
1718
- create: {
1719
- required: ["title", "description", "type", "status", "priority", "message"],
1720
- optional: CREATE_CONTRACT_PARAMETER_KEYS,
1721
- },
1722
- copy: { required: ["id"], optional: ["title", "author", "message"] },
1723
- focus: { optional: ["id", "clear"], mutuallyExclusive: [["id", "clear"]] },
1724
- list: { optional: LIST_CONTRACT_PARAMETER_KEYS },
1725
- "list-all": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1726
- "list-draft": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1727
- "list-open": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1728
- "list-in-progress": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1729
- "list-blocked": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1730
- "list-closed": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1731
- "list-canceled": { optional: LIST_CONTRACT_PARAMETER_KEYS },
1732
- aggregate: { optional: AGGREGATE_CONTRACT_PARAMETER_KEYS },
1733
- "dedupe-audit": { optional: DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS },
1734
- guide: { optional: ["format", "depth"] },
1735
- context: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
1736
- ctx: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
1737
- get: { required: ["id"], optional: ["depth", "full", "fields", "tree", "treeDepth", "format"] },
1738
- search: {
1739
- optional: SEARCH_CONTRACT_PARAMETER_KEYS,
1740
- anyOfRequired: [["query"], ["keywords"]],
1741
- },
1742
- reindex: { optional: ["mode", "progress"] },
1743
- history: { required: ["id"], optional: ["limit", "compact", "full", "diff", "verify", "format"] },
1744
- "history-redact": {
1745
- required: ["id"],
1746
- optional: ["literal", "regex", "replacement", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1747
- anyOfRequired: [["literal"], ["regex"]],
1748
- },
1749
- "history-repair": {
1750
- // Exactly one of `id` (single stream) or `all` (bulk drift repair) is required.
1751
- optional: ["id", "all", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1752
- oneOfRequired: [["id"], ["all"]],
1753
- },
1754
- "history-compact": {
1755
- // Single-id mode (`id` + optional `before`) or bulk mode (any of `ids` /
1756
- // `allOver` / `closed` / `allStreams`, with optional `minEntries`). Scan
1757
- // selectors (`allOver` + `closed`/`allStreams`) legitimately combine, so the
1758
- // mode/exclusivity contract is enforced at runtime by assertHistoryCompactTarget
1759
- // rather than a one-of schema rule.
1760
- optional: ["id", "before", "ids", "allOver", "closed", "allStreams", "minEntries", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1761
- },
1762
- schema: {
1763
- required: ["subcommand"],
1764
- // No --message: schema mutations write config files, not item history.
1765
- optional: [
1766
- "name",
1767
- "description",
1768
- "defaultStatus",
1769
- "folder",
1770
- "alias",
1771
- "role",
1772
- "order",
1773
- "fieldType",
1774
- "commands",
1775
- "cliFlag",
1776
- "required",
1777
- "requiredOnCreate",
1778
- "allowUnset",
1779
- "requiredTypes",
1780
- "typePreset",
1781
- "infer",
1782
- "minCount",
1783
- "apply",
1784
- "author",
1785
- "force",
1786
- ],
1787
- conditionalRequired: [
1788
- { property: "subcommand", value: "show", required: ["name"] },
1789
- { property: "subcommand", value: "show-status", required: ["name"] },
1790
- { property: "subcommand", value: "add-type", required: ["name"] },
1791
- { property: "subcommand", value: "remove-type", required: ["name"] },
1792
- // show-status/add-status/remove-status pass the status id as `name`.
1793
- { property: "subcommand", value: "add-status", required: ["name"] },
1794
- { property: "subcommand", value: "remove-status", required: ["name"] },
1795
- // field subcommands pass the field key as `name`.
1796
- { property: "subcommand", value: "add-field", required: ["name"] },
1797
- { property: "subcommand", value: "remove-field", required: ["name"] },
1798
- { property: "subcommand", value: "show-field", required: ["name"] },
1799
- // apply-preset passes the preset name as `typePreset`.
1800
- { property: "subcommand", value: "apply-preset", required: ["typePreset"] },
1801
- ],
1802
- },
1803
- plan: {
1804
- required: ["subcommand"],
1805
- optional: [
1806
- "id",
1807
- "stepRef",
1808
- "reorderTo",
1809
- "title",
1810
- "description",
1811
- "scope",
1812
- "parent",
1813
- "related",
1814
- "blocks",
1815
- "blockedBy",
1816
- "harness",
1817
- "mode",
1818
- "resumeContext",
1819
- "tags",
1820
- "priority",
1821
- "body",
1822
- "claim",
1823
- "fromSearch",
1824
- "stepTitle",
1825
- "step",
1826
- "stepBody",
1827
- "stepOwner",
1828
- "stepStatus",
1829
- "stepEvidence",
1830
- "stepBlockedReason",
1831
- "stepReplacement",
1832
- "dependsOn",
1833
- "link",
1834
- "linkKind",
1835
- "linkNote",
1836
- "promoteToItemDep",
1837
- "allowMultipleActive",
1838
- "file",
1839
- "test",
1840
- "doc",
1841
- "decisionText",
1842
- "decision",
1843
- "decisionRationale",
1844
- "decisionEvidence",
1845
- "discoveryText",
1846
- "discovery",
1847
- "validationText",
1848
- "validation",
1849
- "validationCommand",
1850
- "validationExpected",
1851
- "depth",
1852
- "fields",
1853
- "steps",
1854
- "materializeType",
1855
- "materializeParent",
1856
- "materializeTags",
1857
- ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1858
- ],
1859
- },
1860
- activity: { optional: ACTIVITY_CONTRACT_PARAMETER_KEYS },
1861
- restore: { required: ["id", "target"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
1862
- update: { required: ["id"], optional: UPDATE_CONTRACT_PARAMETER_KEYS },
1863
- "update-many": { optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS },
1864
- normalize: { optional: NORMALIZE_CONTRACT_PARAMETER_KEYS },
1865
- close: { required: ["id"], optional: ["text", "duplicateOf", "validateClose", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
1866
- "close-many": { optional: CLOSE_MANY_CONTRACT_PARAMETER_KEYS },
1867
- delete: { required: ["id"], optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
1868
- append: { required: ["id", "body"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
1869
- comments: {
1870
- required: ["id"],
1871
- optional: ["text", "add", "stdin", "file", "edit", "delete", "limit", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1872
- },
1873
- "comments-audit": {
1874
- optional: [
1875
- "status",
1876
- "type",
1877
- "assignee",
1878
- "assigneeFilter",
1879
- "parent",
1880
- "tag",
1881
- "sprint",
1882
- "release",
1883
- "priority",
1884
- "limitItems",
1885
- "limit",
1886
- "fullHistory",
1887
- "latest",
1888
- ],
1889
- },
1890
- notes: {
1891
- required: ["id"],
1892
- optional: ["text", "add", "limit", "allowAuditNote", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1893
- },
1894
- learnings: {
1895
- required: ["id"],
1896
- optional: ["text", "add", "limit", "allowAuditLearning", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1897
- },
1898
- files: {
1899
- required: ["id"],
1900
- optional: [
1901
- "add",
1902
- "addGlob",
1903
- "remove",
1904
- "migrate",
1905
- // GH-170 (pm-pfnx): `addNote` is the MCP spelling of the CLI --note flag
1906
- // (the shared `note` parameter is the array-typed create/update note
1907
- // seed, so files/docs use a distinct single-string key).
1908
- "addNote",
1909
- "discover",
1910
- "apply",
1911
- "discoveryNote",
1912
- "appendStable",
1913
- "validatePaths",
1914
- "audit",
1915
- ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1916
- ],
1917
- dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }],
1918
- },
1919
- docs: {
1920
- required: ["id"],
1921
- optional: [
1922
- "add",
1923
- "addGlob",
1924
- "remove",
1925
- "migrate",
1926
- "addNote",
1927
- "list",
1928
- "validatePaths",
1929
- "audit",
1930
- ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1931
- ],
1932
- dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }],
1933
- },
1934
- deps: { required: ["id"], optional: ["format", "maxDepth", "collapse", "summary"] },
1935
- test: {
1936
- required: ["id"],
1937
- optional: [
1938
- "add",
1939
- "addJson",
1940
- "remove",
1941
- "run",
1942
- "match",
1943
- "onlyIndex",
1944
- "onlyLast",
1945
- "background",
1946
- "timeout",
1947
- "progress",
1948
- "envSet",
1949
- "envClear",
1950
- "sharedHostSafe",
1951
- "pmContext",
1952
- "overrideLinkedPmContext",
1953
- "failOnContextMismatch",
1954
- "failOnSkipped",
1955
- "failOnEmptyTestRun",
1956
- "requireAssertionsForPm",
1957
- "checkContext",
1958
- "autoPmContext",
1959
- ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1960
- ],
1961
- },
1962
- "test-all": {
1963
- optional: [
1964
- "status",
1965
- "limit",
1966
- "offset",
1967
- "background",
1968
- "timeout",
1969
- "progress",
1970
- "envSet",
1971
- "envClear",
1972
- "sharedHostSafe",
1973
- "pmContext",
1974
- "overrideLinkedPmContext",
1975
- "failOnContextMismatch",
1976
- "failOnSkipped",
1977
- "failOnEmptyTestRun",
1978
- "requireAssertionsForPm",
1979
- "checkContext",
1980
- "autoPmContext",
1981
- ],
1982
- },
1983
- telemetry: {
1984
- optional: ["subcommand", "limit"],
1985
- },
1986
- "test-runs-list": {
1987
- optional: ["status", "limit"],
1988
- },
1989
- "test-runs-status": {
1990
- required: ["runId"],
1991
- },
1992
- "test-runs-logs": {
1993
- required: ["runId"],
1994
- optional: ["stream", "tail"],
1995
- },
1996
- "test-runs-stop": {
1997
- required: ["runId"],
1998
- optional: ["force"],
1999
- },
2000
- "test-runs-resume": {
2001
- required: ["runId"],
2002
- optional: ["author"],
2003
- },
2004
- stats: { optional: ["storage", "metadataCoverage", "fieldUtilization", "byAssignee", "byTag", "byPriority", "tagPrefix"] },
2005
- health: {
2006
- optional: [
2007
- "strictDirectories",
2008
- "strictExit",
2009
- "failOnWarn",
2010
- "checkOnly",
2011
- "checkTelemetry",
2012
- "noRefresh",
2013
- "refreshVectors",
2014
- "verboseStaleItems",
2015
- "summary",
2016
- "skipVectors",
2017
- "skipIntegrity",
2018
- "skipDrift",
2019
- "full",
2020
- ],
2021
- },
2022
- validate: {
2023
- optional: [
2024
- "checkMetadata",
2025
- "metadataProfile",
2026
- "checkResolution",
2027
- "checkLifecycle",
2028
- "checkStaleBlockers",
2029
- "dependencyCycleSeverity",
2030
- "checkFiles",
2031
- "scanMode",
2032
- "includePmInternals",
2033
- "verboseFileLists",
2034
- "verboseDiagnostics",
2035
- "allAffectedIds",
2036
- "strictExit",
2037
- "failOnWarn",
2038
- "fixHints",
2039
- "autoFix",
2040
- "dryRun",
2041
- "fixScope",
2042
- "pruneMissing",
2043
- "checkHistoryDrift",
2044
- "checkCommandReferences",
2045
- ],
2046
- },
2047
- gc: { optional: ["dryRun", "gcScope"] },
2048
- contracts: { optional: ["contractAction", "command", "schemaOnly", "flagsOnly", "availabilityOnly", "runtimeOnly", "activeOnly"] },
2049
- completion: { required: ["shell"], optional: ["eagerTags"] },
2050
- claim: { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
2051
- release: { required: ["id"], optional: ["allowAuditRelease", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
2052
- "start-task": { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
2053
- "pause-task": { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
2054
- "close-task": { required: ["id"], optional: ["text", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
2055
- };
2056
- export const PM_TOOL_ACTION_PARAMETER_CONTRACTS = Object.freeze(Object.fromEntries(PM_TOOL_ACTIONS.map((action) => [action, PM_TOOL_ACTION_SCHEMA_CONTRACTS[action]])));
2057
- function fallbackToolParameterDescription(key) {
2058
- return key
2059
- .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
2060
- .replace(/[_-]/g, " ")
2061
- .trim()
2062
- .replace(/^./, (value) => value.toUpperCase())
2063
- .concat(".");
2064
- }
2065
- function decorateToolParameterDefinition(key, definition) {
2066
- const baseDefinition = typeof definition === "object" && definition !== null ? { ...definition } : {};
2067
- const metadata = PM_TOOL_PARAMETER_METADATA[key];
2068
- return {
2069
- ...baseDefinition,
2070
- description: metadata?.description ?? fallbackToolParameterDescription(key),
2071
- ...(metadata?.examples ? { examples: metadata.examples } : {}),
2072
- };
2073
- }
2074
- function actionScopedToolParameterMetadata(action, key) {
2075
- if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_METADATA, key)) {
2076
- return PLAN_ACTION_PARAMETER_METADATA[key];
2077
- }
2078
- return PM_TOOL_PARAMETER_METADATA[key];
2079
- }
2080
- function decorateActionScopedToolParameterDefinition(action, key, definition) {
2081
- const baseDefinition = typeof definition === "object" && definition !== null ? { ...definition } : {};
2082
- const metadata = actionScopedToolParameterMetadata(action, key);
2083
- return {
2084
- ...baseDefinition,
2085
- description: metadata?.description ?? fallbackToolParameterDescription(key),
2086
- ...(metadata?.examples ? { examples: metadata.examples } : {}),
2087
- };
2088
- }
2089
- function actionScopedToolParameterDefinition(action, key) {
2090
- if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_PROPERTIES, key)) {
2091
- return PLAN_ACTION_PARAMETER_PROPERTIES[key];
2092
- }
2093
- if ((action === "get" || action === "history" || action === "search") && key === "format") {
2094
- return { type: "string", enum: ["json", "toon"] };
2095
- }
2096
- return PM_TOOL_PARAMETER_PROPERTIES[key];
2097
- }
2098
- function buildActionScopedToolSchema(action) {
2099
- const contract = PM_TOOL_ACTION_SCHEMA_CONTRACTS[action];
2100
- const required = toSchemaKeyList(contract.required ?? []);
2101
- const optional = toSchemaKeyList(contract.optional ?? []);
2102
- const mutationParameterKeys = PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS[action] ?? [];
2103
- const allowedKeys = toSchemaKeyList(["action", ...PM_TOOL_GLOBAL_PARAMETER_KEYS, ...mutationParameterKeys, ...required, ...optional]);
2104
- const properties = {
2105
- action: {
2106
- const: action,
2107
- description: PM_TOOL_PARAMETER_METADATA.action?.description ?? "Tool action to execute.",
2108
- },
2109
- };
2110
- for (const key of allowedKeys) {
2111
- if (key === "action") {
2112
- continue;
2113
- }
2114
- const definition = actionScopedToolParameterDefinition(action, key);
2115
- if (definition) {
2116
- properties[key] = decorateActionScopedToolParameterDefinition(action, key, definition);
2117
- }
2118
- }
2119
- const schema = {
2120
- type: "object",
2121
- additionalProperties: false,
2122
- required: ["action", ...required],
2123
- title: `pm action "${action}" parameters`,
2124
- properties,
2125
- };
2126
- if (contract.anyOfRequired && contract.anyOfRequired.length > 0) {
2127
- schema.anyOf = contract.anyOfRequired.map((requiredFields) => ({
2128
- required: [...requiredFields],
2129
- }));
2130
- }
2131
- const oneOfRequiredGroups = contract.oneOfRequired;
2132
- if (oneOfRequiredGroups && oneOfRequiredGroups.length > 0) {
2133
- const allOneOfFields = oneOfRequiredGroups.flat();
2134
- schema.oneOf = oneOfRequiredGroups.map((requiredFields) => {
2135
- const otherFields = allOneOfFields.filter((field) => !requiredFields.includes(field));
2136
- return {
2137
- required: [...requiredFields],
2138
- ...(otherFields.length > 0 ? { not: { anyOf: otherFields.map((field) => ({ required: [field] })) } } : {}),
2139
- ...(action === "history-repair" && requiredFields.includes("all") ? { properties: { all: { const: true } } } : {}),
2140
- };
2141
- });
2142
- }
2143
- if (contract.conditionalRequired && contract.conditionalRequired.length > 0) {
2144
- schema.allOf = contract.conditionalRequired.map((entry) => ({
2145
- if: {
2146
- properties: {
2147
- [entry.property]: { const: entry.value },
2148
- },
2149
- required: [entry.property],
2150
- },
2151
- then: {
2152
- required: entry.required,
2153
- },
2154
- }));
2155
- }
2156
- if (contract.dependentAnyOfRequired && contract.dependentAnyOfRequired.length > 0) {
2157
- const allOf = Array.isArray(schema.allOf) ? [...schema.allOf] : [];
2158
- for (const entry of contract.dependentAnyOfRequired) {
2159
- allOf.push({
2160
- if: { required: [entry.property] },
2161
- then: {
2162
- anyOf: entry.anyOfRequired.map((requiredFields) => ({
2163
- required: [...requiredFields],
2164
- })),
2165
- },
2166
- });
2167
- }
2168
- schema.allOf = allOf;
2169
- }
2170
- if (contract.mutuallyExclusive && contract.mutuallyExclusive.length > 0) {
2171
- const allOf = Array.isArray(schema.allOf) ? [...schema.allOf] : [];
2172
- for (const group of contract.mutuallyExclusive) {
2173
- allOf.push({ not: { required: toSchemaKeyList(group) } });
2174
- }
2175
- schema.allOf = allOf;
2176
- }
2177
- return schema;
2178
- }
2179
- // Building the full MCP tool-parameter schemas (one variant per action) is only
2180
- // needed by the MCP server, the `pm contracts` command, and SDK consumers — never
2181
- // on the hot CLI path that imports this module for flag contracts. Wrap them in a
2182
- // memoized lazy Proxy so the build is deferred until first property access and the
2183
- // object API (`.type`, `.oneOf`, spread, JSON.stringify) stays identical.
2184
- function createLazyContractSchema(build) {
2185
- let value;
2186
- const resolve = () => (value ??= build());
2187
- return new Proxy({}, {
2188
- get: (_target, prop) => resolve()[prop],
2189
- has: (_target, prop) => prop in resolve(),
2190
- ownKeys: () => Reflect.ownKeys(resolve()),
2191
- getOwnPropertyDescriptor: (_target, prop) => {
2192
- const descriptor = Reflect.getOwnPropertyDescriptor(resolve(), prop);
2193
- if (descriptor) {
2194
- descriptor.configurable = true;
2195
- }
2196
- return descriptor;
2197
- },
2198
- });
2199
- }
2200
- /**
2201
- * Canonical version of the action-scoped strict MCP tool-parameters schema
2202
- * (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the
2203
- * MCP server, the `pm contracts` command, SDK consumers, and the contract tests
2204
- * all bind to one constant instead of re-typing the `"4.0.2"` literal (pm-r9sz).
2205
- * Bump the patch/minor for additive, backward-compatible schema changes; bump
2206
- * the MAJOR for breaking changes — the major also drives the `$id`
2207
- * `tool-parameters-v{major}` slug, so the two never drift.
2208
- */
2209
- export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.3";
2210
- /**
2211
- * Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
2212
- * schema `$id` slug so a breaking version bump renames the document in lockstep.
2213
- */
2214
- export const PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
2215
- /**
2216
- * Version of the provider-compatible flat tool-parameters schema
2217
- * (`PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`). Tracked separately from the strict
2218
- * schema because the flat projection evolves independently.
2219
- */
2220
- export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.0.0";
2221
- export const PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
2222
- $schema: "https://json-schema.org/draft/2020-12/schema",
2223
- $id: `https://schema.unbrained.dev/pm-cli/tool-parameters-v${PM_TOOL_PARAMETERS_SCHEMA_MAJOR}.schema.json`,
2224
- title: "pm-cli tool parameters (action-scoped strict schema)",
2225
- "x-schema-version": PM_TOOL_PARAMETERS_SCHEMA_VERSION,
2226
- type: "object",
2227
- oneOf: PM_TOOL_ACTIONS.map((action) => buildActionScopedToolSchema(action)),
2228
- }));
2229
- function toProviderCompatibleParameterDefinition(key, definition) {
2230
- const decorated = decorateToolParameterDefinition(key, definition);
2231
- if (typeof decorated.type === "string") {
2232
- return decorated;
2233
- }
2234
- const anyOf = Array.isArray(decorated.anyOf) ? decorated.anyOf : [];
2235
- const firstTypedVariant = anyOf.find((variant) => typeof variant.type === "string");
2236
- if (firstTypedVariant) {
2237
- const { anyOf: _anyOf, ...rest } = decorated;
2238
- return {
2239
- ...rest,
2240
- type: firstTypedVariant.type,
2241
- };
2242
- }
2243
- const { anyOf: _anyOf, ...rest } = decorated;
2244
- return {
2245
- ...rest,
2246
- type: "string",
2247
- };
2248
- }
2249
- function buildProviderCompatibleToolSchema() {
2250
- const properties = {
2251
- action: {
2252
- type: "string",
2253
- description: PM_TOOL_PARAMETER_METADATA.action?.description ?? "Tool action to execute.",
2254
- },
2255
- options: {
2256
- type: "object",
2257
- additionalProperties: true,
2258
- description: "Advanced command options object forwarded to the selected pm action.",
2259
- },
2260
- };
2261
- for (const key of Object.keys(PM_TOOL_PARAMETER_PROPERTIES).sort()) {
2262
- properties[key] = toProviderCompatibleParameterDefinition(key, PM_TOOL_PARAMETER_PROPERTIES[key]);
2263
- }
2264
- return {
2265
- title: "pm-cli tool parameters (provider-compatible flat schema)",
2266
- "x-schema-version": PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,
2267
- type: "object",
2268
- additionalProperties: false,
2269
- required: ["action"],
2270
- properties,
2271
- };
2272
- }
2273
- export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(buildProviderCompatibleToolSchema);
2274
- export const _testOnlyCliContracts = {
2275
- buildActionScopedToolSchema,
2276
- buildProviderCompatibleToolSchema,
2277
- decorateActionScopedToolParameterDefinition,
2278
- decorateToolParameterDefinition,
2279
- toolActionSchemaContracts: PM_TOOL_ACTION_SCHEMA_CONTRACTS,
2280
- toolParameterMetadata: PM_TOOL_PARAMETER_METADATA,
2281
- toProviderCompatibleParameterDefinition,
2282
- toUniqueFlagContracts,
2283
- withFlagAliasMetadata,
2284
- };
11
+ export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, DEDUPE_AUDIT_FLAG_CONTRACTS, DEDUPE_MERGE_FLAG_CONTRACTS, COMMENTS_AUDIT_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
12
+ export { PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
2285
13
  //# sourceMappingURL=cli-contracts.js.map
2286
- //# debugId=9a1b19ca-247e-5b4a-a916-b17be9b5c95d
14
+ //# debugId=b8aa5310-bff0-59b5-9a34-c6fc6a46582d