@unbrained/pm-cli 2026.6.11 → 2026.6.12

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 (180) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cli/commands/completion.js +20 -8
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/create.js +6 -3
  5. package/dist/cli/commands/create.js.map +1 -1
  6. package/dist/cli/commands/docs.d.ts +2 -0
  7. package/dist/cli/commands/docs.js +2 -2
  8. package/dist/cli/commands/docs.js.map +1 -1
  9. package/dist/cli/commands/files.d.ts +2 -0
  10. package/dist/cli/commands/files.js +2 -2
  11. package/dist/cli/commands/files.js.map +1 -1
  12. package/dist/cli/commands/health.d.ts +1 -1
  13. package/dist/cli/commands/health.js +77 -2
  14. package/dist/cli/commands/health.js.map +1 -1
  15. package/dist/cli/commands/history-repair.d.ts +36 -0
  16. package/dist/cli/commands/history-repair.js +68 -3
  17. package/dist/cli/commands/history-repair.js.map +1 -1
  18. package/dist/cli/commands/index.d.ts +1 -1
  19. package/dist/cli/commands/index.js +3 -3
  20. package/dist/cli/commands/index.js.map +1 -1
  21. package/dist/cli/commands/linked-artifacts.d.ts +18 -0
  22. package/dist/cli/commands/linked-artifacts.js +26 -3
  23. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  24. package/dist/cli/commands/plan.d.ts +6 -0
  25. package/dist/cli/commands/plan.js +93 -32
  26. package/dist/cli/commands/plan.js.map +1 -1
  27. package/dist/cli/commands/validate.d.ts +20 -0
  28. package/dist/cli/commands/validate.js +292 -28
  29. package/dist/cli/commands/validate.js.map +1 -1
  30. package/dist/cli/help-content.js +7 -3
  31. package/dist/cli/help-content.js.map +1 -1
  32. package/dist/cli/register-mutation.js +47 -16
  33. package/dist/cli/register-mutation.js.map +1 -1
  34. package/dist/cli/register-operations.js +10 -2
  35. package/dist/cli/register-operations.js.map +1 -1
  36. package/dist/cli/register-setup.js +16 -16
  37. package/dist/cli/register-setup.js.map +1 -1
  38. package/dist/cli-bundle/chunks/{chunk-P2PSODAQ.js → chunk-35P4GT6E.js} +110 -9
  39. package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +7 -0
  40. package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js → chunk-37CYVF73.js} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js → chunk-7AMK6DOW.js} +4 -4
  42. package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js.map → chunk-7AMK6DOW.js.map} +1 -1
  43. package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js → chunk-AX4GEVQC.js} +3 -3
  44. package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js.map → chunk-AX4GEVQC.js.map} +2 -2
  45. package/dist/cli-bundle/chunks/chunk-C6SAP27O.js +187 -0
  46. package/dist/cli-bundle/chunks/chunk-C6SAP27O.js.map +1 -0
  47. package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js +217 -0
  48. package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js.map +1 -0
  49. package/dist/cli-bundle/chunks/{chunk-PSD7F7DX.js → chunk-KBPQHXWG.js} +17 -4
  50. package/dist/cli-bundle/chunks/chunk-KBPQHXWG.js.map +1 -0
  51. package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js → chunk-L5EPZQIC.js} +2 -2
  52. package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js +220 -0
  53. package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js.map +7 -0
  54. package/dist/cli-bundle/chunks/{chunk-UOO6BYIA.js → chunk-PNYAAB4S.js} +21 -188
  55. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +1 -0
  56. package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js +190 -0
  57. package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js.map +7 -0
  58. package/dist/cli-bundle/chunks/{chunk-LCSCXBGT.js → chunk-R4VWYWRN.js} +19 -193
  59. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +7 -0
  60. package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js → chunk-SO55HRA5.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-FXRU333M.js → chunk-UIG4TW2H.js} +110 -9
  62. package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +1 -0
  63. package/dist/cli-bundle/chunks/{chunk-E5DUIJA4.js → chunk-WPDMBIX6.js} +16 -3
  64. package/dist/cli-bundle/chunks/chunk-WPDMBIX6.js.map +7 -0
  65. package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js → chunk-XWMF3POR.js} +2 -2
  66. package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js → contracts-2G66IGIA.js} +2 -2
  67. package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js → contracts-PJCHYSO5.js} +2 -2
  68. package/dist/cli-bundle/chunks/{create-IFA26O2I.js → create-5433DP3G.js} +2 -2
  69. package/dist/cli-bundle/chunks/{create-JVXYHYH4.js → create-VWLWS34Z.js} +2 -2
  70. package/dist/cli-bundle/chunks/{docs-5WMBVQT2.js → docs-I3BAF5WH.js} +4 -4
  71. package/dist/cli-bundle/chunks/docs-I3BAF5WH.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{docs-MB53UJAJ.js → docs-MXLGZUIT.js} +3 -3
  73. package/dist/cli-bundle/chunks/docs-MXLGZUIT.js.map +7 -0
  74. package/dist/cli-bundle/chunks/{files-GVMNVLCB.js → files-FYP3MDPX.js} +3 -3
  75. package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +7 -0
  76. package/dist/cli-bundle/chunks/{files-DLB5LJEP.js → files-GUXUM2MB.js} +4 -4
  77. package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{gc-2WEPW6D6.js → gc-FENB2ESG.js} +12 -174
  79. package/dist/cli-bundle/chunks/gc-FENB2ESG.js.map +1 -0
  80. package/dist/cli-bundle/chunks/{gc-4Z3IKHAZ.js → gc-KGQG66SA.js} +10 -179
  81. package/dist/cli-bundle/chunks/gc-KGQG66SA.js.map +7 -0
  82. package/dist/cli-bundle/chunks/{health-YO5LRWN4.js → health-7MTXAVR2.js} +71 -4
  83. package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +7 -0
  84. package/dist/cli-bundle/chunks/{health-4ZYB3IYQ.js → health-E4D7KGHD.js} +72 -5
  85. package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +1 -0
  86. package/dist/cli-bundle/chunks/{history-repair-KVPFJKOS.js → history-repair-OSQOKJ3E.js} +61 -3
  87. package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +7 -0
  88. package/dist/cli-bundle/chunks/{history-repair-RUGKD3YR.js → history-repair-SBK7P34V.js} +62 -4
  89. package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +1 -0
  90. package/dist/cli-bundle/chunks/{plan-VNUG3WZZ.js → plan-2YTQYWGM.js} +52 -12
  91. package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +1 -0
  92. package/dist/cli-bundle/chunks/{plan-FQLMJRLZ.js → plan-7IVSICR6.js} +51 -11
  93. package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +7 -0
  94. package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js → register-list-query-4UPMHONX.js} +3 -3
  95. package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js → register-list-query-7VOW2C3W.js} +3 -3
  96. package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js → register-mutation-FARSGYRD.js} +43 -26
  97. package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js.map → register-mutation-FARSGYRD.js.map} +2 -2
  98. package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js → register-mutation-LJDNVREU.js} +44 -27
  99. package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js.map → register-mutation-LJDNVREU.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{register-operations-AM6KTWB6.js → register-operations-FFTYAL42.js} +17 -13
  101. package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +1 -0
  102. package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js → register-operations-HCJKDUA6.js} +16 -12
  103. package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js.map → register-operations-HCJKDUA6.js.map} +2 -2
  104. package/dist/cli-bundle/chunks/{register-setup-IKX5524L.js → register-setup-6AVIUOCC.js} +19 -19
  105. package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +1 -0
  106. package/dist/cli-bundle/chunks/{register-setup-G4QYI3RX.js → register-setup-KVNLO5OJ.js} +18 -18
  107. package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +7 -0
  108. package/dist/cli-bundle/chunks/{update-2EVXOC7V.js → update-36JM7YZT.js} +3 -3
  109. package/dist/cli-bundle/chunks/{update-5A2B6QYB.js → update-I246PCLO.js} +3 -3
  110. package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js → update-many-F4IKDWZB.js} +3 -3
  111. package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js → update-many-NTWZ5YT3.js} +3 -3
  112. package/dist/cli-bundle/chunks/{validate-EQTT6WVX.js → validate-46KCRHL7.js} +448 -36
  113. package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{validate-XN4I4DPL.js → validate-CRFMPTYD.js} +468 -35
  115. package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +7 -0
  116. package/dist/cli-bundle/main.js +24 -10
  117. package/dist/cli-bundle/main.js.map +2 -2
  118. package/dist/core/diagnostics/remediation.js +19 -6
  119. package/dist/core/diagnostics/remediation.js.map +1 -1
  120. package/dist/core/lock/lock-gc.d.ts +31 -0
  121. package/dist/core/lock/lock-gc.js +120 -62
  122. package/dist/core/lock/lock-gc.js.map +1 -1
  123. package/dist/core/telemetry/consent.js +18 -3
  124. package/dist/core/telemetry/consent.js.map +1 -1
  125. package/dist/core/validate/fix-planning.d.ts +130 -0
  126. package/dist/core/validate/fix-planning.js +202 -0
  127. package/dist/core/validate/fix-planning.js.map +1 -0
  128. package/dist/core/validate/missing-by-type.d.ts +21 -0
  129. package/dist/core/validate/missing-by-type.js +39 -0
  130. package/dist/core/validate/missing-by-type.js.map +1 -0
  131. package/dist/core/validate/stale-file-classification.d.ts +41 -0
  132. package/dist/core/validate/stale-file-classification.js +73 -0
  133. package/dist/core/validate/stale-file-classification.js.map +1 -0
  134. package/dist/mcp/server.js +41 -8
  135. package/dist/mcp/server.js.map +1 -1
  136. package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
  137. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  138. package/dist/sdk/cli-contracts.d.ts +6 -1
  139. package/dist/sdk/cli-contracts.js +74 -7
  140. package/dist/sdk/cli-contracts.js.map +1 -1
  141. package/docs/AGENT_GUIDE.md +6 -1
  142. package/docs/COMMANDS.md +23 -1
  143. package/package.json +1 -1
  144. package/dist/cli-bundle/chunks/chunk-E5DUIJA4.js.map +0 -7
  145. package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +0 -1
  146. package/dist/cli-bundle/chunks/chunk-LCSCXBGT.js.map +0 -7
  147. package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +0 -7
  148. package/dist/cli-bundle/chunks/chunk-PSD7F7DX.js.map +0 -1
  149. package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +0 -1
  150. package/dist/cli-bundle/chunks/docs-5WMBVQT2.js.map +0 -1
  151. package/dist/cli-bundle/chunks/docs-MB53UJAJ.js.map +0 -7
  152. package/dist/cli-bundle/chunks/files-DLB5LJEP.js.map +0 -1
  153. package/dist/cli-bundle/chunks/files-GVMNVLCB.js.map +0 -7
  154. package/dist/cli-bundle/chunks/gc-2WEPW6D6.js.map +0 -1
  155. package/dist/cli-bundle/chunks/gc-4Z3IKHAZ.js.map +0 -7
  156. package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +0 -1
  157. package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +0 -7
  158. package/dist/cli-bundle/chunks/history-repair-KVPFJKOS.js.map +0 -7
  159. package/dist/cli-bundle/chunks/history-repair-RUGKD3YR.js.map +0 -1
  160. package/dist/cli-bundle/chunks/plan-FQLMJRLZ.js.map +0 -7
  161. package/dist/cli-bundle/chunks/plan-VNUG3WZZ.js.map +0 -1
  162. package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +0 -1
  163. package/dist/cli-bundle/chunks/register-setup-G4QYI3RX.js.map +0 -7
  164. package/dist/cli-bundle/chunks/register-setup-IKX5524L.js.map +0 -1
  165. package/dist/cli-bundle/chunks/validate-EQTT6WVX.js.map +0 -1
  166. package/dist/cli-bundle/chunks/validate-XN4I4DPL.js.map +0 -7
  167. /package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js.map → chunk-37CYVF73.js.map} +0 -0
  168. /package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js.map → chunk-L5EPZQIC.js.map} +0 -0
  169. /package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js.map → chunk-SO55HRA5.js.map} +0 -0
  170. /package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js.map → chunk-XWMF3POR.js.map} +0 -0
  171. /package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js.map → contracts-2G66IGIA.js.map} +0 -0
  172. /package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js.map → contracts-PJCHYSO5.js.map} +0 -0
  173. /package/dist/cli-bundle/chunks/{create-IFA26O2I.js.map → create-5433DP3G.js.map} +0 -0
  174. /package/dist/cli-bundle/chunks/{create-JVXYHYH4.js.map → create-VWLWS34Z.js.map} +0 -0
  175. /package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js.map → register-list-query-4UPMHONX.js.map} +0 -0
  176. /package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js.map → register-list-query-7VOW2C3W.js.map} +0 -0
  177. /package/dist/cli-bundle/chunks/{update-2EVXOC7V.js.map → update-36JM7YZT.js.map} +0 -0
  178. /package/dist/cli-bundle/chunks/{update-5A2B6QYB.js.map → update-I246PCLO.js.map} +0 -0
  179. /package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js.map → update-many-F4IKDWZB.js.map} +0 -0
  180. /package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js.map → update-many-NTWZ5YT3.js.map} +0 -0
@@ -1,5 +1,5 @@
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]="9091cd85-ff8e-55db-b56e-c5fc84e60632")}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]="0e11d981-3bc2-5584-b783-ee213f7395ba")}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, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
4
4
  export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, } from "./cli-contracts/commander-mutation-options.js";
5
5
  // PM_* enum/guard contracts and the bulk tool-parameter property/metadata data
@@ -192,6 +192,9 @@ export const FILES_FLAG_CONTRACTS = [
192
192
  { flag: "--add-glob" },
193
193
  { flag: "--remove" },
194
194
  { flag: "--migrate" },
195
+ // GH-170 (pm-pfnx): single-value note applied to every --add/--add-glob link
196
+ // in the invocation (embedded note= wins; usage error without an add).
197
+ { flag: "--note" },
195
198
  { flag: "--list" },
196
199
  { flag: "--append-stable" },
197
200
  { flag: "--validate-paths" },
@@ -205,6 +208,9 @@ export const DOCS_FLAG_CONTRACTS = [
205
208
  { flag: "--add-glob" },
206
209
  { flag: "--remove" },
207
210
  { flag: "--migrate" },
211
+ // GH-170 (pm-pfnx): see FILES_FLAG_CONTRACTS --note.
212
+ { flag: "--note" },
213
+ { flag: "--list" },
208
214
  { flag: "--validate-paths" },
209
215
  { flag: "--audit" },
210
216
  { flag: "--author" },
@@ -229,6 +235,7 @@ export const HISTORY_REDACT_FLAG_CONTRACTS = [
229
235
  { flag: "--force" },
230
236
  ];
231
237
  export const HISTORY_REPAIR_FLAG_CONTRACTS = [
238
+ { flag: "--all" },
232
239
  { flag: "--dry-run" },
233
240
  { flag: "--author" },
234
241
  { flag: "--message" },
@@ -270,7 +277,12 @@ export const PLAN_FLAG_CONTRACTS = [
270
277
  { flag: "--body" },
271
278
  { flag: "--claim" },
272
279
  { flag: "--from-search", aliases: ["--from_search"] },
273
- { flag: "--step-title", aliases: ["--step", "--step_title"] },
280
+ { flag: "--step-title", aliases: ["--step_title"] },
281
+ // pm-6mit: --step is a Commander collect repeatable (ordered step titles on
282
+ // create; single-value stepTitle alias elsewhere). It must NOT be list:true —
283
+ // the bootstrap coalescer comma-joins list flags and would corrupt titles
284
+ // containing commas.
285
+ { flag: "--step" },
274
286
  { flag: "--step-body", aliases: ["--step_body"] },
275
287
  { flag: "--step-owner", aliases: ["--step_owner"] },
276
288
  { flag: "--step-status", aliases: ["--step_status"] },
@@ -616,6 +628,13 @@ export const VALIDATE_FLAG_CONTRACTS = [
616
628
  { flag: "--strict-exit" },
617
629
  { flag: "--fail-on-warn" },
618
630
  { flag: "--fix-hints" },
631
+ { flag: "--auto-fix" },
632
+ { flag: "--dry-run" },
633
+ // NOT list:true — repeatable via Commander's collector; the bootstrap
634
+ // coalescer must not comma-join occurrences (values may also be
635
+ // comma-separated lists which the resolver splits itself).
636
+ { flag: "--fix-scope" },
637
+ { flag: "--prune-missing" },
619
638
  { flag: "--check-history-drift" },
620
639
  { flag: "--check-command-references" },
621
640
  ];
@@ -1491,8 +1510,9 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1491
1510
  anyOfRequired: [["literal"], ["regex"]],
1492
1511
  },
1493
1512
  "history-repair": {
1494
- required: ["id"],
1495
- optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1513
+ // Exactly one of `id` (single stream) or `all` (bulk drift repair) is required.
1514
+ optional: ["id", "all", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1515
+ oneOfRequired: [["id"], ["all"]],
1496
1516
  },
1497
1517
  "history-compact": {
1498
1518
  required: ["id"],
@@ -1534,6 +1554,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1534
1554
  "claim",
1535
1555
  "fromSearch",
1536
1556
  "stepTitle",
1557
+ "step",
1537
1558
  "stepBody",
1538
1559
  "stepOwner",
1539
1560
  "stepStatus",
@@ -1613,6 +1634,10 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1613
1634
  "addGlob",
1614
1635
  "remove",
1615
1636
  "migrate",
1637
+ // GH-170 (pm-pfnx): `addNote` is the MCP spelling of the CLI --note flag
1638
+ // (the shared `note` parameter is the array-typed create/update note
1639
+ // seed, so files/docs use a distinct single-string key).
1640
+ "addNote",
1616
1641
  "discover",
1617
1642
  "apply",
1618
1643
  "discoveryNote",
@@ -1621,10 +1646,22 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1621
1646
  "audit",
1622
1647
  ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1623
1648
  ],
1649
+ dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }],
1624
1650
  },
1625
1651
  docs: {
1626
1652
  required: ["id"],
1627
- optional: ["add", "addGlob", "remove", "migrate", "validatePaths", "audit", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
1653
+ optional: [
1654
+ "add",
1655
+ "addGlob",
1656
+ "remove",
1657
+ "migrate",
1658
+ "addNote",
1659
+ "list",
1660
+ "validatePaths",
1661
+ "audit",
1662
+ ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
1663
+ ],
1664
+ dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }],
1628
1665
  },
1629
1666
  deps: { required: ["id"], optional: ["format", "maxDepth", "collapse", "summary"] },
1630
1667
  test: {
@@ -1730,6 +1767,10 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1730
1767
  "strictExit",
1731
1768
  "failOnWarn",
1732
1769
  "fixHints",
1770
+ "autoFix",
1771
+ "dryRun",
1772
+ "fixScope",
1773
+ "pruneMissing",
1733
1774
  "checkHistoryDrift",
1734
1775
  "checkCommandReferences",
1735
1776
  ],
@@ -1815,6 +1856,18 @@ function buildActionScopedToolSchema(action) {
1815
1856
  required: [...requiredFields],
1816
1857
  }));
1817
1858
  }
1859
+ if (contract.oneOfRequired && contract.oneOfRequired.length > 0) {
1860
+ schema.oneOf = contract.oneOfRequired.map((requiredFields) => {
1861
+ const otherFields = contract.oneOfRequired
1862
+ ?.flat()
1863
+ .filter((field) => !requiredFields.includes(field)) ?? [];
1864
+ return {
1865
+ required: [...requiredFields],
1866
+ ...(otherFields.length > 0 ? { not: { anyOf: otherFields.map((field) => ({ required: [field] })) } } : {}),
1867
+ ...(action === "history-repair" && requiredFields.includes("all") ? { properties: { all: { const: true } } } : {}),
1868
+ };
1869
+ });
1870
+ }
1818
1871
  if (contract.conditionalRequired && contract.conditionalRequired.length > 0) {
1819
1872
  schema.allOf = contract.conditionalRequired.map((entry) => ({
1820
1873
  if: {
@@ -1828,6 +1881,20 @@ function buildActionScopedToolSchema(action) {
1828
1881
  },
1829
1882
  }));
1830
1883
  }
1884
+ if (contract.dependentAnyOfRequired && contract.dependentAnyOfRequired.length > 0) {
1885
+ const allOf = Array.isArray(schema.allOf) ? [...schema.allOf] : [];
1886
+ for (const entry of contract.dependentAnyOfRequired) {
1887
+ allOf.push({
1888
+ if: { required: [entry.property] },
1889
+ then: {
1890
+ anyOf: entry.anyOfRequired.map((requiredFields) => ({
1891
+ required: [...requiredFields],
1892
+ })),
1893
+ },
1894
+ });
1895
+ }
1896
+ schema.allOf = allOf;
1897
+ }
1831
1898
  return schema;
1832
1899
  }
1833
1900
  // Building the full MCP tool-parameter schemas (one variant per action) is only
@@ -1860,7 +1927,7 @@ function createLazyContractSchema(build) {
1860
1927
  * the MAJOR for breaking changes — the major also drives the `$id`
1861
1928
  * `tool-parameters-v{major}` slug, so the two never drift.
1862
1929
  */
1863
- export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.2";
1930
+ export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.3";
1864
1931
  /**
1865
1932
  * Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
1866
1933
  * schema `$id` slug so a breaking version bump renames the document in lockstep.
@@ -1926,4 +1993,4 @@ function buildProviderCompatibleToolSchema() {
1926
1993
  }
1927
1994
  export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(buildProviderCompatibleToolSchema);
1928
1995
  //# sourceMappingURL=cli-contracts.js.map
1929
- //# debugId=9091cd85-ff8e-55db-b56e-c5fc84e60632
1996
+ //# debugId=0e11d981-3bc2-5584-b783-ee213f7395ba