@unbrained/pm-cli 2026.8.6 → 2026.8.8

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 (269) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +65 -0
  3. package/dist/cli/main.js +6 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/register-operations.js +11 -2
  9. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  10. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  11. package/dist/cli/stats-analytics-json.d.ts +9 -0
  12. package/dist/cli/stats-analytics-json.js +69 -0
  13. package/dist/cli-bundle/bundle-manifest.json +156 -692
  14. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  15. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  16. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  17. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  18. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  19. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  20. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  21. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  22. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  23. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  24. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  25. package/dist/cli-bundle/chunks/{register-list-query-QH7ONPKU.js → register-list-query-WFZAMJHZ.js} +8 -8
  26. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  27. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  28. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-N7QN3NE6.js → chunk-5FLBTZJQ.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-YLPZHWX7.js → chunk-ANTMGYLI.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-EYO4F74Z.js → chunk-DMKOMTTY.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-GSW2Y7VZ.js → chunk-F5B3HBEZ.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-27DK4A5O.js → chunk-FI6DWU2M.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-CL3NB7VW.js → chunk-FNOKJG6N.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-EAXXF2HW.js → chunk-FPDYXZBK.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-XNVXIQ4B.js → chunk-GWI6YIKJ.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-6KDHXURF.js → chunk-HCUC62AB.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-GEYU23YS.js → chunk-HGNKPSCB.js} +22 -22
  42. package/dist/cli-bundle/focused-chunks/chunk-IAS7PMLG.js +2 -0
  43. package/dist/cli-bundle/focused-chunks/{chunk-TQMFQYXR.js → chunk-PL2EYDJK.js} +29 -29
  44. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-4JC3AOGS.js → chunk-TCSAPH33.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  47. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  48. package/dist/cli-bundle/focused-chunks/{chunk-GIERI4YU.js → chunk-YSAHYUXX.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/chunk-ZOLDTUU7.js +2 -0
  50. package/dist/cli-bundle/main.js +13 -13
  51. package/dist/cli-bundle/sdk-authoring.js +1 -1
  52. package/dist/cli-bundle/sdk-contracts.js +1 -1
  53. package/dist/cli-bundle/sdk-core.js +38 -37
  54. package/dist/cli-bundle/sdk-governance.js +1 -1
  55. package/dist/cli-bundle/sdk-graph.js +1 -1
  56. package/dist/cli-bundle/sdk-merge.js +1 -1
  57. package/dist/cli-bundle/sdk-query.js +1 -1
  58. package/dist/cli-bundle/sdk-runtime.js +1 -1
  59. package/dist/cli-bundle/sdk-testing.js +1 -1
  60. package/dist/cli-bundle/sdk.js +2 -1
  61. package/dist/cli.js +14 -4
  62. package/dist/core/extensions/reserved-host-flags.js +3 -2
  63. package/dist/core/history/workspace-history.d.ts +22 -2
  64. package/dist/core/history/workspace-history.js +60 -36
  65. package/dist/core/output/output.d.ts +2 -0
  66. package/dist/core/output/output.js +10 -2
  67. package/dist/core/sentry/helpers.d.ts +10 -0
  68. package/dist/core/sentry/helpers.js +59 -4
  69. package/dist/core/shared/command-types.d.ts +2 -0
  70. package/dist/core/shared/command-types.js +2 -2
  71. package/dist/core/shared/constants.d.ts +2 -0
  72. package/dist/core/shared/constants.js +4 -2
  73. package/dist/mcp/tool-definitions.js +6 -2
  74. package/dist/sdk/annotations.d.ts +40 -0
  75. package/dist/sdk/annotations.js +61 -9
  76. package/dist/sdk/author-attribution.d.ts +12 -0
  77. package/dist/sdk/author-attribution.js +87 -9
  78. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  79. package/dist/sdk/cli-bootstrap.js +7 -2
  80. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  81. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  82. package/dist/sdk/cli-contracts/completeness.js +54 -5
  83. package/dist/sdk/cli-contracts/flag-contracts.js +6 -2
  84. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  86. package/dist/sdk/cli-contracts/runtime-contracts.js +41 -8
  87. package/dist/sdk/cli-contracts/tool-parameter-tables.js +129 -10
  88. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  89. package/dist/sdk/cli-contracts/tool-schema.js +22 -3
  90. package/dist/sdk/cli-program.js +3 -2
  91. package/dist/sdk/comments.d.ts +7 -0
  92. package/dist/sdk/comments.js +2 -2
  93. package/dist/sdk/completion.js +12 -5
  94. package/dist/sdk/contracts.d.ts +2 -0
  95. package/dist/sdk/contracts.js +3 -2
  96. package/dist/sdk/core.d.ts +3 -1
  97. package/dist/sdk/core.js +4 -3
  98. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  99. package/dist/sdk/environment/host-environment-errors.js +124 -0
  100. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  101. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  102. package/dist/sdk/environment/source-context.d.ts +23 -0
  103. package/dist/sdk/environment/source-context.js +29 -0
  104. package/dist/sdk/error-code-catalog.d.ts +6 -0
  105. package/dist/sdk/error-code-catalog.js +62 -8
  106. package/dist/sdk/extension.js +9 -11
  107. package/dist/sdk/generated-error-code-catalog.js +739 -3
  108. package/dist/sdk/governance/health.d.ts +11 -3
  109. package/dist/sdk/governance/health.js +5 -5
  110. package/dist/sdk/history-analytics.d.ts +141 -0
  111. package/dist/sdk/history-analytics.js +283 -0
  112. package/dist/sdk/improvement-ledger-validation.d.ts +3 -0
  113. package/dist/sdk/improvement-ledger-validation.js +63 -0
  114. package/dist/sdk/improvement-ledger.d.ts +139 -0
  115. package/dist/sdk/improvement-ledger.js +261 -0
  116. package/dist/sdk/index.d.ts +13 -5
  117. package/dist/sdk/index.js +15 -7
  118. package/dist/sdk/learnings.d.ts +15 -0
  119. package/dist/sdk/learnings.js +2 -2
  120. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  121. package/dist/sdk/lifecycle/close-many.js +43 -5
  122. package/dist/sdk/lifecycle/plan.js +6 -3
  123. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  124. package/dist/sdk/lifecycle/update-many.js +29 -5
  125. package/dist/sdk/merge/index.d.ts +1 -1
  126. package/dist/sdk/merge/index.js +3 -3
  127. package/dist/sdk/merge/install.d.ts +21 -0
  128. package/dist/sdk/merge/install.js +58 -20
  129. package/dist/sdk/notes.d.ts +7 -0
  130. package/dist/sdk/notes.js +2 -2
  131. package/dist/sdk/read-output-budget.js +24 -22
  132. package/dist/sdk/read-output-contracts.d.ts +10 -2
  133. package/dist/sdk/read-output-contracts.js +204 -66
  134. package/dist/sdk/read-output-rows.d.ts +29 -0
  135. package/dist/sdk/read-output-rows.js +100 -0
  136. package/dist/sdk/read-output-session.d.ts +69 -0
  137. package/dist/sdk/read-output-session.js +200 -0
  138. package/dist/sdk/runtime-input.d.ts +2 -0
  139. package/dist/sdk/runtime-input.js +14 -2
  140. package/dist/sdk/runtime-primitives.d.ts +1 -1
  141. package/dist/sdk/runtime-primitives.js +3 -3
  142. package/dist/sdk/runtime-stats-options.d.ts +9 -0
  143. package/dist/sdk/runtime-stats-options.js +38 -0
  144. package/dist/sdk/runtime.d.ts +1 -0
  145. package/dist/sdk/runtime.js +13 -50
  146. package/dist/sdk/stats.d.ts +40 -0
  147. package/dist/sdk/stats.js +112 -29
  148. package/dist/sdk/test/execution.js +4 -2
  149. package/dist/sdk/test/parsers.js +5 -2
  150. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  151. package/dist/sdk/workspace-snapshot.js +48 -16
  152. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  153. package/docs/IMPROVEMENT_ANALYTICS.md +103 -0
  154. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +5 -5
  155. package/docs/README.md +2 -0
  156. package/docs/READ_OUTPUT_CONTRACTS.md +60 -1
  157. package/docs/RELEASING.md +27 -2
  158. package/docs/SCRIPTING.md +27 -1
  159. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  160. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  161. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  162. package/docs/TESTING.md +17 -0
  163. package/marketplace.json +2 -2
  164. package/package.json +6 -4
  165. package/packages/pm-beads/package.json +1 -1
  166. package/packages/pm-calendar/package.json +1 -1
  167. package/packages/pm-command-kit/package.json +1 -1
  168. package/packages/pm-digital-twin/package.json +1 -1
  169. package/packages/pm-governance-audit/package.json +1 -1
  170. package/packages/pm-guide-shell/package.json +1 -1
  171. package/packages/pm-kanban/package.json +1 -1
  172. package/packages/pm-lifecycle-hooks/package.json +1 -1
  173. package/packages/pm-linked-test-adapters/package.json +1 -1
  174. package/packages/pm-search-advanced/package.json +1 -1
  175. package/packages/pm-templates/package.json +1 -1
  176. package/packages/pm-todos/package.json +1 -1
  177. package/packages/pm-vcs/package.json +1 -1
  178. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  179. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  180. package/sdk/public-surface.json +875 -827
  181. package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +0 -2
  182. package/dist/cli-bundle/chunks/chunk-343QETLI.js +0 -2
  183. package/dist/cli-bundle/chunks/chunk-3KFVGGRE.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-3ZJRFYY2.js +0 -23
  185. package/dist/cli-bundle/chunks/chunk-4AVFKHHC.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-4OVGQW22.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-5PBP2ZP3.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-5ZKQPA44.js +0 -2
  189. package/dist/cli-bundle/chunks/chunk-A3XQ7VPU.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-AJE3AHPD.js +0 -8
  192. package/dist/cli-bundle/chunks/chunk-AOBDLU4T.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-AYRUGRNS.js +0 -3
  194. package/dist/cli-bundle/chunks/chunk-BP6EMEDP.js +0 -5
  195. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-C3YABSJK.js +0 -2
  197. package/dist/cli-bundle/chunks/chunk-CA3BURYF.js +0 -2
  198. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  199. package/dist/cli-bundle/chunks/chunk-D7I3TUGV.js +0 -2
  200. package/dist/cli-bundle/chunks/chunk-DQGJ2RWT.js +0 -3
  201. package/dist/cli-bundle/chunks/chunk-DWOAOZHZ.js +0 -2
  202. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  203. package/dist/cli-bundle/chunks/chunk-E7BFPLUZ.js +0 -5
  204. package/dist/cli-bundle/chunks/chunk-F4NREH3G.js +0 -2
  205. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  206. package/dist/cli-bundle/chunks/chunk-FDBRXV25.js +0 -2
  207. package/dist/cli-bundle/chunks/chunk-GU3TSEHD.js +0 -2
  208. package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +0 -164
  209. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  210. package/dist/cli-bundle/chunks/chunk-JFZIS6JF.js +0 -2
  211. package/dist/cli-bundle/chunks/chunk-JQ4NZ5EB.js +0 -2
  212. package/dist/cli-bundle/chunks/chunk-L6LGKJX3.js +0 -2
  213. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  214. package/dist/cli-bundle/chunks/chunk-M357ZCOR.js +0 -2
  215. package/dist/cli-bundle/chunks/chunk-M4VEE3FK.js +0 -2
  216. package/dist/cli-bundle/chunks/chunk-MCS73BKB.js +0 -3
  217. package/dist/cli-bundle/chunks/chunk-MDTH7SAE.js +0 -19
  218. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  219. package/dist/cli-bundle/chunks/chunk-OXY3SJ3N.js +0 -2
  220. package/dist/cli-bundle/chunks/chunk-PECV7L5T.js +0 -2
  221. package/dist/cli-bundle/chunks/chunk-Q3VOP62W.js +0 -2
  222. package/dist/cli-bundle/chunks/chunk-QJ7C3JIW.js +0 -2
  223. package/dist/cli-bundle/chunks/chunk-R6LSRGPS.js +0 -8
  224. package/dist/cli-bundle/chunks/chunk-R6RKEYYW.js +0 -2
  225. package/dist/cli-bundle/chunks/chunk-RAFUN7IX.js +0 -2005
  226. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  227. package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +0 -2
  228. package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +0 -56
  229. package/dist/cli-bundle/chunks/chunk-SV3YQ4RY.js +0 -2
  230. package/dist/cli-bundle/chunks/chunk-SVV3DQES.js +0 -2
  231. package/dist/cli-bundle/chunks/chunk-SXECIECW.js +0 -5
  232. package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +0 -8
  233. package/dist/cli-bundle/chunks/chunk-TPKDJ5WL.js +0 -2
  234. package/dist/cli-bundle/chunks/chunk-UVVXHGYS.js +0 -3
  235. package/dist/cli-bundle/chunks/chunk-V663653R.js +0 -20
  236. package/dist/cli-bundle/chunks/chunk-WSI5KZQJ.js +0 -55
  237. package/dist/cli-bundle/chunks/chunk-XPOQQJTX.js +0 -13
  238. package/dist/cli-bundle/chunks/chunk-YCCDXBNU.js +0 -2
  239. package/dist/cli-bundle/chunks/chunk-ZFBWCKYF.js +0 -2
  240. package/dist/cli-bundle/chunks/close-DI66JMSB.js +0 -2
  241. package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +0 -2
  242. package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +0 -2
  243. package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +0 -2
  244. package/dist/cli-bundle/chunks/create-TG67IVFI.js +0 -2
  245. package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +0 -2
  246. package/dist/cli-bundle/chunks/deps-AJUGP2OH.js +0 -2
  247. package/dist/cli-bundle/chunks/docs-QOCLDRKJ.js +0 -2
  248. package/dist/cli-bundle/chunks/files-3ST5TY64.js +0 -2
  249. package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +0 -2
  250. package/dist/cli-bundle/chunks/history-compact-7BJFML4S.js +0 -2
  251. package/dist/cli-bundle/chunks/history-redact-WJN3HYXR.js +0 -2
  252. package/dist/cli-bundle/chunks/history-repair-XDNZUB7F.js +0 -2
  253. package/dist/cli-bundle/chunks/learnings-SZMUPVNA.js +0 -2
  254. package/dist/cli-bundle/chunks/profile-KL53JIAC.js +0 -2
  255. package/dist/cli-bundle/chunks/register-mutation-OCRQNZK4.js +0 -20
  256. package/dist/cli-bundle/chunks/register-operations-HIBJXRGB.js +0 -2
  257. package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +0 -2
  258. package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +0 -2
  259. package/dist/cli-bundle/chunks/schema-QJ27OTRV.js +0 -2
  260. package/dist/cli-bundle/chunks/update-7GBO4SXG.js +0 -2
  261. package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +0 -2
  262. package/dist/cli-bundle/focused-chunks/chunk-74CWP3A4.js +0 -2
  263. package/dist/cli-bundle/focused-chunks/chunk-7AZDTGPA.js +0 -2
  264. package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +0 -2
  265. package/dist/cli-bundle/focused-chunks/chunk-LKQXXO62.js +0 -2
  266. package/dist/cli-bundle/focused-chunks/chunk-MBBMTDD3.js +0 -12
  267. package/dist/cli-bundle/focused-chunks/chunk-ME4XVOBJ.js +0 -8
  268. package/dist/cli-bundle/focused-chunks/chunk-QL5H3AQH.js +0 -2
  269. package/dist/cli-bundle/focused-chunks/chunk-YHDCGUIW.js +0 -14
@@ -4,7 +4,7 @@
4
4
  * Generated by scripts/generate-error-code-catalog.mjs. Do not edit manually.
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]="7a568064-a103-5b19-969d-6e58fc0cc5b7")}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]="8a086b83-e46b-5694-be66-9114b0d87e12")}catch(e){}}();
8
8
  import { definePmErrorCodeCatalog } from "./error-code-catalog.js";
9
9
  /** Exhaustive catalog generated from literal error guidance declarations. */
10
10
  export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
@@ -17,6 +17,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
17
17
  recovery: "Inspect the structured error guidance and retry the suggested command.",
18
18
  sources: ["core/item/parse.ts"],
19
19
  emitting_commands: ["*"],
20
+ canonical_code: "acceptance_criteria_semicolon_forbidden",
21
+ aliases: [],
20
22
  },
21
23
  {
22
24
  code: "already_claimed_by",
@@ -27,6 +29,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
27
29
  recovery: "Inspect the structured error guidance and retry the suggested command.",
28
30
  sources: ["sdk/lifecycle/claim.ts"],
29
31
  emitting_commands: ["claim"],
32
+ canonical_code: "already_claimed_by",
33
+ aliases: [],
30
34
  },
31
35
  {
32
36
  code: "ambiguous_list_all",
@@ -37,6 +41,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
37
41
  recovery: "Inspect the structured error guidance and retry the suggested command.",
38
42
  sources: ["cli/register-list-query.ts"],
39
43
  emitting_commands: ["*"],
44
+ canonical_code: "ambiguous_list_all",
45
+ aliases: [],
40
46
  },
41
47
  {
42
48
  code: "ambiguous_option_combination",
@@ -47,6 +53,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
47
53
  recovery: "Inspect the structured error guidance and retry the suggested command.",
48
54
  sources: ["sdk/lifecycle/plan.ts"],
49
55
  emitting_commands: ["plan"],
56
+ canonical_code: "ambiguous_option_combination",
57
+ aliases: [],
50
58
  },
51
59
  {
52
60
  code: "annotation_flag_like_value",
@@ -57,6 +65,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
57
65
  recovery: "Inspect the structured error guidance and retry the suggested command.",
58
66
  sources: ["sdk/annotations.ts"],
59
67
  emitting_commands: ["*"],
68
+ canonical_code: "annotation_flag_like_value",
69
+ aliases: [],
60
70
  },
61
71
  {
62
72
  code: "annotation_message_without_text",
@@ -67,6 +77,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
67
77
  recovery: "Inspect the structured error guidance and retry the suggested command.",
68
78
  sources: ["sdk/annotations.ts"],
69
79
  emitting_commands: ["*"],
80
+ canonical_code: "annotation_message_without_text",
81
+ aliases: [],
70
82
  },
71
83
  {
72
84
  code: "append_empty_body",
@@ -77,6 +89,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
77
89
  recovery: "Inspect the structured error guidance and retry the suggested command.",
78
90
  sources: ["sdk/lifecycle/append.ts"],
79
91
  emitting_commands: ["append"],
92
+ canonical_code: "append_empty_body",
93
+ aliases: [],
80
94
  },
81
95
  {
82
96
  code: "body_file_conflicts_with_body",
@@ -87,6 +101,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
87
101
  recovery: "Inspect the structured error guidance and retry the suggested command.",
88
102
  sources: ["core/io/body-file.ts"],
89
103
  emitting_commands: ["*"],
104
+ canonical_code: "body_file_conflicts_with_body",
105
+ aliases: [],
90
106
  },
91
107
  {
92
108
  code: "body_file_missing_path",
@@ -97,6 +113,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
97
113
  recovery: "Inspect the structured error guidance and retry the suggested command.",
98
114
  sources: ["core/io/body-file.ts"],
99
115
  emitting_commands: ["*"],
116
+ canonical_code: "body_file_missing_path",
117
+ aliases: [],
100
118
  },
101
119
  {
102
120
  code: "body_file_unreadable",
@@ -107,6 +125,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
107
125
  recovery: "Inspect the structured error guidance and retry the suggested command.",
108
126
  sources: ["core/io/body-file.ts"],
109
127
  emitting_commands: ["*"],
128
+ canonical_code: "body_file_unreadable",
129
+ aliases: [],
110
130
  },
111
131
  {
112
132
  code: "bundle_integrity_torn_install",
@@ -117,6 +137,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
117
137
  recovery: "Inspect the structured error guidance and retry the suggested command.",
118
138
  sources: ["cli/bundle-integrity.ts"],
119
139
  emitting_commands: ["*"],
140
+ canonical_code: "bundle_integrity_torn_install",
141
+ aliases: [],
120
142
  },
121
143
  {
122
144
  code: "capability_undeclared",
@@ -127,6 +149,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
127
149
  recovery: "Inspect the structured error guidance and retry the suggested command.",
128
150
  sources: ["sdk/compose.ts"],
129
151
  emitting_commands: ["*"],
152
+ canonical_code: "capability_undeclared",
153
+ aliases: [],
130
154
  },
131
155
  {
132
156
  code: "capability_unused",
@@ -137,6 +161,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
137
161
  recovery: "Inspect the structured error guidance and retry the suggested command.",
138
162
  sources: ["sdk/compose.ts"],
139
163
  emitting_commands: ["*"],
164
+ canonical_code: "capability_unused",
165
+ aliases: [],
140
166
  },
141
167
  {
142
168
  code: "child_projection_item_bound_exceeded",
@@ -147,6 +173,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
147
173
  recovery: "Inspect the structured error guidance and retry the suggested command.",
148
174
  sources: ["sdk/item-children.ts"],
149
175
  emitting_commands: ["*"],
176
+ canonical_code: "child_projection_item_bound_exceeded",
177
+ aliases: [],
150
178
  },
151
179
  {
152
180
  code: "close_reason_required",
@@ -157,6 +185,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
157
185
  recovery: "Inspect the structured error guidance and retry the suggested command.",
158
186
  sources: ["sdk/lifecycle-policy.ts", "sdk/lifecycle/close-many.ts"],
159
187
  emitting_commands: ["*", "close-many"],
188
+ canonical_code: "close_reason_required",
189
+ aliases: [],
160
190
  },
161
191
  {
162
192
  code: "close_through_update",
@@ -167,6 +197,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
167
197
  recovery: "Inspect the structured error guidance and retry the suggested command.",
168
198
  sources: ["core/telemetry/observability.ts"],
169
199
  emitting_commands: ["*"],
200
+ canonical_code: "close_through_update",
201
+ aliases: [],
170
202
  },
171
203
  {
172
204
  code: "close_validation_missing_fields",
@@ -177,6 +209,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
177
209
  recovery: "Inspect the structured error guidance and retry the suggested command.",
178
210
  sources: ["sdk/lifecycle/close.ts"],
179
211
  emitting_commands: ["close"],
212
+ canonical_code: "close_validation_missing_fields",
213
+ aliases: [],
180
214
  },
181
215
  {
182
216
  code: "collected_zero_items",
@@ -187,6 +221,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
187
221
  recovery: "Inspect the structured error guidance and retry the suggested command.",
188
222
  sources: ["sdk/test/execution.ts"],
189
223
  emitting_commands: ["*"],
224
+ canonical_code: "collected_zero_items",
225
+ aliases: [],
190
226
  },
191
227
  {
192
228
  code: "command_failed",
@@ -197,6 +233,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
197
233
  recovery: "Inspect the structured error guidance and retry the suggested command.",
198
234
  sources: ["cli/error-guidance.ts"],
199
235
  emitting_commands: ["*"],
236
+ canonical_code: "command_failed",
237
+ aliases: [],
200
238
  },
201
239
  {
202
240
  code: "command_namespace",
@@ -207,6 +245,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
207
245
  recovery: "Inspect the structured error guidance and retry the suggested command.",
208
246
  sources: ["sdk/cli-contracts/runtime-contracts.ts"],
209
247
  emitting_commands: ["*"],
248
+ canonical_code: "command_namespace",
249
+ aliases: [],
210
250
  },
211
251
  {
212
252
  code: "command_override_conflict",
@@ -217,6 +257,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
217
257
  recovery: "Inspect the structured error guidance and retry the suggested command.",
218
258
  sources: ["sdk/compose.ts"],
219
259
  emitting_commands: ["*"],
260
+ canonical_code: "command_override_conflict",
261
+ aliases: [],
220
262
  },
221
263
  {
222
264
  code: "config_duplicate",
@@ -227,6 +269,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
227
269
  recovery: "Inspect the structured error guidance and retry the suggested command.",
228
270
  sources: ["core/profile/profile-lint.ts"],
229
271
  emitting_commands: ["*"],
272
+ canonical_code: "config_duplicate",
273
+ aliases: [],
230
274
  },
231
275
  {
232
276
  code: "config_key_unknown",
@@ -237,6 +281,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
237
281
  recovery: "Inspect the structured error guidance and retry the suggested command.",
238
282
  sources: ["core/profile/profile-lint.ts"],
239
283
  emitting_commands: ["*"],
284
+ canonical_code: "config_key_unknown",
285
+ aliases: [],
240
286
  },
241
287
  {
242
288
  code: "config_value_invalid",
@@ -247,6 +293,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
247
293
  recovery: "Inspect the structured error guidance and retry the suggested command.",
248
294
  sources: ["core/profile/profile-lint.ts"],
249
295
  emitting_commands: ["*"],
296
+ canonical_code: "config_value_invalid",
297
+ aliases: [],
250
298
  },
251
299
  {
252
300
  code: "conflicting_lifecycle_owner",
@@ -257,6 +305,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
257
305
  recovery: "Inspect the structured error guidance and retry the suggested command.",
258
306
  sources: ["cli/register-operations.ts"],
259
307
  emitting_commands: ["*"],
308
+ canonical_code: "conflicting_lifecycle_owner",
309
+ aliases: [],
260
310
  },
261
311
  {
262
312
  code: "context_takes_no_item_argument",
@@ -267,6 +317,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
267
317
  recovery: "Inspect the structured error guidance and retry the suggested command.",
268
318
  sources: ["cli/error-guidance.ts"],
269
319
  emitting_commands: ["*"],
320
+ canonical_code: "context_takes_no_item_argument",
321
+ aliases: [],
270
322
  },
271
323
  {
272
324
  code: "core_item_field_requires_dedicated_flag",
@@ -277,6 +329,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
277
329
  recovery: "Inspect the structured error guidance and retry the suggested command.",
278
330
  sources: ["core/extensions/item-fields.ts"],
279
331
  emitting_commands: ["*"],
332
+ canonical_code: "core_item_field_requires_dedicated_flag",
333
+ aliases: [],
280
334
  },
281
335
  {
282
336
  code: "create_positional_type_without_title",
@@ -287,6 +341,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
287
341
  recovery: "Inspect the structured error guidance and retry the suggested command.",
288
342
  sources: ["cli/register-mutation.ts"],
289
343
  emitting_commands: ["*"],
344
+ canonical_code: "create_positional_type_without_title",
345
+ aliases: [],
290
346
  },
291
347
  {
292
348
  code: "dependency_edge_not_allowed",
@@ -297,6 +353,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
297
353
  recovery: "Inspect the structured error guidance and retry the suggested command.",
298
354
  sources: ["sdk/dependency-flag-validation.ts"],
299
355
  emitting_commands: ["*"],
356
+ canonical_code: "dependency_edge_not_allowed",
357
+ aliases: [],
300
358
  },
301
359
  {
302
360
  code: "duplicate_command",
@@ -307,6 +365,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
307
365
  recovery: "Inspect the structured error guidance and retry the suggested command.",
308
366
  sources: ["sdk/compose.ts"],
309
367
  emitting_commands: ["*"],
368
+ canonical_code: "duplicate_command",
369
+ aliases: [],
310
370
  },
311
371
  {
312
372
  code: "duplicate_edge",
@@ -317,6 +377,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
317
377
  recovery: "Inspect the structured error guidance and retry the suggested command.",
318
378
  sources: ["sdk/graph/remediation.ts"],
319
379
  emitting_commands: ["*"],
380
+ canonical_code: "duplicate_edge",
381
+ aliases: [],
320
382
  },
321
383
  {
322
384
  code: "duplicate_sweep_cost_limit",
@@ -327,6 +389,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
327
389
  recovery: "Inspect the structured error guidance and retry the suggested command.",
328
390
  sources: ["sdk/similarity.ts"],
329
391
  emitting_commands: ["*"],
392
+ canonical_code: "duplicate_sweep_cost_limit",
393
+ aliases: [],
330
394
  },
331
395
  {
332
396
  code: "duplicate_target_circular",
@@ -337,6 +401,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
337
401
  recovery: "Inspect the structured error guidance and retry the suggested command.",
338
402
  sources: ["sdk/lifecycle/close.ts"],
339
403
  emitting_commands: ["close"],
404
+ canonical_code: "duplicate_target_circular",
405
+ aliases: [],
340
406
  },
341
407
  {
342
408
  code: "duplicate_target_is_duplicate",
@@ -347,6 +413,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
347
413
  recovery: "Inspect the structured error guidance and retry the suggested command.",
348
414
  sources: ["sdk/lifecycle/close.ts"],
349
415
  emitting_commands: ["close"],
416
+ canonical_code: "duplicate_target_is_duplicate",
417
+ aliases: [],
350
418
  },
351
419
  {
352
420
  code: "duplicate_target_missing",
@@ -357,6 +425,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
357
425
  recovery: "Inspect the structured error guidance and retry the suggested command.",
358
426
  sources: ["sdk/lifecycle/close.ts"],
359
427
  emitting_commands: ["close"],
428
+ canonical_code: "duplicate_target_missing",
429
+ aliases: [],
360
430
  },
361
431
  {
362
432
  code: "duplicate_target_self",
@@ -367,6 +437,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
367
437
  recovery: "Inspect the structured error guidance and retry the suggested command.",
368
438
  sources: ["sdk/lifecycle/close.ts"],
369
439
  emitting_commands: ["close"],
440
+ canonical_code: "duplicate_target_self",
441
+ aliases: [],
370
442
  },
371
443
  {
372
444
  code: "empty_surface",
@@ -377,6 +449,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
377
449
  recovery: "Inspect the structured error guidance and retry the suggested command.",
378
450
  sources: ["sdk/compose.ts"],
379
451
  emitting_commands: ["*"],
452
+ canonical_code: "empty_surface",
453
+ aliases: [],
380
454
  },
381
455
  {
382
456
  code: "event_cursor_query_mismatch",
@@ -387,6 +461,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
387
461
  recovery: "Inspect the structured error guidance and retry the suggested command.",
388
462
  sources: ["sdk/mutation-events.ts"],
389
463
  emitting_commands: ["*"],
464
+ canonical_code: "event_cursor_query_mismatch",
465
+ aliases: [],
390
466
  },
391
467
  {
392
468
  code: "event_index_unavailable",
@@ -397,6 +473,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
397
473
  recovery: "Inspect the structured error guidance and retry the suggested command.",
398
474
  sources: ["sdk/mutation-events.ts"],
399
475
  emitting_commands: ["*"],
476
+ canonical_code: "event_index_unavailable",
477
+ aliases: [],
400
478
  },
401
479
  {
402
480
  code: "extension_command_activation_failed",
@@ -407,6 +485,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
407
485
  recovery: "Inspect the structured error guidance and retry the suggested command.",
408
486
  sources: ["cli/commander-usage.ts"],
409
487
  emitting_commands: ["*"],
488
+ canonical_code: "extension_command_activation_failed",
489
+ aliases: [],
410
490
  },
411
491
  {
412
492
  code: "extension_dependency_name_unsafe",
@@ -417,6 +497,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
417
497
  recovery: "Inspect the structured error guidance and retry the suggested command.",
418
498
  sources: ["sdk/extension/install-sources.ts"],
419
499
  emitting_commands: ["*"],
500
+ canonical_code: "extension_dependency_name_unsafe",
501
+ aliases: [],
420
502
  },
421
503
  {
422
504
  code: "extension_dependency_spec_invalid",
@@ -427,6 +509,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
427
509
  recovery: "Inspect the structured error guidance and retry the suggested command.",
428
510
  sources: ["sdk/extension/install-sources.ts"],
429
511
  emitting_commands: ["*"],
512
+ canonical_code: "extension_dependency_spec_invalid",
513
+ aliases: [],
430
514
  },
431
515
  {
432
516
  code: "extension_dependency_version_unsafe",
@@ -437,6 +521,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
437
521
  recovery: "Inspect the structured error guidance and retry the suggested command.",
438
522
  sources: ["sdk/extension/install-sources.ts"],
439
523
  emitting_commands: ["*"],
524
+ canonical_code: "extension_dependency_version_unsafe",
525
+ aliases: [],
440
526
  },
441
527
  {
442
528
  code: "extension_install_soft_failed",
@@ -447,6 +533,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
447
533
  recovery: "Inspect the structured error guidance and retry the suggested command.",
448
534
  sources: ["cli/register-setup.ts"],
449
535
  emitting_commands: ["*"],
536
+ canonical_code: "extension_install_soft_failed",
537
+ aliases: [],
450
538
  },
451
539
  {
452
540
  code: "extension_install_source_contains_destination",
@@ -457,6 +545,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
457
545
  recovery: "Inspect the structured error guidance and retry the suggested command.",
458
546
  sources: ["sdk/extension/install-runtime.ts"],
459
547
  emitting_commands: ["*"],
548
+ canonical_code: "extension_install_source_contains_destination",
549
+ aliases: [],
460
550
  },
461
551
  {
462
552
  code: "extension_item_field_reserved",
@@ -467,6 +557,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
467
557
  recovery: "Inspect the structured error guidance and retry the suggested command.",
468
558
  sources: ["core/extensions/item-fields.ts"],
469
559
  emitting_commands: ["*"],
560
+ canonical_code: "extension_item_field_reserved",
561
+ aliases: [],
470
562
  },
471
563
  {
472
564
  code: "extension_item_field_type_conflict",
@@ -477,6 +569,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
477
569
  recovery: "Inspect the structured error guidance and retry the suggested command.",
478
570
  sources: ["core/extensions/item-fields.ts"],
479
571
  emitting_commands: ["*"],
572
+ canonical_code: "extension_item_field_type_conflict",
573
+ aliases: [],
480
574
  },
481
575
  {
482
576
  code: "extension_item_field_unknown",
@@ -487,6 +581,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
487
581
  recovery: "Inspect the structured error guidance and retry the suggested command.",
488
582
  sources: ["core/extensions/item-fields.ts"],
489
583
  emitting_commands: ["*"],
584
+ canonical_code: "extension_item_field_unknown",
585
+ aliases: [],
490
586
  },
491
587
  {
492
588
  code: "extension_mutation_guard_failed",
@@ -497,6 +593,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
497
593
  recovery: "Inspect the structured error guidance and retry the suggested command.",
498
594
  sources: ["core/extensions/extension-hook-runtime.ts"],
499
595
  emitting_commands: ["*"],
596
+ canonical_code: "extension_mutation_guard_failed",
597
+ aliases: [],
500
598
  },
501
599
  {
502
600
  code: "extension_mutation_guard_invalid_decision",
@@ -507,6 +605,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
507
605
  recovery: "Inspect the structured error guidance and retry the suggested command.",
508
606
  sources: ["core/extensions/extension-hook-runtime.ts"],
509
607
  emitting_commands: ["*"],
608
+ canonical_code: "extension_mutation_guard_invalid_decision",
609
+ aliases: [],
510
610
  },
511
611
  {
512
612
  code: "extension_mutation_guard_invalid_denial",
@@ -517,6 +617,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
517
617
  recovery: "Inspect the structured error guidance and retry the suggested command.",
518
618
  sources: ["core/extensions/extension-hook-runtime.ts"],
519
619
  emitting_commands: ["*"],
620
+ canonical_code: "extension_mutation_guard_invalid_denial",
621
+ aliases: [],
520
622
  },
521
623
  {
522
624
  code: "extension_mutation_guard_timed_out",
@@ -527,6 +629,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
527
629
  recovery: "Inspect the structured error guidance and retry the suggested command.",
528
630
  sources: ["core/extensions/extension-hook-runtime.ts"],
529
631
  emitting_commands: ["*"],
632
+ canonical_code: "extension_mutation_guard_timed_out",
633
+ aliases: [],
530
634
  },
531
635
  {
532
636
  code: "extension_update_health_partial_coverage",
@@ -537,6 +641,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
537
641
  recovery: "Inspect the structured error guidance and retry the suggested command.",
538
642
  sources: ["core/diagnostics/remediation.ts"],
539
643
  emitting_commands: ["*"],
644
+ canonical_code: "extension_update_health_partial_coverage",
645
+ aliases: [],
540
646
  },
541
647
  {
542
648
  code: "field_duplicate",
@@ -547,6 +653,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
547
653
  recovery: "Inspect the structured error guidance and retry the suggested command.",
548
654
  sources: ["core/profile/profile-lint.ts"],
549
655
  emitting_commands: ["*"],
656
+ canonical_code: "field_duplicate",
657
+ aliases: [],
550
658
  },
551
659
  {
552
660
  code: "field_invalid",
@@ -557,6 +665,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
557
665
  recovery: "Inspect the structured error guidance and retry the suggested command.",
558
666
  sources: ["core/profile/profile-lint.ts"],
559
667
  emitting_commands: ["*"],
668
+ canonical_code: "field_invalid",
669
+ aliases: [],
560
670
  },
561
671
  {
562
672
  code: "field_mcp_input_collision",
@@ -567,6 +677,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
567
677
  recovery: "Inspect the structured error guidance and retry the suggested command.",
568
678
  sources: ["core/profile/profile-lint.ts"],
569
679
  emitting_commands: ["*"],
680
+ canonical_code: "field_mcp_input_collision",
681
+ aliases: [],
570
682
  },
571
683
  {
572
684
  code: "github_source_entry_unbuilt",
@@ -577,6 +689,32 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
577
689
  recovery: "Inspect the structured error guidance and retry the suggested command.",
578
690
  sources: ["sdk/extension/shared.ts"],
579
691
  emitting_commands: ["*"],
692
+ canonical_code: "github_source_entry_unbuilt",
693
+ aliases: [],
694
+ },
695
+ {
696
+ code: "history_author_acknowledge_required_values_missing",
697
+ meaning: "History author acknowledge required values missing condition.",
698
+ stability: "provisional",
699
+ exit_code: 2,
700
+ class: "usage",
701
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
702
+ sources: ["sdk/author-attribution.ts"],
703
+ emitting_commands: ["*"],
704
+ canonical_code: "history_author_acknowledge_required_values_missing",
705
+ aliases: [],
706
+ },
707
+ {
708
+ code: "history_author_acknowledge_selector_conflict",
709
+ meaning: "History author acknowledge selector conflict condition.",
710
+ stability: "provisional",
711
+ exit_code: 2,
712
+ class: "usage",
713
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
714
+ sources: ["sdk/author-attribution.ts"],
715
+ emitting_commands: ["*"],
716
+ canonical_code: "history_author_acknowledge_selector_conflict",
717
+ aliases: [],
580
718
  },
581
719
  {
582
720
  code: "history_author_acknowledge_selector_required",
@@ -585,8 +723,34 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
585
723
  exit_code: 2,
586
724
  class: "usage",
587
725
  recovery: "Inspect the structured error guidance and retry the suggested command.",
588
- sources: ["cli/register-history-author.ts"],
726
+ sources: ["sdk/author-attribution.ts"],
589
727
  emitting_commands: ["*"],
728
+ canonical_code: "history_author_acknowledge_selector_required",
729
+ aliases: [],
730
+ },
731
+ {
732
+ code: "history_author_acknowledge_target_not_actionable",
733
+ meaning: "History author acknowledge target not actionable condition.",
734
+ stability: "provisional",
735
+ exit_code: 2,
736
+ class: "usage",
737
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
738
+ sources: ["sdk/author-attribution.ts"],
739
+ emitting_commands: ["*"],
740
+ canonical_code: "history_author_acknowledge_target_not_actionable",
741
+ aliases: [],
742
+ },
743
+ {
744
+ code: "history_author_acknowledge_target_unreadable",
745
+ meaning: "History author acknowledge target unreadable condition.",
746
+ stability: "provisional",
747
+ exit_code: 2,
748
+ class: "usage",
749
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
750
+ sources: ["sdk/author-attribution.ts"],
751
+ emitting_commands: ["*"],
752
+ canonical_code: "history_author_acknowledge_target_unreadable",
753
+ aliases: [],
590
754
  },
591
755
  {
592
756
  code: "history_drift_chain_mismatch",
@@ -597,6 +761,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
597
761
  recovery: "Inspect the structured error guidance and retry the suggested command.",
598
762
  sources: ["core/diagnostics/remediation.ts"],
599
763
  emitting_commands: ["*"],
764
+ canonical_code: "history_drift_chain_mismatch",
765
+ aliases: ["validate_history_drift_chain_mismatches"],
600
766
  },
601
767
  {
602
768
  code: "history_drift_hash_mismatch",
@@ -607,6 +773,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
607
773
  recovery: "Inspect the structured error guidance and retry the suggested command.",
608
774
  sources: ["core/diagnostics/remediation.ts"],
609
775
  emitting_commands: ["*"],
776
+ canonical_code: "history_drift_hash_mismatch",
777
+ aliases: ["validate_history_drift_hash_mismatches"],
610
778
  },
611
779
  {
612
780
  code: "history_drift_missing_stream",
@@ -617,6 +785,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
617
785
  recovery: "Inspect the structured error guidance and retry the suggested command.",
618
786
  sources: ["core/diagnostics/remediation.ts"],
619
787
  emitting_commands: ["*"],
788
+ canonical_code: "history_drift_missing_stream",
789
+ aliases: ["validate_history_drift_missing_streams"],
620
790
  },
621
791
  {
622
792
  code: "history_drift_unreadable_stream",
@@ -627,6 +797,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
627
797
  recovery: "Inspect the structured error guidance and retry the suggested command.",
628
798
  sources: ["core/diagnostics/remediation.ts"],
629
799
  emitting_commands: ["*"],
800
+ canonical_code: "history_drift_unreadable_stream",
801
+ aliases: ["validate_history_drift_unreadable_streams"],
630
802
  },
631
803
  {
632
804
  code: "history_merge_conflict_markers_detected",
@@ -637,6 +809,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
637
809
  recovery: "Inspect the structured error guidance and retry the suggested command.",
638
810
  sources: ["core/history/read.ts"],
639
811
  emitting_commands: ["*"],
812
+ canonical_code: "merge_conflict_markers_detected",
813
+ aliases: [],
640
814
  },
641
815
  {
642
816
  code: "history_stream_over_compact_threshold",
@@ -647,6 +821,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
647
821
  recovery: "Inspect the structured error guidance and retry the suggested command.",
648
822
  sources: ["core/diagnostics/remediation.ts"],
649
823
  emitting_commands: ["*"],
824
+ canonical_code: "history_stream_over_compact_threshold",
825
+ aliases: [],
650
826
  },
651
827
  {
652
828
  code: "history_target_out_of_range",
@@ -657,6 +833,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
657
833
  recovery: "Inspect the structured error guidance and retry the suggested command.",
658
834
  sources: ["core/history/projection.ts"],
659
835
  emitting_commands: ["*"],
836
+ canonical_code: "history_target_out_of_range",
837
+ aliases: [],
660
838
  },
661
839
  {
662
840
  code: "history_unknown_author_events",
@@ -667,6 +845,80 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
667
845
  recovery: "Inspect the structured error guidance and retry the suggested command.",
668
846
  sources: ["core/diagnostics/remediation.ts"],
669
847
  emitting_commands: ["*"],
848
+ canonical_code: "history_unknown_author_events",
849
+ aliases: ["validate_history_unknown_author_events"],
850
+ },
851
+ {
852
+ code: "host_environment_capacity_fault",
853
+ meaning: "Host environment capacity fault condition.",
854
+ stability: "provisional",
855
+ exit_code: 1,
856
+ class: "generic_failure",
857
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
858
+ sources: ["sdk/environment/host-environment-errors.ts"],
859
+ emitting_commands: ["*"],
860
+ canonical_code: "host_environment_capacity_fault",
861
+ aliases: [],
862
+ },
863
+ {
864
+ code: "host_environment_operation_invalid",
865
+ meaning: "Host environment operation invalid condition.",
866
+ stability: "provisional",
867
+ exit_code: 2,
868
+ class: "usage",
869
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
870
+ sources: ["sdk/environment/host-environment-errors.ts"],
871
+ emitting_commands: ["*"],
872
+ canonical_code: "host_environment_operation_invalid",
873
+ aliases: [],
874
+ },
875
+ {
876
+ code: "host_environment_permission_fault",
877
+ meaning: "Host environment permission fault condition.",
878
+ stability: "provisional",
879
+ exit_code: 1,
880
+ class: "generic_failure",
881
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
882
+ sources: ["sdk/environment/host-environment-errors.ts"],
883
+ emitting_commands: ["*"],
884
+ canonical_code: "host_environment_permission_fault",
885
+ aliases: [],
886
+ },
887
+ {
888
+ code: "host_environment_resource_fault",
889
+ meaning: "Host environment resource fault condition.",
890
+ stability: "provisional",
891
+ exit_code: 1,
892
+ class: "generic_failure",
893
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
894
+ sources: ["sdk/environment/host-environment-errors.ts"],
895
+ emitting_commands: ["*"],
896
+ canonical_code: "host_environment_resource_fault",
897
+ aliases: [],
898
+ },
899
+ {
900
+ code: "improvement_metric_contract_conflict",
901
+ meaning: "Improvement metric contract conflict condition.",
902
+ stability: "provisional",
903
+ exit_code: 4,
904
+ class: "conflict",
905
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
906
+ sources: ["sdk/improvement-ledger.ts"],
907
+ emitting_commands: ["*"],
908
+ canonical_code: "improvement_metric_contract_conflict",
909
+ aliases: [],
910
+ },
911
+ {
912
+ code: "improvement_observation_conflict",
913
+ meaning: "Improvement observation conflict condition.",
914
+ stability: "provisional",
915
+ exit_code: 4,
916
+ class: "conflict",
917
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
918
+ sources: ["sdk/improvement-ledger.ts"],
919
+ emitting_commands: ["*"],
920
+ canonical_code: "improvement_observation_conflict",
921
+ aliases: [],
670
922
  },
671
923
  {
672
924
  code: "init_existing_settings_requires_force",
@@ -677,6 +929,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
677
929
  recovery: "Inspect the structured error guidance and retry the suggested command.",
678
930
  sources: ["sdk/init.ts"],
679
931
  emitting_commands: ["*"],
932
+ canonical_code: "init_existing_settings_requires_force",
933
+ aliases: [],
680
934
  },
681
935
  {
682
936
  code: "init_gitignore_unwritable",
@@ -687,6 +941,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
687
941
  recovery: "Inspect the structured error guidance and retry the suggested command.",
688
942
  sources: ["sdk/workspace.ts"],
689
943
  emitting_commands: ["*"],
944
+ canonical_code: "init_gitignore_unwritable",
945
+ aliases: [],
690
946
  },
691
947
  {
692
948
  code: "init_id_prefix_conflict",
@@ -697,6 +953,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
697
953
  recovery: "Inspect the structured error guidance and retry the suggested command.",
698
954
  sources: ["sdk/init.ts"],
699
955
  emitting_commands: ["*"],
956
+ canonical_code: "init_id_prefix_conflict",
957
+ aliases: [],
700
958
  },
701
959
  {
702
960
  code: "init_id_prefix_path_like",
@@ -707,6 +965,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
707
965
  recovery: "Inspect the structured error guidance and retry the suggested command.",
708
966
  sources: ["sdk/init.ts"],
709
967
  emitting_commands: ["*"],
968
+ canonical_code: "init_id_prefix_path_like",
969
+ aliases: [],
710
970
  },
711
971
  {
712
972
  code: "integrity_history_conflict_marker",
@@ -717,6 +977,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
717
977
  recovery: "Inspect the structured error guidance and retry the suggested command.",
718
978
  sources: ["core/diagnostics/remediation.ts"],
719
979
  emitting_commands: ["*"],
980
+ canonical_code: "integrity_history_conflict_marker",
981
+ aliases: ["validate_storage_history_conflict_markers"],
720
982
  },
721
983
  {
722
984
  code: "integrity_history_invalid_json",
@@ -727,6 +989,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
727
989
  recovery: "Inspect the structured error guidance and retry the suggested command.",
728
990
  sources: ["core/diagnostics/remediation.ts"],
729
991
  emitting_commands: ["*"],
992
+ canonical_code: "integrity_history_invalid_json",
993
+ aliases: [],
730
994
  },
731
995
  {
732
996
  code: "integrity_history_unreadable",
@@ -737,6 +1001,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
737
1001
  recovery: "Inspect the structured error guidance and retry the suggested command.",
738
1002
  sources: ["core/diagnostics/remediation.ts"],
739
1003
  emitting_commands: ["*"],
1004
+ canonical_code: "integrity_history_unreadable",
1005
+ aliases: [],
740
1006
  },
741
1007
  {
742
1008
  code: "integrity_item_ahead_format_version",
@@ -747,6 +1013,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
747
1013
  recovery: "Inspect the structured error guidance and retry the suggested command.",
748
1014
  sources: ["core/diagnostics/remediation.ts"],
749
1015
  emitting_commands: ["*"],
1016
+ canonical_code: "integrity_item_ahead_format_version",
1017
+ aliases: ["validate_format_version_ahead_items"],
750
1018
  },
751
1019
  {
752
1020
  code: "integrity_item_conflict_marker",
@@ -757,6 +1025,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
757
1025
  recovery: "Inspect the structured error guidance and retry the suggested command.",
758
1026
  sources: ["core/diagnostics/remediation.ts"],
759
1027
  emitting_commands: ["*"],
1028
+ canonical_code: "integrity_item_conflict_marker",
1029
+ aliases: [],
760
1030
  },
761
1031
  {
762
1032
  code: "integrity_item_outdated_format_version",
@@ -767,6 +1037,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
767
1037
  recovery: "Inspect the structured error guidance and retry the suggested command.",
768
1038
  sources: ["core/diagnostics/remediation.ts"],
769
1039
  emitting_commands: ["*"],
1040
+ canonical_code: "integrity_item_outdated_format_version",
1041
+ aliases: ["validate_format_version_outdated_items"],
770
1042
  },
771
1043
  {
772
1044
  code: "integrity_item_parse_failed",
@@ -777,6 +1049,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
777
1049
  recovery: "Inspect the structured error guidance and retry the suggested command.",
778
1050
  sources: ["core/diagnostics/remediation.ts"],
779
1051
  emitting_commands: ["*"],
1052
+ canonical_code: "integrity_item_parse_failed",
1053
+ aliases: [],
780
1054
  },
781
1055
  {
782
1056
  code: "integrity_item_unreadable",
@@ -787,6 +1061,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
787
1061
  recovery: "Inspect the structured error guidance and retry the suggested command.",
788
1062
  sources: ["core/diagnostics/remediation.ts"],
789
1063
  emitting_commands: ["*"],
1064
+ canonical_code: "integrity_item_unreadable",
1065
+ aliases: [],
790
1066
  },
791
1067
  {
792
1068
  code: "invalid_argument_value",
@@ -802,6 +1078,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
802
1078
  "sdk/lifecycle/create.ts",
803
1079
  ],
804
1080
  emitting_commands: ["*", "create"],
1081
+ canonical_code: "invalid_argument_value",
1082
+ aliases: [],
805
1083
  },
806
1084
  {
807
1085
  code: "invalid_command_usage",
@@ -812,6 +1090,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
812
1090
  recovery: "Inspect the structured error guidance and retry the suggested command.",
813
1091
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
814
1092
  emitting_commands: ["*"],
1093
+ canonical_code: "invalid_command_usage",
1094
+ aliases: [],
815
1095
  },
816
1096
  {
817
1097
  code: "invalid_event_cursor",
@@ -822,6 +1102,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
822
1102
  recovery: "Inspect the structured error guidance and retry the suggested command.",
823
1103
  sources: ["sdk/mutation-events.ts"],
824
1104
  emitting_commands: ["*"],
1105
+ canonical_code: "invalid_event_cursor",
1106
+ aliases: [],
825
1107
  },
826
1108
  {
827
1109
  code: "invalid_event_follow_interval",
@@ -832,6 +1114,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
832
1114
  recovery: "Inspect the structured error guidance and retry the suggested command.",
833
1115
  sources: ["sdk/mutation-events.ts"],
834
1116
  emitting_commands: ["*"],
1117
+ canonical_code: "invalid_event_follow_interval",
1118
+ aliases: [],
835
1119
  },
836
1120
  {
837
1121
  code: "invalid_event_limit",
@@ -842,6 +1126,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
842
1126
  recovery: "Inspect the structured error guidance and retry the suggested command.",
843
1127
  sources: ["sdk/mutation-events.ts"],
844
1128
  emitting_commands: ["*"],
1129
+ canonical_code: "invalid_event_limit",
1130
+ aliases: [],
845
1131
  },
846
1132
  {
847
1133
  code: "invalid_event_since",
@@ -852,6 +1138,104 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
852
1138
  recovery: "Inspect the structured error guidance and retry the suggested command.",
853
1139
  sources: ["sdk/mutation-events.ts"],
854
1140
  emitting_commands: ["*"],
1141
+ canonical_code: "invalid_event_since",
1142
+ aliases: [],
1143
+ },
1144
+ {
1145
+ code: "invalid_history_analytics_limit",
1146
+ meaning: "Invalid history analytics limit condition.",
1147
+ stability: "provisional",
1148
+ exit_code: 2,
1149
+ class: "usage",
1150
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1151
+ sources: ["sdk/history-analytics.ts"],
1152
+ emitting_commands: ["*"],
1153
+ canonical_code: "invalid_history_analytics_limit",
1154
+ aliases: [],
1155
+ },
1156
+ {
1157
+ code: "invalid_history_analytics_minimum_sample",
1158
+ meaning: "Invalid history analytics minimum sample condition.",
1159
+ stability: "provisional",
1160
+ exit_code: 2,
1161
+ class: "usage",
1162
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1163
+ sources: ["sdk/history-analytics.ts"],
1164
+ emitting_commands: ["*"],
1165
+ canonical_code: "invalid_history_analytics_minimum_sample",
1166
+ aliases: [],
1167
+ },
1168
+ {
1169
+ code: "invalid_history_analytics_since",
1170
+ meaning: "Invalid history analytics since condition.",
1171
+ stability: "provisional",
1172
+ exit_code: 2,
1173
+ class: "usage",
1174
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1175
+ sources: ["sdk/history-analytics.ts"],
1176
+ emitting_commands: ["*"],
1177
+ canonical_code: "invalid_history_analytics_since",
1178
+ aliases: [],
1179
+ },
1180
+ {
1181
+ code: "invalid_improvement_ledger",
1182
+ meaning: "Invalid improvement ledger condition.",
1183
+ stability: "provisional",
1184
+ exit_code: 1,
1185
+ class: "generic_failure",
1186
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1187
+ sources: ["sdk/improvement-ledger-validation.ts"],
1188
+ emitting_commands: ["*"],
1189
+ canonical_code: "invalid_improvement_ledger",
1190
+ aliases: [],
1191
+ },
1192
+ {
1193
+ code: "invalid_improvement_metric",
1194
+ meaning: "Invalid improvement metric condition.",
1195
+ stability: "provisional",
1196
+ exit_code: 2,
1197
+ class: "usage",
1198
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1199
+ sources: ["sdk/improvement-ledger.ts"],
1200
+ emitting_commands: ["*"],
1201
+ canonical_code: "invalid_improvement_metric",
1202
+ aliases: [],
1203
+ },
1204
+ {
1205
+ code: "invalid_improvement_observation",
1206
+ meaning: "Invalid improvement observation condition.",
1207
+ stability: "provisional",
1208
+ exit_code: 2,
1209
+ class: "usage",
1210
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1211
+ sources: ["sdk/improvement-ledger.ts"],
1212
+ emitting_commands: ["*"],
1213
+ canonical_code: "invalid_improvement_observation",
1214
+ aliases: [],
1215
+ },
1216
+ {
1217
+ code: "invalid_improvement_observation_limit",
1218
+ meaning: "Invalid improvement observation limit condition.",
1219
+ stability: "provisional",
1220
+ exit_code: 2,
1221
+ class: "usage",
1222
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1223
+ sources: ["sdk/improvement-ledger.ts"],
1224
+ emitting_commands: ["*"],
1225
+ canonical_code: "invalid_improvement_observation_limit",
1226
+ aliases: [],
1227
+ },
1228
+ {
1229
+ code: "invalid_improvement_observation_timestamp",
1230
+ meaning: "Invalid improvement observation timestamp condition.",
1231
+ stability: "provisional",
1232
+ exit_code: 2,
1233
+ class: "usage",
1234
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1235
+ sources: ["sdk/improvement-ledger.ts"],
1236
+ emitting_commands: ["*"],
1237
+ canonical_code: "invalid_improvement_observation_timestamp",
1238
+ aliases: [],
855
1239
  },
856
1240
  {
857
1241
  code: "invalid_provenance_predicate",
@@ -862,6 +1246,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
862
1246
  recovery: "Inspect the structured error guidance and retry the suggested command.",
863
1247
  sources: ["sdk/history-provenance.ts"],
864
1248
  emitting_commands: ["*"],
1249
+ canonical_code: "invalid_provenance_predicate",
1250
+ aliases: [],
865
1251
  },
866
1252
  {
867
1253
  code: "invalid_query_cursor",
@@ -872,6 +1258,20 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
872
1258
  recovery: "Inspect the structured error guidance and retry the suggested command.",
873
1259
  sources: ["sdk/pagination.ts"],
874
1260
  emitting_commands: ["*"],
1261
+ canonical_code: "invalid_query_cursor",
1262
+ aliases: [],
1263
+ },
1264
+ {
1265
+ code: "invalid_read_output_session",
1266
+ meaning: "Invalid read output session condition.",
1267
+ stability: "provisional",
1268
+ exit_code: 2,
1269
+ class: "usage",
1270
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1271
+ sources: ["sdk/read-output-session.ts"],
1272
+ emitting_commands: ["*"],
1273
+ canonical_code: "invalid_read_output_session",
1274
+ aliases: [],
875
1275
  },
876
1276
  {
877
1277
  code: "invalid_workspace_snapshot_target",
@@ -882,6 +1282,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
882
1282
  recovery: "Inspect the structured error guidance and retry the suggested command.",
883
1283
  sources: ["sdk/workspace-snapshot.ts"],
884
1284
  emitting_commands: ["*"],
1285
+ canonical_code: "invalid_workspace_snapshot_target",
1286
+ aliases: [],
885
1287
  },
886
1288
  {
887
1289
  code: "item_document_invalid",
@@ -892,6 +1294,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
892
1294
  recovery: "Inspect the structured error guidance and retry the suggested command.",
893
1295
  sources: ["core/item/item-format.ts"],
894
1296
  emitting_commands: ["*"],
1297
+ canonical_code: "item_document_invalid",
1298
+ aliases: [],
895
1299
  },
896
1300
  {
897
1301
  code: "item_document_roundtrip_failed",
@@ -902,6 +1306,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
902
1306
  recovery: "Inspect the structured error guidance and retry the suggested command.",
903
1307
  sources: ["core/item/item-format.ts"],
904
1308
  emitting_commands: ["*"],
1309
+ canonical_code: "item_document_roundtrip_failed",
1310
+ aliases: [],
905
1311
  },
906
1312
  {
907
1313
  code: "item_id_collision",
@@ -912,6 +1318,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
912
1318
  recovery: "Inspect the structured error guidance and retry the suggested command.",
913
1319
  sources: ["sdk/lifecycle/copy.ts"],
914
1320
  emitting_commands: ["copy"],
1321
+ canonical_code: "item_id_collision",
1322
+ aliases: [],
915
1323
  },
916
1324
  {
917
1325
  code: "item_not_found",
@@ -922,6 +1330,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
922
1330
  recovery: "Inspect the structured error guidance and retry the suggested command.",
923
1331
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
924
1332
  emitting_commands: ["*"],
1333
+ canonical_code: "item_not_found",
1334
+ aliases: [],
925
1335
  },
926
1336
  {
927
1337
  code: "likely_duplicate",
@@ -932,6 +1342,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
932
1342
  recovery: "Inspect the structured error guidance and retry the suggested command.",
933
1343
  sources: ["sdk/similarity.ts"],
934
1344
  emitting_commands: ["*"],
1345
+ canonical_code: "likely_duplicate",
1346
+ aliases: [],
935
1347
  },
936
1348
  {
937
1349
  code: "linked_test_value_not_quoted",
@@ -942,6 +1354,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
942
1354
  recovery: "Inspect the structured error guidance and retry the suggested command.",
943
1355
  sources: ["cli/error-guidance.ts"],
944
1356
  emitting_commands: ["*"],
1357
+ canonical_code: "linked_test_value_not_quoted",
1358
+ aliases: [],
945
1359
  },
946
1360
  {
947
1361
  code: "list_source_incomplete",
@@ -952,6 +1366,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
952
1366
  recovery: "Inspect the structured error guidance and retry the suggested command.",
953
1367
  sources: ["sdk/query/list.ts"],
954
1368
  emitting_commands: ["list"],
1369
+ canonical_code: "list_source_incomplete",
1370
+ aliases: [],
955
1371
  },
956
1372
  {
957
1373
  code: "local_package_archive_unsafe",
@@ -962,6 +1378,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
962
1378
  recovery: "Inspect the structured error guidance and retry the suggested command.",
963
1379
  sources: ["sdk/extension/install-sources.ts"],
964
1380
  emitting_commands: ["*"],
1381
+ canonical_code: "local_package_archive_unsafe",
1382
+ aliases: [],
965
1383
  },
966
1384
  {
967
1385
  code: "local_source_not_found_bare_name",
@@ -972,6 +1390,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
972
1390
  recovery: "Inspect the structured error guidance and retry the suggested command.",
973
1391
  sources: ["sdk/extension/install-sources.ts"],
974
1392
  emitting_commands: ["*"],
1393
+ canonical_code: "local_source_not_found_bare_name",
1394
+ aliases: [],
975
1395
  },
976
1396
  {
977
1397
  code: "lock_conflict",
@@ -986,6 +1406,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
986
1406
  "core/telemetry/observability.ts",
987
1407
  ],
988
1408
  emitting_commands: ["*"],
1409
+ canonical_code: "lock_conflict",
1410
+ aliases: [],
989
1411
  },
990
1412
  {
991
1413
  code: "locks_stale_count",
@@ -996,6 +1418,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
996
1418
  recovery: "Inspect the structured error guidance and retry the suggested command.",
997
1419
  sources: ["core/diagnostics/remediation.ts"],
998
1420
  emitting_commands: ["*"],
1421
+ canonical_code: "locks_stale_count",
1422
+ aliases: [],
999
1423
  },
1000
1424
  {
1001
1425
  code: "locks_unreadable",
@@ -1006,6 +1430,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1006
1430
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1007
1431
  sources: ["core/diagnostics/remediation.ts"],
1008
1432
  emitting_commands: ["*"],
1433
+ canonical_code: "locks_unreadable",
1434
+ aliases: [],
1009
1435
  },
1010
1436
  {
1011
1437
  code: "malformed_plan_step_evidence",
@@ -1016,6 +1442,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1016
1442
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1017
1443
  sources: ["sdk/lifecycle/plan.ts"],
1018
1444
  emitting_commands: ["plan"],
1445
+ canonical_code: "malformed_plan_step_evidence",
1446
+ aliases: [],
1019
1447
  },
1020
1448
  {
1021
1449
  code: "manifest_capabilities_absent",
@@ -1026,6 +1454,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1026
1454
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1027
1455
  sources: ["sdk/compose.ts"],
1028
1456
  emitting_commands: ["*"],
1457
+ canonical_code: "manifest_capabilities_absent",
1458
+ aliases: [],
1029
1459
  },
1030
1460
  {
1031
1461
  code: "merge_conflict_markers_detected",
@@ -1036,6 +1466,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1036
1466
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1037
1467
  sources: ["core/item/item-format.ts"],
1038
1468
  emitting_commands: ["*"],
1469
+ canonical_code: "merge_conflict_markers_detected",
1470
+ aliases: ["history_merge_conflict_markers_detected"],
1039
1471
  },
1040
1472
  {
1041
1473
  code: "merge_git_config_unwritable",
@@ -1046,6 +1478,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1046
1478
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1047
1479
  sources: ["sdk/merge/install.ts"],
1048
1480
  emitting_commands: ["*"],
1481
+ canonical_code: "merge_git_config_unwritable",
1482
+ aliases: [],
1049
1483
  },
1050
1484
  {
1051
1485
  code: "merge_root_not_found",
@@ -1056,6 +1490,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1056
1490
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1057
1491
  sources: ["sdk/merge/install.ts"],
1058
1492
  emitting_commands: ["*"],
1493
+ canonical_code: "merge_root_not_found",
1494
+ aliases: [],
1059
1495
  },
1060
1496
  {
1061
1497
  code: "missing_directory",
@@ -1066,6 +1502,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1066
1502
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1067
1503
  sources: ["core/diagnostics/remediation.ts"],
1068
1504
  emitting_commands: ["*"],
1505
+ canonical_code: "missing_directory",
1506
+ aliases: [],
1069
1507
  },
1070
1508
  {
1071
1509
  code: "missing_lifecycle_target",
@@ -1076,6 +1514,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1076
1514
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1077
1515
  sources: ["sdk/extension.ts"],
1078
1516
  emitting_commands: ["*"],
1517
+ canonical_code: "missing_lifecycle_target",
1518
+ aliases: [],
1079
1519
  },
1080
1520
  {
1081
1521
  code: "missing_required_argument",
@@ -1093,6 +1533,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1093
1533
  "sdk/invocation-author.ts",
1094
1534
  ],
1095
1535
  emitting_commands: ["*"],
1536
+ canonical_code: "missing_required_argument",
1537
+ aliases: [],
1096
1538
  },
1097
1539
  {
1098
1540
  code: "missing_required_option",
@@ -1109,6 +1551,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1109
1551
  "sdk/lifecycle/plan.ts",
1110
1552
  ],
1111
1553
  emitting_commands: ["*", "create", "plan"],
1554
+ canonical_code: "missing_required_option",
1555
+ aliases: [],
1112
1556
  },
1113
1557
  {
1114
1558
  code: "module_import_failed",
@@ -1119,6 +1563,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1119
1563
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1120
1564
  sources: ["cli/error-guidance.ts"],
1121
1565
  emitting_commands: ["*"],
1566
+ canonical_code: "module_import_failed",
1567
+ aliases: [],
1122
1568
  },
1123
1569
  {
1124
1570
  code: "multi_target_github_install_ambiguous",
@@ -1129,6 +1575,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1129
1575
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1130
1576
  sources: ["cli/register-setup.ts"],
1131
1577
  emitting_commands: ["*"],
1578
+ canonical_code: "multi_target_github_install_ambiguous",
1579
+ aliases: [],
1132
1580
  },
1133
1581
  {
1134
1582
  code: "mutation_author_required",
@@ -1139,6 +1587,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1139
1587
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1140
1588
  sources: ["sdk/mutation-guard.ts"],
1141
1589
  emitting_commands: ["*"],
1590
+ canonical_code: "mutation_author_required",
1591
+ aliases: [],
1142
1592
  },
1143
1593
  {
1144
1594
  code: "mutation_secret_guard_blocked",
@@ -1149,6 +1599,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1149
1599
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1150
1600
  sources: ["sdk/mutation-guard.ts"],
1151
1601
  emitting_commands: ["*"],
1602
+ canonical_code: "mutation_secret_guard_blocked",
1603
+ aliases: [],
1152
1604
  },
1153
1605
  {
1154
1606
  code: "no_matching_tests",
@@ -1159,6 +1611,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1159
1611
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1160
1612
  sources: ["sdk/test/execution.ts"],
1161
1613
  emitting_commands: ["*"],
1614
+ canonical_code: "no_matching_tests",
1615
+ aliases: [],
1162
1616
  },
1163
1617
  {
1164
1618
  code: "no_projects_matched_filters",
@@ -1169,6 +1623,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1169
1623
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1170
1624
  sources: ["sdk/test/execution.ts"],
1171
1625
  emitting_commands: ["*"],
1626
+ canonical_code: "no_projects_matched_filters",
1627
+ aliases: [],
1172
1628
  },
1173
1629
  {
1174
1630
  code: "no_test_files_found",
@@ -1179,6 +1635,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1179
1635
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1180
1636
  sources: ["sdk/test/execution.ts"],
1181
1637
  emitting_commands: ["*"],
1638
+ canonical_code: "no_test_files_found",
1639
+ aliases: [],
1182
1640
  },
1183
1641
  {
1184
1642
  code: "no_tests_found",
@@ -1189,6 +1647,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1189
1647
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1190
1648
  sources: ["sdk/test/execution.ts"],
1191
1649
  emitting_commands: ["*"],
1650
+ canonical_code: "no_tests_found",
1651
+ aliases: [],
1192
1652
  },
1193
1653
  {
1194
1654
  code: "no_update_fields",
@@ -1199,6 +1659,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1199
1659
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1200
1660
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1201
1661
  emitting_commands: ["*"],
1662
+ canonical_code: "no_update_fields",
1663
+ aliases: [],
1202
1664
  },
1203
1665
  {
1204
1666
  code: "npm_package_not_found",
@@ -1209,6 +1671,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1209
1671
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1210
1672
  sources: ["sdk/extension/install-sources.ts"],
1211
1673
  emitting_commands: ["*"],
1674
+ canonical_code: "npm_package_not_found",
1675
+ aliases: [],
1212
1676
  },
1213
1677
  {
1214
1678
  code: "ownership_conflict",
@@ -1223,6 +1687,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1223
1687
  "sdk/annotations.ts",
1224
1688
  ],
1225
1689
  emitting_commands: ["*"],
1690
+ canonical_code: "ownership_conflict",
1691
+ aliases: [],
1226
1692
  },
1227
1693
  {
1228
1694
  code: "ownership_dependency_bypass_restricted_options",
@@ -1233,6 +1699,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1233
1699
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1234
1700
  sources: ["sdk/lifecycle/update.ts"],
1235
1701
  emitting_commands: ["update"],
1702
+ canonical_code: "ownership_dependency_bypass_restricted_options",
1703
+ aliases: [],
1236
1704
  },
1237
1705
  {
1238
1706
  code: "ownership_metadata_bypass_restricted_options",
@@ -1243,6 +1711,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1243
1711
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1244
1712
  sources: ["sdk/lifecycle/update.ts"],
1245
1713
  emitting_commands: ["update"],
1714
+ canonical_code: "ownership_metadata_bypass_restricted_options",
1715
+ aliases: [],
1246
1716
  },
1247
1717
  {
1248
1718
  code: "package_spec_empty",
@@ -1253,6 +1723,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1253
1723
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1254
1724
  sources: ["core/profile/profile-lint.ts"],
1255
1725
  emitting_commands: ["*"],
1726
+ canonical_code: "package_spec_empty",
1727
+ aliases: [],
1256
1728
  },
1257
1729
  {
1258
1730
  code: "profile_name_empty",
@@ -1263,6 +1735,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1263
1735
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1264
1736
  sources: ["core/profile/profile-lint.ts"],
1265
1737
  emitting_commands: ["*"],
1738
+ canonical_code: "profile_name_empty",
1739
+ aliases: [],
1266
1740
  },
1267
1741
  {
1268
1742
  code: "profile_name_not_normalized",
@@ -1273,6 +1747,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1273
1747
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1274
1748
  sources: ["core/profile/profile-lint.ts"],
1275
1749
  emitting_commands: ["*"],
1750
+ canonical_code: "profile_name_not_normalized",
1751
+ aliases: [],
1276
1752
  },
1277
1753
  {
1278
1754
  code: "profile_summary_empty",
@@ -1283,6 +1759,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1283
1759
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1284
1760
  sources: ["core/profile/profile-lint.ts"],
1285
1761
  emitting_commands: ["*"],
1762
+ canonical_code: "profile_summary_empty",
1763
+ aliases: [],
1286
1764
  },
1287
1765
  {
1288
1766
  code: "profile_title_empty",
@@ -1293,6 +1771,32 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1293
1771
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1294
1772
  sources: ["core/profile/profile-lint.ts"],
1295
1773
  emitting_commands: ["*"],
1774
+ canonical_code: "profile_title_empty",
1775
+ aliases: [],
1776
+ },
1777
+ {
1778
+ code: "project_runtime_stale_mutation",
1779
+ meaning: "Project runtime stale mutation condition.",
1780
+ stability: "provisional",
1781
+ exit_code: 4,
1782
+ class: "conflict",
1783
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1784
+ sources: ["sdk/environment/project-runtime-compatibility.ts"],
1785
+ emitting_commands: ["*"],
1786
+ canonical_code: "project_runtime_stale_mutation",
1787
+ aliases: [],
1788
+ },
1789
+ {
1790
+ code: "project_runtime_stale_read",
1791
+ meaning: "Project runtime stale read condition.",
1792
+ stability: "provisional",
1793
+ exit_code: 1,
1794
+ class: "generic_failure",
1795
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1796
+ sources: ["sdk/environment/project-runtime-compatibility.ts"],
1797
+ emitting_commands: ["*"],
1798
+ canonical_code: "project_runtime_stale_read",
1799
+ aliases: [],
1296
1800
  },
1297
1801
  {
1298
1802
  code: "redundant_edge",
@@ -1303,6 +1807,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1303
1807
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1304
1808
  sources: ["sdk/graph/remediation.ts"],
1305
1809
  emitting_commands: ["*"],
1810
+ canonical_code: "redundant_edge",
1811
+ aliases: [],
1306
1812
  },
1307
1813
  {
1308
1814
  code: "reindex_already_running",
@@ -1313,6 +1819,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1313
1819
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1314
1820
  sources: ["sdk/governance/reindex.ts"],
1315
1821
  emitting_commands: ["*"],
1822
+ canonical_code: "reindex_already_running",
1823
+ aliases: [],
1316
1824
  },
1317
1825
  {
1318
1826
  code: "reserved_item_field",
@@ -1323,6 +1831,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1323
1831
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1324
1832
  sources: ["sdk/compose.ts"],
1325
1833
  emitting_commands: ["*"],
1834
+ canonical_code: "reserved_item_field",
1835
+ aliases: [],
1326
1836
  },
1327
1837
  {
1328
1838
  code: "schema_migration_input_required",
@@ -1333,6 +1843,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1333
1843
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1334
1844
  sources: ["cli/migration-gates.ts"],
1335
1845
  emitting_commands: ["*"],
1846
+ canonical_code: "schema_migration_input_required",
1847
+ aliases: [],
1336
1848
  },
1337
1849
  {
1338
1850
  code: "settings_read_fs_error",
@@ -1343,6 +1855,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1343
1855
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1344
1856
  sources: ["core/diagnostics/remediation.ts"],
1345
1857
  emitting_commands: ["*"],
1858
+ canonical_code: "settings_read_fs_error",
1859
+ aliases: [],
1346
1860
  },
1347
1861
  {
1348
1862
  code: "settings_read_invalid_json",
@@ -1353,6 +1867,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1353
1867
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1354
1868
  sources: ["core/diagnostics/remediation.ts"],
1355
1869
  emitting_commands: ["*"],
1870
+ canonical_code: "settings_read_invalid_json",
1871
+ aliases: [],
1356
1872
  },
1357
1873
  {
1358
1874
  code: "settings_read_invalid_schema",
@@ -1363,6 +1879,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1363
1879
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1364
1880
  sources: ["core/diagnostics/remediation.ts"],
1365
1881
  emitting_commands: ["*"],
1882
+ canonical_code: "settings_read_invalid_schema",
1883
+ aliases: [],
1366
1884
  },
1367
1885
  {
1368
1886
  code: "settings_read_merge_failed",
@@ -1373,6 +1891,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1373
1891
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1374
1892
  sources: ["core/diagnostics/remediation.ts"],
1375
1893
  emitting_commands: ["*"],
1894
+ canonical_code: "settings_read_merge_failed",
1895
+ aliases: [],
1376
1896
  },
1377
1897
  {
1378
1898
  code: "status_duplicate",
@@ -1383,6 +1903,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1383
1903
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1384
1904
  sources: ["core/profile/profile-lint.ts"],
1385
1905
  emitting_commands: ["*"],
1906
+ canonical_code: "status_duplicate",
1907
+ aliases: [],
1386
1908
  },
1387
1909
  {
1388
1910
  code: "status_invalid",
@@ -1393,6 +1915,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1393
1915
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1394
1916
  sources: ["core/profile/profile-lint.ts"],
1395
1917
  emitting_commands: ["*"],
1918
+ canonical_code: "status_invalid",
1919
+ aliases: [],
1396
1920
  },
1397
1921
  {
1398
1922
  code: "stdin_json_invalid",
@@ -1403,6 +1927,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1403
1927
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1404
1928
  sources: ["sdk/structured-mutations.ts"],
1405
1929
  emitting_commands: ["*"],
1930
+ canonical_code: "stdin_json_invalid",
1931
+ aliases: [],
1406
1932
  },
1407
1933
  {
1408
1934
  code: "stdin_json_unknown_key",
@@ -1413,6 +1939,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1413
1939
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1414
1940
  sources: ["sdk/structured-mutations.ts"],
1415
1941
  emitting_commands: ["*"],
1942
+ canonical_code: "stdin_json_unknown_key",
1943
+ aliases: [],
1416
1944
  },
1417
1945
  {
1418
1946
  code: "structured_event_immutable",
@@ -1423,6 +1951,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1423
1951
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1424
1952
  sources: ["sdk/annotations.ts"],
1425
1953
  emitting_commands: ["*"],
1954
+ canonical_code: "structured_event_immutable",
1955
+ aliases: [],
1426
1956
  },
1427
1957
  {
1428
1958
  code: "structured_event_input_conflict",
@@ -1433,6 +1963,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1433
1963
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1434
1964
  sources: ["sdk/notes.ts"],
1435
1965
  emitting_commands: ["*"],
1966
+ canonical_code: "structured_event_input_conflict",
1967
+ aliases: [],
1436
1968
  },
1437
1969
  {
1438
1970
  code: "structured_event_json_empty",
@@ -1443,6 +1975,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1443
1975
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1444
1976
  sources: ["sdk/notes.ts"],
1445
1977
  emitting_commands: ["*"],
1978
+ canonical_code: "structured_event_json_empty",
1979
+ aliases: [],
1446
1980
  },
1447
1981
  {
1448
1982
  code: "structured_event_json_invalid",
@@ -1453,6 +1987,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1453
1987
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1454
1988
  sources: ["sdk/notes.ts"],
1455
1989
  emitting_commands: ["*"],
1990
+ canonical_code: "structured_event_json_invalid",
1991
+ aliases: [],
1456
1992
  },
1457
1993
  {
1458
1994
  code: "structured_event_since_invalid",
@@ -1463,6 +1999,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1463
1999
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1464
2000
  sources: ["sdk/notes.ts"],
1465
2001
  emitting_commands: ["*"],
2002
+ canonical_code: "structured_event_since_invalid",
2003
+ aliases: [],
1466
2004
  },
1467
2005
  {
1468
2006
  code: "telemetry_endpoint_probe_failed",
@@ -1473,6 +2011,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1473
2011
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1474
2012
  sources: ["core/diagnostics/remediation.ts"],
1475
2013
  emitting_commands: ["*"],
2014
+ canonical_code: "telemetry_endpoint_probe_failed",
2015
+ aliases: [],
1476
2016
  },
1477
2017
  {
1478
2018
  code: "telemetry_endpoint_probe_http_status",
@@ -1483,6 +2023,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1483
2023
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1484
2024
  sources: ["core/diagnostics/remediation.ts"],
1485
2025
  emitting_commands: ["*"],
2026
+ canonical_code: "telemetry_endpoint_probe_http_status",
2027
+ aliases: [],
1486
2028
  },
1487
2029
  {
1488
2030
  code: "telemetry_otel_export_failing",
@@ -1493,6 +2035,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1493
2035
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1494
2036
  sources: ["core/diagnostics/remediation.ts"],
1495
2037
  emitting_commands: ["*"],
2038
+ canonical_code: "telemetry_otel_export_failing",
2039
+ aliases: [],
1496
2040
  },
1497
2041
  {
1498
2042
  code: "telemetry_queue_high_retries",
@@ -1503,6 +2047,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1503
2047
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1504
2048
  sources: ["core/diagnostics/remediation.ts"],
1505
2049
  emitting_commands: ["*"],
2050
+ canonical_code: "telemetry_queue_high_retries",
2051
+ aliases: [],
1506
2052
  },
1507
2053
  {
1508
2054
  code: "telemetry_queue_invalid_rows",
@@ -1513,6 +2059,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1513
2059
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1514
2060
  sources: ["core/diagnostics/remediation.ts"],
1515
2061
  emitting_commands: ["*"],
2062
+ canonical_code: "telemetry_queue_invalid_rows",
2063
+ aliases: [],
1516
2064
  },
1517
2065
  {
1518
2066
  code: "telemetry_queue_pending",
@@ -1523,6 +2071,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1523
2071
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1524
2072
  sources: ["core/diagnostics/remediation.ts"],
1525
2073
  emitting_commands: ["*"],
2074
+ canonical_code: "telemetry_queue_pending",
2075
+ aliases: [],
1526
2076
  },
1527
2077
  {
1528
2078
  code: "telemetry_schema_version_behind",
@@ -1533,6 +2083,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1533
2083
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1534
2084
  sources: ["core/diagnostics/remediation.ts"],
1535
2085
  emitting_commands: ["*"],
2086
+ canonical_code: "telemetry_schema_version_behind",
2087
+ aliases: [],
1536
2088
  },
1537
2089
  {
1538
2090
  code: "telemetry_state_invalid_json",
@@ -1543,6 +2095,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1543
2095
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1544
2096
  sources: ["core/diagnostics/remediation.ts"],
1545
2097
  emitting_commands: ["*"],
2098
+ canonical_code: "telemetry_state_invalid_json",
2099
+ aliases: [],
1546
2100
  },
1547
2101
  {
1548
2102
  code: "template_type_unknown",
@@ -1553,6 +2107,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1553
2107
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1554
2108
  sources: ["core/profile/profile-lint.ts"],
1555
2109
  emitting_commands: ["*"],
2110
+ canonical_code: "template_type_unknown",
2111
+ aliases: [],
1556
2112
  },
1557
2113
  {
1558
2114
  code: "terminal_plan_mutation",
@@ -1563,6 +2119,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1563
2119
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1564
2120
  sources: ["sdk/lifecycle/plan.ts"],
1565
2121
  emitting_commands: ["plan"],
2122
+ canonical_code: "terminal_plan_mutation",
2123
+ aliases: [],
1566
2124
  },
1567
2125
  {
1568
2126
  code: "terminal_state_conflict",
@@ -1573,6 +2131,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1573
2131
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1574
2132
  sources: ["core/telemetry/observability.ts"],
1575
2133
  emitting_commands: ["*"],
2134
+ canonical_code: "terminal_state_conflict",
2135
+ aliases: [],
1576
2136
  },
1577
2137
  {
1578
2138
  code: "tracked_runtime_cache_files",
@@ -1583,6 +2143,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1583
2143
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1584
2144
  sources: ["core/diagnostics/remediation.ts"],
1585
2145
  emitting_commands: ["*"],
2146
+ canonical_code: "tracked_runtime_cache_files",
2147
+ aliases: ["validate_storage_tracked_runtime_cache_files"],
1586
2148
  },
1587
2149
  {
1588
2150
  code: "tracker_not_initialized",
@@ -1593,6 +2155,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1593
2155
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1594
2156
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1595
2157
  emitting_commands: ["*"],
2158
+ canonical_code: "tracker_not_initialized",
2159
+ aliases: [],
1596
2160
  },
1597
2161
  {
1598
2162
  code: "tracker_root_missing",
@@ -1603,6 +2167,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1603
2167
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1604
2168
  sources: ["core/store/item-store.ts"],
1605
2169
  emitting_commands: ["*"],
2170
+ canonical_code: "tracker_root_missing",
2171
+ aliases: [],
1606
2172
  },
1607
2173
  {
1608
2174
  code: "tracker_root_not_directory",
@@ -1613,6 +2179,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1613
2179
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1614
2180
  sources: ["core/store/item-store.ts"],
1615
2181
  emitting_commands: ["*"],
2182
+ canonical_code: "tracker_root_not_directory",
2183
+ aliases: [],
1616
2184
  },
1617
2185
  {
1618
2186
  code: "type_duplicate",
@@ -1623,6 +2191,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1623
2191
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1624
2192
  sources: ["core/profile/profile-lint.ts"],
1625
2193
  emitting_commands: ["*"],
2194
+ canonical_code: "type_duplicate",
2195
+ aliases: [],
1626
2196
  },
1627
2197
  {
1628
2198
  code: "type_invalid",
@@ -1633,6 +2203,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1633
2203
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1634
2204
  sources: ["core/profile/profile-lint.ts"],
1635
2205
  emitting_commands: ["*"],
2206
+ canonical_code: "type_invalid",
2207
+ aliases: [],
1636
2208
  },
1637
2209
  {
1638
2210
  code: "unknown_command",
@@ -1647,6 +2219,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1647
2219
  "sdk/cli-contracts/runtime-contracts.ts",
1648
2220
  ],
1649
2221
  emitting_commands: ["*"],
2222
+ canonical_code: "unknown_command",
2223
+ aliases: [],
1650
2224
  },
1651
2225
  {
1652
2226
  code: "unknown_context_intent",
@@ -1657,6 +2231,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1657
2231
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1658
2232
  sources: ["sdk/context-intent-contracts.ts"],
1659
2233
  emitting_commands: ["*"],
2234
+ canonical_code: "unknown_context_intent",
2235
+ aliases: [],
1660
2236
  },
1661
2237
  {
1662
2238
  code: "unknown_error",
@@ -1667,6 +2243,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1667
2243
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1668
2244
  sources: ["cli/error-guidance.ts"],
1669
2245
  emitting_commands: ["*"],
2246
+ canonical_code: "unknown_error",
2247
+ aliases: [],
1670
2248
  },
1671
2249
  {
1672
2250
  code: "unknown_field",
@@ -1677,6 +2255,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1677
2255
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1678
2256
  sources: ["sdk/schema.ts"],
1679
2257
  emitting_commands: ["*"],
2258
+ canonical_code: "unknown_field",
2259
+ aliases: [],
1680
2260
  },
1681
2261
  {
1682
2262
  code: "unknown_field_projection",
@@ -1687,6 +2267,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1687
2267
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1688
2268
  sources: ["sdk/query/get.ts", "sdk/query/list.ts"],
1689
2269
  emitting_commands: ["get", "list"],
2270
+ canonical_code: "unknown_field_projection",
2271
+ aliases: [],
1690
2272
  },
1691
2273
  {
1692
2274
  code: "unknown_item_type",
@@ -1697,6 +2279,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1697
2279
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1698
2280
  sources: ["sdk/schema.ts"],
1699
2281
  emitting_commands: ["*"],
2282
+ canonical_code: "unknown_item_type",
2283
+ aliases: [],
1700
2284
  },
1701
2285
  {
1702
2286
  code: "unknown_lifecycle_action",
@@ -1707,6 +2291,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1707
2291
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1708
2292
  sources: ["sdk/extension.ts"],
1709
2293
  emitting_commands: ["*"],
2294
+ canonical_code: "unknown_lifecycle_action",
2295
+ aliases: [],
1710
2296
  },
1711
2297
  {
1712
2298
  code: "unknown_option",
@@ -1717,6 +2303,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1717
2303
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1718
2304
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1719
2305
  emitting_commands: ["*"],
2306
+ canonical_code: "unknown_option",
2307
+ aliases: [],
1720
2308
  },
1721
2309
  {
1722
2310
  code: "unknown_plan_template",
@@ -1727,6 +2315,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1727
2315
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1728
2316
  sources: ["sdk/lifecycle/plan.ts"],
1729
2317
  emitting_commands: ["plan"],
2318
+ canonical_code: "unknown_plan_template",
2319
+ aliases: [],
1730
2320
  },
1731
2321
  {
1732
2322
  code: "unknown_provenance_dimension",
@@ -1737,6 +2327,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1737
2327
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1738
2328
  sources: ["sdk/history-provenance.ts"],
1739
2329
  emitting_commands: ["*"],
2330
+ canonical_code: "unknown_provenance_dimension",
2331
+ aliases: [],
1740
2332
  },
1741
2333
  {
1742
2334
  code: "unknown_status",
@@ -1747,6 +2339,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1747
2339
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1748
2340
  sources: ["sdk/schema.ts"],
1749
2341
  emitting_commands: ["*"],
2342
+ canonical_code: "unknown_status",
2343
+ aliases: [],
1750
2344
  },
1751
2345
  {
1752
2346
  code: "unknown_subcommand",
@@ -1762,6 +2356,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1762
2356
  "sdk/telemetry.ts",
1763
2357
  ],
1764
2358
  emitting_commands: ["*"],
2359
+ canonical_code: "unknown_subcommand",
2360
+ aliases: [],
1765
2361
  },
1766
2362
  {
1767
2363
  code: "unsupported_update_option",
@@ -1772,6 +2368,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1772
2368
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1773
2369
  sources: ["cli/error-guidance.ts"],
1774
2370
  emitting_commands: ["*"],
2371
+ canonical_code: "unsupported_update_option",
2372
+ aliases: [],
1775
2373
  },
1776
2374
  {
1777
2375
  code: "validate_command_references_stale_pm_ids",
@@ -1782,6 +2380,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1782
2380
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1783
2381
  sources: ["core/diagnostics/remediation.ts"],
1784
2382
  emitting_commands: ["*"],
2383
+ canonical_code: "validate_command_references_stale_pm_ids",
2384
+ aliases: [],
1785
2385
  },
1786
2386
  {
1787
2387
  code: "validate_files_missing_linked_paths",
@@ -1792,6 +2392,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1792
2392
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1793
2393
  sources: ["core/diagnostics/remediation.ts"],
1794
2394
  emitting_commands: ["*"],
2395
+ canonical_code: "validate_files_missing_linked_paths",
2396
+ aliases: [],
1795
2397
  },
1796
2398
  {
1797
2399
  code: "validate_files_orphaned_paths",
@@ -1802,6 +2404,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1802
2404
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1803
2405
  sources: ["core/diagnostics/remediation.ts"],
1804
2406
  emitting_commands: ["*"],
2407
+ canonical_code: "validate_files_orphaned_paths",
2408
+ aliases: [],
1805
2409
  },
1806
2410
  {
1807
2411
  code: "validate_files_tracked_all_strict_forces_pm_internals",
@@ -1812,6 +2416,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1812
2416
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1813
2417
  sources: ["core/diagnostics/remediation.ts"],
1814
2418
  emitting_commands: ["*"],
2419
+ canonical_code: "validate_files_tracked_all_strict_forces_pm_internals",
2420
+ aliases: [],
1815
2421
  },
1816
2422
  {
1817
2423
  code: "validate_format_version_ahead_items",
@@ -1822,6 +2428,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1822
2428
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1823
2429
  sources: ["core/diagnostics/remediation.ts"],
1824
2430
  emitting_commands: ["*"],
2431
+ canonical_code: "integrity_item_ahead_format_version",
2432
+ aliases: [],
1825
2433
  },
1826
2434
  {
1827
2435
  code: "validate_format_version_outdated_items",
@@ -1832,6 +2440,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1832
2440
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1833
2441
  sources: ["core/diagnostics/remediation.ts"],
1834
2442
  emitting_commands: ["*"],
2443
+ canonical_code: "integrity_item_outdated_format_version",
2444
+ aliases: [],
1835
2445
  },
1836
2446
  {
1837
2447
  code: "validate_hierarchy_parent_cycle",
@@ -1842,6 +2452,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1842
2452
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1843
2453
  sources: ["core/diagnostics/remediation.ts"],
1844
2454
  emitting_commands: ["*"],
2455
+ canonical_code: "validate_hierarchy_parent_cycle",
2456
+ aliases: [],
1845
2457
  },
1846
2458
  {
1847
2459
  code: "validate_hierarchy_parent_cycle_error",
@@ -1852,6 +2464,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1852
2464
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1853
2465
  sources: ["core/diagnostics/remediation.ts"],
1854
2466
  emitting_commands: ["*"],
2467
+ canonical_code: "validate_hierarchy_parent_cycle_error",
2468
+ aliases: [],
1855
2469
  },
1856
2470
  {
1857
2471
  code: "validate_history_drift_chain_mismatches",
@@ -1862,6 +2476,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1862
2476
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1863
2477
  sources: ["core/diagnostics/remediation.ts"],
1864
2478
  emitting_commands: ["*"],
2479
+ canonical_code: "history_drift_chain_mismatch",
2480
+ aliases: [],
1865
2481
  },
1866
2482
  {
1867
2483
  code: "validate_history_drift_hash_mismatches",
@@ -1872,6 +2488,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1872
2488
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1873
2489
  sources: ["core/diagnostics/remediation.ts"],
1874
2490
  emitting_commands: ["*"],
2491
+ canonical_code: "history_drift_hash_mismatch",
2492
+ aliases: [],
1875
2493
  },
1876
2494
  {
1877
2495
  code: "validate_history_drift_missing_streams",
@@ -1882,6 +2500,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1882
2500
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1883
2501
  sources: ["core/diagnostics/remediation.ts"],
1884
2502
  emitting_commands: ["*"],
2503
+ canonical_code: "history_drift_missing_stream",
2504
+ aliases: [],
1885
2505
  },
1886
2506
  {
1887
2507
  code: "validate_history_drift_unreadable_streams",
@@ -1892,6 +2512,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1892
2512
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1893
2513
  sources: ["core/diagnostics/remediation.ts"],
1894
2514
  emitting_commands: ["*"],
2515
+ canonical_code: "history_drift_unreadable_stream",
2516
+ aliases: [],
1895
2517
  },
1896
2518
  {
1897
2519
  code: "validate_history_unknown_author_events",
@@ -1902,6 +2524,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1902
2524
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1903
2525
  sources: ["core/diagnostics/remediation.ts"],
1904
2526
  emitting_commands: ["*"],
2527
+ canonical_code: "history_unknown_author_events",
2528
+ aliases: [],
1905
2529
  },
1906
2530
  {
1907
2531
  code: "validate_lifecycle_active_closure_like_metadata",
@@ -1912,6 +2536,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1912
2536
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1913
2537
  sources: ["core/diagnostics/remediation.ts"],
1914
2538
  emitting_commands: ["*"],
2539
+ canonical_code: "validate_lifecycle_active_closure_like_metadata",
2540
+ aliases: [],
1915
2541
  },
1916
2542
  {
1917
2543
  code: "validate_lifecycle_active_terminal_parent",
@@ -1922,6 +2548,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1922
2548
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1923
2549
  sources: ["core/diagnostics/remediation.ts"],
1924
2550
  emitting_commands: ["*"],
2551
+ canonical_code: "validate_lifecycle_active_terminal_parent",
2552
+ aliases: [],
1925
2553
  },
1926
2554
  {
1927
2555
  code: "validate_lifecycle_dependency_cycles",
@@ -1932,6 +2560,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1932
2560
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1933
2561
  sources: ["core/diagnostics/remediation.ts"],
1934
2562
  emitting_commands: ["*"],
2563
+ canonical_code: "validate_lifecycle_dependency_cycles",
2564
+ aliases: [],
1935
2565
  },
1936
2566
  {
1937
2567
  code: "validate_lifecycle_dependency_cycles_error",
@@ -1942,6 +2572,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1942
2572
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1943
2573
  sources: ["core/diagnostics/remediation.ts"],
1944
2574
  emitting_commands: ["*"],
2575
+ canonical_code: "validate_lifecycle_dependency_cycles_error",
2576
+ aliases: [],
1945
2577
  },
1946
2578
  {
1947
2579
  code: "validate_lifecycle_stale_blockers",
@@ -1952,6 +2584,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1952
2584
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1953
2585
  sources: ["core/diagnostics/remediation.ts"],
1954
2586
  emitting_commands: ["*"],
2587
+ canonical_code: "validate_lifecycle_stale_blockers",
2588
+ aliases: [],
1955
2589
  },
1956
2590
  {
1957
2591
  code: "validate_merge_fence_drift",
@@ -1962,6 +2596,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1962
2596
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1963
2597
  sources: ["core/diagnostics/remediation.ts"],
1964
2598
  emitting_commands: ["*"],
2599
+ canonical_code: "validate_merge_fence_drift",
2600
+ aliases: [],
1965
2601
  },
1966
2602
  {
1967
2603
  code: "validate_metadata_custom_profile_missing_required_fields",
@@ -1972,6 +2608,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1972
2608
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1973
2609
  sources: ["core/diagnostics/remediation.ts"],
1974
2610
  emitting_commands: ["*"],
2611
+ canonical_code: "validate_metadata_custom_profile_missing_required_fields",
2612
+ aliases: [],
1975
2613
  },
1976
2614
  {
1977
2615
  code: "validate_metadata_duplicate_issue_codes",
@@ -1982,6 +2620,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1982
2620
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1983
2621
  sources: ["core/diagnostics/remediation.ts"],
1984
2622
  emitting_commands: ["*"],
2623
+ canonical_code: "validate_metadata_duplicate_issue_codes",
2624
+ aliases: [],
1985
2625
  },
1986
2626
  {
1987
2627
  code: "validate_metadata_missing_acceptance_criteria",
@@ -1992,6 +2632,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1992
2632
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1993
2633
  sources: ["core/diagnostics/remediation.ts"],
1994
2634
  emitting_commands: ["*"],
2635
+ canonical_code: "validate_metadata_missing_acceptance_criteria",
2636
+ aliases: [],
1995
2637
  },
1996
2638
  {
1997
2639
  code: "validate_metadata_missing_close_reason",
@@ -2002,6 +2644,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2002
2644
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2003
2645
  sources: ["core/diagnostics/remediation.ts"],
2004
2646
  emitting_commands: ["*"],
2647
+ canonical_code: "validate_metadata_missing_close_reason",
2648
+ aliases: [],
2005
2649
  },
2006
2650
  {
2007
2651
  code: "validate_metadata_missing_confidence",
@@ -2012,6 +2656,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2012
2656
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2013
2657
  sources: ["core/diagnostics/remediation.ts"],
2014
2658
  emitting_commands: ["*"],
2659
+ canonical_code: "validate_metadata_missing_confidence",
2660
+ aliases: [],
2015
2661
  },
2016
2662
  {
2017
2663
  code: "validate_metadata_missing_estimate",
@@ -2022,6 +2668,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2022
2668
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2023
2669
  sources: ["core/diagnostics/remediation.ts"],
2024
2670
  emitting_commands: ["*"],
2671
+ canonical_code: "validate_metadata_missing_estimate",
2672
+ aliases: [],
2025
2673
  },
2026
2674
  {
2027
2675
  code: "validate_metadata_missing_release",
@@ -2032,6 +2680,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2032
2680
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2033
2681
  sources: ["core/diagnostics/remediation.ts"],
2034
2682
  emitting_commands: ["*"],
2683
+ canonical_code: "validate_metadata_missing_release",
2684
+ aliases: [],
2035
2685
  },
2036
2686
  {
2037
2687
  code: "validate_metadata_missing_reviewer",
@@ -2042,6 +2692,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2042
2692
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2043
2693
  sources: ["core/diagnostics/remediation.ts"],
2044
2694
  emitting_commands: ["*"],
2695
+ canonical_code: "validate_metadata_missing_reviewer",
2696
+ aliases: [],
2045
2697
  },
2046
2698
  {
2047
2699
  code: "validate_metadata_missing_risk",
@@ -2052,6 +2704,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2052
2704
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2053
2705
  sources: ["core/diagnostics/remediation.ts"],
2054
2706
  emitting_commands: ["*"],
2707
+ canonical_code: "validate_metadata_missing_risk",
2708
+ aliases: [],
2055
2709
  },
2056
2710
  {
2057
2711
  code: "validate_metadata_missing_sprint",
@@ -2062,6 +2716,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2062
2716
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2063
2717
  sources: ["core/diagnostics/remediation.ts"],
2064
2718
  emitting_commands: ["*"],
2719
+ canonical_code: "validate_metadata_missing_sprint",
2720
+ aliases: [],
2065
2721
  },
2066
2722
  {
2067
2723
  code: "validate_resolution_missing_fields",
@@ -2072,6 +2728,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2072
2728
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2073
2729
  sources: ["core/diagnostics/remediation.ts"],
2074
2730
  emitting_commands: ["*"],
2731
+ canonical_code: "validate_resolution_missing_fields",
2732
+ aliases: [],
2075
2733
  },
2076
2734
  {
2077
2735
  code: "validate_storage_duplicate_item_ids",
@@ -2082,6 +2740,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2082
2740
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2083
2741
  sources: ["core/diagnostics/remediation.ts"],
2084
2742
  emitting_commands: ["*"],
2743
+ canonical_code: "validate_storage_duplicate_item_ids",
2744
+ aliases: [],
2085
2745
  },
2086
2746
  {
2087
2747
  code: "validate_storage_history_conflict_markers",
@@ -2092,6 +2752,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2092
2752
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2093
2753
  sources: ["core/diagnostics/remediation.ts"],
2094
2754
  emitting_commands: ["*"],
2755
+ canonical_code: "integrity_history_conflict_marker",
2756
+ aliases: [],
2095
2757
  },
2096
2758
  {
2097
2759
  code: "validate_storage_resurrected_items",
@@ -2102,6 +2764,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2102
2764
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2103
2765
  sources: ["core/diagnostics/remediation.ts"],
2104
2766
  emitting_commands: ["*"],
2767
+ canonical_code: "validate_storage_resurrected_items",
2768
+ aliases: [],
2105
2769
  },
2106
2770
  {
2107
2771
  code: "validate_storage_tracked_runtime_cache_files",
@@ -2112,6 +2776,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2112
2776
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2113
2777
  sources: ["core/diagnostics/remediation.ts"],
2114
2778
  emitting_commands: ["*"],
2779
+ canonical_code: "tracked_runtime_cache_files",
2780
+ aliases: [],
2115
2781
  },
2116
2782
  {
2117
2783
  code: "validate_storage_unparseable_config",
@@ -2122,6 +2788,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2122
2788
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2123
2789
  sources: ["core/diagnostics/remediation.ts"],
2124
2790
  emitting_commands: ["*"],
2791
+ canonical_code: "validate_storage_unparseable_config",
2792
+ aliases: [],
2125
2793
  },
2126
2794
  {
2127
2795
  code: "validate_storage_unparseable_history",
@@ -2132,6 +2800,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2132
2800
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2133
2801
  sources: ["core/diagnostics/remediation.ts"],
2134
2802
  emitting_commands: ["*"],
2803
+ canonical_code: "validate_storage_unparseable_history",
2804
+ aliases: [],
2135
2805
  },
2136
2806
  {
2137
2807
  code: "validate_storage_unreadable_items",
@@ -2142,6 +2812,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2142
2812
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2143
2813
  sources: ["core/diagnostics/remediation.ts"],
2144
2814
  emitting_commands: ["*"],
2815
+ canonical_code: "validate_storage_unreadable_items",
2816
+ aliases: [],
2145
2817
  },
2146
2818
  {
2147
2819
  code: "vectorization_embedding_identity_changed",
@@ -2152,6 +2824,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2152
2824
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2153
2825
  sources: ["core/diagnostics/remediation.ts"],
2154
2826
  emitting_commands: ["*"],
2827
+ canonical_code: "vectorization_embedding_identity_changed",
2828
+ aliases: [],
2155
2829
  },
2156
2830
  {
2157
2831
  code: "vectorization_stale_items_remaining",
@@ -2162,6 +2836,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2162
2836
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2163
2837
  sources: ["core/diagnostics/remediation.ts"],
2164
2838
  emitting_commands: ["*"],
2839
+ canonical_code: "vectorization_stale_items_remaining",
2840
+ aliases: [],
2165
2841
  },
2166
2842
  {
2167
2843
  code: "workflow_duplicate_type",
@@ -2172,6 +2848,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2172
2848
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2173
2849
  sources: ["core/profile/profile-lint.ts"],
2174
2850
  emitting_commands: ["*"],
2851
+ canonical_code: "workflow_duplicate_type",
2852
+ aliases: [],
2175
2853
  },
2176
2854
  {
2177
2855
  code: "workflow_status_unknown",
@@ -2182,6 +2860,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2182
2860
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2183
2861
  sources: ["core/profile/profile-lint.ts"],
2184
2862
  emitting_commands: ["*"],
2863
+ canonical_code: "workflow_status_unknown",
2864
+ aliases: [],
2185
2865
  },
2186
2866
  {
2187
2867
  code: "workflow_transition_malformed",
@@ -2192,6 +2872,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2192
2872
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2193
2873
  sources: ["core/profile/profile-lint.ts"],
2194
2874
  emitting_commands: ["*"],
2875
+ canonical_code: "workflow_transition_malformed",
2876
+ aliases: [],
2195
2877
  },
2196
2878
  {
2197
2879
  code: "workflow_type_empty",
@@ -2202,6 +2884,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2202
2884
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2203
2885
  sources: ["core/profile/profile-lint.ts"],
2204
2886
  emitting_commands: ["*"],
2887
+ canonical_code: "workflow_type_empty",
2888
+ aliases: [],
2205
2889
  },
2206
2890
  {
2207
2891
  code: "workflow_type_unknown",
@@ -2212,6 +2896,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2212
2896
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2213
2897
  sources: ["core/profile/profile-lint.ts"],
2214
2898
  emitting_commands: ["*"],
2899
+ canonical_code: "workflow_type_unknown",
2900
+ aliases: [],
2215
2901
  },
2216
2902
  {
2217
2903
  code: "workspace_history_state_conflict",
@@ -2222,6 +2908,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2222
2908
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2223
2909
  sources: ["core/history/workspace-history.ts"],
2224
2910
  emitting_commands: ["*"],
2911
+ canonical_code: "workspace_history_state_conflict",
2912
+ aliases: [],
2225
2913
  },
2226
2914
  {
2227
2915
  code: "workspace_root_pm_path",
@@ -2232,6 +2920,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2232
2920
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2233
2921
  sources: ["sdk/init.ts"],
2234
2922
  emitting_commands: ["*"],
2923
+ canonical_code: "workspace_root_pm_path",
2924
+ aliases: [],
2235
2925
  },
2236
2926
  {
2237
2927
  code: "workspace_snapshot_force_required",
@@ -2242,6 +2932,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2242
2932
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2243
2933
  sources: ["sdk/workspace-snapshot.ts"],
2244
2934
  emitting_commands: ["*"],
2935
+ canonical_code: "workspace_snapshot_force_required",
2936
+ aliases: [],
2245
2937
  },
2246
2938
  {
2247
2939
  code: "workspace_snapshot_manifest_mismatch",
@@ -2252,6 +2944,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2252
2944
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2253
2945
  sources: ["sdk/workspace-snapshot.ts"],
2254
2946
  emitting_commands: ["*"],
2947
+ canonical_code: "workspace_snapshot_manifest_mismatch",
2948
+ aliases: [],
2255
2949
  },
2256
2950
  {
2257
2951
  code: "workspace_snapshot_name_reserved_fingerprint",
@@ -2262,6 +2956,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2262
2956
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2263
2957
  sources: ["sdk/workspace-snapshot.ts"],
2264
2958
  emitting_commands: ["*"],
2959
+ canonical_code: "workspace_snapshot_name_reserved_fingerprint",
2960
+ aliases: [],
2265
2961
  },
2266
2962
  {
2267
2963
  code: "workspace_snapshot_not_found",
@@ -2272,6 +2968,44 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2272
2968
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2273
2969
  sources: ["sdk/workspace-snapshot.ts"],
2274
2970
  emitting_commands: ["*"],
2971
+ canonical_code: "workspace_snapshot_not_found",
2972
+ aliases: [],
2973
+ },
2974
+ {
2975
+ code: "workspace_snapshot_permission_denied",
2976
+ meaning: "Workspace snapshot permission denied condition.",
2977
+ stability: "provisional",
2978
+ exit_code: 1,
2979
+ class: "generic_failure",
2980
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
2981
+ sources: ["sdk/workspace-snapshot.ts"],
2982
+ emitting_commands: ["*"],
2983
+ canonical_code: "workspace_snapshot_permission_denied",
2984
+ aliases: [],
2985
+ },
2986
+ {
2987
+ code: "workspace_snapshot_resource_exhausted",
2988
+ meaning: "Workspace snapshot resource exhausted condition.",
2989
+ stability: "provisional",
2990
+ exit_code: 1,
2991
+ class: "generic_failure",
2992
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
2993
+ sources: ["sdk/workspace-snapshot.ts"],
2994
+ emitting_commands: ["*"],
2995
+ canonical_code: "workspace_snapshot_resource_exhausted",
2996
+ aliases: [],
2997
+ },
2998
+ {
2999
+ code: "workspace_snapshot_storage_exhausted",
3000
+ meaning: "Workspace snapshot storage exhausted condition.",
3001
+ stability: "provisional",
3002
+ exit_code: 1,
3003
+ class: "generic_failure",
3004
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
3005
+ sources: ["sdk/workspace-snapshot.ts"],
3006
+ emitting_commands: ["*"],
3007
+ canonical_code: "workspace_snapshot_storage_exhausted",
3008
+ aliases: [],
2275
3009
  },
2276
3010
  {
2277
3011
  code: "wrong_item_type",
@@ -2282,7 +3016,9 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2282
3016
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2283
3017
  sources: ["sdk/lifecycle/plan.ts"],
2284
3018
  emitting_commands: ["plan"],
3019
+ canonical_code: "wrong_item_type",
3020
+ aliases: [],
2285
3021
  },
2286
3022
  ]);
2287
3023
  //# sourceMappingURL=generated-error-code-catalog.js.map
2288
- //# debugId=7a568064-a103-5b19-969d-6e58fc0cc5b7
3024
+ //# debugId=8a086b83-e46b-5694-be66-9114b0d87e12