@zuplo/cli 7.6.9 → 7.7.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/node_modules/@inquirer/checkbox/package.json +3 -3
- package/node_modules/@inquirer/confirm/dist/index.js +1 -1
- package/node_modules/@inquirer/confirm/package.json +3 -3
- package/node_modules/@inquirer/core/dist/lib/create-prompt.js +66 -47
- package/node_modules/@inquirer/core/package.json +2 -2
- package/node_modules/@inquirer/editor/package.json +3 -3
- package/node_modules/@inquirer/expand/package.json +3 -3
- package/node_modules/@inquirer/input/package.json +3 -3
- package/node_modules/@inquirer/number/package.json +3 -3
- package/node_modules/@inquirer/password/package.json +3 -3
- package/node_modules/@inquirer/rawlist/package.json +3 -3
- package/node_modules/@inquirer/search/package.json +3 -3
- package/node_modules/@inquirer/select/package.json +3 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/export.d.ts +6 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/import.d.ts +19 -18
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/types.d.ts +152 -247
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/errors.d.ts +29 -40
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/local.js +16 -10
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/export.js +12 -16
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/import.js +5 -9
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key.js +119 -59
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/base64url.js +5 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/export.d.ts +6 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/import.d.ts +19 -18
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/types.d.ts +152 -247
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/errors.d.ts +29 -40
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/local.js +16 -10
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/export.js +12 -16
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/import.js +5 -9
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key.js +119 -59
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/base64url.js +5 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.d.ts +14 -0
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/types.d.ts +1 -0
- package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/index.d.ts +1 -0
- package/node_modules/@posthog/core/dist/utils/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/index.js +26 -0
- package/node_modules/@posthog/core/dist/utils/index.mjs +1 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.d.ts +12 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.js +132 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.mjs +94 -0
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/featureFlagLocalEvaluation.ts +1 -1
- package/node_modules/@posthog/core/src/posthog-core.ts +14 -0
- package/node_modules/@posthog/core/src/types.ts +1 -0
- package/node_modules/@posthog/core/src/utils/index.ts +1 -0
- package/node_modules/@posthog/core/src/utils/otlp-any-value.spec.ts +1 -1
- package/node_modules/@posthog/core/src/utils/type-utils.ts +4 -4
- package/node_modules/@posthog/core/src/utils/webview-app-utils.spec.ts +118 -0
- package/node_modules/@posthog/core/src/utils/webview-app-utils.ts +49 -0
- package/node_modules/@posthog/types/dist/feature-flags.d.ts +1 -1
- package/node_modules/@posthog/types/dist/feature-flags.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/posthog-config.d.ts +7 -1
- package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/feature-flags.ts +1 -1
- package/node_modules/@posthog/types/src/posthog-config.ts +7 -1
- package/node_modules/@posthog/types/src/tree-shakeable.ts +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-Z3IKCP3N.js → chunk-R4PTES5B.js} +93 -93
- package/node_modules/@zuplo/runtime/out/esm/chunk-R4PTES5B.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +11 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/base64.js +0 -20
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/signing.js +0 -22
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/base64.js +0 -20
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/signing.js +0 -22
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
- package/node_modules/@zuplo/runtime/out/esm/chunk-Z3IKCP3N.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-Z3IKCP3N.js.LEGAL.txt → chunk-R4PTES5B.js.LEGAL.txt} +0 -0
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isKeyLike, isCryptoKey } from "./is_key_like.js";
|
|
3
|
-
import { isObject } from "./type_checks.js";
|
|
1
|
+
import { isObject } from "./validate.js";
|
|
4
2
|
import { decode } from "../util/base64url.js";
|
|
5
|
-
import {
|
|
6
|
-
import { normalizeJwk } from "./jwk_metadata.js";
|
|
3
|
+
import { JOSENotSupported } from "../util/errors.js";
|
|
7
4
|
const tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage) => {
|
|
8
5
|
const { alg } = entry;
|
|
9
6
|
if (key.use !== void 0) {
|
|
@@ -19,35 +16,44 @@ const tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage)
|
|
|
19
16
|
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`);
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
|
-
function
|
|
19
|
+
async function prepareKey(entry, key, usage) {
|
|
23
20
|
const { alg, secret } = entry, privateKey = usage === "decrypt" || usage === "sign";
|
|
24
21
|
if (secret && key instanceof Uint8Array)
|
|
25
|
-
return
|
|
22
|
+
return key;
|
|
23
|
+
let normalized, keyObject;
|
|
26
24
|
if (isObject(key)) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
throw new TypeError(secret ? invalidKeyInput(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array") : invalidKeyInput(alg, key, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
25
|
+
if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
|
|
26
|
+
throw invalidKeyType(alg, key, secret);
|
|
30
27
|
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (privateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0)))
|
|
31
28
|
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${privateKey ? "private" : "public"} JWK`);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (key.type !== "secret")
|
|
38
|
-
throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`);
|
|
39
|
-
} else {
|
|
40
|
-
if (key.type === "secret")
|
|
41
|
-
throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
42
|
-
const expectedType = privateKey ? "private" : "public";
|
|
43
|
-
if ((key.type === "public" || key.type === "private") && key.type !== expectedType) {
|
|
44
|
-
const operation = usage === "sign" ? "signing" : usage === "verify" ? "verifying" : `${usage.slice(0, -1)}tion`;
|
|
45
|
-
throw new TypeError(`${tag(key)} instances for asymmetric algorithm ${operation} must be of type "${expectedType}"`);
|
|
29
|
+
if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
|
|
30
|
+
return decode(normalized.k);
|
|
31
|
+
if (!Object.isFrozen(key)) {
|
|
32
|
+
const { key_ops } = key;
|
|
33
|
+
Array.isArray(key_ops) && Object.freeze(key_ops), Object.freeze(key);
|
|
46
34
|
}
|
|
35
|
+
} else {
|
|
36
|
+
if (!isKeyLike(key))
|
|
37
|
+
throw invalidKeyType(alg, key, secret);
|
|
38
|
+
const expectedType = secret ? "secret" : privateKey ? "private" : "public";
|
|
39
|
+
if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
|
|
40
|
+
throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
|
|
41
|
+
if (isCryptoKey(key))
|
|
42
|
+
return key;
|
|
43
|
+
if (keyObject = key, keyObject.type === "secret")
|
|
44
|
+
return keyObject.export();
|
|
45
|
+
}
|
|
46
|
+
cache ||= /* @__PURE__ */ new WeakMap();
|
|
47
|
+
const cacheKey = key;
|
|
48
|
+
let cached = cache.get(cacheKey);
|
|
49
|
+
if (cached?.[alg])
|
|
50
|
+
return cached[alg];
|
|
51
|
+
if (cached || cache.set(cacheKey, cached = {}), keyObject && typeof keyObject.toCryptoKey == "function") {
|
|
52
|
+
const isPublic = keyObject.type === "public", crv = nist[keyObject.asymmetricKeyDetails?.namedCurve], params = entry.resolve?.({ crv, asymmetricKeyType: keyObject.asymmetricKeyType }) ?? entry.subtle;
|
|
53
|
+
return cached[alg] = keyObject.toCryptoKey(params, isPublic, entry.usages[isPublic ? 0 : 1]);
|
|
47
54
|
}
|
|
48
|
-
return
|
|
55
|
+
return normalized ??= keyObject.export({ format: "jwk" }), normalized.alg = alg, cached[alg] = await jwkToKey(entry, normalized);
|
|
49
56
|
}
|
|
50
|
-
const BYTES = 0, CRYPTO = 1, KEYOBJECT = 2, JWK = 3;
|
|
51
57
|
let cache;
|
|
52
58
|
const nist = {
|
|
53
59
|
__proto__: null,
|
|
@@ -55,41 +61,95 @@ const nist = {
|
|
|
55
61
|
secp384r1: "P-384",
|
|
56
62
|
secp521r1: "P-521"
|
|
57
63
|
};
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return value && (entry ? entry[alg] = value : cache.set(key, { [alg]: value })), value ?? entry?.[alg];
|
|
64
|
+
function assertCryptoKey(key) {
|
|
65
|
+
if (!isCryptoKey(key))
|
|
66
|
+
throw new Error("CryptoKey instance expected");
|
|
62
67
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
async function prepareKey(entry, key, usage) {
|
|
71
|
-
const tagged = checkKeyType(entry, key, usage);
|
|
72
|
-
switch (tagged[0]) {
|
|
73
|
-
case BYTES:
|
|
74
|
-
case CRYPTO:
|
|
75
|
-
return tagged[1];
|
|
76
|
-
case JWK: {
|
|
77
|
-
const key2 = tagged[1], normalized = tagged[2];
|
|
78
|
-
if (normalized.kty === "oct")
|
|
79
|
-
return decode(normalized.k);
|
|
80
|
-
if (!Object.isFrozen(key2)) {
|
|
81
|
-
const { key_ops } = key2;
|
|
82
|
-
Array.isArray(key_ops) && Object.freeze(key_ops), Object.freeze(key2);
|
|
83
|
-
}
|
|
84
|
-
return handleJWK(key2, normalized, entry);
|
|
85
|
-
}
|
|
86
|
-
case KEYOBJECT: {
|
|
87
|
-
const keyObject = tagged[1];
|
|
88
|
-
return keyObject.type === "secret" ? keyObject.export() : "toCryptoKey" in keyObject && typeof keyObject.toCryptoKey == "function" ? handleKeyObject(keyObject, entry) : handleJWK(keyObject, keyObject.export({ format: "jwk" }), entry);
|
|
89
|
-
}
|
|
68
|
+
const isCryptoKey = (key) => {
|
|
69
|
+
if (key?.[Symbol.toStringTag] === "CryptoKey")
|
|
70
|
+
return !0;
|
|
71
|
+
try {
|
|
72
|
+
return key instanceof CryptoKey;
|
|
73
|
+
} catch {
|
|
74
|
+
return !1;
|
|
90
75
|
}
|
|
76
|
+
}, isKeyObject = (key) => key?.[Symbol.toStringTag] === "KeyObject", isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);
|
|
77
|
+
function message(msg, actual, ...types) {
|
|
78
|
+
if (types.length > 2) {
|
|
79
|
+
const last = types.pop();
|
|
80
|
+
msg += `one of type ${types.join(", ")}, or ${last}.`;
|
|
81
|
+
} else types.length === 2 ? msg += `one of type ${types[0]} or ${types[1]}.` : msg += `of type ${types[0]}.`;
|
|
82
|
+
return actual == null ? msg += ` Received ${actual}` : typeof actual == "function" && actual.name ? msg += ` Received function ${actual.name}` : typeof actual == "object" && actual != null && actual.constructor?.name && (msg += ` Received an instance of ${actual.constructor.name}`), msg;
|
|
83
|
+
}
|
|
84
|
+
const invalidKeyInput = (actual, ...types) => message("Key must be ", actual, ...types);
|
|
85
|
+
function invalidKeyType(alg, actual, secret) {
|
|
86
|
+
const types = ["CryptoKey", "KeyObject", "JSON Web Key"];
|
|
87
|
+
return secret && types.push("Uint8Array"), new TypeError(message(`Key for the ${alg} algorithm must be `, actual, ...types));
|
|
88
|
+
}
|
|
89
|
+
const unusable = (name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
|
|
90
|
+
function checkUsage(key, usage) {
|
|
91
|
+
if (usage && !key.usages.includes(usage))
|
|
92
|
+
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);
|
|
93
|
+
}
|
|
94
|
+
function checkModulusLength(alg, key) {
|
|
95
|
+
const { modulusLength } = key.algorithm;
|
|
96
|
+
if (typeof modulusLength != "number" || modulusLength < 2048)
|
|
97
|
+
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
|
98
|
+
}
|
|
99
|
+
function checkCryptoKey(key, expected, usage) {
|
|
100
|
+
const algorithm = key.algorithm;
|
|
101
|
+
if (algorithm.name !== expected.name)
|
|
102
|
+
throw unusable(expected.name);
|
|
103
|
+
if (expected.hash && algorithm.hash?.name !== expected.hash)
|
|
104
|
+
throw unusable(expected.hash, "algorithm.hash");
|
|
105
|
+
if (expected.namedCurve && algorithm.namedCurve !== expected.namedCurve)
|
|
106
|
+
throw unusable(expected.namedCurve, "algorithm.namedCurve");
|
|
107
|
+
if (expected.length !== void 0 && algorithm.length !== expected.length)
|
|
108
|
+
throw unusable(expected.length, "algorithm.length");
|
|
109
|
+
checkUsage(key, usage);
|
|
110
|
+
}
|
|
111
|
+
function snapshotJwk(jwk) {
|
|
112
|
+
return { __proto__: null, ...jwk };
|
|
113
|
+
}
|
|
114
|
+
function normalizeJwk(jwk) {
|
|
115
|
+
const normalized = snapshotJwk(jwk);
|
|
116
|
+
if (normalized.ext !== void 0 && typeof normalized.ext != "boolean")
|
|
117
|
+
throw new TypeError('"ext" (Extractable) Parameter must be a boolean');
|
|
118
|
+
if (normalized.key_ops !== void 0) {
|
|
119
|
+
const value = normalized.key_ops, keyOps = Array.isArray(value) ? [...value] : void 0;
|
|
120
|
+
if (!keyOps || keyOps.some((operation) => typeof operation != "string") || new Set(keyOps).size !== keyOps.length)
|
|
121
|
+
throw new TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');
|
|
122
|
+
normalized.key_ops = keyOps;
|
|
123
|
+
}
|
|
124
|
+
return normalized;
|
|
125
|
+
}
|
|
126
|
+
function validateExtractableOption(extractable) {
|
|
127
|
+
if (extractable !== void 0 && typeof extractable != "boolean")
|
|
128
|
+
throw new TypeError('"extractable" option must be a boolean');
|
|
129
|
+
return extractable;
|
|
130
|
+
}
|
|
131
|
+
async function jwkToKey(entry, jwk, extractable) {
|
|
132
|
+
if (!entry.kty.includes(jwk.kty))
|
|
133
|
+
throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
134
|
+
const algorithm = entry.resolve?.({ kty: jwk.kty, crv: jwk.crv }) ?? entry.subtle, isPrivate = !!(jwk.d || jwk.priv), keyData = { ...jwk, ext: extractable ?? jwk.ext };
|
|
135
|
+
return keyData.kty !== "AKP" && delete keyData.alg, delete keyData.use, crypto.subtle.importKey("jwk", keyData, algorithm, keyData.ext ?? !isPrivate, jwk.key_ops ?? entry.usages[isPrivate ? 1 : 0]);
|
|
136
|
+
}
|
|
137
|
+
async function rawKey(key, expected, usage, extractable = !1) {
|
|
138
|
+
return key instanceof Uint8Array && (key = await crypto.subtle.importKey("raw", key, expected, extractable, [usage])), checkCryptoKey(key, expected, usage), key;
|
|
91
139
|
}
|
|
92
140
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
141
|
+
assertCryptoKey,
|
|
142
|
+
checkCryptoKey,
|
|
143
|
+
checkModulusLength,
|
|
144
|
+
checkUsage,
|
|
145
|
+
invalidKeyInput,
|
|
146
|
+
isCryptoKey,
|
|
147
|
+
isKeyLike,
|
|
148
|
+
isKeyObject,
|
|
149
|
+
jwkToKey,
|
|
150
|
+
normalizeJwk,
|
|
151
|
+
prepareKey,
|
|
152
|
+
rawKey,
|
|
153
|
+
snapshotJwk,
|
|
154
|
+
validateExtractableOption
|
|
95
155
|
};
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_management.js
CHANGED
|
@@ -1,41 +1,26 @@
|
|
|
1
1
|
import { encode as b64u } from "../util/base64url.js";
|
|
2
|
-
import { prepareKey } from "./key.js";
|
|
3
|
-
import {
|
|
4
|
-
import { jweAlgorithm, jweEncryption } from "./jwe_algorithms.js";
|
|
2
|
+
import { prepareKey, rawKey, jwkToKey, checkCryptoKey, checkModulusLength, checkUsage, assertCryptoKey } from "./key.js";
|
|
3
|
+
import { jweAlgorithm, jweEncryption, isJWECEKTransport } from "./jwe_algorithms.js";
|
|
5
4
|
import { JOSENotSupported, JWEInvalid } from "../util/errors.js";
|
|
6
|
-
import { decodeBase64url,
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { checkCryptoKey, checkModulusLength, checkUsage } from "./crypto_key.js";
|
|
10
|
-
import { concat, encode, uint32be } from "./buffer_utils.js";
|
|
11
|
-
import { assertCryptoKey } from "./is_key_like.js";
|
|
5
|
+
import { decodeBase64url, assertUint8Array, isObject } from "./validate.js";
|
|
6
|
+
import { digest, concat, encode, uint32be } from "./buffer_utils.js";
|
|
7
|
+
import { checkCekLength, generateCek, encrypt, decrypt } from "./content_encryption.js";
|
|
12
8
|
function checkEcdhCryptoKey(key, usage) {
|
|
13
9
|
if (key.algorithm.name !== "ECDH" && key.algorithm.name !== "X25519")
|
|
14
10
|
throw new TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");
|
|
15
11
|
checkUsage(key, usage);
|
|
16
12
|
}
|
|
17
|
-
async function aeskwCryptoKey(key, alg, usage) {
|
|
18
|
-
const expected = jweAlgorithm(alg).subtle, cryptoKey = key instanceof Uint8Array ? await crypto.subtle.importKey("raw", key, "AES-KW", !0, [
|
|
19
|
-
usage
|
|
20
|
-
]) : key;
|
|
21
|
-
return checkCryptoKey(cryptoKey, expected, usage), cryptoKey;
|
|
22
|
-
}
|
|
23
13
|
async function aeskwWrap(alg, key, cek) {
|
|
24
|
-
const cryptoKey = await
|
|
14
|
+
const cryptoKey = await rawKey(key, jweAlgorithm(alg).subtle, "wrapKey", !0), cryptoKeyCek = await crypto.subtle.importKey("raw", cek, { hash: "SHA-256", name: "HMAC" }, !0, ["sign"]);
|
|
25
15
|
return new Uint8Array(await crypto.subtle.wrapKey("raw", cryptoKeyCek, cryptoKey, "AES-KW"));
|
|
26
16
|
}
|
|
27
17
|
async function aeskwUnwrap(alg, key, encryptedKey) {
|
|
28
|
-
const cryptoKey = await
|
|
18
|
+
const cryptoKey = await rawKey(key, jweAlgorithm(alg).subtle, "unwrapKey", !0), cryptoKeyCek = await crypto.subtle.unwrapKey("raw", encryptedKey, cryptoKey, "AES-KW", { hash: "SHA-256", name: "HMAC" }, !0, ["sign"]);
|
|
29
19
|
return new Uint8Array(await crypto.subtle.exportKey("raw", cryptoKeyCek));
|
|
30
20
|
}
|
|
31
21
|
function checkRsaKey(alg, key, usage) {
|
|
32
22
|
checkCryptoKey(key, jweAlgorithm(alg).subtle, usage), checkModulusLength(alg, key);
|
|
33
23
|
}
|
|
34
|
-
function pbes2CryptoKey(key, alg) {
|
|
35
|
-
return key instanceof Uint8Array ? crypto.subtle.importKey("raw", key, "PBKDF2", !1, [
|
|
36
|
-
"deriveBits"
|
|
37
|
-
]) : (checkCryptoKey(key, jweAlgorithm(alg).subtle, "deriveBits"), key);
|
|
38
|
-
}
|
|
39
24
|
async function deriveKey(p2s, alg, p2c, key) {
|
|
40
25
|
if (!(p2s instanceof Uint8Array) || p2s.length < 8)
|
|
41
26
|
throw new JWEInvalid("PBES2 Salt Input must be 8 or more octets");
|
|
@@ -46,7 +31,7 @@ async function deriveKey(p2s, alg, p2c, key) {
|
|
|
46
31
|
iterations: p2c,
|
|
47
32
|
name: "PBKDF2",
|
|
48
33
|
salt
|
|
49
|
-
}, cryptoKey = await
|
|
34
|
+
}, cryptoKey = await rawKey(key, jweAlgorithm(alg).subtle, "deriveBits");
|
|
50
35
|
return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey, keylen));
|
|
51
36
|
}
|
|
52
37
|
function lengthAndInput(input) {
|
|
@@ -104,19 +89,11 @@ function validateMaxPBES2Count(value) {
|
|
|
104
89
|
}
|
|
105
90
|
async function decryptKeyManagement(entry, enc, key, encryptedKey, joseHeader, maxPBES2Count) {
|
|
106
91
|
const { alg } = entry, mode = entry.mode;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
case "key-wrapping":
|
|
112
|
-
case "key-encryption":
|
|
113
|
-
case "key-agreement-with-key-wrapping":
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
switch (entry.subtle.name) {
|
|
92
|
+
if (mode === "direct-encryption")
|
|
93
|
+
return assertNoEncryptedKey(encryptedKey), key;
|
|
94
|
+
const direct = mode === "direct-key-agreement";
|
|
95
|
+
switch (direct ? assertNoEncryptedKey(encryptedKey) : assertEncryptedKey(encryptedKey), entry.subtle.name) {
|
|
117
96
|
case "ECDH": {
|
|
118
|
-
const direct = mode === "direct-key-agreement";
|
|
119
|
-
direct && assertNoEncryptedKey(encryptedKey);
|
|
120
97
|
const { epk } = joseHeader;
|
|
121
98
|
if (!isObject(epk) || ["d", "k", "p", "q", "dp", "dq", "qi", "oth", "priv"].some((parameter) => Object.hasOwn(epk, parameter)))
|
|
122
99
|
throw new JWEInvalid('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');
|
|
@@ -124,12 +101,15 @@ async function decryptKeyManagement(entry, enc, key, encryptedKey, joseHeader, m
|
|
|
124
101
|
const ephemeralPublicKey = await jwkToKey(entry, epk), partyUInfo = partyInfo(joseHeader, "apu"), partyVInfo = partyInfo(joseHeader, "apv");
|
|
125
102
|
checkPartyInfo(partyUInfo, partyVInfo);
|
|
126
103
|
const sharedSecret = await ecdhesDeriveKey(ephemeralPublicKey, key, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
|
|
127
|
-
|
|
104
|
+
if (direct)
|
|
105
|
+
return sharedSecret;
|
|
106
|
+
key = sharedSecret;
|
|
107
|
+
break;
|
|
128
108
|
}
|
|
129
109
|
case "RSA-OAEP":
|
|
130
|
-
return
|
|
110
|
+
return assertCryptoKey(key), checkRsaKey(alg, key, "decrypt"), new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP", key, encryptedKey));
|
|
131
111
|
case "PBKDF2": {
|
|
132
|
-
if (
|
|
112
|
+
if (typeof joseHeader.p2c != "number")
|
|
133
113
|
throw new JWEInvalid('JOSE Header "p2c" (PBES2 Count) missing or invalid');
|
|
134
114
|
validateMaxPBES2Count(maxPBES2Count);
|
|
135
115
|
const p2cLimit = maxPBES2Count ?? 1e4;
|
|
@@ -137,39 +117,35 @@ async function decryptKeyManagement(entry, enc, key, encryptedKey, joseHeader, m
|
|
|
137
117
|
throw new JWEInvalid('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');
|
|
138
118
|
if (typeof joseHeader.p2s != "string")
|
|
139
119
|
throw new JWEInvalid('JOSE Header "p2s" (PBES2 Salt) missing or invalid');
|
|
140
|
-
const p2s = decodeBase64url(joseHeader.p2s, "p2s", JWEInvalid)
|
|
141
|
-
|
|
120
|
+
const p2s = decodeBase64url(joseHeader.p2s, "p2s", JWEInvalid);
|
|
121
|
+
key = await deriveKey(p2s, alg, joseHeader.p2c, key);
|
|
122
|
+
break;
|
|
142
123
|
}
|
|
143
|
-
case "AES-KW":
|
|
144
|
-
return assertEncryptedKey(encryptedKey), aeskwUnwrap(alg, key, encryptedKey);
|
|
145
124
|
case "AES-GCM": {
|
|
146
|
-
if (
|
|
125
|
+
if (typeof joseHeader.iv != "string")
|
|
147
126
|
throw new JWEInvalid('JOSE Header "iv" (Initialization Vector) missing or invalid');
|
|
148
127
|
if (typeof joseHeader.tag != "string")
|
|
149
128
|
throw new JWEInvalid('JOSE Header "tag" (Authentication Tag) missing or invalid');
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
let tag;
|
|
153
|
-
if (tag = decodeBase64url(joseHeader.tag, "tag", JWEInvalid), iv.byteLength !== 12)
|
|
129
|
+
const iv = decodeBase64url(joseHeader.iv, "iv", JWEInvalid), tag = decodeBase64url(joseHeader.tag, "tag", JWEInvalid);
|
|
130
|
+
if (iv.byteLength !== 12)
|
|
154
131
|
throw new JWEInvalid("Invalid Initialization Vector length");
|
|
155
132
|
if (tag.byteLength !== 16)
|
|
156
133
|
throw new JWEInvalid("Invalid Authentication Tag length");
|
|
157
134
|
return decrypt(jweEncryption(alg.slice(0, -2)), key, encryptedKey, iv, tag, new Uint8Array());
|
|
158
135
|
}
|
|
159
136
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const { alg } = entry,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
137
|
+
return aeskwUnwrap(alg.slice(-6), key, encryptedKey);
|
|
138
|
+
}
|
|
139
|
+
async function encryptKeyManagement(entry, enc, inputKey, joseHeader, providedCek, providedParameters = {}) {
|
|
140
|
+
const { alg, mode } = entry, transport = isJWECEKTransport(entry);
|
|
141
|
+
if (providedCek !== void 0 && !transport)
|
|
142
|
+
throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${alg}`);
|
|
143
|
+
let key = await prepareKey(mode === "direct-encryption" ? enc : entry, inputKey, "encrypt");
|
|
144
|
+
if (mode === "direct-encryption")
|
|
145
|
+
return [key, void 0, void 0];
|
|
146
|
+
const cek = transport ? providedCek ?? generateCek(enc) : void 0;
|
|
147
|
+
cek && checkCekLength(cek, enc.cekBits);
|
|
148
|
+
let encryptedKey, parameters;
|
|
173
149
|
switch (entry.subtle.name) {
|
|
174
150
|
case "ECDH": {
|
|
175
151
|
assertEcdhKey(key);
|
|
@@ -186,42 +162,31 @@ async function encryptKeyManagement(entry, enc, key, joseHeader, providedCek, pr
|
|
|
186
162
|
throw new TypeError('CryptoKey for "epk" must be extractable');
|
|
187
163
|
exportableEpk = await subtle.getPublicKey(ephemeralKey, []);
|
|
188
164
|
}
|
|
189
|
-
const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement", sharedSecret = await ecdhesDeriveKey(key, ephemeralKey, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), apu, apv);
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
cek = providedCek ?? generateCek(enc);
|
|
195
|
-
const kwAlg = alg.slice(-6);
|
|
196
|
-
encryptedKey = await aeskwWrap(kwAlg, sharedSecret, cek);
|
|
165
|
+
const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement", sharedSecret = await ecdhesDeriveKey(key, ephemeralKey, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), apu, apv), epk = { x, crv, kty };
|
|
166
|
+
if (kty === "EC" && (epk.y = y), parameters = { epk }, providedApu !== void 0 && (parameters.apu = b64u(providedApu)), providedApv !== void 0 && (parameters.apv = b64u(providedApv)), direct)
|
|
167
|
+
return [sharedSecret, void 0, parameters];
|
|
168
|
+
key = sharedSecret;
|
|
197
169
|
break;
|
|
198
170
|
}
|
|
199
171
|
case "RSA-OAEP": {
|
|
200
|
-
|
|
172
|
+
assertCryptoKey(key), checkRsaKey(alg, key, "encrypt"), encryptedKey = new Uint8Array(await crypto.subtle.encrypt("RSA-OAEP", key, cek));
|
|
201
173
|
break;
|
|
202
174
|
}
|
|
203
175
|
case "PBKDF2": {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
encryptedKey = await aeskwWrap(alg.slice(-6), derived, cek), parameters = { p2c, p2s: b64u(p2s) };
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
case "AES-KW": {
|
|
210
|
-
cek = providedCek ?? generateCek(enc), encryptedKey = await aeskwWrap(alg, key, cek);
|
|
176
|
+
const { p2c = 2048, p2s = crypto.getRandomValues(new Uint8Array(16)) } = providedParameters;
|
|
177
|
+
key = await deriveKey(p2s, alg, p2c, key), parameters = { p2c, p2s: b64u(p2s) };
|
|
211
178
|
break;
|
|
212
179
|
}
|
|
213
180
|
case "AES-GCM": {
|
|
214
|
-
cek = providedCek ?? generateCek(enc);
|
|
215
181
|
const iv = providedParameters.iv === void 0 ? crypto.getRandomValues(new Uint8Array(12)) : providedParameters.iv;
|
|
216
182
|
if (!(iv instanceof Uint8Array))
|
|
217
183
|
throw new TypeError('"iv" must be an instance of Uint8Array');
|
|
218
184
|
const wrapped = await encrypt(jweEncryption(alg.slice(0, -2)), cek, key, iv, new Uint8Array());
|
|
219
185
|
encryptedKey = wrapped.ciphertext, parameters = { iv: b64u(wrapped.iv), tag: b64u(wrapped.tag) };
|
|
220
|
-
break;
|
|
221
186
|
}
|
|
222
187
|
}
|
|
223
|
-
if (cek
|
|
224
|
-
throw new TypeError("
|
|
188
|
+
if (encryptedKey ??= await aeskwWrap(alg.slice(-6), key, cek), !(encryptedKey instanceof Uint8Array) || !encryptedKey.byteLength)
|
|
189
|
+
throw new TypeError("JWE key management algorithm did not produce an Encrypted Key");
|
|
225
190
|
return [cek, encryptedKey, parameters];
|
|
226
191
|
}
|
|
227
192
|
export {
|
|
@@ -1,11 +1,64 @@
|
|
|
1
1
|
import { JOSENotSupported, JWSInvalid } from "../util/errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { decode } from "../util/base64url.js";
|
|
3
|
+
import { encode, strictDecoder } from "./buffer_utils.js";
|
|
4
|
+
function assertUint8Array(input, label) {
|
|
5
|
+
if (!(input instanceof Uint8Array))
|
|
6
|
+
throw new TypeError(`${label} must be an instance of Uint8Array`);
|
|
7
|
+
}
|
|
8
|
+
function isObject(input) {
|
|
9
|
+
if (typeof input != "object" || input === null || Object.prototype.toString.call(input) !== "[object Object]")
|
|
10
|
+
return !1;
|
|
11
|
+
const prototype = Object.getPrototypeOf(input);
|
|
12
|
+
return prototype === null || Object.getPrototypeOf(prototype) === null;
|
|
13
|
+
}
|
|
14
|
+
function isJwkSet(input) {
|
|
15
|
+
return isObject(input) && Array.isArray(input.keys) && Array.from(input.keys).every(isObject);
|
|
16
|
+
}
|
|
17
|
+
function isDisjoint(...headers) {
|
|
18
|
+
const parameters = /* @__PURE__ */ new Set();
|
|
19
|
+
for (const header of headers)
|
|
20
|
+
if (header)
|
|
21
|
+
for (const parameter of Object.keys(header)) {
|
|
22
|
+
if (parameters.has(parameter))
|
|
23
|
+
return !1;
|
|
24
|
+
parameters.add(parameter);
|
|
25
|
+
}
|
|
26
|
+
return !0;
|
|
27
|
+
}
|
|
28
|
+
function assertNotSet(value, name) {
|
|
29
|
+
if (value !== void 0)
|
|
30
|
+
throw new TypeError(`${name} can only be called once`);
|
|
31
|
+
}
|
|
32
|
+
function decodeBase64url(value, label, ErrorClass) {
|
|
33
|
+
try {
|
|
34
|
+
return decode(value);
|
|
35
|
+
} catch {
|
|
36
|
+
throw new ErrorClass(`Failed to base64url decode the ${label}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function encodeBase64url(value, label, ErrorClass) {
|
|
40
|
+
try {
|
|
41
|
+
return encode(value);
|
|
42
|
+
} catch {
|
|
43
|
+
throw new ErrorClass(`The ${label} is not a valid base64url string`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function parseJoseHeader(b64, ErrorClass, message) {
|
|
47
|
+
let parsed;
|
|
48
|
+
try {
|
|
49
|
+
parsed = JSON.parse(strictDecoder.decode(decode(b64)));
|
|
50
|
+
} catch {
|
|
51
|
+
throw new ErrorClass(message);
|
|
52
|
+
}
|
|
53
|
+
if (!isObject(parsed))
|
|
54
|
+
throw new ErrorClass(message);
|
|
55
|
+
return parsed;
|
|
56
|
+
}
|
|
3
57
|
const JWS_RECOGNIZED = { __proto__: null, b64: !0 }, JWE_RECOGNIZED = { __proto__: null };
|
|
4
58
|
function validateAlgorithms(option, algorithms) {
|
|
5
59
|
if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s) => typeof s != "string")))
|
|
6
60
|
throw new TypeError(`"${option}" option must be an array of strings`);
|
|
7
|
-
|
|
8
|
-
return new Set(algorithms);
|
|
61
|
+
return algorithms === void 0 ? void 0 : new Set(algorithms);
|
|
9
62
|
}
|
|
10
63
|
function validateCritDuplicates(Err, protectedHeader) {
|
|
11
64
|
const { crit } = protectedHeader ?? {};
|
|
@@ -53,6 +106,14 @@ function serializeJoseHeader(Err, header) {
|
|
|
53
106
|
export {
|
|
54
107
|
JWE_RECOGNIZED,
|
|
55
108
|
JWS_RECOGNIZED,
|
|
109
|
+
assertNotSet,
|
|
110
|
+
assertUint8Array,
|
|
111
|
+
decodeBase64url,
|
|
112
|
+
encodeBase64url,
|
|
113
|
+
isDisjoint,
|
|
114
|
+
isJwkSet,
|
|
115
|
+
isObject,
|
|
116
|
+
parseJoseHeader,
|
|
56
117
|
serializeJoseHeader,
|
|
57
118
|
validateAlgorithms,
|
|
58
119
|
validateB64,
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/base64url.js
CHANGED
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import { encoder, decoder } from "../lib/buffer_utils.js";
|
|
2
|
-
import { encodeBase64, decodeBase64 } from "../lib/base64.js";
|
|
1
|
+
import { encoder, decoder, encodeBase64, decodeBase64 } from "../lib/buffer_utils.js";
|
|
3
2
|
const invalid = "The input to be decoded is not correctly encoded.";
|
|
4
3
|
function decode(input) {
|
|
5
|
-
if (Uint8Array.fromBase64)
|
|
6
|
-
try {
|
|
7
|
-
return Uint8Array.fromBase64(typeof input == "string" ? input : decoder.decode(input), {
|
|
8
|
-
alphabet: "base64url"
|
|
9
|
-
});
|
|
10
|
-
} catch (cause) {
|
|
11
|
-
throw new TypeError(invalid, { cause });
|
|
12
|
-
}
|
|
13
|
-
let encoded = input;
|
|
14
|
-
if (encoded instanceof Uint8Array && (encoded = decoder.decode(encoded)), encoded.includes("+") || encoded.includes("/"))
|
|
15
|
-
throw new TypeError(invalid);
|
|
16
|
-
encoded = encoded.replace(/-/g, "+").replace(/_/g, "/");
|
|
17
4
|
try {
|
|
18
|
-
return decodeBase64(
|
|
19
|
-
} catch {
|
|
20
|
-
throw new TypeError(invalid);
|
|
5
|
+
return decodeBase64(typeof input == "string" ? input : decoder.decode(input), !0);
|
|
6
|
+
} catch (cause) {
|
|
7
|
+
throw new TypeError(invalid, { cause });
|
|
21
8
|
}
|
|
22
9
|
}
|
|
23
10
|
function encode(input) {
|
|
24
|
-
|
|
25
|
-
return typeof unencoded == "string" && (unencoded = encoder.encode(unencoded)), Uint8Array.prototype.toBase64 ? unencoded.toBase64({ alphabet: "base64url", omitPadding: !0 }) : encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
11
|
+
return encodeBase64(typeof input == "string" ? encoder.encode(input) : input, !0);
|
|
26
12
|
}
|
|
27
13
|
export {
|
|
28
14
|
decode,
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/decode_jwt.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decode as b64u } from "./base64url.js";
|
|
2
2
|
import { strictDecoder } from "../lib/buffer_utils.js";
|
|
3
|
-
import { isObject } from "../lib/
|
|
3
|
+
import { isObject } from "../lib/validate.js";
|
|
4
4
|
import { JWTInvalid } from "./errors.js";
|
|
5
5
|
function decodeJwt(jwt) {
|
|
6
6
|
if (typeof jwt != "string")
|
|
@@ -136,6 +136,10 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
136
136
|
private setBootstrappedFeatureFlagDetails;
|
|
137
137
|
private getBootstrappedFeatureFlags;
|
|
138
138
|
private getBootstrappedFeatureFlagPayloads;
|
|
139
|
+
/**
|
|
140
|
+
* Returns the current evaluation result for a feature flag. `enabled: false` is a conclusive
|
|
141
|
+
* off result; `undefined` means no evaluation is available for the key.
|
|
142
|
+
*/
|
|
139
143
|
getFeatureFlagResult(key: string, options?: FeatureFlagResultOptions): FeatureFlagResult | undefined;
|
|
140
144
|
/**
|
|
141
145
|
* Returns all currently cached feature flags as `FeatureFlagResult`s. This is a synchronous read of
|
|
@@ -156,6 +160,11 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
156
160
|
*/
|
|
157
161
|
missingFlagBehavior?: 'getFeatureFlag' | 'getFeatureFlagPayload';
|
|
158
162
|
}): FeatureFlagResult | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Returns the current feature flag value. For backwards compatibility, a missing key can resolve
|
|
165
|
+
* to `false` once a non-empty flag response has been stored. Use `getFeatureFlagResult()` when
|
|
166
|
+
* code must distinguish a conclusive off result from an unavailable key.
|
|
167
|
+
*/
|
|
159
168
|
getFeatureFlag(key: string, options?: FeatureFlagResultOptions): FeatureFlagValue | undefined;
|
|
160
169
|
/**
|
|
161
170
|
* @deprecated Use `getFeatureFlagResult()` instead, which returns the flag value and payload from a single evaluation.
|
|
@@ -168,6 +177,11 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
168
177
|
flags: PostHogFlagsResponse['featureFlags'] | undefined;
|
|
169
178
|
payloads: PostHogFlagsResponse['featureFlagPayloads'] | undefined;
|
|
170
179
|
};
|
|
180
|
+
/**
|
|
181
|
+
* Returns whether the current feature flag value is enabled. When no evaluation is available,
|
|
182
|
+
* `defaultValue` is returned if provided; without one, the legacy missing-key behavior of
|
|
183
|
+
* `getFeatureFlag()` applies.
|
|
184
|
+
*/
|
|
171
185
|
isFeatureEnabled(key: string, options: IsFeatureEnabledOptions & {
|
|
172
186
|
defaultValue: boolean;
|
|
173
187
|
}): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog-core.d.ts","sourceRoot":"","sources":["../src/posthog-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EAGvB,yBAAyB,EAKzB,sBAAsB,EAGvB,MAAM,SAAS,CAAA;AAahB,OAAO,EAAiC,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACjF,OAAO,EAGL,oBAAoB,EAErB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,UAAU,iBAAiB;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAUD,8BAAsB,WAAY,SAAQ,oBAAoB;IAE5D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,yBAAyB,CAAS;IAC1C,OAAO,CAAC,gBAAgB,CAA2D;IACnF,OAAO,CAAC,WAAW,CAAC,CAA+B;IAGnD,SAAS,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAA;IAClF,SAA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;;SAEK;IAEL;;;;;;;;;OASG;IACH,SAAS,CAAC,aAAa,IAAI,OAAO;IAuBlC;;;OAGG;IACH,SAAS,CAAC,UAAU,IAAI,sBAAsB;IAI9C;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,oBAAoB,IAAI,OAAO;IAmBzC;;;;;;;;;OASG;IACH,SAAS,CAAC,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAWjE;;;;;;;;OAQG;IACH,mBAAmB,IAAI,IAAI;IAa3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,mBAAmB,CACjB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,EACjD,uBAAuB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,EACrD,kBAAkB,UAAO,GACxB,IAAI;IAkCP;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,kBAAkB,UAAO,GAAG,IAAI;IAmCxF;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,sBAAsB,GAAG,IAAI;IA+C9F;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;CAuBvB"}
|
|
@@ -389,6 +389,7 @@ export type FeatureFlagValue = string | boolean;
|
|
|
389
389
|
*/
|
|
390
390
|
export type FeatureFlagResult = {
|
|
391
391
|
readonly key: string;
|
|
392
|
+
/** Whether the returned feature flag evaluation is enabled. `false` is a conclusive off result. */
|
|
392
393
|
readonly enabled: boolean;
|
|
393
394
|
readonly variant?: string;
|
|
394
395
|
readonly payload?: JsonType;
|