@unbrained/pm-cli 2026.5.30 → 2026.5.31

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 (228) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cli/commands/calendar.js +81 -9
  3. package/dist/cli/commands/calendar.js.map +1 -1
  4. package/dist/cli/commands/create.js +34 -4
  5. package/dist/cli/commands/create.js.map +1 -1
  6. package/dist/cli/commands/extension/install-sources.d.ts +2 -0
  7. package/dist/cli/commands/extension/install-sources.js +11 -4
  8. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  9. package/dist/cli/commands/reindex.js +3 -3
  10. package/dist/cli/commands/reindex.js.map +1 -1
  11. package/dist/cli/commands/search.d.ts +17 -0
  12. package/dist/cli/commands/search.js +40 -10
  13. package/dist/cli/commands/search.js.map +1 -1
  14. package/dist/cli/register-list-query.js +9 -11
  15. package/dist/cli/register-list-query.js.map +1 -1
  16. package/dist/cli/register-mutation.js +20 -22
  17. package/dist/cli/register-mutation.js.map +1 -1
  18. package/dist/cli/register-operations.js +32 -25
  19. package/dist/cli/register-operations.js.map +1 -1
  20. package/dist/cli/register-setup.js +6 -8
  21. package/dist/cli/register-setup.js.map +1 -1
  22. package/dist/cli/registration-helpers.js +6 -3
  23. package/dist/cli/registration-helpers.js.map +1 -1
  24. package/dist/cli/search-refresh.d.ts +2 -0
  25. package/dist/cli/search-refresh.js +13 -0
  26. package/dist/cli/search-refresh.js.map +1 -0
  27. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +17 -0
  28. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js.map +7 -0
  29. package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js +209 -0
  30. package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js.map +7 -0
  31. package/dist/cli-bundle/chunks/append-JD2DETU7.js +73 -0
  32. package/dist/cli-bundle/chunks/append-JD2DETU7.js.map +7 -0
  33. package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
  34. package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
  35. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js +1636 -0
  36. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +7 -0
  37. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +189 -0
  38. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +7 -0
  39. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js +330 -0
  40. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +7 -0
  41. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js +1770 -0
  42. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +7 -0
  43. package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js +552 -0
  44. package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js.map +7 -0
  45. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js +202 -0
  46. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +7 -0
  47. package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js +157 -0
  48. package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js.map +7 -0
  49. package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js +90 -0
  50. package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js.map +7 -0
  51. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js +950 -0
  52. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +7 -0
  53. package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js +79 -0
  54. package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js.map +7 -0
  55. package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js +349 -0
  56. package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js.map +7 -0
  57. package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
  58. package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
  59. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +47 -0
  60. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +7 -0
  61. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +56 -0
  62. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +7 -0
  63. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js +435 -0
  64. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +7 -0
  65. package/dist/cli-bundle/chunks/chunk-G57E5D7T.js +185 -0
  66. package/dist/cli-bundle/chunks/chunk-G57E5D7T.js.map +7 -0
  67. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js +3621 -0
  68. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +7 -0
  69. package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js +233 -0
  70. package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js.map +7 -0
  71. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js +1861 -0
  72. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +7 -0
  73. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js +648 -0
  74. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +7 -0
  75. package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-KBQY3YG5.js} +28 -70
  76. package/dist/cli-bundle/chunks/chunk-KBQY3YG5.js.map +7 -0
  77. package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js +185 -0
  78. package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js.map +7 -0
  79. package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js +189 -0
  80. package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +7 -0
  81. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js +5153 -0
  82. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +7 -0
  83. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js +1345 -0
  84. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +7 -0
  85. package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js +341 -0
  86. package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js.map +7 -0
  87. package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
  88. package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
  89. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js +2929 -0
  90. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-P53TN6IA.js} +22 -30
  92. package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +7 -0
  93. package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js +176 -0
  94. package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js.map +7 -0
  95. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js +1680 -0
  96. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +7 -0
  97. package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
  98. package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
  99. package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js +60 -0
  100. package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js.map +7 -0
  101. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js +362 -0
  102. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +7 -0
  103. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +141 -0
  104. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +7 -0
  105. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js +632 -0
  106. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +7 -0
  107. package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js +252 -0
  108. package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js.map +7 -0
  109. package/dist/cli-bundle/chunks/claim-EE4TKKCV.js +133 -0
  110. package/dist/cli-bundle/chunks/claim-EE4TKKCV.js.map +7 -0
  111. package/dist/cli-bundle/chunks/close-XY4CSAYF.js +14 -0
  112. package/dist/cli-bundle/chunks/close-XY4CSAYF.js.map +7 -0
  113. package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js +104 -0
  114. package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js.map +7 -0
  115. package/dist/cli-bundle/chunks/config-V3FZOKLI.js +1577 -0
  116. package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +7 -0
  117. package/dist/cli-bundle/chunks/context-RZ5QPNJB.js +1458 -0
  118. package/dist/cli-bundle/chunks/context-RZ5QPNJB.js.map +7 -0
  119. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js +1245 -0
  120. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +7 -0
  121. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +28 -0
  122. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js.map +7 -0
  123. package/dist/cli-bundle/chunks/delete-RHCTEORS.js +59 -0
  124. package/dist/cli-bundle/chunks/delete-RHCTEORS.js.map +7 -0
  125. package/dist/cli-bundle/chunks/deps-MZYCMLAO.js +229 -0
  126. package/dist/cli-bundle/chunks/deps-MZYCMLAO.js.map +7 -0
  127. package/dist/cli-bundle/chunks/docs-FXXUCZYU.js +35 -0
  128. package/dist/cli-bundle/chunks/docs-FXXUCZYU.js.map +7 -0
  129. package/dist/cli-bundle/chunks/extension-B4WL7BQU.js +25 -0
  130. package/dist/cli-bundle/chunks/extension-B4WL7BQU.js.map +7 -0
  131. package/dist/cli-bundle/chunks/files-WVOX67PE.js +286 -0
  132. package/dist/cli-bundle/chunks/files-WVOX67PE.js.map +7 -0
  133. package/dist/cli-bundle/chunks/gc-JWNF66EC.js +181 -0
  134. package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +7 -0
  135. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js +198 -0
  136. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +7 -0
  137. package/dist/cli-bundle/chunks/health-TCWL55KM.js +1233 -0
  138. package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +7 -0
  139. package/dist/cli-bundle/chunks/history-A2JUDXUE.js +21 -0
  140. package/dist/cli-bundle/chunks/history-A2JUDXUE.js.map +7 -0
  141. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +20 -0
  142. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js.map +7 -0
  143. package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js +198 -0
  144. package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js.map +7 -0
  145. package/dist/cli-bundle/chunks/init-M2WUB4YH.js +16 -0
  146. package/dist/cli-bundle/chunks/init-M2WUB4YH.js.map +7 -0
  147. package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js +48 -0
  148. package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js.map +7 -0
  149. package/dist/cli-bundle/chunks/list-OGWQPC26.js +20 -0
  150. package/dist/cli-bundle/chunks/list-OGWQPC26.js.map +7 -0
  151. package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js +48 -0
  152. package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js.map +7 -0
  153. package/dist/cli-bundle/chunks/plan-67AB2PLM.js +1175 -0
  154. package/dist/cli-bundle/chunks/plan-67AB2PLM.js.map +7 -0
  155. package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-UP3VRUFS.js} +24 -15
  156. package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-YWSBF545.js} +38 -28
  158. package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-3BDTGSDH.js} +49 -30
  160. package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +7 -0
  161. package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-V56GDRUS.js} +21 -12
  162. package/dist/cli-bundle/chunks/register-setup-V56GDRUS.js.map +7 -0
  163. package/dist/cli-bundle/chunks/restore-MB2ISME7.js +18 -0
  164. package/dist/cli-bundle/chunks/restore-MB2ISME7.js.map +7 -0
  165. package/dist/cli-bundle/chunks/schema-Q622KC46.js +119 -0
  166. package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +7 -0
  167. package/dist/cli-bundle/chunks/search-HENBL456.js +1135 -0
  168. package/dist/cli-bundle/chunks/search-HENBL456.js.map +7 -0
  169. package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +124 -0
  170. package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +7 -0
  171. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +32 -0
  172. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js.map +7 -0
  173. package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js +332 -0
  174. package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js.map +7 -0
  175. package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js +939 -0
  176. package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js.map +7 -0
  177. package/dist/cli-bundle/chunks/update-H6SCWNMA.js +22 -0
  178. package/dist/cli-bundle/chunks/update-H6SCWNMA.js.map +7 -0
  179. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js +676 -0
  180. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +7 -0
  181. package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js +271 -0
  182. package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js.map +7 -0
  183. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js +1110 -0
  184. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +7 -0
  185. package/dist/cli-bundle/main.js +146 -90
  186. package/dist/cli-bundle/main.js.map +4 -4
  187. package/dist/core/item/item-type-definition.js +6 -2
  188. package/dist/core/item/item-type-definition.js.map +1 -1
  189. package/dist/core/item/type-registry.d.ts +4 -0
  190. package/dist/core/item/type-registry.js +10 -2
  191. package/dist/core/item/type-registry.js.map +1 -1
  192. package/dist/core/search/background-refresh.d.ts +53 -0
  193. package/dist/core/search/background-refresh.js +286 -0
  194. package/dist/core/search/background-refresh.js.map +1 -0
  195. package/dist/core/search/cache.d.ts +20 -1
  196. package/dist/core/search/cache.js +33 -4
  197. package/dist/core/search/cache.js.map +1 -1
  198. package/dist/core/search/vector-stores.js +7 -3
  199. package/dist/core/search/vector-stores.js.map +1 -1
  200. package/dist/core/shared/constants.d.ts +2 -2
  201. package/dist/core/shared/constants.js +2 -3
  202. package/dist/core/shared/constants.js.map +1 -1
  203. package/dist/core/store/item-format-migration.js +25 -15
  204. package/dist/core/store/item-format-migration.js.map +1 -1
  205. package/dist/core/store/settings-validator.js +6 -2
  206. package/dist/core/store/settings-validator.js.map +1 -1
  207. package/dist/core/telemetry/runtime.d.ts +10 -0
  208. package/dist/core/telemetry/runtime.js +86 -2
  209. package/dist/core/telemetry/runtime.js.map +1 -1
  210. package/dist/sdk/cli-contracts/tool-parameter-tables.js +4 -4
  211. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  212. package/dist/sdk/cli-contracts.js +26 -5
  213. package/dist/sdk/cli-contracts.js.map +1 -1
  214. package/dist/types.d.ts +7 -1
  215. package/dist/types.js +2 -2
  216. package/dist/types.js.map +1 -1
  217. package/docs/RELEASING.md +1 -1
  218. package/package.json +1 -2
  219. package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
  220. package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
  221. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
  222. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
  223. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
  224. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
  225. package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
  226. package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
  227. package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
  228. package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
@@ -0,0 +1,3621 @@
1
+ import {
2
+ KNOWN_EXTENSION_CAPABILITIES,
3
+ KNOWN_EXTENSION_POLICY_MODES,
4
+ KNOWN_EXTENSION_POLICY_SURFACES,
5
+ KNOWN_EXTENSION_SANDBOX_PROFILES,
6
+ KNOWN_EXTENSION_SERVICE_NAMES,
7
+ KNOWN_EXTENSION_TRUST_MODES,
8
+ PLAN_HARNESS_VALUES,
9
+ PLAN_MODE_VALUES,
10
+ PLAN_STEP_LINK_KIND_VALUES,
11
+ PLAN_STEP_STATUS_VALUES
12
+ } from "./chunk-LSXGH6NE.js";
13
+
14
+ // dist/sdk/cli-contracts/commander-types.js
15
+ !(function() {
16
+ try {
17
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
18
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5b919cb4-d842-52b2-92f8-d07fb6637a19");
19
+ } catch (e2) {
20
+ }
21
+ })();
22
+ var LIST_COMMANDER_STRING_OPTION_CONTRACTS = [
23
+ { target: "status", keys: ["status"] },
24
+ { target: "type", keys: ["type"] },
25
+ { target: "tag", keys: ["tag"] },
26
+ { target: "priority", keys: ["priority"] },
27
+ { target: "deadlineBefore", keys: ["deadlineBefore"] },
28
+ { target: "deadlineAfter", keys: ["deadlineAfter"] },
29
+ { target: "assignee", keys: ["assignee"] },
30
+ { target: "assigneeFilter", keys: ["assigneeFilter", "assignee_filter"] },
31
+ { target: "parent", keys: ["parent"] },
32
+ { target: "sprint", keys: ["sprint"] },
33
+ { target: "release", keys: ["release"] },
34
+ { target: "limit", keys: ["limit"] },
35
+ { target: "offset", keys: ["offset"] },
36
+ { target: "fields", keys: ["fields"] },
37
+ { target: "sort", keys: ["sort"] },
38
+ { target: "order", keys: ["order"] }
39
+ ];
40
+ var SEARCH_COMMANDER_STRING_OPTION_CONTRACTS = [
41
+ { target: "mode", keys: ["mode"] },
42
+ { target: "type", keys: ["type"] },
43
+ { target: "tag", keys: ["tag"] },
44
+ { target: "priority", keys: ["priority"] },
45
+ { target: "deadlineBefore", keys: ["deadlineBefore"] },
46
+ { target: "deadlineAfter", keys: ["deadlineAfter"] },
47
+ { target: "fields", keys: ["fields"] },
48
+ { target: "limit", keys: ["limit"] }
49
+ ];
50
+ var CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS = [
51
+ { target: "view", keys: ["view"] },
52
+ { target: "date", keys: ["date"] },
53
+ { target: "from", keys: ["from"] },
54
+ { target: "to", keys: ["to"] },
55
+ { target: "limit", keys: ["limit"] },
56
+ { target: "type", keys: ["type"] },
57
+ { target: "tag", keys: ["tag"] },
58
+ { target: "priority", keys: ["priority"] },
59
+ { target: "status", keys: ["status"] },
60
+ { target: "assignee", keys: ["assignee"] },
61
+ { target: "assigneeFilter", keys: ["assigneeFilter", "assignee_filter"] },
62
+ { target: "sprint", keys: ["sprint"] },
63
+ { target: "release", keys: ["release"] },
64
+ { target: "include", keys: ["include"] },
65
+ { target: "recurrenceLookaheadDays", keys: ["recurrenceLookaheadDays", "recurrence_lookahead_days"] },
66
+ { target: "recurrenceLookbackDays", keys: ["recurrenceLookbackDays", "recurrence_lookback_days"] },
67
+ { target: "occurrenceLimit", keys: ["occurrenceLimit", "occurrence_limit"] },
68
+ { target: "format", keys: ["format"] }
69
+ ];
70
+ var CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS = [
71
+ { target: "date", keys: ["date"] },
72
+ { target: "from", keys: ["from"] },
73
+ { target: "to", keys: ["to"] },
74
+ { target: "type", keys: ["type"] },
75
+ { target: "tag", keys: ["tag"] },
76
+ { target: "priority", keys: ["priority"] },
77
+ { target: "assignee", keys: ["assignee"] },
78
+ { target: "assigneeFilter", keys: ["assigneeFilter", "assignee_filter"] },
79
+ { target: "sprint", keys: ["sprint"] },
80
+ { target: "release", keys: ["release"] },
81
+ { target: "limit", keys: ["limit"] },
82
+ { target: "format", keys: ["format"] },
83
+ { target: "depth", keys: ["depth"] },
84
+ { target: "activityLimit", keys: ["activityLimit", "activity_limit"] },
85
+ { target: "staleThreshold", keys: ["staleThreshold", "stale_threshold"] }
86
+ ];
87
+ var ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS = [
88
+ { target: "id", keys: ["id"] },
89
+ { target: "op", keys: ["op"] },
90
+ { target: "author", keys: ["author"] },
91
+ { target: "from", keys: ["from"] },
92
+ { target: "to", keys: ["to"] },
93
+ { target: "limit", keys: ["limit"] }
94
+ ];
95
+ function readFirstStringFromCommanderOptions(options, contract) {
96
+ for (const key of contract.keys) {
97
+ const candidate = options[key];
98
+ if (typeof candidate === "string") {
99
+ return candidate;
100
+ }
101
+ }
102
+ return void 0;
103
+ }
104
+ function readStringArrayFromCommanderOptions(options, contract) {
105
+ for (const key of contract.keys) {
106
+ const candidate = options[key];
107
+ if (Array.isArray(candidate)) {
108
+ return candidate;
109
+ }
110
+ }
111
+ return void 0;
112
+ }
113
+
114
+ // dist/sdk/cli-contracts/commander-mutation-options.js
115
+ !(function() {
116
+ try {
117
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
118
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8f0d6f98-ad14-5cd7-aea8-a43737f51032");
119
+ } catch (e2) {
120
+ }
121
+ })();
122
+ var CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
123
+ {
124
+ target: "title",
125
+ keys: ["title"],
126
+ option: "--title, -t <value>",
127
+ description: "Item title [required] (or pass title as the first positional argument)"
128
+ },
129
+ {
130
+ target: "description",
131
+ keys: ["description"],
132
+ option: "--description, -d <value>",
133
+ description: "Item description (allow empty string)"
134
+ },
135
+ { target: "type", keys: ["type"], option: "--type <value>", description: "Item type (built-ins plus any configured custom types)" },
136
+ { target: "template", keys: ["template"], option: "--template <value>", description: "Apply named create template defaults before explicit flags" },
137
+ {
138
+ target: "createMode",
139
+ keys: ["createMode", "create_mode"],
140
+ option: "--create-mode <value>",
141
+ description: "Create required-option policy mode: strict|progressive",
142
+ aliasOptions: [{ option: "--create_mode <value>", description: "Alias for --create-mode" }]
143
+ },
144
+ {
145
+ target: "schedulePreset",
146
+ keys: ["schedulePreset", "schedule_preset"],
147
+ option: "--schedule-preset <value>",
148
+ description: "Scheduling preset for Reminder|Meeting|Event: lightweight",
149
+ aliasOptions: [{ option: "--schedule_preset <value>", description: "Alias for --schedule-preset" }]
150
+ },
151
+ { target: "status", keys: ["status"], option: "--status, -s <value>", description: "Item status" },
152
+ { target: "priority", keys: ["priority"], option: "--priority, -p <value>", description: "Priority 0..4" },
153
+ { target: "tags", keys: ["tags"], option: "--tags <value>", description: "Comma-separated tags" },
154
+ {
155
+ target: "addTags",
156
+ keys: ["addTags", "add_tags"],
157
+ option: "--add-tags <value>",
158
+ description: "Add tags additively on top of --tags (repeatable; CSV accepted)",
159
+ repeatable: true,
160
+ aliasOptions: [{ option: "--add_tags <value>", description: "Alias for --add-tags" }]
161
+ },
162
+ { target: "body", keys: ["body"], option: "--body, -b <value>", description: "Item markdown body (allow empty string)" },
163
+ { target: "deadline", keys: ["deadline"], option: "--deadline <value>", description: "Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)" },
164
+ {
165
+ target: "estimatedMinutes",
166
+ keys: ["estimate", "estimatedMinutes", "estimated_minutes"],
167
+ option: "--estimate, --estimated-minutes <value>",
168
+ description: "Estimated minutes",
169
+ aliasOptions: [{ option: "--estimated_minutes <value>", description: "Alias for --estimated-minutes" }]
170
+ },
171
+ {
172
+ target: "acceptanceCriteria",
173
+ keys: ["acceptanceCriteria", "acceptance_criteria", "ac"],
174
+ option: "--acceptance-criteria <value>",
175
+ description: "Acceptance criteria (allow empty string)",
176
+ aliasOptions: [
177
+ { option: "--acceptance_criteria <value>", description: "Alias for --acceptance-criteria" },
178
+ { option: "--ac <value>", description: "Alias for --acceptance-criteria" }
179
+ ]
180
+ },
181
+ {
182
+ target: "definitionOfReady",
183
+ keys: ["definitionOfReady", "definition_of_ready"],
184
+ option: "--definition-of-ready <value>",
185
+ description: "Definition of ready (allow empty string)",
186
+ aliasOptions: [{ option: "--definition_of_ready <value>", description: "Alias for --definition-of-ready" }]
187
+ },
188
+ { target: "order", keys: ["order"], option: "--order <value>", description: "Planning order/rank integer" },
189
+ { target: "rank", keys: ["rank"], option: "--rank <value>", description: "Alias for --order" },
190
+ { target: "goal", keys: ["goal"], option: "--goal <value>", description: "Goal identifier" },
191
+ { target: "objective", keys: ["objective"], option: "--objective <value>", description: "Objective identifier" },
192
+ { target: "value", keys: ["value"], option: "--value <value>", description: "Business value summary" },
193
+ { target: "impact", keys: ["impact"], option: "--impact <value>", description: "Business impact summary" },
194
+ { target: "outcome", keys: ["outcome"], option: "--outcome <value>", description: "Expected outcome summary" },
195
+ {
196
+ target: "whyNow",
197
+ keys: ["whyNow", "why_now"],
198
+ option: "--why-now <value>",
199
+ description: "Why-now rationale",
200
+ aliasOptions: [{ option: "--why_now <value>", description: "Alias for --why-now" }]
201
+ },
202
+ { target: "author", keys: ["author"], option: "--author <value>", description: "Mutation author" },
203
+ { target: "message", keys: ["message"], option: "--message <value>", description: "History message (allow empty string)" },
204
+ { target: "assignee", keys: ["assignee"], option: "--assignee <value>", description: "Item assignee" },
205
+ { target: "parent", keys: ["parent"], option: "--parent <value>", description: "Parent item ID" },
206
+ { target: "reviewer", keys: ["reviewer"], option: "--reviewer <value>", description: "Reviewer" },
207
+ { target: "risk", keys: ["risk"], option: "--risk <value>", description: "Risk level: low|med|medium|high|critical (med persists as medium)" },
208
+ {
209
+ target: "confidence",
210
+ keys: ["confidence"],
211
+ option: "--confidence <value>",
212
+ description: "Confidence level: 0..100|low|med|medium|high (med persists as medium)"
213
+ },
214
+ { target: "sprint", keys: ["sprint"], option: "--sprint <value>", description: "Sprint identifier" },
215
+ { target: "release", keys: ["release"], option: "--release <value>", description: "Release identifier" },
216
+ {
217
+ target: "blockedBy",
218
+ keys: ["blockedBy", "blocked_by"],
219
+ option: "--blocked-by <value>",
220
+ description: "Blocked-by item ID or reason",
221
+ aliasOptions: [{ option: "--blocked_by <value>", description: "Alias for --blocked-by" }]
222
+ },
223
+ {
224
+ target: "blockedReason",
225
+ keys: ["blockedReason", "blocked_reason"],
226
+ option: "--blocked-reason <value>",
227
+ description: "Blocked reason",
228
+ aliasOptions: [{ option: "--blocked_reason <value>", description: "Alias for --blocked-reason" }]
229
+ },
230
+ {
231
+ target: "unblockNote",
232
+ keys: ["unblockNote", "unblock_note"],
233
+ option: "--unblock-note <value>",
234
+ description: "Unblock rationale note",
235
+ aliasOptions: [{ option: "--unblock_note <value>", description: "Alias for --unblock-note" }]
236
+ },
237
+ { target: "reporter", keys: ["reporter"], option: "--reporter <value>", description: "Issue reporter" },
238
+ {
239
+ target: "severity",
240
+ keys: ["severity"],
241
+ option: "--severity <value>",
242
+ description: "Issue severity: low|med|medium|high|critical (med persists as medium)"
243
+ },
244
+ { target: "environment", keys: ["environment"], option: "--environment <value>", description: "Issue environment context" },
245
+ {
246
+ target: "reproSteps",
247
+ keys: ["reproSteps", "repro_steps"],
248
+ option: "--repro-steps <value>",
249
+ description: "Issue reproduction steps",
250
+ aliasOptions: [{ option: "--repro_steps <value>", description: "Alias for --repro-steps" }]
251
+ },
252
+ { target: "resolution", keys: ["resolution"], option: "--resolution <value>", description: "Issue resolution summary" },
253
+ {
254
+ target: "expectedResult",
255
+ keys: ["expectedResult", "expected_result", "expected"],
256
+ option: "--expected-result <value>",
257
+ description: "Issue expected behavior",
258
+ aliasOptions: [
259
+ { option: "--expected_result <value>", description: "Alias for --expected-result" },
260
+ { option: "--expected <value>", description: "Short alias for --expected-result" }
261
+ ]
262
+ },
263
+ {
264
+ target: "actualResult",
265
+ keys: ["actualResult", "actual_result", "actual"],
266
+ option: "--actual-result <value>",
267
+ description: "Issue observed behavior",
268
+ aliasOptions: [
269
+ { option: "--actual_result <value>", description: "Alias for --actual-result" },
270
+ { option: "--actual <value>", description: "Short alias for --actual-result" }
271
+ ]
272
+ },
273
+ {
274
+ target: "affectedVersion",
275
+ keys: ["affectedVersion", "affected_version"],
276
+ option: "--affected-version <value>",
277
+ description: "Affected version identifier",
278
+ aliasOptions: [{ option: "--affected_version <value>", description: "Alias for --affected-version" }]
279
+ },
280
+ {
281
+ target: "fixedVersion",
282
+ keys: ["fixedVersion", "fixed_version"],
283
+ option: "--fixed-version <value>",
284
+ description: "Fixed version identifier",
285
+ aliasOptions: [{ option: "--fixed_version <value>", description: "Alias for --fixed-version" }]
286
+ },
287
+ { target: "component", keys: ["component"], option: "--component <value>", description: "Issue component ownership" },
288
+ { target: "regression", keys: ["regression"], option: "--regression <value>", description: "Regression marker: true|false|1|0" },
289
+ {
290
+ target: "customerImpact",
291
+ keys: ["customerImpact", "customer_impact"],
292
+ option: "--customer-impact <value>",
293
+ description: "Customer impact summary",
294
+ aliasOptions: [{ option: "--customer_impact <value>", description: "Alias for --customer-impact" }]
295
+ },
296
+ {
297
+ target: "dep",
298
+ keys: ["dep"],
299
+ option: "--dep <value>",
300
+ description: "Seed dependency entry (key=value CSV, markdown key:value lines, or - for stdin; repeatable)",
301
+ repeatable: true
302
+ },
303
+ {
304
+ target: "typeOption",
305
+ keys: ["typeOption", "type_option"],
306
+ option: "--type-option <value>",
307
+ description: "Type option key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",
308
+ repeatable: true,
309
+ aliasOptions: [{ option: "--type_option <value>", description: "Alias for --type-option" }]
310
+ },
311
+ {
312
+ target: "unset",
313
+ keys: ["unset"],
314
+ option: "--unset <field>",
315
+ description: "Clear scalar metadata field by name (repeatable)",
316
+ repeatable: true
317
+ },
318
+ {
319
+ target: "reminder",
320
+ keys: ["reminder"],
321
+ option: "--reminder <value>",
322
+ description: "Seed reminder entry at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",
323
+ repeatable: true
324
+ },
325
+ {
326
+ target: "event",
327
+ keys: ["event"],
328
+ option: "--event <value>",
329
+ description: "Seed event entry start=<iso|relative>,end=<iso|relative>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",
330
+ repeatable: true
331
+ },
332
+ {
333
+ target: "comment",
334
+ keys: ["comment"],
335
+ option: "--comment <value>",
336
+ description: "Seed comment entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",
337
+ repeatable: true
338
+ },
339
+ {
340
+ target: "note",
341
+ keys: ["note"],
342
+ option: "--note <value>",
343
+ description: "Seed note entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",
344
+ repeatable: true
345
+ },
346
+ {
347
+ target: "learning",
348
+ keys: ["learning"],
349
+ option: "--learning <value>",
350
+ description: "Seed learning entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",
351
+ repeatable: true
352
+ },
353
+ {
354
+ target: "file",
355
+ keys: ["file"],
356
+ option: "--file <value>",
357
+ description: "Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)",
358
+ repeatable: true
359
+ },
360
+ {
361
+ target: "test",
362
+ keys: ["test"],
363
+ option: "--test <value>",
364
+ description: "Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)",
365
+ repeatable: true
366
+ },
367
+ {
368
+ target: "doc",
369
+ keys: ["doc"],
370
+ option: "--doc <value>",
371
+ description: "Seed linked doc entry (CSV/markdown pairs or - for stdin; repeatable)",
372
+ repeatable: true
373
+ }
374
+ ];
375
+ var CREATE_COMMANDER_STRING_OPTION_CONTRACTS = CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS.filter((entry) => entry.repeatable !== true).map((entry) => ({ target: entry.target, keys: entry.keys }));
376
+ var CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS = CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS.filter((entry) => entry.repeatable === true).map((entry) => ({ target: entry.target, keys: entry.keys }));
377
+ var UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
378
+ { target: "title", keys: ["title"], option: "--title, -t <value>", description: "Set title" },
379
+ { target: "description", keys: ["description"], option: "--description, -d <value>", description: "Set description" },
380
+ { target: "body", keys: ["body"], option: "--body, -b <value>", description: "Set body (allow empty string)" },
381
+ { target: "status", keys: ["status"], option: "--status, -s <value>", description: "Set status (use close command for closed)" },
382
+ {
383
+ target: "closeReason",
384
+ keys: ["closeReason", "close_reason"],
385
+ option: "--close-reason <value>",
386
+ description: "Set close reason",
387
+ aliasOptions: [{ option: "--close_reason <value>", description: "Alias for --close-reason" }]
388
+ },
389
+ { target: "priority", keys: ["priority"], option: "--priority, -p <value>", description: "Set priority" },
390
+ { target: "type", keys: ["type"], option: "--type <value>", description: "Set type" },
391
+ { target: "tags", keys: ["tags"], option: "--tags <value>", description: "Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively." },
392
+ {
393
+ target: "addTags",
394
+ keys: ["addTags", "add_tags"],
395
+ option: "--add-tags <value>",
396
+ description: "Add tags to the existing list without replacing it (repeatable; CSV accepted)",
397
+ repeatable: true,
398
+ aliasOptions: [{ option: "--add_tags <value>", description: "Alias for --add-tags" }]
399
+ },
400
+ {
401
+ target: "removeTags",
402
+ keys: ["removeTags", "remove_tags"],
403
+ option: "--remove-tags <value>",
404
+ description: "Remove tags from the existing list (repeatable; CSV accepted)",
405
+ repeatable: true,
406
+ aliasOptions: [{ option: "--remove_tags <value>", description: "Alias for --remove-tags" }]
407
+ },
408
+ { target: "deadline", keys: ["deadline"], option: "--deadline <value>", description: "Set deadline (ISO/date string or relative)" },
409
+ {
410
+ target: "estimatedMinutes",
411
+ keys: ["estimate", "estimatedMinutes", "estimated_minutes"],
412
+ option: "--estimate, --estimated-minutes <value>",
413
+ description: "Set estimated minutes",
414
+ aliasOptions: [{ option: "--estimated_minutes <value>", description: "Alias for --estimated-minutes" }]
415
+ },
416
+ {
417
+ target: "acceptanceCriteria",
418
+ keys: ["acceptanceCriteria", "acceptance_criteria", "ac"],
419
+ option: "--acceptance-criteria <value>",
420
+ description: "Set acceptance criteria",
421
+ aliasOptions: [
422
+ { option: "--acceptance_criteria <value>", description: "Alias for --acceptance-criteria" },
423
+ { option: "--ac <value>", description: "Alias for --acceptance-criteria" }
424
+ ]
425
+ },
426
+ {
427
+ target: "definitionOfReady",
428
+ keys: ["definitionOfReady", "definition_of_ready"],
429
+ option: "--definition-of-ready <value>",
430
+ description: "Set definition of ready",
431
+ aliasOptions: [{ option: "--definition_of_ready <value>", description: "Alias for --definition-of-ready" }]
432
+ },
433
+ { target: "order", keys: ["order"], option: "--order <value>", description: "Set planning order/rank integer" },
434
+ { target: "rank", keys: ["rank"], option: "--rank <value>", description: "Alias for --order" },
435
+ { target: "goal", keys: ["goal"], option: "--goal <value>", description: "Set goal identifier" },
436
+ { target: "objective", keys: ["objective"], option: "--objective <value>", description: "Set objective identifier" },
437
+ { target: "value", keys: ["value"], option: "--value <value>", description: "Set business value summary" },
438
+ { target: "impact", keys: ["impact"], option: "--impact <value>", description: "Set business impact summary" },
439
+ { target: "outcome", keys: ["outcome"], option: "--outcome <value>", description: "Set expected outcome summary" },
440
+ {
441
+ target: "whyNow",
442
+ keys: ["whyNow", "why_now"],
443
+ option: "--why-now <value>",
444
+ description: "Set why-now rationale",
445
+ aliasOptions: [{ option: "--why_now <value>", description: "Alias for --why-now" }]
446
+ },
447
+ { target: "author", keys: ["author"], option: "--author <value>", description: "Mutation author" },
448
+ { target: "message", keys: ["message"], option: "--message <value>", description: "Mutation message" },
449
+ { target: "assignee", keys: ["assignee"], option: "--assignee <value>", description: "Set assignee" },
450
+ { target: "parent", keys: ["parent"], option: "--parent <value>", description: "Set parent item ID" },
451
+ { target: "reviewer", keys: ["reviewer"], option: "--reviewer <value>", description: "Set reviewer" },
452
+ { target: "risk", keys: ["risk"], option: "--risk <value>", description: "Set risk level: low|med|medium|high|critical (med persists as medium)" },
453
+ {
454
+ target: "confidence",
455
+ keys: ["confidence"],
456
+ option: "--confidence <value>",
457
+ description: "Set confidence level: 0..100|low|med|medium|high (med persists as medium)"
458
+ },
459
+ { target: "sprint", keys: ["sprint"], option: "--sprint <value>", description: "Set sprint identifier" },
460
+ { target: "release", keys: ["release"], option: "--release <value>", description: "Set release identifier" },
461
+ {
462
+ target: "blockedBy",
463
+ keys: ["blockedBy", "blocked_by"],
464
+ option: "--blocked-by <value>",
465
+ description: "Set blocked-by item ID or reason",
466
+ aliasOptions: [{ option: "--blocked_by <value>", description: "Alias for --blocked-by" }]
467
+ },
468
+ {
469
+ target: "blockedReason",
470
+ keys: ["blockedReason", "blocked_reason"],
471
+ option: "--blocked-reason <value>",
472
+ description: "Set blocked reason",
473
+ aliasOptions: [{ option: "--blocked_reason <value>", description: "Alias for --blocked-reason" }]
474
+ },
475
+ {
476
+ target: "unblockNote",
477
+ keys: ["unblockNote", "unblock_note"],
478
+ option: "--unblock-note <value>",
479
+ description: "Set unblock rationale note",
480
+ aliasOptions: [{ option: "--unblock_note <value>", description: "Alias for --unblock-note" }]
481
+ },
482
+ { target: "reporter", keys: ["reporter"], option: "--reporter <value>", description: "Set issue reporter" },
483
+ {
484
+ target: "severity",
485
+ keys: ["severity"],
486
+ option: "--severity <value>",
487
+ description: "Set issue severity: low|med|medium|high|critical (med persists as medium)"
488
+ },
489
+ { target: "environment", keys: ["environment"], option: "--environment <value>", description: "Set issue environment context" },
490
+ {
491
+ target: "reproSteps",
492
+ keys: ["reproSteps", "repro_steps"],
493
+ option: "--repro-steps <value>",
494
+ description: "Set issue reproduction steps",
495
+ aliasOptions: [{ option: "--repro_steps <value>", description: "Alias for --repro-steps" }]
496
+ },
497
+ { target: "resolution", keys: ["resolution"], option: "--resolution <value>", description: "Set issue resolution summary" },
498
+ {
499
+ target: "expectedResult",
500
+ keys: ["expectedResult", "expected_result", "expected"],
501
+ option: "--expected-result <value>",
502
+ description: "Set issue expected behavior",
503
+ aliasOptions: [
504
+ { option: "--expected_result <value>", description: "Alias for --expected-result" },
505
+ { option: "--expected <value>", description: "Short alias for --expected-result" }
506
+ ]
507
+ },
508
+ {
509
+ target: "actualResult",
510
+ keys: ["actualResult", "actual_result", "actual"],
511
+ option: "--actual-result <value>",
512
+ description: "Set issue observed behavior",
513
+ aliasOptions: [
514
+ { option: "--actual_result <value>", description: "Alias for --actual-result" },
515
+ { option: "--actual <value>", description: "Short alias for --actual-result" }
516
+ ]
517
+ },
518
+ {
519
+ target: "affectedVersion",
520
+ keys: ["affectedVersion", "affected_version"],
521
+ option: "--affected-version <value>",
522
+ description: "Set affected version identifier",
523
+ aliasOptions: [{ option: "--affected_version <value>", description: "Alias for --affected-version" }]
524
+ },
525
+ {
526
+ target: "fixedVersion",
527
+ keys: ["fixedVersion", "fixed_version"],
528
+ option: "--fixed-version <value>",
529
+ description: "Set fixed version identifier",
530
+ aliasOptions: [{ option: "--fixed_version <value>", description: "Alias for --fixed-version" }]
531
+ },
532
+ { target: "component", keys: ["component"], option: "--component <value>", description: "Set issue component ownership" },
533
+ { target: "regression", keys: ["regression"], option: "--regression <value>", description: "Set regression marker: true|false|1|0" },
534
+ {
535
+ target: "customerImpact",
536
+ keys: ["customerImpact", "customer_impact"],
537
+ option: "--customer-impact <value>",
538
+ description: "Set customer impact summary",
539
+ aliasOptions: [{ option: "--customer_impact <value>", description: "Alias for --customer-impact" }]
540
+ },
541
+ {
542
+ target: "dep",
543
+ keys: ["dep"],
544
+ option: "--dep <value>",
545
+ description: "Add dependency entries id=<id>,kind=<value>,author=<value>,created_at=<iso|now>,source_kind=<value> (repeatable)",
546
+ repeatable: true
547
+ },
548
+ {
549
+ target: "depRemove",
550
+ keys: ["depRemove", "dep_remove"],
551
+ option: "--dep-remove <value>",
552
+ description: "Remove dependencies by id or id=<id>,kind=<value>,source_kind=<value> selectors (repeatable)",
553
+ repeatable: true,
554
+ aliasOptions: [{ option: "--dep_remove <value>", description: "Alias for --dep-remove" }]
555
+ },
556
+ {
557
+ target: "comment",
558
+ keys: ["comment"],
559
+ option: "--comment <value>",
560
+ description: "Append comment seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",
561
+ repeatable: true
562
+ },
563
+ {
564
+ target: "note",
565
+ keys: ["note"],
566
+ option: "--note <value>",
567
+ description: "Append note seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",
568
+ repeatable: true
569
+ },
570
+ {
571
+ target: "learning",
572
+ keys: ["learning"],
573
+ option: "--learning <value>",
574
+ description: "Append learning seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",
575
+ repeatable: true
576
+ },
577
+ {
578
+ target: "file",
579
+ keys: ["file"],
580
+ option: "--file <value>",
581
+ description: "Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",
582
+ repeatable: true
583
+ },
584
+ {
585
+ target: "test",
586
+ keys: ["test"],
587
+ option: "--test <value>",
588
+ description: "Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)",
589
+ repeatable: true
590
+ },
591
+ {
592
+ target: "doc",
593
+ keys: ["doc"],
594
+ option: "--doc <value>",
595
+ description: "Append linked doc path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",
596
+ repeatable: true
597
+ },
598
+ {
599
+ target: "reminder",
600
+ keys: ["reminder"],
601
+ option: "--reminder <value>",
602
+ description: "Set reminders at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",
603
+ repeatable: true
604
+ },
605
+ {
606
+ target: "event",
607
+ keys: ["event"],
608
+ option: "--event <value>",
609
+ description: "Set events start=<iso|relative>,end=<iso|relative>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",
610
+ repeatable: true
611
+ },
612
+ {
613
+ target: "typeOption",
614
+ keys: ["typeOption", "type_option"],
615
+ option: "--type-option <value>",
616
+ description: "Set type options key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",
617
+ repeatable: true,
618
+ aliasOptions: [{ option: "--type_option <value>", description: "Alias for --type-option" }]
619
+ },
620
+ {
621
+ target: "unset",
622
+ keys: ["unset"],
623
+ option: "--unset <field>",
624
+ description: "Clear scalar metadata field by name (repeatable)",
625
+ repeatable: true
626
+ }
627
+ ];
628
+ var UPDATE_COMMANDER_STRING_OPTION_CONTRACTS = UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS.filter((entry) => entry.repeatable !== true).map((entry) => ({ target: entry.target, keys: entry.keys }));
629
+ var UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS = UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS.filter((entry) => entry.repeatable === true).map((entry) => ({ target: entry.target, keys: entry.keys }));
630
+
631
+ // dist/sdk/cli-contracts/enum-contracts.js
632
+ !(function() {
633
+ try {
634
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
635
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e93f5c1f-0703-5c95-b7b8-84264cf9ed1f");
636
+ } catch (e2) {
637
+ }
638
+ })();
639
+ var PM_EXTENSION_CAPABILITY_CONTRACTS = [...KNOWN_EXTENSION_CAPABILITIES];
640
+ var PM_EXTENSION_SERVICE_NAME_CONTRACTS = [...KNOWN_EXTENSION_SERVICE_NAMES];
641
+ var PM_EXTENSION_POLICY_MODE_CONTRACTS = [...KNOWN_EXTENSION_POLICY_MODES];
642
+ var PM_EXTENSION_TRUST_MODE_CONTRACTS = [...KNOWN_EXTENSION_TRUST_MODES];
643
+ var PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS = [...KNOWN_EXTENSION_SANDBOX_PROFILES];
644
+ var PM_EXTENSION_POLICY_SURFACE_CONTRACTS = [...KNOWN_EXTENSION_POLICY_SURFACES];
645
+ var PM_CORE_COMMAND_NAMES = [
646
+ "init",
647
+ "config",
648
+ "extension",
649
+ "package",
650
+ "packages",
651
+ "install",
652
+ "upgrade",
653
+ "create",
654
+ "list",
655
+ "list-all",
656
+ "list-draft",
657
+ "list-open",
658
+ "list-in-progress",
659
+ "list-blocked",
660
+ "list-closed",
661
+ "list-canceled",
662
+ "aggregate",
663
+ "context",
664
+ "ctx",
665
+ "get",
666
+ "search",
667
+ "history",
668
+ "history-redact",
669
+ "history-repair",
670
+ "schema",
671
+ "activity",
672
+ "restore",
673
+ "update",
674
+ "update-many",
675
+ "close",
676
+ "delete",
677
+ "append",
678
+ "comments",
679
+ "notes",
680
+ "learnings",
681
+ "files",
682
+ "docs",
683
+ "deps",
684
+ "plan",
685
+ "test",
686
+ "test-all",
687
+ "stats",
688
+ "health",
689
+ "validate",
690
+ "gc",
691
+ "contracts",
692
+ "claim",
693
+ "release",
694
+ "start-task",
695
+ "pause-task",
696
+ "close-task",
697
+ "help"
698
+ ];
699
+ var PM_TOOL_ACTIONS = [
700
+ "init",
701
+ "config",
702
+ "extension-init",
703
+ "extension-install",
704
+ "extension-uninstall",
705
+ "extension-explore",
706
+ "extension-manage",
707
+ "extension-reload",
708
+ "extension-doctor",
709
+ "extension-catalog",
710
+ "extension-adopt",
711
+ "extension-adopt-all",
712
+ "extension-activate",
713
+ "extension-deactivate",
714
+ "extension",
715
+ "package-init",
716
+ "package-install",
717
+ "package-uninstall",
718
+ "package-explore",
719
+ "package-manage",
720
+ "package-reload",
721
+ "package-doctor",
722
+ "package-catalog",
723
+ "package-adopt",
724
+ "package-adopt-all",
725
+ "package-activate",
726
+ "package-deactivate",
727
+ "package",
728
+ "install",
729
+ "upgrade",
730
+ "create",
731
+ "list",
732
+ "list-all",
733
+ "list-draft",
734
+ "list-open",
735
+ "list-in-progress",
736
+ "list-blocked",
737
+ "list-closed",
738
+ "list-canceled",
739
+ "aggregate",
740
+ "context",
741
+ "ctx",
742
+ "get",
743
+ "search",
744
+ "history",
745
+ "history-redact",
746
+ "history-repair",
747
+ "schema",
748
+ "activity",
749
+ "restore",
750
+ "update",
751
+ "update-many",
752
+ "close",
753
+ "delete",
754
+ "append",
755
+ "comments",
756
+ "plan",
757
+ "notes",
758
+ "learnings",
759
+ "files",
760
+ "docs",
761
+ "deps",
762
+ "test",
763
+ "test-all",
764
+ "stats",
765
+ "health",
766
+ "validate",
767
+ "gc",
768
+ "contracts",
769
+ "claim",
770
+ "release",
771
+ "start-task",
772
+ "pause-task",
773
+ "close-task"
774
+ ];
775
+
776
+ // dist/sdk/cli-contracts/tool-option-contracts.js
777
+ !(function() {
778
+ try {
779
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
780
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f77c9493-e7b2-5549-a205-1b67dc69700e");
781
+ } catch (e2) {
782
+ }
783
+ })();
784
+ var TOOL_LIST_FILTER_OPTION_CONTRACTS = [
785
+ { param: "status", flag: "--status" },
786
+ { param: "type", flag: "--type" },
787
+ { param: "tag", flag: "--tag" },
788
+ { param: "priority", flag: "--priority" },
789
+ { param: "deadlineBefore", flag: "--deadline-before" },
790
+ { param: "deadlineAfter", flag: "--deadline-after" },
791
+ { param: "assignee", flag: "--assignee" },
792
+ { param: "assigneeFilter", flag: "--assignee-filter" },
793
+ { param: "parent", flag: "--parent" },
794
+ { param: "sprint", flag: "--sprint" },
795
+ { param: "release", flag: "--release" },
796
+ { param: "limit", flag: "--limit" },
797
+ { param: "offset", flag: "--offset" },
798
+ { param: "fields", flag: "--fields" },
799
+ { param: "sort", flag: "--sort" },
800
+ { param: "order", flag: "--order" }
801
+ ];
802
+ var TOOL_AGGREGATE_OPTION_CONTRACTS = [
803
+ { param: "groupBy", flag: "--group-by" },
804
+ { param: "status", flag: "--status" },
805
+ { param: "type", flag: "--type" },
806
+ { param: "tag", flag: "--tag" },
807
+ { param: "priority", flag: "--priority" },
808
+ { param: "deadlineBefore", flag: "--deadline-before" },
809
+ { param: "deadlineAfter", flag: "--deadline-after" },
810
+ { param: "assignee", flag: "--assignee" },
811
+ { param: "assigneeFilter", flag: "--assignee-filter" },
812
+ { param: "parent", flag: "--parent" },
813
+ { param: "sprint", flag: "--sprint" },
814
+ { param: "release", flag: "--release" }
815
+ ];
816
+ var TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS = [
817
+ { param: "mode", flag: "--mode" },
818
+ { param: "limit", flag: "--limit" },
819
+ { param: "threshold", flag: "--threshold" },
820
+ { param: "status", flag: "--status" },
821
+ { param: "type", flag: "--type" },
822
+ { param: "tag", flag: "--tag" },
823
+ { param: "priority", flag: "--priority" },
824
+ { param: "deadlineBefore", flag: "--deadline-before" },
825
+ { param: "deadlineAfter", flag: "--deadline-after" },
826
+ { param: "assignee", flag: "--assignee" },
827
+ { param: "assigneeFilter", flag: "--assignee-filter" },
828
+ { param: "parent", flag: "--parent" },
829
+ { param: "sprint", flag: "--sprint" },
830
+ { param: "release", flag: "--release" }
831
+ ];
832
+ var TOOL_SEARCH_FILTER_OPTION_CONTRACTS = [
833
+ { param: "type", flag: "--type" },
834
+ { param: "tag", flag: "--tag" },
835
+ { param: "priority", flag: "--priority" },
836
+ { param: "deadlineBefore", flag: "--deadline-before" },
837
+ { param: "deadlineAfter", flag: "--deadline-after" },
838
+ { param: "fields", flag: "--fields" },
839
+ { param: "limit", flag: "--limit" }
840
+ ];
841
+ var TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
842
+ { param: "parent", flag: "--parent" },
843
+ { param: "reviewer", flag: "--reviewer" },
844
+ { param: "risk", flag: "--risk" },
845
+ { param: "confidence", flag: "--confidence" },
846
+ { param: "sprint", flag: "--sprint" },
847
+ { param: "release", flag: "--release" },
848
+ { param: "blockedBy", flag: "--blocked-by" },
849
+ { param: "blockedReason", flag: "--blocked-reason" },
850
+ { param: "unblockNote", flag: "--unblock-note" },
851
+ { param: "reporter", flag: "--reporter" },
852
+ { param: "severity", flag: "--severity" },
853
+ { param: "environment", flag: "--environment" },
854
+ { param: "reproSteps", flag: "--repro-steps" },
855
+ { param: "resolution", flag: "--resolution" },
856
+ { param: "expectedResult", flag: "--expected-result" },
857
+ { param: "actualResult", flag: "--actual-result" },
858
+ { param: "affectedVersion", flag: "--affected-version" },
859
+ { param: "fixedVersion", flag: "--fixed-version" },
860
+ { param: "component", flag: "--component" },
861
+ { param: "regression", flag: "--regression", booleanish: true },
862
+ { param: "customerImpact", flag: "--customer-impact" },
863
+ { param: "definitionOfReady", flag: "--definition-of-ready", allowEmpty: true },
864
+ { param: "order", flag: "--order" },
865
+ { param: "goal", flag: "--goal" },
866
+ { param: "objective", flag: "--objective" },
867
+ { param: "value", flag: "--value" },
868
+ { param: "impact", flag: "--impact" },
869
+ { param: "outcome", flag: "--outcome" },
870
+ { param: "whyNow", flag: "--why-now" }
871
+ ];
872
+ var TOOL_CREATE_OPTION_CONTRACTS = [
873
+ { param: "title", flag: "--title" },
874
+ { param: "description", flag: "--description", allowEmpty: true },
875
+ { param: "type", flag: "--type" },
876
+ { param: "template", flag: "--template" },
877
+ { param: "createMode", flag: "--create-mode" },
878
+ { param: "schedulePreset", flag: "--schedule-preset" },
879
+ { param: "status", flag: "--status" },
880
+ { param: "priority", flag: "--priority" },
881
+ { param: "tags", flag: "--tags", allowEmpty: true },
882
+ { param: "addTags", flag: "--add-tags", repeatable: true },
883
+ { param: "body", flag: "--body", allowEmpty: true },
884
+ { param: "deadline", flag: "--deadline" },
885
+ { param: "estimate", flag: "--estimate" },
886
+ { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
887
+ { param: "author", flag: "--author" },
888
+ { param: "message", flag: "--message", allowEmpty: true },
889
+ { param: "assignee", flag: "--assignee" },
890
+ { param: "reminder", flag: "--reminder", repeatable: true },
891
+ { param: "event", flag: "--event", repeatable: true },
892
+ { param: "typeOption", flag: "--type-option", repeatable: true },
893
+ { param: "dep", flag: "--dep", repeatable: true },
894
+ { param: "comment", flag: "--comment", repeatable: true },
895
+ { param: "note", flag: "--note", repeatable: true },
896
+ { param: "learning", flag: "--learning", repeatable: true },
897
+ { param: "linkedFile", flag: "--file", repeatable: true },
898
+ { param: "linkedTest", flag: "--test", repeatable: true },
899
+ { param: "doc", flag: "--doc", repeatable: true },
900
+ { param: "unset", flag: "--unset", repeatable: true },
901
+ { param: "clearDeps", flag: "--clear-deps" },
902
+ { param: "clearComments", flag: "--clear-comments" },
903
+ { param: "clearNotes", flag: "--clear-notes" },
904
+ { param: "clearLearnings", flag: "--clear-learnings" },
905
+ { param: "clearFiles", flag: "--clear-files" },
906
+ { param: "clearTests", flag: "--clear-tests" },
907
+ { param: "clearDocs", flag: "--clear-docs" },
908
+ { param: "clearReminders", flag: "--clear-reminders" },
909
+ { param: "clearEvents", flag: "--clear-events" },
910
+ { param: "clearTypeOptions", flag: "--clear-type-options" }
911
+ ];
912
+ var TOOL_UPDATE_OPTION_CONTRACTS = [
913
+ { param: "title", flag: "--title" },
914
+ { param: "description", flag: "--description", allowEmpty: true },
915
+ { param: "body", flag: "--body", allowEmpty: true },
916
+ { param: "status", flag: "--status" },
917
+ { param: "closeReason", flag: "--close-reason" },
918
+ { param: "priority", flag: "--priority" },
919
+ { param: "type", flag: "--type" },
920
+ { param: "tags", flag: "--tags", allowEmpty: true },
921
+ { param: "addTags", flag: "--add-tags", repeatable: true },
922
+ { param: "removeTags", flag: "--remove-tags", repeatable: true },
923
+ { param: "deadline", flag: "--deadline" },
924
+ { param: "estimate", flag: "--estimate" },
925
+ { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
926
+ { param: "author", flag: "--author" },
927
+ { param: "message", flag: "--message", allowEmpty: true },
928
+ { param: "assignee", flag: "--assignee" },
929
+ { param: "dep", flag: "--dep", repeatable: true },
930
+ { param: "depRemove", flag: "--dep-remove", repeatable: true },
931
+ { param: "replaceDeps", flag: "--replace-deps" },
932
+ { param: "replaceTests", flag: "--replace-tests" },
933
+ { param: "comment", flag: "--comment", repeatable: true },
934
+ { param: "note", flag: "--note", repeatable: true },
935
+ { param: "learning", flag: "--learning", repeatable: true },
936
+ { param: "linkedFile", flag: "--file", repeatable: true },
937
+ { param: "linkedTest", flag: "--test", repeatable: true },
938
+ { param: "doc", flag: "--doc", repeatable: true },
939
+ { param: "reminder", flag: "--reminder", repeatable: true },
940
+ { param: "event", flag: "--event", repeatable: true },
941
+ { param: "typeOption", flag: "--type-option", repeatable: true },
942
+ { param: "unset", flag: "--unset", repeatable: true },
943
+ { param: "clearDeps", flag: "--clear-deps" },
944
+ { param: "clearComments", flag: "--clear-comments" },
945
+ { param: "clearNotes", flag: "--clear-notes" },
946
+ { param: "clearLearnings", flag: "--clear-learnings" },
947
+ { param: "clearFiles", flag: "--clear-files" },
948
+ { param: "clearTests", flag: "--clear-tests" },
949
+ { param: "clearDocs", flag: "--clear-docs" },
950
+ { param: "clearReminders", flag: "--clear-reminders" },
951
+ { param: "clearEvents", flag: "--clear-events" },
952
+ { param: "clearTypeOptions", flag: "--clear-type-options" },
953
+ { param: "allowAuditUpdate", flag: "--allow-audit-update" },
954
+ { param: "allowAuditDepUpdate", flag: "--allow-audit-dep-update" }
955
+ ];
956
+ var TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
957
+ { param: "filterStatus", flag: "--filter-status" },
958
+ { param: "filterType", flag: "--filter-type" },
959
+ { param: "filterTag", flag: "--filter-tag" },
960
+ { param: "filterPriority", flag: "--filter-priority" },
961
+ { param: "filterDeadlineBefore", flag: "--filter-deadline-before" },
962
+ { param: "filterDeadlineAfter", flag: "--filter-deadline-after" },
963
+ { param: "filterAssignee", flag: "--filter-assignee" },
964
+ { param: "filterAssigneeFilter", flag: "--filter-assignee-filter" },
965
+ { param: "filterParent", flag: "--filter-parent" },
966
+ { param: "filterSprint", flag: "--filter-sprint" },
967
+ { param: "filterRelease", flag: "--filter-release" },
968
+ { param: "limit", flag: "--limit" },
969
+ { param: "offset", flag: "--offset" }
970
+ ];
971
+ var TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS = [...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS];
972
+ var TOOL_ACTIVITY_OPTION_CONTRACTS = [
973
+ { param: "id", flag: "--id" },
974
+ { param: "op", flag: "--op" },
975
+ { param: "author", flag: "--author" },
976
+ { param: "from", flag: "--from" },
977
+ { param: "to", flag: "--to" },
978
+ { param: "limit", flag: "--limit" },
979
+ { param: "compact", flag: "--compact" },
980
+ { param: "full", flag: "--full" }
981
+ ];
982
+ var TOOL_CONTEXT_OPTION_CONTRACTS = [
983
+ { param: "date", flag: "--date" },
984
+ { param: "from", flag: "--from" },
985
+ { param: "to", flag: "--to" },
986
+ { param: "type", flag: "--type" },
987
+ { param: "tag", flag: "--tag" },
988
+ { param: "priority", flag: "--priority" },
989
+ { param: "assignee", flag: "--assignee" },
990
+ { param: "assigneeFilter", flag: "--assignee-filter" },
991
+ { param: "sprint", flag: "--sprint" },
992
+ { param: "release", flag: "--release" },
993
+ { param: "limit", flag: "--limit" },
994
+ { param: "format", flag: "--format" },
995
+ { param: "depth", flag: "--depth" },
996
+ { param: "section", flag: "--section", repeatable: true },
997
+ { param: "activityLimit", flag: "--activity-limit" },
998
+ { param: "staleThreshold", flag: "--stale-threshold" }
999
+ ];
1000
+
1001
+ // dist/sdk/cli-contracts/tool-parameter-tables.js
1002
+ !(function() {
1003
+ try {
1004
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
1005
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "09eef83c-817b-5d26-8f58-016e2c7c39ad");
1006
+ } catch (e2) {
1007
+ }
1008
+ })();
1009
+ var PM_TOOL_PARAMETER_PROPERTIES = {
1010
+ json: { type: "boolean", default: true },
1011
+ quiet: { type: "boolean" },
1012
+ profile: { type: "boolean" },
1013
+ noExtensions: { type: "boolean" },
1014
+ noPager: { type: "boolean" },
1015
+ path: { type: "string" },
1016
+ pmExecutable: { type: "string" },
1017
+ timeoutMs: { type: "number" },
1018
+ id: { type: "string" },
1019
+ target: { type: "string" },
1020
+ github: { type: "string" },
1021
+ ref: { type: "string" },
1022
+ query: { type: "string" },
1023
+ keywords: { type: "string" },
1024
+ fields: { type: "string" },
1025
+ sort: { type: "string", enum: ["priority", "deadline", "updated_at", "created_at", "title", "parent"] },
1026
+ prefix: { type: "string" },
1027
+ preset: { type: "string", enum: ["minimal", "default", "strict", "custom"] },
1028
+ defaults: { type: "boolean" },
1029
+ agentGuidance: { type: "string", enum: ["ask", "add", "skip", "status"] },
1030
+ withPackages: { type: "boolean" },
1031
+ scope: { type: "string", enum: ["project", "global"] },
1032
+ contractAction: { type: "string" },
1033
+ command: { type: "string" },
1034
+ schemaOnly: { type: "boolean" },
1035
+ flagsOnly: { type: "boolean" },
1036
+ availabilityOnly: { type: "boolean" },
1037
+ runtimeOnly: { type: "boolean" },
1038
+ activeOnly: { type: "boolean" },
1039
+ eagerTags: { type: "boolean" },
1040
+ configAction: { type: "string", enum: ["get", "set", "list", "export"] },
1041
+ key: { type: "string" },
1042
+ title: { type: "string" },
1043
+ description: { type: "string" },
1044
+ type: { type: "string" },
1045
+ template: { type: "string" },
1046
+ createMode: { type: "string", enum: ["strict", "progressive"] },
1047
+ schedulePreset: { type: "string", enum: ["lightweight"] },
1048
+ status: { type: "string" },
1049
+ filterStatus: { type: "string" },
1050
+ filterType: { type: "string" },
1051
+ filterTag: { type: "string" },
1052
+ filterPriority: { anyOf: [{ type: "string" }, { type: "number" }] },
1053
+ filterDeadlineBefore: { type: "string" },
1054
+ filterDeadlineAfter: { type: "string" },
1055
+ filterAssignee: { type: "string" },
1056
+ filterAssigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1057
+ filterParent: { type: "string" },
1058
+ filterSprint: { type: "string" },
1059
+ filterRelease: { type: "string" },
1060
+ closeReason: { type: "string" },
1061
+ priority: { anyOf: [{ type: "string" }, { type: "number" }] },
1062
+ tags: { type: "string" },
1063
+ addTags: { type: "array", items: { type: "string" } },
1064
+ removeTags: { type: "array", items: { type: "string" } },
1065
+ body: { type: "string" },
1066
+ deadline: { type: "string" },
1067
+ estimate: { anyOf: [{ type: "string" }, { type: "number" }] },
1068
+ acceptanceCriteria: { type: "string" },
1069
+ author: { type: "string" },
1070
+ message: { type: "string" },
1071
+ assignee: { type: "string" },
1072
+ assigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1073
+ parent: { type: "string" },
1074
+ reviewer: { type: "string" },
1075
+ risk: { type: "string" },
1076
+ confidence: { anyOf: [{ type: "string" }, { type: "number" }] },
1077
+ sprint: { type: "string" },
1078
+ release: { type: "string" },
1079
+ blockedBy: { type: "string" },
1080
+ blockedReason: { type: "string" },
1081
+ unblockNote: { type: "string" },
1082
+ reporter: { type: "string" },
1083
+ severity: { type: "string" },
1084
+ environment: { type: "string" },
1085
+ reproSteps: { type: "string" },
1086
+ resolution: { type: "string" },
1087
+ expectedResult: { type: "string" },
1088
+ actualResult: { type: "string" },
1089
+ affectedVersion: { type: "string" },
1090
+ fixedVersion: { type: "string" },
1091
+ component: { type: "string" },
1092
+ regression: { anyOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] },
1093
+ customerImpact: { type: "string" },
1094
+ definitionOfReady: { type: "string" },
1095
+ order: { anyOf: [{ type: "string" }, { type: "number" }] },
1096
+ goal: { type: "string" },
1097
+ objective: { type: "string" },
1098
+ value: { type: "string" },
1099
+ impact: { type: "string" },
1100
+ outcome: { type: "string" },
1101
+ whyNow: { type: "string" },
1102
+ mode: {
1103
+ type: "string",
1104
+ enum: ["keyword", "semantic", "hybrid", "title_exact", "title_fuzzy", "parent_scope"]
1105
+ },
1106
+ op: { type: "string" },
1107
+ compact: { type: "boolean" },
1108
+ brief: { type: "boolean" },
1109
+ full: { type: "boolean" },
1110
+ view: { type: "string", enum: ["agenda", "day", "week", "month"] },
1111
+ date: { type: "string" },
1112
+ from: { type: "string" },
1113
+ to: { type: "string" },
1114
+ past: { type: "boolean" },
1115
+ fullPeriod: { type: "boolean" },
1116
+ include: { type: "string" },
1117
+ recurrenceLookaheadDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1118
+ recurrenceLookbackDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1119
+ occurrenceLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1120
+ includeLinked: { type: "boolean" },
1121
+ semantic: { type: "boolean" },
1122
+ hybrid: { type: "boolean" },
1123
+ titleExact: { type: "boolean" },
1124
+ phraseExact: { type: "boolean" },
1125
+ includeBody: { type: "boolean" },
1126
+ tag: { type: "string" },
1127
+ deadlineBefore: { type: "string" },
1128
+ deadlineAfter: { type: "string" },
1129
+ limit: { anyOf: [{ type: "string" }, { type: "number" }] },
1130
+ limitItems: { anyOf: [{ type: "string" }, { type: "number" }] },
1131
+ fullHistory: { type: "boolean" },
1132
+ latest: { anyOf: [{ type: "string" }, { type: "number" }] },
1133
+ offset: { anyOf: [{ type: "string" }, { type: "number" }] },
1134
+ progress: { type: "boolean" },
1135
+ background: { type: "boolean" },
1136
+ runId: { type: "string" },
1137
+ stream: {
1138
+ anyOf: [{ type: "boolean" }, { type: "string", enum: ["stdout", "stderr", "both", "rows", "ndjson", "jsonl"] }]
1139
+ },
1140
+ tail: { anyOf: [{ type: "string" }, { type: "number" }] },
1141
+ envSet: { type: "array", items: { type: "string" } },
1142
+ envClear: { type: "array", items: { type: "string" } },
1143
+ sharedHostSafe: { type: "boolean" },
1144
+ detail: { type: "string", enum: ["summary", "deep"] },
1145
+ trace: { type: "boolean" },
1146
+ reload: { type: "boolean" },
1147
+ watch: { type: "boolean" },
1148
+ runtimeProbe: { type: "boolean" },
1149
+ fixManagedState: { type: "boolean" },
1150
+ pmContext: { type: "string", enum: ["schema", "tracker", "auto"] },
1151
+ overrideLinkedPmContext: { type: "boolean" },
1152
+ failOnContextMismatch: { type: "boolean" },
1153
+ failOnSkipped: { type: "boolean" },
1154
+ failOnEmptyTestRun: { type: "boolean" },
1155
+ requireAssertionsForPm: { type: "boolean" },
1156
+ checkContext: { type: "boolean" },
1157
+ autoPmContext: { type: "boolean" },
1158
+ diff: { type: "boolean" },
1159
+ verify: { type: "boolean" },
1160
+ literal: { type: "array", items: { type: "string" } },
1161
+ regex: { type: "array", items: { type: "string" } },
1162
+ replacement: { type: "string" },
1163
+ timeout: { anyOf: [{ type: "string" }, { type: "number" }] },
1164
+ validateClose: { type: "string", enum: ["off", "warn", "strict"] },
1165
+ checkMetadata: { type: "boolean" },
1166
+ metadataProfile: { type: "string", enum: ["core", "strict", "custom"] },
1167
+ checkResolution: { type: "boolean" },
1168
+ checkLifecycle: { type: "boolean" },
1169
+ checkStaleBlockers: { type: "boolean" },
1170
+ dependencyCycleSeverity: { type: "string", enum: ["off", "warn", "error"] },
1171
+ checkFiles: { type: "boolean" },
1172
+ strictDirectories: { type: "boolean" },
1173
+ checkOnly: { type: "boolean" },
1174
+ checkTelemetry: { type: "boolean" },
1175
+ noRefresh: { type: "boolean" },
1176
+ refreshVectors: { type: "boolean" },
1177
+ verboseStaleItems: { type: "boolean" },
1178
+ skipVectors: { type: "boolean" },
1179
+ skipIntegrity: { type: "boolean" },
1180
+ skipDrift: { type: "boolean" },
1181
+ verboseDiagnostics: { type: "boolean" },
1182
+ scanMode: { type: "string", enum: ["default", "tracked-all", "tracked-all-strict"] },
1183
+ includePmInternals: { type: "boolean" },
1184
+ verboseFileLists: { type: "boolean" },
1185
+ strictExit: { type: "boolean" },
1186
+ failOnWarn: { type: "boolean" },
1187
+ checkHistoryDrift: { type: "boolean" },
1188
+ checkCommandReferences: { type: "boolean" },
1189
+ allowAuditNote: { type: "boolean" },
1190
+ allowAuditLearning: { type: "boolean" },
1191
+ allowAuditComment: { type: "boolean" },
1192
+ allowAuditUpdate: { type: "boolean" },
1193
+ allowAuditDepUpdate: { type: "boolean" },
1194
+ allowAuditRelease: { type: "boolean" },
1195
+ dryRun: { type: "boolean" },
1196
+ cliOnly: { type: "boolean" },
1197
+ packagesOnly: { type: "boolean" },
1198
+ repair: { type: "boolean" },
1199
+ packageName: { type: "string" },
1200
+ rollback: { type: "string" },
1201
+ noCheckpoint: { type: "boolean" },
1202
+ force: { type: "boolean" },
1203
+ run: { type: "boolean" },
1204
+ count: { type: "boolean" },
1205
+ includeUnparented: { type: "boolean" },
1206
+ gcScope: {
1207
+ type: "array",
1208
+ items: { type: "string", enum: ["index", "embeddings", "runtime"] }
1209
+ },
1210
+ maxDepth: { anyOf: [{ type: "string" }, { type: "number" }] },
1211
+ collapse: { type: "string", enum: ["none", "repeated"] },
1212
+ summary: { type: "boolean" },
1213
+ shell: { type: "string", enum: ["bash", "zsh", "fish"] },
1214
+ stdin: { type: "boolean" },
1215
+ file: { type: "string" },
1216
+ preserveSourceIds: { type: "boolean" },
1217
+ folder: { type: "string" },
1218
+ subcommand: { type: "string" },
1219
+ name: { type: "string" },
1220
+ defaultStatus: { type: "string" },
1221
+ alias: { type: "array", items: { type: "string" } },
1222
+ text: { type: "string" },
1223
+ add: { type: "array", items: { type: "string" } },
1224
+ addGlob: { type: "array", items: { type: "string" } },
1225
+ remove: { type: "array", items: { type: "string" } },
1226
+ migrate: { type: "array", items: { type: "string" } },
1227
+ discover: { type: "boolean" },
1228
+ apply: { type: "boolean" },
1229
+ discoveryNote: { type: "string" },
1230
+ appendStable: { type: "boolean" },
1231
+ validatePaths: { type: "boolean" },
1232
+ audit: { type: "boolean" },
1233
+ dep: { type: "array", items: { type: "string" } },
1234
+ depRemove: { type: "array", items: { type: "string" } },
1235
+ replaceDeps: { type: "boolean" },
1236
+ replaceTests: { type: "boolean" },
1237
+ comment: { type: "array", items: { type: "string" } },
1238
+ note: { type: "array", items: { type: "string" } },
1239
+ learning: { type: "array", items: { type: "string" } },
1240
+ linkedFile: { type: "array", items: { type: "string" } },
1241
+ linkedTest: { type: "array", items: { type: "string" } },
1242
+ doc: { type: "array", items: { type: "string" } },
1243
+ reminder: { type: "array", items: { type: "string" } },
1244
+ event: { type: "array", items: { type: "string" } },
1245
+ typeOption: { type: "array", items: { type: "string" } },
1246
+ unset: { type: "array", items: { type: "string" } },
1247
+ clearDeps: { type: "boolean" },
1248
+ clearComments: { type: "boolean" },
1249
+ clearNotes: { type: "boolean" },
1250
+ clearLearnings: { type: "boolean" },
1251
+ clearFiles: { type: "boolean" },
1252
+ clearTests: { type: "boolean" },
1253
+ clearDocs: { type: "boolean" },
1254
+ clearReminders: { type: "boolean" },
1255
+ clearEvents: { type: "boolean" },
1256
+ clearTypeOptions: { type: "boolean" },
1257
+ criterion: { type: "array", items: { type: "string" } },
1258
+ clearCriteria: { type: "boolean" },
1259
+ groupBy: { type: "string" },
1260
+ threshold: { anyOf: [{ type: "string" }, { type: "number" }] },
1261
+ format: { type: "string" },
1262
+ depth: { type: "string", enum: ["brief", "standard", "deep"] },
1263
+ section: { type: "array", items: { type: "string", enum: ["hierarchy", "activity", "progress", "blockers", "files", "workload", "staleness", "tests"] } },
1264
+ activityLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1265
+ staleThreshold: { type: "string" },
1266
+ policy: { type: "string" }
1267
+ };
1268
+ var PLAN_SUBCOMMAND_VALUES = [
1269
+ "create",
1270
+ "show",
1271
+ "add-step",
1272
+ "update-step",
1273
+ "complete-step",
1274
+ "block-step",
1275
+ "reorder-step",
1276
+ "remove-step",
1277
+ "link",
1278
+ "unlink",
1279
+ "decision",
1280
+ "discovery",
1281
+ "validation",
1282
+ "resume",
1283
+ "approve",
1284
+ "materialize"
1285
+ ];
1286
+ var PLAN_ACTION_PARAMETER_PROPERTIES = {
1287
+ subcommand: { type: "string", enum: [...PLAN_SUBCOMMAND_VALUES] },
1288
+ stepRef: { type: "string" },
1289
+ reorderTo: { anyOf: [{ type: "string" }, { type: "number" }] },
1290
+ scope: { type: "string" },
1291
+ harness: { type: "string", enum: [...PLAN_HARNESS_VALUES] },
1292
+ mode: { type: "string", enum: [...PLAN_MODE_VALUES] },
1293
+ resumeContext: { type: "string" },
1294
+ related: { type: "string" },
1295
+ blocks: { type: "string" },
1296
+ claim: { type: "boolean" },
1297
+ fromSearch: { type: "string" },
1298
+ stepTitle: { type: "string" },
1299
+ stepBody: { type: "string" },
1300
+ stepOwner: { type: "string" },
1301
+ stepStatus: { type: "string", enum: [...PLAN_STEP_STATUS_VALUES] },
1302
+ stepEvidence: { type: "string" },
1303
+ stepBlockedReason: { type: "string" },
1304
+ stepReplacement: { type: "string" },
1305
+ dependsOn: { type: "string" },
1306
+ link: { type: "string" },
1307
+ linkKind: { type: "string", enum: [...PLAN_STEP_LINK_KIND_VALUES] },
1308
+ linkNote: { type: "string" },
1309
+ promoteToItemDep: { type: "boolean" },
1310
+ allowMultipleActive: { type: "boolean" },
1311
+ file: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1312
+ test: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1313
+ doc: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1314
+ decisionText: { type: "string" },
1315
+ decision: { type: "string" },
1316
+ decisionRationale: { type: "string" },
1317
+ decisionEvidence: { type: "string" },
1318
+ discoveryText: { type: "string" },
1319
+ discovery: { type: "string" },
1320
+ validationText: { type: "string" },
1321
+ validation: { type: "string" },
1322
+ validationCommand: { type: "string" },
1323
+ validationExpected: { type: "string" },
1324
+ steps: { type: "array", items: { type: "string" } },
1325
+ materializeType: { type: "string" },
1326
+ materializeParent: { type: "string" },
1327
+ materializeTags: { type: "string" }
1328
+ };
1329
+ var PLAN_ACTION_PARAMETER_METADATA = {
1330
+ subcommand: {
1331
+ description: "Plan workflow operation to run.",
1332
+ examples: ["create", "show", "add-step", "approve"]
1333
+ },
1334
+ stepRef: {
1335
+ description: "Plan step id or order for step lifecycle subcommands.",
1336
+ examples: ["plan-step-001", "1"]
1337
+ },
1338
+ reorderTo: {
1339
+ description: "New integer order for reorder-step.",
1340
+ examples: [1, "2"]
1341
+ },
1342
+ scope: {
1343
+ description: "Short free-text scope statement describing what the Plan covers.",
1344
+ examples: ["Release readiness audit", "Search package migration"]
1345
+ },
1346
+ mode: {
1347
+ description: "Plan lifecycle mode.",
1348
+ examples: ["draft", "research", "approved"]
1349
+ },
1350
+ file: {
1351
+ description: "File link to attach while creating or materializing a Plan.",
1352
+ examples: ["path=src/cli.ts,note=implementation surface"]
1353
+ },
1354
+ test: {
1355
+ description: "Test command link to attach while creating or materializing a Plan.",
1356
+ examples: ["command=pnpm build,timeout_seconds=300"]
1357
+ },
1358
+ doc: {
1359
+ description: "Documentation link to attach while creating or materializing a Plan.",
1360
+ examples: ["path=docs/SDK.md,note=public API reference"]
1361
+ }
1362
+ };
1363
+ var PM_TOOL_PARAMETER_METADATA = {
1364
+ action: {
1365
+ description: "Tool action to execute."
1366
+ },
1367
+ path: {
1368
+ description: "Optional PM data root override for this invocation.",
1369
+ examples: [".agents/pm"]
1370
+ },
1371
+ scope: {
1372
+ description: "Scope selector for commands that operate on project or global state. Linked files, docs, and tests default to project scope when omitted.",
1373
+ examples: ["project", "global"]
1374
+ },
1375
+ detail: {
1376
+ description: "Detail mode for commands that support concise and deep diagnostics.",
1377
+ examples: ["summary", "deep"]
1378
+ },
1379
+ trace: {
1380
+ description: "When true for extension-doctor, include actionable registration traces in deep diagnostics."
1381
+ },
1382
+ reload: {
1383
+ description: "When true for extension action payloads, trigger cache-busted extension module reload."
1384
+ },
1385
+ watch: {
1386
+ description: "When true for extension-reload/extension action payloads, enable watch mode semantics."
1387
+ },
1388
+ runtimeProbe: {
1389
+ description: "When true for extension-manage, run a doctor-like runtime activation probe for parity fields."
1390
+ },
1391
+ fixManagedState: {
1392
+ description: "When true for extension-manage/extension-doctor, adopt unmanaged extensions before diagnostics/update checks."
1393
+ },
1394
+ target: {
1395
+ description: "Positional target argument for the selected action (ID, source, package source, or extension name).",
1396
+ examples: ["pm-a1b2", ".agents/pm/extensions/sample", "sample-extension"]
1397
+ },
1398
+ github: {
1399
+ description: "GitHub shorthand owner/repo[/path] source for package/extension install actions.",
1400
+ examples: ["org/repo/extensions/sample"]
1401
+ },
1402
+ ref: {
1403
+ description: "Git ref/branch/tag used when installing from GitHub shorthand/URL sources.",
1404
+ examples: ["main", "v1.0.0"]
1405
+ },
1406
+ cliOnly: {
1407
+ description: "Restrict upgrade to the pm CLI/SDK npm package."
1408
+ },
1409
+ packagesOnly: {
1410
+ description: "Restrict upgrade to managed installable pm packages."
1411
+ },
1412
+ repair: {
1413
+ description: "Force npm global reinstall semantics when upgrading the pm CLI/SDK."
1414
+ },
1415
+ tag: {
1416
+ description: "npm version or dist-tag used for CLI and registry package upgrades.",
1417
+ examples: ["latest", "next", "2026.5.11"]
1418
+ },
1419
+ packageName: {
1420
+ description: "Override the pm CLI package name for self-upgrade automation and tests.",
1421
+ examples: ["@unbrained/pm-cli"]
1422
+ },
1423
+ json: {
1424
+ description: "Emit machine-readable JSON output."
1425
+ },
1426
+ quiet: {
1427
+ description: "Suppress stdout payload output."
1428
+ },
1429
+ noExtensions: {
1430
+ description: "Disable extension loading for this invocation."
1431
+ },
1432
+ noPager: {
1433
+ description: "Disable pager integration for help and long output."
1434
+ },
1435
+ profile: {
1436
+ description: "Emit deterministic timing diagnostics to stderr."
1437
+ },
1438
+ timeoutMs: {
1439
+ description: "Tool execution timeout in milliseconds.",
1440
+ examples: [12e4]
1441
+ },
1442
+ id: {
1443
+ description: "Item identifier for read or mutation actions.",
1444
+ examples: ["pm-a1b2"]
1445
+ },
1446
+ runId: {
1447
+ description: "Background test run identifier.",
1448
+ examples: ["tr-kq9x3f-93acde"]
1449
+ },
1450
+ title: {
1451
+ description: "Item title text."
1452
+ },
1453
+ description: {
1454
+ description: "Item description text."
1455
+ },
1456
+ type: {
1457
+ description: "Item type name from the active runtime type registry.",
1458
+ examples: ["Task", "Feature"]
1459
+ },
1460
+ subcommand: {
1461
+ description: "Subcommand for the schema action.",
1462
+ examples: ["add-type"]
1463
+ },
1464
+ name: {
1465
+ description: "Custom item type name to register (for schema add-type).",
1466
+ examples: ["Spike"]
1467
+ },
1468
+ defaultStatus: {
1469
+ description: "Default status hint recorded for a custom item type.",
1470
+ examples: ["open"]
1471
+ },
1472
+ alias: {
1473
+ description: "Aliases for the custom item type (repeatable).",
1474
+ examples: [["spike", "research"]]
1475
+ },
1476
+ preset: {
1477
+ description: "Governance preset for initialization flows.",
1478
+ examples: ["minimal", "default", "strict"]
1479
+ },
1480
+ defaults: {
1481
+ description: "Use non-interactive setup defaults during initialization."
1482
+ },
1483
+ agentGuidance: {
1484
+ description: "Control AGENTS.md/CLAUDE.md guidance behavior during init: ask, add, skip, or status.",
1485
+ examples: ["ask", "add", "skip", "status"]
1486
+ },
1487
+ withPackages: {
1488
+ description: "Install all bundled first-party pm packages during initialization."
1489
+ },
1490
+ createMode: {
1491
+ description: "Create required-option policy mode.",
1492
+ examples: ["strict", "progressive"]
1493
+ },
1494
+ schedulePreset: {
1495
+ description: "Schedule-centric create preset for Reminder, Meeting, and Event types.",
1496
+ examples: ["lightweight"]
1497
+ },
1498
+ status: {
1499
+ description: "Item status value. Statuses are project-configurable via .agents/pm/settings.json (schema block); the built-in defaults are draft, open, in_progress, blocked, closed, canceled. Custom statuses defined for the project are accepted \u2014 discover the active set with the pm_contracts tool (workspace.statuses) or `pm contracts`. Unknown statuses are rejected at runtime with a did-you-mean hint rather than blocked by a fixed schema enum.",
1500
+ examples: ["open", "in_progress"]
1501
+ },
1502
+ priority: {
1503
+ description: "Priority value in range 0..4.",
1504
+ examples: [0, 1, "2"]
1505
+ },
1506
+ order: {
1507
+ description: "Planning order/rank value for create/update, or sort direction (asc|desc) for list-family sorting.",
1508
+ examples: [0, 1, "2", "asc", "desc"]
1509
+ },
1510
+ sort: {
1511
+ description: "List-family sort field selector.",
1512
+ examples: ["priority", "deadline", "updated_at", "created_at", "title", "parent"]
1513
+ },
1514
+ tags: {
1515
+ description: "Comma-delimited tag list.",
1516
+ examples: ["pm-cli,agent-ux"]
1517
+ },
1518
+ addTags: {
1519
+ description: "Tags to add to the existing list without replacing it. Each entry may be CSV or a JSON array.",
1520
+ examples: [["agent-ux"], ["fix", "security"]]
1521
+ },
1522
+ removeTags: {
1523
+ description: "Tags to remove from the existing list. Each entry may be CSV or a JSON array.",
1524
+ examples: [["stale"], ["legacy", "wontfix"]]
1525
+ },
1526
+ deadline: {
1527
+ description: "ISO/date timestamp or relative offset (+6h/+1d/+2w/+6m).",
1528
+ examples: ["2026-04-01T00:00:00.000Z", "+1d"]
1529
+ },
1530
+ estimate: {
1531
+ description: "Estimated effort in minutes.",
1532
+ examples: [60, "120"]
1533
+ },
1534
+ acceptanceCriteria: {
1535
+ description: "Acceptance criteria text."
1536
+ },
1537
+ author: {
1538
+ description: "Mutation author identity.",
1539
+ examples: ["codex-agent"]
1540
+ },
1541
+ message: {
1542
+ description: "History message for mutation audit trail."
1543
+ },
1544
+ assignee: {
1545
+ description: "Assignee identity.",
1546
+ examples: ["codex-agent"]
1547
+ },
1548
+ assigneeFilter: {
1549
+ description: "Assignee presence selector for list/calendar/context/comments-audit filters.",
1550
+ examples: ["assigned", "unassigned"]
1551
+ },
1552
+ parent: {
1553
+ description: "Parent item ID filter for hierarchical list queries.",
1554
+ examples: ["pm-epic01"]
1555
+ },
1556
+ unset: {
1557
+ description: "Repeatable list of front-matter fields to clear explicitly during create/update mutations.",
1558
+ examples: [["deadline", "assignee"], ["close-reason"]]
1559
+ },
1560
+ clearDeps: {
1561
+ description: "When true, clear linked dependencies."
1562
+ },
1563
+ replaceDeps: {
1564
+ description: "When true for update, atomically replace dependencies with the supplied --dep values."
1565
+ },
1566
+ replaceTests: {
1567
+ description: "When true for update, atomically replace linked tests with the supplied --test values."
1568
+ },
1569
+ clearComments: {
1570
+ description: "When true, clear item comments."
1571
+ },
1572
+ clearNotes: {
1573
+ description: "When true, clear item notes."
1574
+ },
1575
+ clearLearnings: {
1576
+ description: "When true, clear item learnings."
1577
+ },
1578
+ clearFiles: {
1579
+ description: "When true, clear linked files."
1580
+ },
1581
+ clearTests: {
1582
+ description: "When true, clear linked tests."
1583
+ },
1584
+ clearDocs: {
1585
+ description: "When true, clear linked docs."
1586
+ },
1587
+ clearReminders: {
1588
+ description: "When true, clear reminders."
1589
+ },
1590
+ clearEvents: {
1591
+ description: "When true, clear events."
1592
+ },
1593
+ clearTypeOptions: {
1594
+ description: "When true, clear type option metadata."
1595
+ },
1596
+ clearCriteria: {
1597
+ description: "When true for config set criteria-list keys (definition-of-done, metadata-required-fields, lifecycle pattern lists), clear the criteria list."
1598
+ },
1599
+ mode: {
1600
+ description: "Mode selector for search/reindex (keyword|semantic|hybrid) and dedupe-audit (title_exact|title_fuzzy|parent_scope).",
1601
+ examples: ["keyword", "hybrid", "title_exact"]
1602
+ },
1603
+ op: {
1604
+ description: "History operation filter for activity output.",
1605
+ examples: ["create", "update", "close", "update_audit"]
1606
+ },
1607
+ fullPeriod: {
1608
+ description: "For day/week/month calendar views, include the full anchored period instead of clipping the start to now."
1609
+ },
1610
+ progress: {
1611
+ description: "Emit progress diagnostics to stderr for long-running operations."
1612
+ },
1613
+ background: {
1614
+ description: "Run linked tests in managed background mode."
1615
+ },
1616
+ envSet: {
1617
+ description: "Repeatable runtime environment KEY=VALUE overrides for linked-test execution.",
1618
+ examples: [["PORT=0", "PLAYWRIGHT_HTML_OPEN=never"]]
1619
+ },
1620
+ envClear: {
1621
+ description: "Repeatable runtime environment variable names to clear before linked-test execution.",
1622
+ examples: [["PLAYWRIGHT_BASE_URL"]]
1623
+ },
1624
+ sharedHostSafe: {
1625
+ description: "Apply additive shared-host-safe runtime defaults during linked-test execution."
1626
+ },
1627
+ pmContext: {
1628
+ description: "PM linked-test context mode (schema keeps isolated tracker data; tracker seeds source tracker data; auto uses tracker for PM tracker-read linked commands).",
1629
+ examples: ["schema", "tracker", "auto"]
1630
+ },
1631
+ overrideLinkedPmContext: {
1632
+ description: "Force run-level --pm-context to override per-linked-test pm_context_mode metadata for all linked-test entries."
1633
+ },
1634
+ failOnContextMismatch: {
1635
+ description: "Fail linked PM command runs when source and sandbox tracker item counts differ."
1636
+ },
1637
+ failOnSkipped: {
1638
+ description: "Treat skipped linked tests as dependency-failed policy violations."
1639
+ },
1640
+ failOnEmptyTestRun: {
1641
+ description: "Treat successful linked-test commands that report zero executed tests as failures."
1642
+ },
1643
+ requireAssertionsForPm: {
1644
+ description: "Require assertion metadata for linked PM command test entries during run execution."
1645
+ },
1646
+ checkContext: {
1647
+ description: "Run linked PM command context preflight diagnostics before command execution."
1648
+ },
1649
+ autoPmContext: {
1650
+ description: "Auto-remediate PM tracker-read linked commands by routing those entries through tracker context regardless of linked-test pm_context_mode overrides."
1651
+ },
1652
+ dryRun: {
1653
+ description: "Preview command effects without mutating storage artifacts."
1654
+ },
1655
+ gcScope: {
1656
+ description: "Repeatable gc scope selector values (index, embeddings, runtime).",
1657
+ examples: [["index", "embeddings"], ["runtime"]]
1658
+ },
1659
+ offset: {
1660
+ description: "Number of matching rows to skip before limit is applied.",
1661
+ examples: [0, 50, "100"]
1662
+ },
1663
+ limitItems: {
1664
+ description: "Maximum number of filtered items to include in comments-audit output (alias: --limit).",
1665
+ examples: [10, "25"]
1666
+ },
1667
+ fullHistory: {
1668
+ description: "When true for comments-audit, export full per-item comment history rows; cannot be combined with latest."
1669
+ },
1670
+ latest: {
1671
+ description: "Number of most recent comments to include per item in comments-audit output (use 0 for summary-only item rows).",
1672
+ examples: [0, 1, "3"]
1673
+ },
1674
+ literal: {
1675
+ description: "Repeatable literal matcher used by history-redact to scrub exact string values.",
1676
+ examples: ["[redacted_path_prefix]/private/path"]
1677
+ },
1678
+ regex: {
1679
+ description: "Repeatable regex matcher used by history-redact. Accepts either /pattern/flags or a raw pattern (global mode is auto-enabled).",
1680
+ examples: ["/192\\\\.168\\\\.[0-9.]+/g", "token=[A-Za-z0-9_-]+"]
1681
+ },
1682
+ replacement: {
1683
+ description: 'Replacement text used by history-redact (defaults to "[redacted]").',
1684
+ examples: ["[scrubbed_path]"]
1685
+ },
1686
+ validateClose: {
1687
+ description: 'Close-time metadata validation mode ("off", "warn", or "strict").',
1688
+ examples: ["off", "warn", "strict"]
1689
+ },
1690
+ checkMetadata: {
1691
+ description: "Run metadata completeness checks."
1692
+ },
1693
+ metadataProfile: {
1694
+ description: "Select metadata validation profile for --check-metadata.",
1695
+ examples: ["core", "strict", "custom"]
1696
+ },
1697
+ checkResolution: {
1698
+ description: "Run closed-item resolution metadata checks."
1699
+ },
1700
+ checkLifecycle: {
1701
+ description: "Run active-item lifecycle governance drift checks."
1702
+ },
1703
+ checkStaleBlockers: {
1704
+ description: "Include stale blocker-pattern diagnostics in lifecycle checks."
1705
+ },
1706
+ dependencyCycleSeverity: {
1707
+ description: "Set dependency-cycle warning policy for lifecycle checks.",
1708
+ examples: ["off", "warn", "error"]
1709
+ },
1710
+ checkFiles: {
1711
+ description: "Run linked-file and orphaned-file checks."
1712
+ },
1713
+ strictDirectories: {
1714
+ description: "Treat optional item-type directories as required health failures."
1715
+ },
1716
+ checkOnly: {
1717
+ description: "For health action, run read-only diagnostics without refreshing vectors."
1718
+ },
1719
+ checkTelemetry: {
1720
+ description: "For health action, probe telemetry endpoint health and include network diagnostics."
1721
+ },
1722
+ noRefresh: {
1723
+ description: "For health action, skip vector refresh while still running checks."
1724
+ },
1725
+ refreshVectors: {
1726
+ description: "For health action, explicitly refresh stale vectors."
1727
+ },
1728
+ verboseStaleItems: {
1729
+ description: "For health action, include full stale-item arrays in vectorization details."
1730
+ },
1731
+ skipVectors: {
1732
+ description: "For health action, skip vectorization checks for a faster diagnostic run."
1733
+ },
1734
+ skipIntegrity: {
1735
+ description: "For health action, skip item/history file integrity checks for a faster diagnostic run."
1736
+ },
1737
+ skipDrift: {
1738
+ description: "For health action, skip history drift hash checks for a faster diagnostic run."
1739
+ },
1740
+ scanMode: {
1741
+ description: "Select file candidate scan mode for --check-files.",
1742
+ examples: ["default", "tracked-all", "tracked-all-strict"]
1743
+ },
1744
+ includePmInternals: {
1745
+ description: "Include PM storage internals in tracked-all candidate scans."
1746
+ },
1747
+ verboseFileLists: {
1748
+ description: "For validate action, include full file-path lists for --check-files details."
1749
+ },
1750
+ verboseDiagnostics: {
1751
+ description: "For validate action, include full diagnostic ID lists instead of compact summaries."
1752
+ },
1753
+ strictExit: {
1754
+ description: "Return non-zero exit when health/validate/extension-doctor warnings are present."
1755
+ },
1756
+ failOnWarn: {
1757
+ description: "Alias for strictExit in health/validate/extension-doctor action payloads."
1758
+ },
1759
+ checkHistoryDrift: {
1760
+ description: "Run item/history hash drift checks."
1761
+ },
1762
+ checkCommandReferences: {
1763
+ description: "Run linked-command PM-ID reference checks."
1764
+ },
1765
+ allowAuditNote: {
1766
+ description: "For notes action, allow non-owner append-only note audits without requiring --force."
1767
+ },
1768
+ allowAuditLearning: {
1769
+ description: "For learnings action, allow non-owner append-only learning audits without requiring --force."
1770
+ },
1771
+ allowAuditComment: {
1772
+ description: "For comments action, allow non-owner append-only comment audits without requiring --force."
1773
+ },
1774
+ stdin: {
1775
+ description: "When true for comments action, read comment text from piped stdin (supports multiline markdown)."
1776
+ },
1777
+ file: {
1778
+ description: "Path to input file for actions that read payload text, such as comments --file.",
1779
+ examples: ["notes/comment.md"]
1780
+ },
1781
+ allowAuditUpdate: {
1782
+ description: "Allow non-owner metadata-only update audits without requiring --force."
1783
+ },
1784
+ allowAuditDepUpdate: {
1785
+ description: "Allow non-owner append-only dependency update audits without requiring --force."
1786
+ },
1787
+ allowAuditRelease: {
1788
+ description: "Allow non-owner release handoffs that clear assignee metadata without requiring --force."
1789
+ },
1790
+ preserveSourceIds: {
1791
+ description: "Preserve explicit source IDs during Beads imports instead of normalizing to tracker prefix.",
1792
+ examples: [true]
1793
+ },
1794
+ appendStable: {
1795
+ description: "When true for files action, preserve existing linked-file order and append new links without full-array resorting."
1796
+ },
1797
+ discover: {
1798
+ description: "When true for files action, use `pm files discover <id>` to scan item text for referenced file paths."
1799
+ },
1800
+ apply: {
1801
+ description: "When true for files discovery, add missing discovered file links instead of returning a dry-run preview."
1802
+ },
1803
+ discoveryNote: {
1804
+ description: "Note attached to file links added by files discovery.",
1805
+ examples: ["discovered from item text"]
1806
+ },
1807
+ stream: {
1808
+ description: "Stream selector: test-runs logs accepts stdout|stderr|both; activity accepts boolean/rows|ndjson|jsonl for line-delimited output.",
1809
+ examples: ["stderr", "stdout", "both", "rows", "ndjson", "jsonl", true]
1810
+ },
1811
+ tail: {
1812
+ description: "Number of lines to tail for background run logs.",
1813
+ examples: [100]
1814
+ },
1815
+ query: {
1816
+ description: "Search query text for search action."
1817
+ },
1818
+ keywords: {
1819
+ description: "Alias for query in search action payloads."
1820
+ },
1821
+ includeLinked: {
1822
+ description: "Include readable linked docs/files/tests content in keyword and hybrid lexical scoring."
1823
+ },
1824
+ titleExact: {
1825
+ description: "For search action, require exact normalized title match for the full query string."
1826
+ },
1827
+ phraseExact: {
1828
+ description: "For search action, require exact normalized query phrase match in item text fields."
1829
+ },
1830
+ includeBody: {
1831
+ description: "When true for list-family actions, include item body text in projected rows."
1832
+ },
1833
+ compact: {
1834
+ description: "Render compact projection output for search and list-family actions."
1835
+ },
1836
+ full: {
1837
+ description: "Enable command-specific full/detail output mode when supported, such as deep item reads for get or full payload mode for search/history."
1838
+ },
1839
+ fields: {
1840
+ description: "Comma-separated projection fields for get, search, or list-family outputs.",
1841
+ examples: ["id,title,status,parent,type", "id,title,score,matched_fields"]
1842
+ },
1843
+ groupBy: {
1844
+ description: "Comma-separated aggregate grouping fields (supported: parent,type,priority,status,assignee,tags,sprint,release).",
1845
+ examples: ["parent,type", "type,status", "priority,assignee", "tags", "sprint,release"]
1846
+ },
1847
+ count: {
1848
+ description: "Enable grouped count output for aggregate action."
1849
+ },
1850
+ includeUnparented: {
1851
+ description: "Include unparented rows when aggregate grouping includes parent."
1852
+ },
1853
+ maxDepth: {
1854
+ description: "Maximum dependency traversal depth for deps action (0 keeps only the root node).",
1855
+ examples: [0, 1, "2"]
1856
+ },
1857
+ collapse: {
1858
+ description: 'Dependency tree collapse mode for deps action ("none" or "repeated").',
1859
+ examples: ["none", "repeated"]
1860
+ },
1861
+ summary: {
1862
+ description: "When true for deps action, return counts only without full tree/graph payloads."
1863
+ },
1864
+ threshold: {
1865
+ description: "Dedupe-audit fuzzy title similarity threshold between 0 and 1.",
1866
+ examples: [0.5, "0.75"]
1867
+ },
1868
+ shell: {
1869
+ description: "Shell target for completion generation.",
1870
+ examples: ["bash"]
1871
+ },
1872
+ eagerTags: {
1873
+ description: "When true for completion, eagerly embed current tracker tags into generated scripts (legacy mode)."
1874
+ },
1875
+ contractAction: {
1876
+ description: "Filter contracts schema to one tool action.",
1877
+ examples: ["create", "update"]
1878
+ },
1879
+ command: {
1880
+ description: "Scope contracts output to one CLI command name; action/schema surfaces narrow by default.",
1881
+ examples: ["create", "search", "list"]
1882
+ },
1883
+ schemaOnly: {
1884
+ description: "When true, contracts action returns schema-focused payloads (mutually exclusive with flagsOnly/availabilityOnly)."
1885
+ },
1886
+ flagsOnly: {
1887
+ description: "When true, contracts action returns only command flag surface payloads (mutually exclusive projection mode)."
1888
+ },
1889
+ availabilityOnly: {
1890
+ description: "When true, contracts action returns only action availability payloads (mutually exclusive projection mode)."
1891
+ },
1892
+ runtimeOnly: {
1893
+ description: "When true, contracts action only includes actions invocable in the current runtime."
1894
+ },
1895
+ activeOnly: {
1896
+ description: "Alias for runtimeOnly in contracts action payloads."
1897
+ },
1898
+ depth: {
1899
+ description: "Context depth level controlling how many sections are included (brief=focus+agenda, standard=+hierarchy/activity/progress/workload, deep=all sections).",
1900
+ examples: ["brief", "standard", "deep"]
1901
+ },
1902
+ section: {
1903
+ description: "Repeatable section selector for context; overrides --depth when provided.",
1904
+ examples: [["hierarchy", "activity"], ["blockers", "files", "staleness"]]
1905
+ },
1906
+ activityLimit: {
1907
+ description: "Maximum number of recent activity entries to include in context output.",
1908
+ examples: [5, 10, "20"]
1909
+ },
1910
+ staleThreshold: {
1911
+ description: "Staleness cutoff in days for context staleness section (e.g. 7 or 7d).",
1912
+ examples: ["7", "14d", "30"]
1913
+ }
1914
+ };
1915
+
1916
+ // dist/sdk/cli-contracts.js
1917
+ !(function() {
1918
+ try {
1919
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
1920
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b98193ee-1196-5e27-b732-d15db107a7e4");
1921
+ } catch (e2) {
1922
+ }
1923
+ })();
1924
+ function normalizeUniqueStringList(values) {
1925
+ return [...new Set(Array.from(values).filter((value) => value.trim().length > 0))];
1926
+ }
1927
+ function normalizeFlagAliasKey(flag) {
1928
+ if (!flag.startsWith("--")) {
1929
+ return flag;
1930
+ }
1931
+ return `--${flag.slice(2).replaceAll("_", "-")}`;
1932
+ }
1933
+ function withFlagAliasMetadata(flagContracts) {
1934
+ const aliasesByCanonical = /* @__PURE__ */ new Map();
1935
+ for (const contract of flagContracts) {
1936
+ const canonical = normalizeFlagAliasKey(contract.flag);
1937
+ const bucket = aliasesByCanonical.get(canonical) ?? /* @__PURE__ */ new Set();
1938
+ if (contract.flag !== canonical) {
1939
+ bucket.add(contract.flag);
1940
+ }
1941
+ for (const alias of contract.aliases ?? []) {
1942
+ if (alias !== canonical) {
1943
+ bucket.add(alias);
1944
+ }
1945
+ }
1946
+ aliasesByCanonical.set(canonical, bucket);
1947
+ }
1948
+ return flagContracts.map((contract) => {
1949
+ const canonical = normalizeFlagAliasKey(contract.flag);
1950
+ if (contract.flag !== canonical) {
1951
+ return contract;
1952
+ }
1953
+ const aliases = normalizeUniqueStringList([...contract.aliases ?? [], ...aliasesByCanonical.get(canonical) ?? []]).filter((alias) => alias !== canonical);
1954
+ if (aliases.length === 0) {
1955
+ return contract;
1956
+ }
1957
+ return {
1958
+ ...contract,
1959
+ aliases
1960
+ };
1961
+ });
1962
+ }
1963
+ function compactFlagAliasContracts(flagContracts) {
1964
+ const withAliases = withFlagAliasMetadata(flagContracts);
1965
+ const canonicalFlags = new Set(withAliases.map((contract) => contract.flag));
1966
+ return withAliases.filter((contract) => {
1967
+ const canonical = normalizeFlagAliasKey(contract.flag);
1968
+ return contract.flag === canonical || !canonicalFlags.has(canonical);
1969
+ });
1970
+ }
1971
+ var SUBCOMMAND_GLOBAL_FLAG_CONTRACTS = [
1972
+ { flag: "--json" },
1973
+ { flag: "--quiet" },
1974
+ { flag: "--no-changed-fields" },
1975
+ { flag: "--path" },
1976
+ { flag: "--no-extensions" },
1977
+ { flag: "--no-pager" },
1978
+ { flag: "--profile" },
1979
+ { flag: "--help" }
1980
+ ];
1981
+ var GLOBAL_FLAG_CONTRACTS = [
1982
+ ...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,
1983
+ { flag: "--version" }
1984
+ ];
1985
+ var LIST_FILTER_FLAG_CONTRACTS = [
1986
+ { flag: "--status", list: true },
1987
+ { flag: "--type" },
1988
+ { flag: "--tag" },
1989
+ { flag: "--priority" },
1990
+ { flag: "--deadline-before" },
1991
+ { flag: "--deadline-after" },
1992
+ { flag: "--assignee" },
1993
+ { flag: "--assignee-filter" },
1994
+ { flag: "--assignee_filter" },
1995
+ { flag: "--parent" },
1996
+ { flag: "--sprint" },
1997
+ { flag: "--release" },
1998
+ { flag: "--limit" },
1999
+ { flag: "--offset" },
2000
+ { flag: "--compact" },
2001
+ { flag: "--brief" },
2002
+ { flag: "--full" },
2003
+ { flag: "--fields", list: true },
2004
+ { flag: "--sort" },
2005
+ { flag: "--order" },
2006
+ { flag: "--include-body" },
2007
+ { flag: "--stream" }
2008
+ ];
2009
+ var AGGREGATE_FLAG_CONTRACTS = [
2010
+ { flag: "--group-by", list: true },
2011
+ { flag: "--count" },
2012
+ { flag: "--include-unparented" },
2013
+ { flag: "--include_unparented" },
2014
+ { flag: "--status" },
2015
+ { flag: "--type" },
2016
+ { flag: "--tag" },
2017
+ { flag: "--priority" },
2018
+ { flag: "--deadline-before" },
2019
+ { flag: "--deadline-after" },
2020
+ { flag: "--assignee" },
2021
+ { flag: "--assignee-filter" },
2022
+ { flag: "--assignee_filter" },
2023
+ { flag: "--parent" },
2024
+ { flag: "--sprint" },
2025
+ { flag: "--release" }
2026
+ ];
2027
+ var DEDUPE_AUDIT_FLAG_CONTRACTS = [
2028
+ { flag: "--mode" },
2029
+ { flag: "--limit" },
2030
+ { flag: "--threshold" },
2031
+ { flag: "--status" },
2032
+ { flag: "--type" },
2033
+ { flag: "--tag" },
2034
+ { flag: "--priority" },
2035
+ { flag: "--deadline-before" },
2036
+ { flag: "--deadline-after" },
2037
+ { flag: "--assignee" },
2038
+ { flag: "--assignee-filter" },
2039
+ { flag: "--assignee_filter" },
2040
+ { flag: "--parent" },
2041
+ { flag: "--sprint" },
2042
+ { flag: "--release" }
2043
+ ];
2044
+ var COMMENTS_AUDIT_FLAG_CONTRACTS = [
2045
+ { flag: "--status" },
2046
+ { flag: "--type" },
2047
+ { flag: "--assignee" },
2048
+ { flag: "--assignee-filter" },
2049
+ { flag: "--assignee_filter" },
2050
+ { flag: "--parent" },
2051
+ { flag: "--tag" },
2052
+ { flag: "--sprint" },
2053
+ { flag: "--release" },
2054
+ { flag: "--priority" },
2055
+ { flag: "--limit-items" },
2056
+ { flag: "--limit" },
2057
+ { flag: "--full-history" },
2058
+ { flag: "--latest" }
2059
+ ];
2060
+ var COMMENTS_FLAG_CONTRACTS = [
2061
+ { flag: "--add", aliases: ["--comment"] },
2062
+ { flag: "--stdin" },
2063
+ { flag: "--file" },
2064
+ { flag: "--limit" },
2065
+ { flag: "--author" },
2066
+ { flag: "--message" },
2067
+ { flag: "--allow-audit-comment" },
2068
+ { flag: "--force" }
2069
+ ];
2070
+ var NOTES_FLAG_CONTRACTS = [
2071
+ { flag: "--add", aliases: ["--note"] },
2072
+ { flag: "--limit" },
2073
+ { flag: "--author" },
2074
+ { flag: "--message" },
2075
+ { flag: "--allow-audit-note" },
2076
+ { flag: "--allow-audit-comment" },
2077
+ { flag: "--force" }
2078
+ ];
2079
+ var LEARNINGS_FLAG_CONTRACTS = [
2080
+ { flag: "--add", aliases: ["--learning"] },
2081
+ { flag: "--limit" },
2082
+ { flag: "--author" },
2083
+ { flag: "--message" },
2084
+ { flag: "--allow-audit-learning" },
2085
+ { flag: "--allow-audit-comment" },
2086
+ { flag: "--force" }
2087
+ ];
2088
+ var FILES_FLAG_CONTRACTS = [
2089
+ { flag: "--add" },
2090
+ { flag: "--add-glob" },
2091
+ { flag: "--remove" },
2092
+ { flag: "--migrate" },
2093
+ { flag: "--list" },
2094
+ { flag: "--append-stable" },
2095
+ { flag: "--validate-paths" },
2096
+ { flag: "--audit" },
2097
+ { flag: "--author" },
2098
+ { flag: "--message" },
2099
+ { flag: "--force" }
2100
+ ];
2101
+ var DOCS_FLAG_CONTRACTS = [
2102
+ { flag: "--add" },
2103
+ { flag: "--add-glob" },
2104
+ { flag: "--remove" },
2105
+ { flag: "--migrate" },
2106
+ { flag: "--validate-paths" },
2107
+ { flag: "--audit" },
2108
+ { flag: "--author" },
2109
+ { flag: "--message" },
2110
+ { flag: "--force" }
2111
+ ];
2112
+ var HISTORY_FLAG_CONTRACTS = [
2113
+ { flag: "--limit" },
2114
+ { flag: "--compact" },
2115
+ { flag: "--full" },
2116
+ { flag: "--diff" },
2117
+ { flag: "--verify" }
2118
+ ];
2119
+ var HISTORY_REDACT_FLAG_CONTRACTS = [
2120
+ { flag: "--literal" },
2121
+ { flag: "--regex" },
2122
+ { flag: "--replacement" },
2123
+ { flag: "--dry-run" },
2124
+ { flag: "--author" },
2125
+ { flag: "--message" },
2126
+ { flag: "--force" }
2127
+ ];
2128
+ var HISTORY_REPAIR_FLAG_CONTRACTS = [
2129
+ { flag: "--dry-run" },
2130
+ { flag: "--author" },
2131
+ { flag: "--message" },
2132
+ { flag: "--force" }
2133
+ ];
2134
+ var SCHEMA_FLAG_CONTRACTS = [
2135
+ { flag: "--description" },
2136
+ { flag: "--default-status", aliases: ["--default_status"] },
2137
+ { flag: "--folder" },
2138
+ { flag: "--alias" },
2139
+ { flag: "--author" },
2140
+ { flag: "--force" }
2141
+ ];
2142
+ var PLAN_FLAG_CONTRACTS = [
2143
+ { flag: "--title" },
2144
+ { flag: "--description" },
2145
+ { flag: "--scope" },
2146
+ { flag: "--parent" },
2147
+ { flag: "--related" },
2148
+ { flag: "--blocks" },
2149
+ { flag: "--blocked-by", aliases: ["--blocked_by"] },
2150
+ { flag: "--harness" },
2151
+ { flag: "--mode" },
2152
+ { flag: "--resume-context", aliases: ["--resume_context"] },
2153
+ { flag: "--tags", list: true },
2154
+ { flag: "--priority" },
2155
+ { flag: "--body" },
2156
+ { flag: "--claim" },
2157
+ { flag: "--from-search", aliases: ["--from_search"] },
2158
+ { flag: "--step-title", aliases: ["--step", "--step_title"] },
2159
+ { flag: "--step-body", aliases: ["--step_body"] },
2160
+ { flag: "--step-owner", aliases: ["--step_owner"] },
2161
+ { flag: "--step-status", aliases: ["--step_status"] },
2162
+ { flag: "--step-evidence", aliases: ["--step_evidence"] },
2163
+ { flag: "--step-blocked-reason", aliases: ["--step_blocked_reason"] },
2164
+ { flag: "--step-replacement", aliases: ["--step_replacement"] },
2165
+ { flag: "--depends-on", aliases: ["--depends_on"] },
2166
+ { flag: "--link" },
2167
+ { flag: "--link-kind", aliases: ["--link_kind"] },
2168
+ { flag: "--link-note", aliases: ["--link_note"] },
2169
+ { flag: "--promote-to-item-dep", aliases: ["--promote_to_item_dep"] },
2170
+ { flag: "--allow-multiple-active", aliases: ["--allow_multiple_active"] },
2171
+ { flag: "--file" },
2172
+ { flag: "--test" },
2173
+ { flag: "--doc" },
2174
+ { flag: "--decision-text", aliases: ["--decision_text", "--decision"] },
2175
+ { flag: "--decision-rationale", aliases: ["--decision_rationale"] },
2176
+ { flag: "--decision-evidence", aliases: ["--decision_evidence"] },
2177
+ { flag: "--discovery-text", aliases: ["--discovery_text", "--discovery"] },
2178
+ { flag: "--validation-text", aliases: ["--validation_text", "--validation"] },
2179
+ { flag: "--validation-command", aliases: ["--validation_command"] },
2180
+ { flag: "--validation-expected", aliases: ["--validation_expected"] },
2181
+ { flag: "--depth" },
2182
+ { flag: "--fields", list: true },
2183
+ { flag: "--steps" },
2184
+ { flag: "--materialize-type", aliases: ["--materialize_type"] },
2185
+ { flag: "--materialize-parent", aliases: ["--materialize_parent"] },
2186
+ { flag: "--materialize-tags", aliases: ["--materialize_tags"] },
2187
+ { flag: "--author" },
2188
+ { flag: "--message" },
2189
+ { flag: "--force" }
2190
+ ];
2191
+ var INIT_FLAG_CONTRACTS = [
2192
+ { flag: "--preset" },
2193
+ { flag: "--defaults", short: "-y", aliases: ["--yes"] },
2194
+ { flag: "--author" },
2195
+ { flag: "--agent-guidance" },
2196
+ { flag: "--with-packages" },
2197
+ { flag: "--verbose" }
2198
+ ];
2199
+ var CONFIG_FLAG_CONTRACTS = [
2200
+ { flag: "--criterion" },
2201
+ { flag: "--clear-criteria" },
2202
+ { flag: "--format" },
2203
+ { flag: "--policy" },
2204
+ { flag: "--default-depth" },
2205
+ { flag: "--activity-limit" },
2206
+ { flag: "--stale-threshold-days" },
2207
+ { flag: "--section-hierarchy" },
2208
+ { flag: "--section-activity" },
2209
+ { flag: "--section-progress" },
2210
+ { flag: "--section-blockers" },
2211
+ { flag: "--section-files" },
2212
+ { flag: "--section-workload" },
2213
+ { flag: "--section-staleness" },
2214
+ { flag: "--section-tests" }
2215
+ ];
2216
+ var EXTENSION_FLAG_CONTRACTS = [
2217
+ { flag: "--init" },
2218
+ { flag: "--scaffold" },
2219
+ { flag: "--install" },
2220
+ { flag: "--uninstall" },
2221
+ { flag: "--explore" },
2222
+ { flag: "--list" },
2223
+ { flag: "--manage" },
2224
+ { flag: "--reload" },
2225
+ { flag: "--watch" },
2226
+ { flag: "--doctor" },
2227
+ { flag: "--catalog" },
2228
+ { flag: "--adopt" },
2229
+ { flag: "--adopt-all" },
2230
+ { flag: "--activate" },
2231
+ { flag: "--deactivate" },
2232
+ { flag: "--project" },
2233
+ { flag: "--local" },
2234
+ { flag: "--global" },
2235
+ { flag: "--gh" },
2236
+ { flag: "--github" },
2237
+ { flag: "--ref" },
2238
+ { flag: "--detail" },
2239
+ { flag: "--trace" },
2240
+ { flag: "--runtime-probe" },
2241
+ { flag: "--fix-managed-state" },
2242
+ { flag: "--strict-exit" },
2243
+ { flag: "--fail-on-warn" }
2244
+ ];
2245
+ var INSTALL_FLAG_CONTRACTS = [
2246
+ { flag: "--project" },
2247
+ { flag: "--local" },
2248
+ { flag: "--global" },
2249
+ { flag: "--gh" },
2250
+ { flag: "--github" },
2251
+ { flag: "--ref" }
2252
+ ];
2253
+ var UPGRADE_FLAG_CONTRACTS = [
2254
+ { flag: "--dry-run" },
2255
+ { flag: "--cli-only" },
2256
+ { flag: "--packages-only" },
2257
+ { flag: "--project" },
2258
+ { flag: "--local" },
2259
+ { flag: "--global" },
2260
+ { flag: "--repair" },
2261
+ { flag: "--tag" },
2262
+ { flag: "--package-name" }
2263
+ ];
2264
+ var REINDEX_FLAG_CONTRACTS = [
2265
+ { flag: "--mode" },
2266
+ { flag: "--progress" }
2267
+ ];
2268
+ var CLOSE_FLAG_CONTRACTS = [
2269
+ { flag: "--reason" },
2270
+ { flag: "--close-reason" },
2271
+ { flag: "--author" },
2272
+ { flag: "--message" },
2273
+ { flag: "--validate-close" },
2274
+ // pm-fl0c #11 (2026-05-28) + Codex P2 follow-up: inline closure-validation
2275
+ // fields. Surface them through the contract so `pm contracts --command
2276
+ // close`, the JSON help payload, and bootstrap flag normalization /
2277
+ // suggestions all stay consistent with the commander registration.
2278
+ { flag: "--resolution" },
2279
+ { flag: "--expected-result", aliases: ["--expected_result", "--expected"] },
2280
+ { flag: "--actual-result", aliases: ["--actual_result", "--actual"] },
2281
+ { flag: "--force" }
2282
+ ];
2283
+ var APPEND_FLAG_CONTRACTS = [
2284
+ { flag: "--body", short: "-b" },
2285
+ { flag: "--author" },
2286
+ { flag: "--message" },
2287
+ { flag: "--force" }
2288
+ ];
2289
+ var CLAIM_FLAG_CONTRACTS = [
2290
+ { flag: "--author" },
2291
+ { flag: "--message" },
2292
+ { flag: "--force" }
2293
+ ];
2294
+ var RESTORE_FLAG_CONTRACTS = [
2295
+ { flag: "--author" },
2296
+ { flag: "--message" },
2297
+ { flag: "--force" }
2298
+ ];
2299
+ var DELETE_FLAG_CONTRACTS = [
2300
+ { flag: "--dry-run" },
2301
+ { flag: "--author" },
2302
+ { flag: "--message" },
2303
+ { flag: "--force" }
2304
+ ];
2305
+ var RELEASE_FLAG_CONTRACTS = [
2306
+ { flag: "--author" },
2307
+ { flag: "--message" },
2308
+ { flag: "--allow-audit-release" },
2309
+ { flag: "--force" }
2310
+ ];
2311
+ var START_TASK_FLAG_CONTRACTS = [
2312
+ { flag: "--author" },
2313
+ { flag: "--message" },
2314
+ { flag: "--force" }
2315
+ ];
2316
+ var PAUSE_TASK_FLAG_CONTRACTS = [
2317
+ { flag: "--author" },
2318
+ { flag: "--message" },
2319
+ { flag: "--force" }
2320
+ ];
2321
+ var CLOSE_TASK_FLAG_CONTRACTS = [
2322
+ { flag: "--author" },
2323
+ { flag: "--message" },
2324
+ { flag: "--validate-close" },
2325
+ { flag: "--force" }
2326
+ ];
2327
+ var TEST_FLAG_CONTRACTS = [
2328
+ { flag: "--add" },
2329
+ { flag: "--remove" },
2330
+ { flag: "--run" },
2331
+ { flag: "--background" },
2332
+ { flag: "--timeout" },
2333
+ { flag: "--progress" },
2334
+ { flag: "--env-set" },
2335
+ { flag: "--env-clear" },
2336
+ { flag: "--shared-host-safe" },
2337
+ { flag: "--pm-context" },
2338
+ { flag: "--override-linked-pm-context" },
2339
+ { flag: "--fail-on-context-mismatch" },
2340
+ { flag: "--fail-on-skipped" },
2341
+ { flag: "--fail-on-empty-test-run" },
2342
+ { flag: "--require-assertions-for-pm" },
2343
+ { flag: "--check-context" },
2344
+ { flag: "--auto-pm-context" },
2345
+ { flag: "--author" },
2346
+ { flag: "--message" },
2347
+ { flag: "--force" }
2348
+ ];
2349
+ var TEST_ALL_FLAG_CONTRACTS = [
2350
+ { flag: "--status" },
2351
+ { flag: "--limit" },
2352
+ { flag: "--offset" },
2353
+ { flag: "--background" },
2354
+ { flag: "--timeout" },
2355
+ { flag: "--progress" },
2356
+ { flag: "--env-set" },
2357
+ { flag: "--env-clear" },
2358
+ { flag: "--shared-host-safe" },
2359
+ { flag: "--pm-context" },
2360
+ { flag: "--override-linked-pm-context" },
2361
+ { flag: "--fail-on-context-mismatch" },
2362
+ { flag: "--fail-on-skipped" },
2363
+ { flag: "--fail-on-empty-test-run" },
2364
+ { flag: "--require-assertions-for-pm" },
2365
+ { flag: "--check-context" },
2366
+ { flag: "--auto-pm-context" }
2367
+ ];
2368
+ var TEST_RUNS_FLAG_CONTRACTS = [
2369
+ { flag: "--status" },
2370
+ { flag: "--limit" },
2371
+ { flag: "--stream" },
2372
+ { flag: "--tail" },
2373
+ { flag: "--force" },
2374
+ { flag: "--author" }
2375
+ ];
2376
+ var GC_FLAG_CONTRACTS = [
2377
+ { flag: "--dry-run" },
2378
+ { flag: "--scope" }
2379
+ ];
2380
+ var HEALTH_FLAG_CONTRACTS = [
2381
+ { flag: "--strict-directories" },
2382
+ { flag: "--strict-exit" },
2383
+ { flag: "--fail-on-warn" },
2384
+ { flag: "--check-only" },
2385
+ { flag: "--check-telemetry" },
2386
+ { flag: "--no-refresh" },
2387
+ { flag: "--refresh-vectors" },
2388
+ { flag: "--verbose-stale-items" },
2389
+ { flag: "--brief" },
2390
+ { flag: "--summary" },
2391
+ { flag: "--skip-vectors" },
2392
+ { flag: "--skip-integrity" },
2393
+ { flag: "--skip-drift" },
2394
+ { flag: "--full" }
2395
+ ];
2396
+ var VALIDATE_FLAG_CONTRACTS = [
2397
+ { flag: "--check-metadata" },
2398
+ { flag: "--metadata-profile" },
2399
+ { flag: "--check-resolution" },
2400
+ { flag: "--check-lifecycle" },
2401
+ { flag: "--check-stale-blockers" },
2402
+ { flag: "--dependency-cycle-severity" },
2403
+ { flag: "--check-files" },
2404
+ { flag: "--scan-mode" },
2405
+ { flag: "--include-pm-internals" },
2406
+ { flag: "--verbose-file-lists" },
2407
+ { flag: "--verbose-diagnostics" },
2408
+ { flag: "--strict-exit" },
2409
+ { flag: "--fail-on-warn" },
2410
+ { flag: "--check-history-drift" },
2411
+ { flag: "--check-command-references" }
2412
+ ];
2413
+ var CREATE_FLAG_CONTRACTS = [
2414
+ { short: "-t", flag: "--title" },
2415
+ { short: "-d", flag: "--description" },
2416
+ { flag: "--type" },
2417
+ { flag: "--template" },
2418
+ { flag: "--create-mode" },
2419
+ { flag: "--create_mode" },
2420
+ { flag: "--schedule-preset" },
2421
+ { flag: "--schedule_preset" },
2422
+ { short: "-s", flag: "--status" },
2423
+ { short: "-p", flag: "--priority" },
2424
+ { flag: "--tags", list: true },
2425
+ // NOT list:true — these use Commander's repeatable collector. Marking them
2426
+ // list:true would make the bootstrap coalescer comma-join repeated
2427
+ // occurrences (`--add-tags '["a","b"]' --add-tags c` -> `["a","b"],c`),
2428
+ // corrupting the JSON-array value form before parseTags sees it.
2429
+ { flag: "--add-tags", aliases: ["--add_tags"] },
2430
+ { short: "-b", flag: "--body" },
2431
+ { flag: "--deadline" },
2432
+ { flag: "--estimate" },
2433
+ { flag: "--estimated-minutes" },
2434
+ { flag: "--estimated_minutes" },
2435
+ { flag: "--acceptance-criteria" },
2436
+ { flag: "--acceptance_criteria" },
2437
+ { flag: "--ac" },
2438
+ { flag: "--author" },
2439
+ { flag: "--message" },
2440
+ { flag: "--assignee" },
2441
+ { flag: "--parent" },
2442
+ { flag: "--reviewer" },
2443
+ { flag: "--risk" },
2444
+ { flag: "--confidence" },
2445
+ { flag: "--sprint" },
2446
+ { flag: "--release" },
2447
+ { flag: "--blocked-by" },
2448
+ { flag: "--blocked-reason" },
2449
+ { flag: "--unblock-note" },
2450
+ { flag: "--reporter" },
2451
+ { flag: "--severity" },
2452
+ { flag: "--environment" },
2453
+ { flag: "--repro-steps" },
2454
+ { flag: "--resolution" },
2455
+ { flag: "--expected-result" },
2456
+ { flag: "--actual-result" },
2457
+ { flag: "--affected-version" },
2458
+ { flag: "--fixed-version" },
2459
+ { flag: "--component" },
2460
+ { flag: "--regression" },
2461
+ { flag: "--customer-impact" },
2462
+ { flag: "--customer_impact" },
2463
+ { flag: "--definition-of-ready" },
2464
+ { flag: "--definition_of_ready" },
2465
+ { flag: "--order" },
2466
+ { flag: "--rank" },
2467
+ { flag: "--goal" },
2468
+ { flag: "--objective" },
2469
+ { flag: "--value" },
2470
+ { flag: "--impact" },
2471
+ { flag: "--outcome" },
2472
+ { flag: "--why-now" },
2473
+ { flag: "--why_now" },
2474
+ { flag: "--blocked_by" },
2475
+ { flag: "--blocked_reason" },
2476
+ { flag: "--unblock_note" },
2477
+ { flag: "--repro_steps" },
2478
+ { flag: "--expected_result" },
2479
+ { flag: "--actual_result" },
2480
+ { flag: "--expected" },
2481
+ { flag: "--actual" },
2482
+ { flag: "--affected_version" },
2483
+ { flag: "--fixed_version" },
2484
+ { flag: "--dep" },
2485
+ { flag: "--type-option" },
2486
+ { flag: "--type_option" },
2487
+ { flag: "--reminder" },
2488
+ { flag: "--event" },
2489
+ { flag: "--comment" },
2490
+ { flag: "--note" },
2491
+ { flag: "--learning" },
2492
+ { flag: "--file" },
2493
+ { flag: "--test" },
2494
+ { flag: "--doc" },
2495
+ { flag: "--unset" },
2496
+ { flag: "--clear-deps" },
2497
+ { flag: "--clear-comments" },
2498
+ { flag: "--clear-notes" },
2499
+ { flag: "--clear-learnings" },
2500
+ { flag: "--clear-files" },
2501
+ { flag: "--clear-tests" },
2502
+ { flag: "--clear-docs" },
2503
+ { flag: "--clear-reminders" },
2504
+ { flag: "--clear-events" },
2505
+ { flag: "--clear-type-options" }
2506
+ ];
2507
+ var UPDATE_FLAG_CONTRACTS = [
2508
+ { short: "-t", flag: "--title" },
2509
+ { short: "-d", flag: "--description" },
2510
+ { short: "-b", flag: "--body" },
2511
+ { short: "-s", flag: "--status" },
2512
+ { flag: "--close-reason" },
2513
+ { flag: "--close_reason" },
2514
+ { short: "-p", flag: "--priority" },
2515
+ { flag: "--type" },
2516
+ { flag: "--tags", list: true },
2517
+ // NOT list:true — Commander's repeatable collector accumulates these, so
2518
+ // bootstrap coalescing must not comma-join repeated occurrences (it would
2519
+ // corrupt JSON-array values like `--add-tags '["a","b"]' --add-tags c`).
2520
+ { flag: "--add-tags", aliases: ["--add_tags"] },
2521
+ { flag: "--remove-tags", aliases: ["--remove_tags"] },
2522
+ { flag: "--deadline" },
2523
+ { flag: "--estimate" },
2524
+ { flag: "--estimated-minutes" },
2525
+ { flag: "--estimated_minutes" },
2526
+ { flag: "--acceptance-criteria" },
2527
+ { flag: "--acceptance_criteria" },
2528
+ { flag: "--ac" },
2529
+ { flag: "--assignee" },
2530
+ { flag: "--parent" },
2531
+ { flag: "--reviewer" },
2532
+ { flag: "--risk" },
2533
+ { flag: "--confidence" },
2534
+ { flag: "--sprint" },
2535
+ { flag: "--release" },
2536
+ { flag: "--blocked-by" },
2537
+ { flag: "--blocked-reason" },
2538
+ { flag: "--unblock-note" },
2539
+ { flag: "--reporter" },
2540
+ { flag: "--severity" },
2541
+ { flag: "--environment" },
2542
+ { flag: "--repro-steps" },
2543
+ { flag: "--resolution" },
2544
+ { flag: "--expected-result" },
2545
+ { flag: "--actual-result" },
2546
+ { flag: "--affected-version" },
2547
+ { flag: "--fixed-version" },
2548
+ { flag: "--fixed_version" },
2549
+ { flag: "--component" },
2550
+ { flag: "--regression" },
2551
+ { flag: "--customer-impact" },
2552
+ { flag: "--customer_impact" },
2553
+ { flag: "--definition-of-ready" },
2554
+ { flag: "--definition_of_ready" },
2555
+ { flag: "--order" },
2556
+ { flag: "--rank" },
2557
+ { flag: "--goal" },
2558
+ { flag: "--objective" },
2559
+ { flag: "--value" },
2560
+ { flag: "--impact" },
2561
+ { flag: "--outcome" },
2562
+ { flag: "--why-now" },
2563
+ { flag: "--why_now" },
2564
+ { flag: "--author" },
2565
+ { flag: "--message" },
2566
+ { flag: "--blocked_by" },
2567
+ { flag: "--blocked_reason" },
2568
+ { flag: "--unblock_note" },
2569
+ { flag: "--repro_steps" },
2570
+ { flag: "--expected_result" },
2571
+ { flag: "--actual_result" },
2572
+ { flag: "--expected" },
2573
+ { flag: "--actual" },
2574
+ { flag: "--affected_version" },
2575
+ { flag: "--dep" },
2576
+ { flag: "--dep-remove" },
2577
+ { flag: "--dep_remove" },
2578
+ { flag: "--replace-deps" },
2579
+ { flag: "--replace-tests" },
2580
+ { flag: "--comment" },
2581
+ { flag: "--note" },
2582
+ { flag: "--learning" },
2583
+ { flag: "--file" },
2584
+ { flag: "--test" },
2585
+ { flag: "--doc" },
2586
+ { flag: "--reminder" },
2587
+ { flag: "--event" },
2588
+ { flag: "--type-option" },
2589
+ { flag: "--type_option" },
2590
+ { flag: "--unset" },
2591
+ { flag: "--clear-deps" },
2592
+ { flag: "--clear-comments" },
2593
+ { flag: "--clear-notes" },
2594
+ { flag: "--clear-learnings" },
2595
+ { flag: "--clear-files" },
2596
+ { flag: "--clear-tests" },
2597
+ { flag: "--clear-docs" },
2598
+ { flag: "--clear-reminders" },
2599
+ { flag: "--clear-events" },
2600
+ { flag: "--clear-type-options" },
2601
+ { flag: "--allow-audit-update" },
2602
+ { flag: "--allow_audit_update" },
2603
+ { flag: "--allow-audit-dep-update" },
2604
+ { flag: "--allow_audit_dep_update" },
2605
+ { flag: "--force" }
2606
+ ];
2607
+ var UPDATE_MANY_FLAG_CONTRACTS = [
2608
+ { flag: "--filter-status" },
2609
+ { flag: "--filter-type" },
2610
+ { flag: "--filter-tag" },
2611
+ { flag: "--filter-priority" },
2612
+ { flag: "--filter-deadline-before" },
2613
+ { flag: "--filter-deadline-after" },
2614
+ { flag: "--filter-assignee" },
2615
+ { flag: "--filter-assignee-filter" },
2616
+ { flag: "--filter-assignee_filter" },
2617
+ { flag: "--filter-parent" },
2618
+ { flag: "--filter-sprint" },
2619
+ { flag: "--filter-release" },
2620
+ { flag: "--limit" },
2621
+ { flag: "--offset" },
2622
+ { flag: "--dry-run" },
2623
+ { flag: "--rollback" },
2624
+ { flag: "--no-checkpoint" },
2625
+ { short: "-t", flag: "--title" },
2626
+ { short: "-d", flag: "--description" },
2627
+ { short: "-b", flag: "--body" },
2628
+ { short: "-p", flag: "--priority" },
2629
+ { flag: "--type" },
2630
+ { flag: "--tags", list: true },
2631
+ // NOT list:true — Commander's repeatable collector accumulates these, so
2632
+ // bootstrap coalescing must not comma-join repeated occurrences (it would
2633
+ // corrupt JSON-array values like `--add-tags '["a","b"]' --add-tags c`).
2634
+ { flag: "--add-tags", aliases: ["--add_tags"] },
2635
+ { flag: "--remove-tags", aliases: ["--remove_tags"] },
2636
+ { flag: "--deadline" },
2637
+ { flag: "--estimate" },
2638
+ { flag: "--estimated-minutes" },
2639
+ { flag: "--estimated_minutes" },
2640
+ { flag: "--acceptance-criteria" },
2641
+ { flag: "--acceptance_criteria" },
2642
+ { flag: "--ac" },
2643
+ { flag: "--definition-of-ready" },
2644
+ { flag: "--definition_of_ready" },
2645
+ { flag: "--order" },
2646
+ { flag: "--rank" },
2647
+ { flag: "--goal" },
2648
+ { flag: "--objective" },
2649
+ { flag: "--value" },
2650
+ { flag: "--impact" },
2651
+ { flag: "--outcome" },
2652
+ { flag: "--why-now" },
2653
+ { flag: "--why_now" },
2654
+ { flag: "--reviewer" },
2655
+ { flag: "--risk" },
2656
+ { flag: "--confidence" },
2657
+ { flag: "--sprint" },
2658
+ { flag: "--release" },
2659
+ { flag: "--reporter" },
2660
+ { flag: "--severity" },
2661
+ { flag: "--environment" },
2662
+ { flag: "--repro-steps" },
2663
+ { flag: "--repro_steps" },
2664
+ { flag: "--resolution" },
2665
+ { flag: "--expected-result" },
2666
+ { flag: "--expected_result" },
2667
+ { flag: "--expected" },
2668
+ { flag: "--actual-result" },
2669
+ { flag: "--actual_result" },
2670
+ { flag: "--actual" },
2671
+ { flag: "--affected-version" },
2672
+ { flag: "--affected_version" },
2673
+ { flag: "--fixed-version" },
2674
+ { flag: "--fixed_version" },
2675
+ { flag: "--component" },
2676
+ { flag: "--regression" },
2677
+ { flag: "--customer-impact" },
2678
+ { flag: "--customer_impact" },
2679
+ { flag: "--dep" },
2680
+ { flag: "--dep-remove" },
2681
+ { flag: "--dep_remove" },
2682
+ { flag: "--replace-deps" },
2683
+ { flag: "--replace-tests" },
2684
+ { flag: "--comment" },
2685
+ { flag: "--note" },
2686
+ { flag: "--learning" },
2687
+ { flag: "--file" },
2688
+ { flag: "--test" },
2689
+ { flag: "--doc" },
2690
+ { flag: "--reminder" },
2691
+ { flag: "--event" },
2692
+ { flag: "--type-option" },
2693
+ { flag: "--type_option" },
2694
+ { flag: "--unset" },
2695
+ { flag: "--clear-deps" },
2696
+ { flag: "--clear-comments" },
2697
+ { flag: "--clear-notes" },
2698
+ { flag: "--clear-learnings" },
2699
+ { flag: "--clear-files" },
2700
+ { flag: "--clear-tests" },
2701
+ { flag: "--clear-docs" },
2702
+ { flag: "--clear-reminders" },
2703
+ { flag: "--clear-events" },
2704
+ { flag: "--clear-type-options" },
2705
+ { flag: "--allow-audit-update" },
2706
+ { flag: "--allow_audit_update" },
2707
+ { flag: "--allow-audit-dep-update" },
2708
+ { flag: "--allow_audit_dep_update" },
2709
+ { flag: "--author" },
2710
+ { flag: "--message" },
2711
+ { flag: "--force" }
2712
+ ];
2713
+ var NORMALIZE_FLAG_CONTRACTS = [
2714
+ { flag: "--filter-status" },
2715
+ { flag: "--filter-type" },
2716
+ { flag: "--filter-tag" },
2717
+ { flag: "--filter-priority" },
2718
+ { flag: "--filter-deadline-before" },
2719
+ { flag: "--filter-deadline-after" },
2720
+ { flag: "--filter-assignee" },
2721
+ { flag: "--filter-assignee-filter" },
2722
+ { flag: "--filter-assignee_filter" },
2723
+ { flag: "--filter-parent" },
2724
+ { flag: "--filter-sprint" },
2725
+ { flag: "--filter-release" },
2726
+ { flag: "--limit" },
2727
+ { flag: "--offset" },
2728
+ { flag: "--dry-run" },
2729
+ { flag: "--apply" },
2730
+ { flag: "--author" },
2731
+ { flag: "--message" },
2732
+ { flag: "--allow-audit-update" },
2733
+ { flag: "--allow_audit_update" },
2734
+ { flag: "--force" }
2735
+ ];
2736
+ var CALENDAR_FLAG_CONTRACTS = [
2737
+ { flag: "--view" },
2738
+ { flag: "--date" },
2739
+ { flag: "--from" },
2740
+ { flag: "--to" },
2741
+ { flag: "--past" },
2742
+ { flag: "--full-period" },
2743
+ { flag: "--full_period" },
2744
+ { flag: "--type" },
2745
+ { flag: "--tag" },
2746
+ { flag: "--priority" },
2747
+ { flag: "--status" },
2748
+ { flag: "--assignee" },
2749
+ { flag: "--assignee-filter" },
2750
+ { flag: "--assignee_filter" },
2751
+ { flag: "--sprint" },
2752
+ { flag: "--release" },
2753
+ { flag: "--include" },
2754
+ { flag: "--recurrence-lookahead-days" },
2755
+ { flag: "--recurrence-lookback-days" },
2756
+ { flag: "--occurrence-limit" },
2757
+ { flag: "--limit" },
2758
+ { flag: "--format" }
2759
+ ];
2760
+ var ACTIVITY_FLAG_CONTRACTS = [
2761
+ { flag: "--id" },
2762
+ { flag: "--op" },
2763
+ { flag: "--author" },
2764
+ { flag: "--from" },
2765
+ { flag: "--to" },
2766
+ { flag: "--limit" },
2767
+ { flag: "--compact" },
2768
+ { flag: "--full" },
2769
+ { flag: "--stream" }
2770
+ ];
2771
+ var CONTEXT_FLAG_CONTRACTS = [
2772
+ { flag: "--date" },
2773
+ { flag: "--from" },
2774
+ { flag: "--to" },
2775
+ { flag: "--past" },
2776
+ { flag: "--type" },
2777
+ { flag: "--tag" },
2778
+ { flag: "--priority" },
2779
+ { flag: "--assignee" },
2780
+ { flag: "--assignee-filter" },
2781
+ { flag: "--assignee_filter" },
2782
+ { flag: "--sprint" },
2783
+ { flag: "--release" },
2784
+ { flag: "--limit" },
2785
+ { flag: "--format" },
2786
+ { flag: "--depth" },
2787
+ { flag: "--section" },
2788
+ { flag: "--activity-limit" },
2789
+ { flag: "--stale-threshold" }
2790
+ ];
2791
+ var GET_FLAG_CONTRACTS = [
2792
+ { flag: "--depth" },
2793
+ { flag: "--full" },
2794
+ { flag: "--fields", list: true }
2795
+ ];
2796
+ var GUIDE_FLAG_CONTRACTS = [
2797
+ { flag: "--list" },
2798
+ { flag: "--format" },
2799
+ { flag: "--depth" }
2800
+ ];
2801
+ var DEPS_FLAG_CONTRACTS = [
2802
+ { flag: "--format" },
2803
+ { flag: "--max-depth" },
2804
+ { flag: "--collapse" },
2805
+ { flag: "--summary" }
2806
+ ];
2807
+ var SEARCH_FLAG_CONTRACTS = [
2808
+ { flag: "--mode" },
2809
+ { flag: "--semantic" },
2810
+ { flag: "--hybrid" },
2811
+ { flag: "--include-linked" },
2812
+ { flag: "--title-exact" },
2813
+ { flag: "--phrase-exact" },
2814
+ { flag: "--compact" },
2815
+ { flag: "--full" },
2816
+ { flag: "--fields", list: true },
2817
+ { flag: "--limit" },
2818
+ { flag: "--type" },
2819
+ { flag: "--tag" },
2820
+ { flag: "--priority" },
2821
+ { flag: "--deadline-before" },
2822
+ { flag: "--deadline-after" }
2823
+ ];
2824
+ var CONTRACTS_FLAG_CONTRACTS = [
2825
+ { flag: "--action" },
2826
+ { flag: "--command" },
2827
+ { flag: "--schema-only" },
2828
+ { flag: "--flags-only" },
2829
+ { flag: "--availability-only" },
2830
+ { flag: "--runtime-only" },
2831
+ { flag: "--active-only" },
2832
+ { flag: "--full" }
2833
+ ];
2834
+ var COMPLETION_FLAG_CONTRACTS = [
2835
+ { flag: "--eager-tags" }
2836
+ ];
2837
+ function toUniqueFlagContracts(contracts) {
2838
+ const seen = /* @__PURE__ */ new Set();
2839
+ const unique = [];
2840
+ for (const contract of contracts) {
2841
+ const aliasKey = (contract.aliases ?? []).join(",");
2842
+ const key = `${contract.flag}|${contract.short ?? ""}|${aliasKey}`;
2843
+ if (seen.has(key)) {
2844
+ continue;
2845
+ }
2846
+ seen.add(key);
2847
+ unique.push(contract);
2848
+ }
2849
+ return unique;
2850
+ }
2851
+ function withSubcommandGlobalFlags(contracts) {
2852
+ return withFlagAliasMetadata(toUniqueFlagContracts([...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, ...contracts]));
2853
+ }
2854
+ var LIST_COMMAND_NAME_CONTRACTS = /* @__PURE__ */ new Set([
2855
+ "list",
2856
+ "list-all",
2857
+ "list-draft",
2858
+ "list-open",
2859
+ "list-in-progress",
2860
+ "list-blocked",
2861
+ "list-closed",
2862
+ "list-canceled"
2863
+ ]);
2864
+ var NO_SURFACE_COMMAND_NAME_CONTRACTS = /* @__PURE__ */ new Set([
2865
+ "stats",
2866
+ "reindex",
2867
+ "help"
2868
+ ]);
2869
+ function normalizeCommandNameForContracts(commandName) {
2870
+ if (typeof commandName !== "string") {
2871
+ return "";
2872
+ }
2873
+ return commandName.trim().toLowerCase();
2874
+ }
2875
+ function resolveSubcommandFlagContractsForCommand(commandName) {
2876
+ const normalized = normalizeCommandNameForContracts(commandName);
2877
+ if (normalized.length === 0) {
2878
+ return withSubcommandGlobalFlags([]);
2879
+ }
2880
+ if (LIST_COMMAND_NAME_CONTRACTS.has(normalized)) {
2881
+ return withSubcommandGlobalFlags(LIST_FILTER_FLAG_CONTRACTS);
2882
+ }
2883
+ if (NO_SURFACE_COMMAND_NAME_CONTRACTS.has(normalized)) {
2884
+ return withSubcommandGlobalFlags([]);
2885
+ }
2886
+ if (normalized === "templates") {
2887
+ return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
2888
+ }
2889
+ if (normalized === "cal") {
2890
+ return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
2891
+ }
2892
+ if (normalized === "ctx") {
2893
+ return withSubcommandGlobalFlags(CONTEXT_FLAG_CONTRACTS);
2894
+ }
2895
+ if (normalized === "test-runs-worker") {
2896
+ return withSubcommandGlobalFlags(TEST_RUNS_FLAG_CONTRACTS);
2897
+ }
2898
+ switch (normalized) {
2899
+ case "init":
2900
+ return withSubcommandGlobalFlags(INIT_FLAG_CONTRACTS);
2901
+ case "config":
2902
+ return withSubcommandGlobalFlags(CONFIG_FLAG_CONTRACTS);
2903
+ case "extension":
2904
+ case "package":
2905
+ case "packages":
2906
+ return withSubcommandGlobalFlags(EXTENSION_FLAG_CONTRACTS);
2907
+ case "install":
2908
+ return withSubcommandGlobalFlags(INSTALL_FLAG_CONTRACTS);
2909
+ case "upgrade":
2910
+ return withSubcommandGlobalFlags(UPGRADE_FLAG_CONTRACTS);
2911
+ case "create":
2912
+ return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
2913
+ case "aggregate":
2914
+ return withSubcommandGlobalFlags(AGGREGATE_FLAG_CONTRACTS);
2915
+ case "calendar":
2916
+ return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
2917
+ case "context":
2918
+ return withSubcommandGlobalFlags(CONTEXT_FLAG_CONTRACTS);
2919
+ case "get":
2920
+ return withSubcommandGlobalFlags(GET_FLAG_CONTRACTS);
2921
+ case "search":
2922
+ return withSubcommandGlobalFlags(SEARCH_FLAG_CONTRACTS);
2923
+ case "history":
2924
+ return withSubcommandGlobalFlags(HISTORY_FLAG_CONTRACTS);
2925
+ case "history-redact":
2926
+ return withSubcommandGlobalFlags(HISTORY_REDACT_FLAG_CONTRACTS);
2927
+ case "history-repair":
2928
+ return withSubcommandGlobalFlags(HISTORY_REPAIR_FLAG_CONTRACTS);
2929
+ case "schema":
2930
+ return withSubcommandGlobalFlags(SCHEMA_FLAG_CONTRACTS);
2931
+ case "plan":
2932
+ return withSubcommandGlobalFlags(PLAN_FLAG_CONTRACTS);
2933
+ case "activity":
2934
+ return withSubcommandGlobalFlags(ACTIVITY_FLAG_CONTRACTS);
2935
+ case "restore":
2936
+ return withSubcommandGlobalFlags(RESTORE_FLAG_CONTRACTS);
2937
+ case "update":
2938
+ return withSubcommandGlobalFlags(UPDATE_FLAG_CONTRACTS);
2939
+ case "update-many":
2940
+ return withSubcommandGlobalFlags(UPDATE_MANY_FLAG_CONTRACTS);
2941
+ case "close":
2942
+ return withSubcommandGlobalFlags(CLOSE_FLAG_CONTRACTS);
2943
+ case "delete":
2944
+ return withSubcommandGlobalFlags(DELETE_FLAG_CONTRACTS);
2945
+ case "append":
2946
+ return withSubcommandGlobalFlags(APPEND_FLAG_CONTRACTS);
2947
+ case "comments":
2948
+ return withSubcommandGlobalFlags(COMMENTS_FLAG_CONTRACTS);
2949
+ case "notes":
2950
+ return withSubcommandGlobalFlags(NOTES_FLAG_CONTRACTS);
2951
+ case "learnings":
2952
+ return withSubcommandGlobalFlags(LEARNINGS_FLAG_CONTRACTS);
2953
+ case "files":
2954
+ return withSubcommandGlobalFlags(FILES_FLAG_CONTRACTS);
2955
+ case "docs":
2956
+ return withSubcommandGlobalFlags(DOCS_FLAG_CONTRACTS);
2957
+ case "deps":
2958
+ return withSubcommandGlobalFlags(DEPS_FLAG_CONTRACTS);
2959
+ case "test":
2960
+ return withSubcommandGlobalFlags(TEST_FLAG_CONTRACTS);
2961
+ case "test-all":
2962
+ return withSubcommandGlobalFlags(TEST_ALL_FLAG_CONTRACTS);
2963
+ case "health":
2964
+ return withSubcommandGlobalFlags(HEALTH_FLAG_CONTRACTS);
2965
+ case "validate":
2966
+ return withSubcommandGlobalFlags(VALIDATE_FLAG_CONTRACTS);
2967
+ case "gc":
2968
+ return withSubcommandGlobalFlags(GC_FLAG_CONTRACTS);
2969
+ case "contracts":
2970
+ return withSubcommandGlobalFlags(CONTRACTS_FLAG_CONTRACTS);
2971
+ case "claim":
2972
+ return withSubcommandGlobalFlags(CLAIM_FLAG_CONTRACTS);
2973
+ case "release":
2974
+ return withSubcommandGlobalFlags(RELEASE_FLAG_CONTRACTS);
2975
+ case "start-task":
2976
+ return withSubcommandGlobalFlags(START_TASK_FLAG_CONTRACTS);
2977
+ case "pause-task":
2978
+ return withSubcommandGlobalFlags(PAUSE_TASK_FLAG_CONTRACTS);
2979
+ case "close-task":
2980
+ return withSubcommandGlobalFlags(CLOSE_TASK_FLAG_CONTRACTS);
2981
+ default:
2982
+ return withSubcommandGlobalFlags([]);
2983
+ }
2984
+ }
2985
+ var PM_TOOL_GLOBAL_PARAMETER_KEYS = ["json", "quiet", "profile", "noExtensions", "noPager", "path", "pmExecutable", "timeoutMs"];
2986
+ function toSchemaKeyList(values) {
2987
+ return normalizeUniqueStringList(values);
2988
+ }
2989
+ var CREATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
2990
+ ...TOOL_CREATE_OPTION_CONTRACTS.map((entry) => entry.param),
2991
+ ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
2992
+ "assignee"
2993
+ ]);
2994
+ var UPDATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
2995
+ ...TOOL_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
2996
+ ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
2997
+ "force"
2998
+ ]);
2999
+ var UPDATE_MANY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3000
+ ...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
3001
+ ...UPDATE_CONTRACT_PARAMETER_KEYS,
3002
+ "dryRun",
3003
+ "rollback",
3004
+ "noCheckpoint"
3005
+ ]);
3006
+ var NORMALIZE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3007
+ ...TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
3008
+ "dryRun",
3009
+ "apply",
3010
+ "author",
3011
+ "message",
3012
+ "allowAuditUpdate",
3013
+ "force"
3014
+ ]);
3015
+ var CONTEXT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3016
+ ...TOOL_CONTEXT_OPTION_CONTRACTS.map((entry) => entry.param),
3017
+ "past",
3018
+ "section"
3019
+ ]);
3020
+ var ACTIVITY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3021
+ ...TOOL_ACTIVITY_OPTION_CONTRACTS.map((entry) => entry.param),
3022
+ "stream"
3023
+ ]);
3024
+ var LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3025
+ ...TOOL_LIST_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
3026
+ "includeBody",
3027
+ "compact",
3028
+ "brief",
3029
+ "full"
3030
+ ]);
3031
+ var AGGREGATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3032
+ ...TOOL_AGGREGATE_OPTION_CONTRACTS.map((entry) => entry.param),
3033
+ "count",
3034
+ "includeUnparented"
3035
+ ]);
3036
+ var DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS.map((entry) => entry.param));
3037
+ var SEARCH_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
3038
+ "query",
3039
+ "keywords",
3040
+ "mode",
3041
+ "semantic",
3042
+ "hybrid",
3043
+ "includeLinked",
3044
+ "titleExact",
3045
+ "phraseExact",
3046
+ "compact",
3047
+ "full",
3048
+ ...TOOL_SEARCH_FILTER_OPTION_CONTRACTS.map((entry) => entry.param)
3049
+ ]);
3050
+ var AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = ["author", "message", "force"];
3051
+ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3052
+ init: { optional: ["prefix", "preset", "defaults", "author", "agentGuidance", "withPackages"] },
3053
+ config: {
3054
+ required: ["scope", "configAction"],
3055
+ optional: ["key", "value", "criterion", "clearCriteria", "format", "policy"]
3056
+ },
3057
+ "extension-init": { required: ["target"], optional: ["scope"] },
3058
+ "extension-install": {
3059
+ optional: ["target", "github", "scope", "ref"],
3060
+ anyOfRequired: [["target"], ["github"]]
3061
+ },
3062
+ "extension-uninstall": { required: ["target"], optional: ["scope"] },
3063
+ "extension-explore": { optional: ["scope"] },
3064
+ "extension-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
3065
+ "extension-reload": { optional: ["scope", "watch"] },
3066
+ "extension-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
3067
+ "extension-catalog": { optional: ["scope"] },
3068
+ "extension-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
3069
+ "extension-adopt-all": { optional: ["scope"] },
3070
+ "extension-activate": { required: ["target"], optional: ["scope"] },
3071
+ "extension-deactivate": { required: ["target"], optional: ["scope"] },
3072
+ extension: {
3073
+ optional: [
3074
+ "target",
3075
+ "scope",
3076
+ "github",
3077
+ "ref",
3078
+ "init",
3079
+ "install",
3080
+ "uninstall",
3081
+ "explore",
3082
+ "manage",
3083
+ "reload",
3084
+ "doctor",
3085
+ "catalog",
3086
+ "adopt",
3087
+ "adoptAll",
3088
+ "activate",
3089
+ "deactivate",
3090
+ "runtimeProbe",
3091
+ "fixManagedState",
3092
+ "detail",
3093
+ "trace",
3094
+ "watch",
3095
+ "strictExit",
3096
+ "failOnWarn"
3097
+ ]
3098
+ },
3099
+ "package-init": { required: ["target"], optional: ["scope"] },
3100
+ "package-install": {
3101
+ optional: ["target", "github", "scope", "ref"],
3102
+ anyOfRequired: [["target"], ["github"]]
3103
+ },
3104
+ "package-uninstall": { required: ["target"], optional: ["scope"] },
3105
+ "package-explore": { optional: ["scope"] },
3106
+ "package-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
3107
+ "package-reload": { optional: ["scope", "watch"] },
3108
+ "package-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
3109
+ "package-catalog": { optional: ["scope"] },
3110
+ "package-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
3111
+ "package-adopt-all": { optional: ["scope"] },
3112
+ "package-activate": { required: ["target"], optional: ["scope"] },
3113
+ "package-deactivate": { required: ["target"], optional: ["scope"] },
3114
+ package: {
3115
+ optional: [
3116
+ "target",
3117
+ "scope",
3118
+ "github",
3119
+ "ref",
3120
+ "init",
3121
+ "install",
3122
+ "uninstall",
3123
+ "explore",
3124
+ "manage",
3125
+ "reload",
3126
+ "doctor",
3127
+ "catalog",
3128
+ "adopt",
3129
+ "adoptAll",
3130
+ "activate",
3131
+ "deactivate",
3132
+ "runtimeProbe",
3133
+ "fixManagedState",
3134
+ "detail",
3135
+ "trace",
3136
+ "watch",
3137
+ "strictExit",
3138
+ "failOnWarn"
3139
+ ]
3140
+ },
3141
+ install: {
3142
+ optional: ["target", "github", "scope", "ref"],
3143
+ anyOfRequired: [["target"], ["github"]]
3144
+ },
3145
+ upgrade: {
3146
+ optional: ["target", "scope", "dryRun", "cliOnly", "packagesOnly", "repair", "tag", "packageName"]
3147
+ },
3148
+ create: {
3149
+ required: ["title", "description", "type", "status", "priority", "message"],
3150
+ optional: CREATE_CONTRACT_PARAMETER_KEYS
3151
+ },
3152
+ list: { optional: LIST_CONTRACT_PARAMETER_KEYS },
3153
+ "list-all": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3154
+ "list-draft": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3155
+ "list-open": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3156
+ "list-in-progress": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3157
+ "list-blocked": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3158
+ "list-closed": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3159
+ "list-canceled": { optional: LIST_CONTRACT_PARAMETER_KEYS },
3160
+ aggregate: { optional: AGGREGATE_CONTRACT_PARAMETER_KEYS },
3161
+ "dedupe-audit": { optional: DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS },
3162
+ guide: { optional: ["format", "depth"] },
3163
+ context: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
3164
+ ctx: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
3165
+ get: { required: ["id"], optional: ["depth", "full", "fields"] },
3166
+ search: {
3167
+ optional: SEARCH_CONTRACT_PARAMETER_KEYS,
3168
+ anyOfRequired: [["query"], ["keywords"]]
3169
+ },
3170
+ reindex: { optional: ["mode", "progress"] },
3171
+ history: { required: ["id"], optional: ["limit", "compact", "full", "diff", "verify"] },
3172
+ "history-redact": {
3173
+ required: ["id"],
3174
+ optional: ["literal", "regex", "replacement", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
3175
+ anyOfRequired: [["literal"], ["regex"]]
3176
+ },
3177
+ "history-repair": {
3178
+ required: ["id"],
3179
+ optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3180
+ },
3181
+ schema: {
3182
+ required: ["subcommand", "name"],
3183
+ // No --message: schema add-type writes a config file, not item history.
3184
+ optional: ["description", "defaultStatus", "folder", "alias", "author", "force"]
3185
+ },
3186
+ plan: {
3187
+ required: ["subcommand"],
3188
+ optional: [
3189
+ "id",
3190
+ "stepRef",
3191
+ "reorderTo",
3192
+ "title",
3193
+ "description",
3194
+ "scope",
3195
+ "parent",
3196
+ "related",
3197
+ "blocks",
3198
+ "blockedBy",
3199
+ "harness",
3200
+ "mode",
3201
+ "resumeContext",
3202
+ "tags",
3203
+ "priority",
3204
+ "body",
3205
+ "claim",
3206
+ "fromSearch",
3207
+ "stepTitle",
3208
+ "stepBody",
3209
+ "stepOwner",
3210
+ "stepStatus",
3211
+ "stepEvidence",
3212
+ "stepBlockedReason",
3213
+ "stepReplacement",
3214
+ "dependsOn",
3215
+ "link",
3216
+ "linkKind",
3217
+ "linkNote",
3218
+ "promoteToItemDep",
3219
+ "allowMultipleActive",
3220
+ "file",
3221
+ "test",
3222
+ "doc",
3223
+ "decisionText",
3224
+ "decision",
3225
+ "decisionRationale",
3226
+ "decisionEvidence",
3227
+ "discoveryText",
3228
+ "discovery",
3229
+ "validationText",
3230
+ "validation",
3231
+ "validationCommand",
3232
+ "validationExpected",
3233
+ "depth",
3234
+ "fields",
3235
+ "steps",
3236
+ "materializeType",
3237
+ "materializeParent",
3238
+ "materializeTags",
3239
+ ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
3240
+ ]
3241
+ },
3242
+ activity: { optional: ACTIVITY_CONTRACT_PARAMETER_KEYS },
3243
+ restore: { required: ["id", "target"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
3244
+ update: { required: ["id"], optional: UPDATE_CONTRACT_PARAMETER_KEYS },
3245
+ "update-many": { optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS },
3246
+ normalize: { optional: NORMALIZE_CONTRACT_PARAMETER_KEYS },
3247
+ close: { required: ["id", "text"], optional: ["validateClose", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
3248
+ delete: { required: ["id"], optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
3249
+ append: { required: ["id", "body"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
3250
+ comments: {
3251
+ required: ["id"],
3252
+ optional: ["text", "add", "stdin", "file", "limit", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3253
+ },
3254
+ "comments-audit": {
3255
+ optional: [
3256
+ "status",
3257
+ "type",
3258
+ "assignee",
3259
+ "assigneeFilter",
3260
+ "parent",
3261
+ "tag",
3262
+ "sprint",
3263
+ "release",
3264
+ "priority",
3265
+ "limitItems",
3266
+ "limit",
3267
+ "fullHistory",
3268
+ "latest"
3269
+ ]
3270
+ },
3271
+ notes: {
3272
+ required: ["id"],
3273
+ optional: ["text", "add", "limit", "allowAuditNote", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3274
+ },
3275
+ learnings: {
3276
+ required: ["id"],
3277
+ optional: ["text", "add", "limit", "allowAuditLearning", "allowAuditComment", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3278
+ },
3279
+ files: {
3280
+ required: ["id"],
3281
+ optional: [
3282
+ "add",
3283
+ "addGlob",
3284
+ "remove",
3285
+ "migrate",
3286
+ "discover",
3287
+ "apply",
3288
+ "discoveryNote",
3289
+ "appendStable",
3290
+ "validatePaths",
3291
+ "audit",
3292
+ ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
3293
+ ]
3294
+ },
3295
+ docs: {
3296
+ required: ["id"],
3297
+ optional: ["add", "addGlob", "remove", "migrate", "validatePaths", "audit", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3298
+ },
3299
+ deps: { required: ["id"], optional: ["format", "maxDepth", "collapse", "summary"] },
3300
+ test: {
3301
+ required: ["id"],
3302
+ optional: [
3303
+ "add",
3304
+ "remove",
3305
+ "run",
3306
+ "background",
3307
+ "timeout",
3308
+ "progress",
3309
+ "envSet",
3310
+ "envClear",
3311
+ "sharedHostSafe",
3312
+ "pmContext",
3313
+ "overrideLinkedPmContext",
3314
+ "failOnContextMismatch",
3315
+ "failOnSkipped",
3316
+ "failOnEmptyTestRun",
3317
+ "requireAssertionsForPm",
3318
+ "checkContext",
3319
+ "autoPmContext",
3320
+ ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
3321
+ ]
3322
+ },
3323
+ "test-all": {
3324
+ optional: [
3325
+ "status",
3326
+ "limit",
3327
+ "offset",
3328
+ "background",
3329
+ "timeout",
3330
+ "progress",
3331
+ "envSet",
3332
+ "envClear",
3333
+ "sharedHostSafe",
3334
+ "pmContext",
3335
+ "overrideLinkedPmContext",
3336
+ "failOnContextMismatch",
3337
+ "failOnSkipped",
3338
+ "failOnEmptyTestRun",
3339
+ "requireAssertionsForPm",
3340
+ "checkContext",
3341
+ "autoPmContext"
3342
+ ]
3343
+ },
3344
+ "test-runs-list": {
3345
+ optional: ["status", "limit"]
3346
+ },
3347
+ "test-runs-status": {
3348
+ required: ["runId"]
3349
+ },
3350
+ "test-runs-logs": {
3351
+ required: ["runId"],
3352
+ optional: ["stream", "tail"]
3353
+ },
3354
+ "test-runs-stop": {
3355
+ required: ["runId"],
3356
+ optional: ["force"]
3357
+ },
3358
+ "test-runs-resume": {
3359
+ required: ["runId"],
3360
+ optional: ["author"]
3361
+ },
3362
+ stats: {},
3363
+ health: {
3364
+ optional: [
3365
+ "strictDirectories",
3366
+ "strictExit",
3367
+ "failOnWarn",
3368
+ "checkOnly",
3369
+ "checkTelemetry",
3370
+ "noRefresh",
3371
+ "refreshVectors",
3372
+ "verboseStaleItems",
3373
+ "summary",
3374
+ "skipVectors",
3375
+ "skipIntegrity",
3376
+ "skipDrift",
3377
+ "full"
3378
+ ]
3379
+ },
3380
+ validate: {
3381
+ optional: [
3382
+ "checkMetadata",
3383
+ "metadataProfile",
3384
+ "checkResolution",
3385
+ "checkLifecycle",
3386
+ "checkStaleBlockers",
3387
+ "dependencyCycleSeverity",
3388
+ "checkFiles",
3389
+ "scanMode",
3390
+ "includePmInternals",
3391
+ "verboseFileLists",
3392
+ "verboseDiagnostics",
3393
+ "strictExit",
3394
+ "failOnWarn",
3395
+ "checkHistoryDrift",
3396
+ "checkCommandReferences"
3397
+ ]
3398
+ },
3399
+ gc: { optional: ["dryRun", "gcScope"] },
3400
+ contracts: { optional: ["contractAction", "command", "schemaOnly", "flagsOnly", "availabilityOnly", "runtimeOnly", "activeOnly"] },
3401
+ completion: { required: ["shell"], optional: ["eagerTags"] },
3402
+ claim: { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
3403
+ release: { required: ["id"], optional: ["allowAuditRelease", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
3404
+ "start-task": { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
3405
+ "pause-task": { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
3406
+ "close-task": { required: ["id", "text"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS }
3407
+ };
3408
+ var PM_TOOL_ACTION_PARAMETER_CONTRACTS = Object.freeze(Object.fromEntries(PM_TOOL_ACTIONS.map((action) => [action, PM_TOOL_ACTION_SCHEMA_CONTRACTS[action]])));
3409
+ function fallbackToolParameterDescription(key) {
3410
+ return key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").trim().replace(/^./, (value) => value.toUpperCase()).concat(".");
3411
+ }
3412
+ function decorateToolParameterDefinition(key, definition) {
3413
+ const baseDefinition = typeof definition === "object" && definition !== null ? { ...definition } : {};
3414
+ const metadata = PM_TOOL_PARAMETER_METADATA[key];
3415
+ return {
3416
+ ...baseDefinition,
3417
+ description: metadata?.description ?? fallbackToolParameterDescription(key),
3418
+ ...metadata?.examples ? { examples: metadata.examples } : {}
3419
+ };
3420
+ }
3421
+ function actionScopedToolParameterMetadata(action, key) {
3422
+ if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_METADATA, key)) {
3423
+ return PLAN_ACTION_PARAMETER_METADATA[key];
3424
+ }
3425
+ return PM_TOOL_PARAMETER_METADATA[key];
3426
+ }
3427
+ function decorateActionScopedToolParameterDefinition(action, key, definition) {
3428
+ const baseDefinition = typeof definition === "object" && definition !== null ? { ...definition } : {};
3429
+ const metadata = actionScopedToolParameterMetadata(action, key);
3430
+ return {
3431
+ ...baseDefinition,
3432
+ description: metadata?.description ?? fallbackToolParameterDescription(key),
3433
+ ...metadata?.examples ? { examples: metadata.examples } : {}
3434
+ };
3435
+ }
3436
+ function actionScopedToolParameterDefinition(action, key) {
3437
+ if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_PROPERTIES, key)) {
3438
+ return PLAN_ACTION_PARAMETER_PROPERTIES[key];
3439
+ }
3440
+ return PM_TOOL_PARAMETER_PROPERTIES[key];
3441
+ }
3442
+ function buildActionScopedToolSchema(action) {
3443
+ const contract = PM_TOOL_ACTION_SCHEMA_CONTRACTS[action];
3444
+ const required = toSchemaKeyList(contract.required ?? []);
3445
+ const optional = toSchemaKeyList(contract.optional ?? []);
3446
+ const allowedKeys = toSchemaKeyList([...PM_TOOL_GLOBAL_PARAMETER_KEYS, ...required, ...optional]);
3447
+ const properties = {
3448
+ action: {
3449
+ const: action,
3450
+ description: PM_TOOL_PARAMETER_METADATA.action?.description ?? "Tool action to execute."
3451
+ }
3452
+ };
3453
+ for (const key of allowedKeys) {
3454
+ if (key === "action") {
3455
+ continue;
3456
+ }
3457
+ const definition = actionScopedToolParameterDefinition(action, key);
3458
+ if (definition) {
3459
+ properties[key] = decorateActionScopedToolParameterDefinition(action, key, definition);
3460
+ }
3461
+ }
3462
+ const schema = {
3463
+ type: "object",
3464
+ additionalProperties: false,
3465
+ required: ["action", ...required],
3466
+ title: `pm action "${action}" parameters`,
3467
+ properties
3468
+ };
3469
+ if (contract.anyOfRequired && contract.anyOfRequired.length > 0) {
3470
+ schema.anyOf = contract.anyOfRequired.map((requiredFields) => ({
3471
+ required: [...requiredFields]
3472
+ }));
3473
+ }
3474
+ return schema;
3475
+ }
3476
+ function createLazyContractSchema(build) {
3477
+ let value;
3478
+ const resolve = () => value ??= build();
3479
+ return new Proxy({}, {
3480
+ get: (_target, prop) => resolve()[prop],
3481
+ has: (_target, prop) => prop in resolve(),
3482
+ ownKeys: () => Reflect.ownKeys(resolve()),
3483
+ getOwnPropertyDescriptor: (_target, prop) => {
3484
+ const descriptor = Reflect.getOwnPropertyDescriptor(resolve(), prop);
3485
+ if (descriptor) {
3486
+ descriptor.configurable = true;
3487
+ }
3488
+ return descriptor;
3489
+ }
3490
+ });
3491
+ }
3492
+ var PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
3493
+ $schema: "https://json-schema.org/draft/2020-12/schema",
3494
+ $id: "https://schema.unbrained.dev/pm-cli/tool-parameters-v4.schema.json",
3495
+ title: "pm-cli tool parameters (action-scoped strict schema)",
3496
+ "x-schema-version": "4.0.1",
3497
+ type: "object",
3498
+ oneOf: PM_TOOL_ACTIONS.map((action) => buildActionScopedToolSchema(action))
3499
+ }));
3500
+ function toProviderCompatibleParameterDefinition(key, definition) {
3501
+ const decorated = decorateToolParameterDefinition(key, definition);
3502
+ if (typeof decorated.type === "string") {
3503
+ return decorated;
3504
+ }
3505
+ const anyOf = Array.isArray(decorated.anyOf) ? decorated.anyOf : [];
3506
+ const firstTypedVariant = anyOf.find((variant) => typeof variant.type === "string");
3507
+ if (firstTypedVariant) {
3508
+ const { anyOf: _anyOf2, ...rest2 } = decorated;
3509
+ return {
3510
+ ...rest2,
3511
+ type: firstTypedVariant.type
3512
+ };
3513
+ }
3514
+ const { anyOf: _anyOf, ...rest } = decorated;
3515
+ return {
3516
+ ...rest,
3517
+ type: "string"
3518
+ };
3519
+ }
3520
+ function buildProviderCompatibleToolSchema() {
3521
+ const properties = {
3522
+ action: {
3523
+ type: "string",
3524
+ description: PM_TOOL_PARAMETER_METADATA.action?.description ?? "Tool action to execute."
3525
+ },
3526
+ options: {
3527
+ type: "object",
3528
+ additionalProperties: true,
3529
+ description: "Advanced command options object forwarded to the selected pm action."
3530
+ }
3531
+ };
3532
+ for (const key of Object.keys(PM_TOOL_PARAMETER_PROPERTIES).sort()) {
3533
+ properties[key] = toProviderCompatibleParameterDefinition(key, PM_TOOL_PARAMETER_PROPERTIES[key]);
3534
+ }
3535
+ return {
3536
+ title: "pm-cli tool parameters (provider-compatible flat schema)",
3537
+ "x-schema-version": "1.0.0",
3538
+ type: "object",
3539
+ additionalProperties: false,
3540
+ required: ["action"],
3541
+ properties
3542
+ };
3543
+ }
3544
+ var PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(buildProviderCompatibleToolSchema);
3545
+
3546
+ export {
3547
+ LIST_COMMANDER_STRING_OPTION_CONTRACTS,
3548
+ SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,
3549
+ CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,
3550
+ CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,
3551
+ ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
3552
+ readFirstStringFromCommanderOptions,
3553
+ readStringArrayFromCommanderOptions,
3554
+ CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
3555
+ CREATE_COMMANDER_STRING_OPTION_CONTRACTS,
3556
+ CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
3557
+ UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,
3558
+ UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,
3559
+ UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
3560
+ PM_EXTENSION_CAPABILITY_CONTRACTS,
3561
+ PM_EXTENSION_SERVICE_NAME_CONTRACTS,
3562
+ PM_EXTENSION_POLICY_MODE_CONTRACTS,
3563
+ PM_EXTENSION_TRUST_MODE_CONTRACTS,
3564
+ PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,
3565
+ PM_EXTENSION_POLICY_SURFACE_CONTRACTS,
3566
+ PM_CORE_COMMAND_NAMES,
3567
+ PM_TOOL_ACTIONS,
3568
+ compactFlagAliasContracts,
3569
+ GLOBAL_FLAG_CONTRACTS,
3570
+ LIST_FILTER_FLAG_CONTRACTS,
3571
+ AGGREGATE_FLAG_CONTRACTS,
3572
+ DEDUPE_AUDIT_FLAG_CONTRACTS,
3573
+ COMMENTS_AUDIT_FLAG_CONTRACTS,
3574
+ COMMENTS_FLAG_CONTRACTS,
3575
+ NOTES_FLAG_CONTRACTS,
3576
+ LEARNINGS_FLAG_CONTRACTS,
3577
+ FILES_FLAG_CONTRACTS,
3578
+ DOCS_FLAG_CONTRACTS,
3579
+ HISTORY_FLAG_CONTRACTS,
3580
+ HISTORY_REDACT_FLAG_CONTRACTS,
3581
+ HISTORY_REPAIR_FLAG_CONTRACTS,
3582
+ SCHEMA_FLAG_CONTRACTS,
3583
+ PLAN_FLAG_CONTRACTS,
3584
+ INIT_FLAG_CONTRACTS,
3585
+ CONFIG_FLAG_CONTRACTS,
3586
+ EXTENSION_FLAG_CONTRACTS,
3587
+ INSTALL_FLAG_CONTRACTS,
3588
+ UPGRADE_FLAG_CONTRACTS,
3589
+ REINDEX_FLAG_CONTRACTS,
3590
+ CLOSE_FLAG_CONTRACTS,
3591
+ APPEND_FLAG_CONTRACTS,
3592
+ CLAIM_FLAG_CONTRACTS,
3593
+ RESTORE_FLAG_CONTRACTS,
3594
+ DELETE_FLAG_CONTRACTS,
3595
+ RELEASE_FLAG_CONTRACTS,
3596
+ START_TASK_FLAG_CONTRACTS,
3597
+ PAUSE_TASK_FLAG_CONTRACTS,
3598
+ CLOSE_TASK_FLAG_CONTRACTS,
3599
+ TEST_FLAG_CONTRACTS,
3600
+ TEST_ALL_FLAG_CONTRACTS,
3601
+ TEST_RUNS_FLAG_CONTRACTS,
3602
+ GC_FLAG_CONTRACTS,
3603
+ HEALTH_FLAG_CONTRACTS,
3604
+ VALIDATE_FLAG_CONTRACTS,
3605
+ CREATE_FLAG_CONTRACTS,
3606
+ UPDATE_FLAG_CONTRACTS,
3607
+ UPDATE_MANY_FLAG_CONTRACTS,
3608
+ NORMALIZE_FLAG_CONTRACTS,
3609
+ CALENDAR_FLAG_CONTRACTS,
3610
+ ACTIVITY_FLAG_CONTRACTS,
3611
+ CONTEXT_FLAG_CONTRACTS,
3612
+ GET_FLAG_CONTRACTS,
3613
+ GUIDE_FLAG_CONTRACTS,
3614
+ DEPS_FLAG_CONTRACTS,
3615
+ SEARCH_FLAG_CONTRACTS,
3616
+ CONTRACTS_FLAG_CONTRACTS,
3617
+ COMPLETION_FLAG_CONTRACTS,
3618
+ resolveSubcommandFlagContractsForCommand,
3619
+ PM_TOOL_PARAMETERS_SCHEMA
3620
+ };
3621
+ //# sourceMappingURL=chunk-GN7IJPCD.js.map