@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]="2533bfec-8cab-58ea-acd2-3582f0f1b6bd")}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]="60d8e31c-b4ba-5c8f-b2dc-523d0a2b3b13")}catch(e){}}();
3
3
  import {
4
4
  KNOWN_EXTENSION_CAPABILITIES,
5
5
  KNOWN_EXTENSION_POLICY_MODES,
@@ -1267,6 +1267,9 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
1267
1267
  strictExit: { type: "boolean" },
1268
1268
  failOnWarn: { type: "boolean" },
1269
1269
  fixHints: { type: "boolean" },
1270
+ autoFix: { type: "boolean" },
1271
+ fixScope: { type: "array", items: { type: "string", enum: ["metadata", "resolution", "lifecycle"] } },
1272
+ pruneMissing: { type: "boolean" },
1270
1273
  checkHistoryDrift: { type: "boolean" },
1271
1274
  checkCommandReferences: { type: "boolean" },
1272
1275
  allowAuditNote: { type: "boolean" },
@@ -1276,6 +1279,7 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
1276
1279
  allowAuditDepUpdate: { type: "boolean" },
1277
1280
  allowAuditRelease: { type: "boolean" },
1278
1281
  dryRun: { type: "boolean" },
1282
+ all: { type: "boolean" },
1279
1283
  cliOnly: { type: "boolean" },
1280
1284
  packagesOnly: { type: "boolean" },
1281
1285
  repair: { type: "boolean" },
@@ -1315,6 +1319,10 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
1315
1319
  discover: { type: "boolean" },
1316
1320
  apply: { type: "boolean" },
1317
1321
  discoveryNote: { type: "string" },
1322
+ // GH-170 (pm-pfnx): single-string note for files/docs add batches (the shared
1323
+ // `note` key below is the array-typed create/update note seed).
1324
+ addNote: { type: "string" },
1325
+ list: { type: "boolean" },
1318
1326
  appendStable: { type: "boolean" },
1319
1327
  validatePaths: { type: "boolean" },
1320
1328
  audit: { type: "boolean" },
@@ -1386,6 +1394,9 @@ var PLAN_ACTION_PARAMETER_PROPERTIES = {
1386
1394
  claim: { type: "boolean" },
1387
1395
  fromSearch: { type: "string" },
1388
1396
  stepTitle: { type: "string" },
1397
+ // pm-6mit: ordered step titles for create (string or array; values are never
1398
+ // comma-split). On step subcommands a single value aliases stepTitle.
1399
+ step: { anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }] },
1389
1400
  stepBody: { type: "string" },
1390
1401
  stepOwner: { type: "string" },
1391
1402
  stepStatus: { type: "string", enum: [...PLAN_STEP_STATUS_VALUES] },
@@ -1437,6 +1448,10 @@ var PLAN_ACTION_PARAMETER_METADATA = {
1437
1448
  description: "Plan lifecycle mode.",
1438
1449
  examples: ["draft", "research", "approved"]
1439
1450
  },
1451
+ step: {
1452
+ description: "Ordered initial step titles for create (string or array, never comma-split; stepTitle, when also set, becomes the first step). For step subcommands a single value aliases stepTitle.",
1453
+ examples: [["Read the code", "Write the fix", "Run the tests"]]
1454
+ },
1440
1455
  file: {
1441
1456
  description: "File link to attach while creating or materializing a Plan.",
1442
1457
  examples: ["path=src/cli.ts,note=implementation surface"]
@@ -1771,6 +1786,9 @@ var PM_TOOL_PARAMETER_METADATA = {
1771
1786
  dryRun: {
1772
1787
  description: "Preview command effects without mutating storage artifacts."
1773
1788
  },
1789
+ all: {
1790
+ description: "For history-repair action: scan every stream for drift and repair each drifted stream in one audited pass (mutually exclusive with id)."
1791
+ },
1774
1792
  gcScope: {
1775
1793
  description: "Repeatable gc scope selector values (index, embeddings, runtime, locks).",
1776
1794
  examples: [["index", "embeddings"], ["runtime"], ["locks"]]
@@ -1885,6 +1903,16 @@ var PM_TOOL_PARAMETER_METADATA = {
1885
1903
  fixHints: {
1886
1904
  description: "For validate action, add a machine-executable fix_hints[] of pm commands to each failing check's details."
1887
1905
  },
1906
+ autoFix: {
1907
+ description: "For validate action, apply the safe, deterministic subset of fix-hint remediations (field backfills) automatically; combine with dryRun to preview and fixScope to grant gated scopes."
1908
+ },
1909
+ fixScope: {
1910
+ description: "For validate action, grant --auto-fix scopes (metadata, resolution, lifecycle). Defaults to the safe scopes metadata and resolution; lifecycle must be named explicitly.",
1911
+ examples: [["lifecycle"], ["metadata", "resolution"]]
1912
+ },
1913
+ pruneMissing: {
1914
+ description: "For validate action, remove stale linked-file/doc LINKS whose paths classified as deleted (link removal only \u2014 never touches real files); honors dryRun."
1915
+ },
1888
1916
  checkHistoryDrift: {
1889
1917
  description: "Run item/history hash drift checks."
1890
1918
  },
@@ -1933,6 +1961,14 @@ var PM_TOOL_PARAMETER_METADATA = {
1933
1961
  description: "Note attached to file links added by files discovery.",
1934
1962
  examples: ["discovered from item text"]
1935
1963
  },
1964
+ addNote: {
1965
+ description: "Note attached to every link added by add/addGlob in this call (per-entry embedded note= wins; requires add or addGlob). Maps to the CLI --note flag on pm files/pm docs.",
1966
+ examples: ["command wiring"]
1967
+ },
1968
+ list: {
1969
+ description: "When true for files/docs action, list the current linked paths without mutating them.",
1970
+ examples: [true]
1971
+ },
1936
1972
  stream: {
1937
1973
  description: "Stream selector: test-runs logs accepts stdout|stderr|both; activity accepts boolean/rows|ndjson|jsonl for line-delimited output.",
1938
1974
  examples: ["stderr", "stdout", "both", "rows", "ndjson", "jsonl", true]
@@ -2242,6 +2278,9 @@ var FILES_FLAG_CONTRACTS = [
2242
2278
  { flag: "--add-glob" },
2243
2279
  { flag: "--remove" },
2244
2280
  { flag: "--migrate" },
2281
+ // GH-170 (pm-pfnx): single-value note applied to every --add/--add-glob link
2282
+ // in the invocation (embedded note= wins; usage error without an add).
2283
+ { flag: "--note" },
2245
2284
  { flag: "--list" },
2246
2285
  { flag: "--append-stable" },
2247
2286
  { flag: "--validate-paths" },
@@ -2255,6 +2294,9 @@ var DOCS_FLAG_CONTRACTS = [
2255
2294
  { flag: "--add-glob" },
2256
2295
  { flag: "--remove" },
2257
2296
  { flag: "--migrate" },
2297
+ // GH-170 (pm-pfnx): see FILES_FLAG_CONTRACTS --note.
2298
+ { flag: "--note" },
2299
+ { flag: "--list" },
2258
2300
  { flag: "--validate-paths" },
2259
2301
  { flag: "--audit" },
2260
2302
  { flag: "--author" },
@@ -2279,6 +2321,7 @@ var HISTORY_REDACT_FLAG_CONTRACTS = [
2279
2321
  { flag: "--force" }
2280
2322
  ];
2281
2323
  var HISTORY_REPAIR_FLAG_CONTRACTS = [
2324
+ { flag: "--all" },
2282
2325
  { flag: "--dry-run" },
2283
2326
  { flag: "--author" },
2284
2327
  { flag: "--message" },
@@ -2320,7 +2363,12 @@ var PLAN_FLAG_CONTRACTS = [
2320
2363
  { flag: "--body" },
2321
2364
  { flag: "--claim" },
2322
2365
  { flag: "--from-search", aliases: ["--from_search"] },
2323
- { flag: "--step-title", aliases: ["--step", "--step_title"] },
2366
+ { flag: "--step-title", aliases: ["--step_title"] },
2367
+ // pm-6mit: --step is a Commander collect repeatable (ordered step titles on
2368
+ // create; single-value stepTitle alias elsewhere). It must NOT be list:true —
2369
+ // the bootstrap coalescer comma-joins list flags and would corrupt titles
2370
+ // containing commas.
2371
+ { flag: "--step" },
2324
2372
  { flag: "--step-body", aliases: ["--step_body"] },
2325
2373
  { flag: "--step-owner", aliases: ["--step_owner"] },
2326
2374
  { flag: "--step-status", aliases: ["--step_status"] },
@@ -2663,6 +2711,13 @@ var VALIDATE_FLAG_CONTRACTS = [
2663
2711
  { flag: "--strict-exit" },
2664
2712
  { flag: "--fail-on-warn" },
2665
2713
  { flag: "--fix-hints" },
2714
+ { flag: "--auto-fix" },
2715
+ { flag: "--dry-run" },
2716
+ // NOT list:true — repeatable via Commander's collector; the bootstrap
2717
+ // coalescer must not comma-join occurrences (values may also be
2718
+ // comma-separated lists which the resolver splits itself).
2719
+ { flag: "--fix-scope" },
2720
+ { flag: "--prune-missing" },
2666
2721
  { flag: "--check-history-drift" },
2667
2722
  { flag: "--check-command-references" }
2668
2723
  ];
@@ -3523,8 +3578,9 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3523
3578
  anyOfRequired: [["literal"], ["regex"]]
3524
3579
  },
3525
3580
  "history-repair": {
3526
- required: ["id"],
3527
- optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3581
+ // Exactly one of `id` (single stream) or `all` (bulk drift repair) is required.
3582
+ optional: ["id", "all", "dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS],
3583
+ oneOfRequired: [["id"], ["all"]]
3528
3584
  },
3529
3585
  "history-compact": {
3530
3586
  required: ["id"],
@@ -3566,6 +3622,7 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3566
3622
  "claim",
3567
3623
  "fromSearch",
3568
3624
  "stepTitle",
3625
+ "step",
3569
3626
  "stepBody",
3570
3627
  "stepOwner",
3571
3628
  "stepStatus",
@@ -3645,6 +3702,10 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3645
3702
  "addGlob",
3646
3703
  "remove",
3647
3704
  "migrate",
3705
+ // GH-170 (pm-pfnx): `addNote` is the MCP spelling of the CLI --note flag
3706
+ // (the shared `note` parameter is the array-typed create/update note
3707
+ // seed, so files/docs use a distinct single-string key).
3708
+ "addNote",
3648
3709
  "discover",
3649
3710
  "apply",
3650
3711
  "discoveryNote",
@@ -3652,11 +3713,23 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3652
3713
  "validatePaths",
3653
3714
  "audit",
3654
3715
  ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
3655
- ]
3716
+ ],
3717
+ dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }]
3656
3718
  },
3657
3719
  docs: {
3658
3720
  required: ["id"],
3659
- optional: ["add", "addGlob", "remove", "migrate", "validatePaths", "audit", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS]
3721
+ optional: [
3722
+ "add",
3723
+ "addGlob",
3724
+ "remove",
3725
+ "migrate",
3726
+ "addNote",
3727
+ "list",
3728
+ "validatePaths",
3729
+ "audit",
3730
+ ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS
3731
+ ],
3732
+ dependentAnyOfRequired: [{ property: "addNote", anyOfRequired: [["add"], ["addGlob"]] }]
3660
3733
  },
3661
3734
  deps: { required: ["id"], optional: ["format", "maxDepth", "collapse", "summary"] },
3662
3735
  test: {
@@ -3762,6 +3835,10 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
3762
3835
  "strictExit",
3763
3836
  "failOnWarn",
3764
3837
  "fixHints",
3838
+ "autoFix",
3839
+ "dryRun",
3840
+ "fixScope",
3841
+ "pruneMissing",
3765
3842
  "checkHistoryDrift",
3766
3843
  "checkCommandReferences"
3767
3844
  ]
@@ -3842,6 +3919,16 @@ function buildActionScopedToolSchema(action) {
3842
3919
  required: [...requiredFields]
3843
3920
  }));
3844
3921
  }
3922
+ if (contract.oneOfRequired && contract.oneOfRequired.length > 0) {
3923
+ schema.oneOf = contract.oneOfRequired.map((requiredFields) => {
3924
+ const otherFields = contract.oneOfRequired?.flat().filter((field) => !requiredFields.includes(field)) ?? [];
3925
+ return {
3926
+ required: [...requiredFields],
3927
+ ...otherFields.length > 0 ? { not: { anyOf: otherFields.map((field) => ({ required: [field] })) } } : {},
3928
+ ...action === "history-repair" && requiredFields.includes("all") ? { properties: { all: { const: true } } } : {}
3929
+ };
3930
+ });
3931
+ }
3845
3932
  if (contract.conditionalRequired && contract.conditionalRequired.length > 0) {
3846
3933
  schema.allOf = contract.conditionalRequired.map((entry) => ({
3847
3934
  if: {
@@ -3855,6 +3942,20 @@ function buildActionScopedToolSchema(action) {
3855
3942
  }
3856
3943
  }));
3857
3944
  }
3945
+ if (contract.dependentAnyOfRequired && contract.dependentAnyOfRequired.length > 0) {
3946
+ const allOf = Array.isArray(schema.allOf) ? [...schema.allOf] : [];
3947
+ for (const entry of contract.dependentAnyOfRequired) {
3948
+ allOf.push({
3949
+ if: { required: [entry.property] },
3950
+ then: {
3951
+ anyOf: entry.anyOfRequired.map((requiredFields) => ({
3952
+ required: [...requiredFields]
3953
+ }))
3954
+ }
3955
+ });
3956
+ }
3957
+ schema.allOf = allOf;
3958
+ }
3858
3959
  return schema;
3859
3960
  }
3860
3961
  function createLazyContractSchema(build) {
@@ -3873,7 +3974,7 @@ function createLazyContractSchema(build) {
3873
3974
  }
3874
3975
  });
3875
3976
  }
3876
- var PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.2";
3977
+ var PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.0.3";
3877
3978
  var PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
3878
3979
  var PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.0.0";
3879
3980
  var PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
@@ -4022,6 +4123,6 @@ export {
4022
4123
  resolveSubcommandFlagContractsForCommand,
4023
4124
  PM_TOOL_PARAMETERS_SCHEMA
4024
4125
  };
4025
- //# sourceMappingURL=chunk-FXRU333M.js.map
4126
+ //# sourceMappingURL=chunk-UIG4TW2H.js.map
4026
4127
 
4027
- //# debugId=2533bfec-8cab-58ea-acd2-3582f0f1b6bd
4128
+ //# debugId=60d8e31c-b4ba-5c8f-b2dc-523d0a2b3b13