@unbrained/pm-cli 2026.5.18 → 2026.5.27

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 (369) hide show
  1. package/CHANGELOG.md +953 -472
  2. package/README.md +4 -11
  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 +147 -10
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/annotation-command.d.ts +49 -0
  9. package/dist/cli/commands/annotation-command.js +135 -0
  10. package/dist/cli/commands/annotation-command.js.map +1 -0
  11. package/dist/cli/commands/append.js +5 -8
  12. package/dist/cli/commands/append.js.map +1 -1
  13. package/dist/cli/commands/calendar.js +3 -6
  14. package/dist/cli/commands/calendar.js.map +1 -1
  15. package/dist/cli/commands/claim.js +15 -24
  16. package/dist/cli/commands/claim.js.map +1 -1
  17. package/dist/cli/commands/close.js +63 -10
  18. package/dist/cli/commands/close.js.map +1 -1
  19. package/dist/cli/commands/comments.d.ts +5 -0
  20. package/dist/cli/commands/comments.js +27 -117
  21. package/dist/cli/commands/comments.js.map +1 -1
  22. package/dist/cli/commands/completion.d.ts +2 -2
  23. package/dist/cli/commands/completion.js +203 -63
  24. package/dist/cli/commands/completion.js.map +1 -1
  25. package/dist/cli/commands/config.d.ts +1 -1
  26. package/dist/cli/commands/config.js +82 -4
  27. package/dist/cli/commands/config.js.map +1 -1
  28. package/dist/cli/commands/context.js +4 -10
  29. package/dist/cli/commands/context.js.map +1 -1
  30. package/dist/cli/commands/contracts.js +168 -36
  31. package/dist/cli/commands/contracts.js.map +1 -1
  32. package/dist/cli/commands/create.js +53 -313
  33. package/dist/cli/commands/create.js.map +1 -1
  34. package/dist/cli/commands/dedupe-audit.js +7 -4
  35. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  36. package/dist/cli/commands/delete.d.ts +3 -0
  37. package/dist/cli/commands/delete.js +11 -9
  38. package/dist/cli/commands/delete.js.map +1 -1
  39. package/dist/cli/commands/docs.d.ts +2 -12
  40. package/dist/cli/commands/docs.js +8 -316
  41. package/dist/cli/commands/docs.js.map +1 -1
  42. package/dist/cli/commands/event-validation-messages.d.ts +3 -0
  43. package/dist/cli/commands/event-validation-messages.js +44 -0
  44. package/dist/cli/commands/event-validation-messages.js.map +1 -0
  45. package/dist/cli/commands/extension/bundled-catalog.d.ts +14 -0
  46. package/dist/cli/commands/extension/bundled-catalog.js +268 -0
  47. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -0
  48. package/dist/cli/commands/extension/doctor.d.ts +31 -0
  49. package/dist/cli/commands/extension/doctor.js +345 -0
  50. package/dist/cli/commands/extension/doctor.js.map +1 -0
  51. package/dist/cli/commands/extension/install-sources.d.ts +37 -0
  52. package/dist/cli/commands/extension/install-sources.js +384 -0
  53. package/dist/cli/commands/extension/install-sources.js.map +1 -0
  54. package/dist/cli/commands/extension/managed-state.d.ts +48 -0
  55. package/dist/cli/commands/extension/managed-state.js +172 -0
  56. package/dist/cli/commands/extension/managed-state.js.map +1 -0
  57. package/dist/cli/commands/extension/scaffold.d.ts +14 -0
  58. package/dist/cli/commands/extension/scaffold.js +169 -0
  59. package/dist/cli/commands/extension/scaffold.js.map +1 -0
  60. package/dist/cli/commands/extension/shared.d.ts +14 -0
  61. package/dist/cli/commands/extension/shared.js +106 -0
  62. package/dist/cli/commands/extension/shared.js.map +1 -0
  63. package/dist/cli/commands/extension.d.ts +37 -68
  64. package/dist/cli/commands/extension.js +157 -1319
  65. package/dist/cli/commands/extension.js.map +1 -1
  66. package/dist/cli/commands/files.d.ts +1 -12
  67. package/dist/cli/commands/files.js +14 -318
  68. package/dist/cli/commands/files.js.map +1 -1
  69. package/dist/cli/commands/gc.js +17 -4
  70. package/dist/cli/commands/gc.js.map +1 -1
  71. package/dist/cli/commands/get.d.ts +3 -2
  72. package/dist/cli/commands/get.js +52 -9
  73. package/dist/cli/commands/get.js.map +1 -1
  74. package/dist/cli/commands/health.d.ts +10 -0
  75. package/dist/cli/commands/health.js +269 -76
  76. package/dist/cli/commands/health.js.map +1 -1
  77. package/dist/cli/commands/history-redact.d.ts +8 -0
  78. package/dist/cli/commands/history-redact.js +35 -113
  79. package/dist/cli/commands/history-redact.js.map +1 -1
  80. package/dist/cli/commands/history-repair.d.ts +33 -0
  81. package/dist/cli/commands/history-repair.js +172 -0
  82. package/dist/cli/commands/history-repair.js.map +1 -0
  83. package/dist/cli/commands/history.d.ts +4 -4
  84. package/dist/cli/commands/history.js +10 -88
  85. package/dist/cli/commands/history.js.map +1 -1
  86. package/dist/cli/commands/index.d.ts +3 -1
  87. package/dist/cli/commands/index.js +5 -3
  88. package/dist/cli/commands/index.js.map +1 -1
  89. package/dist/cli/commands/init.d.ts +28 -0
  90. package/dist/cli/commands/init.js +23 -2
  91. package/dist/cli/commands/init.js.map +1 -1
  92. package/dist/cli/commands/learnings.js +20 -119
  93. package/dist/cli/commands/learnings.js.map +1 -1
  94. package/dist/cli/commands/legacy-none-tokens.d.ts +3 -0
  95. package/dist/cli/commands/legacy-none-tokens.js +39 -0
  96. package/dist/cli/commands/legacy-none-tokens.js.map +1 -0
  97. package/dist/cli/commands/linked-artifacts.d.ts +96 -0
  98. package/dist/cli/commands/linked-artifacts.js +335 -0
  99. package/dist/cli/commands/linked-artifacts.js.map +1 -0
  100. package/dist/cli/commands/linked-test-entry.d.ts +3 -0
  101. package/dist/cli/commands/linked-test-entry.js +62 -0
  102. package/dist/cli/commands/linked-test-entry.js.map +1 -0
  103. package/dist/cli/commands/linked-test-parsers.d.ts +28 -0
  104. package/dist/cli/commands/linked-test-parsers.js +192 -0
  105. package/dist/cli/commands/linked-test-parsers.js.map +1 -0
  106. package/dist/cli/commands/list.js +49 -24
  107. package/dist/cli/commands/list.js.map +1 -1
  108. package/dist/cli/commands/normalize.js +4 -3
  109. package/dist/cli/commands/normalize.js.map +1 -1
  110. package/dist/cli/commands/notes.js +20 -119
  111. package/dist/cli/commands/notes.js.map +1 -1
  112. package/dist/cli/commands/plan.d.ts +3 -0
  113. package/dist/cli/commands/plan.js +184 -22
  114. package/dist/cli/commands/plan.js.map +1 -1
  115. package/dist/cli/commands/recurrence-parsers.d.ts +26 -0
  116. package/dist/cli/commands/recurrence-parsers.js +98 -0
  117. package/dist/cli/commands/recurrence-parsers.js.map +1 -0
  118. package/dist/cli/commands/restore.js +24 -56
  119. package/dist/cli/commands/restore.js.map +1 -1
  120. package/dist/cli/commands/schema.d.ts +31 -0
  121. package/dist/cli/commands/schema.js +98 -0
  122. package/dist/cli/commands/schema.js.map +1 -0
  123. package/dist/cli/commands/search.js +154 -42
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/templates.d.ts +4 -0
  126. package/dist/cli/commands/templates.js +89 -17
  127. package/dist/cli/commands/templates.js.map +1 -1
  128. package/dist/cli/commands/test/linked-command-detection.d.ts +37 -0
  129. package/dist/cli/commands/test/linked-command-detection.js +200 -0
  130. package/dist/cli/commands/test/linked-command-detection.js.map +1 -0
  131. package/dist/cli/commands/test-all.js +4 -8
  132. package/dist/cli/commands/test-all.js.map +1 -1
  133. package/dist/cli/commands/test.d.ts +2 -2
  134. package/dist/cli/commands/test.js +12 -357
  135. package/dist/cli/commands/test.js.map +1 -1
  136. package/dist/cli/commands/update-many.js +6 -9
  137. package/dist/cli/commands/update-many.js.map +1 -1
  138. package/dist/cli/commands/update.js +167 -401
  139. package/dist/cli/commands/update.js.map +1 -1
  140. package/dist/cli/commands/validate.d.ts +3 -1
  141. package/dist/cli/commands/validate.js +23 -71
  142. package/dist/cli/commands/validate.js.map +1 -1
  143. package/dist/cli/error-guidance.d.ts +1 -0
  144. package/dist/cli/error-guidance.js +100 -6
  145. package/dist/cli/error-guidance.js.map +1 -1
  146. package/dist/cli/extension-command-help.d.ts +0 -1
  147. package/dist/cli/extension-command-help.js +2 -13
  148. package/dist/cli/extension-command-help.js.map +1 -1
  149. package/dist/cli/extension-command-options.d.ts +1 -0
  150. package/dist/cli/extension-command-options.js +106 -7
  151. package/dist/cli/extension-command-options.js.map +1 -1
  152. package/dist/cli/help-content.d.ts +0 -1
  153. package/dist/cli/help-content.js +13 -9
  154. package/dist/cli/help-content.js.map +1 -1
  155. package/dist/cli/help-json-payload.d.ts +1 -0
  156. package/dist/cli/help-json-payload.js +33 -3
  157. package/dist/cli/help-json-payload.js.map +1 -1
  158. package/dist/cli/main.d.ts +11 -0
  159. package/dist/cli/main.js +109 -55
  160. package/dist/cli/main.js.map +1 -1
  161. package/dist/cli/register-list-query.d.ts +5 -2
  162. package/dist/cli/register-list-query.js +254 -192
  163. package/dist/cli/register-list-query.js.map +1 -1
  164. package/dist/cli/register-mutation.d.ts +1 -1
  165. package/dist/cli/register-mutation.js +247 -64
  166. package/dist/cli/register-mutation.js.map +1 -1
  167. package/dist/cli/register-operations.js +17 -12
  168. package/dist/cli/register-operations.js.map +1 -1
  169. package/dist/cli/register-setup.js +33 -16
  170. package/dist/cli/register-setup.js.map +1 -1
  171. package/dist/cli/registration-helpers.d.ts +0 -2
  172. package/dist/cli/registration-helpers.js +14 -40
  173. package/dist/cli/registration-helpers.js.map +1 -1
  174. package/dist/cli.js +25 -4
  175. package/dist/cli.js.map +1 -1
  176. package/dist/core/config/positional-value.d.ts +44 -0
  177. package/dist/core/config/positional-value.js +109 -0
  178. package/dist/core/config/positional-value.js.map +1 -0
  179. package/dist/core/extensions/extension-capability-aliases.d.ts +14 -0
  180. package/dist/core/extensions/extension-capability-aliases.js +159 -0
  181. package/dist/core/extensions/extension-capability-aliases.js.map +1 -0
  182. package/dist/core/extensions/extension-hook-runtime.d.ts +13 -0
  183. package/dist/core/extensions/extension-hook-runtime.js +414 -0
  184. package/dist/core/extensions/extension-hook-runtime.js.map +1 -0
  185. package/dist/core/extensions/extension-policy.d.ts +69 -0
  186. package/dist/core/extensions/extension-policy.js +481 -0
  187. package/dist/core/extensions/extension-policy.js.map +1 -0
  188. package/dist/core/extensions/extension-registries.d.ts +8 -0
  189. package/dist/core/extensions/extension-registries.js +52 -0
  190. package/dist/core/extensions/extension-registries.js.map +1 -0
  191. package/dist/core/extensions/extension-runtime-helpers.d.ts +6 -0
  192. package/dist/core/extensions/extension-runtime-helpers.js +29 -0
  193. package/dist/core/extensions/extension-runtime-helpers.js.map +1 -0
  194. package/dist/core/extensions/extension-types.d.ts +13 -39
  195. package/dist/core/extensions/extension-types.js +34 -2
  196. package/dist/core/extensions/extension-types.js.map +1 -1
  197. package/dist/core/extensions/index.d.ts +7 -1
  198. package/dist/core/extensions/index.js +11 -14
  199. package/dist/core/extensions/index.js.map +1 -1
  200. package/dist/core/extensions/loader.d.ts +4 -22
  201. package/dist/core/extensions/loader.js +23 -1146
  202. package/dist/core/extensions/loader.js.map +1 -1
  203. package/dist/core/fs/path-utils.d.ts +1 -0
  204. package/dist/core/fs/path-utils.js +12 -0
  205. package/dist/core/fs/path-utils.js.map +1 -0
  206. package/dist/core/history/drift-scan.d.ts +22 -0
  207. package/dist/core/history/drift-scan.js +149 -0
  208. package/dist/core/history/drift-scan.js.map +1 -0
  209. package/dist/core/history/history-rewrite.d.ts +43 -0
  210. package/dist/core/history/history-rewrite.js +48 -0
  211. package/dist/core/history/history-rewrite.js.map +1 -0
  212. package/dist/core/history/history.js +5 -4
  213. package/dist/core/history/history.js.map +1 -1
  214. package/dist/core/history/replay.d.ts +82 -0
  215. package/dist/core/history/replay.js +250 -0
  216. package/dist/core/history/replay.js.map +1 -0
  217. package/dist/core/item/item-format.js +11 -8
  218. package/dist/core/item/item-format.js.map +1 -1
  219. package/dist/core/item/item-record.d.ts +19 -0
  220. package/dist/core/item/item-record.js +24 -0
  221. package/dist/core/item/item-record.js.map +1 -0
  222. package/dist/core/item/item-type-definition.d.ts +52 -0
  223. package/dist/core/item/item-type-definition.js +123 -0
  224. package/dist/core/item/item-type-definition.js.map +1 -0
  225. package/dist/core/item/parse.js +3 -2
  226. package/dist/core/item/parse.js.map +1 -1
  227. package/dist/core/item/priority.d.ts +23 -0
  228. package/dist/core/item/priority.js +55 -0
  229. package/dist/core/item/priority.js.map +1 -0
  230. package/dist/core/item/status.d.ts +14 -1
  231. package/dist/core/item/status.js +22 -2
  232. package/dist/core/item/status.js.map +1 -1
  233. package/dist/core/item/toon-decode.d.ts +19 -0
  234. package/dist/core/item/toon-decode.js +69 -0
  235. package/dist/core/item/toon-decode.js.map +1 -0
  236. package/dist/core/item/type-registry.js +13 -84
  237. package/dist/core/item/type-registry.js.map +1 -1
  238. package/dist/core/output/mutation-projection.d.ts +31 -0
  239. package/dist/core/output/mutation-projection.js +103 -0
  240. package/dist/core/output/mutation-projection.js.map +1 -0
  241. package/dist/core/output/output.d.ts +2 -0
  242. package/dist/core/output/output.js +5 -3
  243. package/dist/core/output/output.js.map +1 -1
  244. package/dist/core/packages/manifest.js +3 -9
  245. package/dist/core/packages/manifest.js.map +1 -1
  246. package/dist/core/schema/item-types-file.d.ts +85 -0
  247. package/dist/core/schema/item-types-file.js +243 -0
  248. package/dist/core/schema/item-types-file.js.map +1 -0
  249. package/dist/core/schema/runtime-schema.d.ts +2 -1
  250. package/dist/core/schema/runtime-schema.js +17 -45
  251. package/dist/core/schema/runtime-schema.js.map +1 -1
  252. package/dist/core/search/semantic-defaults.js +3 -3
  253. package/dist/core/search/semantic-defaults.js.map +1 -1
  254. package/dist/core/search/vector-stores.js +46 -9
  255. package/dist/core/search/vector-stores.js.map +1 -1
  256. package/dist/core/sentry/helpers.d.ts +1 -1
  257. package/dist/core/sentry/helpers.js +20 -3
  258. package/dist/core/sentry/helpers.js.map +1 -1
  259. package/dist/core/shared/author.d.ts +1 -0
  260. package/dist/core/shared/author.js +9 -0
  261. package/dist/core/shared/author.js.map +1 -0
  262. package/dist/core/shared/command-types.d.ts +1 -0
  263. package/dist/core/shared/command-types.js +2 -2
  264. package/dist/core/shared/command-types.js.map +1 -1
  265. package/dist/core/shared/constants.d.ts +10 -1
  266. package/dist/core/shared/constants.js +56 -58
  267. package/dist/core/shared/constants.js.map +1 -1
  268. package/dist/core/shared/lazy-module.d.ts +1 -0
  269. package/dist/core/shared/lazy-module.js +11 -0
  270. package/dist/core/shared/lazy-module.js.map +1 -0
  271. package/dist/core/shared/option-alias-visibility.d.ts +44 -0
  272. package/dist/core/shared/option-alias-visibility.js +76 -0
  273. package/dist/core/shared/option-alias-visibility.js.map +1 -0
  274. package/dist/core/shared/primitives.d.ts +23 -0
  275. package/dist/core/shared/primitives.js +39 -2
  276. package/dist/core/shared/primitives.js.map +1 -1
  277. package/dist/core/shared/text-normalization.d.ts +0 -1
  278. package/dist/core/shared/text-normalization.js +2 -5
  279. package/dist/core/shared/text-normalization.js.map +1 -1
  280. package/dist/core/store/front-matter-cache.d.ts +16 -2
  281. package/dist/core/store/front-matter-cache.js +99 -33
  282. package/dist/core/store/front-matter-cache.js.map +1 -1
  283. package/dist/core/store/item-store.d.ts +2 -0
  284. package/dist/core/store/item-store.js +76 -110
  285. package/dist/core/store/item-store.js.map +1 -1
  286. package/dist/core/store/settings-validator.d.ts +106 -0
  287. package/dist/core/store/settings-validator.js +279 -0
  288. package/dist/core/store/settings-validator.js.map +1 -0
  289. package/dist/core/store/settings.js +6 -343
  290. package/dist/core/store/settings.js.map +1 -1
  291. package/dist/core/telemetry/runtime.js +5 -3
  292. package/dist/core/telemetry/runtime.js.map +1 -1
  293. package/dist/mcp/server.js +138 -39
  294. package/dist/mcp/server.js.map +1 -1
  295. package/dist/sdk/cli-contracts/enum-contracts.d.ts +20 -0
  296. package/dist/sdk/cli-contracts/enum-contracts.js +156 -0
  297. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -0
  298. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +14 -0
  299. package/dist/sdk/cli-contracts/tool-option-contracts.js +243 -0
  300. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -0
  301. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +11 -0
  302. package/dist/sdk/cli-contracts/tool-parameter-tables.js +901 -0
  303. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -0
  304. package/dist/sdk/cli-contracts.d.ts +18 -33
  305. package/dist/sdk/cli-contracts.js +96 -1238
  306. package/dist/sdk/cli-contracts.js.map +1 -1
  307. package/dist/sdk/package-import-adapters.d.ts +74 -0
  308. package/dist/sdk/package-import-adapters.js +186 -0
  309. package/dist/sdk/package-import-adapters.js.map +1 -0
  310. package/dist/sdk/package-runtime-options.d.ts +26 -0
  311. package/dist/sdk/package-runtime-options.js +71 -0
  312. package/dist/sdk/package-runtime-options.js.map +1 -0
  313. package/dist/sdk/runtime.d.ts +27 -1
  314. package/dist/sdk/runtime.js +48 -3
  315. package/dist/sdk/runtime.js.map +1 -1
  316. package/dist/types.d.ts +6 -0
  317. package/dist/types.js +10 -2
  318. package/dist/types.js.map +1 -1
  319. package/docs/AGENT_GUIDE.md +13 -11
  320. package/docs/ARCHITECTURE.md +1 -1
  321. package/docs/CLAUDE_CODE_PLUGIN.md +5 -28
  322. package/docs/CODEX_PLUGIN.md +5 -5
  323. package/docs/COMMANDS.md +58 -9
  324. package/docs/CONFIGURATION.md +16 -1
  325. package/docs/EXTENSIONS.md +4 -63
  326. package/docs/RELEASING.md +12 -8
  327. package/docs/SDK.md +11 -2
  328. package/marketplace.json +7 -3
  329. package/package.json +18 -14
  330. package/packages/pm-beads/extensions/beads/index.js +2 -49
  331. package/packages/pm-beads/extensions/beads/index.ts +2 -54
  332. package/packages/pm-beads/extensions/beads/runtime-loader.js +86 -0
  333. package/packages/pm-beads/extensions/beads/runtime-loader.ts +88 -0
  334. package/packages/pm-beads/extensions/beads/runtime.js +26 -115
  335. package/packages/pm-beads/extensions/beads/runtime.ts +33 -132
  336. package/packages/pm-calendar/README.md +3 -1
  337. package/packages/pm-calendar/extensions/calendar/index.js +66 -2
  338. package/packages/pm-calendar/extensions/calendar/index.ts +71 -2
  339. package/packages/pm-calendar/extensions/calendar/runtime.js +1 -0
  340. package/packages/pm-calendar/extensions/calendar/runtime.ts +1 -0
  341. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +14 -41
  342. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +25 -41
  343. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +10 -50
  344. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +17 -50
  345. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +8 -40
  346. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +10 -40
  347. package/packages/pm-search-advanced/README.md +8 -0
  348. package/packages/pm-search-advanced/extensions/search-advanced/index.js +75 -1
  349. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +74 -0
  350. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +58 -33
  351. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +60 -33
  352. package/packages/pm-templates/extensions/templates/runtime.js +11 -202
  353. package/packages/pm-templates/extensions/templates/runtime.ts +38 -230
  354. package/packages/pm-todos/extensions/todos/index.js +3 -50
  355. package/packages/pm-todos/extensions/todos/index.ts +3 -55
  356. package/packages/pm-todos/extensions/todos/runtime-loader.js +86 -0
  357. package/packages/pm-todos/extensions/todos/runtime-loader.ts +88 -0
  358. package/packages/pm-todos/extensions/todos/runtime.js +24 -117
  359. package/packages/pm-todos/extensions/todos/runtime.ts +32 -129
  360. package/plugins/pm-claude/README.md +2 -2
  361. package/plugins/pm-claude/commands/pm-planner.md +1 -15
  362. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +5 -2
  363. package/plugins/pm-claude/skills/pm-planner/SKILL.md +3 -21
  364. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +15 -6
  365. package/plugins/pm-codex/skills/pm-native/SKILL.md +1 -13
  366. package/PRD.md +0 -1734
  367. package/dist/core/output/command-aware.d.ts +0 -1
  368. package/dist/core/output/command-aware.js +0 -397
  369. package/dist/core/output/command-aware.js.map +0 -1
@@ -1,52 +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]="4e7e9e79-ece5-54e2-883e-5ef16db5152b")}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]="b61aadc4-20d4-50e8-83f0-095c541132f2")}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
- export const PM_EXTENSION_CAPABILITY_CONTRACTS = [
6
- "commands",
7
- "renderers",
8
- "hooks",
9
- "schema",
10
- "importers",
11
- "search",
12
- "parser",
13
- "preflight",
14
- "services",
15
- ];
16
- export const PM_EXTENSION_SERVICE_NAME_CONTRACTS = [
17
- "output_format",
18
- "error_format",
19
- "help_format",
20
- "lock_acquire",
21
- "lock_release",
22
- "history_append",
23
- "item_store_write",
24
- "item_store_delete",
25
- ];
26
- export const PM_EXTENSION_POLICY_MODE_CONTRACTS = ["off", "warn", "enforce"];
27
- export const PM_EXTENSION_TRUST_MODE_CONTRACTS = ["off", "warn", "enforce"];
28
- export const PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS = ["none", "restricted", "strict"];
29
- export const PM_EXTENSION_POLICY_SURFACE_CONTRACTS = [
30
- "commands.override",
31
- "commands.handler",
32
- "hooks.beforecommand",
33
- "hooks.aftercommand",
34
- "hooks.onwrite",
35
- "hooks.onread",
36
- "hooks.onindex",
37
- "schema.flags",
38
- "schema.itemfields",
39
- "schema.itemtypes",
40
- "schema.migrations",
41
- "parser.override",
42
- "preflight.override",
43
- "services.override",
44
- "renderers.override",
45
- "importers.importer",
46
- "importers.exporter",
47
- "search.provider",
48
- "search.vectorstore",
49
- ];
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";
50
14
  function normalizeUniqueStringList(values) {
51
15
  return [...new Set(Array.from(values).filter((value) => value.trim().length > 0))];
52
16
  }
@@ -94,393 +58,10 @@ export function compactFlagAliasContracts(flagContracts) {
94
58
  return contract.flag === canonical || !canonicalFlags.has(canonical);
95
59
  });
96
60
  }
97
- export const PM_CORE_COMMAND_NAMES = [
98
- "init",
99
- "config",
100
- "extension",
101
- "package",
102
- "packages",
103
- "install",
104
- "upgrade",
105
- "create",
106
- "list",
107
- "list-all",
108
- "list-draft",
109
- "list-open",
110
- "list-in-progress",
111
- "list-blocked",
112
- "list-closed",
113
- "list-canceled",
114
- "aggregate",
115
- "dedupe-audit",
116
- "guide",
117
- "context",
118
- "ctx",
119
- "get",
120
- "search",
121
- "reindex",
122
- "history",
123
- "history-redact",
124
- "activity",
125
- "restore",
126
- "update",
127
- "update-many",
128
- "normalize",
129
- "close",
130
- "delete",
131
- "append",
132
- "comments",
133
- "comments-audit",
134
- "notes",
135
- "learnings",
136
- "files",
137
- "docs",
138
- "deps",
139
- "plan",
140
- "test",
141
- "test-all",
142
- "test-runs",
143
- "stats",
144
- "health",
145
- "validate",
146
- "gc",
147
- "contracts",
148
- "claim",
149
- "release",
150
- "start-task",
151
- "pause-task",
152
- "close-task",
153
- "completion",
154
- "help",
155
- ];
156
- export const PM_TOOL_ACTIONS = [
157
- "init",
158
- "config",
159
- "extension-init",
160
- "extension-install",
161
- "extension-uninstall",
162
- "extension-explore",
163
- "extension-manage",
164
- "extension-reload",
165
- "extension-doctor",
166
- "extension-catalog",
167
- "extension-adopt",
168
- "extension-adopt-all",
169
- "extension-activate",
170
- "extension-deactivate",
171
- "extension",
172
- "package-init",
173
- "package-install",
174
- "package-uninstall",
175
- "package-explore",
176
- "package-manage",
177
- "package-reload",
178
- "package-doctor",
179
- "package-catalog",
180
- "package-adopt",
181
- "package-adopt-all",
182
- "package-activate",
183
- "package-deactivate",
184
- "package",
185
- "install",
186
- "upgrade",
187
- "create",
188
- "list",
189
- "list-all",
190
- "list-draft",
191
- "list-open",
192
- "list-in-progress",
193
- "list-blocked",
194
- "list-closed",
195
- "list-canceled",
196
- "aggregate",
197
- "context",
198
- "ctx",
199
- "get",
200
- "search",
201
- "history",
202
- "history-redact",
203
- "activity",
204
- "restore",
205
- "update",
206
- "update-many",
207
- "close",
208
- "delete",
209
- "append",
210
- "comments",
211
- "plan",
212
- "notes",
213
- "learnings",
214
- "files",
215
- "docs",
216
- "deps",
217
- "test",
218
- "test-all",
219
- "stats",
220
- "health",
221
- "validate",
222
- "gc",
223
- "contracts",
224
- "claim",
225
- "release",
226
- "start-task",
227
- "pause-task",
228
- "close-task",
229
- ];
230
- export function isPmToolAction(value) {
231
- return PM_TOOL_ACTIONS.includes(value);
232
- }
233
- export function isPmExtensionCapabilityContract(value) {
234
- return PM_EXTENSION_CAPABILITY_CONTRACTS.includes(value);
235
- }
236
- export function isPmExtensionServiceNameContract(value) {
237
- return PM_EXTENSION_SERVICE_NAME_CONTRACTS.includes(value);
238
- }
239
- export function isPmExtensionPolicyModeContract(value) {
240
- return PM_EXTENSION_POLICY_MODE_CONTRACTS.includes(value);
241
- }
242
- export function isPmExtensionPolicySurfaceContract(value) {
243
- return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(value);
244
- }
245
- export const TOOL_LIST_FILTER_OPTION_CONTRACTS = [
246
- { param: "type", flag: "--type" },
247
- { param: "tag", flag: "--tag" },
248
- { param: "priority", flag: "--priority" },
249
- { param: "deadlineBefore", flag: "--deadline-before" },
250
- { param: "deadlineAfter", flag: "--deadline-after" },
251
- { param: "assignee", flag: "--assignee" },
252
- { param: "assigneeFilter", flag: "--assignee-filter" },
253
- { param: "parent", flag: "--parent" },
254
- { param: "sprint", flag: "--sprint" },
255
- { param: "release", flag: "--release" },
256
- { param: "limit", flag: "--limit" },
257
- { param: "offset", flag: "--offset" },
258
- { param: "fields", flag: "--fields" },
259
- { param: "sort", flag: "--sort" },
260
- { param: "order", flag: "--order" },
261
- ];
262
- export const TOOL_AGGREGATE_OPTION_CONTRACTS = [
263
- { param: "groupBy", flag: "--group-by" },
264
- { param: "status", flag: "--status" },
265
- { param: "type", flag: "--type" },
266
- { param: "tag", flag: "--tag" },
267
- { param: "priority", flag: "--priority" },
268
- { param: "deadlineBefore", flag: "--deadline-before" },
269
- { param: "deadlineAfter", flag: "--deadline-after" },
270
- { param: "assignee", flag: "--assignee" },
271
- { param: "assigneeFilter", flag: "--assignee-filter" },
272
- { param: "parent", flag: "--parent" },
273
- { param: "sprint", flag: "--sprint" },
274
- { param: "release", flag: "--release" },
275
- ];
276
- export const TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS = [
277
- { param: "mode", flag: "--mode" },
278
- { param: "limit", flag: "--limit" },
279
- { param: "threshold", flag: "--threshold" },
280
- { param: "status", flag: "--status" },
281
- { param: "type", flag: "--type" },
282
- { param: "tag", flag: "--tag" },
283
- { param: "priority", flag: "--priority" },
284
- { param: "deadlineBefore", flag: "--deadline-before" },
285
- { param: "deadlineAfter", flag: "--deadline-after" },
286
- { param: "assignee", flag: "--assignee" },
287
- { param: "assigneeFilter", flag: "--assignee-filter" },
288
- { param: "parent", flag: "--parent" },
289
- { param: "sprint", flag: "--sprint" },
290
- { param: "release", flag: "--release" },
291
- ];
292
- export const TOOL_SEARCH_FILTER_OPTION_CONTRACTS = [
293
- { param: "type", flag: "--type" },
294
- { param: "tag", flag: "--tag" },
295
- { param: "priority", flag: "--priority" },
296
- { param: "deadlineBefore", flag: "--deadline-before" },
297
- { param: "deadlineAfter", flag: "--deadline-after" },
298
- { param: "fields", flag: "--fields" },
299
- { param: "limit", flag: "--limit" },
300
- ];
301
- export const TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
302
- { param: "parent", flag: "--parent" },
303
- { param: "reviewer", flag: "--reviewer" },
304
- { param: "risk", flag: "--risk" },
305
- { param: "confidence", flag: "--confidence" },
306
- { param: "sprint", flag: "--sprint" },
307
- { param: "release", flag: "--release" },
308
- { param: "blockedBy", flag: "--blocked-by" },
309
- { param: "blockedReason", flag: "--blocked-reason" },
310
- { param: "unblockNote", flag: "--unblock-note" },
311
- { param: "reporter", flag: "--reporter" },
312
- { param: "severity", flag: "--severity" },
313
- { param: "environment", flag: "--environment" },
314
- { param: "reproSteps", flag: "--repro-steps" },
315
- { param: "resolution", flag: "--resolution" },
316
- { param: "expectedResult", flag: "--expected-result" },
317
- { param: "actualResult", flag: "--actual-result" },
318
- { param: "affectedVersion", flag: "--affected-version" },
319
- { param: "fixedVersion", flag: "--fixed-version" },
320
- { param: "component", flag: "--component" },
321
- { param: "regression", flag: "--regression", booleanish: true },
322
- { param: "customerImpact", flag: "--customer-impact" },
323
- { param: "definitionOfReady", flag: "--definition-of-ready", allowEmpty: true },
324
- { param: "order", flag: "--order" },
325
- { param: "goal", flag: "--goal" },
326
- { param: "objective", flag: "--objective" },
327
- { param: "value", flag: "--value" },
328
- { param: "impact", flag: "--impact" },
329
- { param: "outcome", flag: "--outcome" },
330
- { param: "whyNow", flag: "--why-now" },
331
- ];
332
- export const TOOL_CREATE_OPTION_CONTRACTS = [
333
- { param: "title", flag: "--title" },
334
- { param: "description", flag: "--description", allowEmpty: true },
335
- { param: "type", flag: "--type" },
336
- { param: "template", flag: "--template" },
337
- { param: "createMode", flag: "--create-mode" },
338
- { param: "schedulePreset", flag: "--schedule-preset" },
339
- { param: "status", flag: "--status" },
340
- { param: "priority", flag: "--priority" },
341
- { param: "tags", flag: "--tags", allowEmpty: true },
342
- { param: "body", flag: "--body", allowEmpty: true },
343
- { param: "deadline", flag: "--deadline" },
344
- { param: "estimate", flag: "--estimate" },
345
- { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
346
- { param: "author", flag: "--author" },
347
- { param: "message", flag: "--message", allowEmpty: true },
348
- { param: "assignee", flag: "--assignee" },
349
- { param: "reminder", flag: "--reminder", repeatable: true },
350
- { param: "event", flag: "--event", repeatable: true },
351
- { param: "typeOption", flag: "--type-option", repeatable: true },
352
- { param: "dep", flag: "--dep", repeatable: true },
353
- { param: "comment", flag: "--comment", repeatable: true },
354
- { param: "note", flag: "--note", repeatable: true },
355
- { param: "learning", flag: "--learning", repeatable: true },
356
- { param: "linkedFile", flag: "--file", repeatable: true },
357
- { param: "linkedTest", flag: "--test", repeatable: true },
358
- { param: "doc", flag: "--doc", repeatable: true },
359
- { param: "unset", flag: "--unset", repeatable: true },
360
- { param: "clearDeps", flag: "--clear-deps" },
361
- { param: "clearComments", flag: "--clear-comments" },
362
- { param: "clearNotes", flag: "--clear-notes" },
363
- { param: "clearLearnings", flag: "--clear-learnings" },
364
- { param: "clearFiles", flag: "--clear-files" },
365
- { param: "clearTests", flag: "--clear-tests" },
366
- { param: "clearDocs", flag: "--clear-docs" },
367
- { param: "clearReminders", flag: "--clear-reminders" },
368
- { param: "clearEvents", flag: "--clear-events" },
369
- { param: "clearTypeOptions", flag: "--clear-type-options" },
370
- { param: "allowAuditUpdate", flag: "--allow-audit-update" },
371
- ];
372
- export const TOOL_UPDATE_OPTION_CONTRACTS = [
373
- { param: "title", flag: "--title" },
374
- { param: "description", flag: "--description", allowEmpty: true },
375
- { param: "body", flag: "--body", allowEmpty: true },
376
- { param: "status", flag: "--status" },
377
- { param: "closeReason", flag: "--close-reason" },
378
- { param: "priority", flag: "--priority" },
379
- { param: "type", flag: "--type" },
380
- { param: "tags", flag: "--tags", allowEmpty: true },
381
- { param: "deadline", flag: "--deadline" },
382
- { param: "estimate", flag: "--estimate" },
383
- { param: "acceptanceCriteria", flag: "--acceptance-criteria", allowEmpty: true },
384
- { param: "author", flag: "--author" },
385
- { param: "message", flag: "--message", allowEmpty: true },
386
- { param: "assignee", flag: "--assignee" },
387
- { param: "dep", flag: "--dep", repeatable: true },
388
- { param: "depRemove", flag: "--dep-remove", repeatable: true },
389
- { param: "replaceDeps", flag: "--replace-deps" },
390
- { param: "replaceTests", flag: "--replace-tests" },
391
- { param: "comment", flag: "--comment", repeatable: true },
392
- { param: "note", flag: "--note", repeatable: true },
393
- { param: "learning", flag: "--learning", repeatable: true },
394
- { param: "linkedFile", flag: "--file", repeatable: true },
395
- { param: "linkedTest", flag: "--test", repeatable: true },
396
- { param: "doc", flag: "--doc", repeatable: true },
397
- { param: "reminder", flag: "--reminder", repeatable: true },
398
- { param: "event", flag: "--event", repeatable: true },
399
- { param: "typeOption", flag: "--type-option", repeatable: true },
400
- { param: "unset", flag: "--unset", repeatable: true },
401
- { param: "clearDeps", flag: "--clear-deps" },
402
- { param: "clearComments", flag: "--clear-comments" },
403
- { param: "clearNotes", flag: "--clear-notes" },
404
- { param: "clearLearnings", flag: "--clear-learnings" },
405
- { param: "clearFiles", flag: "--clear-files" },
406
- { param: "clearTests", flag: "--clear-tests" },
407
- { param: "clearDocs", flag: "--clear-docs" },
408
- { param: "clearReminders", flag: "--clear-reminders" },
409
- { param: "clearEvents", flag: "--clear-events" },
410
- { param: "clearTypeOptions", flag: "--clear-type-options" },
411
- { param: "allowAuditDepUpdate", flag: "--allow-audit-dep-update" },
412
- ];
413
- export const TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
414
- { param: "filterStatus", flag: "--filter-status" },
415
- { param: "filterType", flag: "--filter-type" },
416
- { param: "filterTag", flag: "--filter-tag" },
417
- { param: "filterPriority", flag: "--filter-priority" },
418
- { param: "filterDeadlineBefore", flag: "--filter-deadline-before" },
419
- { param: "filterDeadlineAfter", flag: "--filter-deadline-after" },
420
- { param: "filterAssignee", flag: "--filter-assignee" },
421
- { param: "filterAssigneeFilter", flag: "--filter-assignee-filter" },
422
- { param: "filterParent", flag: "--filter-parent" },
423
- { param: "filterSprint", flag: "--filter-sprint" },
424
- { param: "filterRelease", flag: "--filter-release" },
425
- { param: "limit", flag: "--limit" },
426
- { param: "offset", flag: "--offset" },
427
- ];
428
- export const TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS = [...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS];
429
- export const TOOL_CALENDAR_OPTION_CONTRACTS = [
430
- { param: "view", flag: "--view" },
431
- { param: "date", flag: "--date" },
432
- { param: "from", flag: "--from" },
433
- { param: "to", flag: "--to" },
434
- { param: "type", flag: "--type" },
435
- { param: "tag", flag: "--tag" },
436
- { param: "priority", flag: "--priority" },
437
- { param: "status", flag: "--status" },
438
- { param: "assignee", flag: "--assignee" },
439
- { param: "assigneeFilter", flag: "--assignee-filter" },
440
- { param: "sprint", flag: "--sprint" },
441
- { param: "release", flag: "--release" },
442
- { param: "include", flag: "--include" },
443
- { param: "recurrenceLookaheadDays", flag: "--recurrence-lookahead-days" },
444
- { param: "recurrenceLookbackDays", flag: "--recurrence-lookback-days" },
445
- { param: "occurrenceLimit", flag: "--occurrence-limit" },
446
- { param: "limit", flag: "--limit" },
447
- { param: "format", flag: "--format" },
448
- ];
449
- export const TOOL_ACTIVITY_OPTION_CONTRACTS = [
450
- { param: "id", flag: "--id" },
451
- { param: "op", flag: "--op" },
452
- { param: "author", flag: "--author" },
453
- { param: "from", flag: "--from" },
454
- { param: "to", flag: "--to" },
455
- { param: "limit", flag: "--limit" },
456
- ];
457
- export const TOOL_CONTEXT_OPTION_CONTRACTS = [
458
- { param: "date", flag: "--date" },
459
- { param: "from", flag: "--from" },
460
- { param: "to", flag: "--to" },
461
- { param: "type", flag: "--type" },
462
- { param: "tag", flag: "--tag" },
463
- { param: "priority", flag: "--priority" },
464
- { param: "assignee", flag: "--assignee" },
465
- { param: "assigneeFilter", flag: "--assignee-filter" },
466
- { param: "sprint", flag: "--sprint" },
467
- { param: "release", flag: "--release" },
468
- { param: "limit", flag: "--limit" },
469
- { param: "format", flag: "--format" },
470
- { param: "depth", flag: "--depth" },
471
- { param: "section", flag: "--section", repeatable: true },
472
- { param: "activityLimit", flag: "--activity-limit" },
473
- { param: "staleThreshold", flag: "--stale-threshold" },
474
- ];
475
- export const TOOL_DEPS_OPTION_CONTRACTS = [
476
- { param: "format", flag: "--format" },
477
- { param: "maxDepth", flag: "--max-depth" },
478
- { param: "collapse", flag: "--collapse" },
479
- { param: "summary", flag: "--summary" },
480
- ];
481
61
  export const SUBCOMMAND_GLOBAL_FLAG_CONTRACTS = [
482
62
  { flag: "--json" },
483
63
  { flag: "--quiet" },
64
+ { flag: "--no-changed-fields" },
484
65
  { flag: "--path" },
485
66
  { flag: "--no-extensions" },
486
67
  { flag: "--no-pager" },
@@ -492,6 +73,7 @@ export const GLOBAL_FLAG_CONTRACTS = [
492
73
  { flag: "--version" },
493
74
  ];
494
75
  export const LIST_FILTER_FLAG_CONTRACTS = [
76
+ { flag: "--status", list: true },
495
77
  { flag: "--type" },
496
78
  { flag: "--tag" },
497
79
  { flag: "--priority" },
@@ -508,14 +90,14 @@ export const LIST_FILTER_FLAG_CONTRACTS = [
508
90
  { flag: "--compact" },
509
91
  { flag: "--brief" },
510
92
  { flag: "--full" },
511
- { flag: "--fields" },
93
+ { flag: "--fields", list: true },
512
94
  { flag: "--sort" },
513
95
  { flag: "--order" },
514
96
  { flag: "--include-body" },
515
97
  { flag: "--stream" },
516
98
  ];
517
99
  export const AGGREGATE_FLAG_CONTRACTS = [
518
- { flag: "--group-by" },
100
+ { flag: "--group-by", list: true },
519
101
  { flag: "--count" },
520
102
  { flag: "--include-unparented" },
521
103
  { flag: "--include_unparented" },
@@ -599,8 +181,6 @@ export const FILES_FLAG_CONTRACTS = [
599
181
  { flag: "--remove" },
600
182
  { flag: "--migrate" },
601
183
  { flag: "--list" },
602
- { flag: "--apply" },
603
- { flag: "--note" },
604
184
  { flag: "--append-stable" },
605
185
  { flag: "--validate-paths" },
606
186
  { flag: "--audit" },
@@ -621,6 +201,8 @@ export const DOCS_FLAG_CONTRACTS = [
621
201
  ];
622
202
  export const HISTORY_FLAG_CONTRACTS = [
623
203
  { flag: "--limit" },
204
+ { flag: "--compact" },
205
+ { flag: "--full" },
624
206
  { flag: "--diff" },
625
207
  { flag: "--verify" },
626
208
  ];
@@ -633,6 +215,20 @@ export const HISTORY_REDACT_FLAG_CONTRACTS = [
633
215
  { flag: "--message" },
634
216
  { flag: "--force" },
635
217
  ];
218
+ export const HISTORY_REPAIR_FLAG_CONTRACTS = [
219
+ { flag: "--dry-run" },
220
+ { flag: "--author" },
221
+ { flag: "--message" },
222
+ { flag: "--force" },
223
+ ];
224
+ export const SCHEMA_FLAG_CONTRACTS = [
225
+ { flag: "--description" },
226
+ { flag: "--default-status", aliases: ["--default_status"] },
227
+ { flag: "--folder" },
228
+ { flag: "--alias" },
229
+ { flag: "--author" },
230
+ { flag: "--force" },
231
+ ];
636
232
  export const PLAN_FLAG_CONTRACTS = [
637
233
  { flag: "--title" },
638
234
  { flag: "--description" },
@@ -644,12 +240,12 @@ export const PLAN_FLAG_CONTRACTS = [
644
240
  { flag: "--harness" },
645
241
  { flag: "--mode" },
646
242
  { flag: "--resume-context", aliases: ["--resume_context"] },
647
- { flag: "--tags" },
243
+ { flag: "--tags", list: true },
648
244
  { flag: "--priority" },
649
245
  { flag: "--body" },
650
246
  { flag: "--claim" },
651
247
  { flag: "--from-search", aliases: ["--from_search"] },
652
- { flag: "--step-title", aliases: ["--step_title"] },
248
+ { flag: "--step-title", aliases: ["--step", "--step_title"] },
653
249
  { flag: "--step-body", aliases: ["--step_body"] },
654
250
  { flag: "--step-owner", aliases: ["--step_owner"] },
655
251
  { flag: "--step-status", aliases: ["--step_status"] },
@@ -665,15 +261,15 @@ export const PLAN_FLAG_CONTRACTS = [
665
261
  { flag: "--file" },
666
262
  { flag: "--test" },
667
263
  { flag: "--doc" },
668
- { flag: "--decision-text", aliases: ["--decision_text"] },
264
+ { flag: "--decision-text", aliases: ["--decision_text", "--decision"] },
669
265
  { flag: "--decision-rationale", aliases: ["--decision_rationale"] },
670
266
  { flag: "--decision-evidence", aliases: ["--decision_evidence"] },
671
- { flag: "--discovery-text", aliases: ["--discovery_text"] },
672
- { flag: "--validation-text", aliases: ["--validation_text"] },
267
+ { flag: "--discovery-text", aliases: ["--discovery_text", "--discovery"] },
268
+ { flag: "--validation-text", aliases: ["--validation_text", "--validation"] },
673
269
  { flag: "--validation-command", aliases: ["--validation_command"] },
674
270
  { flag: "--validation-expected", aliases: ["--validation_expected"] },
675
271
  { flag: "--depth" },
676
- { flag: "--fields" },
272
+ { flag: "--fields", list: true },
677
273
  { flag: "--steps" },
678
274
  { flag: "--materialize-type", aliases: ["--materialize_type"] },
679
275
  { flag: "--materialize-parent", aliases: ["--materialize_parent"] },
@@ -688,6 +284,7 @@ export const INIT_FLAG_CONTRACTS = [
688
284
  { flag: "--author" },
689
285
  { flag: "--agent-guidance" },
690
286
  { flag: "--with-packages" },
287
+ { flag: "--verbose" },
691
288
  ];
692
289
  export const CONFIG_FLAG_CONTRACTS = [
693
290
  { flag: "--criterion" },
@@ -712,6 +309,7 @@ export const EXTENSION_FLAG_CONTRACTS = [
712
309
  { flag: "--install" },
713
310
  { flag: "--uninstall" },
714
311
  { flag: "--explore" },
312
+ { flag: "--list" },
715
313
  { flag: "--manage" },
716
314
  { flag: "--reload" },
717
315
  { flag: "--watch" },
@@ -782,6 +380,7 @@ export const RESTORE_FLAG_CONTRACTS = [
782
380
  { flag: "--force" },
783
381
  ];
784
382
  export const DELETE_FLAG_CONTRACTS = [
383
+ { flag: "--dry-run" },
785
384
  { flag: "--author" },
786
385
  { flag: "--message" },
787
386
  { flag: "--force" },
@@ -870,6 +469,8 @@ export const HEALTH_FLAG_CONTRACTS = [
870
469
  { flag: "--no-refresh" },
871
470
  { flag: "--refresh-vectors" },
872
471
  { flag: "--verbose-stale-items" },
472
+ { flag: "--brief" },
473
+ { flag: "--summary" },
873
474
  { flag: "--skip-vectors" },
874
475
  { flag: "--skip-integrity" },
875
476
  { flag: "--skip-drift" },
@@ -886,6 +487,7 @@ export const VALIDATE_FLAG_CONTRACTS = [
886
487
  { flag: "--scan-mode" },
887
488
  { flag: "--include-pm-internals" },
888
489
  { flag: "--verbose-file-lists" },
490
+ { flag: "--verbose-diagnostics" },
889
491
  { flag: "--strict-exit" },
890
492
  { flag: "--fail-on-warn" },
891
493
  { flag: "--check-history-drift" },
@@ -902,7 +504,7 @@ export const CREATE_FLAG_CONTRACTS = [
902
504
  { flag: "--schedule_preset" },
903
505
  { short: "-s", flag: "--status" },
904
506
  { short: "-p", flag: "--priority" },
905
- { flag: "--tags" },
507
+ { flag: "--tags", list: true },
906
508
  { short: "-b", flag: "--body" },
907
509
  { flag: "--deadline" },
908
510
  { flag: "--estimate" },
@@ -987,7 +589,7 @@ export const UPDATE_FLAG_CONTRACTS = [
987
589
  { flag: "--close_reason" },
988
590
  { short: "-p", flag: "--priority" },
989
591
  { flag: "--type" },
990
- { flag: "--tags" },
592
+ { flag: "--tags", list: true },
991
593
  { flag: "--deadline" },
992
594
  { flag: "--estimate" },
993
595
  { flag: "--estimated-minutes" },
@@ -1094,7 +696,7 @@ export const UPDATE_MANY_FLAG_CONTRACTS = [
1094
696
  { short: "-b", flag: "--body" },
1095
697
  { short: "-p", flag: "--priority" },
1096
698
  { flag: "--type" },
1097
- { flag: "--tags" },
699
+ { flag: "--tags", list: true },
1098
700
  { flag: "--deadline" },
1099
701
  { flag: "--estimate" },
1100
702
  { flag: "--estimated-minutes" },
@@ -1224,6 +826,8 @@ export const ACTIVITY_FLAG_CONTRACTS = [
1224
826
  { flag: "--from" },
1225
827
  { flag: "--to" },
1226
828
  { flag: "--limit" },
829
+ { flag: "--compact" },
830
+ { flag: "--full" },
1227
831
  { flag: "--stream" },
1228
832
  ];
1229
833
  export const CONTEXT_FLAG_CONTRACTS = [
@@ -1248,7 +852,8 @@ export const CONTEXT_FLAG_CONTRACTS = [
1248
852
  ];
1249
853
  export const GET_FLAG_CONTRACTS = [
1250
854
  { flag: "--depth" },
1251
- { flag: "--fields" },
855
+ { flag: "--full" },
856
+ { flag: "--fields", list: true },
1252
857
  ];
1253
858
  export const GUIDE_FLAG_CONTRACTS = [
1254
859
  { flag: "--list" },
@@ -1270,7 +875,7 @@ export const SEARCH_FLAG_CONTRACTS = [
1270
875
  { flag: "--phrase-exact" },
1271
876
  { flag: "--compact" },
1272
877
  { flag: "--full" },
1273
- { flag: "--fields" },
878
+ { flag: "--fields", list: true },
1274
879
  { flag: "--limit" },
1275
880
  { flag: "--type" },
1276
881
  { flag: "--tag" },
@@ -1369,10 +974,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1369
974
  return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
1370
975
  case "aggregate":
1371
976
  return withSubcommandGlobalFlags(AGGREGATE_FLAG_CONTRACTS);
1372
- case "dedupe-audit":
1373
- return withSubcommandGlobalFlags(DEDUPE_AUDIT_FLAG_CONTRACTS);
1374
- case "comments-audit":
1375
- return withSubcommandGlobalFlags(COMMENTS_AUDIT_FLAG_CONTRACTS);
1376
977
  case "calendar":
1377
978
  return withSubcommandGlobalFlags(CALENDAR_FLAG_CONTRACTS);
1378
979
  case "context":
@@ -1385,6 +986,10 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1385
986
  return withSubcommandGlobalFlags(HISTORY_FLAG_CONTRACTS);
1386
987
  case "history-redact":
1387
988
  return withSubcommandGlobalFlags(HISTORY_REDACT_FLAG_CONTRACTS);
989
+ case "history-repair":
990
+ return withSubcommandGlobalFlags(HISTORY_REPAIR_FLAG_CONTRACTS);
991
+ case "schema":
992
+ return withSubcommandGlobalFlags(SCHEMA_FLAG_CONTRACTS);
1388
993
  case "plan":
1389
994
  return withSubcommandGlobalFlags(PLAN_FLAG_CONTRACTS);
1390
995
  case "activity":
@@ -1395,8 +1000,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1395
1000
  return withSubcommandGlobalFlags(UPDATE_FLAG_CONTRACTS);
1396
1001
  case "update-many":
1397
1002
  return withSubcommandGlobalFlags(UPDATE_MANY_FLAG_CONTRACTS);
1398
- case "normalize":
1399
- return withSubcommandGlobalFlags(NORMALIZE_FLAG_CONTRACTS);
1400
1003
  case "close":
1401
1004
  return withSubcommandGlobalFlags(CLOSE_FLAG_CONTRACTS);
1402
1005
  case "delete":
@@ -1419,8 +1022,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1419
1022
  return withSubcommandGlobalFlags(TEST_FLAG_CONTRACTS);
1420
1023
  case "test-all":
1421
1024
  return withSubcommandGlobalFlags(TEST_ALL_FLAG_CONTRACTS);
1422
- case "test-runs":
1423
- return withSubcommandGlobalFlags(TEST_RUNS_FLAG_CONTRACTS);
1424
1025
  case "health":
1425
1026
  return withSubcommandGlobalFlags(HEALTH_FLAG_CONTRACTS);
1426
1027
  case "validate":
@@ -1439,10 +1040,6 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1439
1040
  return withSubcommandGlobalFlags(PAUSE_TASK_FLAG_CONTRACTS);
1440
1041
  case "close-task":
1441
1042
  return withSubcommandGlobalFlags(CLOSE_TASK_FLAG_CONTRACTS);
1442
- case "guide":
1443
- return withSubcommandGlobalFlags(GUIDE_FLAG_CONTRACTS);
1444
- case "completion":
1445
- return withSubcommandGlobalFlags(COMPLETION_FLAG_CONTRACTS);
1446
1043
  default:
1447
1044
  return withSubcommandGlobalFlags([]);
1448
1045
  }
@@ -1460,255 +1057,6 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
1460
1057
  : scoped;
1461
1058
  return normalizeUniqueStringList(all).join(" ");
1462
1059
  }
1463
- const PM_TOOL_PARAMETER_PROPERTIES = {
1464
- json: { type: "boolean", default: true },
1465
- quiet: { type: "boolean" },
1466
- profile: { type: "boolean" },
1467
- noExtensions: { type: "boolean" },
1468
- noPager: { type: "boolean" },
1469
- path: { type: "string" },
1470
- pmExecutable: { type: "string" },
1471
- timeoutMs: { type: "number" },
1472
- id: { type: "string" },
1473
- target: { type: "string" },
1474
- github: { type: "string" },
1475
- ref: { type: "string" },
1476
- query: { type: "string" },
1477
- keywords: { type: "string" },
1478
- fields: { type: "string" },
1479
- sort: { type: "string", enum: ["priority", "deadline", "updated_at", "created_at", "title", "parent"] },
1480
- prefix: { type: "string" },
1481
- preset: { type: "string", enum: ["minimal", "default", "strict", "custom"] },
1482
- defaults: { type: "boolean" },
1483
- agentGuidance: { type: "string", enum: ["ask", "add", "skip", "status"] },
1484
- withPackages: { type: "boolean" },
1485
- scope: { type: "string", enum: ["project", "global"] },
1486
- contractAction: { type: "string" },
1487
- command: { type: "string" },
1488
- schemaOnly: { type: "boolean" },
1489
- flagsOnly: { type: "boolean" },
1490
- availabilityOnly: { type: "boolean" },
1491
- runtimeOnly: { type: "boolean" },
1492
- activeOnly: { type: "boolean" },
1493
- eagerTags: { type: "boolean" },
1494
- configAction: { type: "string", enum: ["get", "set", "list", "export"] },
1495
- key: { type: "string" },
1496
- title: { type: "string" },
1497
- description: { type: "string" },
1498
- type: { type: "string" },
1499
- template: { type: "string" },
1500
- createMode: { type: "string", enum: ["strict", "progressive"] },
1501
- schedulePreset: { type: "string", enum: ["lightweight"] },
1502
- status: { type: "string", enum: ["draft", "open", "in_progress", "blocked", "closed", "canceled", "in-progress"] },
1503
- filterStatus: { type: "string" },
1504
- filterType: { type: "string" },
1505
- filterTag: { type: "string" },
1506
- filterPriority: { anyOf: [{ type: "string" }, { type: "number" }] },
1507
- filterDeadlineBefore: { type: "string" },
1508
- filterDeadlineAfter: { type: "string" },
1509
- filterAssignee: { type: "string" },
1510
- filterAssigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1511
- filterParent: { type: "string" },
1512
- filterSprint: { type: "string" },
1513
- filterRelease: { type: "string" },
1514
- closeReason: { type: "string" },
1515
- priority: { anyOf: [{ type: "string" }, { type: "number" }] },
1516
- tags: { type: "string" },
1517
- body: { type: "string" },
1518
- deadline: { type: "string" },
1519
- estimate: { anyOf: [{ type: "string" }, { type: "number" }] },
1520
- acceptanceCriteria: { type: "string" },
1521
- author: { type: "string" },
1522
- message: { type: "string" },
1523
- assignee: { type: "string" },
1524
- assigneeFilter: { type: "string", enum: ["assigned", "unassigned"] },
1525
- parent: { type: "string" },
1526
- reviewer: { type: "string" },
1527
- risk: { type: "string" },
1528
- confidence: { anyOf: [{ type: "string" }, { type: "number" }] },
1529
- sprint: { type: "string" },
1530
- release: { type: "string" },
1531
- blockedBy: { type: "string" },
1532
- blockedReason: { type: "string" },
1533
- unblockNote: { type: "string" },
1534
- reporter: { type: "string" },
1535
- severity: { type: "string" },
1536
- environment: { type: "string" },
1537
- reproSteps: { type: "string" },
1538
- resolution: { type: "string" },
1539
- expectedResult: { type: "string" },
1540
- actualResult: { type: "string" },
1541
- affectedVersion: { type: "string" },
1542
- fixedVersion: { type: "string" },
1543
- component: { type: "string" },
1544
- regression: { anyOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] },
1545
- customerImpact: { type: "string" },
1546
- definitionOfReady: { type: "string" },
1547
- order: { anyOf: [{ type: "string" }, { type: "number" }] },
1548
- goal: { type: "string" },
1549
- objective: { type: "string" },
1550
- value: { type: "string" },
1551
- impact: { type: "string" },
1552
- outcome: { type: "string" },
1553
- whyNow: { type: "string" },
1554
- mode: {
1555
- type: "string",
1556
- enum: ["keyword", "semantic", "hybrid", "title_exact", "title_fuzzy", "parent_scope"],
1557
- },
1558
- op: { type: "string" },
1559
- compact: { type: "boolean" },
1560
- brief: { type: "boolean" },
1561
- full: { type: "boolean" },
1562
- view: { type: "string", enum: ["agenda", "day", "week", "month"] },
1563
- date: { type: "string" },
1564
- from: { type: "string" },
1565
- to: { type: "string" },
1566
- past: { type: "boolean" },
1567
- fullPeriod: { type: "boolean" },
1568
- include: { type: "string" },
1569
- recurrenceLookaheadDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1570
- recurrenceLookbackDays: { anyOf: [{ type: "string" }, { type: "number" }] },
1571
- occurrenceLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1572
- includeLinked: { type: "boolean" },
1573
- semantic: { type: "boolean" },
1574
- hybrid: { type: "boolean" },
1575
- titleExact: { type: "boolean" },
1576
- phraseExact: { type: "boolean" },
1577
- includeBody: { type: "boolean" },
1578
- tag: { type: "string" },
1579
- deadlineBefore: { type: "string" },
1580
- deadlineAfter: { type: "string" },
1581
- limit: { anyOf: [{ type: "string" }, { type: "number" }] },
1582
- limitItems: { anyOf: [{ type: "string" }, { type: "number" }] },
1583
- fullHistory: { type: "boolean" },
1584
- latest: { anyOf: [{ type: "string" }, { type: "number" }] },
1585
- offset: { anyOf: [{ type: "string" }, { type: "number" }] },
1586
- progress: { type: "boolean" },
1587
- background: { type: "boolean" },
1588
- runId: { type: "string" },
1589
- stream: {
1590
- anyOf: [{ type: "boolean" }, { type: "string", enum: ["stdout", "stderr", "both", "rows", "ndjson", "jsonl"] }],
1591
- },
1592
- tail: { anyOf: [{ type: "string" }, { type: "number" }] },
1593
- envSet: { type: "array", items: { type: "string" } },
1594
- envClear: { type: "array", items: { type: "string" } },
1595
- sharedHostSafe: { type: "boolean" },
1596
- detail: { type: "string", enum: ["summary", "deep"] },
1597
- trace: { type: "boolean" },
1598
- reload: { type: "boolean" },
1599
- watch: { type: "boolean" },
1600
- runtimeProbe: { type: "boolean" },
1601
- fixManagedState: { type: "boolean" },
1602
- pmContext: { type: "string", enum: ["schema", "tracker", "auto"] },
1603
- overrideLinkedPmContext: { type: "boolean" },
1604
- failOnContextMismatch: { type: "boolean" },
1605
- failOnSkipped: { type: "boolean" },
1606
- failOnEmptyTestRun: { type: "boolean" },
1607
- requireAssertionsForPm: { type: "boolean" },
1608
- checkContext: { type: "boolean" },
1609
- autoPmContext: { type: "boolean" },
1610
- diff: { type: "boolean" },
1611
- verify: { type: "boolean" },
1612
- literal: { type: "array", items: { type: "string" } },
1613
- regex: { type: "array", items: { type: "string" } },
1614
- replacement: { type: "string" },
1615
- timeout: { anyOf: [{ type: "string" }, { type: "number" }] },
1616
- validateClose: { type: "string", enum: ["off", "warn", "strict"] },
1617
- checkMetadata: { type: "boolean" },
1618
- metadataProfile: { type: "string", enum: ["core", "strict", "custom"] },
1619
- checkResolution: { type: "boolean" },
1620
- checkLifecycle: { type: "boolean" },
1621
- checkStaleBlockers: { type: "boolean" },
1622
- dependencyCycleSeverity: { type: "string", enum: ["off", "warn", "error"] },
1623
- checkFiles: { type: "boolean" },
1624
- strictDirectories: { type: "boolean" },
1625
- checkOnly: { type: "boolean" },
1626
- checkTelemetry: { type: "boolean" },
1627
- noRefresh: { type: "boolean" },
1628
- refreshVectors: { type: "boolean" },
1629
- verboseStaleItems: { type: "boolean" },
1630
- scanMode: { type: "string", enum: ["default", "tracked-all", "tracked-all-strict"] },
1631
- includePmInternals: { type: "boolean" },
1632
- verboseFileLists: { type: "boolean" },
1633
- strictExit: { type: "boolean" },
1634
- failOnWarn: { type: "boolean" },
1635
- checkHistoryDrift: { type: "boolean" },
1636
- checkCommandReferences: { type: "boolean" },
1637
- allowAuditNote: { type: "boolean" },
1638
- allowAuditLearning: { type: "boolean" },
1639
- allowAuditComment: { type: "boolean" },
1640
- allowAuditUpdate: { type: "boolean" },
1641
- allowAuditDepUpdate: { type: "boolean" },
1642
- allowAuditRelease: { type: "boolean" },
1643
- dryRun: { type: "boolean" },
1644
- cliOnly: { type: "boolean" },
1645
- packagesOnly: { type: "boolean" },
1646
- repair: { type: "boolean" },
1647
- packageName: { type: "string" },
1648
- rollback: { type: "string" },
1649
- noCheckpoint: { type: "boolean" },
1650
- force: { type: "boolean" },
1651
- run: { type: "boolean" },
1652
- count: { type: "boolean" },
1653
- includeUnparented: { type: "boolean" },
1654
- gcScope: {
1655
- type: "array",
1656
- items: { type: "string", enum: ["index", "embeddings", "runtime"] },
1657
- },
1658
- maxDepth: { anyOf: [{ type: "string" }, { type: "number" }] },
1659
- collapse: { type: "string", enum: ["none", "repeated"] },
1660
- summary: { type: "boolean" },
1661
- shell: { type: "string", enum: ["bash", "zsh", "fish"] },
1662
- stdin: { type: "boolean" },
1663
- file: { type: "string" },
1664
- preserveSourceIds: { type: "boolean" },
1665
- folder: { type: "string" },
1666
- text: { type: "string" },
1667
- add: { type: "array", items: { type: "string" } },
1668
- addGlob: { type: "array", items: { type: "string" } },
1669
- remove: { type: "array", items: { type: "string" } },
1670
- migrate: { type: "array", items: { type: "string" } },
1671
- discover: { type: "boolean" },
1672
- apply: { type: "boolean" },
1673
- discoveryNote: { type: "string" },
1674
- appendStable: { type: "boolean" },
1675
- validatePaths: { type: "boolean" },
1676
- audit: { type: "boolean" },
1677
- dep: { type: "array", items: { type: "string" } },
1678
- depRemove: { type: "array", items: { type: "string" } },
1679
- replaceDeps: { type: "boolean" },
1680
- replaceTests: { type: "boolean" },
1681
- comment: { type: "array", items: { type: "string" } },
1682
- note: { type: "array", items: { type: "string" } },
1683
- learning: { type: "array", items: { type: "string" } },
1684
- linkedFile: { type: "array", items: { type: "string" } },
1685
- linkedTest: { type: "array", items: { type: "string" } },
1686
- doc: { type: "array", items: { type: "string" } },
1687
- reminder: { type: "array", items: { type: "string" } },
1688
- event: { type: "array", items: { type: "string" } },
1689
- typeOption: { type: "array", items: { type: "string" } },
1690
- unset: { type: "array", items: { type: "string" } },
1691
- clearDeps: { type: "boolean" },
1692
- clearComments: { type: "boolean" },
1693
- clearNotes: { type: "boolean" },
1694
- clearLearnings: { type: "boolean" },
1695
- clearFiles: { type: "boolean" },
1696
- clearTests: { type: "boolean" },
1697
- clearDocs: { type: "boolean" },
1698
- clearReminders: { type: "boolean" },
1699
- clearEvents: { type: "boolean" },
1700
- clearTypeOptions: { type: "boolean" },
1701
- criterion: { type: "array", items: { type: "string" } },
1702
- clearCriteria: { type: "boolean" },
1703
- groupBy: { type: "string" },
1704
- threshold: { anyOf: [{ type: "string" }, { type: "number" }] },
1705
- format: { type: "string" },
1706
- depth: { type: "string", enum: ["brief", "standard", "deep"] },
1707
- section: { type: "array", items: { type: "string", enum: ["hierarchy", "activity", "progress", "blockers", "files", "workload", "staleness", "tests"] } },
1708
- activityLimit: { anyOf: [{ type: "string" }, { type: "number" }] },
1709
- staleThreshold: { type: "string" },
1710
- policy: { type: "string" },
1711
- };
1712
1060
  const PM_TOOL_GLOBAL_PARAMETER_KEYS = ["json", "quiet", "profile", "noExtensions", "noPager", "path", "pmExecutable", "timeoutMs"];
1713
1061
  function toSchemaKeyList(values) {
1714
1062
  return normalizeUniqueStringList(values);
@@ -1779,7 +1127,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1779
1127
  init: { optional: ["prefix", "preset", "defaults", "author", "agentGuidance", "withPackages"] },
1780
1128
  config: {
1781
1129
  required: ["scope", "configAction"],
1782
- optional: ["key", "criterion", "clearCriteria", "format", "policy"],
1130
+ optional: ["key", "value", "criterion", "clearCriteria", "format", "policy"],
1783
1131
  },
1784
1132
  "extension-init": { required: ["target"], optional: ["scope"] },
1785
1133
  "extension-install": {
@@ -1889,18 +1237,27 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1889
1237
  guide: { optional: ["format", "depth"] },
1890
1238
  context: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
1891
1239
  ctx: { optional: CONTEXT_CONTRACT_PARAMETER_KEYS },
1892
- get: { required: ["id"], optional: ["depth", "fields"] },
1240
+ get: { required: ["id"], optional: ["depth", "full", "fields"] },
1893
1241
  search: {
1894
1242
  optional: SEARCH_CONTRACT_PARAMETER_KEYS,
1895
1243
  anyOfRequired: [["query"], ["keywords"]],
1896
1244
  },
1897
1245
  reindex: { optional: ["mode", "progress"] },
1898
- history: { required: ["id"], optional: ["limit", "diff", "verify"] },
1246
+ history: { required: ["id"], optional: ["limit", "compact", "full", "diff", "verify"] },
1899
1247
  "history-redact": {
1900
1248
  required: ["id"],
1901
1249
  optional: ["literal", "regex", "replacement", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1902
1250
  anyOfRequired: [["literal"], ["regex"]],
1903
1251
  },
1252
+ "history-repair": {
1253
+ required: ["id"],
1254
+ optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1255
+ },
1256
+ schema: {
1257
+ required: ["subcommand", "name"],
1258
+ // No --message: schema add-type writes a config file, not item history.
1259
+ optional: ["description", "defaultStatus", "folder", "alias", "author", "force"],
1260
+ },
1904
1261
  plan: {
1905
1262
  required: ["subcommand"],
1906
1263
  optional: [
@@ -1939,10 +1296,13 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1939
1296
  "test",
1940
1297
  "doc",
1941
1298
  "decisionText",
1299
+ "decision",
1942
1300
  "decisionRationale",
1943
1301
  "decisionEvidence",
1944
1302
  "discoveryText",
1303
+ "discovery",
1945
1304
  "validationText",
1305
+ "validation",
1946
1306
  "validationCommand",
1947
1307
  "validationExpected",
1948
1308
  "depth",
@@ -1960,7 +1320,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1960
1320
  "update-many": { optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS },
1961
1321
  normalize: { optional: NORMALIZE_CONTRACT_PARAMETER_KEYS },
1962
1322
  close: { required: ["id", "text"], optional: ["validateClose", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
1963
- delete: { required: ["id"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
1323
+ delete: { required: ["id"], optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
1964
1324
  append: { required: ["id", "body"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
1965
1325
  comments: {
1966
1326
  required: ["id"],
@@ -2085,6 +1445,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
2085
1445
  "noRefresh",
2086
1446
  "refreshVectors",
2087
1447
  "verboseStaleItems",
1448
+ "summary",
2088
1449
  "skipVectors",
2089
1450
  "skipIntegrity",
2090
1451
  "skipDrift",
@@ -2103,6 +1464,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
2103
1464
  "scanMode",
2104
1465
  "includePmInternals",
2105
1466
  "verboseFileLists",
1467
+ "verboseDiagnostics",
2106
1468
  "strictExit",
2107
1469
  "failOnWarn",
2108
1470
  "checkHistoryDrift",
@@ -2119,531 +1481,6 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
2119
1481
  "close-task": { required: ["id", "text"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
2120
1482
  };
2121
1483
  export const PM_TOOL_ACTION_PARAMETER_CONTRACTS = Object.freeze(Object.fromEntries(PM_TOOL_ACTIONS.map((action) => [action, PM_TOOL_ACTION_SCHEMA_CONTRACTS[action]])));
2122
- const PM_TOOL_PARAMETER_METADATA = {
2123
- action: {
2124
- description: "Tool action to execute.",
2125
- },
2126
- path: {
2127
- description: "Optional PM data root override for this invocation.",
2128
- examples: [".agents/pm"],
2129
- },
2130
- scope: {
2131
- description: "Scope selector for commands that operate on project or global state. Linked files, docs, and tests default to project scope when omitted.",
2132
- examples: ["project", "global"],
2133
- },
2134
- detail: {
2135
- description: "Detail mode for commands that support concise and deep diagnostics.",
2136
- examples: ["summary", "deep"],
2137
- },
2138
- trace: {
2139
- description: "When true for extension-doctor, include actionable registration traces in deep diagnostics.",
2140
- },
2141
- reload: {
2142
- description: "When true for extension action payloads, trigger cache-busted extension module reload.",
2143
- },
2144
- watch: {
2145
- description: "When true for extension-reload/extension action payloads, enable watch mode semantics.",
2146
- },
2147
- runtimeProbe: {
2148
- description: "When true for extension-manage, run a doctor-like runtime activation probe for parity fields.",
2149
- },
2150
- fixManagedState: {
2151
- description: "When true for extension-manage/extension-doctor, adopt unmanaged extensions before diagnostics/update checks.",
2152
- },
2153
- target: {
2154
- description: "Positional target argument for the selected action (ID, source, package source, or extension name).",
2155
- examples: ["pm-a1b2", ".agents/pm/extensions/sample", "sample-extension"],
2156
- },
2157
- github: {
2158
- description: "GitHub shorthand owner/repo[/path] source for package/extension install actions.",
2159
- examples: ["org/repo/extensions/sample"],
2160
- },
2161
- ref: {
2162
- description: "Git ref/branch/tag used when installing from GitHub shorthand/URL sources.",
2163
- examples: ["main", "v1.0.0"],
2164
- },
2165
- cliOnly: {
2166
- description: "Restrict upgrade to the pm CLI/SDK npm package.",
2167
- },
2168
- packagesOnly: {
2169
- description: "Restrict upgrade to managed installable pm packages.",
2170
- },
2171
- repair: {
2172
- description: "Force npm global reinstall semantics when upgrading the pm CLI/SDK.",
2173
- },
2174
- tag: {
2175
- description: "npm version or dist-tag used for CLI and registry package upgrades.",
2176
- examples: ["latest", "next", "2026.5.11"],
2177
- },
2178
- packageName: {
2179
- description: "Override the pm CLI package name for self-upgrade automation and tests.",
2180
- examples: ["@unbrained/pm-cli"],
2181
- },
2182
- json: {
2183
- description: "Emit machine-readable JSON output.",
2184
- },
2185
- quiet: {
2186
- description: "Suppress stdout payload output.",
2187
- },
2188
- noExtensions: {
2189
- description: "Disable extension loading for this invocation.",
2190
- },
2191
- noPager: {
2192
- description: "Disable pager integration for help and long output.",
2193
- },
2194
- profile: {
2195
- description: "Emit deterministic timing diagnostics to stderr.",
2196
- },
2197
- timeoutMs: {
2198
- description: "Tool execution timeout in milliseconds.",
2199
- examples: [120000],
2200
- },
2201
- id: {
2202
- description: "Item identifier for read or mutation actions.",
2203
- examples: ["pm-a1b2"],
2204
- },
2205
- runId: {
2206
- description: "Background test run identifier.",
2207
- examples: ["tr-kq9x3f-93acde"],
2208
- },
2209
- title: {
2210
- description: "Item title text.",
2211
- },
2212
- description: {
2213
- description: "Item description text.",
2214
- },
2215
- type: {
2216
- description: "Item type name from the active runtime type registry.",
2217
- examples: ["Task", "Feature"],
2218
- },
2219
- preset: {
2220
- description: "Governance preset for initialization flows.",
2221
- examples: ["minimal", "default", "strict"],
2222
- },
2223
- defaults: {
2224
- description: "Use non-interactive setup defaults during initialization.",
2225
- },
2226
- agentGuidance: {
2227
- description: "Control AGENTS.md/CLAUDE.md guidance behavior during init: ask, add, skip, or status.",
2228
- examples: ["ask", "add", "skip", "status"],
2229
- },
2230
- withPackages: {
2231
- description: "Install all bundled first-party pm packages during initialization.",
2232
- },
2233
- createMode: {
2234
- description: "Create required-option policy mode.",
2235
- examples: ["strict", "progressive"],
2236
- },
2237
- schedulePreset: {
2238
- description: "Schedule-centric create preset for Reminder, Meeting, and Event types.",
2239
- examples: ["lightweight"],
2240
- },
2241
- status: {
2242
- description: "Item status value.",
2243
- examples: ["open", "in_progress"],
2244
- },
2245
- priority: {
2246
- description: "Priority value in range 0..4.",
2247
- examples: [0, 1, "2"],
2248
- },
2249
- order: {
2250
- description: "Planning order/rank value for create/update, or sort direction (asc|desc) for list-family sorting.",
2251
- examples: [0, 1, "2", "asc", "desc"],
2252
- },
2253
- sort: {
2254
- description: "List-family sort field selector.",
2255
- examples: ["priority", "deadline", "updated_at", "created_at", "title", "parent"],
2256
- },
2257
- tags: {
2258
- description: "Comma-delimited tag list.",
2259
- examples: ["pm-cli,agent-ux"],
2260
- },
2261
- deadline: {
2262
- description: "ISO/date timestamp or relative offset (+6h/+1d/+2w/+6m).",
2263
- examples: ["2026-04-01T00:00:00.000Z", "+1d"],
2264
- },
2265
- estimate: {
2266
- description: "Estimated effort in minutes.",
2267
- examples: [60, "120"],
2268
- },
2269
- acceptanceCriteria: {
2270
- description: "Acceptance criteria text.",
2271
- },
2272
- author: {
2273
- description: "Mutation author identity.",
2274
- examples: ["codex-agent"],
2275
- },
2276
- message: {
2277
- description: "History message for mutation audit trail.",
2278
- },
2279
- assignee: {
2280
- description: "Assignee identity.",
2281
- examples: ["codex-agent"],
2282
- },
2283
- assigneeFilter: {
2284
- description: "Assignee presence selector for list/calendar/context/comments-audit filters.",
2285
- examples: ["assigned", "unassigned"],
2286
- },
2287
- parent: {
2288
- description: "Parent item ID filter for hierarchical list queries.",
2289
- examples: ["pm-epic01"],
2290
- },
2291
- unset: {
2292
- description: "Repeatable list of front-matter fields to clear explicitly during create/update mutations.",
2293
- examples: [["deadline", "assignee"], ["close-reason"]],
2294
- },
2295
- clearDeps: {
2296
- description: "When true, clear linked dependencies.",
2297
- },
2298
- replaceDeps: {
2299
- description: "When true for update, atomically replace dependencies with the supplied --dep values.",
2300
- },
2301
- replaceTests: {
2302
- description: "When true for update, atomically replace linked tests with the supplied --test values.",
2303
- },
2304
- clearComments: {
2305
- description: "When true, clear item comments.",
2306
- },
2307
- clearNotes: {
2308
- description: "When true, clear item notes.",
2309
- },
2310
- clearLearnings: {
2311
- description: "When true, clear item learnings.",
2312
- },
2313
- clearFiles: {
2314
- description: "When true, clear linked files.",
2315
- },
2316
- clearTests: {
2317
- description: "When true, clear linked tests.",
2318
- },
2319
- clearDocs: {
2320
- description: "When true, clear linked docs.",
2321
- },
2322
- clearReminders: {
2323
- description: "When true, clear reminders.",
2324
- },
2325
- clearEvents: {
2326
- description: "When true, clear events.",
2327
- },
2328
- clearTypeOptions: {
2329
- description: "When true, clear type option metadata.",
2330
- },
2331
- clearCriteria: {
2332
- description: "When true for config set criteria-list keys (definition-of-done, metadata-required-fields, lifecycle pattern lists), clear the criteria list.",
2333
- },
2334
- mode: {
2335
- description: "Mode selector for search/reindex (keyword|semantic|hybrid) and dedupe-audit (title_exact|title_fuzzy|parent_scope).",
2336
- examples: ["keyword", "hybrid", "title_exact"],
2337
- },
2338
- op: {
2339
- description: "History operation filter for activity output.",
2340
- examples: ["create", "update", "close", "update_audit"],
2341
- },
2342
- fullPeriod: {
2343
- description: "For day/week/month calendar views, include the full anchored period instead of clipping the start to now.",
2344
- },
2345
- progress: {
2346
- description: "Emit progress diagnostics to stderr for long-running operations.",
2347
- },
2348
- background: {
2349
- description: "Run linked tests in managed background mode.",
2350
- },
2351
- envSet: {
2352
- description: "Repeatable runtime environment KEY=VALUE overrides for linked-test execution.",
2353
- examples: [["PORT=0", "PLAYWRIGHT_HTML_OPEN=never"]],
2354
- },
2355
- envClear: {
2356
- description: "Repeatable runtime environment variable names to clear before linked-test execution.",
2357
- examples: [["PLAYWRIGHT_BASE_URL"]],
2358
- },
2359
- sharedHostSafe: {
2360
- description: "Apply additive shared-host-safe runtime defaults during linked-test execution.",
2361
- },
2362
- pmContext: {
2363
- 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).",
2364
- examples: ["schema", "tracker", "auto"],
2365
- },
2366
- overrideLinkedPmContext: {
2367
- description: "Force run-level --pm-context to override per-linked-test pm_context_mode metadata for all linked-test entries.",
2368
- },
2369
- failOnContextMismatch: {
2370
- description: "Fail linked PM command runs when source and sandbox tracker item counts differ.",
2371
- },
2372
- failOnSkipped: {
2373
- description: "Treat skipped linked tests as dependency-failed policy violations.",
2374
- },
2375
- failOnEmptyTestRun: {
2376
- description: "Treat successful linked-test commands that report zero executed tests as failures.",
2377
- },
2378
- requireAssertionsForPm: {
2379
- description: "Require assertion metadata for linked PM command test entries during run execution.",
2380
- },
2381
- checkContext: {
2382
- description: "Run linked PM command context preflight diagnostics before command execution.",
2383
- },
2384
- autoPmContext: {
2385
- description: "Auto-remediate PM tracker-read linked commands by routing those entries through tracker context regardless of linked-test pm_context_mode overrides.",
2386
- },
2387
- dryRun: {
2388
- description: "Preview command effects without mutating storage artifacts.",
2389
- },
2390
- gcScope: {
2391
- description: "Repeatable gc scope selector values (index, embeddings, runtime).",
2392
- examples: [["index", "embeddings"], ["runtime"]],
2393
- },
2394
- offset: {
2395
- description: "Number of matching rows to skip before limit is applied.",
2396
- examples: [0, 50, "100"],
2397
- },
2398
- limitItems: {
2399
- description: "Maximum number of filtered items to include in comments-audit output (alias: --limit).",
2400
- examples: [10, "25"],
2401
- },
2402
- fullHistory: {
2403
- description: "When true for comments-audit, export full per-item comment history rows; cannot be combined with latest.",
2404
- },
2405
- latest: {
2406
- description: "Number of most recent comments to include per item in comments-audit output (use 0 for summary-only item rows).",
2407
- examples: [0, 1, "3"],
2408
- },
2409
- literal: {
2410
- description: "Repeatable literal matcher used by history-redact to scrub exact string values.",
2411
- examples: ["[redacted_path_prefix]/private/path"],
2412
- },
2413
- regex: {
2414
- description: "Repeatable regex matcher used by history-redact. Accepts either /pattern/flags or a raw pattern (global mode is auto-enabled).",
2415
- examples: ["/192\\\\.168\\\\.[0-9.]+/g", "token=[A-Za-z0-9_-]+"],
2416
- },
2417
- replacement: {
2418
- description: 'Replacement text used by history-redact (defaults to "[redacted]").',
2419
- examples: ["[scrubbed_path]"],
2420
- },
2421
- validateClose: {
2422
- description: 'Close-time metadata validation mode ("off", "warn", or "strict").',
2423
- examples: ["off", "warn", "strict"],
2424
- },
2425
- checkMetadata: {
2426
- description: "Run metadata completeness checks.",
2427
- },
2428
- metadataProfile: {
2429
- description: "Select metadata validation profile for --check-metadata.",
2430
- examples: ["core", "strict", "custom"],
2431
- },
2432
- checkResolution: {
2433
- description: "Run closed-item resolution metadata checks.",
2434
- },
2435
- checkLifecycle: {
2436
- description: "Run active-item lifecycle governance drift checks.",
2437
- },
2438
- checkStaleBlockers: {
2439
- description: "Include stale blocker-pattern diagnostics in lifecycle checks.",
2440
- },
2441
- dependencyCycleSeverity: {
2442
- description: "Set dependency-cycle warning policy for lifecycle checks.",
2443
- examples: ["off", "warn", "error"],
2444
- },
2445
- checkFiles: {
2446
- description: "Run linked-file and orphaned-file checks.",
2447
- },
2448
- strictDirectories: {
2449
- description: "Treat optional item-type directories as required health failures.",
2450
- },
2451
- checkOnly: {
2452
- description: "For health action, run read-only diagnostics without refreshing vectors.",
2453
- },
2454
- checkTelemetry: {
2455
- description: "For health action, probe telemetry endpoint health and include network diagnostics.",
2456
- },
2457
- noRefresh: {
2458
- description: "For health action, skip vector refresh while still running checks.",
2459
- },
2460
- refreshVectors: {
2461
- description: "For health action, explicitly refresh stale vectors.",
2462
- },
2463
- verboseStaleItems: {
2464
- description: "For health action, include full stale-item arrays in vectorization details.",
2465
- },
2466
- skipVectors: {
2467
- description: "For health action, skip vectorization checks for a faster diagnostic run.",
2468
- },
2469
- skipIntegrity: {
2470
- description: "For health action, skip item/history file integrity checks for a faster diagnostic run.",
2471
- },
2472
- skipDrift: {
2473
- description: "For health action, skip history drift hash checks for a faster diagnostic run.",
2474
- },
2475
- scanMode: {
2476
- description: "Select file candidate scan mode for --check-files.",
2477
- examples: ["default", "tracked-all", "tracked-all-strict"],
2478
- },
2479
- includePmInternals: {
2480
- description: "Include PM storage internals in tracked-all candidate scans.",
2481
- },
2482
- verboseFileLists: {
2483
- description: "For validate action, include full file-path lists for --check-files details.",
2484
- },
2485
- strictExit: {
2486
- description: "Return non-zero exit when health/validate/extension-doctor warnings are present (ok=false).",
2487
- },
2488
- failOnWarn: {
2489
- description: "Alias for strictExit in health/validate/extension-doctor action payloads.",
2490
- },
2491
- checkHistoryDrift: {
2492
- description: "Run item/history hash drift checks.",
2493
- },
2494
- checkCommandReferences: {
2495
- description: "Run linked-command PM-ID reference checks.",
2496
- },
2497
- allowAuditNote: {
2498
- description: "For notes action, allow non-owner append-only note audits without requiring --force.",
2499
- },
2500
- allowAuditLearning: {
2501
- description: "For learnings action, allow non-owner append-only learning audits without requiring --force.",
2502
- },
2503
- allowAuditComment: {
2504
- description: "For comments action, allow non-owner append-only comment audits without requiring --force.",
2505
- },
2506
- stdin: {
2507
- description: "When true for comments action, read comment text from piped stdin (supports multiline markdown).",
2508
- },
2509
- file: {
2510
- description: "Path to input file for actions that read payload text, such as comments --file.",
2511
- examples: ["notes/comment.md"],
2512
- },
2513
- allowAuditUpdate: {
2514
- description: "Allow non-owner metadata-only update audits without requiring --force.",
2515
- },
2516
- allowAuditDepUpdate: {
2517
- description: "Allow non-owner append-only dependency update audits without requiring --force.",
2518
- },
2519
- allowAuditRelease: {
2520
- description: "Allow non-owner release handoffs that clear assignee metadata without requiring --force.",
2521
- },
2522
- preserveSourceIds: {
2523
- description: "Preserve explicit source IDs during Beads imports instead of normalizing to tracker prefix.",
2524
- examples: [true],
2525
- },
2526
- appendStable: {
2527
- description: "When true for files action, preserve existing linked-file order and append new links without full-array resorting.",
2528
- },
2529
- discover: {
2530
- description: "When true for files action, use `pm files discover <id>` to scan item text for referenced file paths.",
2531
- },
2532
- apply: {
2533
- description: "When true for files discovery, add missing discovered file links instead of returning a dry-run preview.",
2534
- },
2535
- discoveryNote: {
2536
- description: "Note attached to file links added by files discovery.",
2537
- examples: ["discovered from item text"],
2538
- },
2539
- stream: {
2540
- description: "Stream selector: test-runs logs accepts stdout|stderr|both; activity accepts boolean/rows|ndjson|jsonl for line-delimited output.",
2541
- examples: ["stderr", "stdout", "both", "rows", "ndjson", "jsonl", true],
2542
- },
2543
- tail: {
2544
- description: "Number of lines to tail for background run logs.",
2545
- examples: [100],
2546
- },
2547
- query: {
2548
- description: "Search query text for search action.",
2549
- },
2550
- keywords: {
2551
- description: "Alias for query in search action payloads.",
2552
- },
2553
- includeLinked: {
2554
- description: "Include readable linked docs/files/tests content in keyword and hybrid lexical scoring.",
2555
- },
2556
- titleExact: {
2557
- description: "For search action, require exact normalized title match for the full query string.",
2558
- },
2559
- phraseExact: {
2560
- description: "For search action, require exact normalized query phrase match in item text fields.",
2561
- },
2562
- includeBody: {
2563
- description: "When true for list-family actions, include item body text in projected rows.",
2564
- },
2565
- compact: {
2566
- description: "Render compact projection output for search and list-family actions.",
2567
- },
2568
- full: {
2569
- description: "Render full nested search hit payload output.",
2570
- },
2571
- fields: {
2572
- description: "Comma-separated projection fields for get, search, or list-family outputs.",
2573
- examples: ["id,title,status,parent,type", "id,title,score,matched_fields"],
2574
- },
2575
- groupBy: {
2576
- description: "Comma-separated aggregate grouping fields (supported: parent,type,priority,status,assignee,tags,sprint,release).",
2577
- examples: ["parent,type", "type,status", "priority,assignee", "tags", "sprint,release"],
2578
- },
2579
- count: {
2580
- description: "Enable grouped count output for aggregate action.",
2581
- },
2582
- includeUnparented: {
2583
- description: "Include unparented rows when aggregate grouping includes parent.",
2584
- },
2585
- maxDepth: {
2586
- description: "Maximum dependency traversal depth for deps action (0 keeps only the root node).",
2587
- examples: [0, 1, "2"],
2588
- },
2589
- collapse: {
2590
- description: 'Dependency tree collapse mode for deps action ("none" or "repeated").',
2591
- examples: ["none", "repeated"],
2592
- },
2593
- summary: {
2594
- description: "When true for deps action, return counts only without full tree/graph payloads.",
2595
- },
2596
- threshold: {
2597
- description: "Dedupe-audit fuzzy title similarity threshold between 0 and 1.",
2598
- examples: [0.5, "0.75"],
2599
- },
2600
- shell: {
2601
- description: "Shell target for completion generation.",
2602
- examples: ["bash"],
2603
- },
2604
- eagerTags: {
2605
- description: "When true for completion, eagerly embed current tracker tags into generated scripts (legacy mode).",
2606
- },
2607
- contractAction: {
2608
- description: "Filter contracts schema to one tool action.",
2609
- examples: ["create", "update"],
2610
- },
2611
- command: {
2612
- description: "Scope contracts output to one CLI command name; action/schema surfaces narrow by default.",
2613
- examples: ["create", "search", "list"],
2614
- },
2615
- schemaOnly: {
2616
- description: "When true, contracts action returns schema-focused payloads (mutually exclusive with flagsOnly/availabilityOnly).",
2617
- },
2618
- flagsOnly: {
2619
- description: "When true, contracts action returns only command flag surface payloads (mutually exclusive projection mode).",
2620
- },
2621
- availabilityOnly: {
2622
- description: "When true, contracts action returns only action availability payloads (mutually exclusive projection mode).",
2623
- },
2624
- runtimeOnly: {
2625
- description: "When true, contracts action only includes actions invocable in the current runtime.",
2626
- },
2627
- activeOnly: {
2628
- description: "Alias for runtimeOnly in contracts action payloads.",
2629
- },
2630
- depth: {
2631
- description: "Context depth level controlling how many sections are included (brief=focus+agenda, standard=+hierarchy/activity/progress/workload, deep=all sections).",
2632
- examples: ["brief", "standard", "deep"],
2633
- },
2634
- section: {
2635
- description: "Repeatable section selector for context; overrides --depth when provided.",
2636
- examples: [["hierarchy", "activity"], ["blockers", "files", "staleness"]],
2637
- },
2638
- activityLimit: {
2639
- description: "Maximum number of recent activity entries to include in context output.",
2640
- examples: [5, 10, "20"],
2641
- },
2642
- staleThreshold: {
2643
- description: "Staleness cutoff in days for context staleness section (e.g. 7 or 7d).",
2644
- examples: ["7", "14d", "30"],
2645
- },
2646
- };
2647
1484
  function fallbackToolParameterDescription(key) {
2648
1485
  return key
2649
1486
  .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
@@ -2661,6 +1498,27 @@ function decorateToolParameterDefinition(key, definition) {
2661
1498
  ...(metadata?.examples ? { examples: metadata.examples } : {}),
2662
1499
  };
2663
1500
  }
1501
+ function actionScopedToolParameterMetadata(action, key) {
1502
+ if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_METADATA, key)) {
1503
+ return PLAN_ACTION_PARAMETER_METADATA[key];
1504
+ }
1505
+ return PM_TOOL_PARAMETER_METADATA[key];
1506
+ }
1507
+ function decorateActionScopedToolParameterDefinition(action, key, definition) {
1508
+ const baseDefinition = typeof definition === "object" && definition !== null ? { ...definition } : {};
1509
+ const metadata = actionScopedToolParameterMetadata(action, key);
1510
+ return {
1511
+ ...baseDefinition,
1512
+ description: metadata?.description ?? fallbackToolParameterDescription(key),
1513
+ ...(metadata?.examples ? { examples: metadata.examples } : {}),
1514
+ };
1515
+ }
1516
+ function actionScopedToolParameterDefinition(action, key) {
1517
+ if (action === "plan" && Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_PROPERTIES, key)) {
1518
+ return PLAN_ACTION_PARAMETER_PROPERTIES[key];
1519
+ }
1520
+ return PM_TOOL_PARAMETER_PROPERTIES[key];
1521
+ }
2664
1522
  function buildActionScopedToolSchema(action) {
2665
1523
  const contract = PM_TOOL_ACTION_SCHEMA_CONTRACTS[action];
2666
1524
  const required = toSchemaKeyList(contract.required ?? []);
@@ -2676,9 +1534,9 @@ function buildActionScopedToolSchema(action) {
2676
1534
  if (key === "action") {
2677
1535
  continue;
2678
1536
  }
2679
- const definition = PM_TOOL_PARAMETER_PROPERTIES[key];
1537
+ const definition = actionScopedToolParameterDefinition(action, key);
2680
1538
  if (definition) {
2681
- properties[key] = decorateToolParameterDefinition(key, definition);
1539
+ properties[key] = decorateActionScopedToolParameterDefinition(action, key, definition);
2682
1540
  }
2683
1541
  }
2684
1542
  const schema = {
@@ -2749,4 +1607,4 @@ function buildProviderCompatibleToolSchema() {
2749
1607
  }
2750
1608
  export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = buildProviderCompatibleToolSchema();
2751
1609
  //# sourceMappingURL=cli-contracts.js.map
2752
- //# debugId=4e7e9e79-ece5-54e2-883e-5ef16db5152b
1610
+ //# debugId=b61aadc4-20d4-50e8-83f0-095c541132f2