@suveren/gateway 0.4.1 → 0.6.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.
Files changed (137) hide show
  1. package/bin/suveren-gateway.js +86 -5
  2. package/content/integrations/calendar.json +116 -22
  3. package/content/integrations/deploy-github.json +164 -0
  4. package/content/integrations/gmail.json +13 -4
  5. package/content/integrations/index.json +2 -1
  6. package/dist/control-plane/index.mjs +84 -7
  7. package/dist/mcp-server/http.mjs +147 -21
  8. package/dist/ui/assets/index-DecSrutK.js +105 -0
  9. package/dist/ui/index.html +1 -1
  10. package/node_modules/@hap/core/dist/index.d.mts +21 -0
  11. package/node_modules/@hap/core/dist/index.d.ts +21 -0
  12. package/node_modules/@hap/core/dist/index.js +17 -0
  13. package/node_modules/@hap/core/dist/index.mjs +17 -0
  14. package/node_modules/@hap/core/package.json +1 -1
  15. package/node_modules/@hap/core/src/gatekeeper.ts +28 -0
  16. package/node_modules/@hap/core/src/types.ts +21 -0
  17. package/node_modules/fast-uri/index.js +37 -1
  18. package/node_modules/fast-uri/package.json +1 -1
  19. package/node_modules/fast-uri/test/security.test.js +136 -0
  20. package/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
  21. package/node_modules/hono/dist/cjs/jsx/base.js +1 -9
  22. package/node_modules/hono/dist/cjs/jsx/hooks/index.js +14 -11
  23. package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
  24. package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
  25. package/node_modules/hono/dist/cjs/utils/cookie.js +2 -1
  26. package/node_modules/hono/dist/helper/proxy/index.js +4 -0
  27. package/node_modules/hono/dist/jsx/base.js +1 -9
  28. package/node_modules/hono/dist/jsx/hooks/index.js +14 -11
  29. package/node_modules/hono/dist/middleware/cors/index.js +1 -1
  30. package/node_modules/hono/dist/middleware/language/language.js +10 -6
  31. package/node_modules/hono/dist/utils/cookie.js +2 -1
  32. package/node_modules/hono/package.json +2 -3
  33. package/node_modules/ip-address/README.md +142 -128
  34. package/node_modules/ip-address/dist/common.d.ts +6 -0
  35. package/node_modules/ip-address/dist/common.js +17 -1
  36. package/node_modules/ip-address/dist/common.js.map +1 -1
  37. package/node_modules/ip-address/dist/ipv4.js +3 -12
  38. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  39. package/node_modules/ip-address/dist/ipv6.d.ts +9 -2
  40. package/node_modules/ip-address/dist/ipv6.js +35 -16
  41. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  42. package/node_modules/ip-address/package.json +5 -3
  43. package/node_modules/jose/README.md +13 -13
  44. package/node_modules/jose/dist/types/index.d.ts +6 -5
  45. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
  46. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
  47. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
  48. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
  49. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
  50. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
  51. package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
  52. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
  53. package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
  54. package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
  55. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
  56. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
  57. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
  58. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
  59. package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
  60. package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
  61. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
  62. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
  63. package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
  64. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
  65. package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
  66. package/node_modules/jose/dist/types/key/export.d.ts +0 -14
  67. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
  68. package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
  69. package/node_modules/jose/dist/types/key/import.d.ts +18 -28
  70. package/node_modules/jose/dist/types/types.d.ts +239 -222
  71. package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
  72. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
  73. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
  74. package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
  75. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +4 -22
  76. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
  77. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
  78. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +15 -3
  79. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +65 -81
  80. package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
  81. package/node_modules/jose/dist/webapi/jwks/local.js +31 -72
  82. package/node_modules/jose/dist/webapi/jwks/remote.js +19 -28
  83. package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
  84. package/node_modules/jose/dist/webapi/jws/compact/verify.js +4 -16
  85. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -65
  86. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
  87. package/node_modules/jose/dist/webapi/jws/general/sign.js +19 -15
  88. package/node_modules/jose/dist/webapi/jws/general/verify.js +29 -9
  89. package/node_modules/jose/dist/webapi/jwt/decrypt.js +5 -5
  90. package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
  91. package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
  92. package/node_modules/jose/dist/webapi/jwt/verify.js +6 -6
  93. package/node_modules/jose/dist/webapi/key/export.js +37 -4
  94. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +33 -82
  95. package/node_modules/jose/dist/webapi/key/import.js +8 -8
  96. package/node_modules/jose/dist/webapi/lib/asn1.js +53 -122
  97. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
  98. package/node_modules/jose/dist/webapi/lib/content_encryption.js +34 -109
  99. package/node_modules/jose/dist/webapi/lib/crypto_key.js +18 -126
  100. package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
  101. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
  102. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +116 -0
  103. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +186 -0
  104. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +110 -0
  105. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +8 -98
  106. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +76 -0
  107. package/node_modules/jose/dist/webapi/lib/jws_sign.js +74 -0
  108. package/node_modules/jose/dist/webapi/lib/jws_verify.js +107 -0
  109. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +68 -109
  110. package/node_modules/jose/dist/webapi/lib/key.js +132 -0
  111. package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
  112. package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
  113. package/node_modules/jose/dist/webapi/lib/key_management.js +162 -92
  114. package/node_modules/jose/dist/webapi/lib/options.js +48 -0
  115. package/node_modules/jose/dist/webapi/lib/signing.js +14 -56
  116. package/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
  117. package/node_modules/jose/dist/webapi/util/base64url.js +13 -4
  118. package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
  119. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
  120. package/node_modules/jose/dist/webapi/util/errors.js +1 -1
  121. package/node_modules/jose/package.json +2 -4
  122. package/package.json +2 -2
  123. package/profiles/deploy/0.6.profile.json +168 -0
  124. package/profiles/deploy/0.7.profile.json +168 -0
  125. package/profiles/email/0.4.profile.json +9 -2
  126. package/profiles/index.json +3 -1
  127. package/dist/ui/assets/index-Cog54HOo.js +0 -105
  128. package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
  129. package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
  130. package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
  131. package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
  132. package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -34
  133. package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
  134. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
  135. package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
  136. package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
  137. package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
@@ -1,9 +1,16 @@
1
+ import type * as types from '../types.d.ts';
1
2
  /**
2
- * Cryptographic key import functions
3
- *
4
- * @module
3
+ * Resolves what {@link importJWK} returns for a given JWK type. The "kty" (Key Type) Parameter fully
4
+ * determines the outcome at runtime: `"oct"` yields a {@link !Uint8Array} secret, every other
5
+ * supported key type yields a {@link types.CryptoKey CryptoKey}. When "kty" is not statically known
6
+ * — the usual case for a JWK parsed from JSON, or for a value typed as {@link types.JWK JWK} — this
7
+ * resolves to their union.
5
8
  */
6
- import type * as types from '../types.d.ts';
9
+ export type ImportedJWK<JWKType extends types.JWK> = JWKType extends {
10
+ kty: 'oct';
11
+ } ? Uint8Array : JWKType extends {
12
+ kty: 'AKP' | 'EC' | 'OKP' | 'RSA';
13
+ } ? types.CryptoKey : types.CryptoKey | Uint8Array;
7
14
  /** Key Import Function options. */
8
15
  export interface KeyImportOptions {
9
16
  /**
@@ -15,14 +22,10 @@ export interface KeyImportOptions {
15
22
  /**
16
23
  * Imports a PEM-encoded SPKI string as a {@link !CryptoKey}.
17
24
  *
18
- * > [!NOTE]\
19
- * > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
25
+ * > Note: The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
20
26
  * > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
21
27
  * > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
22
28
  *
23
- * This function is exported (as a named export) from the main `'jose'` module entry point as well
24
- * as from its subpath export `'jose/key/import'`.
25
- *
26
29
  * @param spki PEM-encoded SPKI string
27
30
  * @param alg JSON Web Algorithm identifier to be used with the imported key. See
28
31
  * {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
@@ -31,14 +34,10 @@ export declare function importSPKI(spki: string, alg: string, options?: KeyImpor
31
34
  /**
32
35
  * Imports the SPKI from an X.509 string certificate as a {@link !CryptoKey}.
33
36
  *
34
- * > [!NOTE]\
35
- * > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
37
+ * > Note: The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
36
38
  * > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
37
39
  * > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
38
40
  *
39
- * This function is exported (as a named export) from the main `'jose'` module entry point as well
40
- * as from its subpath export `'jose/key/import'`.
41
- *
42
41
  * @param x509 X.509 certificate string
43
42
  * @param alg JSON Web Algorithm identifier to be used with the imported key. See
44
43
  * {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
@@ -47,14 +46,10 @@ export declare function importX509(x509: string, alg: string, options?: KeyImpor
47
46
  /**
48
47
  * Imports a PEM-encoded PKCS#8 string as a {@link !CryptoKey}.
49
48
  *
50
- * > [!NOTE]\
51
- * > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
49
+ * > Note: The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
52
50
  * > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
53
51
  * > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
54
52
  *
55
- * This function is exported (as a named export) from the main `'jose'` module entry point as well
56
- * as from its subpath export `'jose/key/import'`.
57
- *
58
53
  * @param pkcs8 PEM-encoded PKCS#8 string
59
54
  * @param alg JSON Web Algorithm identifier to be used with the imported key. See
60
55
  * {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
@@ -64,20 +59,15 @@ export declare function importPKCS8(pkcs8: string, alg: string, options?: KeyImp
64
59
  * Imports a JWK to a {@link !CryptoKey}. Either the JWK "alg" (Algorithm) Parameter, or the optional
65
60
  * "alg" argument, must be present for asymmetric JSON Web Key imports.
66
61
  *
67
- * > [!NOTE]\
68
- * > The JSON Web Key parameters "use", "key_ops", and "ext" are also used in the {@link !CryptoKey}
69
- * > import process.
62
+ * > Note: The JSON Web Key parameters "key_ops" and "ext" are also used in the {@link !CryptoKey} import
63
+ * > process.
70
64
  *
71
- * > [!NOTE]\
72
- * > Symmetric JSON Web Keys (i.e. `kty: "oct"`) yield back an {@link !Uint8Array} instead of a
65
+ * > Note: Symmetric JSON Web Keys (i.e. `kty: "oct"`) yield back an {@link !Uint8Array} instead of a
73
66
  * > {@link !CryptoKey}.
74
67
  *
75
- * This function is exported (as a named export) from the main `'jose'` module entry point as well
76
- * as from its subpath export `'jose/key/import'`.
77
- *
78
68
  * @param jwk JSON Web Key.
79
69
  * @param alg JSON Web Algorithm identifier to be used with the imported key. Default is the "alg"
80
70
  * property on the JWK. See
81
71
  * {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
82
72
  */
83
- export declare function importJWK(jwk: types.JWK, alg?: string, options?: KeyImportOptions): Promise<types.CryptoKey | Uint8Array>;
73
+ export declare function importJWK<JWKType extends types.JWK>(jwk: JWKType, alg?: string, options?: KeyImportOptions): Promise<ImportedJWK<JWKType>>;