@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.
- package/CHANGELOG.md +28 -0
- package/dist/cli/commands/completion.js +20 -8
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/create.js +6 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +2 -0
- package/dist/cli/commands/docs.js +2 -2
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.d.ts +2 -0
- package/dist/cli/commands/files.js +2 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/health.d.ts +1 -1
- package/dist/cli/commands/health.js +77 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +36 -0
- package/dist/cli/commands/history-repair.js +68 -3
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +3 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +18 -0
- package/dist/cli/commands/linked-artifacts.js +26 -3
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +6 -0
- package/dist/cli/commands/plan.js +93 -32
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +20 -0
- package/dist/cli/commands/validate.js +292 -28
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-mutation.js +47 -16
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +10 -2
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +16 -16
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{chunk-P2PSODAQ.js → chunk-35P4GT6E.js} +110 -9
- package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js → chunk-37CYVF73.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js → chunk-7AMK6DOW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js.map → chunk-7AMK6DOW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js → chunk-AX4GEVQC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js.map → chunk-AX4GEVQC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js +187 -0
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js +217 -0
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PSD7F7DX.js → chunk-KBPQHXWG.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-KBPQHXWG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js → chunk-L5EPZQIC.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js +220 -0
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UOO6BYIA.js → chunk-PNYAAB4S.js} +21 -188
- package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js +190 -0
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCSCXBGT.js → chunk-R4VWYWRN.js} +19 -193
- package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js → chunk-SO55HRA5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FXRU333M.js → chunk-UIG4TW2H.js} +110 -9
- package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E5DUIJA4.js → chunk-WPDMBIX6.js} +16 -3
- package/dist/cli-bundle/chunks/chunk-WPDMBIX6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js → chunk-XWMF3POR.js} +2 -2
- package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js → contracts-2G66IGIA.js} +2 -2
- package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js → contracts-PJCHYSO5.js} +2 -2
- package/dist/cli-bundle/chunks/{create-IFA26O2I.js → create-5433DP3G.js} +2 -2
- package/dist/cli-bundle/chunks/{create-JVXYHYH4.js → create-VWLWS34Z.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-5WMBVQT2.js → docs-I3BAF5WH.js} +4 -4
- package/dist/cli-bundle/chunks/docs-I3BAF5WH.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-MB53UJAJ.js → docs-MXLGZUIT.js} +3 -3
- package/dist/cli-bundle/chunks/docs-MXLGZUIT.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-GVMNVLCB.js → files-FYP3MDPX.js} +3 -3
- package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-DLB5LJEP.js → files-GUXUM2MB.js} +4 -4
- package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-2WEPW6D6.js → gc-FENB2ESG.js} +12 -174
- package/dist/cli-bundle/chunks/gc-FENB2ESG.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-4Z3IKHAZ.js → gc-KGQG66SA.js} +10 -179
- package/dist/cli-bundle/chunks/gc-KGQG66SA.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-YO5LRWN4.js → health-7MTXAVR2.js} +71 -4
- package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-4ZYB3IYQ.js → health-E4D7KGHD.js} +72 -5
- package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-KVPFJKOS.js → history-repair-OSQOKJ3E.js} +61 -3
- package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-RUGKD3YR.js → history-repair-SBK7P34V.js} +62 -4
- package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-VNUG3WZZ.js → plan-2YTQYWGM.js} +52 -12
- package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-FQLMJRLZ.js → plan-7IVSICR6.js} +51 -11
- package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js → register-list-query-4UPMHONX.js} +3 -3
- package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js → register-list-query-7VOW2C3W.js} +3 -3
- package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js → register-mutation-FARSGYRD.js} +43 -26
- package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js.map → register-mutation-FARSGYRD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js → register-mutation-LJDNVREU.js} +44 -27
- package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js.map → register-mutation-LJDNVREU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-AM6KTWB6.js → register-operations-FFTYAL42.js} +17 -13
- package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js → register-operations-HCJKDUA6.js} +16 -12
- package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js.map → register-operations-HCJKDUA6.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-IKX5524L.js → register-setup-6AVIUOCC.js} +19 -19
- package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-G4QYI3RX.js → register-setup-KVNLO5OJ.js} +18 -18
- package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-2EVXOC7V.js → update-36JM7YZT.js} +3 -3
- package/dist/cli-bundle/chunks/{update-5A2B6QYB.js → update-I246PCLO.js} +3 -3
- package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js → update-many-F4IKDWZB.js} +3 -3
- package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js → update-many-NTWZ5YT3.js} +3 -3
- package/dist/cli-bundle/chunks/{validate-EQTT6WVX.js → validate-46KCRHL7.js} +448 -36
- package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-XN4I4DPL.js → validate-CRFMPTYD.js} +468 -35
- package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +7 -0
- package/dist/cli-bundle/main.js +24 -10
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/diagnostics/remediation.js +19 -6
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +31 -0
- package/dist/core/lock/lock-gc.js +120 -62
- package/dist/core/lock/lock-gc.js.map +1 -1
- package/dist/core/telemetry/consent.js +18 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +130 -0
- package/dist/core/validate/fix-planning.js +202 -0
- package/dist/core/validate/fix-planning.js.map +1 -0
- package/dist/core/validate/missing-by-type.d.ts +21 -0
- package/dist/core/validate/missing-by-type.js +39 -0
- package/dist/core/validate/missing-by-type.js.map +1 -0
- package/dist/core/validate/stale-file-classification.d.ts +41 -0
- package/dist/core/validate/stale-file-classification.js +73 -0
- package/dist/core/validate/stale-file-classification.js.map +1 -0
- package/dist/mcp/server.js +41 -8
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +6 -1
- package/dist/sdk/cli-contracts.js +74 -7
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/docs/AGENT_GUIDE.md +6 -1
- package/docs/COMMANDS.md +23 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/chunk-E5DUIJA4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LCSCXBGT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PSD7F7DX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-5WMBVQT2.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-MB53UJAJ.js.map +0 -7
- package/dist/cli-bundle/chunks/files-DLB5LJEP.js.map +0 -1
- package/dist/cli-bundle/chunks/files-GVMNVLCB.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-2WEPW6D6.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-4Z3IKHAZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +0 -1
- package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-KVPFJKOS.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-RUGKD3YR.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-FQLMJRLZ.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-VNUG3WZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-G4QYI3RX.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-IKX5524L.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-EQTT6WVX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-XN4I4DPL.js.map +0 -7
- /package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js.map → chunk-37CYVF73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js.map → chunk-L5EPZQIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js.map → chunk-SO55HRA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js.map → chunk-XWMF3POR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js.map → contracts-2G66IGIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js.map → contracts-PJCHYSO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-IFA26O2I.js.map → create-5433DP3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JVXYHYH4.js.map → create-VWLWS34Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js.map → register-list-query-4UPMHONX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js.map → register-list-query-7VOW2C3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2EVXOC7V.js.map → update-36JM7YZT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-5A2B6QYB.js.map → update-I246PCLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js.map → update-many-F4IKDWZB.js.map} +0 -0
- /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]="
|
|
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: ["--
|
|
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
|
-
|
|
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: [
|
|
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.
|
|
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=
|
|
1996
|
+
//# debugId=0e11d981-3bc2-5584-b783-ee213f7395ba
|