@unbrained/pm-cli 2026.8.17 → 2026.8.19

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 (204) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +4 -3
  3. package/CHANGELOG.md +51 -5
  4. package/README.md +3 -3
  5. package/dist/cli/error-guidance.js +8 -4
  6. package/dist/cli/help-content.js +32 -13
  7. package/dist/cli/help-json-payload.d.ts +15 -0
  8. package/dist/cli/help-json-payload.js +101 -23
  9. package/dist/cli/main.js +6 -2
  10. package/dist/cli/register-list-query.js +138 -54
  11. package/dist/cli/register-mutation.js +8 -8
  12. package/dist/cli/register-operations.js +6 -6
  13. package/dist/cli-bundle/bundle-manifest.json +149 -149
  14. package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
  15. package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +13 -0
  16. package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BHYMXLAE.js} +2 -2
  17. package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
  18. package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
  19. package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
  20. package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-OIOKV6NO.js} +58 -54
  21. package/dist/cli-bundle/chunks/chunk-QXSH7BLM.js +3 -0
  22. package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
  23. package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-TOXJM4WA.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-YBMRWW4E.js} +44 -44
  25. package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +11 -0
  26. package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
  27. package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
  28. package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-I4LUHGVW.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +155 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-BJRYFVSH.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-EF6ZS5GH.js} +44 -44
  33. package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-ESISGDAY.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EXBCLIBU.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/chunk-JDOMQ7VQ.js +4 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
  37. package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-PRHY2IMX.js} +3 -3
  40. package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-US7VEYZG.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/chunk-VXDSU5MC.js +26 -0
  43. package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-ZBIQQYMI.js} +2 -2
  46. package/dist/cli-bundle/main.js +13 -13
  47. package/dist/cli-bundle/sdk-authoring.js +1 -1
  48. package/dist/cli-bundle/sdk-contracts.js +2 -1
  49. package/dist/cli-bundle/sdk-core.js +28 -28
  50. package/dist/cli-bundle/sdk-governance.js +1 -1
  51. package/dist/cli-bundle/sdk-graph.js +1 -1
  52. package/dist/cli-bundle/sdk-merge.js +32 -32
  53. package/dist/cli-bundle/sdk-query.js +1 -1
  54. package/dist/cli-bundle/sdk-runtime.js +1 -1
  55. package/dist/cli-bundle/sdk-testing.js +1 -1
  56. package/dist/cli-bundle/sdk.js +5 -4
  57. package/dist/core/config/nested-settings.js +8 -2
  58. package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
  59. package/dist/core/extensions/exporter-output-contract.js +67 -0
  60. package/dist/core/extensions/extension-types.d.ts +36 -1
  61. package/dist/core/extensions/extension-types.js +2 -2
  62. package/dist/core/extensions/loader.js +35 -44
  63. package/dist/core/history/event-index.d.ts +5 -0
  64. package/dist/core/history/event-index.js +133 -27
  65. package/dist/core/sentry/helpers.js +3 -3
  66. package/dist/core/shared/constants.js +5 -2
  67. package/dist/core/shared/errors.d.ts +2 -0
  68. package/dist/core/shared/errors.js +2 -2
  69. package/dist/core/store/settings-validator.d.ts +4 -0
  70. package/dist/core/store/settings-validator.js +3 -2
  71. package/dist/core/store/settings.js +8 -2
  72. package/dist/mcp/tool-definitions.js +12 -7
  73. package/dist/sdk/agent/refusal-closure.d.ts +41 -0
  74. package/dist/sdk/agent/refusal-closure.js +92 -0
  75. package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
  76. package/dist/sdk/agent/refusal-reachability.js +4 -4
  77. package/dist/sdk/agent-capability-contracts.d.ts +13 -0
  78. package/dist/sdk/agent-capability-contracts.js +104 -7
  79. package/dist/sdk/authoring.d.ts +1 -1
  80. package/dist/sdk/authoring.js +2 -2
  81. package/dist/sdk/cli-bootstrap.d.ts +2 -2
  82. package/dist/sdk/cli-bootstrap.js +4 -4
  83. package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
  84. package/dist/sdk/cli-contracts/command-aliases.js +80 -13
  85. package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
  86. package/dist/sdk/cli-contracts/commander-types.js +5 -4
  87. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
  88. package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
  89. package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
  90. package/dist/sdk/cli-contracts/flag-contracts.js +84 -13
  91. package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
  92. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
  93. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +151 -0
  94. package/dist/sdk/cli-contracts/grammar-contracts.js +958 -0
  95. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +33 -5
  96. package/dist/sdk/cli-contracts/runtime-contracts.js +100 -23
  97. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
  98. package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
  99. package/dist/sdk/cli-contracts/tool-parameter-tables.js +7 -2
  100. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  101. package/dist/sdk/cli-contracts/tool-schema.js +20 -11
  102. package/dist/sdk/cli-contracts.d.ts +5 -4
  103. package/dist/sdk/cli-contracts.js +7 -6
  104. package/dist/sdk/completion.js +13 -15
  105. package/dist/sdk/compose.d.ts +3 -3
  106. package/dist/sdk/compose.js +2 -2
  107. package/dist/sdk/context-intent-contracts.d.ts +2 -2
  108. package/dist/sdk/context-intent-contracts.js +22 -7
  109. package/dist/sdk/contracts.d.ts +3 -0
  110. package/dist/sdk/contracts.js +5 -2
  111. package/dist/sdk/core.d.ts +1 -1
  112. package/dist/sdk/core.js +3 -3
  113. package/dist/sdk/environment/host-environment-errors.js +3 -3
  114. package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
  115. package/dist/sdk/flag-invocation-contracts.js +218 -9
  116. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +186 -14
  117. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +194 -26
  118. package/dist/sdk/guide-topics.js +5 -5
  119. package/dist/sdk/index.d.ts +10 -7
  120. package/dist/sdk/index.js +10 -7
  121. package/dist/sdk/init-agent-guidance.js +3 -3
  122. package/dist/sdk/mutation-events.d.ts +18 -2
  123. package/dist/sdk/mutation-events.js +59 -16
  124. package/dist/sdk/output-projection.d.ts +2 -0
  125. package/dist/sdk/output-projection.js +11 -5
  126. package/dist/sdk/output.d.ts +44 -0
  127. package/dist/sdk/output.js +28 -2
  128. package/dist/sdk/query/complete-list.d.ts +94 -0
  129. package/dist/sdk/query/complete-list.js +173 -0
  130. package/dist/sdk/query/get.js +25 -6
  131. package/dist/sdk/query/list.js +19 -2
  132. package/dist/sdk/query/search-contracts.d.ts +1 -1
  133. package/dist/sdk/query/search-contracts.js +23 -9
  134. package/dist/sdk/query/search.js +3 -3
  135. package/dist/sdk/query.d.ts +1 -0
  136. package/dist/sdk/query.js +3 -2
  137. package/dist/sdk/read-output/continuation.d.ts +1 -1
  138. package/dist/sdk/read-output/continuation.js +7 -24
  139. package/dist/sdk/read-output-contracts.d.ts +2 -2
  140. package/dist/sdk/read-output-contracts.js +89 -13
  141. package/dist/sdk/read-output-rows.d.ts +4 -0
  142. package/dist/sdk/read-output-rows.js +47 -18
  143. package/dist/sdk/runtime-extended-actions.js +10 -2
  144. package/dist/sdk/runtime.d.ts +8 -2
  145. package/dist/sdk/runtime.js +18 -11
  146. package/dist/sdk/workspace-snapshot.d.ts +2 -0
  147. package/dist/sdk/workspace-snapshot.js +10 -2
  148. package/dist/types.d.ts +5 -0
  149. package/dist/types.js +2 -2
  150. package/docs/AGENT_GUIDE.md +25 -9
  151. package/docs/CLI_GRAMMAR.md +106 -0
  152. package/docs/COMMANDS.md +39 -27
  153. package/docs/ONBOARDING.md +4 -4
  154. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
  155. package/docs/QUICKSTART.md +1 -1
  156. package/docs/README.md +2 -0
  157. package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
  158. package/docs/RELEASING.md +30 -6
  159. package/docs/SDK.md +42 -2
  160. package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
  161. package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
  162. package/docs/TESTING.md +14 -1
  163. package/docs/agent-task-token-baseline.json +5 -5
  164. package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
  165. package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
  166. package/marketplace.json +2 -2
  167. package/package.json +5 -2
  168. package/packages/pm-beads/package.json +1 -1
  169. package/packages/pm-calendar/package.json +1 -1
  170. package/packages/pm-command-kit/package.json +1 -1
  171. package/packages/pm-digital-twin/package.json +1 -1
  172. package/packages/pm-governance-audit/package.json +1 -1
  173. package/packages/pm-guide-shell/package.json +1 -1
  174. package/packages/pm-kanban/package.json +1 -1
  175. package/packages/pm-lifecycle-hooks/package.json +1 -1
  176. package/packages/pm-linked-test-adapters/package.json +1 -1
  177. package/packages/pm-search-advanced/package.json +1 -1
  178. package/packages/pm-templates/package.json +1 -1
  179. package/packages/pm-todos/package.json +1 -1
  180. package/packages/pm-vcs/package.json +1 -1
  181. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  182. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  183. package/scripts/generate-agent-capability-surfaces.mjs +20 -14
  184. package/sdk/public-surface.json +1245 -60
  185. package/dist/cli-bundle/chunks/chunk-2QLOXC3V.js +0 -3
  186. package/dist/cli-bundle/chunks/chunk-4JPYF536.js +0 -35
  187. package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +0 -13
  188. package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +0 -197
  189. package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
  190. package/dist/cli-bundle/chunks/chunk-TPXZIBIV.js +0 -5
  191. package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +0 -2
  192. package/dist/cli-bundle/chunks/register-list-query-Q7KII4G5.js +0 -10
  193. package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +0 -20
  194. package/dist/cli-bundle/chunks/register-operations-SSENDH5B.js +0 -2
  195. package/dist/cli-bundle/focused-chunks/chunk-267MUUS6.js +0 -16
  196. package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +0 -2
  197. package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +0 -2
  198. package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +0 -2
  199. package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +0 -2
  200. package/dist/cli-bundle/focused-chunks/chunk-KGEXTMPG.js +0 -2
  201. package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +0 -2
  202. package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +0 -4
  203. package/dist/cli-bundle/focused-chunks/chunk-XPIC53VA.js +0 -26
  204. package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +0 -155
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { type GlobalOptions, type ExtensionRegistrationRegistry, type RegisteredExtensionCommandDefinition, type RegisteredExtensionFlagDefinitions, type RuntimeFieldRegistry, readSettings } from "../runtime-primitives.js";
7
7
  import { type McpToolContract } from "../../mcp/tool-definitions.js";
8
- import { PM_TOOL_ACTIONS, type CliFlagContract, type CommanderOptionAliasContract, type PmCommandOutputBudgetContract } from "../cli-contracts.js";
8
+ import { PM_TOOL_ACTIONS, type CliFlagContract, type CommanderOptionAliasContract, type PmCommandOutputBudgetContract, type PmCommandAliasContract } from "../cli-contracts.js";
9
9
  import { type ListCommandName, type ListProjectionMode } from "../query/list.js";
10
10
  import { type PmContextIntentContract } from "../context-intent-contracts.js";
11
11
  import { type PmReadOutputSurfaceContract } from "../read-output-contracts.js";
@@ -14,6 +14,7 @@ import { type PmCommandVisibilityTier } from "../agent-capability-contracts.js";
14
14
  import type { PmErrorCodeContract } from "../error-code-catalog.js";
15
15
  import { type PmCommandOutputEnvelopeContract } from "../output-contracts.js";
16
16
  import { type PmCommandExitContract, type PmCommandExitOutcomeContract } from "./command-exit-contracts.js";
17
+ import { type PmCommandPositionalContract, type PmCommandDestinationContract } from "./grammar-contracts.js";
17
18
  /** Documents the contracts command options payload exchanged by command, SDK, and package integrations. */
18
19
  export interface ContractsCommandOptions {
19
20
  /** Value that configures or reports action for this contract. */
@@ -38,6 +39,7 @@ interface CommandFlagSurface {
38
39
  canonical_command?: string;
39
40
  visibility?: PmCommandVisibilityTier;
40
41
  flags: CliFlagContract[];
42
+ positionals?: PmCommandPositionalContract["slots"];
41
43
  flag_invocations?: CliFlagInvocationContract[];
42
44
  provider?: "core" | "extension" | "mixed";
43
45
  extension_sources?: Array<{
@@ -45,9 +47,14 @@ interface CommandFlagSurface {
45
47
  name: string;
46
48
  }>;
47
49
  }
48
- interface CommandAliasSurface {
50
+ /** Grouped command-alias projection retained for backward-compatible consumers. */
51
+ export interface CommandAliasSurface {
52
+ /** Canonical command path shared by the grouped aliases. */
49
53
  canonical: string;
54
+ /** Accepted alternate spellings for the canonical path. */
50
55
  aliases: string[];
56
+ /** Per-spelling lifecycle, visibility, replacement, and ownership metadata. */
57
+ contracts?: PmCommandAliasContract[];
51
58
  }
52
59
  /** Machine-readable projection behavior for one list command. */
53
60
  interface ListCommandProjectionSurface {
@@ -93,6 +100,20 @@ export interface ContractsResult {
93
100
  list_projections?: ListCommandProjectionSurface[];
94
101
  /** Value that configures or reports command aliases for this contract. */
95
102
  command_aliases?: CommandAliasSurface[];
103
+ /** Noun–verb routing policy and exhaustive current-command destinations. */
104
+ grammar_contracts?: {
105
+ nouns: readonly string[];
106
+ shared_verbs: readonly string[];
107
+ scope_before_verb: boolean;
108
+ visible_top_level_ceiling: number;
109
+ ceiling_raise_requires_pm_item: boolean;
110
+ positional_shape_budget: number;
111
+ positional_shape_count: number;
112
+ positional_action_count: number;
113
+ positional_action_parents: readonly string[];
114
+ positional_signatures?: readonly PmCommandPositionalContract[];
115
+ destinations?: readonly PmCommandDestinationContract[];
116
+ };
96
117
  /** Value that configures or reports commander aliases for this contract. */
97
118
  commander_aliases?: Record<string, CommanderOptionAliasContract[]>;
98
119
  /** Value that configures or reports extension commands for this contract. */
@@ -236,10 +257,12 @@ interface CommandSummarySurface {
236
257
  command: string;
237
258
  aliases?: string[];
238
259
  intent: string;
239
- intent_source: "command" | "description" | "generated";
260
+ /** Non-default provenance in compact output; exhaustive provenance in full output. */
261
+ intent_source?: "command" | "description" | "generated";
240
262
  flags?: string[];
241
263
  default_max_estimated_tokens: number;
242
- default_max_estimated_tokens_by_format: {
264
+ /** Full-projection format detail; compact summaries retain the canonical default only. */
265
+ default_max_estimated_tokens_by_format?: {
243
266
  toon: number;
244
267
  json: number;
245
268
  };
@@ -283,9 +306,14 @@ declare function normalizeCommandForRuntimeFieldFlags(command: string): string;
283
306
  declare function toRuntimeLongFlagToken(token: string): string | null;
284
307
  declare function toRuntimeShortFlagToken(token: string): string | null;
285
308
  declare function buildRuntimeFieldFlagContracts(fieldRegistry: RuntimeFieldRegistry): Map<string, CliFlagContract[]>;
309
+ /** Build the executable alias projection from a command catalog and alias table. */
310
+ export declare function buildCommandAliasSurface(commands: string[], aliasContracts?: readonly PmCommandAliasContract[]): CommandAliasSurface[];
286
311
  declare function attachCreateRequiredOptionContracts(schema: Record<string, unknown>, metadata: Record<string, unknown>): Record<string, unknown>;
287
312
  declare function readContractsSettings(pmRoot: string, readSettingsFn?: typeof readSettings): Promise<Awaited<ReturnType<typeof readSettings>>>;
288
- declare function buildCommandSummarySurface(commands: readonly string[], extensionContracts?: readonly ExtensionCommandContract[]): CommandSummarySurface[];
313
+ declare function buildCommandSummarySurface(commands: readonly string[], extensionContracts?: readonly ExtensionCommandContract[], options?: {
314
+ includeFormatBudgets?: boolean;
315
+ includeIntentProvenance?: boolean;
316
+ }): CommandSummarySurface[];
289
317
  declare function buildCommandOutputContracts(commands: readonly string[]): NonNullable<ContractsResult["command_output_contracts"]>;
290
318
  declare function buildCommandExitContractGroups(commands: readonly string[]): NonNullable<ContractsResult["command_exit_contracts"]>["command_sets"];
291
319
  /** Implements run contracts for the public runtime surface of this module. */
@@ -4,10 +4,11 @@
4
4
  * Implements the pm contracts 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]="8cdd82c3-979e-5f7f-bc72-592c7e55f11c")}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]="30d9b9dd-f0a1-578e-90d6-3c019e0435b5")}catch(e){}}();
8
8
  import { EXIT_CODE, SETTINGS_DEFAULTS, PmCliError, activateExtensions, getActiveExtensionRegistrations, loadExtensions, pathExists, commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
9
9
  import { buildMcpToolContracts, } from "../../mcp/tool-definitions.js";
10
- import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
10
+ import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_DEPRECATED_TOOL_ACTIONS, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, PM_COMMAND_ALIAS_CONTRACTS, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
11
+ import { PM_POSITIONAL_ACTION_FLAG_CONTRACTS } from "./flag-contracts.js";
11
12
  import { GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES, GOVERNANCE_CREATE_MODE_DEFAULT_VALUES, GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES, GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES, } from "../../types.js";
12
13
  import { BRIEF_LIST_FIELDS, DEFAULT_COMPACT_LIST_FIELDS, LIST_COMMAND_DEFAULT_PROJECTIONS, } from "../query/list.js";
13
14
  import { getActiveContextIntentContracts, } from "../context-intent-contracts.js";
@@ -19,6 +20,7 @@ import { resolvePmCommandOutputEnvelope, } from "../output-contracts.js";
19
20
  import { PM_COMMAND_EXIT_OUTCOME_CONTRACTS, resolvePmCommandExitContract, } from "./command-exit-contracts.js";
20
21
  import { BUILTIN_RELATIONSHIP_KINDS } from "../relationship-kinds/contract.js";
21
22
  import { ASSURANCE_GATE_TRIGGERS, ASSURANCE_MEASUREMENT_SOURCE_KINDS, } from "../governance/assurance.js";
23
+ import { PM_CLI_GRAMMAR_CONTRACT, PM_COMMAND_DESTINATION_CONTRACTS, PM_COMMAND_POSITIONAL_CONTRACTS, PM_POSITIONAL_ACTION_CONTRACTS, positionalShapeKey, resolvePmCommandPositionalContract, } from "./grammar-contracts.js";
22
24
  const AGENT_BOOTSTRAP_FLAGS = new Map([
23
25
  [
24
26
  "claim",
@@ -409,6 +411,7 @@ const CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
409
411
  ["validate", VALIDATE_FLAG_CONTRACTS],
410
412
  ["health", HEALTH_FLAG_CONTRACTS],
411
413
  ["assurance", ASSURANCE_FLAG_CONTRACTS],
414
+ ...PM_POSITIONAL_ACTION_FLAG_CONTRACTS,
412
415
  ["contracts", CONTRACTS_FLAG_CONTRACTS],
413
416
  ["completion", COMPLETION_FLAG_CONTRACTS],
414
417
  ["activity", ACTIVITY_FLAG_CONTRACTS],
@@ -459,7 +462,8 @@ function actionDescriptorMatchesSelectedCommand(descriptor, selectedCommand) {
459
462
  if (commandPath === selectedCommand) {
460
463
  return true;
461
464
  }
462
- return commandPath.startsWith(`${selectedCommand} `);
465
+ return (commandPath.startsWith(`${selectedCommand} `) ||
466
+ selectedCommand.startsWith(`${commandPath} `));
463
467
  });
464
468
  }
465
469
  function splitCommandPathAliases(commandPath) {
@@ -1183,6 +1187,7 @@ function buildCommandFlagSurface(commands, extensionFlagMap, runtimeFieldFlagMap
1183
1187
  ? {
1184
1188
  canonical_command: canonicalSummaryCommand(command),
1185
1189
  visibility: resolvePmCommandVisibilityTier(canonicalSummaryCommand(command)),
1190
+ positionals: resolvePmCommandPositionalContract(command)?.slots ?? [],
1186
1191
  flag_invocations: enrichCliFlagInvocationContracts(command, flags),
1187
1192
  }
1188
1193
  : {}),
@@ -1192,12 +1197,40 @@ function buildCommandFlagSurface(commands, extensionFlagMap, runtimeFieldFlagMap
1192
1197
  })
1193
1198
  .sort((left, right) => left.command.localeCompare(right.command));
1194
1199
  }
1195
- function buildCommandAliasSurface(commands) {
1200
+ /** Build the executable alias projection from a command catalog and alias table. */
1201
+ export function buildCommandAliasSurface(commands, aliasContracts = PM_COMMAND_ALIAS_CONTRACTS) {
1196
1202
  const commandSet = new Set(commands);
1197
- return CANONICAL_COMMAND_ALIASES.map((entry) => ({
1198
- canonical: entry.canonical,
1199
- aliases: entry.aliases.filter((alias) => commandSet.has(alias)),
1200
- })).filter((entry) => commandSet.has(entry.canonical) && entry.aliases.length > 0);
1203
+ const grouped = new Map();
1204
+ for (const entry of CANONICAL_COMMAND_ALIASES) {
1205
+ const aliases = entry.aliases.filter((alias) => commandSet.has(alias));
1206
+ grouped.set(entry.canonical, {
1207
+ canonical: entry.canonical,
1208
+ aliases,
1209
+ contracts: [],
1210
+ });
1211
+ }
1212
+ for (const contract of aliasContracts) {
1213
+ if (!commandSet.has(contract.canonical)) {
1214
+ continue;
1215
+ }
1216
+ if (contract.registration === "commander" &&
1217
+ !commandSet.has(contract.alias)) {
1218
+ continue;
1219
+ }
1220
+ const entry = grouped.get(contract.canonical) ?? {
1221
+ canonical: contract.canonical,
1222
+ aliases: [],
1223
+ contracts: [],
1224
+ };
1225
+ if (!entry.aliases.includes(contract.alias)) {
1226
+ entry.aliases.push(contract.alias);
1227
+ }
1228
+ entry.contracts.push(contract);
1229
+ grouped.set(contract.canonical, entry);
1230
+ }
1231
+ return [...grouped.values()]
1232
+ .map(({ contracts, ...entry }) => contracts.length === 0 ? entry : { ...entry, contracts })
1233
+ .sort((left, right) => left.canonical.localeCompare(right.canonical));
1201
1234
  }
1202
1235
  function buildCommanderAliasSurface() {
1203
1236
  return {
@@ -1382,6 +1415,11 @@ function collectContractsActionDescriptors(selection, mergedExtensionContracts)
1382
1415
  const actionDescriptors = collectActionContractDescriptors(mergedExtensionContracts, {
1383
1416
  includePackageOwnedActions: shouldIncludePackageOwnedActions(selection),
1384
1417
  });
1418
+ if (selection.selectedAction === undefined &&
1419
+ selection.selectedCommand === undefined) {
1420
+ const deprecatedActions = new Set(PM_DEPRECATED_TOOL_ACTIONS);
1421
+ return actionDescriptors.filter((descriptor) => !deprecatedActions.has(descriptor.action));
1422
+ }
1385
1423
  if (shouldIncludePackageOwnedActions(selection) &&
1386
1424
  selection.selectedCommand !== undefined &&
1387
1425
  PACKAGE_OWNED_COMMANDS.has(selection.selectedCommand) &&
@@ -1604,8 +1642,13 @@ function resolveContractsCommands(selection, actionContext) {
1604
1642
  }
1605
1643
  return actionContext.commandCatalog;
1606
1644
  }
1607
- function resolveOutputCommands(_selection, commands) {
1608
- return commands;
1645
+ function resolveOutputCommands(selection, commands) {
1646
+ if (selection.selectedCommand !== undefined ||
1647
+ selection.selectedAction !== undefined) {
1648
+ return commands;
1649
+ }
1650
+ const hiddenAliases = new Set(PM_COMMAND_ALIAS_CONTRACTS.filter((contract) => contract.hidden && contract.lifecycle === "deprecated").map((contract) => contract.alias));
1651
+ return commands.filter((command) => !hiddenAliases.has(command));
1609
1652
  }
1610
1653
  function canonicalSummaryCommand(command) {
1611
1654
  const rootCommand = command.split(" ")[0];
@@ -1677,7 +1720,9 @@ function summarizeCommandIntent(command, extensionContracts) {
1677
1720
  intent_source: "generated",
1678
1721
  };
1679
1722
  }
1680
- function buildCommandSummarySurface(commands, extensionContracts = []) {
1723
+ function buildCommandSummarySurface(commands, extensionContracts = [], options = {}) {
1724
+ const includeFormatBudgets = options.includeFormatBudgets ?? true;
1725
+ const includeIntentProvenance = options.includeIntentProvenance ?? true;
1681
1726
  return [...new Set(commands.map(normalizeCommandPath))]
1682
1727
  .filter((command) => command.length > 0)
1683
1728
  .sort((left, right) => left.localeCompare(right))
@@ -1704,12 +1749,19 @@ function buildCommandSummarySurface(commands, extensionContracts = []) {
1704
1749
  const intent = summarizeCommandIntent(command, extensionContracts);
1705
1750
  return {
1706
1751
  command,
1707
- ...intent,
1752
+ intent: intent.intent,
1753
+ ...(includeIntentProvenance || intent.intent_source !== "command"
1754
+ ? { intent_source: intent.intent_source }
1755
+ : {}),
1708
1756
  ...(flags.length > 0 ? { flags } : {}),
1709
1757
  default_max_estimated_tokens: budget.default_max_estimated_tokens,
1710
- default_max_estimated_tokens_by_format: {
1711
- ...budget.default_max_estimated_tokens_by_format,
1712
- },
1758
+ ...(includeFormatBudgets
1759
+ ? {
1760
+ default_max_estimated_tokens_by_format: {
1761
+ ...budget.default_max_estimated_tokens_by_format,
1762
+ },
1763
+ }
1764
+ : {}),
1713
1765
  };
1714
1766
  });
1715
1767
  }
@@ -1871,9 +1923,7 @@ function attachFlagContractsResult(result, selection, runtime, outputCommands, c
1871
1923
  else {
1872
1924
  result.command_flags_omitted_reason = "unfiltered_default_brief";
1873
1925
  }
1874
- if (commandAliases.length > 0) {
1875
- result.command_aliases = commandAliases;
1876
- }
1926
+ result.command_aliases = commandAliases;
1877
1927
  }
1878
1928
  function attachCommanderAliasContractsResult(result, selection) {
1879
1929
  if (selection.schemaOnly ||
@@ -1890,13 +1940,32 @@ function attachCommanderAliasContractsResult(result, selection) {
1890
1940
  : "unfiltered_default_brief";
1891
1941
  }
1892
1942
  /** Attach the compact agent-facing command semantics shared by summary and full projections. */
1893
- function attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts) {
1894
- result.command_summaries = buildCommandSummarySurface(outputCommands, extensionCommandContracts);
1943
+ function attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts, options) {
1944
+ result.command_summaries = buildCommandSummarySurface(outputCommands, extensionCommandContracts, {
1945
+ includeFormatBudgets: options.includeFormatBudgets,
1946
+ includeIntentProvenance: options.includeIntentProvenance,
1947
+ });
1895
1948
  result.output_policy = {
1896
1949
  token_estimate: "ceil(utf8_bytes / 4)",
1897
1950
  degradation_ladder: [...PM_OUTPUT_DEGRADATION_STEPS],
1898
1951
  allows_unbounded_opt_out: true,
1899
1952
  };
1953
+ result.grammar_contracts = {
1954
+ nouns: PM_CLI_GRAMMAR_CONTRACT.nouns,
1955
+ shared_verbs: PM_CLI_GRAMMAR_CONTRACT.shared_verbs,
1956
+ scope_before_verb: PM_CLI_GRAMMAR_CONTRACT.scope_before_verb,
1957
+ visible_top_level_ceiling: PM_CLI_GRAMMAR_CONTRACT.visible_top_level_ceiling,
1958
+ ceiling_raise_requires_pm_item: PM_CLI_GRAMMAR_CONTRACT.ceiling_raise_requires_pm_item,
1959
+ positional_shape_budget: PM_CLI_GRAMMAR_CONTRACT.positional_shape_budget,
1960
+ positional_shape_count: new Set(PM_COMMAND_POSITIONAL_CONTRACTS.map(({ slots }) => positionalShapeKey(slots))).size,
1961
+ positional_action_count: PM_POSITIONAL_ACTION_CONTRACTS.length,
1962
+ positional_action_parents: [
1963
+ ...new Set(PM_POSITIONAL_ACTION_CONTRACTS.map(({ parent }) => parent)),
1964
+ ].sort((left, right) => left.localeCompare(right)),
1965
+ ...(options.includePositionalSignatures
1966
+ ? { positional_signatures: PM_COMMAND_POSITIONAL_CONTRACTS }
1967
+ : {}),
1968
+ };
1900
1969
  }
1901
1970
  /** Implements run contracts for the public runtime surface of this module. */
1902
1971
  export async function runContracts(options, global) {
@@ -1910,13 +1979,18 @@ export async function runContracts(options, global) {
1910
1979
  const outputCommands = resolveOutputCommands(selection, commands);
1911
1980
  const result = createContractsResult(selection, schemaContext, actionContext, outputCommands);
1912
1981
  const extensionCommandContracts = resolveExtensionCommandContracts(selection, runtime, outputCommands);
1982
+ const includeCommandDetails = selection.fullOutput || selection.selectedCommand !== undefined;
1913
1983
  if (selection.summary || selection.fullOutput) {
1914
- attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts);
1984
+ attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts, {
1985
+ includeFormatBudgets: includeCommandDetails,
1986
+ includeIntentProvenance: includeCommandDetails,
1987
+ includePositionalSignatures: includeCommandDetails,
1988
+ });
1915
1989
  }
1916
1990
  if (selection.summary) {
1917
1991
  return result;
1918
1992
  }
1919
- const commandAliases = buildCommandAliasSurface(commands);
1993
+ const commandAliases = buildCommandAliasSurface(actionContext.commandCatalog);
1920
1994
  if (!(selection.flagsOnly && !selection.fullOutput)) {
1921
1995
  attachRuntimeContractsResult(result, runtime, selection);
1922
1996
  }
@@ -1929,6 +2003,9 @@ export async function runContracts(options, global) {
1929
2003
  gate_triggers: [...ASSURANCE_GATE_TRIGGERS],
1930
2004
  };
1931
2005
  }
2006
+ if (selection.fullOutput && result.grammar_contracts) {
2007
+ result.grammar_contracts.destinations = PM_COMMAND_DESTINATION_CONTRACTS;
2008
+ }
1932
2009
  // pm-4os2: snapshot the static MCP tool surface in the full projection so
1933
2010
  // `pnpm contracts:check` (CI static gate) fails on unintended inputSchema
1934
2011
  // drift in src/mcp/tool-definitions.ts.
@@ -1983,4 +2060,4 @@ export const _testOnlyContractsCommand = {
1983
2060
  toRuntimeShortFlagToken,
1984
2061
  };
1985
2062
  //# sourceMappingURL=runtime-contracts.js.map
1986
- //# debugId=8cdd82c3-979e-5f7f-bc72-592c7e55f11c
2063
+ //# debugId=30d9b9dd-f0a1-578e-90d6-3c019e0435b5
@@ -3,7 +3,34 @@
3
3
  *
4
4
  * Defines SDK command-contract metadata for Tool Option Contracts.
5
5
  */
6
- import type { ToolOptionFlagContract } from "./flag-contracts.js";
6
+ import type { CliFlagContract, ToolOptionFlagContract } from "./flag-contracts.js";
7
+ /** One SDK/MCP parameter spelling that cannot be executed by the matching CLI. */
8
+ export interface ToolOptionCliParityFinding {
9
+ /** Stable remediation category. */
10
+ code: "missing_cli_flag" | "missing_parameter_alias";
11
+ /** SDK/MCP parameter key. */
12
+ parameter: string;
13
+ /** Canonical CLI flag selected by the tool transport. */
14
+ flag: string;
15
+ /** Executable parameter-shaped flag expected by cross-surface callers. */
16
+ parameter_flag: string;
17
+ }
18
+ /** Fail-closed receipt for one tool option table and executable CLI flag table. */
19
+ export interface ToolOptionCliParityReport {
20
+ /** Whether every mapping and cross-surface spelling is executable. */
21
+ ok: boolean;
22
+ /** Number of tool parameter mappings inspected. */
23
+ parameter_count: number;
24
+ /** Number of executable CLI flag contracts inspected. */
25
+ cli_flag_count: number;
26
+ /** Missing canonical flags or direct parameter aliases. */
27
+ findings: ToolOptionCliParityFinding[];
28
+ }
29
+ /**
30
+ * Verify that every declared tool parameter maps to a real CLI flag and that
31
+ * its kebab-case spelling is accepted either canonically or as an alias.
32
+ */
33
+ export declare function verifyToolOptionCliParity(toolOptions: readonly ToolOptionFlagContract[], cliFlags: readonly CliFlagContract[]): ToolOptionCliParityReport;
7
34
  /** Public contract for tool list filter option contracts, shared by SDK and presentation-layer consumers. */
8
35
  export declare const TOOL_LIST_FILTER_OPTION_CONTRACTS: ToolOptionFlagContract[];
9
36
  /** Public contract for tool aggregate option contracts, shared by SDK and presentation-layer consumers. */
@@ -1,6 +1,41 @@
1
- /** Returns fresh option contract objects so exported arrays cannot share mutable entries. */
1
+ /**
2
+ * Verify that every declared tool parameter maps to a real CLI flag and that
3
+ * its kebab-case spelling is accepted either canonically or as an alias.
4
+ */
2
5
 
3
- !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]="e2028eff-b29e-5850-87b1-4a3e06f28964")}catch(e){}}();
6
+ !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]="88009976-e03f-5a67-b6fc-bf60240dde49")}catch(e){}}();
7
+ export function verifyToolOptionCliParity(toolOptions, cliFlags) {
8
+ const findings = [];
9
+ for (const { param, flag } of toolOptions) {
10
+ const parameterFlag = `--${param.replace(/([a-z\d])([A-Z])/gu, "$1-$2").toLowerCase()}`;
11
+ const cliFlag = cliFlags.find((candidate) => candidate.flag === flag);
12
+ if (!cliFlag) {
13
+ findings.push({
14
+ code: "missing_cli_flag",
15
+ parameter: param,
16
+ flag,
17
+ parameter_flag: parameterFlag,
18
+ });
19
+ continue;
20
+ }
21
+ if (cliFlag.flag !== parameterFlag &&
22
+ !cliFlag.aliases?.includes(parameterFlag)) {
23
+ findings.push({
24
+ code: "missing_parameter_alias",
25
+ parameter: param,
26
+ flag,
27
+ parameter_flag: parameterFlag,
28
+ });
29
+ }
30
+ }
31
+ return {
32
+ ok: findings.length === 0,
33
+ parameter_count: toolOptions.length,
34
+ cli_flag_count: cliFlags.length,
35
+ findings,
36
+ };
37
+ }
38
+ /** Returns fresh option contract objects so exported arrays cannot share mutable entries. */
4
39
  function cloneOptionContracts(contracts) {
5
40
  return contracts.map((contract) => ({ ...contract }));
6
41
  }
@@ -424,4 +459,4 @@ export const TOOL_GRAPH_OPTION_CONTRACTS = [
424
459
  { param: "summary", flag: "--summary" },
425
460
  ];
426
461
  //# sourceMappingURL=tool-option-contracts.js.map
427
- //# debugId=e2028eff-b29e-5850-87b1-4a3e06f28964
462
+ //# debugId=88009976-e03f-5a67-b6fc-bf60240dde49
@@ -4,7 +4,7 @@
4
4
  * Defines SDK command-contract metadata for Tool Parameter Tables.
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]="4749819e-f2af-5a17-9d32-2e2770c497c3")}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]="e0314840-0dac-5966-8c4f-3a3e5db15688")}catch(e){}}();
8
8
  import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
9
9
  import { PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS } from "../read-output-session.js";
10
10
  import { ASSURANCE_DEFINITION_SCHEMA } from "./schemas/assurance-definition.js";
@@ -191,6 +191,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
191
191
  schedulePreset: { type: "string", enum: ["lightweight"] },
192
192
  status: { type: "string" },
193
193
  since: { type: "string", format: "date-time" },
194
+ cursorMode: { type: "string", enum: ["batch", "row"] },
194
195
  threshold: { type: "number", minimum: 0, maximum: 1 },
195
196
  filterStatus: { type: "string" },
196
197
  filterType: { type: "string" },
@@ -1951,6 +1952,10 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
1951
1952
  description: "Maximum mutation events returned, from 0 through 1000.",
1952
1953
  examples: [0, 100],
1953
1954
  },
1955
+ cursorMode: {
1956
+ description: "Cursor framing: batch returns one terminal next_cursor (default); row also adds a cursor to every event.",
1957
+ examples: ["batch", "row"],
1958
+ },
1954
1959
  },
1955
1960
  remind: {
1956
1961
  at: {
@@ -2067,4 +2072,4 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
2067
2072
  },
2068
2073
  };
2069
2074
  //# sourceMappingURL=tool-parameter-tables.js.map
2070
- //# debugId=4749819e-f2af-5a17-9d32-2e2770c497c3
2075
+ //# debugId=e0314840-0dac-5966-8c4f-3a3e5db15688
@@ -91,14 +91,14 @@ export interface PmActionToolInputSchemaOptions {
91
91
  */
92
92
  export declare function buildPmActionToolInputSchema(action: PmToolAction, options?: PmActionToolInputSchemaOptions): Record<string, unknown>;
93
93
  /** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and contract tests bind to one version constant. Bump the patch/minor for additive, backward-compatible schema changes; bump the MAJOR for breaking changes — the major also drives the `$id` `tool-parameters-v{major}` slug, so the two never drift. */
94
- export declare const PM_TOOL_PARAMETERS_SCHEMA_VERSION: "4.7.0";
94
+ export declare const PM_TOOL_PARAMETERS_SCHEMA_VERSION: "4.8.0";
95
95
  /**
96
96
  * Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
97
97
  * schema `$id` slug so a breaking version bump renames the document in lockstep.
98
98
  */
99
99
  export declare const PM_TOOL_PARAMETERS_SCHEMA_MAJOR: string;
100
100
  /** Version of the provider-compatible flat tool-parameters schema (`PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`). Tracked separately from the strict schema because the flat projection evolves independently. */
101
- export declare const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION: "1.3.0";
101
+ export declare const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION: "1.4.0";
102
102
  /** Public contract for pm tool parameters schema, shared by SDK and presentation-layer consumers. */
103
103
  export declare const PM_TOOL_PARAMETERS_SCHEMA: Record<string, unknown>;
104
104
  declare function toProviderCompatibleParameterDefinition(key: string, definition: unknown): Record<string, unknown>;
@@ -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]="1d6089b2-ab59-59ad-a475-9a6ef1356b40")}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]="085c5e7b-97c1-5bc5-a95f-c6a17e709e97")}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";
@@ -205,6 +205,7 @@ const ACTIVITY_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
205
205
  ]);
206
206
  const LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
207
207
  ...TOOL_LIST_FILTER_OPTION_CONTRACTS.map((entry) => entry.param),
208
+ "all",
208
209
  "includeBody",
209
210
  "noTruncate",
210
211
  "strictRead",
@@ -212,6 +213,8 @@ const LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
212
213
  "brief",
213
214
  "full",
214
215
  ]);
216
+ const FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS = LIST_CONTRACT_PARAMETER_KEYS.filter((parameter) => parameter !== "all" && parameter !== "status");
217
+ const ALL_STATUS_LIST_CONTRACT_PARAMETER_KEYS = LIST_CONTRACT_PARAMETER_KEYS.filter((parameter) => parameter !== "status");
215
218
  const LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS = [
216
219
  [
217
220
  { property: "today", schema: { const: true } },
@@ -475,31 +478,31 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
475
478
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
476
479
  },
477
480
  "list-all": {
478
- optional: LIST_CONTRACT_PARAMETER_KEYS,
481
+ optional: ALL_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
479
482
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
480
483
  },
481
484
  "list-draft": {
482
- optional: LIST_CONTRACT_PARAMETER_KEYS,
485
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
483
486
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
484
487
  },
485
488
  "list-open": {
486
- optional: LIST_CONTRACT_PARAMETER_KEYS,
489
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
487
490
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
488
491
  },
489
492
  "list-in-progress": {
490
- optional: LIST_CONTRACT_PARAMETER_KEYS,
493
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
491
494
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
492
495
  },
493
496
  "list-blocked": {
494
- optional: LIST_CONTRACT_PARAMETER_KEYS,
497
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
495
498
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
496
499
  },
497
500
  "list-closed": {
498
- optional: LIST_CONTRACT_PARAMETER_KEYS,
501
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
499
502
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
500
503
  },
501
504
  "list-canceled": {
502
- optional: LIST_CONTRACT_PARAMETER_KEYS,
505
+ optional: FIXED_STATUS_LIST_CONTRACT_PARAMETER_KEYS,
503
506
  mutuallyExclusiveWhen: LIST_WINDOW_MUTUALLY_EXCLUSIVE_GROUPS,
504
507
  },
505
508
  aggregate: { optional: AGGREGATE_CONTRACT_PARAMETER_KEYS },
@@ -538,6 +541,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
538
541
  "harness",
539
542
  "agentInstance",
540
543
  "provenanceFilter",
544
+ "cursorMode",
541
545
  ],
542
546
  },
543
547
  merge: {
@@ -1236,6 +1240,11 @@ function decorateToolParameterDefinition(key, definition) {
1236
1240
  };
1237
1241
  }
1238
1242
  function actionScopedToolParameterMetadata(action, key) {
1243
+ if ((action === "list" || action.startsWith("list-")) && key === "all") {
1244
+ return {
1245
+ description: "Return items from every lifecycle status instead of the default active-status set.",
1246
+ };
1247
+ }
1239
1248
  if (action === "plan" &&
1240
1249
  Object.prototype.hasOwnProperty.call(PLAN_ACTION_PARAMETER_METADATA, key)) {
1241
1250
  return PLAN_ACTION_PARAMETER_METADATA[key];
@@ -1506,14 +1515,14 @@ function createLazyContractSchema(build) {
1506
1515
  });
1507
1516
  }
1508
1517
  /** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and contract tests bind to one version constant. Bump the patch/minor for additive, backward-compatible schema changes; bump the MAJOR for breaking changes — the major also drives the `$id` `tool-parameters-v{major}` slug, so the two never drift. */
1509
- export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.7.0";
1518
+ export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.8.0";
1510
1519
  /**
1511
1520
  * Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
1512
1521
  * schema `$id` slug so a breaking version bump renames the document in lockstep.
1513
1522
  */
1514
1523
  export const PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
1515
1524
  /** Version of the provider-compatible flat tool-parameters schema (`PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`). Tracked separately from the strict schema because the flat projection evolves independently. */
1516
- export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.3.0";
1525
+ export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.4.0";
1517
1526
  /** Public contract for pm tool parameters schema, shared by SDK and presentation-layer consumers. */
1518
1527
  export const PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
1519
1528
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -1588,4 +1597,4 @@ export const _testOnlyCliContracts = {
1588
1597
  withFlagAliasMetadata,
1589
1598
  };
1590
1599
  //# sourceMappingURL=tool-schema.js.map
1591
- //# debugId=1d6089b2-ab59-59ad-a475-9a6ef1356b40
1600
+ //# debugId=085c5e7b-97c1-5bc5-a95f-c6a17e709e97
@@ -11,15 +11,16 @@
11
11
  * here.)
12
12
  */
13
13
  export type { CommanderOptionAliasContract, CommanderOptionRegistrationContract, } from "./cli-contracts/commander-types.js";
14
- export { EXECUTABLE_COMMAND_ALIASES } from "./cli-contracts/command-aliases.js";
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 { 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_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
17
+ export { 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_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 { PmExtensionCapabilityContract, PmExtensionServiceNameContract, PmExtensionPolicyModeContract, PmExtensionTrustModeContract, PmExtensionSandboxProfileContract, PmExtensionPolicySurfaceContract, PmToolAction, } from "./cli-contracts/enum-contracts.js";
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, } from "./cli-contracts/tool-option-contracts.js";
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";
21
21
  export type { CliFlagContract, ToolOptionFlagContract, } from "./cli-contracts/flag-contracts.js";
22
- export { withFlagAliasMetadata, compactFlagAliasContracts, 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_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";
22
+ export { PM_POSITIONAL_ACTION_CONTRACTS, type PmPositionalActionContract, } from "./cli-contracts/grammar-contracts.js";
23
+ 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_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";
23
24
  export type { PmActionSchemaContract } from "./cli-contracts/tool-schema.js";
24
25
  export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, resolvePmToolCustomFieldCollision, CLOSE_ACTION_OPTION_KEYS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
25
26
  export type { PmActionToolInputSchemaOptions, PmToolCustomFieldCollision, } from "./cli-contracts/tool-schema.js";