@unbrained/pm-cli 2026.8.25 → 2026.8.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +32 -0
  2. package/.agents/skills/README.md +47 -0
  3. package/.agents/skills/pm-developer/SKILL.md +117 -0
  4. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +49 -0
  5. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +91 -0
  6. package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +72 -0
  7. package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
  8. package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +82 -0
  9. package/.agents/skills/pm-developer/references/TOKEN_BUDGETS.md +85 -0
  10. package/.agents/skills/pm-extensions/SKILL.md +106 -0
  11. package/.agents/skills/pm-extensions/references/AUTHORING.md +95 -0
  12. package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
  13. package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
  14. package/.agents/skills/pm-sdk/SKILL.md +107 -0
  15. package/.agents/skills/pm-sdk/references/DOMAIN_MODELING.md +78 -0
  16. package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
  17. package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
  18. package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +82 -0
  19. package/.agents/skills/pm-user/SKILL.md +111 -0
  20. package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +105 -0
  21. package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
  22. package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
  23. package/.claude-plugin/marketplace.json +2 -2
  24. package/CHANGELOG.md +58 -3
  25. package/README.md +8 -5
  26. package/dist/cli/commander-usage.js +11 -7
  27. package/dist/cli/error-guidance.js +3 -3
  28. package/dist/cli/help-content.d.ts +2 -0
  29. package/dist/cli/help-content.js +53 -17
  30. package/dist/cli/help-json-payload.d.ts +8 -2
  31. package/dist/cli/help-json-payload.js +46 -12
  32. package/dist/cli/main.js +52 -74
  33. package/dist/cli/register-annotations.js +27 -21
  34. package/dist/cli/register-setup.js +98 -57
  35. package/dist/cli-bundle/bundle-manifest.json +156 -156
  36. package/dist/cli-bundle/chunks/chunk-3OO3W6FW.js +202 -0
  37. package/dist/cli-bundle/chunks/chunk-52EKTW6V.js +3 -0
  38. package/dist/cli-bundle/chunks/{chunk-QLUORNIB.js → chunk-CVBBGWW5.js} +62 -44
  39. package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
  40. package/dist/cli-bundle/chunks/chunk-OS27HHBN.js +35 -0
  41. package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
  42. package/dist/cli-bundle/chunks/{chunk-5I5RWIJC.js → chunk-R4ETAOJC.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-OWHNAR2B.js → chunk-SH6P7FXI.js} +2 -2
  44. package/dist/cli-bundle/chunks/chunk-SHMDY36D.js +8 -0
  45. package/dist/cli-bundle/chunks/{chunk-244MI4GS.js → chunk-SKXLJIEK.js} +60 -60
  46. package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
  47. package/dist/cli-bundle/chunks/{register-list-query-XVN2ZLI7.js → register-list-query-EUWM6VII.js} +2 -2
  48. package/dist/cli-bundle/chunks/{register-mutation-QCKAEGIJ.js → register-mutation-FD4HSAVU.js} +4 -4
  49. package/dist/cli-bundle/chunks/{register-operations-SDEAXE7E.js → register-operations-HRMNFEC3.js} +2 -2
  50. package/dist/cli-bundle/chunks/register-setup-33GNICLX.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-IBZZZGK3.js → chunk-2AGZ5BRT.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/chunk-4BR5UU52.js +50 -0
  53. package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-OVJL6NZE.js → chunk-AD6ULRAF.js} +4 -4
  55. package/dist/cli-bundle/focused-chunks/{chunk-7YCDTCBC.js → chunk-AQ5IYEZZ.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-YO3ZF3FI.js → chunk-EKX37ZHA.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-N7W67YIG.js → chunk-FC2AXLB5.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{chunk-H5JZEIQV.js → chunk-HC7ODMH3.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{chunk-NOOZGIXP.js → chunk-HVQ22RC4.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{chunk-A644DUFQ.js → chunk-MEASX544.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-RAFKLNZX.js → chunk-MXTYGECH.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-2UIWOP3O.js → chunk-SUBSWYW3.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{chunk-VXWATRFL.js → chunk-XDPYBQCF.js} +9 -9
  64. package/dist/cli-bundle/focused-chunks/{chunk-XUQPEKRN.js → chunk-Y3JJXRVK.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-GQR3WH3F.js → chunk-Y5A7SJJ7.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
  67. package/dist/cli-bundle/focused-chunks/{chunk-ONYQCALA.js → chunk-YVVZ3LQ6.js} +6 -6
  68. package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +5 -0
  69. package/dist/cli-bundle/main.js +15 -14
  70. package/dist/cli-bundle/sdk-authoring.js +1 -1
  71. package/dist/cli-bundle/sdk-contracts.js +2 -2
  72. package/dist/cli-bundle/sdk-core.js +31 -31
  73. package/dist/cli-bundle/sdk-governance.js +1 -1
  74. package/dist/cli-bundle/sdk-graph.js +1 -1
  75. package/dist/cli-bundle/sdk-merge.js +31 -31
  76. package/dist/cli-bundle/sdk-query.js +1 -1
  77. package/dist/cli-bundle/sdk-runtime.js +1 -1
  78. package/dist/cli-bundle/sdk-testing.js +1 -1
  79. package/dist/cli-bundle/sdk.js +32 -6
  80. package/dist/core/extensions/manifest-schema.d.ts +20 -0
  81. package/dist/core/extensions/manifest-schema.js +28 -10
  82. package/dist/core/governance/issue-codes.d.ts +11 -2
  83. package/dist/core/governance/issue-codes.js +29 -10
  84. package/dist/core/item/item-format.js +3 -3
  85. package/dist/core/store/item-store.js +12 -5
  86. package/dist/mcp/http-server.d.ts +60 -0
  87. package/dist/mcp/http-server.js +451 -0
  88. package/dist/mcp/legacy-adapter.d.ts +50 -0
  89. package/dist/mcp/legacy-adapter.js +64 -0
  90. package/dist/mcp/server.d.ts +42 -9
  91. package/dist/mcp/server.js +572 -59
  92. package/dist/mcp/tool-definitions.d.ts +2 -0
  93. package/dist/mcp/tool-definitions.js +2 -2
  94. package/dist/sdk/agent/closed-domain-contracts.d.ts +1 -1
  95. package/dist/sdk/agent/closed-domain-contracts.js +24 -2
  96. package/dist/sdk/agent/refusal-closure-census.d.ts +6 -2
  97. package/dist/sdk/agent/refusal-closure-census.js +16 -8
  98. package/dist/sdk/agent-capability-contracts.js +6 -2
  99. package/dist/sdk/cli-bootstrap.js +3 -2
  100. package/dist/sdk/cli-contracts/command-aliases.js +15 -2
  101. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -1
  102. package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
  103. package/dist/sdk/cli-contracts/flag-contracts.js +9 -5
  104. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +3 -3
  105. package/dist/sdk/cli-contracts/grammar-contracts.js +24 -17
  106. package/dist/sdk/cli-contracts/runtime-contracts.js +13 -11
  107. package/dist/sdk/cli-contracts/tool-schema.js +18 -15
  108. package/dist/sdk/cli-contracts.d.ts +1 -1
  109. package/dist/sdk/cli-contracts.js +3 -3
  110. package/dist/sdk/cli-program.js +3 -2
  111. package/dist/sdk/completion.js +40 -13
  112. package/dist/sdk/compose.d.ts +4 -1
  113. package/dist/sdk/compose.js +23 -36
  114. package/dist/sdk/extension/author-manifest.d.ts +22 -0
  115. package/dist/sdk/extension/author-manifest.js +93 -0
  116. package/dist/sdk/extension.js +6 -3
  117. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +20 -5
  118. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +18 -3
  119. package/dist/sdk/governance/health.js +7 -2
  120. package/dist/sdk/governance/upgrade.d.ts +2 -0
  121. package/dist/sdk/governance/upgrade.js +30 -8
  122. package/dist/sdk/governance/validate.js +8 -6
  123. package/dist/sdk/guide-topics.js +6 -6
  124. package/dist/sdk/index.d.ts +10 -2
  125. package/dist/sdk/index.js +11 -3
  126. package/dist/sdk/mcp/apps.d.ts +70 -0
  127. package/dist/sdk/mcp/apps.js +154 -0
  128. package/dist/sdk/mcp/authorization.d.ts +134 -0
  129. package/dist/sdk/mcp/authorization.js +405 -0
  130. package/dist/sdk/mcp/interactions.d.ts +118 -0
  131. package/dist/sdk/mcp/interactions.js +337 -0
  132. package/dist/sdk/mcp/protocol.d.ts +142 -0
  133. package/dist/sdk/mcp/protocol.js +174 -0
  134. package/dist/sdk/mcp/skills.d.ts +127 -0
  135. package/dist/sdk/mcp/skills.js +390 -0
  136. package/dist/sdk/mcp/subscriptions.d.ts +65 -0
  137. package/dist/sdk/mcp/subscriptions.js +212 -0
  138. package/dist/sdk/mcp/tasks.d.ts +107 -0
  139. package/dist/sdk/mcp/tasks.js +431 -0
  140. package/dist/sdk/mcp/transport.d.ts +30 -0
  141. package/dist/sdk/mcp/transport.js +261 -0
  142. package/dist/sdk/merge/receipts.d.ts +16 -0
  143. package/dist/sdk/merge/receipts.js +9 -8
  144. package/dist/sdk/read-output-contracts.js +16 -3
  145. package/dist/sdk/runtime-action-aliases.js +7 -3
  146. package/dist/sdk/runtime-input.js +12 -4
  147. package/dist/sdk/runtime-primitives.d.ts +2 -2
  148. package/dist/sdk/runtime-primitives.js +4 -4
  149. package/dist/sdk/test/execution.d.ts +6 -0
  150. package/dist/sdk/test/execution.js +32 -3
  151. package/docs/AGENT_PROVENANCE_ADR.md +6 -4
  152. package/docs/AGENT_RUNTIME_PRIMITIVES.md +6 -5
  153. package/docs/CLAUDE_CODE_PLUGIN.md +12 -5
  154. package/docs/CLI_GRAMMAR.md +7 -1
  155. package/docs/COMMANDS.md +2 -2
  156. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +8 -0
  157. package/docs/EXTENSIONS.md +36 -36
  158. package/docs/MCP_2026_07_28.md +160 -0
  159. package/docs/MCP_2026_07_28_CONFORMANCE.md +30 -0
  160. package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +180 -0
  161. package/docs/MCP_SKILLS_AND_APPS.md +107 -0
  162. package/docs/QUICKSTART.md +15 -15
  163. package/docs/README.md +5 -0
  164. package/docs/RELEASING.md +12 -3
  165. package/docs/SDK.md +22 -1
  166. package/docs/SDK_AGENT_SESSION_CONTEXT.md +18 -13
  167. package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
  168. package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
  169. package/docs/SDK_MCP_INTERACTIONS.md +227 -0
  170. package/docs/TESTING.md +4 -0
  171. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  172. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -11
  173. package/marketplace.json +2 -2
  174. package/package.json +15 -11
  175. package/packages/pm-beads/README.md +12 -6
  176. package/packages/pm-beads/docs/MIGRATION.md +53 -0
  177. package/packages/pm-beads/extensions/beads/index.ts +8 -0
  178. package/packages/pm-beads/extensions/beads/runtime.ts +671 -112
  179. package/packages/pm-beads/package.json +1 -1
  180. package/packages/pm-calendar/package.json +1 -1
  181. package/packages/pm-command-kit/package.json +1 -1
  182. package/packages/pm-digital-twin/package.json +1 -1
  183. package/packages/pm-governance-audit/package.json +1 -1
  184. package/packages/pm-guide-shell/package.json +1 -1
  185. package/packages/pm-kanban/package.json +1 -1
  186. package/packages/pm-lifecycle-hooks/package.json +1 -1
  187. package/packages/pm-linked-test-adapters/package.json +1 -1
  188. package/packages/pm-search-advanced/package.json +1 -1
  189. package/packages/pm-templates/package.json +1 -1
  190. package/packages/pm-todos/package.json +1 -1
  191. package/packages/pm-vcs/package.json +1 -1
  192. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  193. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  194. package/scripts/finalize-build.mjs +1 -0
  195. package/sdk/public-surface.json +902 -54
  196. package/dist/cli-bundle/chunks/chunk-2F3LUFMW.js +0 -8
  197. package/dist/cli-bundle/chunks/chunk-65MHLHAA.js +0 -2
  198. package/dist/cli-bundle/chunks/chunk-6C7GIMIL.js +0 -13
  199. package/dist/cli-bundle/chunks/chunk-QKGMHGEI.js +0 -202
  200. package/dist/cli-bundle/chunks/chunk-T2ENPRXF.js +0 -3
  201. package/dist/cli-bundle/chunks/chunk-TPQIBSL2.js +0 -3
  202. package/dist/cli-bundle/chunks/chunk-YQMYF3YD.js +0 -35
  203. package/dist/cli-bundle/chunks/register-setup-LXVBRCJ3.js +0 -2
  204. package/dist/cli-bundle/focused-chunks/chunk-42S3GGZ7.js +0 -50
  205. package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
  206. package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
@@ -7,7 +7,7 @@
7
7
  * consumers from a single source of truth.
8
8
  */
9
9
 
10
- !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]="b54b0565-3968-59ea-b5f9-8ae52731473a")}catch(e){}}();
10
+ !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]="0b302ca6-1333-532f-a55e-e8e984636456")}catch(e){}}();
11
11
  import { normalizeUniqueStringList } from "./string-lists.js";
12
12
  import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
13
13
  import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, } from "./tool-option-contracts.js";
@@ -152,7 +152,8 @@ const PM_TOOL_ACTION_NESTED_OPTION_COMPATIBILITY_KEYS = Object.freeze({
152
152
  "no_checkpoint",
153
153
  "filterAssignee_filter",
154
154
  ],
155
- ...Object.fromEntries(PM_TOOL_ACTIONS.filter((action) => action === "install" ||
155
+ ...Object.fromEntries(PM_TOOL_ACTIONS.filter((action) => action === "upgrade" ||
156
+ action === "install" ||
156
157
  action === "extension" ||
157
158
  action === "package" ||
158
159
  action.startsWith("extension-") ||
@@ -412,6 +413,18 @@ const SCHEDULING_ACTION_SCHEMA_CONTRACT = {
412
413
  "message",
413
414
  ],
414
415
  };
416
+ const UPGRADE_ACTION_SCHEMA_CONTRACT = {
417
+ optional: [
418
+ "target",
419
+ "scope",
420
+ "dryRun",
421
+ "cliOnly",
422
+ "packagesOnly",
423
+ "repair",
424
+ "tag",
425
+ "packageName",
426
+ ],
427
+ };
415
428
  const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
416
429
  init: {
417
430
  optional: [
@@ -442,22 +455,12 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
442
455
  },
443
456
  ...managedLifecycleSchemaContracts("extension"),
444
457
  ...managedLifecycleSchemaContracts("package"),
458
+ "package-upgrade": UPGRADE_ACTION_SCHEMA_CONTRACT,
445
459
  install: {
446
460
  optional: ["target", "github", "scope", "ref"],
447
461
  anyOfRequired: [["target"], ["github"]],
448
462
  },
449
- upgrade: {
450
- optional: [
451
- "target",
452
- "scope",
453
- "dryRun",
454
- "cliOnly",
455
- "packagesOnly",
456
- "repair",
457
- "tag",
458
- "packageName",
459
- ],
460
- },
463
+ upgrade: UPGRADE_ACTION_SCHEMA_CONTRACT,
461
464
  create: {
462
465
  required: [
463
466
  "title",
@@ -1613,4 +1616,4 @@ export const _testOnlyCliContracts = {
1613
1616
  withFlagAliasMetadata,
1614
1617
  };
1615
1618
  //# sourceMappingURL=tool-schema.js.map
1616
- //# debugId=b54b0565-3968-59ea-b5f9-8ae52731473a
1619
+ //# debugId=0b302ca6-1333-532f-a55e-e8e984636456
@@ -14,7 +14,7 @@ export type { CommanderOptionAliasContract, CommanderOptionRegistrationContract,
14
14
  export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, type PmCommandAliasContract, type PmCommandAliasLifecycle, type PmCommandAliasRegistration, } from "./cli-contracts/command-aliases.js";
15
15
  export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
16
16
  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";
17
- export { MERGE_SUBCOMMAND_VALUES, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
17
+ export { MERGE_SUBCOMMAND_VALUES, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
18
18
  export type { MergeSubcommand, PmExtensionCapabilityContract, PmExtensionServiceNameContract, PmExtensionPolicyModeContract, PmExtensionTrustModeContract, PmExtensionSandboxProfileContract, PmExtensionPolicySurfaceContract, PmToolAction, } from "./cli-contracts/enum-contracts.js";
19
19
  export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, verifyToolOptionCliParity, type ToolOptionCliParityFinding, type ToolOptionCliParityReport, } from "./cli-contracts/tool-option-contracts.js";
20
20
  export type { OptionsFromContracts, PmBulkMutationControlOptions, PmBulkMutationFilterOptions, PmCloseActionOptions, PmCloseManyActionOptions, PmCreateActionOptions, PmMutationAttributionOptions, PmOptionScalar, PmUpdateActionOptions, PmUpdateManyActionOptions, } from "./cli-contracts/typed-action-inputs.js";
@@ -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]="c008aee5-ffe9-5da2-b1d9-6fb9fb6684c5")}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]="167b98d4-a5b5-581d-ac0a-17e8e3bfc490")}catch(e){}}();
3
3
  export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } from "./cli-contracts/command-aliases.js";
4
4
  export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
5
5
  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";
@@ -7,7 +7,7 @@ export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEAT
7
7
  // tables live in sibling modules and are re-exported here so existing import
8
8
  // sites (sdk/index.ts, mcp/server.ts, commands/contracts.ts, completion.ts, …)
9
9
  // keep importing everything from "./cli-contracts.js" unchanged.
10
- export { MERGE_SUBCOMMAND_VALUES, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
10
+ export { MERGE_SUBCOMMAND_VALUES, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
11
11
  export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, verifyToolOptionCliParity, } from "./cli-contracts/tool-option-contracts.js";
12
12
  export { PM_COMMAND_POSITIONAL_CONTRACTS, PM_POSITIONAL_ACTION_CONTRACTS, } from "./cli-contracts/grammar-contracts.js";
13
13
  export { withFlagAliasMetadata, compactFlagAliasContracts, resolvePmPositionalActionFlagContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_REOPEN_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
@@ -15,4 +15,4 @@ export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,
15
15
  export { analyzeSdkCliParameterCompleteness, } from "./cli-contracts/completeness.js";
16
16
  export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_DIAGNOSTIC_DEGRADATION_STEPS, PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS, PM_DIAGNOSTIC_OUTPUT_CLASSES, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, projectPmDiagnosticOutput, projectPmDiagnosticText, resolvePmDiagnosticOutputBudget, resolvePmCommandOutputBudget, } from "./cli-contracts/agent-output-contracts.js";
17
17
  //# sourceMappingURL=cli-contracts.js.map
18
- //# debugId=c008aee5-ffe9-5da2-b1d9-6fb9fb6684c5
18
+ //# debugId=167b98d4-a5b5-581d-ac0a-17e8e3bfc490
@@ -4,7 +4,7 @@
4
4
  * Builds the reusable Commander root that embeds pm's universal global contracts.
5
5
  */
6
6
 
7
- !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]="03d46cbf-73bc-50c9-b4e6-e7329ee53076")}catch(e){}}();
7
+ !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]="31e820a7-aa60-5e37-846d-c62b81b47587")}catch(e){}}();
8
8
  import { Command } from "commander";
9
9
  import { writeStdout } from "../core/output/output.js";
10
10
  /** Create a fresh pm root program suitable for one-shot CLI or embedded hosts. */
@@ -41,9 +41,10 @@ export function createPmCliProgram(version) {
41
41
  .option("--no-extensions", "Disable extension loading")
42
42
  .option("--no-pager", "Disable pager integration for help and long output")
43
43
  .option("--explain", "Render extended rationale and examples in help output")
44
+ .option("--all", "Reveal every public command and compatibility alias")
44
45
  .option("--profile", "Print deterministic timing diagnostics")
45
46
  .option("--author <id>", "Override mutation author for this invocation")
46
47
  .exitOverride();
47
48
  }
48
49
  //# sourceMappingURL=cli-program.js.map
49
- //# debugId=03d46cbf-73bc-50c9-b4e6-e7329ee53076
50
+ //# debugId=31e820a7-aa60-5e37-846d-c62b81b47587
@@ -4,11 +4,11 @@
4
4
  * Implements the pm completion command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="48da3e98-ab96-54de-8993-7de0c4edf19b")}catch(e){}}();
7
+ !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]="c8446891-4e65-54c3-9826-eb40f4922f3b")}catch(e){}}();
8
8
  import { EXIT_CODE, PmCliError } from "./runtime-primitives.js";
9
9
  import { listPmCommandsForTier } from "./agent-capability-contracts.js";
10
10
  import { SCAFFOLD_CAPABILITIES } from "./extension/scaffold.js";
11
- import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PM_COMMAND_ALIAS_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
11
+ import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PM_COMMAND_ALIAS_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
12
12
  import { BUILTIN_ITEM_TYPE_VALUES, STATUS_VALUES } from "../types/index.js";
13
13
  import { listGuideTopicIds } from "./guide-topics.js";
14
14
  const VALID_SHELLS = ["bash", "zsh", "fish"];
@@ -49,9 +49,11 @@ const PLAN_SUBCOMMANDS_LIST = "create show add-step update-step complete-step bl
49
49
  const COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);
50
50
  const COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;
51
51
  const GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());
52
- const LIFECYCLE_ACTIONS = "init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate";
52
+ const EXTENSION_LIFECYCLE_ACTIONS = "init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate migrate";
53
+ const PACKAGE_LIFECYCLE_ACTIONS = `${EXTENSION_LIFECYCLE_ACTIONS} upgrade`;
53
54
  const EXTENSION_LIFECYCLE_FLAGS = toCompletionFlagString(EXTENSION_FLAG_CONTRACTS);
54
55
  const PACKAGE_LIFECYCLE_FLAGS = toCompletionFlagString(PACKAGE_FLAG_CONTRACTS);
56
+ const UPGRADE_FLAGS = toCompletionFlagString(UPGRADE_FLAG_CONTRACTS);
55
57
  const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
56
58
  const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
57
59
  const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --duplicate-of --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
@@ -59,7 +61,6 @@ const RELEASE_MUTATION_FLAGS = "--author --message --force --json --quiet --no-c
59
61
  const COMMAND_COMPLETION_DESCRIPTIONS = [
60
62
  ["init", "Initialize pm storage for the current workspace"],
61
63
  ["config", "Read or update pm settings"],
62
- ["extension", "Manage extension lifecycle operations"],
63
64
  ["package", "Manage package lifecycle operations"],
64
65
  ["packages", "Alias for package"],
65
66
  ["create", "Create a new project management item"],
@@ -515,13 +516,13 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
515
516
  "",
516
517
  ...(useEagerTagExpansion
517
518
  ? [
518
- ' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then',
519
+ ' if [[ ( "$prev" == "--tag" || "$prev" == "--tags" ) && ! ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
519
520
  ` COMPREPLY=(${compgen(tagValues)})`,
520
521
  " return 0",
521
522
  " fi",
522
523
  ]
523
524
  : [
524
- ' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then',
525
+ ' if [[ ( "$prev" == "--tag" || "$prev" == "--tags" ) && ! ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
525
526
  " local now ttl cache_ts tag_values",
526
527
  ' now="$(date +%s 2>/dev/null || echo 0)"',
527
528
  ' ttl="${PM_COMPLETION_TAG_TTL:-120}"',
@@ -537,6 +538,11 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
537
538
  " fi",
538
539
  ]),
539
540
  "",
541
+ ' if [[ "$prev" == "--tag" && ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
542
+ " COMPREPLY=()",
543
+ " return 0",
544
+ " fi",
545
+ "",
540
546
  ' local cmd="${COMP_WORDS[1]}"',
541
547
  "",
542
548
  ' case "$cmd" in',
@@ -589,10 +595,10 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
589
595
  ` COMPREPLY=(${compgen("--criterion --clear-criteria --format --policy --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
590
596
  " ;;",
591
597
  " extension)",
592
- ` COMPREPLY=(${compgen(`${LIFECYCLE_ACTIONS} ${EXTENSION_LIFECYCLE_FLAGS}`)})`,
598
+ ` COMPREPLY=(${compgen(`${EXTENSION_LIFECYCLE_ACTIONS} ${EXTENSION_LIFECYCLE_FLAGS}`)})`,
593
599
  " ;;",
594
600
  " package|packages)",
595
- ` COMPREPLY=(${compgen(`${LIFECYCLE_ACTIONS} ${PACKAGE_LIFECYCLE_FLAGS}`)})`,
601
+ ` COMPREPLY=(${compgen(`${PACKAGE_LIFECYCLE_ACTIONS} ${PACKAGE_LIFECYCLE_FLAGS} ${UPGRADE_FLAGS}`)})`,
596
602
  " ;;",
597
603
  " comments)",
598
604
  ` COMPREPLY=(${compgen("--add --body --stdin --file --edit --delete --limit --full-history --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
@@ -706,6 +712,9 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
706
712
  ` COMPREPLY=(${compgen(GLOBAL_FLAGS)})`,
707
713
  " ;;",
708
714
  " esac",
715
+ ' if [[ "$cmd" == "comments" || "$cmd" == "notes" || "$cmd" == "learnings" ]]; then',
716
+ ` COMPREPLY+=(${compgen("--text")})`,
717
+ " fi",
709
718
  " return 0",
710
719
  "}",
711
720
  "",
@@ -778,6 +787,7 @@ _pm() {
778
787
  local context state line
779
788
  _arguments -C \\
780
789
  '--json[Output JSON instead of TOON]' \\
790
+ '--all[Reveal every public command and compatibility alias]' \\
781
791
  '--quiet[Suppress stdout output]' \\
782
792
  '--output-include[Retain comma-separated read fields or sections]:selectors' \\
783
793
  '--output-limit[Set the universal read row ceiling]:limit' \\
@@ -1353,6 +1363,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1353
1363
  comments)
1354
1364
  _arguments \\
1355
1365
  '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
1366
+ '--text[Alias for --add]:text' \\
1356
1367
  '--stdin[Read comment text from stdin (supports multiline markdown)]' \\
1357
1368
  '--file[Read comment text from file (supports multiline markdown)]:path' \\
1358
1369
  '--edit[Replace the comment at 1-based index (text from positional/--add/--stdin/--file)]:index' \\
@@ -1368,6 +1379,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1368
1379
  notes)
1369
1380
  _arguments \\
1370
1381
  '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
1382
+ '--text[Alias for --add]:text' \\
1371
1383
  '--add-json[Append one validated JSON context event]:json' \\
1372
1384
  '--stdin[Read entry text from stdin]' \\
1373
1385
  '--file[Read entry text from file]:path' \\
@@ -1387,6 +1399,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1387
1399
  learnings)
1388
1400
  _arguments \\
1389
1401
  '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
1402
+ '--text[Alias for --add]:text' \\
1390
1403
  '--stdin[Read entry text from stdin]' \\
1391
1404
  '--file[Read entry text from file]:path' \\
1392
1405
  '--edit[Replace the entry at a 1-based index]:index' \\
@@ -1665,7 +1678,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1665
1678
  ;;
1666
1679
  extension)
1667
1680
  _arguments \\
1668
- '1:extension_action:(init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate)' \\
1681
+ '1:extension_action:(${EXTENSION_LIFECYCLE_ACTIONS})' \\
1669
1682
  '--init[Generate a starter extension scaffold at target path]' \\
1670
1683
  '--scaffold[Alias for --init]' \\
1671
1684
  '--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
@@ -1704,7 +1717,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1704
1717
  ;;
1705
1718
  package|packages)
1706
1719
  _arguments \\
1707
- '1:package_action:(init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate)' \\
1720
+ '1:package_action:(${PACKAGE_LIFECYCLE_ACTIONS})' \\
1708
1721
  '--init[Generate a starter package scaffold at target path]' \\
1709
1722
  '--scaffold[Alias for --init]' \\
1710
1723
  '--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
@@ -1738,6 +1751,12 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1738
1751
  '--ignore-global[Alias for --isolated]' \\
1739
1752
  '--strict-exit[Return non-zero exit when doctor warnings are present]' \\
1740
1753
  '--fail-on-warn[Alias for --strict-exit (doctor)]' \\
1754
+ '--dry-run[Plan upgrades without mutating]' \\
1755
+ '--cli-only[Upgrade only the pm CLI/SDK npm package]' \\
1756
+ '--packages-only[Upgrade only managed pm packages]' \\
1757
+ '--repair[Force npm global reinstall for the CLI/SDK]' \\
1758
+ '--tag[npm version or dist-tag for upgrades]:tag' \\
1759
+ '--package-name[Override the CLI package name]:package_name' \\
1741
1760
  '--json[Output JSON]' \\
1742
1761
  '--quiet[Suppress stdout]' \\
1743
1762
  '*:target_or_name:_files -/'
@@ -1818,6 +1837,7 @@ complete -c pm -f
1818
1837
 
1819
1838
  # Global flags (available for all subcommands)
1820
1839
  complete -c pm -l json -d 'Output JSON instead of TOON'
1840
+ complete -c pm -l all -d 'Reveal every public command and compatibility alias'
1821
1841
  complete -c pm -l quiet -d 'Suppress stdout output'
1822
1842
  complete -c pm -l output-include -d 'Retain comma-separated read fields or sections' -r
1823
1843
  complete -c pm -l output-limit -d 'Set the universal read row ceiling' -r
@@ -2423,6 +2443,7 @@ complete -c pm -n '__fish_seen_subcommand_from graph' -l summary -d 'Return coun
2423
2443
 
2424
2444
  # comments / notes / learnings flags
2425
2445
  complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l add -d 'Add one entry (text=<value> or plain text)' -r
2446
+ complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l text -d 'Alias for --add' -r
2426
2447
  complete -c pm -n '__fish_seen_subcommand_from notes' -l add-json -d 'Append one validated JSON context event' -r
2427
2448
  complete -c pm -n '__fish_seen_subcommand_from notes' -l since -d 'Return structured events at or after an ISO timestamp' -r
2428
2449
  complete -c pm -n '__fish_seen_subcommand_from notes' -l event-type -d 'Return structured events with this top-level type' -r
@@ -2666,7 +2687,7 @@ complete -c pm -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d
2666
2687
  complete -c pm -n '__fish_seen_subcommand_from templates' -a 'save list show' -d 'Templates command'
2667
2688
 
2668
2689
  # extension lifecycle flags
2669
- complete -c pm -n '__fish_seen_subcommand_from extension' -a '${LIFECYCLE_ACTIONS}' -d 'Extension action subcommand'
2690
+ complete -c pm -n '__fish_seen_subcommand_from extension' -a '${EXTENSION_LIFECYCLE_ACTIONS}' -d 'Extension action subcommand'
2670
2691
  complete -c pm -n '__fish_seen_subcommand_from extension' -l init -d 'Generate starter extension scaffold'
2671
2692
  complete -c pm -n '__fish_seen_subcommand_from extension' -l scaffold -d 'Alias for --init'
2672
2693
  complete -c pm -n '__fish_seen_subcommand_from extension' -l capability -d 'Capability the init scaffold targets' -r -a '${SCAFFOLD_CAPABILITIES.join(" ")}'
@@ -2702,7 +2723,7 @@ complete -c pm -n '__fish_seen_subcommand_from extension' -l fail-on-warn -d 'Al
2702
2723
 
2703
2724
  # package lifecycle flags
2704
2725
  for package_cmd in package packages
2705
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -a '${LIFECYCLE_ACTIONS}' -d 'Package action subcommand'
2726
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -a '${PACKAGE_LIFECYCLE_ACTIONS}' -d 'Package action subcommand'
2706
2727
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l init -d 'Generate starter package scaffold'
2707
2728
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l scaffold -d 'Alias for --init'
2708
2729
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l capability -d 'Capability the init scaffold targets' -r -a '${SCAFFOLD_CAPABILITIES.join(" ")}'
@@ -2736,6 +2757,12 @@ for package_cmd in package packages
2736
2757
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l ignore-global -d 'Alias for --isolated'
2737
2758
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l strict-exit -d 'Return non-zero exit when doctor warnings are present'
2738
2759
  complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l fail-on-warn -d 'Alias for --strict-exit (doctor)'
2760
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l dry-run -d 'Plan upgrades without mutating'
2761
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l cli-only -d 'Upgrade only the pm CLI/SDK npm package'
2762
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l packages-only -d 'Upgrade only managed pm packages'
2763
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l repair -d 'Force npm global reinstall for the CLI/SDK'
2764
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l tag -d 'npm version or dist-tag for upgrades' -r
2765
+ complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l package-name -d 'Override the CLI package name' -r
2739
2766
  end`;
2740
2767
  }
2741
2768
  const SETUP_HINTS = {
@@ -2767,4 +2794,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
2767
2794
  };
2768
2795
  }
2769
2796
  //# sourceMappingURL=completion.js.map
2770
- //# debugId=48da3e98-ab96-54de-8993-7de0c4edf19b
2797
+ //# debugId=c8446891-4e65-54c3-9826-eb40f4922f3b
@@ -31,6 +31,9 @@ import type { ProjectProfileRegistrationInput } from "../core/profile/profile-pr
31
31
  import type { PmMaxVersionExceededMode } from "../core/extensions/extension-types.js";
32
32
  import type { RelationshipKindDefinition } from "./relationships.js";
33
33
  import { type PmVersionBoundKind } from "../core/extensions/version-compat.js";
34
+ import { inspectExtensionManifestSchema, lintExtensionManifestSchema, type ExtensionManifestSchemaFinding, type ExtensionManifestSchemaInspection, type ExtensionManifestSchemaLintResult } from "../core/extensions/manifest-schema.js";
35
+ export { inspectExtensionManifestSchema, lintExtensionManifestSchema };
36
+ export type { ExtensionManifestSchemaFinding, ExtensionManifestSchemaInspection, ExtensionManifestSchemaLintResult, };
34
37
  /**
35
38
  * Documents the extension module payload exchanged by command, SDK, and package integrations.
36
39
  *
@@ -489,7 +492,7 @@ export interface ExtensionManifestCompatibilityFinding {
489
492
  export interface ExtensionManifestCompatibilityResult {
490
493
  /** `true` when no `error`-severity finding blocks the load against the target version. */
491
494
  compatible: boolean;
492
- /** Every bound finding, lower bound before upper bound; empty when both bounds are absent or satisfied. */
495
+ /** Every schema and bound finding in stable evaluation order. */
493
496
  findings: ExtensionManifestCompatibilityFinding[];
494
497
  /** The target pm version the manifest was checked against, echoed back for messaging. */
495
498
  pmVersion: string;
@@ -1,11 +1,12 @@
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]="bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e")}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]="23224ef3-9c86-5ae7-9ad8-0b3c687d4df7")}catch(e){}}();
3
3
  import { normalizeKnownExtensionCapability, resolveLegacyExtensionCapabilityAlias, } from "../core/extensions/extension-capability-aliases.js";
4
4
  import { normalizeCommandName } from "../core/extensions/extension-runtime-helpers.js";
5
5
  import { RESERVED_ITEM_FIELD_NAMES } from "../core/extensions/item-fields.js";
6
6
  import { describeExtensionLongFlagFailure, findExtensionFlagTokenFailure, } from "../core/extensions/flag-definition-validation.js";
7
7
  import { evaluatePmMaxVersionBound, evaluatePmMinVersionBound, } from "../core/extensions/version-compat.js";
8
- import { inspectExtensionManifestSchema } from "../core/extensions/manifest-schema.js";
8
+ import { inspectExtensionManifestSchema, lintExtensionManifestSchema, } from "../core/extensions/manifest-schema.js";
9
+ export { inspectExtensionManifestSchema, lintExtensionManifestSchema };
9
10
  /**
10
11
  * Typed identity helper for extension module exports.
11
12
  *
@@ -962,47 +963,33 @@ function toCompatibilityFinding(evaluation, pmVersion) {
962
963
  export function checkExtensionManifestCompatibility(manifest, target) {
963
964
  const minEvaluation = evaluatePmMinVersionBound(manifest.pm_min_version, target.pmVersion);
964
965
  const maxEvaluation = evaluatePmMaxVersionBound(manifest.pm_max_version, target.pmVersion, target.pmMaxVersionExceededMode ?? "block");
965
- const findings = [];
966
- const schema = inspectExtensionManifestSchema(manifest);
967
- for (const key of schema.unknownKeys) {
968
- findings.push({
969
- code: "manifest_unknown_key",
970
- severity: "warning",
971
- constraint: "manifest",
972
- required: key,
973
- current: target.pmVersion,
974
- path: key,
975
- ...(key === "compatibility"
976
- ? { suggested_key: "pm_min_version" }
977
- : {}),
978
- message: key === "compatibility"
979
- ? 'Manifest key "compatibility" is ignored; declare the canonical pm_min_version and optional pm_max_version fields instead.'
980
- : `Manifest key "${key}" is not part of the extension manifest contract and will be ignored.`,
981
- });
982
- }
983
- if (schema.missingVersionBounds) {
984
- findings.push({
985
- code: "no_version_bounds_declared",
986
- severity: "warning",
987
- constraint: "manifest",
988
- required: "pm_min_version",
989
- current: target.pmVersion,
990
- path: "$",
991
- suggested_key: "pm_min_version",
992
- message: "No canonical pm version bounds are declared; add pm_min_version so compatibility intent is explicit.",
993
- });
994
- }
966
+ const schema = lintExtensionManifestSchema(manifest);
967
+ const schemaFindings = schema.findings.map((finding) => ({
968
+ code: finding.code,
969
+ severity: "warning",
970
+ constraint: "manifest",
971
+ required: finding.code === "manifest_unknown_key"
972
+ ? finding.path
973
+ : "pm_min_version",
974
+ current: target.pmVersion,
975
+ path: finding.path,
976
+ ...(finding.suggested_key
977
+ ? { suggested_key: finding.suggested_key }
978
+ : {}),
979
+ message: finding.message,
980
+ }));
981
+ const compatibilityFindings = [];
995
982
  const minFinding = toCompatibilityFinding(minEvaluation, target.pmVersion);
996
983
  if (minFinding !== null) {
997
- findings.push(minFinding);
984
+ compatibilityFindings.push(minFinding);
998
985
  }
999
986
  const maxFinding = toCompatibilityFinding(maxEvaluation, target.pmVersion);
1000
987
  if (maxFinding !== null) {
1001
- findings.push(maxFinding);
988
+ compatibilityFindings.push(maxFinding);
1002
989
  }
1003
990
  return {
1004
991
  compatible: minEvaluation.allowed && maxEvaluation.allowed,
1005
- findings,
992
+ findings: [...schemaFindings, ...compatibilityFindings],
1006
993
  pmVersion: target.pmVersion,
1007
994
  };
1008
995
  }
@@ -1101,4 +1088,4 @@ export function preflightExtension(blueprint, options = {}) {
1101
1088
  };
1102
1089
  }
1103
1090
  //# sourceMappingURL=compose.js.map
1104
- //# debugId=bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e
1091
+ //# debugId=23224ef3-9c86-5ae7-9ad8-0b3c687d4df7
@@ -0,0 +1,22 @@
1
+ import { type ExtensionManifestSchemaFinding } from "../../core/extensions/manifest-schema.js";
2
+ /** Read-only author-workspace manifest diagnostic shared by health and doctor. */
3
+ export interface ExtensionAuthorManifestDiagnostic {
4
+ /** Absolute path inspected for the extension runtime manifest. */
5
+ path: string;
6
+ /** Whether the workspace declares a root extension manifest. */
7
+ present: boolean;
8
+ /** Parse state for absent, valid, or malformed manifest content. */
9
+ parse_status: "absent" | "valid" | "invalid_json" | "invalid_shape";
10
+ /** Canonical package catalog metadata location, distinct from manifest.json. */
11
+ package_metadata_location: "package.json#pm";
12
+ /** Public schema findings when the file is a JSON object. */
13
+ schema_findings: ExtensionManifestSchemaFinding[];
14
+ /** Runtime warning tokens incorporated into health/doctor status. */
15
+ warnings: string[];
16
+ /** Direct author correction for every reported state. */
17
+ remediation: string[];
18
+ }
19
+ /** Inspect `<workspace>/manifest.json` without loading extension code. */
20
+ export declare function inspectExtensionAuthorManifest(workspaceRoot: string): Promise<ExtensionAuthorManifestDiagnostic>;
21
+ /** Inspect the author manifest for a resolved project tracker root. */
22
+ export declare function inspectExtensionAuthorManifestAtPmRoot(pmRoot: string): Promise<ExtensionAuthorManifestDiagnostic>;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * @module sdk/extension/author-manifest
3
+ *
4
+ * Reads the optional extension manifest at a package-author workspace root and
5
+ * projects the public schema lint into health/doctor diagnostics.
6
+ */
7
+
8
+ !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]="5755dee7-d2df-5ced-8a94-aeb51762edb7")}catch(e){}}();
9
+ import fs from "node:fs/promises";
10
+ import path from "node:path";
11
+ import { isFileAbsentError } from "../../core/fs/fs-utils.js";
12
+ import { lintExtensionManifestSchema, } from "../../core/extensions/manifest-schema.js";
13
+ import { resolveWorkspaceRoot } from "../../core/store/paths.js";
14
+ function manifestName(raw) {
15
+ return typeof raw.name === "string" && raw.name.trim().length > 0
16
+ ? raw.name.trim()
17
+ : "workspace-manifest";
18
+ }
19
+ function authorManifestWarning(name, finding) {
20
+ return finding.code === "manifest_unknown_key"
21
+ ? `extension_manifest_unknown_key:author:${name}:key=${finding.path}${finding.suggested_key ? `:suggested=${finding.suggested_key}` : ""}`
22
+ : `extension_manifest_no_version_bounds:author:${name}:suggested=pm_min_version`;
23
+ }
24
+ /** Inspect `<workspace>/manifest.json` without loading extension code. */
25
+ export async function inspectExtensionAuthorManifest(workspaceRoot) {
26
+ const manifestPath = path.join(workspaceRoot, "manifest.json");
27
+ let content;
28
+ try {
29
+ content = await fs.readFile(manifestPath, "utf8");
30
+ }
31
+ catch (error) {
32
+ if (isFileAbsentError(error)) {
33
+ return {
34
+ path: manifestPath,
35
+ present: false,
36
+ parse_status: "absent",
37
+ package_metadata_location: "package.json#pm",
38
+ schema_findings: [],
39
+ warnings: [],
40
+ remediation: [],
41
+ };
42
+ }
43
+ throw error;
44
+ }
45
+ let parsed;
46
+ try {
47
+ parsed = JSON.parse(content);
48
+ }
49
+ catch {
50
+ return {
51
+ path: manifestPath,
52
+ present: true,
53
+ parse_status: "invalid_json",
54
+ package_metadata_location: "package.json#pm",
55
+ schema_findings: [],
56
+ warnings: ["extension_author_manifest_invalid_json:manifest.json"],
57
+ remediation: [
58
+ "Repair manifest.json so it contains one valid JSON object, then rerun pm package doctor --project.",
59
+ ],
60
+ };
61
+ }
62
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
63
+ return {
64
+ path: manifestPath,
65
+ present: true,
66
+ parse_status: "invalid_shape",
67
+ package_metadata_location: "package.json#pm",
68
+ schema_findings: [],
69
+ warnings: ["extension_author_manifest_invalid_shape:manifest.json"],
70
+ remediation: [
71
+ "Replace manifest.json with one JSON object, then rerun pm package doctor --project.",
72
+ ],
73
+ };
74
+ }
75
+ const raw = parsed;
76
+ const lint = lintExtensionManifestSchema(raw);
77
+ const name = manifestName(raw);
78
+ return {
79
+ path: manifestPath,
80
+ present: true,
81
+ parse_status: "valid",
82
+ package_metadata_location: "package.json#pm",
83
+ schema_findings: lint.findings,
84
+ warnings: lint.findings.map((finding) => authorManifestWarning(name, finding)),
85
+ remediation: lint.findings.map((finding) => finding.message),
86
+ };
87
+ }
88
+ /** Inspect the author manifest for a resolved project tracker root. */
89
+ export function inspectExtensionAuthorManifestAtPmRoot(pmRoot) {
90
+ return inspectExtensionAuthorManifest(resolveWorkspaceRoot(pmRoot));
91
+ }
92
+ //# sourceMappingURL=author-manifest.js.map
93
+ //# debugId=5755dee7-d2df-5ced-8a94-aeb51762edb7
@@ -4,7 +4,7 @@
4
4
  * Implements the pm extension command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="8b0fbe09-2221-5b8e-8712-90a83df19306")}catch(e){}}();
7
+ !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]="8d5ed026-8d61-5083-956c-9281caa0168b")}catch(e){}}();
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
  import { activateExtensions, createSerialQueue, loadExtensions, nextExtensionReloadToken, } from "../core/extensions/index.js";
@@ -41,6 +41,7 @@ import { collectGlobalOutputOverrideDoctorWarnings } from "./extension/output-ow
41
41
  import { collectMcpCustomFieldCollisionDoctorWarnings } from "./extension/custom-field-collisions.js";
42
42
  import { checkGithubUpdate } from "./extension/update-check.js";
43
43
  import { runExtensionMigrateAction } from "./extension/migrations.js";
44
+ import { inspectExtensionAuthorManifestAtPmRoot } from "./extension/author-manifest.js";
44
45
  import { resolveExtensionInstallSourceIdentity, } from "./extension/source-resolution.js";
45
46
  import { captureExtensionInstallSnapshot, readOptionalMetadataFile, restoreExtensionInstallSnapshot, } from "./extension/install-snapshot.js";
46
47
  // Re-export the public surface that lives in sibling modules but was previously
@@ -1773,7 +1774,8 @@ const runExtensionDoctorAction = async (ctx) => {
1773
1774
  ...loadResult,
1774
1775
  loaded: loadResult.loaded,
1775
1776
  });
1776
- warnings.push(...loadResult.warnings);
1777
+ const authorManifest = await inspectExtensionAuthorManifestAtPmRoot(resolvedRoots.pm_root);
1778
+ warnings.push(...authorManifest.warnings, ...loadResult.warnings);
1777
1779
  warnings.push(...classifyDoctorLoadFailureWarnings(loadResult.failed));
1778
1780
  warnings.push(...activationResult.warnings);
1779
1781
  warnings.push(...classifyDoctorActivationFailureWarnings(activationResult.failed));
@@ -1885,6 +1887,7 @@ const runExtensionDoctorAction = async (ctx) => {
1885
1887
  capability_contract: capabilityContract,
1886
1888
  capability_guidance: capabilityGuidance,
1887
1889
  managed_state_fix: managedStateFixSummary,
1890
+ author_manifest: authorManifest,
1888
1891
  isolation,
1889
1892
  policy: loadResult.policy,
1890
1893
  };
@@ -2191,4 +2194,4 @@ export const _testOnly = {
2191
2194
  withExtensionInstallLock,
2192
2195
  };
2193
2196
  //# sourceMappingURL=extension.js.map
2194
- //# debugId=8b0fbe09-2221-5b8e-8712-90a83df19306
2197
+ //# debugId=8d5ed026-8d61-5083-956c-9281caa0168b