@unbrained/pm-cli 2026.5.11 → 2026.5.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 (84) hide show
  1. package/AGENTS.md +3 -116
  2. package/CHANGELOG.md +7 -0
  3. package/PRD.md +11 -11
  4. package/README.md +11 -1
  5. package/dist/cli/commands/contracts.js +8 -2
  6. package/dist/cli/commands/contracts.js.map +1 -1
  7. package/dist/cli/commands/extension.d.ts +9 -2
  8. package/dist/cli/commands/extension.js +247 -67
  9. package/dist/cli/commands/extension.js.map +1 -1
  10. package/dist/cli/commands/index.d.ts +1 -0
  11. package/dist/cli/commands/index.js +1 -0
  12. package/dist/cli/commands/index.js.map +1 -1
  13. package/dist/cli/commands/test.js +14 -6
  14. package/dist/cli/commands/test.js.map +1 -1
  15. package/dist/cli/commands/upgrade.d.ts +63 -0
  16. package/dist/cli/commands/upgrade.js +260 -0
  17. package/dist/cli/commands/upgrade.js.map +1 -0
  18. package/dist/cli/guide-topics.js +18 -16
  19. package/dist/cli/guide-topics.js.map +1 -1
  20. package/dist/cli/help-content.js +42 -2
  21. package/dist/cli/help-content.js.map +1 -1
  22. package/dist/cli/register-setup.js +168 -90
  23. package/dist/cli/register-setup.js.map +1 -1
  24. package/dist/core/packages/manifest.d.ts +13 -0
  25. package/dist/core/packages/manifest.js +139 -0
  26. package/dist/core/packages/manifest.js.map +1 -0
  27. package/dist/mcp/server.js +9 -2
  28. package/dist/mcp/server.js.map +1 -1
  29. package/dist/sdk/cli-contracts.d.ts +18 -17
  30. package/dist/sdk/cli-contracts.js +137 -35
  31. package/dist/sdk/cli-contracts.js.map +1 -1
  32. package/dist/sdk/index.d.ts +1 -0
  33. package/dist/sdk/index.js +1 -0
  34. package/dist/sdk/index.js.map +1 -1
  35. package/docs/ARCHITECTURE.md +1 -1
  36. package/docs/COMMANDS.md +14 -1
  37. package/docs/EXTENSIONS.md +112 -29
  38. package/docs/QUICKSTART.md +10 -2
  39. package/docs/README.md +4 -6
  40. package/docs/SDK.md +16 -12
  41. package/package.json +5 -23
  42. package/packages/pm-beads/README.md +10 -0
  43. package/{.agents/pm → packages/pm-beads}/extensions/beads/index.js +24 -9
  44. package/packages/pm-beads/extensions/beads/index.ts +131 -0
  45. package/packages/pm-beads/package.json +17 -0
  46. package/packages/pm-todos/README.md +11 -0
  47. package/{.agents/pm → packages/pm-todos}/extensions/todos/index.js +24 -9
  48. package/packages/pm-todos/extensions/todos/index.ts +149 -0
  49. package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.js +1 -1
  50. package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.ts +1 -1
  51. package/packages/pm-todos/package.json +17 -0
  52. package/plugins/pm-cli-claude/README.md +1 -2
  53. package/plugins/pm-cli-claude/hooks/session-start.mjs +4 -55
  54. package/.agents/pm/extensions/.managed-extensions.json +0 -42
  55. package/.agents/skills/HARNESS_COMPATIBILITY.md +0 -45
  56. package/.agents/skills/README.md +0 -21
  57. package/.agents/skills/pm-developer/SKILL.md +0 -73
  58. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +0 -48
  59. package/.agents/skills/pm-developer/references/PROMPTS.md +0 -17
  60. package/.agents/skills/pm-extensions/SKILL.md +0 -57
  61. package/.agents/skills/pm-extensions/references/LIFECYCLE.md +0 -40
  62. package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +0 -25
  63. package/.agents/skills/pm-sdk/SKILL.md +0 -50
  64. package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +0 -31
  65. package/.agents/skills/pm-sdk/references/PROMPTS.md +0 -13
  66. package/.agents/skills/pm-user/SKILL.md +0 -59
  67. package/.agents/skills/pm-user/references/PROMPTS.md +0 -17
  68. package/.agents/skills/pm-user/references/WORKFLOWS.md +0 -35
  69. package/.pi/README.md +0 -35
  70. package/.pi/agents/pm-triage-agent.md +0 -19
  71. package/.pi/agents/pm-verification-agent.md +0 -21
  72. package/.pi/chains/pm-native-delivery.chain.md +0 -11
  73. package/.pi/extensions/pm-cli/index.js +0 -387
  74. package/.pi/prompts/pm-workflow.md +0 -5
  75. package/.pi/skills/pm-native/SKILL.md +0 -44
  76. package/.pi/skills/pm-release/SKILL.md +0 -35
  77. package/dist/pi/native.d.ts +0 -5
  78. package/dist/pi/native.js +0 -236
  79. package/dist/pi/native.js.map +0 -1
  80. package/docs/PI_PACKAGE.md +0 -141
  81. /package/{.agents/pm → packages/pm-beads}/extensions/beads/manifest.json +0 -0
  82. /package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.js +0 -0
  83. /package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.ts +0 -0
  84. /package/{.agents/pm → packages/pm-todos}/extensions/todos/manifest.json +0 -0
@@ -86,6 +86,10 @@ export const PM_CORE_COMMAND_NAMES = [
86
86
  "init",
87
87
  "config",
88
88
  "extension",
89
+ "package",
90
+ "packages",
91
+ "install",
92
+ "upgrade",
89
93
  "create",
90
94
  "list",
91
95
  "list-all",
@@ -153,6 +157,20 @@ export const PM_TOOL_ACTIONS = [
153
157
  "extension-activate",
154
158
  "extension-deactivate",
155
159
  "extension",
160
+ "package-init",
161
+ "package-install",
162
+ "package-uninstall",
163
+ "package-explore",
164
+ "package-manage",
165
+ "package-reload",
166
+ "package-doctor",
167
+ "package-adopt",
168
+ "package-adopt-all",
169
+ "package-activate",
170
+ "package-deactivate",
171
+ "package",
172
+ "install",
173
+ "upgrade",
156
174
  "create",
157
175
  "list",
158
176
  "list-all",
@@ -228,7 +246,7 @@ export function isPmExtensionPolicyModeContract(value) {
228
246
  export function isPmExtensionPolicySurfaceContract(value) {
229
247
  return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(value);
230
248
  }
231
- export const PI_LIST_FILTER_OPTION_CONTRACTS = [
249
+ export const TOOL_LIST_FILTER_OPTION_CONTRACTS = [
232
250
  { param: "type", flag: "--type" },
233
251
  { param: "tag", flag: "--tag" },
234
252
  { param: "priority", flag: "--priority" },
@@ -245,7 +263,7 @@ export const PI_LIST_FILTER_OPTION_CONTRACTS = [
245
263
  { param: "sort", flag: "--sort" },
246
264
  { param: "order", flag: "--order" },
247
265
  ];
248
- export const PI_AGGREGATE_OPTION_CONTRACTS = [
266
+ export const TOOL_AGGREGATE_OPTION_CONTRACTS = [
249
267
  { param: "groupBy", flag: "--group-by" },
250
268
  { param: "status", flag: "--status" },
251
269
  { param: "type", flag: "--type" },
@@ -259,7 +277,7 @@ export const PI_AGGREGATE_OPTION_CONTRACTS = [
259
277
  { param: "sprint", flag: "--sprint" },
260
278
  { param: "release", flag: "--release" },
261
279
  ];
262
- export const PI_DEDUPE_AUDIT_OPTION_CONTRACTS = [
280
+ export const TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS = [
263
281
  { param: "mode", flag: "--mode" },
264
282
  { param: "limit", flag: "--limit" },
265
283
  { param: "threshold", flag: "--threshold" },
@@ -275,7 +293,7 @@ export const PI_DEDUPE_AUDIT_OPTION_CONTRACTS = [
275
293
  { param: "sprint", flag: "--sprint" },
276
294
  { param: "release", flag: "--release" },
277
295
  ];
278
- export const PI_SEARCH_FILTER_OPTION_CONTRACTS = [
296
+ export const TOOL_SEARCH_FILTER_OPTION_CONTRACTS = [
279
297
  { param: "type", flag: "--type" },
280
298
  { param: "tag", flag: "--tag" },
281
299
  { param: "priority", flag: "--priority" },
@@ -284,7 +302,7 @@ export const PI_SEARCH_FILTER_OPTION_CONTRACTS = [
284
302
  { param: "fields", flag: "--fields" },
285
303
  { param: "limit", flag: "--limit" },
286
304
  ];
287
- export const PI_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
305
+ export const TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
288
306
  { param: "parent", flag: "--parent" },
289
307
  { param: "reviewer", flag: "--reviewer" },
290
308
  { param: "risk", flag: "--risk" },
@@ -315,7 +333,7 @@ export const PI_SHARED_CREATE_UPDATE_OPTION_CONTRACTS = [
315
333
  { param: "outcome", flag: "--outcome" },
316
334
  { param: "whyNow", flag: "--why-now" },
317
335
  ];
318
- export const PI_CREATE_OPTION_CONTRACTS = [
336
+ export const TOOL_CREATE_OPTION_CONTRACTS = [
319
337
  { param: "title", flag: "--title" },
320
338
  { param: "description", flag: "--description", allowEmpty: true },
321
339
  { param: "type", flag: "--type" },
@@ -355,7 +373,7 @@ export const PI_CREATE_OPTION_CONTRACTS = [
355
373
  { param: "clearTypeOptions", flag: "--clear-type-options" },
356
374
  { param: "allowAuditUpdate", flag: "--allow-audit-update" },
357
375
  ];
358
- export const PI_UPDATE_OPTION_CONTRACTS = [
376
+ export const TOOL_UPDATE_OPTION_CONTRACTS = [
359
377
  { param: "title", flag: "--title" },
360
378
  { param: "description", flag: "--description", allowEmpty: true },
361
379
  { param: "body", flag: "--body", allowEmpty: true },
@@ -396,7 +414,7 @@ export const PI_UPDATE_OPTION_CONTRACTS = [
396
414
  { param: "clearTypeOptions", flag: "--clear-type-options" },
397
415
  { param: "allowAuditDepUpdate", flag: "--allow-audit-dep-update" },
398
416
  ];
399
- export const PI_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
417
+ export const TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
400
418
  { param: "filterStatus", flag: "--filter-status" },
401
419
  { param: "filterType", flag: "--filter-type" },
402
420
  { param: "filterTag", flag: "--filter-tag" },
@@ -411,8 +429,8 @@ export const PI_UPDATE_MANY_FILTER_OPTION_CONTRACTS = [
411
429
  { param: "limit", flag: "--limit" },
412
430
  { param: "offset", flag: "--offset" },
413
431
  ];
414
- export const PI_NORMALIZE_FILTER_OPTION_CONTRACTS = [...PI_UPDATE_MANY_FILTER_OPTION_CONTRACTS];
415
- export const PI_CALENDAR_OPTION_CONTRACTS = [
432
+ export const TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS = [...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS];
433
+ export const TOOL_CALENDAR_OPTION_CONTRACTS = [
416
434
  { param: "view", flag: "--view" },
417
435
  { param: "date", flag: "--date" },
418
436
  { param: "from", flag: "--from" },
@@ -432,7 +450,7 @@ export const PI_CALENDAR_OPTION_CONTRACTS = [
432
450
  { param: "limit", flag: "--limit" },
433
451
  { param: "format", flag: "--format" },
434
452
  ];
435
- export const PI_ACTIVITY_OPTION_CONTRACTS = [
453
+ export const TOOL_ACTIVITY_OPTION_CONTRACTS = [
436
454
  { param: "id", flag: "--id" },
437
455
  { param: "op", flag: "--op" },
438
456
  { param: "author", flag: "--author" },
@@ -440,7 +458,7 @@ export const PI_ACTIVITY_OPTION_CONTRACTS = [
440
458
  { param: "to", flag: "--to" },
441
459
  { param: "limit", flag: "--limit" },
442
460
  ];
443
- export const PI_CONTEXT_OPTION_CONTRACTS = [
461
+ export const TOOL_CONTEXT_OPTION_CONTRACTS = [
444
462
  { param: "date", flag: "--date" },
445
463
  { param: "from", flag: "--from" },
446
464
  { param: "to", flag: "--to" },
@@ -458,7 +476,7 @@ export const PI_CONTEXT_OPTION_CONTRACTS = [
458
476
  { param: "activityLimit", flag: "--activity-limit" },
459
477
  { param: "staleThreshold", flag: "--stale-threshold" },
460
478
  ];
461
- export const PI_DEPS_OPTION_CONTRACTS = [
479
+ export const TOOL_DEPS_OPTION_CONTRACTS = [
462
480
  { param: "format", flag: "--format" },
463
481
  { param: "maxDepth", flag: "--max-depth" },
464
482
  { param: "collapse", flag: "--collapse" },
@@ -655,6 +673,17 @@ export const EXTENSION_FLAG_CONTRACTS = [
655
673
  { flag: "--strict-exit" },
656
674
  { flag: "--fail-on-warn" },
657
675
  ];
676
+ export const UPGRADE_FLAG_CONTRACTS = [
677
+ { flag: "--dry-run" },
678
+ { flag: "--cli-only" },
679
+ { flag: "--packages-only" },
680
+ { flag: "--project" },
681
+ { flag: "--local" },
682
+ { flag: "--global" },
683
+ { flag: "--repair" },
684
+ { flag: "--tag" },
685
+ { flag: "--package-name" },
686
+ ];
658
687
  export const REINDEX_FLAG_CONTRACTS = [
659
688
  { flag: "--mode" },
660
689
  { flag: "--progress" },
@@ -1253,7 +1282,12 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
1253
1282
  case "config":
1254
1283
  return withSubcommandGlobalFlags(CONFIG_FLAG_CONTRACTS);
1255
1284
  case "extension":
1285
+ case "package":
1286
+ case "packages":
1287
+ case "install":
1256
1288
  return withSubcommandGlobalFlags(EXTENSION_FLAG_CONTRACTS);
1289
+ case "upgrade":
1290
+ return withSubcommandGlobalFlags(UPGRADE_FLAG_CONTRACTS);
1257
1291
  case "create":
1258
1292
  return withSubcommandGlobalFlags(CREATE_FLAG_CONTRACTS);
1259
1293
  case "aggregate":
@@ -1727,6 +1761,10 @@ const PM_TOOL_PARAMETER_PROPERTIES = {
1727
1761
  allowAuditDepUpdate: { type: "boolean" },
1728
1762
  allowAuditRelease: { type: "boolean" },
1729
1763
  dryRun: { type: "boolean" },
1764
+ cliOnly: { type: "boolean" },
1765
+ packagesOnly: { type: "boolean" },
1766
+ repair: { type: "boolean" },
1767
+ packageName: { type: "string" },
1730
1768
  rollback: { type: "string" },
1731
1769
  noCheckpoint: { type: "boolean" },
1732
1770
  force: { type: "boolean" },
@@ -1796,8 +1834,8 @@ function toSchemaKeyList(values) {
1796
1834
  return normalizeUniqueStringList(values);
1797
1835
  }
1798
1836
  const CREATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1799
- ...PI_CREATE_OPTION_CONTRACTS.map((entry) => entry.param),
1800
- ...PI_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1837
+ ...TOOL_CREATE_OPTION_CONTRACTS.map((entry) => entry.param),
1838
+ ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1801
1839
  "assignee",
1802
1840
  ]);
1803
1841
  const TEMPLATE_SAVE_UNSUPPORTED_PARAMETER_KEYS = new Set([
@@ -1817,19 +1855,19 @@ const TEMPLATE_SAVE_UNSUPPORTED_PARAMETER_KEYS = new Set([
1817
1855
  ]);
1818
1856
  const TEMPLATE_SAVE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(CREATE_CONTRACT_PARAMETER_KEYS.filter((key) => !TEMPLATE_SAVE_UNSUPPORTED_PARAMETER_KEYS.has(key)));
1819
1857
  const UPDATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1820
- ...PI_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1821
- ...PI_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1858
+ ...TOOL_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1859
+ ...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
1822
1860
  "force",
1823
1861
  ]);
1824
1862
  const UPDATE_MANY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1825
- ...PI_UPDATE_MANY_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1863
+ ...TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1826
1864
  ...UPDATE_CONTRACT_PARAMETER_KEYS,
1827
1865
  "dryRun",
1828
1866
  "rollback",
1829
1867
  "noCheckpoint",
1830
1868
  ]);
1831
1869
  const NORMALIZE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1832
- ...PI_NORMALIZE_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1870
+ ...TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1833
1871
  "dryRun",
1834
1872
  "apply",
1835
1873
  "author",
@@ -1838,30 +1876,30 @@ const NORMALIZE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1838
1876
  "force",
1839
1877
  ]);
1840
1878
  const CALENDAR_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1841
- ...PI_CALENDAR_OPTION_CONTRACTS.map((entry) => entry.param),
1879
+ ...TOOL_CALENDAR_OPTION_CONTRACTS.map((entry) => entry.param),
1842
1880
  "past",
1843
1881
  "fullPeriod",
1844
1882
  ]);
1845
1883
  const CONTEXT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1846
- ...PI_CONTEXT_OPTION_CONTRACTS.map((entry) => entry.param),
1884
+ ...TOOL_CONTEXT_OPTION_CONTRACTS.map((entry) => entry.param),
1847
1885
  "past",
1848
1886
  "section",
1849
1887
  ]);
1850
1888
  const ACTIVITY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1851
- ...PI_ACTIVITY_OPTION_CONTRACTS.map((entry) => entry.param),
1889
+ ...TOOL_ACTIVITY_OPTION_CONTRACTS.map((entry) => entry.param),
1852
1890
  "stream",
1853
1891
  ]);
1854
1892
  const LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1855
- ...PI_LIST_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1893
+ ...TOOL_LIST_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1856
1894
  "includeBody",
1857
1895
  "compact",
1858
1896
  ]);
1859
1897
  const AGGREGATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1860
- ...PI_AGGREGATE_OPTION_CONTRACTS.map((entry) => entry.param),
1898
+ ...TOOL_AGGREGATE_OPTION_CONTRACTS.map((entry) => entry.param),
1861
1899
  "count",
1862
1900
  "includeUnparented",
1863
1901
  ]);
1864
- const DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(PI_DEDUPE_AUDIT_OPTION_CONTRACTS.map((entry) => entry.param));
1902
+ const DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS.map((entry) => entry.param));
1865
1903
  const SEARCH_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1866
1904
  "query",
1867
1905
  "keywords",
@@ -1871,7 +1909,7 @@ const SEARCH_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
1871
1909
  "phraseExact",
1872
1910
  "compact",
1873
1911
  "full",
1874
- ...PI_SEARCH_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1912
+ ...TOOL_SEARCH_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
1875
1913
  ]);
1876
1914
  const AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = ["author", "message", "force"];
1877
1915
  const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
@@ -1920,6 +1958,53 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
1920
1958
  "failOnWarn",
1921
1959
  ],
1922
1960
  },
1961
+ "package-init": { required: ["target"], optional: ["scope"] },
1962
+ "package-install": {
1963
+ optional: ["target", "github", "scope", "ref"],
1964
+ anyOfRequired: [["target"], ["github"]],
1965
+ },
1966
+ "package-uninstall": { required: ["target"], optional: ["scope"] },
1967
+ "package-explore": { optional: ["scope"] },
1968
+ "package-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
1969
+ "package-reload": { optional: ["scope", "watch"] },
1970
+ "package-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
1971
+ "package-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
1972
+ "package-adopt-all": { optional: ["scope"] },
1973
+ "package-activate": { required: ["target"], optional: ["scope"] },
1974
+ "package-deactivate": { required: ["target"], optional: ["scope"] },
1975
+ package: {
1976
+ optional: [
1977
+ "target",
1978
+ "scope",
1979
+ "github",
1980
+ "ref",
1981
+ "init",
1982
+ "install",
1983
+ "uninstall",
1984
+ "explore",
1985
+ "manage",
1986
+ "reload",
1987
+ "doctor",
1988
+ "adopt",
1989
+ "adoptAll",
1990
+ "activate",
1991
+ "deactivate",
1992
+ "runtimeProbe",
1993
+ "fixManagedState",
1994
+ "detail",
1995
+ "trace",
1996
+ "watch",
1997
+ "strictExit",
1998
+ "failOnWarn",
1999
+ ],
2000
+ },
2001
+ install: {
2002
+ optional: ["target", "github", "scope", "ref"],
2003
+ anyOfRequired: [["target"], ["github"]],
2004
+ },
2005
+ upgrade: {
2006
+ optional: ["target", "scope", "dryRun", "cliOnly", "packagesOnly", "repair", "tag", "packageName"],
2007
+ },
1923
2008
  create: {
1924
2009
  required: ["title", "description", "type", "status", "priority", "message"],
1925
2010
  optional: CREATE_CONTRACT_PARAMETER_KEYS,
@@ -2148,17 +2233,34 @@ const PM_TOOL_PARAMETER_METADATA = {
2148
2233
  description: "When true for extension-manage/extension-doctor, adopt unmanaged extensions before diagnostics/update checks.",
2149
2234
  },
2150
2235
  target: {
2151
- description: "Positional target argument for the selected action (ID, source, or extension name).",
2236
+ description: "Positional target argument for the selected action (ID, source, package source, or extension name).",
2152
2237
  examples: ["pm-a1b2", ".agents/pm/extensions/sample", "sample-extension"],
2153
2238
  },
2154
2239
  github: {
2155
- description: "GitHub shorthand owner/repo[/path] source for extension install actions.",
2156
- examples: ["unbraind/pm-cli/pi"],
2240
+ description: "GitHub shorthand owner/repo[/path] source for package/extension install actions.",
2241
+ examples: ["org/repo/extensions/sample"],
2157
2242
  },
2158
2243
  ref: {
2159
2244
  description: "Git ref/branch/tag used when installing from GitHub shorthand/URL sources.",
2160
2245
  examples: ["main", "v1.0.0"],
2161
2246
  },
2247
+ cliOnly: {
2248
+ description: "Restrict upgrade to the pm CLI/SDK npm package.",
2249
+ },
2250
+ packagesOnly: {
2251
+ description: "Restrict upgrade to managed installable pm packages.",
2252
+ },
2253
+ repair: {
2254
+ description: "Force npm global reinstall semantics when upgrading the pm CLI/SDK.",
2255
+ },
2256
+ tag: {
2257
+ description: "npm version or dist-tag used for CLI and registry package upgrades.",
2258
+ examples: ["latest", "next", "2026.5.11"],
2259
+ },
2260
+ packageName: {
2261
+ description: "Override the pm CLI package name for self-upgrade automation and tests.",
2262
+ examples: ["@unbrained/pm-cli"],
2263
+ },
2162
2264
  json: {
2163
2265
  description: "Emit machine-readable JSON output.",
2164
2266
  },
@@ -2175,7 +2277,7 @@ const PM_TOOL_PARAMETER_METADATA = {
2175
2277
  description: "Emit deterministic timing diagnostics to stderr.",
2176
2278
  },
2177
2279
  timeoutMs: {
2178
- description: "Pi wrapper execution timeout in milliseconds.",
2280
+ description: "Tool execution timeout in milliseconds.",
2179
2281
  examples: [120000],
2180
2282
  },
2181
2283
  id: {
@@ -2646,8 +2748,8 @@ function buildActionScopedToolSchema(action) {
2646
2748
  }
2647
2749
  export const PM_TOOL_PARAMETERS_SCHEMA = {
2648
2750
  $schema: "https://json-schema.org/draft/2020-12/schema",
2649
- $id: "https://unbrained.dev/schemas/pm-cli/tool-parameters-v4.schema.json",
2650
- title: "pm-cli Pi wrapper parameters (action-scoped strict schema)",
2751
+ $id: "https://schema.unbrained.dev/pm-cli/tool-parameters-v4.schema.json",
2752
+ title: "pm-cli tool parameters (action-scoped strict schema)",
2651
2753
  "x-schema-version": "4.0.1",
2652
2754
  type: "object",
2653
2755
  oneOf: PM_TOOL_ACTIONS.map((action) => buildActionScopedToolSchema(action)),
@@ -2672,7 +2774,7 @@ function toProviderCompatibleParameterDefinition(key, definition) {
2672
2774
  type: "string",
2673
2775
  };
2674
2776
  }
2675
- function buildProviderCompatiblePiToolSchema() {
2777
+ function buildProviderCompatibleToolSchema() {
2676
2778
  const properties = {
2677
2779
  action: {
2678
2780
  type: "string",
@@ -2688,7 +2790,7 @@ function buildProviderCompatiblePiToolSchema() {
2688
2790
  properties[key] = toProviderCompatibleParameterDefinition(key, PM_TOOL_PARAMETER_PROPERTIES[key]);
2689
2791
  }
2690
2792
  return {
2691
- title: "pm-cli Pi tool parameters (provider-compatible flat schema)",
2793
+ title: "pm-cli tool parameters (provider-compatible flat schema)",
2692
2794
  "x-schema-version": "1.0.0",
2693
2795
  type: "object",
2694
2796
  additionalProperties: false,
@@ -2696,5 +2798,5 @@ function buildProviderCompatiblePiToolSchema() {
2696
2798
  properties,
2697
2799
  };
2698
2800
  }
2699
- export const PM_PI_TOOL_PARAMETERS_SCHEMA = buildProviderCompatiblePiToolSchema();
2801
+ export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA = buildProviderCompatibleToolSchema();
2700
2802
  //# sourceMappingURL=cli-contracts.js.map