@peac/kernel 0.12.0-preview.1 → 0.12.0-preview.2

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.
package/dist/errors.mjs CHANGED
@@ -113,6 +113,10 @@ var ERROR_CODES = {
113
113
  E_UCP_VERIFICATION_FAILED: "E_UCP_VERIFICATION_FAILED",
114
114
  // Validation error codes
115
115
  E_CONSTRAINT_VIOLATION: "E_CONSTRAINT_VIOLATION",
116
+ E_EAT_INVALID_CBOR: "E_EAT_INVALID_CBOR",
117
+ E_EAT_INVALID_COSE: "E_EAT_INVALID_COSE",
118
+ E_EAT_SIZE_EXCEEDED: "E_EAT_SIZE_EXCEEDED",
119
+ E_EAT_UNSUPPORTED_ALG: "E_EAT_UNSUPPORTED_ALG",
116
120
  E_EVIDENCE_NOT_JSON: "E_EVIDENCE_NOT_JSON",
117
121
  E_EXPIRED: "E_EXPIRED",
118
122
  E_INVALID_AMOUNT: "E_INVALID_AMOUNT",
@@ -140,6 +144,7 @@ var ERROR_CODES = {
140
144
  E_UNSUPPORTED_WIRE_VERSION: "E_UNSUPPORTED_WIRE_VERSION",
141
145
  E_WIRE_VERSION_MISMATCH: "E_WIRE_VERSION_MISMATCH",
142
146
  // Verification error codes
147
+ E_EAT_SIGNATURE_FAILED: "E_EAT_SIGNATURE_FAILED",
143
148
  E_INVALID_SIGNATURE: "E_INVALID_SIGNATURE",
144
149
  E_KEY_NOT_FOUND: "E_KEY_NOT_FOUND",
145
150
  E_KID_REUSE_DETECTED: "E_KID_REUSE_DETECTED",
@@ -1116,6 +1121,42 @@ var ERRORS = {
1116
1121
  next_action: "retry_with_different_input",
1117
1122
  category: "validation"
1118
1123
  },
1124
+ E_EAT_INVALID_CBOR: {
1125
+ code: "E_EAT_INVALID_CBOR",
1126
+ http_status: 400,
1127
+ title: "EAT Invalid CBOR",
1128
+ description: "EAT token is not valid CBOR or the payload is not a CBOR map",
1129
+ retryable: false,
1130
+ next_action: "abort",
1131
+ category: "validation"
1132
+ },
1133
+ E_EAT_INVALID_COSE: {
1134
+ code: "E_EAT_INVALID_COSE",
1135
+ http_status: 400,
1136
+ title: "EAT Invalid COSE",
1137
+ description: "EAT token is not a valid COSE_Sign1 structure per RFC 9052 Section 4.2",
1138
+ retryable: false,
1139
+ next_action: "abort",
1140
+ category: "validation"
1141
+ },
1142
+ E_EAT_SIZE_EXCEEDED: {
1143
+ code: "E_EAT_SIZE_EXCEEDED",
1144
+ http_status: 400,
1145
+ title: "EAT Size Exceeded",
1146
+ description: "EAT token exceeds the 64 KB size limit enforced before CBOR decode",
1147
+ retryable: false,
1148
+ next_action: "abort",
1149
+ category: "validation"
1150
+ },
1151
+ E_EAT_UNSUPPORTED_ALG: {
1152
+ code: "E_EAT_UNSUPPORTED_ALG",
1153
+ http_status: 400,
1154
+ title: "EAT Unsupported Algorithm",
1155
+ description: "COSE_Sign1 uses an unsupported algorithm; only EdDSA (alg: -8) is supported",
1156
+ retryable: false,
1157
+ next_action: "abort",
1158
+ category: "validation"
1159
+ },
1119
1160
  E_EVIDENCE_NOT_JSON: {
1120
1161
  code: "E_EVIDENCE_NOT_JSON",
1121
1162
  http_status: 400,
@@ -1351,6 +1392,15 @@ var ERRORS = {
1351
1392
  category: "validation"
1352
1393
  },
1353
1394
  // Verification error codes
1395
+ E_EAT_SIGNATURE_FAILED: {
1396
+ code: "E_EAT_SIGNATURE_FAILED",
1397
+ http_status: 400,
1398
+ title: "EAT Signature Failed",
1399
+ description: "COSE_Sign1 Ed25519 signature verification failed over the Sig_structure",
1400
+ retryable: false,
1401
+ next_action: "retry_with_different_key",
1402
+ category: "verification"
1403
+ },
1354
1404
  E_INVALID_SIGNATURE: {
1355
1405
  code: "E_INVALID_SIGNATURE",
1356
1406
  http_status: 400,