@peac/kernel 0.12.0-preview.1 → 0.12.0

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.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * AUTO-GENERATED from specs/kernel/errors.json
5
5
  * DO NOT EDIT MANUALLY - run: npx tsx scripts/codegen-errors.ts
6
- * Spec version: 0.12.0-preview.1
6
+ * Spec version: 0.12.0
7
7
  */
8
8
  /**
9
9
  * Canonical error categories derived from specs/kernel/errors.json.
package/dist/errors.cjs CHANGED
@@ -115,6 +115,10 @@ var ERROR_CODES = {
115
115
  E_UCP_VERIFICATION_FAILED: "E_UCP_VERIFICATION_FAILED",
116
116
  // Validation error codes
117
117
  E_CONSTRAINT_VIOLATION: "E_CONSTRAINT_VIOLATION",
118
+ E_EAT_INVALID_CBOR: "E_EAT_INVALID_CBOR",
119
+ E_EAT_INVALID_COSE: "E_EAT_INVALID_COSE",
120
+ E_EAT_SIZE_EXCEEDED: "E_EAT_SIZE_EXCEEDED",
121
+ E_EAT_UNSUPPORTED_ALG: "E_EAT_UNSUPPORTED_ALG",
118
122
  E_EVIDENCE_NOT_JSON: "E_EVIDENCE_NOT_JSON",
119
123
  E_EXPIRED: "E_EXPIRED",
120
124
  E_INVALID_AMOUNT: "E_INVALID_AMOUNT",
@@ -142,6 +146,7 @@ var ERROR_CODES = {
142
146
  E_UNSUPPORTED_WIRE_VERSION: "E_UNSUPPORTED_WIRE_VERSION",
143
147
  E_WIRE_VERSION_MISMATCH: "E_WIRE_VERSION_MISMATCH",
144
148
  // Verification error codes
149
+ E_EAT_SIGNATURE_FAILED: "E_EAT_SIGNATURE_FAILED",
145
150
  E_INVALID_SIGNATURE: "E_INVALID_SIGNATURE",
146
151
  E_KEY_NOT_FOUND: "E_KEY_NOT_FOUND",
147
152
  E_KID_REUSE_DETECTED: "E_KID_REUSE_DETECTED",
@@ -1118,6 +1123,42 @@ var ERRORS = {
1118
1123
  next_action: "retry_with_different_input",
1119
1124
  category: "validation"
1120
1125
  },
1126
+ E_EAT_INVALID_CBOR: {
1127
+ code: "E_EAT_INVALID_CBOR",
1128
+ http_status: 400,
1129
+ title: "EAT Invalid CBOR",
1130
+ description: "EAT token is not valid CBOR or the payload is not a CBOR map",
1131
+ retryable: false,
1132
+ next_action: "abort",
1133
+ category: "validation"
1134
+ },
1135
+ E_EAT_INVALID_COSE: {
1136
+ code: "E_EAT_INVALID_COSE",
1137
+ http_status: 400,
1138
+ title: "EAT Invalid COSE",
1139
+ description: "EAT token is not a valid COSE_Sign1 structure per RFC 9052 Section 4.2",
1140
+ retryable: false,
1141
+ next_action: "abort",
1142
+ category: "validation"
1143
+ },
1144
+ E_EAT_SIZE_EXCEEDED: {
1145
+ code: "E_EAT_SIZE_EXCEEDED",
1146
+ http_status: 400,
1147
+ title: "EAT Size Exceeded",
1148
+ description: "EAT token exceeds the 64 KB size limit enforced before CBOR decode",
1149
+ retryable: false,
1150
+ next_action: "abort",
1151
+ category: "validation"
1152
+ },
1153
+ E_EAT_UNSUPPORTED_ALG: {
1154
+ code: "E_EAT_UNSUPPORTED_ALG",
1155
+ http_status: 400,
1156
+ title: "EAT Unsupported Algorithm",
1157
+ description: "COSE_Sign1 uses an unsupported algorithm; only EdDSA (alg: -8) is supported",
1158
+ retryable: false,
1159
+ next_action: "abort",
1160
+ category: "validation"
1161
+ },
1121
1162
  E_EVIDENCE_NOT_JSON: {
1122
1163
  code: "E_EVIDENCE_NOT_JSON",
1123
1164
  http_status: 400,
@@ -1353,6 +1394,15 @@ var ERRORS = {
1353
1394
  category: "validation"
1354
1395
  },
1355
1396
  // Verification error codes
1397
+ E_EAT_SIGNATURE_FAILED: {
1398
+ code: "E_EAT_SIGNATURE_FAILED",
1399
+ http_status: 400,
1400
+ title: "EAT Signature Failed",
1401
+ description: "COSE_Sign1 Ed25519 signature verification failed over the Sig_structure",
1402
+ retryable: false,
1403
+ next_action: "retry_with_different_key",
1404
+ category: "verification"
1405
+ },
1356
1406
  E_INVALID_SIGNATURE: {
1357
1407
  code: "E_INVALID_SIGNATURE",
1358
1408
  http_status: 400,