@unbrained/pm-cli 2026.5.24 → 2026.5.28

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 (246) hide show
  1. package/CHANGELOG.md +953 -522
  2. package/README.md +2 -10
  3. package/dist/cli/bootstrap-args.d.ts +18 -1
  4. package/dist/cli/bootstrap-args.js +143 -3
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.js +134 -11
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/append.js +4 -3
  9. package/dist/cli/commands/append.js.map +1 -1
  10. package/dist/cli/commands/claim.js +5 -4
  11. package/dist/cli/commands/claim.js.map +1 -1
  12. package/dist/cli/commands/close.d.ts +3 -0
  13. package/dist/cli/commands/close.js +26 -3
  14. package/dist/cli/commands/close.js.map +1 -1
  15. package/dist/cli/commands/completion.d.ts +2 -2
  16. package/dist/cli/commands/completion.js +109 -56
  17. package/dist/cli/commands/completion.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +1 -1
  19. package/dist/cli/commands/config.js +82 -4
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/create.js +7 -272
  22. package/dist/cli/commands/create.js.map +1 -1
  23. package/dist/cli/commands/delete.js +4 -3
  24. package/dist/cli/commands/delete.js.map +1 -1
  25. package/dist/cli/commands/docs.d.ts +1 -12
  26. package/dist/cli/commands/docs.js +8 -312
  27. package/dist/cli/commands/docs.js.map +1 -1
  28. package/dist/cli/commands/extension/bundled-catalog.d.ts +14 -0
  29. package/dist/cli/commands/extension/bundled-catalog.js +268 -0
  30. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -0
  31. package/dist/cli/commands/extension/doctor.d.ts +31 -0
  32. package/dist/cli/commands/extension/doctor.js +345 -0
  33. package/dist/cli/commands/extension/doctor.js.map +1 -0
  34. package/dist/cli/commands/extension/install-sources.d.ts +37 -0
  35. package/dist/cli/commands/extension/install-sources.js +384 -0
  36. package/dist/cli/commands/extension/install-sources.js.map +1 -0
  37. package/dist/cli/commands/extension/managed-state.d.ts +48 -0
  38. package/dist/cli/commands/extension/managed-state.js +172 -0
  39. package/dist/cli/commands/extension/managed-state.js.map +1 -0
  40. package/dist/cli/commands/extension/scaffold.d.ts +14 -0
  41. package/dist/cli/commands/extension/scaffold.js +202 -0
  42. package/dist/cli/commands/extension/scaffold.js.map +1 -0
  43. package/dist/cli/commands/extension/shared.d.ts +14 -0
  44. package/dist/cli/commands/extension/shared.js +106 -0
  45. package/dist/cli/commands/extension/shared.js.map +1 -0
  46. package/dist/cli/commands/extension.d.ts +36 -68
  47. package/dist/cli/commands/extension.js +143 -1422
  48. package/dist/cli/commands/extension.js.map +1 -1
  49. package/dist/cli/commands/files.d.ts +1 -12
  50. package/dist/cli/commands/files.js +11 -308
  51. package/dist/cli/commands/files.js.map +1 -1
  52. package/dist/cli/commands/get.js +4 -3
  53. package/dist/cli/commands/get.js.map +1 -1
  54. package/dist/cli/commands/health.js +17 -3
  55. package/dist/cli/commands/health.js.map +1 -1
  56. package/dist/cli/commands/history-redact.js +23 -18
  57. package/dist/cli/commands/history-redact.js.map +1 -1
  58. package/dist/cli/commands/history-repair.js +24 -18
  59. package/dist/cli/commands/history-repair.js.map +1 -1
  60. package/dist/cli/commands/legacy-none-tokens.d.ts +3 -0
  61. package/dist/cli/commands/legacy-none-tokens.js +39 -0
  62. package/dist/cli/commands/legacy-none-tokens.js.map +1 -0
  63. package/dist/cli/commands/linked-artifacts.d.ts +96 -0
  64. package/dist/cli/commands/linked-artifacts.js +335 -0
  65. package/dist/cli/commands/linked-artifacts.js.map +1 -0
  66. package/dist/cli/commands/linked-test-parsers.d.ts +28 -0
  67. package/dist/cli/commands/linked-test-parsers.js +192 -0
  68. package/dist/cli/commands/linked-test-parsers.js.map +1 -0
  69. package/dist/cli/commands/list.js +19 -5
  70. package/dist/cli/commands/list.js.map +1 -1
  71. package/dist/cli/commands/normalize.js +4 -3
  72. package/dist/cli/commands/normalize.js.map +1 -1
  73. package/dist/cli/commands/plan.d.ts +5 -0
  74. package/dist/cli/commands/plan.js +56 -8
  75. package/dist/cli/commands/plan.js.map +1 -1
  76. package/dist/cli/commands/recurrence-parsers.d.ts +26 -0
  77. package/dist/cli/commands/recurrence-parsers.js +98 -0
  78. package/dist/cli/commands/recurrence-parsers.js.map +1 -0
  79. package/dist/cli/commands/restore.js +19 -8
  80. package/dist/cli/commands/restore.js.map +1 -1
  81. package/dist/cli/commands/search.js +5 -8
  82. package/dist/cli/commands/search.js.map +1 -1
  83. package/dist/cli/commands/test/linked-command-detection.d.ts +37 -0
  84. package/dist/cli/commands/test/linked-command-detection.js +200 -0
  85. package/dist/cli/commands/test/linked-command-detection.js.map +1 -0
  86. package/dist/cli/commands/test.d.ts +1 -2
  87. package/dist/cli/commands/test.js +8 -350
  88. package/dist/cli/commands/test.js.map +1 -1
  89. package/dist/cli/commands/update-many.js +4 -3
  90. package/dist/cli/commands/update-many.js.map +1 -1
  91. package/dist/cli/commands/update.js +83 -356
  92. package/dist/cli/commands/update.js.map +1 -1
  93. package/dist/cli/commands/validate.js +32 -12
  94. package/dist/cli/commands/validate.js.map +1 -1
  95. package/dist/cli/error-guidance.d.ts +1 -0
  96. package/dist/cli/error-guidance.js +6 -2
  97. package/dist/cli/error-guidance.js.map +1 -1
  98. package/dist/cli/main.d.ts +11 -0
  99. package/dist/cli/main.js +76 -28
  100. package/dist/cli/main.js.map +1 -1
  101. package/dist/cli/register-list-query.d.ts +4 -1
  102. package/dist/cli/register-list-query.js +242 -203
  103. package/dist/cli/register-list-query.js.map +1 -1
  104. package/dist/cli/register-mutation.js +73 -11
  105. package/dist/cli/register-mutation.js.map +1 -1
  106. package/dist/cli/register-operations.js +3 -3
  107. package/dist/cli/register-operations.js.map +1 -1
  108. package/dist/cli/register-setup.js +12 -7
  109. package/dist/cli/register-setup.js.map +1 -1
  110. package/dist/cli/registration-helpers.js +3 -2
  111. package/dist/cli/registration-helpers.js.map +1 -1
  112. package/dist/cli.js +4 -3
  113. package/dist/cli.js.map +1 -1
  114. package/dist/core/config/positional-value.d.ts +44 -0
  115. package/dist/core/config/positional-value.js +109 -0
  116. package/dist/core/config/positional-value.js.map +1 -0
  117. package/dist/core/extensions/extension-capability-aliases.d.ts +14 -0
  118. package/dist/core/extensions/extension-capability-aliases.js +159 -0
  119. package/dist/core/extensions/extension-capability-aliases.js.map +1 -0
  120. package/dist/core/extensions/extension-hook-runtime.d.ts +13 -0
  121. package/dist/core/extensions/extension-hook-runtime.js +414 -0
  122. package/dist/core/extensions/extension-hook-runtime.js.map +1 -0
  123. package/dist/core/extensions/extension-policy.d.ts +69 -0
  124. package/dist/core/extensions/extension-policy.js +481 -0
  125. package/dist/core/extensions/extension-policy.js.map +1 -0
  126. package/dist/core/extensions/extension-registries.d.ts +8 -0
  127. package/dist/core/extensions/extension-registries.js +52 -0
  128. package/dist/core/extensions/extension-registries.js.map +1 -0
  129. package/dist/core/extensions/extension-runtime-helpers.d.ts +6 -0
  130. package/dist/core/extensions/extension-runtime-helpers.js +29 -0
  131. package/dist/core/extensions/extension-runtime-helpers.js.map +1 -0
  132. package/dist/core/extensions/extension-types.d.ts +13 -39
  133. package/dist/core/extensions/extension-types.js +34 -2
  134. package/dist/core/extensions/extension-types.js.map +1 -1
  135. package/dist/core/extensions/index.d.ts +7 -0
  136. package/dist/core/extensions/index.js +11 -2
  137. package/dist/core/extensions/index.js.map +1 -1
  138. package/dist/core/extensions/loader.d.ts +4 -22
  139. package/dist/core/extensions/loader.js +22 -1139
  140. package/dist/core/extensions/loader.js.map +1 -1
  141. package/dist/core/history/drift-scan.d.ts +11 -0
  142. package/dist/core/history/drift-scan.js +114 -32
  143. package/dist/core/history/drift-scan.js.map +1 -1
  144. package/dist/core/history/history-rewrite.d.ts +43 -0
  145. package/dist/core/history/history-rewrite.js +48 -0
  146. package/dist/core/history/history-rewrite.js.map +1 -0
  147. package/dist/core/history/history.js +5 -4
  148. package/dist/core/history/history.js.map +1 -1
  149. package/dist/core/history/replay.js +4 -3
  150. package/dist/core/history/replay.js.map +1 -1
  151. package/dist/core/item/item-record.d.ts +19 -0
  152. package/dist/core/item/item-record.js +24 -0
  153. package/dist/core/item/item-record.js.map +1 -0
  154. package/dist/core/output/mutation-projection.d.ts +31 -0
  155. package/dist/core/output/mutation-projection.js +103 -0
  156. package/dist/core/output/mutation-projection.js.map +1 -0
  157. package/dist/core/output/output.d.ts +2 -0
  158. package/dist/core/output/output.js +5 -3
  159. package/dist/core/output/output.js.map +1 -1
  160. package/dist/core/schema/runtime-schema.js +8 -38
  161. package/dist/core/schema/runtime-schema.js.map +1 -1
  162. package/dist/core/search/vector-stores.js +46 -9
  163. package/dist/core/search/vector-stores.js.map +1 -1
  164. package/dist/core/sentry/helpers.d.ts +1 -1
  165. package/dist/core/sentry/helpers.js +20 -3
  166. package/dist/core/sentry/helpers.js.map +1 -1
  167. package/dist/core/shared/command-types.d.ts +1 -0
  168. package/dist/core/shared/command-types.js +2 -2
  169. package/dist/core/shared/command-types.js.map +1 -1
  170. package/dist/core/shared/constants.d.ts +10 -1
  171. package/dist/core/shared/constants.js +56 -58
  172. package/dist/core/shared/constants.js.map +1 -1
  173. package/dist/core/shared/levenshtein.js +23 -7
  174. package/dist/core/shared/levenshtein.js.map +1 -1
  175. package/dist/core/shared/primitives.d.ts +23 -0
  176. package/dist/core/shared/primitives.js +39 -2
  177. package/dist/core/shared/primitives.js.map +1 -1
  178. package/dist/core/store/front-matter-cache.d.ts +16 -2
  179. package/dist/core/store/front-matter-cache.js +99 -33
  180. package/dist/core/store/front-matter-cache.js.map +1 -1
  181. package/dist/core/store/item-store.js +8 -73
  182. package/dist/core/store/item-store.js.map +1 -1
  183. package/dist/mcp/server.js +76 -28
  184. package/dist/mcp/server.js.map +1 -1
  185. package/dist/sdk/cli-contracts/enum-contracts.d.ts +20 -0
  186. package/dist/sdk/cli-contracts/enum-contracts.js +156 -0
  187. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -0
  188. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +14 -0
  189. package/dist/sdk/cli-contracts/tool-option-contracts.js +243 -0
  190. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -0
  191. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +11 -0
  192. package/dist/sdk/cli-contracts/tool-parameter-tables.js +901 -0
  193. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -0
  194. package/dist/sdk/cli-contracts.d.ts +11 -33
  195. package/dist/sdk/cli-contracts.js +30 -1356
  196. package/dist/sdk/cli-contracts.js.map +1 -1
  197. package/dist/sdk/package-import-adapters.d.ts +74 -0
  198. package/dist/sdk/package-import-adapters.js +186 -0
  199. package/dist/sdk/package-import-adapters.js.map +1 -0
  200. package/dist/sdk/package-runtime-options.d.ts +26 -0
  201. package/dist/sdk/package-runtime-options.js +71 -0
  202. package/dist/sdk/package-runtime-options.js.map +1 -0
  203. package/dist/sdk/runtime.d.ts +2 -0
  204. package/dist/sdk/runtime.js +4 -2
  205. package/dist/sdk/runtime.js.map +1 -1
  206. package/docs/AGENT_GUIDE.md +6 -10
  207. package/docs/CLAUDE_CODE_PLUGIN.md +5 -28
  208. package/docs/CODEX_PLUGIN.md +5 -5
  209. package/docs/COMMANDS.md +19 -3
  210. package/docs/CONFIGURATION.md +15 -0
  211. package/docs/EXTENSIONS.md +4 -63
  212. package/docs/RELEASING.md +4 -4
  213. package/marketplace.json +7 -3
  214. package/package.json +9 -6
  215. package/packages/pm-beads/extensions/beads/index.js +2 -49
  216. package/packages/pm-beads/extensions/beads/index.ts +2 -54
  217. package/packages/pm-beads/extensions/beads/runtime-loader.js +86 -0
  218. package/packages/pm-beads/extensions/beads/runtime-loader.ts +88 -0
  219. package/packages/pm-beads/extensions/beads/runtime.js +26 -115
  220. package/packages/pm-beads/extensions/beads/runtime.ts +33 -132
  221. package/packages/pm-calendar/extensions/calendar/index.js +47 -2
  222. package/packages/pm-calendar/extensions/calendar/index.ts +52 -2
  223. package/packages/pm-calendar/extensions/calendar/runtime.js +1 -0
  224. package/packages/pm-calendar/extensions/calendar/runtime.ts +1 -0
  225. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +14 -41
  226. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +25 -41
  227. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +10 -50
  228. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +17 -50
  229. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +8 -40
  230. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +10 -40
  231. package/packages/pm-search-advanced/extensions/search-advanced/index.js +1 -1
  232. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +4 -37
  233. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +6 -37
  234. package/packages/pm-todos/extensions/todos/index.js +3 -50
  235. package/packages/pm-todos/extensions/todos/index.ts +3 -55
  236. package/packages/pm-todos/extensions/todos/runtime-loader.js +86 -0
  237. package/packages/pm-todos/extensions/todos/runtime-loader.ts +88 -0
  238. package/packages/pm-todos/extensions/todos/runtime.js +24 -117
  239. package/packages/pm-todos/extensions/todos/runtime.ts +32 -129
  240. package/plugins/pm-claude/README.md +2 -2
  241. package/plugins/pm-claude/commands/pm-planner.md +1 -15
  242. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +5 -2
  243. package/plugins/pm-claude/skills/pm-planner/SKILL.md +3 -21
  244. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +15 -6
  245. package/plugins/pm-codex/skills/pm-native/SKILL.md +1 -13
  246. package/PRD.md +0 -1734
@@ -1,53 +1,16 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b7c80b7e-7951-5ab0-ab77-8e309cf59f0d")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9aa93ff6-c3b0-5b97-b9ab-d31f0d1ba656")}catch(e){}}();
3
3
  export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
4
4
  export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, } from "./cli-contracts/commander-mutation-options.js";
5
- import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../types/index.js";
6
- export const PM_EXTENSION_CAPABILITY_CONTRACTS = [
7
- "commands",
8
- "renderers",
9
- "hooks",
10
- "schema",
11
- "importers",
12
- "search",
13
- "parser",
14
- "preflight",
15
- "services",
16
- ];
17
- export const PM_EXTENSION_SERVICE_NAME_CONTRACTS = [
18
- "output_format",
19
- "error_format",
20
- "help_format",
21
- "lock_acquire",
22
- "lock_release",
23
- "history_append",
24
- "item_store_write",
25
- "item_store_delete",
26
- ];
27
- export const PM_EXTENSION_POLICY_MODE_CONTRACTS = ["off", "warn", "enforce"];
28
- export const PM_EXTENSION_TRUST_MODE_CONTRACTS = ["off", "warn", "enforce"];
29
- export const PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS = ["none", "restricted", "strict"];
30
- export const PM_EXTENSION_POLICY_SURFACE_CONTRACTS = [
31
- "commands.override",
32
- "commands.handler",
33
- "hooks.beforecommand",
34
- "hooks.aftercommand",
35
- "hooks.onwrite",
36
- "hooks.onread",
37
- "hooks.onindex",
38
- "schema.flags",
39
- "schema.itemfields",
40
- "schema.itemtypes",
41
- "schema.migrations",
42
- "parser.override",
43
- "preflight.override",
44
- "services.override",
45
- "renderers.override",
46
- "importers.importer",
47
- "importers.exporter",
48
- "search.provider",
49
- "search.vectorstore",
50
- ];
5
+ // PM_* enum/guard contracts and the bulk tool-parameter property/metadata data
6
+ // tables live in sibling modules and are re-exported here so existing import
7
+ // sites (sdk/index.ts, mcp/server.ts, commands/contracts.ts, completion.ts, …)
8
+ // keep importing everything from "./cli-contracts.js" unchanged.
9
+ export { PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
10
+ export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, } from "./cli-contracts/tool-option-contracts.js";
11
+ import { PM_TOOL_ACTIONS } from "./cli-contracts/enum-contracts.js";
12
+ import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, } from "./cli-contracts/tool-option-contracts.js";
13
+ import { PM_TOOL_PARAMETER_PROPERTIES, PM_TOOL_PARAMETER_METADATA, PLAN_ACTION_PARAMETER_PROPERTIES, PLAN_ACTION_PARAMETER_METADATA, } from "./cli-contracts/tool-parameter-tables.js";
51
14
  function normalizeUniqueStringList(values) {
52
15
  return [...new Set(Array.from(values).filter((value) => value.trim().length > 0))];
53
16
  }
@@ -95,400 +58,10 @@ export function compactFlagAliasContracts(flagContracts) {
95
58
  return contract.flag === canonical || !canonicalFlags.has(canonical);
96
59
  });
97
60
  }
98
- export const PM_CORE_COMMAND_NAMES = [
99
- "init",
100
- "config",
101
- "extension",
102
- "package",
103
- "packages",
104
- "install",
105
- "upgrade",
106
- "create",
107
- "list",
108
- "list-all",
109
- "list-draft",
110
- "list-open",
111
- "list-in-progress",
112
- "list-blocked",
113
- "list-closed",
114
- "list-canceled",
115
- "aggregate",
116
- "dedupe-audit",
117
- "guide",
118
- "context",
119
- "ctx",
120
- "get",
121
- "search",
122
- "reindex",
123
- "history",
124
- "history-redact",
125
- "history-repair",
126
- "schema",
127
- "activity",
128
- "restore",
129
- "update",
130
- "update-many",
131
- "normalize",
132
- "close",
133
- "delete",
134
- "append",
135
- "comments",
136
- "comments-audit",
137
- "notes",
138
- "learnings",
139
- "files",
140
- "docs",
141
- "deps",
142
- "plan",
143
- "test",
144
- "test-all",
145
- "test-runs",
146
- "stats",
147
- "health",
148
- "validate",
149
- "gc",
150
- "contracts",
151
- "claim",
152
- "release",
153
- "start-task",
154
- "pause-task",
155
- "close-task",
156
- "completion",
157
- "help",
158
- ];
159
- export const PM_TOOL_ACTIONS = [
160
- "init",
161
- "config",
162
- "extension-init",
163
- "extension-install",
164
- "extension-uninstall",
165
- "extension-explore",
166
- "extension-manage",
167
- "extension-reload",
168
- "extension-doctor",
169
- "extension-catalog",
170
- "extension-adopt",
171
- "extension-adopt-all",
172
- "extension-activate",
173
- "extension-deactivate",
174
- "extension",
175
- "package-init",
176
- "package-install",
177
- "package-uninstall",
178
- "package-explore",
179
- "package-manage",
180
- "package-reload",
181
- "package-doctor",
182
- "package-catalog",
183
- "package-adopt",
184
- "package-adopt-all",
185
- "package-activate",
186
- "package-deactivate",
187
- "package",
188
- "install",
189
- "upgrade",
190
- "create",
191
- "list",
192
- "list-all",
193
- "list-draft",
194
- "list-open",
195
- "list-in-progress",
196
- "list-blocked",
197
- "list-closed",
198
- "list-canceled",
199
- "aggregate",
200
- "context",
201
- "ctx",
202
- "get",
203
- "search",
204
- "history",
205
- "history-redact",
206
- "history-repair",
207
- "schema",
208
- "activity",
209
- "restore",
210
- "update",
211
- "update-many",
212
- "close",
213
- "delete",
214
- "append",
215
- "comments",
216
- "plan",
217
- "notes",
218
- "learnings",
219
- "files",
220
- "docs",
221
- "deps",
222
- "test",
223
- "test-all",
224
- "stats",
225
- "health",
226
- "validate",
227
- "gc",
228
- "contracts",
229
- "claim",
230
- "release",
231
- "start-task",
232
- "pause-task",
233
- "close-task",
234
- ];
235
- export function isPmToolAction(value) {
236
- return PM_TOOL_ACTIONS.includes(value);
237
- }
238
- export function isPmExtensionCapabilityContract(value) {
239
- return PM_EXTENSION_CAPABILITY_CONTRACTS.includes(value);
240
- }
241
- export function isPmExtensionServiceNameContract(value) {
242
- return PM_EXTENSION_SERVICE_NAME_CONTRACTS.includes(value);
243
- }
244
- export function isPmExtensionPolicyModeContract(value) {
245
- return PM_EXTENSION_POLICY_MODE_CONTRACTS.includes(value);
246
- }
247
- export function isPmExtensionPolicySurfaceContract(value) {
248
- return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(value);
249
- }
250
- export const TOOL_LIST_FILTER_OPTION_CONTRACTS = [
251
- { param: "status", flag: "--status" },
252
- { param: "type", flag: "--type" },
253
- { param: "tag", flag: "--tag" },
254
- { param: "priority", flag: "--priority" },
255
- { param: "deadlineBefore", flag: "--deadline-before" },
256
- { param: "deadlineAfter", flag: "--deadline-after" },
257
- { param: "assignee", flag: "--assignee" },
258
- { param: "assigneeFilter", flag: "--assignee-filter" },
259
- { param: "parent", flag: "--parent" },
260
- { param: "sprint", flag: "--sprint" },
261
- { param: "release", flag: "--release" },
262
- { param: "limit", flag: "--limit" },
263
- { param: "offset", flag: "--offset" },
264
- { param: "fields", flag: "--fields" },
265
- { param: "sort", flag: "--sort" },
266
- { param: "order", flag: "--order" },
267
- ];
268
- export const TOOL_AGGREGATE_OPTION_CONTRACTS = [
269
- { param: "groupBy", flag: "--group-by" },
270
- { param: "status", flag: "--status" },
271
- { param: "type", flag: "--type" },
272
- { param: "tag", flag: "--tag" },
273
- { param: "priority", flag: "--priority" },
274
- { param: "deadlineBefore", flag: "--deadline-before" },
275
- { param: "deadlineAfter", flag: "--deadline-after" },
276
- { param: "assignee", flag: "--assignee" },
277
- { param: "assigneeFilter", flag: "--assignee-filter" },
278
- { param: "parent", flag: "--parent" },
279
- { param: "sprint", flag: "--sprint" },
280
- { param: "release", flag: "--release" },
281
- ];
282
- export const TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS = [
283
- { param: "mode", flag: "--mode" },
284
- { param: "limit", flag: "--limit" },
285
- { param: "threshold", flag: "--threshold" },
286
- { param: "status", flag: "--status" },
287
- { param: "type", flag: "--type" },
288
- { param: "tag", flag: "--tag" },
289
- { param: "priority", flag: "--priority" },
290
- { param: "deadlineBefore", flag: "--deadline-before" },
291
- { param: "deadlineAfter", flag: "--deadline-after" },
292
- { param: "assignee", flag: "--assignee" },
293
- { param: "assigneeFilter", flag: "--assignee-filter" },
294
- { param: "parent", flag: "--parent" },
295
- { param: "sprint", flag: "--sprint" },
296
- { param: "release", flag: "--release" },
297
- ];
298
- export const TOOL_SEARCH_FILTER_OPTION_CONTRACTS = [
299
- { param: "type", flag: "--type" },
300
- { param: "tag", flag: "--tag" },
301
- { param: "priority", flag: "--priority" },
302
- { param: "deadlineBefore", flag: "--deadline-before" },
303
- { param: "deadlineAfter", flag: "--deadline-after" },
304
- { param: "fields", flag: "--fields" },
305
- { param: "limit", flag: "--limit" },
306
- ];
307
- export const TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
308
- { param: "parent", flag: "--parent" },
309
- { param: "reviewer", flag: "--reviewer" },
310
- { param: "risk", flag: "--risk" },
311
- { param: "confidence", flag: "--confidence" },
312
- { param: "sprint", flag: "--sprint" },
313
- { param: "release", flag: "--release" },
314
- { param: "blockedBy", flag: "--blocked-by" },
315
- { param: "blockedReason", flag: "--blocked-reason" },
316
- { param: "unblockNote", flag: "--unblock-note" },
317
- { param: "reporter", flag: "--reporter" },
318
- { param: "severity", flag: "--severity" },
319
- { param: "environment", flag: "--environment" },
320
- { param: "reproSteps", flag: "--repro-steps" },
321
- { param: "resolution", flag: "--resolution" },
322
- { param: "expectedResult", flag: "--expected-result" },
323
- { param: "actualResult", flag: "--actual-result" },
324
- { param: "affectedVersion", flag: "--affected-version" },
325
- { param: "fixedVersion", flag: "--fixed-version" },
326
- { param: "component", flag: "--component" },
327
- { param: "regression", flag: "--regression", booleanish: true },
328
- { param: "customerImpact", flag: "--customer-impact" },
329
- { param: "definitionOfReady", flag: "--definition-of-ready", allowEmpty: true },
330
- { param: "order", flag: "--order" },
331
- { param: "goal", flag: "--goal" },
332
- { param: "objective", flag: "--objective" },
333
- { param: "value", flag: "--value" },
334
- { param: "impact", flag: "--impact" },
335
- { param: "outcome", flag: "--outcome" },
336
- { param: "whyNow", flag: "--why-now" },
337
- ];
338
- export const TOOL_CREATE_OPTION_CONTRACTS = [
339
- { param: "title", flag: "--title" },
340
- { param: "description", flag: "--description", allowEmpty: true },
341
- { param: "type", flag: "--type" },
342
- { param: "template", flag: "--template" },
343
- { param: "createMode", flag: "--create-mode" },
344
- { param: "schedulePreset", flag: "--schedule-preset" },
345
- { param: "status", flag: "--status" },
346
- { param: "priority", flag: "--priority" },
347
- { param: "tags", flag: "--tags", allowEmpty: true },
348
- { param: "body", flag: "--body", allowEmpty: true },
349
- { param: "deadline", flag: "--deadline" },
350
- { param: "estimate", flag: "--estimate" },
351
- { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
352
- { param: "author", flag: "--author" },
353
- { param: "message", flag: "--message", allowEmpty: true },
354
- { param: "assignee", flag: "--assignee" },
355
- { param: "reminder", flag: "--reminder", repeatable: true },
356
- { param: "event", flag: "--event", repeatable: true },
357
- { param: "typeOption", flag: "--type-option", repeatable: true },
358
- { param: "dep", flag: "--dep", repeatable: true },
359
- { param: "comment", flag: "--comment", repeatable: true },
360
- { param: "note", flag: "--note", repeatable: true },
361
- { param: "learning", flag: "--learning", repeatable: true },
362
- { param: "linkedFile", flag: "--file", repeatable: true },
363
- { param: "linkedTest", flag: "--test", repeatable: true },
364
- { param: "doc", flag: "--doc", repeatable: true },
365
- { param: "unset", flag: "--unset", repeatable: true },
366
- { param: "clearDeps", flag: "--clear-deps" },
367
- { param: "clearComments", flag: "--clear-comments" },
368
- { param: "clearNotes", flag: "--clear-notes" },
369
- { param: "clearLearnings", flag: "--clear-learnings" },
370
- { param: "clearFiles", flag: "--clear-files" },
371
- { param: "clearTests", flag: "--clear-tests" },
372
- { param: "clearDocs", flag: "--clear-docs" },
373
- { param: "clearReminders", flag: "--clear-reminders" },
374
- { param: "clearEvents", flag: "--clear-events" },
375
- { param: "clearTypeOptions", flag: "--clear-type-options" },
376
- { param: "allowAuditUpdate", flag: "--allow-audit-update" },
377
- ];
378
- export const TOOL_UPDATE_OPTION_CONTRACTS = [
379
- { param: "title", flag: "--title" },
380
- { param: "description", flag: "--description", allowEmpty: true },
381
- { param: "body", flag: "--body", allowEmpty: true },
382
- { param: "status", flag: "--status" },
383
- { param: "closeReason", flag: "--close-reason" },
384
- { param: "priority", flag: "--priority" },
385
- { param: "type", flag: "--type" },
386
- { param: "tags", flag: "--tags", allowEmpty: true },
387
- { param: "deadline", flag: "--deadline" },
388
- { param: "estimate", flag: "--estimate" },
389
- { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
390
- { param: "author", flag: "--author" },
391
- { param: "message", flag: "--message", allowEmpty: true },
392
- { param: "assignee", flag: "--assignee" },
393
- { param: "dep", flag: "--dep", repeatable: true },
394
- { param: "depRemove", flag: "--dep-remove", repeatable: true },
395
- { param: "replaceDeps", flag: "--replace-deps" },
396
- { param: "replaceTests", flag: "--replace-tests" },
397
- { param: "comment", flag: "--comment", repeatable: true },
398
- { param: "note", flag: "--note", repeatable: true },
399
- { param: "learning", flag: "--learning", repeatable: true },
400
- { param: "linkedFile", flag: "--file", repeatable: true },
401
- { param: "linkedTest", flag: "--test", repeatable: true },
402
- { param: "doc", flag: "--doc", repeatable: true },
403
- { param: "reminder", flag: "--reminder", repeatable: true },
404
- { param: "event", flag: "--event", repeatable: true },
405
- { param: "typeOption", flag: "--type-option", repeatable: true },
406
- { param: "unset", flag: "--unset", repeatable: true },
407
- { param: "clearDeps", flag: "--clear-deps" },
408
- { param: "clearComments", flag: "--clear-comments" },
409
- { param: "clearNotes", flag: "--clear-notes" },
410
- { param: "clearLearnings", flag: "--clear-learnings" },
411
- { param: "clearFiles", flag: "--clear-files" },
412
- { param: "clearTests", flag: "--clear-tests" },
413
- { param: "clearDocs", flag: "--clear-docs" },
414
- { param: "clearReminders", flag: "--clear-reminders" },
415
- { param: "clearEvents", flag: "--clear-events" },
416
- { param: "clearTypeOptions", flag: "--clear-type-options" },
417
- { param: "allowAuditDepUpdate", flag: "--allow-audit-dep-update" },
418
- ];
419
- export const TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
420
- { param: "filterStatus", flag: "--filter-status" },
421
- { param: "filterType", flag: "--filter-type" },
422
- { param: "filterTag", flag: "--filter-tag" },
423
- { param: "filterPriority", flag: "--filter-priority" },
424
- { param: "filterDeadlineBefore", flag: "--filter-deadline-before" },
425
- { param: "filterDeadlineAfter", flag: "--filter-deadline-after" },
426
- { param: "filterAssignee", flag: "--filter-assignee" },
427
- { param: "filterAssigneeFilter", flag: "--filter-assignee-filter" },
428
- { param: "filterParent", flag: "--filter-parent" },
429
- { param: "filterSprint", flag: "--filter-sprint" },
430
- { param: "filterRelease", flag: "--filter-release" },
431
- { param: "limit", flag: "--limit" },
432
- { param: "offset", flag: "--offset" },
433
- ];
434
- export const TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS = [...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS];
435
- export const TOOL_CALENDAR_OPTION_CONTRACTS = [
436
- { param: "view", flag: "--view" },
437
- { param: "date", flag: "--date" },
438
- { param: "from", flag: "--from" },
439
- { param: "to", flag: "--to" },
440
- { param: "type", flag: "--type" },
441
- { param: "tag", flag: "--tag" },
442
- { param: "priority", flag: "--priority" },
443
- { param: "status", flag: "--status" },
444
- { param: "assignee", flag: "--assignee" },
445
- { param: "assigneeFilter", flag: "--assignee-filter" },
446
- { param: "sprint", flag: "--sprint" },
447
- { param: "release", flag: "--release" },
448
- { param: "include", flag: "--include" },
449
- { param: "recurrenceLookaheadDays", flag: "--recurrence-lookahead-days" },
450
- { param: "recurrenceLookbackDays", flag: "--recurrence-lookback-days" },
451
- { param: "occurrenceLimit", flag: "--occurrence-limit" },
452
- { param: "limit", flag: "--limit" },
453
- { param: "format", flag: "--format" },
454
- ];
455
- export const TOOL_ACTIVITY_OPTION_CONTRACTS = [
456
- { param: "id", flag: "--id" },
457
- { param: "op", flag: "--op" },
458
- { param: "author", flag: "--author" },
459
- { param: "from", flag: "--from" },
460
- { param: "to", flag: "--to" },
461
- { param: "limit", flag: "--limit" },
462
- { param: "compact", flag: "--compact" },
463
- { param: "full", flag: "--full" },
464
- ];
465
- export const TOOL_CONTEXT_OPTION_CONTRACTS = [
466
- { param: "date", flag: "--date" },
467
- { param: "from", flag: "--from" },
468
- { param: "to", flag: "--to" },
469
- { param: "type", flag: "--type" },
470
- { param: "tag", flag: "--tag" },
471
- { param: "priority", flag: "--priority" },
472
- { param: "assignee", flag: "--assignee" },
473
- { param: "assigneeFilter", flag: "--assignee-filter" },
474
- { param: "sprint", flag: "--sprint" },
475
- { param: "release", flag: "--release" },
476
- { param: "limit", flag: "--limit" },
477
- { param: "format", flag: "--format" },
478
- { param: "depth", flag: "--depth" },
479
- { param: "section", flag: "--section", repeatable: true },
480
- { param: "activityLimit", flag: "--activity-limit" },
481
- { param: "staleThreshold", flag: "--stale-threshold" },
482
- ];
483
- export const TOOL_DEPS_OPTION_CONTRACTS = [
484
- { param: "format", flag: "--format" },
485
- { param: "maxDepth", flag: "--max-depth" },
486
- { param: "collapse", flag: "--collapse" },
487
- { param: "summary", flag: "--summary" },
488
- ];
489
61
  export const SUBCOMMAND_GLOBAL_FLAG_CONTRACTS = [
490
62
  { flag: "--json" },
491
63
  { flag: "--quiet" },
64
+ { flag: "--no-changed-fields" },
492
65
  { flag: "--path" },
493
66
  { flag: "--no-extensions" },
494
67
  { flag: "--no-pager" },
@@ -500,7 +73,7 @@ export const GLOBAL_FLAG_CONTRACTS = [
500
73
  { flag: "--version" },
501
74
  ];
502
75
  export const LIST_FILTER_FLAG_CONTRACTS = [
503
- { flag: "--status" },
76
+ { flag: "--status", list: true },
504
77
  { flag: "--type" },
505
78
  { flag: "--tag" },
506
79
  { flag: "--priority" },
@@ -517,14 +90,14 @@ export const LIST_FILTER_FLAG_CONTRACTS = [
517
90
  { flag: "--compact" },
518
91
  { flag: "--brief" },
519
92
  { flag: "--full" },
520
- { flag: "--fields" },
93
+ { flag: "--fields", list: true },
521
94
  { flag: "--sort" },
522
95
  { flag: "--order" },
523
96
  { flag: "--include-body" },
524
97
  { flag: "--stream" },
525
98
  ];
526
99
  export const AGGREGATE_FLAG_CONTRACTS = [
527
- { flag: "--group-by" },
100
+ { flag: "--group-by", list: true },
528
101
  { flag: "--count" },
529
102
  { flag: "--include-unparented" },
530
103
  { flag: "--include_unparented" },
@@ -608,8 +181,6 @@ export const FILES_FLAG_CONTRACTS = [
608
181
  { flag: "--remove" },
609
182
  { flag: "--migrate" },
610
183
  { flag: "--list" },
611
- { flag: "--apply" },
612
- { flag: "--note" },
613
184
  { flag: "--append-stable" },
614
185
  { flag: "--validate-paths" },
615
186
  { flag: "--audit" },
@@ -669,7 +240,7 @@ export const PLAN_FLAG_CONTRACTS = [
669
240
  { flag: "--harness" },
670
241
  { flag: "--mode" },
671
242
  { flag: "--resume-context", aliases: ["--resume_context"] },
672
- { flag: "--tags" },
243
+ { flag: "--tags", list: true },
673
244
  { flag: "--priority" },
674
245
  { flag: "--body" },
675
246
  { flag: "--claim" },
@@ -698,7 +269,7 @@ export const PLAN_FLAG_CONTRACTS = [
698
269
  { flag: "--validation-command", aliases: ["--validation_command"] },
699
270
  { flag: "--validation-expected", aliases: ["--validation_expected"] },
700
271
  { flag: "--depth" },
701
- { flag: "--fields" },
272
+ { flag: "--fields", list: true },
702
273
  { flag: "--steps" },
703
274
  { flag: "--materialize-type", aliases: ["--materialize_type"] },
704
275
  { flag: "--materialize-parent", aliases: ["--materialize_parent"] },
@@ -790,6 +361,13 @@ export const CLOSE_FLAG_CONTRACTS = [
790
361
  { flag: "--author" },
791
362
  { flag: "--message" },
792
363
  { flag: "--validate-close" },
364
+ // pm-fl0c #11 (2026-05-28) + Codex P2 follow-up: inline closure-validation
365
+ // fields. Surface them through the contract so `pm contracts --command
366
+ // close`, the JSON help payload, and bootstrap flag normalization /
367
+ // suggestions all stay consistent with the commander registration.
368
+ { flag: "--resolution" },
369
+ { flag: "--expected-result", aliases: ["--expected_result"] },
370
+ { flag: "--actual-result", aliases: ["--actual_result"] },
793
371
  { flag: "--force" },
794
372
  ];
795
373
  export const APPEND_FLAG_CONTRACTS = [
@@ -933,7 +511,7 @@ export const CREATE_FLAG_CONTRACTS = [
933
511
  { flag: "--schedule_preset" },
934
512
  { short: "-s", flag: "--status" },
935
513
  { short: "-p", flag: "--priority" },
936
- { flag: "--tags" },
514
+ { flag: "--tags", list: true },
937
515
  { short: "-b", flag: "--body" },
938
516
  { flag: "--deadline" },
939
517
  { flag: "--estimate" },
@@ -1018,7 +596,7 @@ export const UPDATE_FLAG_CONTRACTS = [
1018
596
  { flag: "--close_reason" },
1019
597
  { short: "-p", flag: "--priority" },
1020
598
  { flag: "--type" },
1021
- { flag: "--tags" },
599
+ { flag: "--tags", list: true },
1022
600
  { flag: "--deadline" },
1023
601
  { flag: "--estimate" },
1024
602
  { flag: "--estimated-minutes" },
@@ -1125,7 +703,7 @@ export const UPDATE_MANY_FLAG_CONTRACTS = [
1125
703
  { short: "-b", flag: "--body" },
1126
704
  { short: "-p", flag: "--priority" },
1127
705
  { flag: "--type" },
1128
- { flag: "--tags" },
706
+ { flag: "--tags", list: true },
1129
707
  { flag: "--deadline" },
1130
708
  { flag: "--estimate" },
1131
709
  { flag: "--estimated-minutes" },
@@ -1282,7 +860,7 @@ export const CONTEXT_FLAG_CONTRACTS = [
1282
860
  export const GET_FLAG_CONTRACTS = [
1283
861
  { flag: "--depth" },
1284
862
  { flag: "--full" },
1285
- { flag: "--fields" },
863
+ { flag: "--fields", list: true },
1286
864
  ];
1287
865
  export const GUIDE_FLAG_CONTRACTS = [
1288
866
  { flag: "--list" },
@@ -1304,7 +882,7 @@ export const SEARCH_FLAG_CONTRACTS = [
1304
882
  { flag: "--phrase-exact" },
1305
883
  { flag: "--compact" },
1306
884
  { flag: "--full" },
1307
- { flag: "--fields" },
885
+ { flag: "--fields", list: true },
1308
886
  { flag: "--limit" },
1309
887
  { flag: "--type" },
1310
888
  { flag: "--tag" },
@@ -1403,10 +981,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1403
981
  return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
1404
982
  case "aggregate":
1405
983
  return withSubcommandGlobalFlags(AGGREGATE_FLAG_CONTRACTS);
1406
- case "dedupe-audit":
1407
- return withSubcommandGlobalFlags(DEDUPE_AUDIT_FLAG_CONTRACTS);
1408
- case "comments-audit":
1409
- return withSubcommandGlobalFlags(COMMENTS_AUDIT_FLAG_CONTRACTS);
1410
984
  case "calendar":
1411
985
  return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
1412
986
  case "context":
@@ -1433,8 +1007,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1433
1007
  return withSubcommandGlobalFlags(UPDATE_FLAG_CONTRACTS);
1434
1008
  case "update-many":
1435
1009
  return withSubcommandGlobalFlags(UPDATE_MANY_FLAG_CONTRACTS);
1436
- case "normalize":
1437
- return withSubcommandGlobalFlags(NORMALIZE_FLAG_CONTRACTS);
1438
1010
  case "close":
1439
1011
  return withSubcommandGlobalFlags(CLOSE_FLAG_CONTRACTS);
1440
1012
  case "delete":
@@ -1457,8 +1029,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1457
1029
  return withSubcommandGlobalFlags(TEST_FLAG_CONTRACTS);
1458
1030
  case "test-all":
1459
1031
  return withSubcommandGlobalFlags(TEST_ALL_FLAG_CONTRACTS);
1460
- case "test-runs":
1461
- return withSubcommandGlobalFlags(TEST_RUNS_FLAG_CONTRACTS);
1462
1032
  case "health":
1463
1033
  return withSubcommandGlobalFlags(HEALTH_FLAG_CONTRACTS);
1464
1034
  case "validate":
@@ -1477,10 +1047,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1477
1047
  return withSubcommandGlobalFlags(PAUSE_TASK_FLAG_CONTRACTS);
1478
1048
  case "close-task":
1479
1049
  return withSubcommandGlobalFlags(CLOSE_TASK_FLAG_CONTRACTS);
1480
- case "guide":
1481
- return withSubcommandGlobalFlags(GUIDE_FLAG_CONTRACTS);
1482
- case "completion":
1483
- return withSubcommandGlobalFlags(COMPLETION_FLAG_CONTRACTS);
1484
1050
  default:
1485
1051
  return withSubcommandGlobalFlags([]);
1486
1052
  }
@@ -1498,354 +1064,6 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
1498
1064
  : scoped;
1499
1065
  return normalizeUniqueStringList(all).join(" ");
1500
1066
  }
1501
- const PM_TOOL_PARAMETER_PROPERTIES = {
1502
- json: { type: "boolean", default: true },
1503
- quiet: { type: "boolean" },
1504
- profile: { type: "boolean" },
1505
- noExtensions: { type: "boolean" },
1506
- noPager: { type: "boolean" },
1507
- path: { type: "string" },
1508
- pmExecutable: { type: "string" },
1509
- timeoutMs: { type: "number" },
1510
- id: { type: "string" },
1511
- target: { type: "string" },
1512
- github: { type: "string" },
1513
- ref: { type: "string" },
1514
- query: { type: "string" },
1515
- keywords: { type: "string" },
1516
- fields: { type: "string" },
1517
- sort: { type: "string", enum: ["priority", "deadline", "updated_at", "created_at", "title", "parent"] },
1518
- prefix: { type: "string" },
1519
- preset: { type: "string", enum: ["minimal", "default", "strict", "custom"] },
1520
- defaults: { type: "boolean" },
1521
- agentGuidance: { type: "string", enum: ["ask", "add", "skip", "status"] },
1522
- withPackages: { type: "boolean" },
1523
- scope: { type: "string", enum: ["project", "global"] },
1524
- contractAction: { type: "string" },
1525
- command: { type: "string" },
1526
- schemaOnly: { type: "boolean" },
1527
- flagsOnly: { type: "boolean" },
1528
- availabilityOnly: { type: "boolean" },
1529
- runtimeOnly: { type: "boolean" },
1530
- activeOnly: { type: "boolean" },
1531
- eagerTags: { type: "boolean" },
1532
- configAction: { type: "string", enum: ["get", "set", "list", "export"] },
1533
- key: { type: "string" },
1534
- title: { type: "string" },
1535
- description: { type: "string" },
1536
- type: { type: "string" },
1537
- template: { type: "string" },
1538
- createMode: { type: "string", enum: ["strict", "progressive"] },
1539
- schedulePreset: { type: "string", enum: ["lightweight"] },
1540
- status: { type: "string", enum: ["draft", "open", "in_progress", "blocked", "closed", "canceled", "in-progress"] },
1541
- filterStatus: { type: "string" },
1542
- filterType: { type: "string" },
1543
- filterTag: { type: "string" },
1544
- filterPriority: { anyOf: [{ type: "string" }, { type: "number" }] },
1545
- filterDeadlineBefore: { type: "string" },
1546
- filterDeadlineAfter: { type: "string" },
1547
- filterAssignee: { type: "string" },
1548
- filterAssigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1549
- filterParent: { type: "string" },
1550
- filterSprint: { type: "string" },
1551
- filterRelease: { type: "string" },
1552
- closeReason: { type: "string" },
1553
- priority: { anyOf: [{ type: "string" }, { type: "number" }] },
1554
- tags: { type: "string" },
1555
- body: { type: "string" },
1556
- deadline: { type: "string" },
1557
- estimate: { anyOf: [{ type: "string" }, { type: "number" }] },
1558
- acceptanceCriteria: { type: "string" },
1559
- author: { type: "string" },
1560
- message: { type: "string" },
1561
- assignee: { type: "string" },
1562
- assigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1563
- parent: { type: "string" },
1564
- reviewer: { type: "string" },
1565
- risk: { type: "string" },
1566
- confidence: { anyOf: [{ type: "string" }, { type: "number" }] },
1567
- sprint: { type: "string" },
1568
- release: { type: "string" },
1569
- blockedBy: { type: "string" },
1570
- blockedReason: { type: "string" },
1571
- unblockNote: { type: "string" },
1572
- reporter: { type: "string" },
1573
- severity: { type: "string" },
1574
- environment: { type: "string" },
1575
- reproSteps: { type: "string" },
1576
- resolution: { type: "string" },
1577
- expectedResult: { type: "string" },
1578
- actualResult: { type: "string" },
1579
- affectedVersion: { type: "string" },
1580
- fixedVersion: { type: "string" },
1581
- component: { type: "string" },
1582
- regression: { anyOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] },
1583
- customerImpact: { type: "string" },
1584
- definitionOfReady: { type: "string" },
1585
- order: { anyOf: [{ type: "string" }, { type: "number" }] },
1586
- goal: { type: "string" },
1587
- objective: { type: "string" },
1588
- value: { type: "string" },
1589
- impact: { type: "string" },
1590
- outcome: { type: "string" },
1591
- whyNow: { type: "string" },
1592
- mode: {
1593
- type: "string",
1594
- enum: ["keyword", "semantic", "hybrid", "title_exact", "title_fuzzy", "parent_scope"],
1595
- },
1596
- op: { type: "string" },
1597
- compact: { type: "boolean" },
1598
- brief: { type: "boolean" },
1599
- full: { type: "boolean" },
1600
- view: { type: "string", enum: ["agenda", "day", "week", "month"] },
1601
- date: { type: "string" },
1602
- from: { type: "string" },
1603
- to: { type: "string" },
1604
- past: { type: "boolean" },
1605
- fullPeriod: { type: "boolean" },
1606
- include: { type: "string" },
1607
- recurrenceLookaheadDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1608
- recurrenceLookbackDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1609
- occurrenceLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1610
- includeLinked: { type: "boolean" },
1611
- semantic: { type: "boolean" },
1612
- hybrid: { type: "boolean" },
1613
- titleExact: { type: "boolean" },
1614
- phraseExact: { type: "boolean" },
1615
- includeBody: { type: "boolean" },
1616
- tag: { type: "string" },
1617
- deadlineBefore: { type: "string" },
1618
- deadlineAfter: { type: "string" },
1619
- limit: { anyOf: [{ type: "string" }, { type: "number" }] },
1620
- limitItems: { anyOf: [{ type: "string" }, { type: "number" }] },
1621
- fullHistory: { type: "boolean" },
1622
- latest: { anyOf: [{ type: "string" }, { type: "number" }] },
1623
- offset: { anyOf: [{ type: "string" }, { type: "number" }] },
1624
- progress: { type: "boolean" },
1625
- background: { type: "boolean" },
1626
- runId: { type: "string" },
1627
- stream: {
1628
- anyOf: [{ type: "boolean" }, { type: "string", enum: ["stdout", "stderr", "both", "rows", "ndjson", "jsonl"] }],
1629
- },
1630
- tail: { anyOf: [{ type: "string" }, { type: "number" }] },
1631
- envSet: { type: "array", items: { type: "string" } },
1632
- envClear: { type: "array", items: { type: "string" } },
1633
- sharedHostSafe: { type: "boolean" },
1634
- detail: { type: "string", enum: ["summary", "deep"] },
1635
- trace: { type: "boolean" },
1636
- reload: { type: "boolean" },
1637
- watch: { type: "boolean" },
1638
- runtimeProbe: { type: "boolean" },
1639
- fixManagedState: { type: "boolean" },
1640
- pmContext: { type: "string", enum: ["schema", "tracker", "auto"] },
1641
- overrideLinkedPmContext: { type: "boolean" },
1642
- failOnContextMismatch: { type: "boolean" },
1643
- failOnSkipped: { type: "boolean" },
1644
- failOnEmptyTestRun: { type: "boolean" },
1645
- requireAssertionsForPm: { type: "boolean" },
1646
- checkContext: { type: "boolean" },
1647
- autoPmContext: { type: "boolean" },
1648
- diff: { type: "boolean" },
1649
- verify: { type: "boolean" },
1650
- literal: { type: "array", items: { type: "string" } },
1651
- regex: { type: "array", items: { type: "string" } },
1652
- replacement: { type: "string" },
1653
- timeout: { anyOf: [{ type: "string" }, { type: "number" }] },
1654
- validateClose: { type: "string", enum: ["off", "warn", "strict"] },
1655
- checkMetadata: { type: "boolean" },
1656
- metadataProfile: { type: "string", enum: ["core", "strict", "custom"] },
1657
- checkResolution: { type: "boolean" },
1658
- checkLifecycle: { type: "boolean" },
1659
- checkStaleBlockers: { type: "boolean" },
1660
- dependencyCycleSeverity: { type: "string", enum: ["off", "warn", "error"] },
1661
- checkFiles: { type: "boolean" },
1662
- strictDirectories: { type: "boolean" },
1663
- checkOnly: { type: "boolean" },
1664
- checkTelemetry: { type: "boolean" },
1665
- noRefresh: { type: "boolean" },
1666
- refreshVectors: { type: "boolean" },
1667
- verboseStaleItems: { type: "boolean" },
1668
- scanMode: { type: "string", enum: ["default", "tracked-all", "tracked-all-strict"] },
1669
- includePmInternals: { type: "boolean" },
1670
- verboseFileLists: { type: "boolean" },
1671
- strictExit: { type: "boolean" },
1672
- failOnWarn: { type: "boolean" },
1673
- checkHistoryDrift: { type: "boolean" },
1674
- checkCommandReferences: { type: "boolean" },
1675
- allowAuditNote: { type: "boolean" },
1676
- allowAuditLearning: { type: "boolean" },
1677
- allowAuditComment: { type: "boolean" },
1678
- allowAuditUpdate: { type: "boolean" },
1679
- allowAuditDepUpdate: { type: "boolean" },
1680
- allowAuditRelease: { type: "boolean" },
1681
- dryRun: { type: "boolean" },
1682
- cliOnly: { type: "boolean" },
1683
- packagesOnly: { type: "boolean" },
1684
- repair: { type: "boolean" },
1685
- packageName: { type: "string" },
1686
- rollback: { type: "string" },
1687
- noCheckpoint: { type: "boolean" },
1688
- force: { type: "boolean" },
1689
- run: { type: "boolean" },
1690
- count: { type: "boolean" },
1691
- includeUnparented: { type: "boolean" },
1692
- gcScope: {
1693
- type: "array",
1694
- items: { type: "string", enum: ["index", "embeddings", "runtime"] },
1695
- },
1696
- maxDepth: { anyOf: [{ type: "string" }, { type: "number" }] },
1697
- collapse: { type: "string", enum: ["none", "repeated"] },
1698
- summary: { type: "boolean" },
1699
- shell: { type: "string", enum: ["bash", "zsh", "fish"] },
1700
- stdin: { type: "boolean" },
1701
- file: { type: "string" },
1702
- preserveSourceIds: { type: "boolean" },
1703
- folder: { type: "string" },
1704
- subcommand: { type: "string" },
1705
- name: { type: "string" },
1706
- defaultStatus: { type: "string" },
1707
- alias: { type: "array", items: { type: "string" } },
1708
- text: { type: "string" },
1709
- add: { type: "array", items: { type: "string" } },
1710
- addGlob: { type: "array", items: { type: "string" } },
1711
- remove: { type: "array", items: { type: "string" } },
1712
- migrate: { type: "array", items: { type: "string" } },
1713
- discover: { type: "boolean" },
1714
- apply: { type: "boolean" },
1715
- discoveryNote: { type: "string" },
1716
- appendStable: { type: "boolean" },
1717
- validatePaths: { type: "boolean" },
1718
- audit: { type: "boolean" },
1719
- dep: { type: "array", items: { type: "string" } },
1720
- depRemove: { type: "array", items: { type: "string" } },
1721
- replaceDeps: { type: "boolean" },
1722
- replaceTests: { type: "boolean" },
1723
- comment: { type: "array", items: { type: "string" } },
1724
- note: { type: "array", items: { type: "string" } },
1725
- learning: { type: "array", items: { type: "string" } },
1726
- linkedFile: { type: "array", items: { type: "string" } },
1727
- linkedTest: { type: "array", items: { type: "string" } },
1728
- doc: { type: "array", items: { type: "string" } },
1729
- reminder: { type: "array", items: { type: "string" } },
1730
- event: { type: "array", items: { type: "string" } },
1731
- typeOption: { type: "array", items: { type: "string" } },
1732
- unset: { type: "array", items: { type: "string" } },
1733
- clearDeps: { type: "boolean" },
1734
- clearComments: { type: "boolean" },
1735
- clearNotes: { type: "boolean" },
1736
- clearLearnings: { type: "boolean" },
1737
- clearFiles: { type: "boolean" },
1738
- clearTests: { type: "boolean" },
1739
- clearDocs: { type: "boolean" },
1740
- clearReminders: { type: "boolean" },
1741
- clearEvents: { type: "boolean" },
1742
- clearTypeOptions: { type: "boolean" },
1743
- criterion: { type: "array", items: { type: "string" } },
1744
- clearCriteria: { type: "boolean" },
1745
- groupBy: { type: "string" },
1746
- threshold: { anyOf: [{ type: "string" }, { type: "number" }] },
1747
- format: { type: "string" },
1748
- depth: { type: "string", enum: ["brief", "standard", "deep"] },
1749
- section: { type: "array", items: { type: "string", enum: ["hierarchy", "activity", "progress", "blockers", "files", "workload", "staleness", "tests"] } },
1750
- activityLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1751
- staleThreshold: { type: "string" },
1752
- policy: { type: "string" },
1753
- };
1754
- const PLAN_SUBCOMMAND_VALUES = [
1755
- "create",
1756
- "show",
1757
- "add-step",
1758
- "update-step",
1759
- "complete-step",
1760
- "block-step",
1761
- "reorder-step",
1762
- "remove-step",
1763
- "link",
1764
- "unlink",
1765
- "decision",
1766
- "discovery",
1767
- "validation",
1768
- "resume",
1769
- "approve",
1770
- "materialize",
1771
- ];
1772
- const PLAN_ACTION_PARAMETER_PROPERTIES = {
1773
- subcommand: { type: "string", enum: [...PLAN_SUBCOMMAND_VALUES] },
1774
- stepRef: { type: "string" },
1775
- reorderTo: { anyOf: [{ type: "string" }, { type: "number" }] },
1776
- scope: { type: "string" },
1777
- harness: { type: "string", enum: [...PLAN_HARNESS_VALUES] },
1778
- mode: { type: "string", enum: [...PLAN_MODE_VALUES] },
1779
- resumeContext: { type: "string" },
1780
- related: { type: "string" },
1781
- blocks: { type: "string" },
1782
- claim: { type: "boolean" },
1783
- fromSearch: { type: "string" },
1784
- stepTitle: { type: "string" },
1785
- stepBody: { type: "string" },
1786
- stepOwner: { type: "string" },
1787
- stepStatus: { type: "string", enum: [...PLAN_STEP_STATUS_VALUES] },
1788
- stepEvidence: { type: "string" },
1789
- stepBlockedReason: { type: "string" },
1790
- stepReplacement: { type: "string" },
1791
- dependsOn: { type: "string" },
1792
- link: { type: "string" },
1793
- linkKind: { type: "string", enum: [...PLAN_STEP_LINK_KIND_VALUES] },
1794
- linkNote: { type: "string" },
1795
- promoteToItemDep: { type: "boolean" },
1796
- allowMultipleActive: { type: "boolean" },
1797
- file: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1798
- test: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1799
- doc: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1800
- decisionText: { type: "string" },
1801
- decision: { type: "string" },
1802
- decisionRationale: { type: "string" },
1803
- decisionEvidence: { type: "string" },
1804
- discoveryText: { type: "string" },
1805
- discovery: { type: "string" },
1806
- validationText: { type: "string" },
1807
- validation: { type: "string" },
1808
- validationCommand: { type: "string" },
1809
- validationExpected: { type: "string" },
1810
- steps: { type: "array", items: { type: "string" } },
1811
- materializeType: { type: "string" },
1812
- materializeParent: { type: "string" },
1813
- materializeTags: { type: "string" },
1814
- };
1815
- const PLAN_ACTION_PARAMETER_METADATA = {
1816
- subcommand: {
1817
- description: "Plan workflow operation to run.",
1818
- examples: ["create", "show", "add-step", "approve"],
1819
- },
1820
- stepRef: {
1821
- description: "Plan step id or order for step lifecycle subcommands.",
1822
- examples: ["plan-step-001", "1"],
1823
- },
1824
- reorderTo: {
1825
- description: "New integer order for reorder-step.",
1826
- examples: [1, "2"],
1827
- },
1828
- scope: {
1829
- description: "Short free-text scope statement describing what the Plan covers.",
1830
- examples: ["Release readiness audit", "Search package migration"],
1831
- },
1832
- mode: {
1833
- description: "Plan lifecycle mode.",
1834
- examples: ["draft", "research", "approved"],
1835
- },
1836
- file: {
1837
- description: "File link to attach while creating or materializing a Plan.",
1838
- examples: ["path=src/cli.ts,note=implementation surface"],
1839
- },
1840
- test: {
1841
- description: "Test command link to attach while creating or materializing a Plan.",
1842
- examples: ["command=pnpm build,timeout_seconds=300"],
1843
- },
1844
- doc: {
1845
- description: "Documentation link to attach while creating or materializing a Plan.",
1846
- examples: ["path=docs/SDK.md,note=public API reference"],
1847
- },
1848
- };
1849
1067
  const PM_TOOL_GLOBAL_PARAMETER_KEYS = ["json", "quiet", "profile", "noExtensions", "noPager", "path", "pmExecutable", "timeoutMs"];
1850
1068
  function toSchemaKeyList(values) {
1851
1069
  return normalizeUniqueStringList(values);
@@ -1916,7 +1134,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1916
1134
  init: { optional: ["prefix", "preset", "defaults", "author", "agentGuidance", "withPackages"] },
1917
1135
  config: {
1918
1136
  required: ["scope", "configAction"],
1919
- optional: ["key", "criterion", "clearCriteria", "format", "policy"],
1137
+ optional: ["key", "value", "criterion", "clearCriteria", "format", "policy"],
1920
1138
  },
1921
1139
  "extension-init": { required: ["target"], optional: ["scope"] },
1922
1140
  "extension-install": {
@@ -2270,550 +1488,6 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
2270
1488
  "close-task": { required: ["id", "text"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
2271
1489
  };
2272
1490
  export const PM_TOOL_ACTION_PARAMETER_CONTRACTS = Object.freeze(Object.fromEntries(PM_TOOL_ACTIONS.map((action) => [action, PM_TOOL_ACTION_SCHEMA_CONTRACTS[action]])));
2273
- const PM_TOOL_PARAMETER_METADATA = {
2274
- action: {
2275
- description: "Tool action to execute.",
2276
- },
2277
- path: {
2278
- description: "Optional PM data root override for this invocation.",
2279
- examples: [".agents/pm"],
2280
- },
2281
- scope: {
2282
- description: "Scope selector for commands that operate on project or global state. Linked files, docs, and tests default to project scope when omitted.",
2283
- examples: ["project", "global"],
2284
- },
2285
- detail: {
2286
- description: "Detail mode for commands that support concise and deep diagnostics.",
2287
- examples: ["summary", "deep"],
2288
- },
2289
- trace: {
2290
- description: "When true for extension-doctor, include actionable registration traces in deep diagnostics.",
2291
- },
2292
- reload: {
2293
- description: "When true for extension action payloads, trigger cache-busted extension module reload.",
2294
- },
2295
- watch: {
2296
- description: "When true for extension-reload/extension action payloads, enable watch mode semantics.",
2297
- },
2298
- runtimeProbe: {
2299
- description: "When true for extension-manage, run a doctor-like runtime activation probe for parity fields.",
2300
- },
2301
- fixManagedState: {
2302
- description: "When true for extension-manage/extension-doctor, adopt unmanaged extensions before diagnostics/update checks.",
2303
- },
2304
- target: {
2305
- description: "Positional target argument for the selected action (ID, source, package source, or extension name).",
2306
- examples: ["pm-a1b2", ".agents/pm/extensions/sample", "sample-extension"],
2307
- },
2308
- github: {
2309
- description: "GitHub shorthand owner/repo[/path] source for package/extension install actions.",
2310
- examples: ["org/repo/extensions/sample"],
2311
- },
2312
- ref: {
2313
- description: "Git ref/branch/tag used when installing from GitHub shorthand/URL sources.",
2314
- examples: ["main", "v1.0.0"],
2315
- },
2316
- cliOnly: {
2317
- description: "Restrict upgrade to the pm CLI/SDK npm package.",
2318
- },
2319
- packagesOnly: {
2320
- description: "Restrict upgrade to managed installable pm packages.",
2321
- },
2322
- repair: {
2323
- description: "Force npm global reinstall semantics when upgrading the pm CLI/SDK.",
2324
- },
2325
- tag: {
2326
- description: "npm version or dist-tag used for CLI and registry package upgrades.",
2327
- examples: ["latest", "next", "2026.5.11"],
2328
- },
2329
- packageName: {
2330
- description: "Override the pm CLI package name for self-upgrade automation and tests.",
2331
- examples: ["@unbrained/pm-cli"],
2332
- },
2333
- json: {
2334
- description: "Emit machine-readable JSON output.",
2335
- },
2336
- quiet: {
2337
- description: "Suppress stdout payload output.",
2338
- },
2339
- noExtensions: {
2340
- description: "Disable extension loading for this invocation.",
2341
- },
2342
- noPager: {
2343
- description: "Disable pager integration for help and long output.",
2344
- },
2345
- profile: {
2346
- description: "Emit deterministic timing diagnostics to stderr.",
2347
- },
2348
- timeoutMs: {
2349
- description: "Tool execution timeout in milliseconds.",
2350
- examples: [120000],
2351
- },
2352
- id: {
2353
- description: "Item identifier for read or mutation actions.",
2354
- examples: ["pm-a1b2"],
2355
- },
2356
- runId: {
2357
- description: "Background test run identifier.",
2358
- examples: ["tr-kq9x3f-93acde"],
2359
- },
2360
- title: {
2361
- description: "Item title text.",
2362
- },
2363
- description: {
2364
- description: "Item description text.",
2365
- },
2366
- type: {
2367
- description: "Item type name from the active runtime type registry.",
2368
- examples: ["Task", "Feature"],
2369
- },
2370
- subcommand: {
2371
- description: "Subcommand for the schema action.",
2372
- examples: ["add-type"],
2373
- },
2374
- name: {
2375
- description: "Custom item type name to register (for schema add-type).",
2376
- examples: ["Spike"],
2377
- },
2378
- defaultStatus: {
2379
- description: "Default status hint recorded for a custom item type.",
2380
- examples: ["open"],
2381
- },
2382
- alias: {
2383
- description: "Aliases for the custom item type (repeatable).",
2384
- examples: [["spike", "research"]],
2385
- },
2386
- preset: {
2387
- description: "Governance preset for initialization flows.",
2388
- examples: ["minimal", "default", "strict"],
2389
- },
2390
- defaults: {
2391
- description: "Use non-interactive setup defaults during initialization.",
2392
- },
2393
- agentGuidance: {
2394
- description: "Control AGENTS.md/CLAUDE.md guidance behavior during init: ask, add, skip, or status.",
2395
- examples: ["ask", "add", "skip", "status"],
2396
- },
2397
- withPackages: {
2398
- description: "Install all bundled first-party pm packages during initialization.",
2399
- },
2400
- createMode: {
2401
- description: "Create required-option policy mode.",
2402
- examples: ["strict", "progressive"],
2403
- },
2404
- schedulePreset: {
2405
- description: "Schedule-centric create preset for Reminder, Meeting, and Event types.",
2406
- examples: ["lightweight"],
2407
- },
2408
- status: {
2409
- description: "Item status value.",
2410
- examples: ["open", "in_progress"],
2411
- },
2412
- priority: {
2413
- description: "Priority value in range 0..4.",
2414
- examples: [0, 1, "2"],
2415
- },
2416
- order: {
2417
- description: "Planning order/rank value for create/update, or sort direction (asc|desc) for list-family sorting.",
2418
- examples: [0, 1, "2", "asc", "desc"],
2419
- },
2420
- sort: {
2421
- description: "List-family sort field selector.",
2422
- examples: ["priority", "deadline", "updated_at", "created_at", "title", "parent"],
2423
- },
2424
- tags: {
2425
- description: "Comma-delimited tag list.",
2426
- examples: ["pm-cli,agent-ux"],
2427
- },
2428
- deadline: {
2429
- description: "ISO/date timestamp or relative offset (+6h/+1d/+2w/+6m).",
2430
- examples: ["2026-04-01T00:00:00.000Z", "+1d"],
2431
- },
2432
- estimate: {
2433
- description: "Estimated effort in minutes.",
2434
- examples: [60, "120"],
2435
- },
2436
- acceptanceCriteria: {
2437
- description: "Acceptance criteria text.",
2438
- },
2439
- author: {
2440
- description: "Mutation author identity.",
2441
- examples: ["codex-agent"],
2442
- },
2443
- message: {
2444
- description: "History message for mutation audit trail.",
2445
- },
2446
- assignee: {
2447
- description: "Assignee identity.",
2448
- examples: ["codex-agent"],
2449
- },
2450
- assigneeFilter: {
2451
- description: "Assignee presence selector for list/calendar/context/comments-audit filters.",
2452
- examples: ["assigned", "unassigned"],
2453
- },
2454
- parent: {
2455
- description: "Parent item ID filter for hierarchical list queries.",
2456
- examples: ["pm-epic01"],
2457
- },
2458
- unset: {
2459
- description: "Repeatable list of front-matter fields to clear explicitly during create/update mutations.",
2460
- examples: [["deadline", "assignee"], ["close-reason"]],
2461
- },
2462
- clearDeps: {
2463
- description: "When true, clear linked dependencies.",
2464
- },
2465
- replaceDeps: {
2466
- description: "When true for update, atomically replace dependencies with the supplied --dep values.",
2467
- },
2468
- replaceTests: {
2469
- description: "When true for update, atomically replace linked tests with the supplied --test values.",
2470
- },
2471
- clearComments: {
2472
- description: "When true, clear item comments.",
2473
- },
2474
- clearNotes: {
2475
- description: "When true, clear item notes.",
2476
- },
2477
- clearLearnings: {
2478
- description: "When true, clear item learnings.",
2479
- },
2480
- clearFiles: {
2481
- description: "When true, clear linked files.",
2482
- },
2483
- clearTests: {
2484
- description: "When true, clear linked tests.",
2485
- },
2486
- clearDocs: {
2487
- description: "When true, clear linked docs.",
2488
- },
2489
- clearReminders: {
2490
- description: "When true, clear reminders.",
2491
- },
2492
- clearEvents: {
2493
- description: "When true, clear events.",
2494
- },
2495
- clearTypeOptions: {
2496
- description: "When true, clear type option metadata.",
2497
- },
2498
- clearCriteria: {
2499
- description: "When true for config set criteria-list keys (definition-of-done, metadata-required-fields, lifecycle pattern lists), clear the criteria list.",
2500
- },
2501
- mode: {
2502
- description: "Mode selector for search/reindex (keyword|semantic|hybrid) and dedupe-audit (title_exact|title_fuzzy|parent_scope).",
2503
- examples: ["keyword", "hybrid", "title_exact"],
2504
- },
2505
- op: {
2506
- description: "History operation filter for activity output.",
2507
- examples: ["create", "update", "close", "update_audit"],
2508
- },
2509
- fullPeriod: {
2510
- description: "For day/week/month calendar views, include the full anchored period instead of clipping the start to now.",
2511
- },
2512
- progress: {
2513
- description: "Emit progress diagnostics to stderr for long-running operations.",
2514
- },
2515
- background: {
2516
- description: "Run linked tests in managed background mode.",
2517
- },
2518
- envSet: {
2519
- description: "Repeatable runtime environment KEY=VALUE overrides for linked-test execution.",
2520
- examples: [["PORT=0", "PLAYWRIGHT_HTML_OPEN=never"]],
2521
- },
2522
- envClear: {
2523
- description: "Repeatable runtime environment variable names to clear before linked-test execution.",
2524
- examples: [["PLAYWRIGHT_BASE_URL"]],
2525
- },
2526
- sharedHostSafe: {
2527
- description: "Apply additive shared-host-safe runtime defaults during linked-test execution.",
2528
- },
2529
- pmContext: {
2530
- 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).",
2531
- examples: ["schema", "tracker", "auto"],
2532
- },
2533
- overrideLinkedPmContext: {
2534
- description: "Force run-level --pm-context to override per-linked-test pm_context_mode metadata for all linked-test entries.",
2535
- },
2536
- failOnContextMismatch: {
2537
- description: "Fail linked PM command runs when source and sandbox tracker item counts differ.",
2538
- },
2539
- failOnSkipped: {
2540
- description: "Treat skipped linked tests as dependency-failed policy violations.",
2541
- },
2542
- failOnEmptyTestRun: {
2543
- description: "Treat successful linked-test commands that report zero executed tests as failures.",
2544
- },
2545
- requireAssertionsForPm: {
2546
- description: "Require assertion metadata for linked PM command test entries during run execution.",
2547
- },
2548
- checkContext: {
2549
- description: "Run linked PM command context preflight diagnostics before command execution.",
2550
- },
2551
- autoPmContext: {
2552
- description: "Auto-remediate PM tracker-read linked commands by routing those entries through tracker context regardless of linked-test pm_context_mode overrides.",
2553
- },
2554
- dryRun: {
2555
- description: "Preview command effects without mutating storage artifacts.",
2556
- },
2557
- gcScope: {
2558
- description: "Repeatable gc scope selector values (index, embeddings, runtime).",
2559
- examples: [["index", "embeddings"], ["runtime"]],
2560
- },
2561
- offset: {
2562
- description: "Number of matching rows to skip before limit is applied.",
2563
- examples: [0, 50, "100"],
2564
- },
2565
- limitItems: {
2566
- description: "Maximum number of filtered items to include in comments-audit output (alias: --limit).",
2567
- examples: [10, "25"],
2568
- },
2569
- fullHistory: {
2570
- description: "When true for comments-audit, export full per-item comment history rows; cannot be combined with latest.",
2571
- },
2572
- latest: {
2573
- description: "Number of most recent comments to include per item in comments-audit output (use 0 for summary-only item rows).",
2574
- examples: [0, 1, "3"],
2575
- },
2576
- literal: {
2577
- description: "Repeatable literal matcher used by history-redact to scrub exact string values.",
2578
- examples: ["[redacted_path_prefix]/private/path"],
2579
- },
2580
- regex: {
2581
- description: "Repeatable regex matcher used by history-redact. Accepts either /pattern/flags or a raw pattern (global mode is auto-enabled).",
2582
- examples: ["/192\\\\.168\\\\.[0-9.]+/g", "token=[A-Za-z0-9_-]+"],
2583
- },
2584
- replacement: {
2585
- description: 'Replacement text used by history-redact (defaults to "[redacted]").',
2586
- examples: ["[scrubbed_path]"],
2587
- },
2588
- validateClose: {
2589
- description: 'Close-time metadata validation mode ("off", "warn", or "strict").',
2590
- examples: ["off", "warn", "strict"],
2591
- },
2592
- checkMetadata: {
2593
- description: "Run metadata completeness checks.",
2594
- },
2595
- metadataProfile: {
2596
- description: "Select metadata validation profile for --check-metadata.",
2597
- examples: ["core", "strict", "custom"],
2598
- },
2599
- checkResolution: {
2600
- description: "Run closed-item resolution metadata checks.",
2601
- },
2602
- checkLifecycle: {
2603
- description: "Run active-item lifecycle governance drift checks.",
2604
- },
2605
- checkStaleBlockers: {
2606
- description: "Include stale blocker-pattern diagnostics in lifecycle checks.",
2607
- },
2608
- dependencyCycleSeverity: {
2609
- description: "Set dependency-cycle warning policy for lifecycle checks.",
2610
- examples: ["off", "warn", "error"],
2611
- },
2612
- checkFiles: {
2613
- description: "Run linked-file and orphaned-file checks.",
2614
- },
2615
- strictDirectories: {
2616
- description: "Treat optional item-type directories as required health failures.",
2617
- },
2618
- checkOnly: {
2619
- description: "For health action, run read-only diagnostics without refreshing vectors.",
2620
- },
2621
- checkTelemetry: {
2622
- description: "For health action, probe telemetry endpoint health and include network diagnostics.",
2623
- },
2624
- noRefresh: {
2625
- description: "For health action, skip vector refresh while still running checks.",
2626
- },
2627
- refreshVectors: {
2628
- description: "For health action, explicitly refresh stale vectors.",
2629
- },
2630
- verboseStaleItems: {
2631
- description: "For health action, include full stale-item arrays in vectorization details.",
2632
- },
2633
- skipVectors: {
2634
- description: "For health action, skip vectorization checks for a faster diagnostic run.",
2635
- },
2636
- skipIntegrity: {
2637
- description: "For health action, skip item/history file integrity checks for a faster diagnostic run.",
2638
- },
2639
- skipDrift: {
2640
- description: "For health action, skip history drift hash checks for a faster diagnostic run.",
2641
- },
2642
- scanMode: {
2643
- description: "Select file candidate scan mode for --check-files.",
2644
- examples: ["default", "tracked-all", "tracked-all-strict"],
2645
- },
2646
- includePmInternals: {
2647
- description: "Include PM storage internals in tracked-all candidate scans.",
2648
- },
2649
- verboseFileLists: {
2650
- description: "For validate action, include full file-path lists for --check-files details.",
2651
- },
2652
- verboseDiagnostics: {
2653
- description: "For validate action, include full diagnostic ID lists instead of compact summaries.",
2654
- },
2655
- strictExit: {
2656
- description: "Return non-zero exit when health/validate/extension-doctor warnings are present.",
2657
- },
2658
- failOnWarn: {
2659
- description: "Alias for strictExit in health/validate/extension-doctor action payloads.",
2660
- },
2661
- checkHistoryDrift: {
2662
- description: "Run item/history hash drift checks.",
2663
- },
2664
- checkCommandReferences: {
2665
- description: "Run linked-command PM-ID reference checks.",
2666
- },
2667
- allowAuditNote: {
2668
- description: "For notes action, allow non-owner append-only note audits without requiring --force.",
2669
- },
2670
- allowAuditLearning: {
2671
- description: "For learnings action, allow non-owner append-only learning audits without requiring --force.",
2672
- },
2673
- allowAuditComment: {
2674
- description: "For comments action, allow non-owner append-only comment audits without requiring --force.",
2675
- },
2676
- stdin: {
2677
- description: "When true for comments action, read comment text from piped stdin (supports multiline markdown).",
2678
- },
2679
- file: {
2680
- description: "Path to input file for actions that read payload text, such as comments --file.",
2681
- examples: ["notes/comment.md"],
2682
- },
2683
- allowAuditUpdate: {
2684
- description: "Allow non-owner metadata-only update audits without requiring --force.",
2685
- },
2686
- allowAuditDepUpdate: {
2687
- description: "Allow non-owner append-only dependency update audits without requiring --force.",
2688
- },
2689
- allowAuditRelease: {
2690
- description: "Allow non-owner release handoffs that clear assignee metadata without requiring --force.",
2691
- },
2692
- preserveSourceIds: {
2693
- description: "Preserve explicit source IDs during Beads imports instead of normalizing to tracker prefix.",
2694
- examples: [true],
2695
- },
2696
- appendStable: {
2697
- description: "When true for files action, preserve existing linked-file order and append new links without full-array resorting.",
2698
- },
2699
- discover: {
2700
- description: "When true for files action, use `pm files discover <id>` to scan item text for referenced file paths.",
2701
- },
2702
- apply: {
2703
- description: "When true for files discovery, add missing discovered file links instead of returning a dry-run preview.",
2704
- },
2705
- discoveryNote: {
2706
- description: "Note attached to file links added by files discovery.",
2707
- examples: ["discovered from item text"],
2708
- },
2709
- stream: {
2710
- description: "Stream selector: test-runs logs accepts stdout|stderr|both; activity accepts boolean/rows|ndjson|jsonl for line-delimited output.",
2711
- examples: ["stderr", "stdout", "both", "rows", "ndjson", "jsonl", true],
2712
- },
2713
- tail: {
2714
- description: "Number of lines to tail for background run logs.",
2715
- examples: [100],
2716
- },
2717
- query: {
2718
- description: "Search query text for search action.",
2719
- },
2720
- keywords: {
2721
- description: "Alias for query in search action payloads.",
2722
- },
2723
- includeLinked: {
2724
- description: "Include readable linked docs/files/tests content in keyword and hybrid lexical scoring.",
2725
- },
2726
- titleExact: {
2727
- description: "For search action, require exact normalized title match for the full query string.",
2728
- },
2729
- phraseExact: {
2730
- description: "For search action, require exact normalized query phrase match in item text fields.",
2731
- },
2732
- includeBody: {
2733
- description: "When true for list-family actions, include item body text in projected rows.",
2734
- },
2735
- compact: {
2736
- description: "Render compact projection output for search and list-family actions.",
2737
- },
2738
- full: {
2739
- description: "Enable command-specific full/detail output mode when supported, such as deep item reads for get or full payload mode for search/history.",
2740
- },
2741
- fields: {
2742
- description: "Comma-separated projection fields for get, search, or list-family outputs.",
2743
- examples: ["id,title,status,parent,type", "id,title,score,matched_fields"],
2744
- },
2745
- groupBy: {
2746
- description: "Comma-separated aggregate grouping fields (supported: parent,type,priority,status,assignee,tags,sprint,release).",
2747
- examples: ["parent,type", "type,status", "priority,assignee", "tags", "sprint,release"],
2748
- },
2749
- count: {
2750
- description: "Enable grouped count output for aggregate action.",
2751
- },
2752
- includeUnparented: {
2753
- description: "Include unparented rows when aggregate grouping includes parent.",
2754
- },
2755
- maxDepth: {
2756
- description: "Maximum dependency traversal depth for deps action (0 keeps only the root node).",
2757
- examples: [0, 1, "2"],
2758
- },
2759
- collapse: {
2760
- description: 'Dependency tree collapse mode for deps action ("none" or "repeated").',
2761
- examples: ["none", "repeated"],
2762
- },
2763
- summary: {
2764
- description: "When true for deps action, return counts only without full tree/graph payloads.",
2765
- },
2766
- threshold: {
2767
- description: "Dedupe-audit fuzzy title similarity threshold between 0 and 1.",
2768
- examples: [0.5, "0.75"],
2769
- },
2770
- shell: {
2771
- description: "Shell target for completion generation.",
2772
- examples: ["bash"],
2773
- },
2774
- eagerTags: {
2775
- description: "When true for completion, eagerly embed current tracker tags into generated scripts (legacy mode).",
2776
- },
2777
- contractAction: {
2778
- description: "Filter contracts schema to one tool action.",
2779
- examples: ["create", "update"],
2780
- },
2781
- command: {
2782
- description: "Scope contracts output to one CLI command name; action/schema surfaces narrow by default.",
2783
- examples: ["create", "search", "list"],
2784
- },
2785
- schemaOnly: {
2786
- description: "When true, contracts action returns schema-focused payloads (mutually exclusive with flagsOnly/availabilityOnly).",
2787
- },
2788
- flagsOnly: {
2789
- description: "When true, contracts action returns only command flag surface payloads (mutually exclusive projection mode).",
2790
- },
2791
- availabilityOnly: {
2792
- description: "When true, contracts action returns only action availability payloads (mutually exclusive projection mode).",
2793
- },
2794
- runtimeOnly: {
2795
- description: "When true, contracts action only includes actions invocable in the current runtime.",
2796
- },
2797
- activeOnly: {
2798
- description: "Alias for runtimeOnly in contracts action payloads.",
2799
- },
2800
- depth: {
2801
- description: "Context depth level controlling how many sections are included (brief=focus+agenda, standard=+hierarchy/activity/progress/workload, deep=all sections).",
2802
- examples: ["brief", "standard", "deep"],
2803
- },
2804
- section: {
2805
- description: "Repeatable section selector for context; overrides --depth when provided.",
2806
- examples: [["hierarchy", "activity"], ["blockers", "files", "staleness"]],
2807
- },
2808
- activityLimit: {
2809
- description: "Maximum number of recent activity entries to include in context output.",
2810
- examples: [5, 10, "20"],
2811
- },
2812
- staleThreshold: {
2813
- description: "Staleness cutoff in days for context staleness section (e.g. 7 or 7d).",
2814
- examples: ["7", "14d", "30"],
2815
- },
2816
- };
2817
1491
  function fallbackToolParameterDescription(key) {
2818
1492
  return key
2819
1493
  .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
@@ -2940,4 +1614,4 @@ function buildProviderCompatibleToolSchema() {
2940
1614
  }
2941
1615
  export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = buildProviderCompatibleToolSchema();
2942
1616
  //# sourceMappingURL=cli-contracts.js.map
2943
- //# debugId=b7c80b7e-7951-5ab0-ab77-8e309cf59f0d
1617
+ //# debugId=9aa93ff6-c3b0-5b97-b9ab-d31f0d1ba656