@unbrained/pm-cli 2026.8.24 → 2026.8.26

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 (143) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +46 -0
  3. package/dist/cli-bundle/bundle-manifest.json +149 -149
  4. package/dist/cli-bundle/chunks/chunk-E2GCFJSU.js +35 -0
  5. package/dist/cli-bundle/chunks/{chunk-TEQDR5KI.js → chunk-ES25LX3D.js} +62 -62
  6. package/dist/cli-bundle/chunks/{chunk-I5Q7QSZX.js → chunk-FRDWWB6R.js} +2 -2
  7. package/dist/cli-bundle/chunks/{chunk-X7WWQDYQ.js → chunk-ICQ3RVIY.js} +2 -2
  8. package/dist/cli-bundle/chunks/{chunk-YOLLRCLY.js → chunk-IV64RJVE.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-L22NP5MA.js → chunk-KBFP3E4E.js} +86 -86
  10. package/dist/cli-bundle/chunks/{chunk-AGUL3HUT.js → chunk-MVYLQ67M.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-DJNJBWAQ.js → chunk-S4U76VZF.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-IW72J5FW.js → chunk-UKBCRPA2.js} +2 -2
  13. package/dist/cli-bundle/chunks/chunk-WRHJ3MB6.js +8 -0
  14. package/dist/cli-bundle/chunks/{chunk-ZAVCS2GH.js → chunk-ZNRLJ54C.js} +60 -60
  15. package/dist/cli-bundle/chunks/{register-list-query-37A4P6O4.js → register-list-query-EMCPMICY.js} +2 -2
  16. package/dist/cli-bundle/chunks/{register-mutation-TBJDHYIT.js → register-mutation-OJ67ABCB.js} +3 -3
  17. package/dist/cli-bundle/chunks/{register-operations-WRZNEBUM.js → register-operations-H2GLP7LT.js} +2 -2
  18. package/dist/cli-bundle/chunks/{register-setup-H4PDLACD.js → register-setup-GLZAHLVI.js} +2 -2
  19. package/dist/cli-bundle/focused-chunks/{chunk-IMWTYKII.js → chunk-4K2II4TV.js} +2 -2
  20. package/dist/cli-bundle/focused-chunks/chunk-4XNH2HM7.js +2 -0
  21. package/dist/cli-bundle/focused-chunks/{chunk-GJR6YEMR.js → chunk-57XY346D.js} +2 -2
  22. package/dist/cli-bundle/focused-chunks/{chunk-4WP7LNE3.js → chunk-66VGB23P.js} +2 -2
  23. package/dist/cli-bundle/focused-chunks/chunk-72T6JGAE.js +50 -0
  24. package/dist/cli-bundle/focused-chunks/{chunk-BFA6KKCI.js → chunk-7I23XGWO.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-6Z24ZMU3.js → chunk-7YCDTCBC.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/{chunk-O4ZXNJMT.js → chunk-A644DUFQ.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/chunk-FXDLT6FL.js +16 -0
  28. package/dist/cli-bundle/focused-chunks/{chunk-RASVBJX5.js → chunk-IBHXMFE7.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +5 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-6MUTDXMP.js → chunk-LV5N3LK5.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-CWCN5RLO.js → chunk-MMXUPDDJ.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-WZLSSGEU.js → chunk-OHIHZ7HS.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-P2E6LDAE.js +19 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-IZNRRCU3.js → chunk-TMJDFHVD.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-QBP5FSBX.js → chunk-UYBA57GY.js} +4 -4
  36. package/dist/cli-bundle/focused-chunks/{chunk-MNPECIRL.js → chunk-YO3ZF3FI.js} +2 -2
  37. package/dist/cli-bundle/main.js +2 -2
  38. package/dist/cli-bundle/sdk-authoring.js +1 -1
  39. package/dist/cli-bundle/sdk-contracts.js +2 -2
  40. package/dist/cli-bundle/sdk-core.js +41 -41
  41. package/dist/cli-bundle/sdk-governance.js +1 -1
  42. package/dist/cli-bundle/sdk-graph.js +1 -1
  43. package/dist/cli-bundle/sdk-merge.js +32 -33
  44. package/dist/cli-bundle/sdk-query.js +1 -1
  45. package/dist/cli-bundle/sdk-runtime.js +1 -1
  46. package/dist/cli-bundle/sdk-testing.js +1 -1
  47. package/dist/cli-bundle/sdk.js +7 -6
  48. package/dist/core/diagnostics/remediation.js +17 -2
  49. package/dist/core/extensions/manifest-schema.d.ts +20 -0
  50. package/dist/core/extensions/manifest-schema.js +28 -10
  51. package/dist/mcp/http-server.d.ts +60 -0
  52. package/dist/mcp/http-server.js +451 -0
  53. package/dist/mcp/legacy-adapter.d.ts +50 -0
  54. package/dist/mcp/legacy-adapter.js +64 -0
  55. package/dist/mcp/server.d.ts +42 -9
  56. package/dist/mcp/server.js +457 -58
  57. package/dist/sdk/agent/refusal-closure-census.d.ts +6 -2
  58. package/dist/sdk/agent/refusal-closure-census.js +16 -8
  59. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -0
  60. package/dist/sdk/cli-contracts/runtime-contracts.js +20 -3
  61. package/dist/sdk/compose.d.ts +4 -1
  62. package/dist/sdk/compose.js +23 -36
  63. package/dist/sdk/extension/author-manifest.d.ts +22 -0
  64. package/dist/sdk/extension/author-manifest.js +93 -0
  65. package/dist/sdk/extension.js +6 -3
  66. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +67 -28
  67. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +30 -3
  68. package/dist/sdk/governance/health.js +103 -11
  69. package/dist/sdk/governance/validate.js +15 -9
  70. package/dist/sdk/history-repair.d.ts +24 -0
  71. package/dist/sdk/history-repair.js +145 -4
  72. package/dist/sdk/index.d.ts +6 -0
  73. package/dist/sdk/index.js +8 -2
  74. package/dist/sdk/mcp/authorization.d.ts +134 -0
  75. package/dist/sdk/mcp/authorization.js +405 -0
  76. package/dist/sdk/mcp/interactions.d.ts +118 -0
  77. package/dist/sdk/mcp/interactions.js +337 -0
  78. package/dist/sdk/mcp/protocol.d.ts +142 -0
  79. package/dist/sdk/mcp/protocol.js +174 -0
  80. package/dist/sdk/mcp/subscriptions.d.ts +65 -0
  81. package/dist/sdk/mcp/subscriptions.js +212 -0
  82. package/dist/sdk/mcp/tasks.d.ts +107 -0
  83. package/dist/sdk/mcp/tasks.js +431 -0
  84. package/dist/sdk/mcp/transport.d.ts +30 -0
  85. package/dist/sdk/mcp/transport.js +261 -0
  86. package/dist/sdk/merge/driver.js +25 -4
  87. package/dist/sdk/merge/receipt-file-boundary.d.ts +21 -0
  88. package/dist/sdk/merge/receipt-file-boundary.js +47 -0
  89. package/dist/sdk/merge/receipts.d.ts +40 -1
  90. package/dist/sdk/merge/receipts.js +343 -36
  91. package/dist/sdk/merge/reconcile.js +117 -47
  92. package/dist/sdk/read-output/continuation.d.ts +15 -2
  93. package/dist/sdk/read-output/continuation.js +86 -6
  94. package/dist/sdk/read-output-contracts.d.ts +4 -1
  95. package/dist/sdk/read-output-contracts.js +9 -6
  96. package/dist/sdk/runtime-primitives.d.ts +1 -1
  97. package/dist/sdk/runtime-primitives.js +3 -3
  98. package/dist/sdk/test/execution.d.ts +6 -0
  99. package/dist/sdk/test/execution.js +32 -3
  100. package/docs/AGENT_PROVENANCE_ADR.md +6 -4
  101. package/docs/AGENT_RUNTIME_PRIMITIVES.md +6 -5
  102. package/docs/CLAUDE_CODE_PLUGIN.md +12 -5
  103. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +8 -0
  104. package/docs/EXTENSIONS.md +3 -4
  105. package/docs/MCP_2026_07_28.md +138 -0
  106. package/docs/MCP_2026_07_28_CONFORMANCE.md +30 -0
  107. package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +180 -0
  108. package/docs/MERGE_SAFETY.md +34 -5
  109. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +13 -1
  110. package/docs/README.md +4 -0
  111. package/docs/READ_OUTPUT_CONTRACTS.md +25 -2
  112. package/docs/RELEASING.md +3 -2
  113. package/docs/SDK.md +22 -1
  114. package/docs/SDK_AGENT_SESSION_CONTEXT.md +18 -13
  115. package/docs/SDK_MCP_INTERACTIONS.md +227 -0
  116. package/docs/TESTING.md +4 -0
  117. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -8
  118. package/marketplace.json +2 -2
  119. package/package.json +7 -5
  120. package/packages/pm-beads/package.json +1 -1
  121. package/packages/pm-calendar/package.json +1 -1
  122. package/packages/pm-command-kit/package.json +1 -1
  123. package/packages/pm-digital-twin/package.json +1 -1
  124. package/packages/pm-governance-audit/package.json +1 -1
  125. package/packages/pm-guide-shell/package.json +1 -1
  126. package/packages/pm-kanban/package.json +1 -1
  127. package/packages/pm-lifecycle-hooks/package.json +1 -1
  128. package/packages/pm-linked-test-adapters/package.json +1 -1
  129. package/packages/pm-search-advanced/package.json +1 -1
  130. package/packages/pm-templates/package.json +1 -1
  131. package/packages/pm-todos/package.json +1 -1
  132. package/packages/pm-vcs/package.json +1 -1
  133. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  134. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  135. package/scripts/finalize-build.mjs +1 -0
  136. package/sdk/public-surface.json +762 -15
  137. package/dist/cli-bundle/chunks/chunk-MKE6MD2K.js +0 -36
  138. package/dist/cli-bundle/chunks/chunk-NXBFO63A.js +0 -8
  139. package/dist/cli-bundle/focused-chunks/chunk-FCTT4CZU.js +0 -5
  140. package/dist/cli-bundle/focused-chunks/chunk-Q63PSLO4.js +0 -2
  141. package/dist/cli-bundle/focused-chunks/chunk-QV5UP27O.js +0 -51
  142. package/dist/cli-bundle/focused-chunks/chunk-RPRLENVA.js +0 -16
  143. package/dist/cli-bundle/focused-chunks/chunk-TOFVXBWA.js +0 -19
@@ -44,10 +44,14 @@ export interface PmRefusalClosureCensusReport {
44
44
  /** Exactly one row for every catalog code. */
45
45
  rows: PmRefusalClosureCensusRow[];
46
46
  }
47
- /** Reviewed floor of 16 catalog rows; includes one alias across 15 canonical groups. */
47
+ /** @deprecated Historical v1 floor retained for SDK compatibility. */
48
48
  export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE = 16;
49
- /** Fifteen canonical compatibility groups that must retain executable evidence. */
49
+ /** @deprecated Historical v1 identities retained for SDK compatibility. */
50
50
  export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE: readonly ["bulk_ids_input_empty", "bulk_ids_input_missing_path", "bulk_ids_input_unreadable", "invalid_argument_value", "missing_lifecycle_target", "missing_required_argument", "projection_options_mutually_exclusive", "tracker_not_initialized", "tracker_root_missing", "tracker_root_not_directory", "tracker_root_unreadable", "unknown_context_intent", "unknown_field_projection", "unknown_option", "unknown_subcommand"];
51
+ /** Reviewed v2 floor of 18 catalog rows across 17 canonical groups. */
52
+ export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2 = 18;
53
+ /** V2 canonical identities that must retain executable evidence. */
54
+ export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2: readonly string[];
51
55
  /** Ratchet receipt that prevents catalog growth from erasing proven closure. */
52
56
  export declare function verifyPmRefusalClosureRatchet(report: PmRefusalClosureCensusReport, baseline?: number): {
53
57
  ok: boolean;
@@ -1,8 +1,8 @@
1
- /** Reviewed floor of 16 catalog rows; includes one alias across 15 canonical groups. */
1
+ /** @deprecated Historical v1 floor retained for SDK compatibility. */
2
2
 
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]="5560aa3a-036e-509c-955c-a09e9bf9df18")}catch(e){}}();
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]="a1efaf49-c6ca-53dd-8fad-eb2540c20cc8")}catch(e){}}();
4
4
  export const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE = 16;
5
- /** Fifteen canonical compatibility groups that must retain executable evidence. */
5
+ /** @deprecated Historical v1 identities retained for SDK compatibility. */
6
6
  export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE = Object.freeze([
7
7
  "bulk_ids_input_empty",
8
8
  "bulk_ids_input_missing_path",
@@ -20,8 +20,16 @@ export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE = Object.free
20
20
  "unknown_option",
21
21
  "unknown_subcommand",
22
22
  ]);
23
+ /** Reviewed v2 floor of 18 catalog rows across 17 canonical groups. */
24
+ export const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2 = 18;
25
+ /** V2 canonical identities that must retain executable evidence. */
26
+ export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2 = Object.freeze([
27
+ ...PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,
28
+ "manifest_unknown_key",
29
+ "no_version_bounds_declared",
30
+ ].sort((left, right) => left.localeCompare(right)));
23
31
  /** Ratchet receipt that prevents catalog growth from erasing proven closure. */
24
- export function verifyPmRefusalClosureRatchet(report, baseline = PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE) {
32
+ export function verifyPmRefusalClosureRatchet(report, baseline = PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2) {
25
33
  return {
26
34
  ok: report.executable_error_code_count >= baseline,
27
35
  baseline,
@@ -29,7 +37,7 @@ export function verifyPmRefusalClosureRatchet(report, baseline = PM_REFUSAL_CLOS
29
37
  };
30
38
  }
31
39
  /** Ratchet canonical compatibility-group identities independently from counts. */
32
- export function verifyPmRefusalClosureIdentityRatchet(report, requiredCanonicalCodes = PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE) {
40
+ export function verifyPmRefusalClosureIdentityRatchet(report, requiredCanonicalCodes = PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2) {
33
41
  const executableCanonicalCodes = new Set(report.rows
34
42
  .filter(({ disposition }) => disposition === "executable")
35
43
  .map(({ canonical_code: canonicalCode }) => canonicalCode));
@@ -127,8 +135,8 @@ export function renderPmRefusalClosureCensusMarkdown(report) {
127
135
  "",
128
136
  `- Catalog error codes: ${report.catalog_error_code_count}`,
129
137
  `- Executable error codes: ${report.executable_error_code_count}`,
130
- `- Executable-code ratchet floor: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE}`,
131
- `- Required executable canonical codes: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE.map((code) => `\`${code}\``).join(", ")}`,
138
+ `- Executable-code ratchet floor: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2}`,
139
+ `- Required executable canonical codes: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2.map((code) => `\`${code}\``).join(", ")}`,
132
140
  `- Uncovered error codes: ${report.uncovered_error_code_count}`,
133
141
  `- Coverage fraction: ${report.coverage_fraction.toFixed(6)}`,
134
142
  `- Closed-domain probes: ${report.closed_domain_probe_count}`,
@@ -141,4 +149,4 @@ export function renderPmRefusalClosureCensusMarkdown(report) {
141
149
  ].join("\n");
142
150
  }
143
151
  //# sourceMappingURL=refusal-closure-census.js.map
144
- //# debugId=5560aa3a-036e-509c-955c-a09e9bf9df18
152
+ //# debugId=a1efaf49-c6ca-53dd-8fad-eb2540c20cc8
@@ -126,6 +126,16 @@ export interface ContractsResult {
126
126
  degradation_ladder: string[];
127
127
  allows_unbounded_opt_out: boolean;
128
128
  };
129
+ /** Exact per-command projection vocabularies and the scope of the compatibility union. */
130
+ output_projection_contracts?: {
131
+ global_ladder_field: "output_policy.degradation_ladder";
132
+ global_ladder_scope: "union_not_per_command";
133
+ discovery: "pm contracts --command <command> --summary";
134
+ commands?: Array<{
135
+ command: string;
136
+ modes: string[];
137
+ }>;
138
+ };
129
139
  /** Value that configures or reports runtime schema for this contract. */
130
140
  runtime_schema?: {
131
141
  statuses: string[];
@@ -4,7 +4,7 @@
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]="e8f1efca-4e83-570f-8c33-96f0405035b0")}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]="428a19d2-be42-548a-a328-aa0e476b8a71")}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
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, ITEM_REOPEN_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, PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
@@ -12,7 +12,7 @@ import { PM_POSITIONAL_ACTION_FLAG_CONTRACTS } from "./flag-contracts.js";
12
12
  import { GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES, GOVERNANCE_CREATE_MODE_DEFAULT_VALUES, GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES, GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES, } from "../../types.js";
13
13
  import { BRIEF_LIST_FIELDS, DEFAULT_COMPACT_LIST_FIELDS, LIST_COMMAND_DEFAULT_PROJECTIONS, } from "../query/list.js";
14
14
  import { getActiveContextIntentContracts, } from "../context-intent-contracts.js";
15
- import { PM_READ_OUTPUT_SURFACE_CONTRACTS, } from "../read-output-contracts.js";
15
+ import { readOutputIncludeModeOptions, resolveReadOutputSurface, PM_READ_OUTPUT_SURFACE_CONTRACTS, } from "../read-output-contracts.js";
16
16
  import { enrichCliFlagInvocationContracts, } from "../flag-invocation-contracts.js";
17
17
  import { resolvePmCommandVisibilityTier, } from "../agent-capability-contracts.js";
18
18
  import { PM_ERROR_CODE_CATALOG } from "../generated-error-code-catalog.js";
@@ -1954,6 +1954,22 @@ function attachAgentCommandContractsResult(result, outputCommands, extensionComm
1954
1954
  degradation_ladder: [...PM_OUTPUT_DEGRADATION_STEPS],
1955
1955
  allows_unbounded_opt_out: true,
1956
1956
  };
1957
+ result.output_projection_contracts = {
1958
+ global_ladder_field: "output_policy.degradation_ladder",
1959
+ global_ladder_scope: "union_not_per_command",
1960
+ discovery: "pm contracts --command <command> --summary",
1961
+ ...(options.includeProjectionModeMatrix
1962
+ ? {
1963
+ commands: [...new Set(outputCommands.map(normalizeCommandPath))]
1964
+ .filter((command) => resolveReadOutputSurface(command) !== undefined)
1965
+ .sort((left, right) => left.localeCompare(right))
1966
+ .map((command) => ({
1967
+ command,
1968
+ modes: [...readOutputIncludeModeOptions(command).keys()],
1969
+ })),
1970
+ }
1971
+ : {}),
1972
+ };
1957
1973
  result.grammar_contracts = {
1958
1974
  nouns: PM_CLI_GRAMMAR_CONTRACT.nouns,
1959
1975
  shared_verbs: PM_CLI_GRAMMAR_CONTRACT.shared_verbs,
@@ -1989,6 +2005,7 @@ export async function runContracts(options, global) {
1989
2005
  includeFormatBudgets: includeCommandDetails,
1990
2006
  includeIntentProvenance: includeCommandDetails,
1991
2007
  includePositionalSignatures: includeCommandDetails,
2008
+ includeProjectionModeMatrix: includeCommandDetails,
1992
2009
  });
1993
2010
  }
1994
2011
  if (selection.summary) {
@@ -2065,4 +2082,4 @@ export const _testOnlyContractsCommand = {
2065
2082
  toRuntimeShortFlagToken,
2066
2083
  };
2067
2084
  //# sourceMappingURL=runtime-contracts.js.map
2068
- //# debugId=e8f1efca-4e83-570f-8c33-96f0405035b0
2085
+ //# debugId=428a19d2-be42-548a-a328-aa0e476b8a71
@@ -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
@@ -1,6 +1,6 @@
1
1
  /** Generated partition 1 of the exhaustive error-code catalog. */
2
2
 
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]="030027d7-2703-56ea-9235-64bc602a25c3")}catch(e){}}();
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]="c51fce27-5acd-513d-83c4-5fd75bd999f9")}catch(e){}}();
4
4
  export const PM_ERROR_CODE_CATALOG_PART_1 = [
5
5
  {
6
6
  code: "acceptance_criteria_mutation_conflict",
@@ -1163,6 +1163,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1163
1163
  canonical_code: "history_drift_hash_mismatch",
1164
1164
  aliases: ["validate_history_drift_hash_mismatches"],
1165
1165
  },
1166
+ {
1167
+ code: "history_drift_merge_receipt",
1168
+ meaning: "History drift merge receipt condition.",
1169
+ stability: "provisional",
1170
+ exit_code: 1,
1171
+ class: "generic_failure",
1172
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1173
+ sources: ["core/diagnostics/remediation.ts"],
1174
+ emitting_commands: ["*"],
1175
+ canonical_code: "history_drift_merge_receipt",
1176
+ aliases: [],
1177
+ },
1166
1178
  {
1167
1179
  code: "history_drift_missing_stream",
1168
1180
  meaning: "History drift missing stream condition.",
@@ -1933,13 +1945,16 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1933
1945
  code: "manifest_unknown_key",
1934
1946
  meaning: "Manifest unknown key condition.",
1935
1947
  stability: "provisional",
1936
- exit_code: 2,
1937
- class: "usage",
1948
+ exit_code: 1,
1949
+ class: "generic_failure",
1938
1950
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1939
- sources: ["sdk/compose.ts"],
1951
+ sources: ["core/extensions/manifest-schema.ts"],
1940
1952
  emitting_commands: ["*"],
1941
1953
  canonical_code: "manifest_unknown_key",
1942
1954
  aliases: [],
1955
+ owned_states: [
1956
+ { state: "author_workspace_manifest_declares_an_unknown_top_level_key", probe_id: "author-manifest-unknown-key", entrypoints: ["health"], expected_exit_class: "generic_failure" },
1957
+ ],
1943
1958
  },
1944
1959
  {
1945
1960
  code: "mcp_annotation_file_unavailable",
@@ -1965,6 +1980,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1965
1980
  canonical_code: "mcp_stdin_unavailable",
1966
1981
  aliases: [],
1967
1982
  },
1983
+ {
1984
+ code: "mcp_task_not_found_or_not_authorized",
1985
+ meaning: "Mcp task not found or not authorized condition.",
1986
+ stability: "provisional",
1987
+ exit_code: 3,
1988
+ class: "not_found",
1989
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1990
+ sources: ["sdk/mcp/tasks.ts"],
1991
+ emitting_commands: ["*"],
1992
+ canonical_code: "mcp_task_not_found_or_not_authorized",
1993
+ aliases: [],
1994
+ },
1968
1995
  {
1969
1996
  code: "merge_conflict_markers_detected",
1970
1997
  meaning: "Merge conflict markers detected condition.",
@@ -2002,53 +2029,65 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
2002
2029
  aliases: [],
2003
2030
  },
2004
2031
  {
2005
- code: "merge_reconcile_discards_require_acceptance",
2006
- meaning: "Merge reconcile discards require acceptance condition.",
2032
+ code: "merge_receipt_evidence_invalid",
2033
+ meaning: "Merge receipt evidence invalid condition.",
2007
2034
  stability: "provisional",
2008
2035
  exit_code: 4,
2009
2036
  class: "conflict",
2010
2037
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2011
- sources: ["sdk/merge/reconcile.ts"],
2038
+ sources: ["core/diagnostics/remediation.ts", "sdk/merge/reconcile.ts"],
2012
2039
  emitting_commands: ["*"],
2013
- canonical_code: "merge_reconcile_discards_require_acceptance",
2040
+ canonical_code: "merge_receipt_evidence_invalid",
2014
2041
  aliases: [],
2015
2042
  },
2016
2043
  {
2017
- code: "merge_root_not_found",
2018
- meaning: "Merge root not found condition.",
2019
- stability: "stable",
2020
- exit_code: 3,
2021
- class: "not_found",
2044
+ code: "merge_receipts_pending",
2045
+ meaning: "Merge receipts pending condition.",
2046
+ stability: "provisional",
2047
+ exit_code: 1,
2048
+ class: "generic_failure",
2022
2049
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2023
- sources: ["sdk/merge/install.ts"],
2050
+ sources: ["core/diagnostics/remediation.ts"],
2024
2051
  emitting_commands: ["*"],
2025
- canonical_code: "merge_root_not_found",
2052
+ canonical_code: "merge_receipts_pending",
2026
2053
  aliases: [],
2027
2054
  },
2028
2055
  {
2029
- code: "missing_allowed_values",
2030
- meaning: "Missing allowed values condition.",
2056
+ code: "merge_reconcile_discards_require_acceptance",
2057
+ meaning: "Merge reconcile discards require acceptance condition.",
2031
2058
  stability: "provisional",
2032
- exit_code: 1,
2033
- class: "generic_failure",
2059
+ exit_code: 4,
2060
+ class: "conflict",
2034
2061
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2035
- sources: ["sdk/agent/refusal-closure.ts"],
2062
+ sources: ["sdk/merge/reconcile.ts"],
2036
2063
  emitting_commands: ["*"],
2037
- canonical_code: "missing_allowed_values",
2064
+ canonical_code: "merge_reconcile_discards_require_acceptance",
2038
2065
  aliases: [],
2039
2066
  },
2040
2067
  {
2041
- code: "missing_budget",
2042
- meaning: "Missing budget condition.",
2068
+ code: "merge_reconcile_receipt_evidence_untrusted",
2069
+ meaning: "Merge reconcile receipt evidence untrusted condition.",
2043
2070
  stability: "provisional",
2044
- exit_code: 1,
2045
- class: "generic_failure",
2071
+ exit_code: 4,
2072
+ class: "conflict",
2046
2073
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2047
- sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
2074
+ sources: ["sdk/history-repair.ts"],
2075
+ emitting_commands: ["*"],
2076
+ canonical_code: "merge_reconcile_receipt_evidence_untrusted",
2077
+ aliases: [],
2078
+ },
2079
+ {
2080
+ code: "merge_root_not_found",
2081
+ meaning: "Merge root not found condition.",
2082
+ stability: "stable",
2083
+ exit_code: 3,
2084
+ class: "not_found",
2085
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
2086
+ sources: ["sdk/merge/install.ts"],
2048
2087
  emitting_commands: ["*"],
2049
- canonical_code: "missing_budget",
2088
+ canonical_code: "merge_root_not_found",
2050
2089
  aliases: [],
2051
2090
  },
2052
2091
  ];
2053
2092
  //# sourceMappingURL=generated-error-code-catalog-part-1.js.map
2054
- //# debugId=030027d7-2703-56ea-9235-64bc602a25c3
2093
+ //# debugId=c51fce27-5acd-513d-83c4-5fd75bd999f9
@@ -1,7 +1,31 @@
1
1
  /** Generated partition 2 of the exhaustive error-code catalog. */
2
2
 
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]="8724f8ed-1236-5779-9e97-dc4b35866839")}catch(e){}}();
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]="347933e7-190b-5679-9379-f25f63d0351a")}catch(e){}}();
4
4
  export const PM_ERROR_CODE_CATALOG_PART_2 = [
5
+ {
6
+ code: "missing_allowed_values",
7
+ meaning: "Missing allowed values condition.",
8
+ stability: "provisional",
9
+ exit_code: 1,
10
+ class: "generic_failure",
11
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
12
+ sources: ["sdk/agent/refusal-closure.ts"],
13
+ emitting_commands: ["*"],
14
+ canonical_code: "missing_allowed_values",
15
+ aliases: [],
16
+ },
17
+ {
18
+ code: "missing_budget",
19
+ meaning: "Missing budget condition.",
20
+ stability: "provisional",
21
+ exit_code: 1,
22
+ class: "generic_failure",
23
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
24
+ sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
25
+ emitting_commands: ["*"],
26
+ canonical_code: "missing_budget",
27
+ aliases: [],
28
+ },
5
29
  {
6
30
  code: "missing_cli_flag",
7
31
  meaning: "Missing cli flag condition.",
@@ -287,10 +311,13 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
287
311
  exit_code: 1,
288
312
  class: "generic_failure",
289
313
  recovery: "Inspect the structured error guidance and retry the suggested command.",
290
- sources: ["sdk/compose.ts"],
314
+ sources: ["core/extensions/manifest-schema.ts"],
291
315
  emitting_commands: ["*"],
292
316
  canonical_code: "no_version_bounds_declared",
293
317
  aliases: [],
318
+ owned_states: [
319
+ { state: "author_workspace_manifest_omits_canonical_pm_version_bounds", probe_id: "author-manifest-version-bounds-missing", entrypoints: ["health"], expected_exit_class: "generic_failure" },
320
+ ],
294
321
  },
295
322
  {
296
323
  code: "non_refusal_exit",
@@ -2075,4 +2102,4 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
2075
2102
  },
2076
2103
  ];
2077
2104
  //# sourceMappingURL=generated-error-code-catalog-part-2.js.map
2078
- //# debugId=8724f8ed-1236-5779-9e97-dc4b35866839
2105
+ //# debugId=347933e7-190b-5679-9379-f25f63d0351a