@suveren/gateway 0.4.0 → 0.5.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.
- package/bin/suveren-gateway.js +59 -0
- package/content/integrations/calendar.json +116 -22
- package/content/integrations/gmail.json +3 -0
- package/dist/control-plane/index.mjs +67 -7
- package/dist/mcp-server/http.mjs +98 -17
- package/dist/ui/assets/index-DedRWpBs.js +105 -0
- package/dist/ui/index.html +1 -1
- package/lib/autostart-templates.d.mts +37 -0
- package/lib/autostart-templates.mjs +208 -0
- package/node_modules/jose/README.md +13 -13
- package/node_modules/jose/dist/types/index.d.ts +6 -5
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
- package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
- package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
- package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
- package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
- package/node_modules/jose/dist/types/key/export.d.ts +0 -14
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
- package/node_modules/jose/dist/types/key/import.d.ts +18 -28
- package/node_modules/jose/dist/types/types.d.ts +242 -223
- package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
- package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +3 -21
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +15 -3
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -48
- package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
- package/node_modules/jose/dist/webapi/jwks/local.js +27 -47
- package/node_modules/jose/dist/webapi/jwks/remote.js +3 -3
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +3 -15
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -57
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
- package/node_modules/jose/dist/webapi/jws/general/sign.js +18 -5
- package/node_modules/jose/dist/webapi/jws/general/verify.js +21 -3
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +4 -4
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
- package/node_modules/jose/dist/webapi/jwt/verify.js +5 -5
- package/node_modules/jose/dist/webapi/key/export.js +34 -1
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +32 -82
- package/node_modules/jose/dist/webapi/key/import.js +8 -8
- package/node_modules/jose/dist/webapi/lib/asn1.js +29 -65
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +20 -77
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +13 -127
- package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +143 -0
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +181 -0
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +109 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +11 -96
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +74 -0
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +68 -0
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +108 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +9 -8
- package/node_modules/jose/dist/webapi/lib/key.js +170 -0
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +16 -0
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
- package/node_modules/jose/dist/webapi/lib/key_management.js +186 -29
- package/node_modules/jose/dist/webapi/lib/{validate_crit.js → options.js} +18 -0
- package/node_modules/jose/dist/webapi/lib/signing.js +20 -52
- package/node_modules/jose/dist/webapi/util/base64url.js +11 -3
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
- package/node_modules/jose/dist/webapi/util/errors.js +1 -1
- package/node_modules/jose/package.json +2 -4
- package/package.json +2 -1
- package/profiles/email/0.4.profile.json +2 -1
- package/dist/ui/assets/index-BDQY7Z3H.js +0 -105
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
- package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -34
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
- package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { decoder } from '../lib/buffer_utils.js';
|
|
3
|
-
import { isObject } from '../lib/type_checks.js';
|
|
1
|
+
import { parseJoseHeader } from '../lib/helpers.js';
|
|
4
2
|
export function decodeProtectedHeader(token) {
|
|
5
3
|
let protectedB64u;
|
|
6
4
|
if (typeof token === 'string') {
|
|
@@ -18,17 +16,9 @@ export function decodeProtectedHeader(token) {
|
|
|
18
16
|
throw new TypeError('Token does not contain a Protected Header');
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const result = JSON.parse(decoder.decode(b64u(protectedB64u)));
|
|
26
|
-
if (!isObject(result)) {
|
|
27
|
-
throw new Error();
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
throw new TypeError('Invalid Token or Protected Header formatting');
|
|
19
|
+
const invalid = 'Invalid Token or Protected Header formatting';
|
|
20
|
+
if (typeof protectedB64u !== 'string' || !protectedB64u) {
|
|
21
|
+
throw new TypeError(invalid);
|
|
33
22
|
}
|
|
23
|
+
return parseJoseHeader(protectedB64u, TypeError, invalid);
|
|
34
24
|
}
|
|
@@ -76,7 +76,7 @@ export class JWKSNoMatchingKey extends JOSEError {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
export class JWKSMultipleMatchingKeys extends JOSEError {
|
|
79
|
-
[Symbol.asyncIterator];
|
|
79
|
+
[Symbol.asyncIterator] = async function* () { };
|
|
80
80
|
static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';
|
|
81
81
|
code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';
|
|
82
82
|
constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jose",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.5",
|
|
4
4
|
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"akp",
|
|
@@ -193,8 +193,6 @@
|
|
|
193
193
|
"!dist/**/*.bundle.js",
|
|
194
194
|
"!dist/**/*.umd.js",
|
|
195
195
|
"!dist/**/*.min.js",
|
|
196
|
-
"!dist/types/
|
|
197
|
-
"!dist/types/lib/*",
|
|
198
|
-
"!dist/deno/**/*"
|
|
196
|
+
"!dist/types/lib/**"
|
|
199
197
|
]
|
|
200
198
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suveren/gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Suveren gateway — local agent gateway built in compliance with the Human Agency Protocol (HAP). Runs the UI, control plane, and MCP server in one Node process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin",
|
|
15
|
+
"lib",
|
|
15
16
|
"dist",
|
|
16
17
|
"scripts",
|
|
17
18
|
"content",
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
"type": "number",
|
|
51
51
|
"required": false,
|
|
52
52
|
"displayName": "Max email age (days)",
|
|
53
|
-
"description": "Maximum age in days for email search",
|
|
53
|
+
"description": "Maximum age in days for email search. Enforced locally by the Gatekeeper, never by the Authority Server: reads carry no receipt, so no signed check ever reads this value. Set it on the integration instead, where it is live-editable. Kept in the schema as the fallback for grants issued before that setting existed.",
|
|
54
54
|
"unit": "days",
|
|
55
|
+
"enforcedBy": "gatekeeper",
|
|
55
56
|
"boundType": {
|
|
56
57
|
"kind": "per_transaction",
|
|
57
58
|
"of": "read_age_days"
|