@unbrained/pm-cli 2026.8.7 → 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 (226) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +35 -0
  3. package/dist/cli/main.js +4 -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/runtime-compatibility-boundary.d.ts +17 -0
  9. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  10. package/dist/cli-bundle/bundle-manifest.json +155 -691
  11. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  12. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  13. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  14. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  15. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  16. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  17. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  18. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  19. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  20. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  21. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  22. package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-WFZAMJHZ.js} +8 -8
  23. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  25. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-VZFU2R4M.js → chunk-5FLBTZJQ.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-ANTMGYLI.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-DMKOMTTY.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-CIXVQPB7.js → chunk-F5B3HBEZ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-FI6DWU2M.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-3K4XV2BF.js → chunk-FNOKJG6N.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-RW5IYD4J.js → chunk-FPDYXZBK.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-GWI6YIKJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-MHMTKV5V.js → chunk-HCUC62AB.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-MOTJFQ3F.js → chunk-HGNKPSCB.js} +12 -12
  39. package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-IAS7PMLG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-PL2EYDJK.js} +27 -27
  41. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-TCSAPH33.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-YSAHYUXX.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-ZOLDTUU7.js} +2 -2
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +38 -38
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -1
  58. package/dist/cli.js +14 -4
  59. package/dist/core/output/output.js +9 -2
  60. package/dist/core/sentry/helpers.d.ts +10 -0
  61. package/dist/core/sentry/helpers.js +59 -4
  62. package/dist/core/shared/constants.d.ts +2 -0
  63. package/dist/core/shared/constants.js +4 -2
  64. package/dist/sdk/annotations.d.ts +40 -0
  65. package/dist/sdk/annotations.js +61 -9
  66. package/dist/sdk/author-attribution.d.ts +12 -0
  67. package/dist/sdk/author-attribution.js +73 -11
  68. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  69. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  70. package/dist/sdk/cli-contracts/completeness.js +5 -3
  71. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  72. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  73. package/dist/sdk/cli-contracts/runtime-contracts.js +29 -2
  74. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
  75. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  76. package/dist/sdk/cli-contracts/tool-schema.js +6 -3
  77. package/dist/sdk/comments.d.ts +7 -0
  78. package/dist/sdk/comments.js +2 -2
  79. package/dist/sdk/completion.js +9 -5
  80. package/dist/sdk/contracts.d.ts +1 -0
  81. package/dist/sdk/contracts.js +3 -2
  82. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  83. package/dist/sdk/environment/host-environment-errors.js +124 -0
  84. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  85. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  86. package/dist/sdk/environment/source-context.d.ts +23 -0
  87. package/dist/sdk/environment/source-context.js +29 -0
  88. package/dist/sdk/error-code-catalog.d.ts +6 -0
  89. package/dist/sdk/error-code-catalog.js +62 -8
  90. package/dist/sdk/generated-error-code-catalog.js +629 -3
  91. package/dist/sdk/governance/health.d.ts +11 -3
  92. package/dist/sdk/governance/health.js +5 -5
  93. package/dist/sdk/index.d.ts +7 -3
  94. package/dist/sdk/index.js +9 -5
  95. package/dist/sdk/learnings.d.ts +15 -0
  96. package/dist/sdk/learnings.js +2 -2
  97. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  98. package/dist/sdk/lifecycle/close-many.js +43 -5
  99. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  100. package/dist/sdk/lifecycle/update-many.js +29 -5
  101. package/dist/sdk/merge/index.d.ts +1 -1
  102. package/dist/sdk/merge/index.js +3 -3
  103. package/dist/sdk/merge/install.d.ts +21 -0
  104. package/dist/sdk/merge/install.js +50 -20
  105. package/dist/sdk/notes.d.ts +7 -0
  106. package/dist/sdk/notes.js +2 -2
  107. package/dist/sdk/read-output-contracts.js +83 -4
  108. package/dist/sdk/runtime.d.ts +1 -1
  109. package/dist/sdk/runtime.js +9 -25
  110. package/dist/sdk/test/execution.js +4 -2
  111. package/dist/sdk/test/parsers.js +5 -2
  112. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  113. package/dist/sdk/workspace-snapshot.js +48 -16
  114. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  115. package/docs/README.md +1 -0
  116. package/docs/RELEASING.md +27 -2
  117. package/docs/SCRIPTING.md +27 -1
  118. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  119. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  120. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  121. package/docs/TESTING.md +17 -0
  122. package/marketplace.json +2 -2
  123. package/package.json +5 -3
  124. package/packages/pm-beads/package.json +1 -1
  125. package/packages/pm-calendar/package.json +1 -1
  126. package/packages/pm-command-kit/package.json +1 -1
  127. package/packages/pm-digital-twin/package.json +1 -1
  128. package/packages/pm-governance-audit/package.json +1 -1
  129. package/packages/pm-guide-shell/package.json +1 -1
  130. package/packages/pm-kanban/package.json +1 -1
  131. package/packages/pm-lifecycle-hooks/package.json +1 -1
  132. package/packages/pm-linked-test-adapters/package.json +1 -1
  133. package/packages/pm-search-advanced/package.json +1 -1
  134. package/packages/pm-templates/package.json +1 -1
  135. package/packages/pm-todos/package.json +1 -1
  136. package/packages/pm-vcs/package.json +1 -1
  137. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  138. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  139. package/sdk/public-surface.json +529 -34
  140. package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
  141. package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
  143. package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
  144. package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
  145. package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
  146. package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
  147. package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
  148. package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
  149. package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
  150. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  151. package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
  152. package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
  153. package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
  154. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  155. package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
  156. package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  158. package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
  159. package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
  160. package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
  161. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  163. package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
  164. package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
  166. package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
  167. package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
  168. package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
  169. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  170. package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
  172. package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
  173. package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
  174. package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
  175. package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
  176. package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
  177. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  178. package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
  179. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  180. package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
  181. package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
  182. package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
  183. package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
  185. package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
  189. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
  192. package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
  194. package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
  197. package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
  198. package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
  199. package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
  200. package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
  201. package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
  202. package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
  203. package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
  204. package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
  205. package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
  206. package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
  207. package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
  208. package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
  209. package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
  210. package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
  211. package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
  212. package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
  213. package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
  214. package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
  215. package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
  216. package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
  217. package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
  218. package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
  219. package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
  220. package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
  222. package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
  223. package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
  224. package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
  225. package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
  226. package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
@@ -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]="93c784d2-8f0f-5bf4-875e-3d83a675c9eb")}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"],
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"],
589
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,56 @@ 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: [],
670
898
  },
671
899
  {
672
900
  code: "improvement_metric_contract_conflict",
@@ -677,6 +905,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
677
905
  recovery: "Inspect the structured error guidance and retry the suggested command.",
678
906
  sources: ["sdk/improvement-ledger.ts"],
679
907
  emitting_commands: ["*"],
908
+ canonical_code: "improvement_metric_contract_conflict",
909
+ aliases: [],
680
910
  },
681
911
  {
682
912
  code: "improvement_observation_conflict",
@@ -687,6 +917,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
687
917
  recovery: "Inspect the structured error guidance and retry the suggested command.",
688
918
  sources: ["sdk/improvement-ledger.ts"],
689
919
  emitting_commands: ["*"],
920
+ canonical_code: "improvement_observation_conflict",
921
+ aliases: [],
690
922
  },
691
923
  {
692
924
  code: "init_existing_settings_requires_force",
@@ -697,6 +929,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
697
929
  recovery: "Inspect the structured error guidance and retry the suggested command.",
698
930
  sources: ["sdk/init.ts"],
699
931
  emitting_commands: ["*"],
932
+ canonical_code: "init_existing_settings_requires_force",
933
+ aliases: [],
700
934
  },
701
935
  {
702
936
  code: "init_gitignore_unwritable",
@@ -707,6 +941,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
707
941
  recovery: "Inspect the structured error guidance and retry the suggested command.",
708
942
  sources: ["sdk/workspace.ts"],
709
943
  emitting_commands: ["*"],
944
+ canonical_code: "init_gitignore_unwritable",
945
+ aliases: [],
710
946
  },
711
947
  {
712
948
  code: "init_id_prefix_conflict",
@@ -717,6 +953,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
717
953
  recovery: "Inspect the structured error guidance and retry the suggested command.",
718
954
  sources: ["sdk/init.ts"],
719
955
  emitting_commands: ["*"],
956
+ canonical_code: "init_id_prefix_conflict",
957
+ aliases: [],
720
958
  },
721
959
  {
722
960
  code: "init_id_prefix_path_like",
@@ -727,6 +965,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
727
965
  recovery: "Inspect the structured error guidance and retry the suggested command.",
728
966
  sources: ["sdk/init.ts"],
729
967
  emitting_commands: ["*"],
968
+ canonical_code: "init_id_prefix_path_like",
969
+ aliases: [],
730
970
  },
731
971
  {
732
972
  code: "integrity_history_conflict_marker",
@@ -737,6 +977,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
737
977
  recovery: "Inspect the structured error guidance and retry the suggested command.",
738
978
  sources: ["core/diagnostics/remediation.ts"],
739
979
  emitting_commands: ["*"],
980
+ canonical_code: "integrity_history_conflict_marker",
981
+ aliases: ["validate_storage_history_conflict_markers"],
740
982
  },
741
983
  {
742
984
  code: "integrity_history_invalid_json",
@@ -747,6 +989,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
747
989
  recovery: "Inspect the structured error guidance and retry the suggested command.",
748
990
  sources: ["core/diagnostics/remediation.ts"],
749
991
  emitting_commands: ["*"],
992
+ canonical_code: "integrity_history_invalid_json",
993
+ aliases: [],
750
994
  },
751
995
  {
752
996
  code: "integrity_history_unreadable",
@@ -757,6 +1001,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
757
1001
  recovery: "Inspect the structured error guidance and retry the suggested command.",
758
1002
  sources: ["core/diagnostics/remediation.ts"],
759
1003
  emitting_commands: ["*"],
1004
+ canonical_code: "integrity_history_unreadable",
1005
+ aliases: [],
760
1006
  },
761
1007
  {
762
1008
  code: "integrity_item_ahead_format_version",
@@ -767,6 +1013,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
767
1013
  recovery: "Inspect the structured error guidance and retry the suggested command.",
768
1014
  sources: ["core/diagnostics/remediation.ts"],
769
1015
  emitting_commands: ["*"],
1016
+ canonical_code: "integrity_item_ahead_format_version",
1017
+ aliases: ["validate_format_version_ahead_items"],
770
1018
  },
771
1019
  {
772
1020
  code: "integrity_item_conflict_marker",
@@ -777,6 +1025,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
777
1025
  recovery: "Inspect the structured error guidance and retry the suggested command.",
778
1026
  sources: ["core/diagnostics/remediation.ts"],
779
1027
  emitting_commands: ["*"],
1028
+ canonical_code: "integrity_item_conflict_marker",
1029
+ aliases: [],
780
1030
  },
781
1031
  {
782
1032
  code: "integrity_item_outdated_format_version",
@@ -787,6 +1037,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
787
1037
  recovery: "Inspect the structured error guidance and retry the suggested command.",
788
1038
  sources: ["core/diagnostics/remediation.ts"],
789
1039
  emitting_commands: ["*"],
1040
+ canonical_code: "integrity_item_outdated_format_version",
1041
+ aliases: ["validate_format_version_outdated_items"],
790
1042
  },
791
1043
  {
792
1044
  code: "integrity_item_parse_failed",
@@ -797,6 +1049,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
797
1049
  recovery: "Inspect the structured error guidance and retry the suggested command.",
798
1050
  sources: ["core/diagnostics/remediation.ts"],
799
1051
  emitting_commands: ["*"],
1052
+ canonical_code: "integrity_item_parse_failed",
1053
+ aliases: [],
800
1054
  },
801
1055
  {
802
1056
  code: "integrity_item_unreadable",
@@ -807,6 +1061,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
807
1061
  recovery: "Inspect the structured error guidance and retry the suggested command.",
808
1062
  sources: ["core/diagnostics/remediation.ts"],
809
1063
  emitting_commands: ["*"],
1064
+ canonical_code: "integrity_item_unreadable",
1065
+ aliases: [],
810
1066
  },
811
1067
  {
812
1068
  code: "invalid_argument_value",
@@ -822,6 +1078,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
822
1078
  "sdk/lifecycle/create.ts",
823
1079
  ],
824
1080
  emitting_commands: ["*", "create"],
1081
+ canonical_code: "invalid_argument_value",
1082
+ aliases: [],
825
1083
  },
826
1084
  {
827
1085
  code: "invalid_command_usage",
@@ -832,6 +1090,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
832
1090
  recovery: "Inspect the structured error guidance and retry the suggested command.",
833
1091
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
834
1092
  emitting_commands: ["*"],
1093
+ canonical_code: "invalid_command_usage",
1094
+ aliases: [],
835
1095
  },
836
1096
  {
837
1097
  code: "invalid_event_cursor",
@@ -842,6 +1102,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
842
1102
  recovery: "Inspect the structured error guidance and retry the suggested command.",
843
1103
  sources: ["sdk/mutation-events.ts"],
844
1104
  emitting_commands: ["*"],
1105
+ canonical_code: "invalid_event_cursor",
1106
+ aliases: [],
845
1107
  },
846
1108
  {
847
1109
  code: "invalid_event_follow_interval",
@@ -852,6 +1114,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
852
1114
  recovery: "Inspect the structured error guidance and retry the suggested command.",
853
1115
  sources: ["sdk/mutation-events.ts"],
854
1116
  emitting_commands: ["*"],
1117
+ canonical_code: "invalid_event_follow_interval",
1118
+ aliases: [],
855
1119
  },
856
1120
  {
857
1121
  code: "invalid_event_limit",
@@ -862,6 +1126,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
862
1126
  recovery: "Inspect the structured error guidance and retry the suggested command.",
863
1127
  sources: ["sdk/mutation-events.ts"],
864
1128
  emitting_commands: ["*"],
1129
+ canonical_code: "invalid_event_limit",
1130
+ aliases: [],
865
1131
  },
866
1132
  {
867
1133
  code: "invalid_event_since",
@@ -872,6 +1138,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
872
1138
  recovery: "Inspect the structured error guidance and retry the suggested command.",
873
1139
  sources: ["sdk/mutation-events.ts"],
874
1140
  emitting_commands: ["*"],
1141
+ canonical_code: "invalid_event_since",
1142
+ aliases: [],
875
1143
  },
876
1144
  {
877
1145
  code: "invalid_history_analytics_limit",
@@ -882,6 +1150,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
882
1150
  recovery: "Inspect the structured error guidance and retry the suggested command.",
883
1151
  sources: ["sdk/history-analytics.ts"],
884
1152
  emitting_commands: ["*"],
1153
+ canonical_code: "invalid_history_analytics_limit",
1154
+ aliases: [],
885
1155
  },
886
1156
  {
887
1157
  code: "invalid_history_analytics_minimum_sample",
@@ -892,6 +1162,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
892
1162
  recovery: "Inspect the structured error guidance and retry the suggested command.",
893
1163
  sources: ["sdk/history-analytics.ts"],
894
1164
  emitting_commands: ["*"],
1165
+ canonical_code: "invalid_history_analytics_minimum_sample",
1166
+ aliases: [],
895
1167
  },
896
1168
  {
897
1169
  code: "invalid_history_analytics_since",
@@ -902,6 +1174,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
902
1174
  recovery: "Inspect the structured error guidance and retry the suggested command.",
903
1175
  sources: ["sdk/history-analytics.ts"],
904
1176
  emitting_commands: ["*"],
1177
+ canonical_code: "invalid_history_analytics_since",
1178
+ aliases: [],
905
1179
  },
906
1180
  {
907
1181
  code: "invalid_improvement_ledger",
@@ -912,6 +1186,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
912
1186
  recovery: "Inspect the structured error guidance and retry the suggested command.",
913
1187
  sources: ["sdk/improvement-ledger-validation.ts"],
914
1188
  emitting_commands: ["*"],
1189
+ canonical_code: "invalid_improvement_ledger",
1190
+ aliases: [],
915
1191
  },
916
1192
  {
917
1193
  code: "invalid_improvement_metric",
@@ -922,6 +1198,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
922
1198
  recovery: "Inspect the structured error guidance and retry the suggested command.",
923
1199
  sources: ["sdk/improvement-ledger.ts"],
924
1200
  emitting_commands: ["*"],
1201
+ canonical_code: "invalid_improvement_metric",
1202
+ aliases: [],
925
1203
  },
926
1204
  {
927
1205
  code: "invalid_improvement_observation",
@@ -932,6 +1210,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
932
1210
  recovery: "Inspect the structured error guidance and retry the suggested command.",
933
1211
  sources: ["sdk/improvement-ledger.ts"],
934
1212
  emitting_commands: ["*"],
1213
+ canonical_code: "invalid_improvement_observation",
1214
+ aliases: [],
935
1215
  },
936
1216
  {
937
1217
  code: "invalid_improvement_observation_limit",
@@ -942,6 +1222,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
942
1222
  recovery: "Inspect the structured error guidance and retry the suggested command.",
943
1223
  sources: ["sdk/improvement-ledger.ts"],
944
1224
  emitting_commands: ["*"],
1225
+ canonical_code: "invalid_improvement_observation_limit",
1226
+ aliases: [],
945
1227
  },
946
1228
  {
947
1229
  code: "invalid_improvement_observation_timestamp",
@@ -952,6 +1234,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
952
1234
  recovery: "Inspect the structured error guidance and retry the suggested command.",
953
1235
  sources: ["sdk/improvement-ledger.ts"],
954
1236
  emitting_commands: ["*"],
1237
+ canonical_code: "invalid_improvement_observation_timestamp",
1238
+ aliases: [],
955
1239
  },
956
1240
  {
957
1241
  code: "invalid_provenance_predicate",
@@ -962,6 +1246,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
962
1246
  recovery: "Inspect the structured error guidance and retry the suggested command.",
963
1247
  sources: ["sdk/history-provenance.ts"],
964
1248
  emitting_commands: ["*"],
1249
+ canonical_code: "invalid_provenance_predicate",
1250
+ aliases: [],
965
1251
  },
966
1252
  {
967
1253
  code: "invalid_query_cursor",
@@ -972,6 +1258,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
972
1258
  recovery: "Inspect the structured error guidance and retry the suggested command.",
973
1259
  sources: ["sdk/pagination.ts"],
974
1260
  emitting_commands: ["*"],
1261
+ canonical_code: "invalid_query_cursor",
1262
+ aliases: [],
975
1263
  },
976
1264
  {
977
1265
  code: "invalid_read_output_session",
@@ -982,6 +1270,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
982
1270
  recovery: "Inspect the structured error guidance and retry the suggested command.",
983
1271
  sources: ["sdk/read-output-session.ts"],
984
1272
  emitting_commands: ["*"],
1273
+ canonical_code: "invalid_read_output_session",
1274
+ aliases: [],
985
1275
  },
986
1276
  {
987
1277
  code: "invalid_workspace_snapshot_target",
@@ -992,6 +1282,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
992
1282
  recovery: "Inspect the structured error guidance and retry the suggested command.",
993
1283
  sources: ["sdk/workspace-snapshot.ts"],
994
1284
  emitting_commands: ["*"],
1285
+ canonical_code: "invalid_workspace_snapshot_target",
1286
+ aliases: [],
995
1287
  },
996
1288
  {
997
1289
  code: "item_document_invalid",
@@ -1002,6 +1294,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1002
1294
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1003
1295
  sources: ["core/item/item-format.ts"],
1004
1296
  emitting_commands: ["*"],
1297
+ canonical_code: "item_document_invalid",
1298
+ aliases: [],
1005
1299
  },
1006
1300
  {
1007
1301
  code: "item_document_roundtrip_failed",
@@ -1012,6 +1306,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1012
1306
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1013
1307
  sources: ["core/item/item-format.ts"],
1014
1308
  emitting_commands: ["*"],
1309
+ canonical_code: "item_document_roundtrip_failed",
1310
+ aliases: [],
1015
1311
  },
1016
1312
  {
1017
1313
  code: "item_id_collision",
@@ -1022,6 +1318,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1022
1318
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1023
1319
  sources: ["sdk/lifecycle/copy.ts"],
1024
1320
  emitting_commands: ["copy"],
1321
+ canonical_code: "item_id_collision",
1322
+ aliases: [],
1025
1323
  },
1026
1324
  {
1027
1325
  code: "item_not_found",
@@ -1032,6 +1330,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1032
1330
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1033
1331
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1034
1332
  emitting_commands: ["*"],
1333
+ canonical_code: "item_not_found",
1334
+ aliases: [],
1035
1335
  },
1036
1336
  {
1037
1337
  code: "likely_duplicate",
@@ -1042,6 +1342,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1042
1342
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1043
1343
  sources: ["sdk/similarity.ts"],
1044
1344
  emitting_commands: ["*"],
1345
+ canonical_code: "likely_duplicate",
1346
+ aliases: [],
1045
1347
  },
1046
1348
  {
1047
1349
  code: "linked_test_value_not_quoted",
@@ -1052,6 +1354,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1052
1354
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1053
1355
  sources: ["cli/error-guidance.ts"],
1054
1356
  emitting_commands: ["*"],
1357
+ canonical_code: "linked_test_value_not_quoted",
1358
+ aliases: [],
1055
1359
  },
1056
1360
  {
1057
1361
  code: "list_source_incomplete",
@@ -1062,6 +1366,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1062
1366
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1063
1367
  sources: ["sdk/query/list.ts"],
1064
1368
  emitting_commands: ["list"],
1369
+ canonical_code: "list_source_incomplete",
1370
+ aliases: [],
1065
1371
  },
1066
1372
  {
1067
1373
  code: "local_package_archive_unsafe",
@@ -1072,6 +1378,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1072
1378
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1073
1379
  sources: ["sdk/extension/install-sources.ts"],
1074
1380
  emitting_commands: ["*"],
1381
+ canonical_code: "local_package_archive_unsafe",
1382
+ aliases: [],
1075
1383
  },
1076
1384
  {
1077
1385
  code: "local_source_not_found_bare_name",
@@ -1082,6 +1390,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1082
1390
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1083
1391
  sources: ["sdk/extension/install-sources.ts"],
1084
1392
  emitting_commands: ["*"],
1393
+ canonical_code: "local_source_not_found_bare_name",
1394
+ aliases: [],
1085
1395
  },
1086
1396
  {
1087
1397
  code: "lock_conflict",
@@ -1096,6 +1406,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1096
1406
  "core/telemetry/observability.ts",
1097
1407
  ],
1098
1408
  emitting_commands: ["*"],
1409
+ canonical_code: "lock_conflict",
1410
+ aliases: [],
1099
1411
  },
1100
1412
  {
1101
1413
  code: "locks_stale_count",
@@ -1106,6 +1418,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1106
1418
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1107
1419
  sources: ["core/diagnostics/remediation.ts"],
1108
1420
  emitting_commands: ["*"],
1421
+ canonical_code: "locks_stale_count",
1422
+ aliases: [],
1109
1423
  },
1110
1424
  {
1111
1425
  code: "locks_unreadable",
@@ -1116,6 +1430,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1116
1430
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1117
1431
  sources: ["core/diagnostics/remediation.ts"],
1118
1432
  emitting_commands: ["*"],
1433
+ canonical_code: "locks_unreadable",
1434
+ aliases: [],
1119
1435
  },
1120
1436
  {
1121
1437
  code: "malformed_plan_step_evidence",
@@ -1126,6 +1442,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1126
1442
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1127
1443
  sources: ["sdk/lifecycle/plan.ts"],
1128
1444
  emitting_commands: ["plan"],
1445
+ canonical_code: "malformed_plan_step_evidence",
1446
+ aliases: [],
1129
1447
  },
1130
1448
  {
1131
1449
  code: "manifest_capabilities_absent",
@@ -1136,6 +1454,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1136
1454
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1137
1455
  sources: ["sdk/compose.ts"],
1138
1456
  emitting_commands: ["*"],
1457
+ canonical_code: "manifest_capabilities_absent",
1458
+ aliases: [],
1139
1459
  },
1140
1460
  {
1141
1461
  code: "merge_conflict_markers_detected",
@@ -1146,6 +1466,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1146
1466
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1147
1467
  sources: ["core/item/item-format.ts"],
1148
1468
  emitting_commands: ["*"],
1469
+ canonical_code: "merge_conflict_markers_detected",
1470
+ aliases: ["history_merge_conflict_markers_detected"],
1149
1471
  },
1150
1472
  {
1151
1473
  code: "merge_git_config_unwritable",
@@ -1156,6 +1478,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1156
1478
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1157
1479
  sources: ["sdk/merge/install.ts"],
1158
1480
  emitting_commands: ["*"],
1481
+ canonical_code: "merge_git_config_unwritable",
1482
+ aliases: [],
1159
1483
  },
1160
1484
  {
1161
1485
  code: "merge_root_not_found",
@@ -1166,6 +1490,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1166
1490
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1167
1491
  sources: ["sdk/merge/install.ts"],
1168
1492
  emitting_commands: ["*"],
1493
+ canonical_code: "merge_root_not_found",
1494
+ aliases: [],
1169
1495
  },
1170
1496
  {
1171
1497
  code: "missing_directory",
@@ -1176,6 +1502,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1176
1502
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1177
1503
  sources: ["core/diagnostics/remediation.ts"],
1178
1504
  emitting_commands: ["*"],
1505
+ canonical_code: "missing_directory",
1506
+ aliases: [],
1179
1507
  },
1180
1508
  {
1181
1509
  code: "missing_lifecycle_target",
@@ -1186,6 +1514,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1186
1514
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1187
1515
  sources: ["sdk/extension.ts"],
1188
1516
  emitting_commands: ["*"],
1517
+ canonical_code: "missing_lifecycle_target",
1518
+ aliases: [],
1189
1519
  },
1190
1520
  {
1191
1521
  code: "missing_required_argument",
@@ -1203,6 +1533,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1203
1533
  "sdk/invocation-author.ts",
1204
1534
  ],
1205
1535
  emitting_commands: ["*"],
1536
+ canonical_code: "missing_required_argument",
1537
+ aliases: [],
1206
1538
  },
1207
1539
  {
1208
1540
  code: "missing_required_option",
@@ -1219,6 +1551,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1219
1551
  "sdk/lifecycle/plan.ts",
1220
1552
  ],
1221
1553
  emitting_commands: ["*", "create", "plan"],
1554
+ canonical_code: "missing_required_option",
1555
+ aliases: [],
1222
1556
  },
1223
1557
  {
1224
1558
  code: "module_import_failed",
@@ -1229,6 +1563,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1229
1563
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1230
1564
  sources: ["cli/error-guidance.ts"],
1231
1565
  emitting_commands: ["*"],
1566
+ canonical_code: "module_import_failed",
1567
+ aliases: [],
1232
1568
  },
1233
1569
  {
1234
1570
  code: "multi_target_github_install_ambiguous",
@@ -1239,6 +1575,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1239
1575
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1240
1576
  sources: ["cli/register-setup.ts"],
1241
1577
  emitting_commands: ["*"],
1578
+ canonical_code: "multi_target_github_install_ambiguous",
1579
+ aliases: [],
1242
1580
  },
1243
1581
  {
1244
1582
  code: "mutation_author_required",
@@ -1249,6 +1587,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1249
1587
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1250
1588
  sources: ["sdk/mutation-guard.ts"],
1251
1589
  emitting_commands: ["*"],
1590
+ canonical_code: "mutation_author_required",
1591
+ aliases: [],
1252
1592
  },
1253
1593
  {
1254
1594
  code: "mutation_secret_guard_blocked",
@@ -1259,6 +1599,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1259
1599
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1260
1600
  sources: ["sdk/mutation-guard.ts"],
1261
1601
  emitting_commands: ["*"],
1602
+ canonical_code: "mutation_secret_guard_blocked",
1603
+ aliases: [],
1262
1604
  },
1263
1605
  {
1264
1606
  code: "no_matching_tests",
@@ -1269,6 +1611,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1269
1611
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1270
1612
  sources: ["sdk/test/execution.ts"],
1271
1613
  emitting_commands: ["*"],
1614
+ canonical_code: "no_matching_tests",
1615
+ aliases: [],
1272
1616
  },
1273
1617
  {
1274
1618
  code: "no_projects_matched_filters",
@@ -1279,6 +1623,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1279
1623
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1280
1624
  sources: ["sdk/test/execution.ts"],
1281
1625
  emitting_commands: ["*"],
1626
+ canonical_code: "no_projects_matched_filters",
1627
+ aliases: [],
1282
1628
  },
1283
1629
  {
1284
1630
  code: "no_test_files_found",
@@ -1289,6 +1635,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1289
1635
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1290
1636
  sources: ["sdk/test/execution.ts"],
1291
1637
  emitting_commands: ["*"],
1638
+ canonical_code: "no_test_files_found",
1639
+ aliases: [],
1292
1640
  },
1293
1641
  {
1294
1642
  code: "no_tests_found",
@@ -1299,6 +1647,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1299
1647
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1300
1648
  sources: ["sdk/test/execution.ts"],
1301
1649
  emitting_commands: ["*"],
1650
+ canonical_code: "no_tests_found",
1651
+ aliases: [],
1302
1652
  },
1303
1653
  {
1304
1654
  code: "no_update_fields",
@@ -1309,6 +1659,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1309
1659
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1310
1660
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1311
1661
  emitting_commands: ["*"],
1662
+ canonical_code: "no_update_fields",
1663
+ aliases: [],
1312
1664
  },
1313
1665
  {
1314
1666
  code: "npm_package_not_found",
@@ -1319,6 +1671,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1319
1671
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1320
1672
  sources: ["sdk/extension/install-sources.ts"],
1321
1673
  emitting_commands: ["*"],
1674
+ canonical_code: "npm_package_not_found",
1675
+ aliases: [],
1322
1676
  },
1323
1677
  {
1324
1678
  code: "ownership_conflict",
@@ -1333,6 +1687,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1333
1687
  "sdk/annotations.ts",
1334
1688
  ],
1335
1689
  emitting_commands: ["*"],
1690
+ canonical_code: "ownership_conflict",
1691
+ aliases: [],
1336
1692
  },
1337
1693
  {
1338
1694
  code: "ownership_dependency_bypass_restricted_options",
@@ -1343,6 +1699,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1343
1699
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1344
1700
  sources: ["sdk/lifecycle/update.ts"],
1345
1701
  emitting_commands: ["update"],
1702
+ canonical_code: "ownership_dependency_bypass_restricted_options",
1703
+ aliases: [],
1346
1704
  },
1347
1705
  {
1348
1706
  code: "ownership_metadata_bypass_restricted_options",
@@ -1353,6 +1711,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1353
1711
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1354
1712
  sources: ["sdk/lifecycle/update.ts"],
1355
1713
  emitting_commands: ["update"],
1714
+ canonical_code: "ownership_metadata_bypass_restricted_options",
1715
+ aliases: [],
1356
1716
  },
1357
1717
  {
1358
1718
  code: "package_spec_empty",
@@ -1363,6 +1723,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1363
1723
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1364
1724
  sources: ["core/profile/profile-lint.ts"],
1365
1725
  emitting_commands: ["*"],
1726
+ canonical_code: "package_spec_empty",
1727
+ aliases: [],
1366
1728
  },
1367
1729
  {
1368
1730
  code: "profile_name_empty",
@@ -1373,6 +1735,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1373
1735
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1374
1736
  sources: ["core/profile/profile-lint.ts"],
1375
1737
  emitting_commands: ["*"],
1738
+ canonical_code: "profile_name_empty",
1739
+ aliases: [],
1376
1740
  },
1377
1741
  {
1378
1742
  code: "profile_name_not_normalized",
@@ -1383,6 +1747,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1383
1747
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1384
1748
  sources: ["core/profile/profile-lint.ts"],
1385
1749
  emitting_commands: ["*"],
1750
+ canonical_code: "profile_name_not_normalized",
1751
+ aliases: [],
1386
1752
  },
1387
1753
  {
1388
1754
  code: "profile_summary_empty",
@@ -1393,6 +1759,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1393
1759
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1394
1760
  sources: ["core/profile/profile-lint.ts"],
1395
1761
  emitting_commands: ["*"],
1762
+ canonical_code: "profile_summary_empty",
1763
+ aliases: [],
1396
1764
  },
1397
1765
  {
1398
1766
  code: "profile_title_empty",
@@ -1403,6 +1771,32 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1403
1771
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1404
1772
  sources: ["core/profile/profile-lint.ts"],
1405
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: [],
1406
1800
  },
1407
1801
  {
1408
1802
  code: "redundant_edge",
@@ -1413,6 +1807,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1413
1807
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1414
1808
  sources: ["sdk/graph/remediation.ts"],
1415
1809
  emitting_commands: ["*"],
1810
+ canonical_code: "redundant_edge",
1811
+ aliases: [],
1416
1812
  },
1417
1813
  {
1418
1814
  code: "reindex_already_running",
@@ -1423,6 +1819,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1423
1819
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1424
1820
  sources: ["sdk/governance/reindex.ts"],
1425
1821
  emitting_commands: ["*"],
1822
+ canonical_code: "reindex_already_running",
1823
+ aliases: [],
1426
1824
  },
1427
1825
  {
1428
1826
  code: "reserved_item_field",
@@ -1433,6 +1831,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1433
1831
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1434
1832
  sources: ["sdk/compose.ts"],
1435
1833
  emitting_commands: ["*"],
1834
+ canonical_code: "reserved_item_field",
1835
+ aliases: [],
1436
1836
  },
1437
1837
  {
1438
1838
  code: "schema_migration_input_required",
@@ -1443,6 +1843,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1443
1843
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1444
1844
  sources: ["cli/migration-gates.ts"],
1445
1845
  emitting_commands: ["*"],
1846
+ canonical_code: "schema_migration_input_required",
1847
+ aliases: [],
1446
1848
  },
1447
1849
  {
1448
1850
  code: "settings_read_fs_error",
@@ -1453,6 +1855,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1453
1855
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1454
1856
  sources: ["core/diagnostics/remediation.ts"],
1455
1857
  emitting_commands: ["*"],
1858
+ canonical_code: "settings_read_fs_error",
1859
+ aliases: [],
1456
1860
  },
1457
1861
  {
1458
1862
  code: "settings_read_invalid_json",
@@ -1463,6 +1867,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1463
1867
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1464
1868
  sources: ["core/diagnostics/remediation.ts"],
1465
1869
  emitting_commands: ["*"],
1870
+ canonical_code: "settings_read_invalid_json",
1871
+ aliases: [],
1466
1872
  },
1467
1873
  {
1468
1874
  code: "settings_read_invalid_schema",
@@ -1473,6 +1879,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1473
1879
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1474
1880
  sources: ["core/diagnostics/remediation.ts"],
1475
1881
  emitting_commands: ["*"],
1882
+ canonical_code: "settings_read_invalid_schema",
1883
+ aliases: [],
1476
1884
  },
1477
1885
  {
1478
1886
  code: "settings_read_merge_failed",
@@ -1483,6 +1891,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1483
1891
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1484
1892
  sources: ["core/diagnostics/remediation.ts"],
1485
1893
  emitting_commands: ["*"],
1894
+ canonical_code: "settings_read_merge_failed",
1895
+ aliases: [],
1486
1896
  },
1487
1897
  {
1488
1898
  code: "status_duplicate",
@@ -1493,6 +1903,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1493
1903
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1494
1904
  sources: ["core/profile/profile-lint.ts"],
1495
1905
  emitting_commands: ["*"],
1906
+ canonical_code: "status_duplicate",
1907
+ aliases: [],
1496
1908
  },
1497
1909
  {
1498
1910
  code: "status_invalid",
@@ -1503,6 +1915,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1503
1915
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1504
1916
  sources: ["core/profile/profile-lint.ts"],
1505
1917
  emitting_commands: ["*"],
1918
+ canonical_code: "status_invalid",
1919
+ aliases: [],
1506
1920
  },
1507
1921
  {
1508
1922
  code: "stdin_json_invalid",
@@ -1513,6 +1927,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1513
1927
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1514
1928
  sources: ["sdk/structured-mutations.ts"],
1515
1929
  emitting_commands: ["*"],
1930
+ canonical_code: "stdin_json_invalid",
1931
+ aliases: [],
1516
1932
  },
1517
1933
  {
1518
1934
  code: "stdin_json_unknown_key",
@@ -1523,6 +1939,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1523
1939
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1524
1940
  sources: ["sdk/structured-mutations.ts"],
1525
1941
  emitting_commands: ["*"],
1942
+ canonical_code: "stdin_json_unknown_key",
1943
+ aliases: [],
1526
1944
  },
1527
1945
  {
1528
1946
  code: "structured_event_immutable",
@@ -1533,6 +1951,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1533
1951
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1534
1952
  sources: ["sdk/annotations.ts"],
1535
1953
  emitting_commands: ["*"],
1954
+ canonical_code: "structured_event_immutable",
1955
+ aliases: [],
1536
1956
  },
1537
1957
  {
1538
1958
  code: "structured_event_input_conflict",
@@ -1543,6 +1963,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1543
1963
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1544
1964
  sources: ["sdk/notes.ts"],
1545
1965
  emitting_commands: ["*"],
1966
+ canonical_code: "structured_event_input_conflict",
1967
+ aliases: [],
1546
1968
  },
1547
1969
  {
1548
1970
  code: "structured_event_json_empty",
@@ -1553,6 +1975,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1553
1975
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1554
1976
  sources: ["sdk/notes.ts"],
1555
1977
  emitting_commands: ["*"],
1978
+ canonical_code: "structured_event_json_empty",
1979
+ aliases: [],
1556
1980
  },
1557
1981
  {
1558
1982
  code: "structured_event_json_invalid",
@@ -1563,6 +1987,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1563
1987
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1564
1988
  sources: ["sdk/notes.ts"],
1565
1989
  emitting_commands: ["*"],
1990
+ canonical_code: "structured_event_json_invalid",
1991
+ aliases: [],
1566
1992
  },
1567
1993
  {
1568
1994
  code: "structured_event_since_invalid",
@@ -1573,6 +1999,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1573
1999
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1574
2000
  sources: ["sdk/notes.ts"],
1575
2001
  emitting_commands: ["*"],
2002
+ canonical_code: "structured_event_since_invalid",
2003
+ aliases: [],
1576
2004
  },
1577
2005
  {
1578
2006
  code: "telemetry_endpoint_probe_failed",
@@ -1583,6 +2011,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1583
2011
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1584
2012
  sources: ["core/diagnostics/remediation.ts"],
1585
2013
  emitting_commands: ["*"],
2014
+ canonical_code: "telemetry_endpoint_probe_failed",
2015
+ aliases: [],
1586
2016
  },
1587
2017
  {
1588
2018
  code: "telemetry_endpoint_probe_http_status",
@@ -1593,6 +2023,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1593
2023
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1594
2024
  sources: ["core/diagnostics/remediation.ts"],
1595
2025
  emitting_commands: ["*"],
2026
+ canonical_code: "telemetry_endpoint_probe_http_status",
2027
+ aliases: [],
1596
2028
  },
1597
2029
  {
1598
2030
  code: "telemetry_otel_export_failing",
@@ -1603,6 +2035,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1603
2035
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1604
2036
  sources: ["core/diagnostics/remediation.ts"],
1605
2037
  emitting_commands: ["*"],
2038
+ canonical_code: "telemetry_otel_export_failing",
2039
+ aliases: [],
1606
2040
  },
1607
2041
  {
1608
2042
  code: "telemetry_queue_high_retries",
@@ -1613,6 +2047,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1613
2047
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1614
2048
  sources: ["core/diagnostics/remediation.ts"],
1615
2049
  emitting_commands: ["*"],
2050
+ canonical_code: "telemetry_queue_high_retries",
2051
+ aliases: [],
1616
2052
  },
1617
2053
  {
1618
2054
  code: "telemetry_queue_invalid_rows",
@@ -1623,6 +2059,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1623
2059
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1624
2060
  sources: ["core/diagnostics/remediation.ts"],
1625
2061
  emitting_commands: ["*"],
2062
+ canonical_code: "telemetry_queue_invalid_rows",
2063
+ aliases: [],
1626
2064
  },
1627
2065
  {
1628
2066
  code: "telemetry_queue_pending",
@@ -1633,6 +2071,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1633
2071
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1634
2072
  sources: ["core/diagnostics/remediation.ts"],
1635
2073
  emitting_commands: ["*"],
2074
+ canonical_code: "telemetry_queue_pending",
2075
+ aliases: [],
1636
2076
  },
1637
2077
  {
1638
2078
  code: "telemetry_schema_version_behind",
@@ -1643,6 +2083,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1643
2083
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1644
2084
  sources: ["core/diagnostics/remediation.ts"],
1645
2085
  emitting_commands: ["*"],
2086
+ canonical_code: "telemetry_schema_version_behind",
2087
+ aliases: [],
1646
2088
  },
1647
2089
  {
1648
2090
  code: "telemetry_state_invalid_json",
@@ -1653,6 +2095,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1653
2095
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1654
2096
  sources: ["core/diagnostics/remediation.ts"],
1655
2097
  emitting_commands: ["*"],
2098
+ canonical_code: "telemetry_state_invalid_json",
2099
+ aliases: [],
1656
2100
  },
1657
2101
  {
1658
2102
  code: "template_type_unknown",
@@ -1663,6 +2107,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1663
2107
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1664
2108
  sources: ["core/profile/profile-lint.ts"],
1665
2109
  emitting_commands: ["*"],
2110
+ canonical_code: "template_type_unknown",
2111
+ aliases: [],
1666
2112
  },
1667
2113
  {
1668
2114
  code: "terminal_plan_mutation",
@@ -1673,6 +2119,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1673
2119
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1674
2120
  sources: ["sdk/lifecycle/plan.ts"],
1675
2121
  emitting_commands: ["plan"],
2122
+ canonical_code: "terminal_plan_mutation",
2123
+ aliases: [],
1676
2124
  },
1677
2125
  {
1678
2126
  code: "terminal_state_conflict",
@@ -1683,6 +2131,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1683
2131
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1684
2132
  sources: ["core/telemetry/observability.ts"],
1685
2133
  emitting_commands: ["*"],
2134
+ canonical_code: "terminal_state_conflict",
2135
+ aliases: [],
1686
2136
  },
1687
2137
  {
1688
2138
  code: "tracked_runtime_cache_files",
@@ -1693,6 +2143,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1693
2143
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1694
2144
  sources: ["core/diagnostics/remediation.ts"],
1695
2145
  emitting_commands: ["*"],
2146
+ canonical_code: "tracked_runtime_cache_files",
2147
+ aliases: ["validate_storage_tracked_runtime_cache_files"],
1696
2148
  },
1697
2149
  {
1698
2150
  code: "tracker_not_initialized",
@@ -1703,6 +2155,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1703
2155
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1704
2156
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1705
2157
  emitting_commands: ["*"],
2158
+ canonical_code: "tracker_not_initialized",
2159
+ aliases: [],
1706
2160
  },
1707
2161
  {
1708
2162
  code: "tracker_root_missing",
@@ -1713,6 +2167,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1713
2167
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1714
2168
  sources: ["core/store/item-store.ts"],
1715
2169
  emitting_commands: ["*"],
2170
+ canonical_code: "tracker_root_missing",
2171
+ aliases: [],
1716
2172
  },
1717
2173
  {
1718
2174
  code: "tracker_root_not_directory",
@@ -1723,6 +2179,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1723
2179
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1724
2180
  sources: ["core/store/item-store.ts"],
1725
2181
  emitting_commands: ["*"],
2182
+ canonical_code: "tracker_root_not_directory",
2183
+ aliases: [],
1726
2184
  },
1727
2185
  {
1728
2186
  code: "type_duplicate",
@@ -1733,6 +2191,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1733
2191
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1734
2192
  sources: ["core/profile/profile-lint.ts"],
1735
2193
  emitting_commands: ["*"],
2194
+ canonical_code: "type_duplicate",
2195
+ aliases: [],
1736
2196
  },
1737
2197
  {
1738
2198
  code: "type_invalid",
@@ -1743,6 +2203,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1743
2203
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1744
2204
  sources: ["core/profile/profile-lint.ts"],
1745
2205
  emitting_commands: ["*"],
2206
+ canonical_code: "type_invalid",
2207
+ aliases: [],
1746
2208
  },
1747
2209
  {
1748
2210
  code: "unknown_command",
@@ -1757,6 +2219,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1757
2219
  "sdk/cli-contracts/runtime-contracts.ts",
1758
2220
  ],
1759
2221
  emitting_commands: ["*"],
2222
+ canonical_code: "unknown_command",
2223
+ aliases: [],
1760
2224
  },
1761
2225
  {
1762
2226
  code: "unknown_context_intent",
@@ -1767,6 +2231,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1767
2231
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1768
2232
  sources: ["sdk/context-intent-contracts.ts"],
1769
2233
  emitting_commands: ["*"],
2234
+ canonical_code: "unknown_context_intent",
2235
+ aliases: [],
1770
2236
  },
1771
2237
  {
1772
2238
  code: "unknown_error",
@@ -1777,6 +2243,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1777
2243
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1778
2244
  sources: ["cli/error-guidance.ts"],
1779
2245
  emitting_commands: ["*"],
2246
+ canonical_code: "unknown_error",
2247
+ aliases: [],
1780
2248
  },
1781
2249
  {
1782
2250
  code: "unknown_field",
@@ -1787,6 +2255,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1787
2255
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1788
2256
  sources: ["sdk/schema.ts"],
1789
2257
  emitting_commands: ["*"],
2258
+ canonical_code: "unknown_field",
2259
+ aliases: [],
1790
2260
  },
1791
2261
  {
1792
2262
  code: "unknown_field_projection",
@@ -1797,6 +2267,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1797
2267
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1798
2268
  sources: ["sdk/query/get.ts", "sdk/query/list.ts"],
1799
2269
  emitting_commands: ["get", "list"],
2270
+ canonical_code: "unknown_field_projection",
2271
+ aliases: [],
1800
2272
  },
1801
2273
  {
1802
2274
  code: "unknown_item_type",
@@ -1807,6 +2279,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1807
2279
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1808
2280
  sources: ["sdk/schema.ts"],
1809
2281
  emitting_commands: ["*"],
2282
+ canonical_code: "unknown_item_type",
2283
+ aliases: [],
1810
2284
  },
1811
2285
  {
1812
2286
  code: "unknown_lifecycle_action",
@@ -1817,6 +2291,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1817
2291
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1818
2292
  sources: ["sdk/extension.ts"],
1819
2293
  emitting_commands: ["*"],
2294
+ canonical_code: "unknown_lifecycle_action",
2295
+ aliases: [],
1820
2296
  },
1821
2297
  {
1822
2298
  code: "unknown_option",
@@ -1827,6 +2303,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1827
2303
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1828
2304
  sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1829
2305
  emitting_commands: ["*"],
2306
+ canonical_code: "unknown_option",
2307
+ aliases: [],
1830
2308
  },
1831
2309
  {
1832
2310
  code: "unknown_plan_template",
@@ -1837,6 +2315,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1837
2315
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1838
2316
  sources: ["sdk/lifecycle/plan.ts"],
1839
2317
  emitting_commands: ["plan"],
2318
+ canonical_code: "unknown_plan_template",
2319
+ aliases: [],
1840
2320
  },
1841
2321
  {
1842
2322
  code: "unknown_provenance_dimension",
@@ -1847,6 +2327,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1847
2327
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1848
2328
  sources: ["sdk/history-provenance.ts"],
1849
2329
  emitting_commands: ["*"],
2330
+ canonical_code: "unknown_provenance_dimension",
2331
+ aliases: [],
1850
2332
  },
1851
2333
  {
1852
2334
  code: "unknown_status",
@@ -1857,6 +2339,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1857
2339
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1858
2340
  sources: ["sdk/schema.ts"],
1859
2341
  emitting_commands: ["*"],
2342
+ canonical_code: "unknown_status",
2343
+ aliases: [],
1860
2344
  },
1861
2345
  {
1862
2346
  code: "unknown_subcommand",
@@ -1872,6 +2356,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1872
2356
  "sdk/telemetry.ts",
1873
2357
  ],
1874
2358
  emitting_commands: ["*"],
2359
+ canonical_code: "unknown_subcommand",
2360
+ aliases: [],
1875
2361
  },
1876
2362
  {
1877
2363
  code: "unsupported_update_option",
@@ -1882,6 +2368,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1882
2368
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1883
2369
  sources: ["cli/error-guidance.ts"],
1884
2370
  emitting_commands: ["*"],
2371
+ canonical_code: "unsupported_update_option",
2372
+ aliases: [],
1885
2373
  },
1886
2374
  {
1887
2375
  code: "validate_command_references_stale_pm_ids",
@@ -1892,6 +2380,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1892
2380
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1893
2381
  sources: ["core/diagnostics/remediation.ts"],
1894
2382
  emitting_commands: ["*"],
2383
+ canonical_code: "validate_command_references_stale_pm_ids",
2384
+ aliases: [],
1895
2385
  },
1896
2386
  {
1897
2387
  code: "validate_files_missing_linked_paths",
@@ -1902,6 +2392,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1902
2392
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1903
2393
  sources: ["core/diagnostics/remediation.ts"],
1904
2394
  emitting_commands: ["*"],
2395
+ canonical_code: "validate_files_missing_linked_paths",
2396
+ aliases: [],
1905
2397
  },
1906
2398
  {
1907
2399
  code: "validate_files_orphaned_paths",
@@ -1912,6 +2404,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1912
2404
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1913
2405
  sources: ["core/diagnostics/remediation.ts"],
1914
2406
  emitting_commands: ["*"],
2407
+ canonical_code: "validate_files_orphaned_paths",
2408
+ aliases: [],
1915
2409
  },
1916
2410
  {
1917
2411
  code: "validate_files_tracked_all_strict_forces_pm_internals",
@@ -1922,6 +2416,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1922
2416
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1923
2417
  sources: ["core/diagnostics/remediation.ts"],
1924
2418
  emitting_commands: ["*"],
2419
+ canonical_code: "validate_files_tracked_all_strict_forces_pm_internals",
2420
+ aliases: [],
1925
2421
  },
1926
2422
  {
1927
2423
  code: "validate_format_version_ahead_items",
@@ -1932,6 +2428,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1932
2428
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1933
2429
  sources: ["core/diagnostics/remediation.ts"],
1934
2430
  emitting_commands: ["*"],
2431
+ canonical_code: "integrity_item_ahead_format_version",
2432
+ aliases: [],
1935
2433
  },
1936
2434
  {
1937
2435
  code: "validate_format_version_outdated_items",
@@ -1942,6 +2440,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1942
2440
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1943
2441
  sources: ["core/diagnostics/remediation.ts"],
1944
2442
  emitting_commands: ["*"],
2443
+ canonical_code: "integrity_item_outdated_format_version",
2444
+ aliases: [],
1945
2445
  },
1946
2446
  {
1947
2447
  code: "validate_hierarchy_parent_cycle",
@@ -1952,6 +2452,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1952
2452
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1953
2453
  sources: ["core/diagnostics/remediation.ts"],
1954
2454
  emitting_commands: ["*"],
2455
+ canonical_code: "validate_hierarchy_parent_cycle",
2456
+ aliases: [],
1955
2457
  },
1956
2458
  {
1957
2459
  code: "validate_hierarchy_parent_cycle_error",
@@ -1962,6 +2464,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1962
2464
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1963
2465
  sources: ["core/diagnostics/remediation.ts"],
1964
2466
  emitting_commands: ["*"],
2467
+ canonical_code: "validate_hierarchy_parent_cycle_error",
2468
+ aliases: [],
1965
2469
  },
1966
2470
  {
1967
2471
  code: "validate_history_drift_chain_mismatches",
@@ -1972,6 +2476,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1972
2476
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1973
2477
  sources: ["core/diagnostics/remediation.ts"],
1974
2478
  emitting_commands: ["*"],
2479
+ canonical_code: "history_drift_chain_mismatch",
2480
+ aliases: [],
1975
2481
  },
1976
2482
  {
1977
2483
  code: "validate_history_drift_hash_mismatches",
@@ -1982,6 +2488,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1982
2488
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1983
2489
  sources: ["core/diagnostics/remediation.ts"],
1984
2490
  emitting_commands: ["*"],
2491
+ canonical_code: "history_drift_hash_mismatch",
2492
+ aliases: [],
1985
2493
  },
1986
2494
  {
1987
2495
  code: "validate_history_drift_missing_streams",
@@ -1992,6 +2500,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
1992
2500
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1993
2501
  sources: ["core/diagnostics/remediation.ts"],
1994
2502
  emitting_commands: ["*"],
2503
+ canonical_code: "history_drift_missing_stream",
2504
+ aliases: [],
1995
2505
  },
1996
2506
  {
1997
2507
  code: "validate_history_drift_unreadable_streams",
@@ -2002,6 +2512,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2002
2512
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2003
2513
  sources: ["core/diagnostics/remediation.ts"],
2004
2514
  emitting_commands: ["*"],
2515
+ canonical_code: "history_drift_unreadable_stream",
2516
+ aliases: [],
2005
2517
  },
2006
2518
  {
2007
2519
  code: "validate_history_unknown_author_events",
@@ -2012,6 +2524,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2012
2524
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2013
2525
  sources: ["core/diagnostics/remediation.ts"],
2014
2526
  emitting_commands: ["*"],
2527
+ canonical_code: "history_unknown_author_events",
2528
+ aliases: [],
2015
2529
  },
2016
2530
  {
2017
2531
  code: "validate_lifecycle_active_closure_like_metadata",
@@ -2022,6 +2536,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2022
2536
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2023
2537
  sources: ["core/diagnostics/remediation.ts"],
2024
2538
  emitting_commands: ["*"],
2539
+ canonical_code: "validate_lifecycle_active_closure_like_metadata",
2540
+ aliases: [],
2025
2541
  },
2026
2542
  {
2027
2543
  code: "validate_lifecycle_active_terminal_parent",
@@ -2032,6 +2548,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2032
2548
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2033
2549
  sources: ["core/diagnostics/remediation.ts"],
2034
2550
  emitting_commands: ["*"],
2551
+ canonical_code: "validate_lifecycle_active_terminal_parent",
2552
+ aliases: [],
2035
2553
  },
2036
2554
  {
2037
2555
  code: "validate_lifecycle_dependency_cycles",
@@ -2042,6 +2560,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2042
2560
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2043
2561
  sources: ["core/diagnostics/remediation.ts"],
2044
2562
  emitting_commands: ["*"],
2563
+ canonical_code: "validate_lifecycle_dependency_cycles",
2564
+ aliases: [],
2045
2565
  },
2046
2566
  {
2047
2567
  code: "validate_lifecycle_dependency_cycles_error",
@@ -2052,6 +2572,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2052
2572
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2053
2573
  sources: ["core/diagnostics/remediation.ts"],
2054
2574
  emitting_commands: ["*"],
2575
+ canonical_code: "validate_lifecycle_dependency_cycles_error",
2576
+ aliases: [],
2055
2577
  },
2056
2578
  {
2057
2579
  code: "validate_lifecycle_stale_blockers",
@@ -2062,6 +2584,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2062
2584
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2063
2585
  sources: ["core/diagnostics/remediation.ts"],
2064
2586
  emitting_commands: ["*"],
2587
+ canonical_code: "validate_lifecycle_stale_blockers",
2588
+ aliases: [],
2065
2589
  },
2066
2590
  {
2067
2591
  code: "validate_merge_fence_drift",
@@ -2072,6 +2596,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2072
2596
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2073
2597
  sources: ["core/diagnostics/remediation.ts"],
2074
2598
  emitting_commands: ["*"],
2599
+ canonical_code: "validate_merge_fence_drift",
2600
+ aliases: [],
2075
2601
  },
2076
2602
  {
2077
2603
  code: "validate_metadata_custom_profile_missing_required_fields",
@@ -2082,6 +2608,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2082
2608
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2083
2609
  sources: ["core/diagnostics/remediation.ts"],
2084
2610
  emitting_commands: ["*"],
2611
+ canonical_code: "validate_metadata_custom_profile_missing_required_fields",
2612
+ aliases: [],
2085
2613
  },
2086
2614
  {
2087
2615
  code: "validate_metadata_duplicate_issue_codes",
@@ -2092,6 +2620,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2092
2620
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2093
2621
  sources: ["core/diagnostics/remediation.ts"],
2094
2622
  emitting_commands: ["*"],
2623
+ canonical_code: "validate_metadata_duplicate_issue_codes",
2624
+ aliases: [],
2095
2625
  },
2096
2626
  {
2097
2627
  code: "validate_metadata_missing_acceptance_criteria",
@@ -2102,6 +2632,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2102
2632
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2103
2633
  sources: ["core/diagnostics/remediation.ts"],
2104
2634
  emitting_commands: ["*"],
2635
+ canonical_code: "validate_metadata_missing_acceptance_criteria",
2636
+ aliases: [],
2105
2637
  },
2106
2638
  {
2107
2639
  code: "validate_metadata_missing_close_reason",
@@ -2112,6 +2644,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2112
2644
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2113
2645
  sources: ["core/diagnostics/remediation.ts"],
2114
2646
  emitting_commands: ["*"],
2647
+ canonical_code: "validate_metadata_missing_close_reason",
2648
+ aliases: [],
2115
2649
  },
2116
2650
  {
2117
2651
  code: "validate_metadata_missing_confidence",
@@ -2122,6 +2656,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2122
2656
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2123
2657
  sources: ["core/diagnostics/remediation.ts"],
2124
2658
  emitting_commands: ["*"],
2659
+ canonical_code: "validate_metadata_missing_confidence",
2660
+ aliases: [],
2125
2661
  },
2126
2662
  {
2127
2663
  code: "validate_metadata_missing_estimate",
@@ -2132,6 +2668,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2132
2668
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2133
2669
  sources: ["core/diagnostics/remediation.ts"],
2134
2670
  emitting_commands: ["*"],
2671
+ canonical_code: "validate_metadata_missing_estimate",
2672
+ aliases: [],
2135
2673
  },
2136
2674
  {
2137
2675
  code: "validate_metadata_missing_release",
@@ -2142,6 +2680,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2142
2680
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2143
2681
  sources: ["core/diagnostics/remediation.ts"],
2144
2682
  emitting_commands: ["*"],
2683
+ canonical_code: "validate_metadata_missing_release",
2684
+ aliases: [],
2145
2685
  },
2146
2686
  {
2147
2687
  code: "validate_metadata_missing_reviewer",
@@ -2152,6 +2692,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2152
2692
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2153
2693
  sources: ["core/diagnostics/remediation.ts"],
2154
2694
  emitting_commands: ["*"],
2695
+ canonical_code: "validate_metadata_missing_reviewer",
2696
+ aliases: [],
2155
2697
  },
2156
2698
  {
2157
2699
  code: "validate_metadata_missing_risk",
@@ -2162,6 +2704,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2162
2704
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2163
2705
  sources: ["core/diagnostics/remediation.ts"],
2164
2706
  emitting_commands: ["*"],
2707
+ canonical_code: "validate_metadata_missing_risk",
2708
+ aliases: [],
2165
2709
  },
2166
2710
  {
2167
2711
  code: "validate_metadata_missing_sprint",
@@ -2172,6 +2716,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2172
2716
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2173
2717
  sources: ["core/diagnostics/remediation.ts"],
2174
2718
  emitting_commands: ["*"],
2719
+ canonical_code: "validate_metadata_missing_sprint",
2720
+ aliases: [],
2175
2721
  },
2176
2722
  {
2177
2723
  code: "validate_resolution_missing_fields",
@@ -2182,6 +2728,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2182
2728
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2183
2729
  sources: ["core/diagnostics/remediation.ts"],
2184
2730
  emitting_commands: ["*"],
2731
+ canonical_code: "validate_resolution_missing_fields",
2732
+ aliases: [],
2185
2733
  },
2186
2734
  {
2187
2735
  code: "validate_storage_duplicate_item_ids",
@@ -2192,6 +2740,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2192
2740
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2193
2741
  sources: ["core/diagnostics/remediation.ts"],
2194
2742
  emitting_commands: ["*"],
2743
+ canonical_code: "validate_storage_duplicate_item_ids",
2744
+ aliases: [],
2195
2745
  },
2196
2746
  {
2197
2747
  code: "validate_storage_history_conflict_markers",
@@ -2202,6 +2752,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2202
2752
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2203
2753
  sources: ["core/diagnostics/remediation.ts"],
2204
2754
  emitting_commands: ["*"],
2755
+ canonical_code: "integrity_history_conflict_marker",
2756
+ aliases: [],
2205
2757
  },
2206
2758
  {
2207
2759
  code: "validate_storage_resurrected_items",
@@ -2212,6 +2764,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2212
2764
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2213
2765
  sources: ["core/diagnostics/remediation.ts"],
2214
2766
  emitting_commands: ["*"],
2767
+ canonical_code: "validate_storage_resurrected_items",
2768
+ aliases: [],
2215
2769
  },
2216
2770
  {
2217
2771
  code: "validate_storage_tracked_runtime_cache_files",
@@ -2222,6 +2776,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2222
2776
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2223
2777
  sources: ["core/diagnostics/remediation.ts"],
2224
2778
  emitting_commands: ["*"],
2779
+ canonical_code: "tracked_runtime_cache_files",
2780
+ aliases: [],
2225
2781
  },
2226
2782
  {
2227
2783
  code: "validate_storage_unparseable_config",
@@ -2232,6 +2788,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2232
2788
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2233
2789
  sources: ["core/diagnostics/remediation.ts"],
2234
2790
  emitting_commands: ["*"],
2791
+ canonical_code: "validate_storage_unparseable_config",
2792
+ aliases: [],
2235
2793
  },
2236
2794
  {
2237
2795
  code: "validate_storage_unparseable_history",
@@ -2242,6 +2800,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2242
2800
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2243
2801
  sources: ["core/diagnostics/remediation.ts"],
2244
2802
  emitting_commands: ["*"],
2803
+ canonical_code: "validate_storage_unparseable_history",
2804
+ aliases: [],
2245
2805
  },
2246
2806
  {
2247
2807
  code: "validate_storage_unreadable_items",
@@ -2252,6 +2812,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2252
2812
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2253
2813
  sources: ["core/diagnostics/remediation.ts"],
2254
2814
  emitting_commands: ["*"],
2815
+ canonical_code: "validate_storage_unreadable_items",
2816
+ aliases: [],
2255
2817
  },
2256
2818
  {
2257
2819
  code: "vectorization_embedding_identity_changed",
@@ -2262,6 +2824,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2262
2824
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2263
2825
  sources: ["core/diagnostics/remediation.ts"],
2264
2826
  emitting_commands: ["*"],
2827
+ canonical_code: "vectorization_embedding_identity_changed",
2828
+ aliases: [],
2265
2829
  },
2266
2830
  {
2267
2831
  code: "vectorization_stale_items_remaining",
@@ -2272,6 +2836,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2272
2836
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2273
2837
  sources: ["core/diagnostics/remediation.ts"],
2274
2838
  emitting_commands: ["*"],
2839
+ canonical_code: "vectorization_stale_items_remaining",
2840
+ aliases: [],
2275
2841
  },
2276
2842
  {
2277
2843
  code: "workflow_duplicate_type",
@@ -2282,6 +2848,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2282
2848
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2283
2849
  sources: ["core/profile/profile-lint.ts"],
2284
2850
  emitting_commands: ["*"],
2851
+ canonical_code: "workflow_duplicate_type",
2852
+ aliases: [],
2285
2853
  },
2286
2854
  {
2287
2855
  code: "workflow_status_unknown",
@@ -2292,6 +2860,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2292
2860
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2293
2861
  sources: ["core/profile/profile-lint.ts"],
2294
2862
  emitting_commands: ["*"],
2863
+ canonical_code: "workflow_status_unknown",
2864
+ aliases: [],
2295
2865
  },
2296
2866
  {
2297
2867
  code: "workflow_transition_malformed",
@@ -2302,6 +2872,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2302
2872
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2303
2873
  sources: ["core/profile/profile-lint.ts"],
2304
2874
  emitting_commands: ["*"],
2875
+ canonical_code: "workflow_transition_malformed",
2876
+ aliases: [],
2305
2877
  },
2306
2878
  {
2307
2879
  code: "workflow_type_empty",
@@ -2312,6 +2884,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2312
2884
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2313
2885
  sources: ["core/profile/profile-lint.ts"],
2314
2886
  emitting_commands: ["*"],
2887
+ canonical_code: "workflow_type_empty",
2888
+ aliases: [],
2315
2889
  },
2316
2890
  {
2317
2891
  code: "workflow_type_unknown",
@@ -2322,6 +2896,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2322
2896
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2323
2897
  sources: ["core/profile/profile-lint.ts"],
2324
2898
  emitting_commands: ["*"],
2899
+ canonical_code: "workflow_type_unknown",
2900
+ aliases: [],
2325
2901
  },
2326
2902
  {
2327
2903
  code: "workspace_history_state_conflict",
@@ -2332,6 +2908,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2332
2908
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2333
2909
  sources: ["core/history/workspace-history.ts"],
2334
2910
  emitting_commands: ["*"],
2911
+ canonical_code: "workspace_history_state_conflict",
2912
+ aliases: [],
2335
2913
  },
2336
2914
  {
2337
2915
  code: "workspace_root_pm_path",
@@ -2342,6 +2920,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2342
2920
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2343
2921
  sources: ["sdk/init.ts"],
2344
2922
  emitting_commands: ["*"],
2923
+ canonical_code: "workspace_root_pm_path",
2924
+ aliases: [],
2345
2925
  },
2346
2926
  {
2347
2927
  code: "workspace_snapshot_force_required",
@@ -2352,6 +2932,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2352
2932
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2353
2933
  sources: ["sdk/workspace-snapshot.ts"],
2354
2934
  emitting_commands: ["*"],
2935
+ canonical_code: "workspace_snapshot_force_required",
2936
+ aliases: [],
2355
2937
  },
2356
2938
  {
2357
2939
  code: "workspace_snapshot_manifest_mismatch",
@@ -2362,6 +2944,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2362
2944
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2363
2945
  sources: ["sdk/workspace-snapshot.ts"],
2364
2946
  emitting_commands: ["*"],
2947
+ canonical_code: "workspace_snapshot_manifest_mismatch",
2948
+ aliases: [],
2365
2949
  },
2366
2950
  {
2367
2951
  code: "workspace_snapshot_name_reserved_fingerprint",
@@ -2372,6 +2956,8 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2372
2956
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2373
2957
  sources: ["sdk/workspace-snapshot.ts"],
2374
2958
  emitting_commands: ["*"],
2959
+ canonical_code: "workspace_snapshot_name_reserved_fingerprint",
2960
+ aliases: [],
2375
2961
  },
2376
2962
  {
2377
2963
  code: "workspace_snapshot_not_found",
@@ -2382,6 +2968,44 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2382
2968
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2383
2969
  sources: ["sdk/workspace-snapshot.ts"],
2384
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: [],
2385
3009
  },
2386
3010
  {
2387
3011
  code: "wrong_item_type",
@@ -2392,7 +3016,9 @@ export const PM_ERROR_CODE_CATALOG = definePmErrorCodeCatalog([
2392
3016
  recovery: "Inspect the structured error guidance and retry the suggested command.",
2393
3017
  sources: ["sdk/lifecycle/plan.ts"],
2394
3018
  emitting_commands: ["plan"],
3019
+ canonical_code: "wrong_item_type",
3020
+ aliases: [],
2395
3021
  },
2396
3022
  ]);
2397
3023
  //# sourceMappingURL=generated-error-code-catalog.js.map
2398
- //# debugId=93c784d2-8f0f-5bf4-875e-3d83a675c9eb
3024
+ //# debugId=8a086b83-e46b-5694-be66-9114b0d87e12