@frontmcp/sdk 0.6.0 → 0.6.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/{src/auth → auth}/instances/instance.local-primary-auth.d.ts +1 -1
- package/{src/auth → auth}/instances/instance.remote-primary-auth.d.ts +1 -1
- package/{src/auth → auth}/session/index.d.ts +1 -0
- package/auth/session/vercel-kv-session.store.d.ts +96 -0
- package/{src/common → common}/interfaces/internal/primary-auth-provider.interface.d.ts +1 -4
- package/{src/common → common}/metadata/front-mcp.metadata.d.ts +1779 -67
- package/{src/common → common}/metadata/prompt.metadata.d.ts +4 -0
- package/{src/common → common}/metadata/resource.metadata.d.ts +8 -0
- package/{src/common → common}/metadata/tool-ui.metadata.d.ts +2 -2
- package/{src/common → common}/metadata/tool.metadata.d.ts +4 -0
- package/{src/common → common}/schemas/http-output.schema.d.ts +24 -6
- package/common/types/options/auth/app-auth.schema.d.ts +275 -0
- package/common/types/options/auth/auth.interfaces.d.ts +461 -0
- package/common/types/options/auth/auth.schema.d.ts +284 -0
- package/common/types/options/auth/auth.utils.d.ts +32 -0
- package/common/types/options/auth/index.d.ts +16 -0
- package/common/types/options/auth/orchestrated.schema.d.ts +381 -0
- package/common/types/options/auth/public.schema.d.ts +42 -0
- package/common/types/options/auth/shared.schemas.d.ts +120 -0
- package/common/types/options/auth/transparent.schema.d.ts +56 -0
- package/common/types/options/auth/transport.deprecated.d.ts +63 -0
- package/{src/common → common}/types/options/index.d.ts +1 -1
- package/common/types/options/redis.options.d.ts +190 -0
- package/{src/common → common}/types/options/server-info.options.d.ts +4 -0
- package/{src/common → common}/types/options/transport.options.d.ts +74 -5
- package/{src/common → common}/utils/decide-request-intent.utils.d.ts +6 -7
- package/common/utils/global-config.utils.d.ts +36 -0
- package/{src/common → common}/utils/index.d.ts +1 -0
- package/{src/completion → completion}/flows/complete.flow.d.ts +6 -8
- package/{src/errors → errors}/index.d.ts +1 -1
- package/{src/errors → errors}/mcp.error.d.ts +9 -0
- package/esm/index.mjs +22664 -0
- package/esm/mcp-apps/index.mjs +723 -0
- package/esm/package.json +81 -0
- package/{src/front-mcp → front-mcp}/front-mcp.providers.d.ts +246 -38
- package/front-mcp/index.d.ts +2 -0
- package/{src/index.d.ts → index.d.ts} +1 -1
- package/index.js +22957 -0
- package/logger/logger.tokens.d.ts +1 -0
- package/{src/logging → logging}/flows/set-level.flow.d.ts +6 -8
- package/mcp-apps/index.js +799 -0
- package/package.json +37 -17
- package/{src/prompt → prompt}/flows/get-prompt.flow.d.ts +14 -8
- package/{src/prompt → prompt}/flows/prompts-list.flow.d.ts +8 -7
- package/{src/resource → resource}/flows/read-resource.flow.d.ts +8 -9
- package/{src/resource → resource}/flows/resource-templates-list.flow.d.ts +8 -7
- package/{src/resource → resource}/flows/resources-list.flow.d.ts +8 -7
- package/{src/resource → resource}/flows/subscribe-resource.flow.d.ts +6 -8
- package/{src/resource → resource}/flows/unsubscribe-resource.flow.d.ts +6 -8
- package/store/adapters/store.vercel-kv.adapter.d.ts +86 -0
- package/{src/store → store}/index.d.ts +2 -0
- package/store/store.factory.d.ts +86 -0
- package/{src/tool → tool}/flows/call-tool.flow.d.ts +18 -9
- package/{src/tool → tool}/flows/tools-list.flow.d.ts +9 -8
- package/{src/tool → tool}/ui/index.d.ts +4 -4
- package/{src/tool → tool}/ui/platform-adapters.d.ts +2 -2
- package/{src/tool → tool}/ui/template-helpers.d.ts +5 -7
- package/{src/tool → tool}/ui/ui-resource.handler.d.ts +1 -1
- package/{src/transport → transport}/mcp-handlers/complete-request.handler.d.ts +4 -15
- package/{src/transport → transport}/mcp-handlers/get-prompt-request.handler.d.ts +5 -15
- package/{src/transport → transport}/mcp-handlers/index.d.ts +67 -195
- package/{src/transport → transport}/mcp-handlers/list-prompts-request.handler.d.ts +5 -15
- package/{src/transport → transport}/mcp-handlers/list-resource-templates-request.handler.d.ts +5 -15
- package/{src/transport → transport}/mcp-handlers/list-resources-request.handler.d.ts +5 -15
- package/{src/transport → transport}/mcp-handlers/list-tools-request.handler.d.ts +5 -15
- package/{src/transport → transport}/mcp-handlers/logging-set-level-request.handler.d.ts +3 -14
- package/{src/transport → transport}/mcp-handlers/read-resource-request.handler.d.ts +4 -15
- package/{src/transport → transport}/mcp-handlers/subscribe-request.handler.d.ts +3 -14
- package/{src/transport → transport}/mcp-handlers/unsubscribe-request.handler.d.ts +3 -14
- package/{src/transport → transport}/transport.registry.d.ts +5 -1
- package/README.md +0 -460
- package/src/adapter/adapter.instance.js +0 -70
- package/src/adapter/adapter.instance.js.map +0 -1
- package/src/adapter/adapter.regsitry.js +0 -54
- package/src/adapter/adapter.regsitry.js.map +0 -1
- package/src/adapter/adapter.utils.js +0 -83
- package/src/adapter/adapter.utils.js.map +0 -1
- package/src/app/app.registry.js +0 -66
- package/src/app/app.registry.js.map +0 -1
- package/src/app/app.utils.js +0 -58
- package/src/app/app.utils.js.map +0 -1
- package/src/app/instances/app.local.instance.js +0 -67
- package/src/app/instances/app.local.instance.js.map +0 -1
- package/src/app/instances/app.remote.instance.js +0 -36
- package/src/app/instances/app.remote.instance.js.map +0 -1
- package/src/app/instances/index.js +0 -6
- package/src/app/instances/index.js.map +0 -1
- package/src/auth/auth.registry.js +0 -219
- package/src/auth/auth.registry.js.map +0 -1
- package/src/auth/auth.utils.js +0 -84
- package/src/auth/auth.utils.js.map +0 -1
- package/src/auth/authorization/authorization.class.js +0 -217
- package/src/auth/authorization/authorization.class.js.map +0 -1
- package/src/auth/authorization/authorization.types.js +0 -79
- package/src/auth/authorization/authorization.types.js.map +0 -1
- package/src/auth/authorization/index.js +0 -19
- package/src/auth/authorization/index.js.map +0 -1
- package/src/auth/authorization/orchestrated.authorization.js +0 -306
- package/src/auth/authorization/orchestrated.authorization.js.map +0 -1
- package/src/auth/authorization/public.authorization.js +0 -132
- package/src/auth/authorization/public.authorization.js.map +0 -1
- package/src/auth/authorization/transparent.authorization.js +0 -147
- package/src/auth/authorization/transparent.authorization.js.map +0 -1
- package/src/auth/consent/consent.types.js +0 -119
- package/src/auth/consent/consent.types.js.map +0 -1
- package/src/auth/consent/index.js +0 -13
- package/src/auth/consent/index.js.map +0 -1
- package/src/auth/detection/auth-provider-detection.js +0 -230
- package/src/auth/detection/auth-provider-detection.js.map +0 -1
- package/src/auth/detection/index.js +0 -15
- package/src/auth/detection/index.js.map +0 -1
- package/src/auth/flows/auth.verify.flow.js +0 -379
- package/src/auth/flows/auth.verify.flow.js.map +0 -1
- package/src/auth/flows/oauth.authorize.flow.js +0 -822
- package/src/auth/flows/oauth.authorize.flow.js.map +0 -1
- package/src/auth/flows/oauth.callback.flow.js +0 -357
- package/src/auth/flows/oauth.callback.flow.js.map +0 -1
- package/src/auth/flows/oauth.register.flow.js +0 -201
- package/src/auth/flows/oauth.register.flow.js.map +0 -1
- package/src/auth/flows/oauth.token.flow.js +0 -319
- package/src/auth/flows/oauth.token.flow.js.map +0 -1
- package/src/auth/flows/session.verify.flow.js +0 -304
- package/src/auth/flows/session.verify.flow.js.map +0 -1
- package/src/auth/flows/well-known.jwks.flow.js +0 -89
- package/src/auth/flows/well-known.jwks.flow.js.map +0 -1
- package/src/auth/flows/well-known.oauth-authorization-server.flow.js +0 -122
- package/src/auth/flows/well-known.oauth-authorization-server.flow.js.map +0 -1
- package/src/auth/flows/well-known.prm.flow.js +0 -106
- package/src/auth/flows/well-known.prm.flow.js.map +0 -1
- package/src/auth/instances/instance.local-primary-auth.js +0 -308
- package/src/auth/instances/instance.local-primary-auth.js.map +0 -1
- package/src/auth/instances/instance.remote-primary-auth.js +0 -49
- package/src/auth/instances/instance.remote-primary-auth.js.map +0 -1
- package/src/auth/jwks/dev-key-persistence.js +0 -219
- package/src/auth/jwks/dev-key-persistence.js.map +0 -1
- package/src/auth/jwks/index.js +0 -7
- package/src/auth/jwks/index.js.map +0 -1
- package/src/auth/jwks/jwks.service.js +0 -303
- package/src/auth/jwks/jwks.service.js.map +0 -1
- package/src/auth/jwks/jwks.types.js +0 -3
- package/src/auth/jwks/jwks.types.js.map +0 -1
- package/src/auth/jwks/jwks.utils.js +0 -32
- package/src/auth/jwks/jwks.utils.js.map +0 -1
- package/src/auth/machine-id.js +0 -32
- package/src/auth/machine-id.js.map +0 -1
- package/src/auth/oauth/flows/oauth.authorize.flow.js +0 -33
- package/src/auth/oauth/flows/oauth.authorize.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.device-authorization.flow.js +0 -48
- package/src/auth/oauth/flows/oauth.device-authorization.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.introspect.flow.js +0 -28
- package/src/auth/oauth/flows/oauth.introspect.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.par.flow.js +0 -29
- package/src/auth/oauth/flows/oauth.par.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.revoke.flow.js +0 -27
- package/src/auth/oauth/flows/oauth.revoke.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.token.flow.js +0 -59
- package/src/auth/oauth/flows/oauth.token.flow.js.map +0 -1
- package/src/auth/oauth/flows/oauth.userinfo.flow.js +0 -24
- package/src/auth/oauth/flows/oauth.userinfo.flow.js.map +0 -1
- package/src/auth/oauth/flows/oidc.logout.flow.js +0 -20
- package/src/auth/oauth/flows/oidc.logout.flow.js.map +0 -1
- package/src/auth/session/authorization-vault.js +0 -817
- package/src/auth/session/authorization-vault.js.map +0 -1
- package/src/auth/session/authorization.store.js +0 -323
- package/src/auth/session/authorization.store.js.map +0 -1
- package/src/auth/session/encrypted-authorization-vault.js +0 -493
- package/src/auth/session/encrypted-authorization-vault.js.map +0 -1
- package/src/auth/session/index.js +0 -16
- package/src/auth/session/index.js.map +0 -1
- package/src/auth/session/record/session.base.js +0 -125
- package/src/auth/session/record/session.base.js.map +0 -1
- package/src/auth/session/record/session.stateful.js +0 -55
- package/src/auth/session/record/session.stateful.js.map +0 -1
- package/src/auth/session/record/session.stateless.js +0 -32
- package/src/auth/session/record/session.stateless.js.map +0 -1
- package/src/auth/session/record/session.transparent.js +0 -22
- package/src/auth/session/record/session.transparent.js.map +0 -1
- package/src/auth/session/redis-session.store.js +0 -204
- package/src/auth/session/redis-session.store.js.map +0 -1
- package/src/auth/session/session.crypto.js +0 -47
- package/src/auth/session/session.crypto.js.map +0 -1
- package/src/auth/session/session.schema.js +0 -13
- package/src/auth/session/session.schema.js.map +0 -1
- package/src/auth/session/session.service.js +0 -105
- package/src/auth/session/session.service.js.map +0 -1
- package/src/auth/session/session.transport.js +0 -20
- package/src/auth/session/session.transport.js.map +0 -1
- package/src/auth/session/session.types.js +0 -4
- package/src/auth/session/session.types.js.map +0 -1
- package/src/auth/session/token.refresh.js +0 -63
- package/src/auth/session/token.refresh.js.map +0 -1
- package/src/auth/session/token.store.js +0 -53
- package/src/auth/session/token.store.js.map +0 -1
- package/src/auth/session/token.vault.js +0 -54
- package/src/auth/session/token.vault.js.map +0 -1
- package/src/auth/session/transport-session.manager.js +0 -298
- package/src/auth/session/transport-session.manager.js.map +0 -1
- package/src/auth/session/transport-session.types.js +0 -111
- package/src/auth/session/transport-session.types.js.map +0 -1
- package/src/auth/session/utils/auth-token.utils.js +0 -57
- package/src/auth/session/utils/auth-token.utils.js.map +0 -1
- package/src/auth/session/utils/session-id.utils.js +0 -217
- package/src/auth/session/utils/session-id.utils.js.map +0 -1
- package/src/auth/session/utils/tiny-ttl-cache.js +0 -26
- package/src/auth/session/utils/tiny-ttl-cache.js.map +0 -1
- package/src/auth/session/vault-encryption.js +0 -263
- package/src/auth/session/vault-encryption.js.map +0 -1
- package/src/auth/ui/base-layout.js +0 -279
- package/src/auth/ui/base-layout.js.map +0 -1
- package/src/auth/ui/index.js +0 -34
- package/src/auth/ui/index.js.map +0 -1
- package/src/auth/ui/templates.js +0 -426
- package/src/auth/ui/templates.js.map +0 -1
- package/src/auth/utils/audience.validator.js +0 -196
- package/src/auth/utils/audience.validator.js.map +0 -1
- package/src/auth/utils/index.js +0 -7
- package/src/auth/utils/index.js.map +0 -1
- package/src/auth/utils/www-authenticate.utils.js +0 -183
- package/src/auth/utils/www-authenticate.utils.js.map +0 -1
- package/src/common/common.schema.js +0 -35
- package/src/common/common.schema.js.map +0 -1
- package/src/common/constants.js +0 -13
- package/src/common/constants.js.map +0 -1
- package/src/common/decorators/adapter.decorator.js +0 -20
- package/src/common/decorators/adapter.decorator.js.map +0 -1
- package/src/common/decorators/app.decorator.js +0 -44
- package/src/common/decorators/app.decorator.js.map +0 -1
- package/src/common/decorators/auth-provider.decorator.js +0 -20
- package/src/common/decorators/auth-provider.decorator.js.map +0 -1
- package/src/common/decorators/decorator-utils.js +0 -195
- package/src/common/decorators/decorator-utils.js.map +0 -1
- package/src/common/decorators/flow.decorator.js +0 -19
- package/src/common/decorators/flow.decorator.js.map +0 -1
- package/src/common/decorators/front-mcp.decorator.js +0 -67
- package/src/common/decorators/front-mcp.decorator.js.map +0 -1
- package/src/common/decorators/hook.decorator.js +0 -178
- package/src/common/decorators/hook.decorator.js.map +0 -1
- package/src/common/decorators/index.js +0 -16
- package/src/common/decorators/index.js.map +0 -1
- package/src/common/decorators/logger.decorator.js +0 -20
- package/src/common/decorators/logger.decorator.js.map +0 -1
- package/src/common/decorators/plugin.decorator.js +0 -39
- package/src/common/decorators/plugin.decorator.js.map +0 -1
- package/src/common/decorators/prompt.decorator.js +0 -38
- package/src/common/decorators/prompt.decorator.js.map +0 -1
- package/src/common/decorators/provider.decorator.js +0 -20
- package/src/common/decorators/provider.decorator.js.map +0 -1
- package/src/common/decorators/resource.decorator.js +0 -94
- package/src/common/decorators/resource.decorator.js.map +0 -1
- package/src/common/decorators/tool.decorator.js +0 -45
- package/src/common/decorators/tool.decorator.js.map +0 -1
- package/src/common/dynamic/dynamic.adapter.js +0 -28
- package/src/common/dynamic/dynamic.adapter.js.map +0 -1
- package/src/common/dynamic/dynamic.plugin.js +0 -42
- package/src/common/dynamic/dynamic.plugin.js.map +0 -1
- package/src/common/dynamic/dynamic.utils.js +0 -27
- package/src/common/dynamic/dynamic.utils.js.map +0 -1
- package/src/common/dynamic/index.js +0 -6
- package/src/common/dynamic/index.js.map +0 -1
- package/src/common/entries/adapter.entry.js +0 -8
- package/src/common/entries/adapter.entry.js.map +0 -1
- package/src/common/entries/app.entry.js +0 -9
- package/src/common/entries/app.entry.js.map +0 -1
- package/src/common/entries/auth-provider.entry.js +0 -8
- package/src/common/entries/auth-provider.entry.js.map +0 -1
- package/src/common/entries/base.entry.js +0 -17
- package/src/common/entries/base.entry.js.map +0 -1
- package/src/common/entries/flow.entry.js +0 -21
- package/src/common/entries/flow.entry.js.map +0 -1
- package/src/common/entries/hook.entry.js +0 -20
- package/src/common/entries/hook.entry.js.map +0 -1
- package/src/common/entries/index.js +0 -17
- package/src/common/entries/index.js.map +0 -1
- package/src/common/entries/logger.entry.js +0 -8
- package/src/common/entries/logger.entry.js.map +0 -1
- package/src/common/entries/plugin.entry.js +0 -8
- package/src/common/entries/plugin.entry.js.map +0 -1
- package/src/common/entries/prompt.entry.js +0 -18
- package/src/common/entries/prompt.entry.js.map +0 -1
- package/src/common/entries/provider.entry.js +0 -8
- package/src/common/entries/provider.entry.js.map +0 -1
- package/src/common/entries/resource.entry.js +0 -35
- package/src/common/entries/resource.entry.js.map +0 -1
- package/src/common/entries/scope.entry.js +0 -14
- package/src/common/entries/scope.entry.js.map +0 -1
- package/src/common/entries/tool.entry.js +0 -31
- package/src/common/entries/tool.entry.js.map +0 -1
- package/src/common/flow/flow.utils.js +0 -96
- package/src/common/flow/flow.utils.js.map +0 -1
- package/src/common/index.js +0 -20
- package/src/common/index.js.map +0 -1
- package/src/common/interfaces/adapter.interface.js +0 -3
- package/src/common/interfaces/adapter.interface.js.map +0 -1
- package/src/common/interfaces/app.interface.js +0 -3
- package/src/common/interfaces/app.interface.js.map +0 -1
- package/src/common/interfaces/auth-hook.interface.js +0 -135
- package/src/common/interfaces/auth-hook.interface.js.map +0 -1
- package/src/common/interfaces/auth-provider.interface.js +0 -18
- package/src/common/interfaces/auth-provider.interface.js.map +0 -1
- package/src/common/interfaces/base.interface.js +0 -3
- package/src/common/interfaces/base.interface.js.map +0 -1
- package/src/common/interfaces/execution-context.interface.js +0 -166
- package/src/common/interfaces/execution-context.interface.js.map +0 -1
- package/src/common/interfaces/flow.interface.js +0 -95
- package/src/common/interfaces/flow.interface.js.map +0 -1
- package/src/common/interfaces/front-mcp.interface.js +0 -3
- package/src/common/interfaces/front-mcp.interface.js.map +0 -1
- package/src/common/interfaces/hook.interface.js +0 -3
- package/src/common/interfaces/hook.interface.js.map +0 -1
- package/src/common/interfaces/index.js +0 -21
- package/src/common/interfaces/index.js.map +0 -1
- package/src/common/interfaces/internal/flow.utils.js +0 -83
- package/src/common/interfaces/internal/flow.utils.js.map +0 -1
- package/src/common/interfaces/internal/index.js +0 -7
- package/src/common/interfaces/internal/index.js.map +0 -1
- package/src/common/interfaces/internal/primary-auth-provider.interface.js +0 -81
- package/src/common/interfaces/internal/primary-auth-provider.interface.js.map +0 -1
- package/src/common/interfaces/internal/registry.interface.js +0 -3
- package/src/common/interfaces/internal/registry.interface.js.map +0 -1
- package/src/common/interfaces/logger.interface.js +0 -10
- package/src/common/interfaces/logger.interface.js.map +0 -1
- package/src/common/interfaces/plugin.interface.js +0 -3
- package/src/common/interfaces/plugin.interface.js.map +0 -1
- package/src/common/interfaces/prompt.interface.js +0 -81
- package/src/common/interfaces/prompt.interface.js.map +0 -1
- package/src/common/interfaces/provider.interface.js +0 -18
- package/src/common/interfaces/provider.interface.js.map +0 -1
- package/src/common/interfaces/resource.interface.js +0 -56
- package/src/common/interfaces/resource.interface.js.map +0 -1
- package/src/common/interfaces/scope.interface.js +0 -3
- package/src/common/interfaces/scope.interface.js.map +0 -1
- package/src/common/interfaces/server.interface.js +0 -18
- package/src/common/interfaces/server.interface.js.map +0 -1
- package/src/common/interfaces/session-hook.interface.js +0 -140
- package/src/common/interfaces/session-hook.interface.js.map +0 -1
- package/src/common/interfaces/tool-hook.interface.js +0 -92
- package/src/common/interfaces/tool-hook.interface.js.map +0 -1
- package/src/common/interfaces/tool.interface.js +0 -117
- package/src/common/interfaces/tool.interface.js.map +0 -1
- package/src/common/metadata/adapter.metadata.js +0 -10
- package/src/common/metadata/adapter.metadata.js.map +0 -1
- package/src/common/metadata/app.metadata.js +0 -30
- package/src/common/metadata/app.metadata.js.map +0 -1
- package/src/common/metadata/auth-provider.metadata.js +0 -19
- package/src/common/metadata/auth-provider.metadata.js.map +0 -1
- package/src/common/metadata/flow.metadata.js +0 -15
- package/src/common/metadata/flow.metadata.js.map +0 -1
- package/src/common/metadata/front-mcp.metadata.js +0 -29
- package/src/common/metadata/front-mcp.metadata.js.map +0 -1
- package/src/common/metadata/hook.metadata.js +0 -3
- package/src/common/metadata/hook.metadata.js.map +0 -1
- package/src/common/metadata/index.js +0 -17
- package/src/common/metadata/index.js.map +0 -1
- package/src/common/metadata/logger.metadata.js +0 -10
- package/src/common/metadata/logger.metadata.js.map +0 -1
- package/src/common/metadata/plugin.metadata.js +0 -18
- package/src/common/metadata/plugin.metadata.js.map +0 -1
- package/src/common/metadata/prompt.metadata.js +0 -27
- package/src/common/metadata/prompt.metadata.js.map +0 -1
- package/src/common/metadata/provider.metadata.js +0 -36
- package/src/common/metadata/provider.metadata.js.map +0 -1
- package/src/common/metadata/resource.metadata.js +0 -31
- package/src/common/metadata/resource.metadata.js.map +0 -1
- package/src/common/metadata/tool-ui.metadata.js +0 -12
- package/src/common/metadata/tool-ui.metadata.js.map +0 -1
- package/src/common/metadata/tool.metadata.js +0 -55
- package/src/common/metadata/tool.metadata.js.map +0 -1
- package/src/common/migrate/auth-transport.migrate.js +0 -140
- package/src/common/migrate/auth-transport.migrate.js.map +0 -1
- package/src/common/migrate/index.js +0 -6
- package/src/common/migrate/index.js.map +0 -1
- package/src/common/providers/base-config.provider.js +0 -128
- package/src/common/providers/base-config.provider.js.map +0 -1
- package/src/common/records/adapter.record.js +0 -11
- package/src/common/records/adapter.record.js.map +0 -1
- package/src/common/records/app.record.js +0 -9
- package/src/common/records/app.record.js.map +0 -1
- package/src/common/records/auth-provider.record.js +0 -12
- package/src/common/records/auth-provider.record.js.map +0 -1
- package/src/common/records/flow.record.js +0 -8
- package/src/common/records/flow.record.js.map +0 -1
- package/src/common/records/hook.record.js +0 -8
- package/src/common/records/hook.record.js.map +0 -1
- package/src/common/records/index.js +0 -16
- package/src/common/records/index.js.map +0 -1
- package/src/common/records/logger.record.js +0 -8
- package/src/common/records/logger.record.js.map +0 -1
- package/src/common/records/plugin.record.js +0 -11
- package/src/common/records/plugin.record.js.map +0 -1
- package/src/common/records/prompt.record.js +0 -9
- package/src/common/records/prompt.record.js.map +0 -1
- package/src/common/records/provider.record.js +0 -14
- package/src/common/records/provider.record.js.map +0 -1
- package/src/common/records/resource.record.js +0 -20
- package/src/common/records/resource.record.js.map +0 -1
- package/src/common/records/scope.record.js +0 -9
- package/src/common/records/scope.record.js.map +0 -1
- package/src/common/records/tool.record.js +0 -9
- package/src/common/records/tool.record.js.map +0 -1
- package/src/common/schemas/annotated-class.schema.js +0 -109
- package/src/common/schemas/annotated-class.schema.js.map +0 -1
- package/src/common/schemas/http-input.schema.js +0 -13
- package/src/common/schemas/http-input.schema.js.map +0 -1
- package/src/common/schemas/http-output.schema.js +0 -321
- package/src/common/schemas/http-output.schema.js.map +0 -1
- package/src/common/schemas/index.js +0 -8
- package/src/common/schemas/index.js.map +0 -1
- package/src/common/schemas/session-header.schema.js +0 -42
- package/src/common/schemas/session-header.schema.js.map +0 -1
- package/src/common/tokens/adapter.tokens.js +0 -11
- package/src/common/tokens/adapter.tokens.js.map +0 -1
- package/src/common/tokens/app.tokens.js +0 -30
- package/src/common/tokens/app.tokens.js.map +0 -1
- package/src/common/tokens/auth-provider.tokens.js +0 -12
- package/src/common/tokens/auth-provider.tokens.js.map +0 -1
- package/src/common/tokens/base.tokens.js +0 -9
- package/src/common/tokens/base.tokens.js.map +0 -1
- package/src/common/tokens/flow-hook.tokens.js +0 -9
- package/src/common/tokens/flow-hook.tokens.js.map +0 -1
- package/src/common/tokens/flow.tokens.js +0 -16
- package/src/common/tokens/flow.tokens.js.map +0 -1
- package/src/common/tokens/front-mcp.tokens.js +0 -24
- package/src/common/tokens/front-mcp.tokens.js.map +0 -1
- package/src/common/tokens/index.js +0 -17
- package/src/common/tokens/index.js.map +0 -1
- package/src/common/tokens/logger.tokens.js +0 -11
- package/src/common/tokens/logger.tokens.js.map +0 -1
- package/src/common/tokens/plugin.tokens.js +0 -18
- package/src/common/tokens/plugin.tokens.js.map +0 -1
- package/src/common/tokens/prompt.tokens.js +0 -14
- package/src/common/tokens/prompt.tokens.js.map +0 -1
- package/src/common/tokens/provider.tokens.js +0 -12
- package/src/common/tokens/provider.tokens.js.map +0 -1
- package/src/common/tokens/resource.tokens.js +0 -28
- package/src/common/tokens/resource.tokens.js.map +0 -1
- package/src/common/tokens/server.tokens.js +0 -11
- package/src/common/tokens/server.tokens.js.map +0 -1
- package/src/common/tokens/tool.tokens.js +0 -21
- package/src/common/tokens/tool.tokens.js.map +0 -1
- package/src/common/types/auth/index.js +0 -6
- package/src/common/types/auth/index.js.map +0 -1
- package/src/common/types/auth/jwt.types.js +0 -36
- package/src/common/types/auth/jwt.types.js.map +0 -1
- package/src/common/types/auth/session.types.js +0 -53
- package/src/common/types/auth/session.types.js.map +0 -1
- package/src/common/types/common.types.js +0 -3
- package/src/common/types/common.types.js.map +0 -1
- package/src/common/types/index.js +0 -7
- package/src/common/types/index.js.map +0 -1
- package/src/common/types/options/auth.options.d.ts +0 -1266
- package/src/common/types/options/auth.options.js +0 -560
- package/src/common/types/options/auth.options.js.map +0 -1
- package/src/common/types/options/http.options.js +0 -10
- package/src/common/types/options/http.options.js.map +0 -1
- package/src/common/types/options/index.js +0 -11
- package/src/common/types/options/index.js.map +0 -1
- package/src/common/types/options/logging.options.js +0 -33
- package/src/common/types/options/logging.options.js.map +0 -1
- package/src/common/types/options/redis.options.d.ts +0 -22
- package/src/common/types/options/redis.options.js +0 -45
- package/src/common/types/options/redis.options.js.map +0 -1
- package/src/common/types/options/server-info.options.js +0 -13
- package/src/common/types/options/server-info.options.js.map +0 -1
- package/src/common/types/options/session.options.js +0 -32
- package/src/common/types/options/session.options.js.map +0 -1
- package/src/common/types/options/transport.options.js +0 -121
- package/src/common/types/options/transport.options.js.map +0 -1
- package/src/common/utils/decide-request-intent.utils.js +0 -391
- package/src/common/utils/decide-request-intent.utils.js.map +0 -1
- package/src/common/utils/index.js +0 -6
- package/src/common/utils/index.js.map +0 -1
- package/src/common/utils/path.utils.js +0 -66
- package/src/common/utils/path.utils.js.map +0 -1
- package/src/completion/flows/complete.flow.js +0 -199
- package/src/completion/flows/complete.flow.js.map +0 -1
- package/src/context/frontmcp-context-storage.js +0 -183
- package/src/context/frontmcp-context-storage.js.map +0 -1
- package/src/context/frontmcp-context.js +0 -360
- package/src/context/frontmcp-context.js.map +0 -1
- package/src/context/frontmcp-context.provider.js +0 -61
- package/src/context/frontmcp-context.provider.js.map +0 -1
- package/src/context/index.js +0 -64
- package/src/context/index.js.map +0 -1
- package/src/context/request-context-storage.js +0 -183
- package/src/context/request-context-storage.js.map +0 -1
- package/src/context/request-context.js +0 -209
- package/src/context/request-context.js.map +0 -1
- package/src/context/request-context.provider.js +0 -51
- package/src/context/request-context.provider.js.map +0 -1
- package/src/context/session-key.provider.js +0 -65
- package/src/context/session-key.provider.js.map +0 -1
- package/src/context/trace-context.js +0 -142
- package/src/context/trace-context.js.map +0 -1
- package/src/errors/authorization-required.error.js +0 -274
- package/src/errors/authorization-required.error.js.map +0 -1
- package/src/errors/error-handler.js +0 -107
- package/src/errors/error-handler.js.map +0 -1
- package/src/errors/index.js +0 -44
- package/src/errors/index.js.map +0 -1
- package/src/errors/mcp.error.js +0 -398
- package/src/errors/mcp.error.js.map +0 -1
- package/src/exceptions/mcp-exceptions/session-missing.exception.js +0 -11
- package/src/exceptions/mcp-exceptions/session-missing.exception.js.map +0 -1
- package/src/exceptions/mcp-exceptions/unsupported-client-version.exception.js +0 -15
- package/src/exceptions/mcp-exceptions/unsupported-client-version.exception.js.map +0 -1
- package/src/flows/flow.instance.js +0 -420
- package/src/flows/flow.instance.js.map +0 -1
- package/src/flows/flow.registry.js +0 -121
- package/src/flows/flow.registry.js.map +0 -1
- package/src/flows/flow.stages.js +0 -113
- package/src/flows/flow.stages.js.map +0 -1
- package/src/flows/flow.utils.js +0 -36
- package/src/flows/flow.utils.js.map +0 -1
- package/src/front-mcp/front-mcp.js +0 -63
- package/src/front-mcp/front-mcp.js.map +0 -1
- package/src/front-mcp/front-mcp.providers.js +0 -29
- package/src/front-mcp/front-mcp.providers.js.map +0 -1
- package/src/front-mcp/front-mcp.tokens.js +0 -5
- package/src/front-mcp/front-mcp.tokens.js.map +0 -1
- package/src/front-mcp/index.d.ts +0 -1
- package/src/front-mcp/index.js +0 -5
- package/src/front-mcp/index.js.map +0 -1
- package/src/front-mcp/serverless-handler.js +0 -61
- package/src/front-mcp/serverless-handler.js.map +0 -1
- package/src/hooks/hook.instance.js +0 -26
- package/src/hooks/hook.instance.js.map +0 -1
- package/src/hooks/hook.registry.js +0 -152
- package/src/hooks/hook.registry.js.map +0 -1
- package/src/hooks/hooks.utils.js +0 -34
- package/src/hooks/hooks.utils.js.map +0 -1
- package/src/index.js +0 -36
- package/src/index.js.map +0 -1
- package/src/logger/instances/instance.console-logger.js +0 -75
- package/src/logger/instances/instance.console-logger.js.map +0 -1
- package/src/logger/instances/instance.logger.js +0 -77
- package/src/logger/instances/instance.logger.js.map +0 -1
- package/src/logger/logger.registry.js +0 -96
- package/src/logger/logger.registry.js.map +0 -1
- package/src/logger/logger.tokens.js +0 -3
- package/src/logger/logger.tokens.js.map +0 -1
- package/src/logger/logger.types.js +0 -8
- package/src/logger/logger.types.js.map +0 -1
- package/src/logger/logger.utils.js +0 -42
- package/src/logger/logger.utils.js.map +0 -1
- package/src/logging/flows/set-level.flow.js +0 -108
- package/src/logging/flows/set-level.flow.js.map +0 -1
- package/src/mcp-apps/csp.js +0 -267
- package/src/mcp-apps/csp.js.map +0 -1
- package/src/mcp-apps/index.js +0 -91
- package/src/mcp-apps/index.js.map +0 -1
- package/src/mcp-apps/schemas.js +0 -345
- package/src/mcp-apps/schemas.js.map +0 -1
- package/src/mcp-apps/template.js +0 -419
- package/src/mcp-apps/template.js.map +0 -1
- package/src/mcp-apps/types.js +0 -59
- package/src/mcp-apps/types.js.map +0 -1
- package/src/notification/index.js +0 -13
- package/src/notification/index.js.map +0 -1
- package/src/notification/notification.service.js +0 -731
- package/src/notification/notification.service.js.map +0 -1
- package/src/plugin/plugin.registry.js +0 -152
- package/src/plugin/plugin.registry.js.map +0 -1
- package/src/plugin/plugin.utils.js +0 -88
- package/src/plugin/plugin.utils.js.map +0 -1
- package/src/prompt/flows/get-prompt.flow.js +0 -214
- package/src/prompt/flows/get-prompt.flow.js.map +0 -1
- package/src/prompt/flows/prompts-list.flow.js +0 -176
- package/src/prompt/flows/prompts-list.flow.js.map +0 -1
- package/src/prompt/index.js +0 -17
- package/src/prompt/index.js.map +0 -1
- package/src/prompt/prompt.events.js +0 -25
- package/src/prompt/prompt.events.js.map +0 -1
- package/src/prompt/prompt.instance.js +0 -120
- package/src/prompt/prompt.instance.js.map +0 -1
- package/src/prompt/prompt.registry.js +0 -380
- package/src/prompt/prompt.registry.js.map +0 -1
- package/src/prompt/prompt.types.js +0 -11
- package/src/prompt/prompt.types.js.map +0 -1
- package/src/prompt/prompt.utils.js +0 -136
- package/src/prompt/prompt.utils.js.map +0 -1
- package/src/provider/provider.registry.js +0 -868
- package/src/provider/provider.registry.js.map +0 -1
- package/src/provider/provider.types.js +0 -3
- package/src/provider/provider.types.js.map +0 -1
- package/src/provider/provider.utils.js +0 -103
- package/src/provider/provider.utils.js.map +0 -1
- package/src/regsitry/index.js +0 -5
- package/src/regsitry/index.js.map +0 -1
- package/src/regsitry/registry.base.js +0 -32
- package/src/regsitry/registry.base.js.map +0 -1
- package/src/resource/flows/read-resource.flow.js +0 -270
- package/src/resource/flows/read-resource.flow.js.map +0 -1
- package/src/resource/flows/resource-templates-list.flow.js +0 -191
- package/src/resource/flows/resource-templates-list.flow.js.map +0 -1
- package/src/resource/flows/resources-list.flow.js +0 -196
- package/src/resource/flows/resources-list.flow.js.map +0 -1
- package/src/resource/flows/subscribe-resource.flow.js +0 -123
- package/src/resource/flows/subscribe-resource.flow.js.map +0 -1
- package/src/resource/flows/unsubscribe-resource.flow.js +0 -107
- package/src/resource/flows/unsubscribe-resource.flow.js.map +0 -1
- package/src/resource/index.js +0 -20
- package/src/resource/index.js.map +0 -1
- package/src/resource/resource.events.js +0 -17
- package/src/resource/resource.events.js.map +0 -1
- package/src/resource/resource.instance.js +0 -163
- package/src/resource/resource.instance.js.map +0 -1
- package/src/resource/resource.registry.js +0 -468
- package/src/resource/resource.registry.js.map +0 -1
- package/src/resource/resource.types.js +0 -11
- package/src/resource/resource.types.js.map +0 -1
- package/src/resource/resource.utils.js +0 -151
- package/src/resource/resource.utils.js.map +0 -1
- package/src/scope/flows/http.request.flow.js +0 -474
- package/src/scope/flows/http.request.flow.js.map +0 -1
- package/src/scope/index.js +0 -6
- package/src/scope/index.js.map +0 -1
- package/src/scope/scope.instance.js +0 -263
- package/src/scope/scope.instance.js.map +0 -1
- package/src/scope/scope.registry.js +0 -94
- package/src/scope/scope.registry.js.map +0 -1
- package/src/scope/scope.utils.js +0 -61
- package/src/scope/scope.utils.js.map +0 -1
- package/src/server/adapters/base.host.adapter.js +0 -8
- package/src/server/adapters/base.host.adapter.js.map +0 -1
- package/src/server/adapters/express.host.adapter.js +0 -70
- package/src/server/adapters/express.host.adapter.js.map +0 -1
- package/src/server/server.instance.js +0 -54
- package/src/server/server.instance.js.map +0 -1
- package/src/server/server.types.js +0 -3
- package/src/server/server.types.js.map +0 -1
- package/src/server/server.validation.js +0 -192
- package/src/server/server.validation.js.map +0 -1
- package/src/store/adapters/store.base.adapter.js +0 -16
- package/src/store/adapters/store.base.adapter.js.map +0 -1
- package/src/store/adapters/store.memory.adapter.js +0 -89
- package/src/store/adapters/store.memory.adapter.js.map +0 -1
- package/src/store/adapters/store.redis.adapter.js +0 -104
- package/src/store/adapters/store.redis.adapter.js.map +0 -1
- package/src/store/index.js +0 -12
- package/src/store/index.js.map +0 -1
- package/src/store/store.helpers.js +0 -67
- package/src/store/store.helpers.js.map +0 -1
- package/src/store/store.registry.js +0 -37
- package/src/store/store.registry.js.map +0 -1
- package/src/store/store.tokens.js +0 -7
- package/src/store/store.tokens.js.map +0 -1
- package/src/store/store.types.js +0 -11
- package/src/store/store.types.js.map +0 -1
- package/src/store/store.utils.js +0 -18
- package/src/store/store.utils.js.map +0 -1
- package/src/tool/flows/call-tool.flow.js +0 -616
- package/src/tool/flows/call-tool.flow.js.map +0 -1
- package/src/tool/flows/tools-list.flow.js +0 -328
- package/src/tool/flows/tools-list.flow.js.map +0 -1
- package/src/tool/tool.events.js +0 -16
- package/src/tool/tool.events.js.map +0 -1
- package/src/tool/tool.instance.js +0 -117
- package/src/tool/tool.instance.js.map +0 -1
- package/src/tool/tool.registry.js +0 -353
- package/src/tool/tool.registry.js.map +0 -1
- package/src/tool/tool.types.js +0 -10
- package/src/tool/tool.types.js.map +0 -1
- package/src/tool/tool.utils.js +0 -366
- package/src/tool/tool.utils.js.map +0 -1
- package/src/tool/ui/index.js +0 -63
- package/src/tool/ui/index.js.map +0 -1
- package/src/tool/ui/platform-adapters.js +0 -18
- package/src/tool/ui/platform-adapters.js.map +0 -1
- package/src/tool/ui/template-helpers.js +0 -112
- package/src/tool/ui/template-helpers.js.map +0 -1
- package/src/tool/ui/ui-resource-template.js +0 -64
- package/src/tool/ui/ui-resource-template.js.map +0 -1
- package/src/tool/ui/ui-resource.handler.js +0 -129
- package/src/tool/ui/ui-resource.handler.js.map +0 -1
- package/src/transport/adapters/transport.local.adapter.js +0 -148
- package/src/transport/adapters/transport.local.adapter.js.map +0 -1
- package/src/transport/adapters/transport.sse.adapter.js +0 -65
- package/src/transport/adapters/transport.sse.adapter.js.map +0 -1
- package/src/transport/adapters/transport.streamable-http.adapter.js +0 -112
- package/src/transport/adapters/transport.streamable-http.adapter.js.map +0 -1
- package/src/transport/flows/handle.sse.flow.js +0 -197
- package/src/transport/flows/handle.sse.flow.js.map +0 -1
- package/src/transport/flows/handle.stateless-http.flow.js +0 -102
- package/src/transport/flows/handle.stateless-http.flow.js.map +0 -1
- package/src/transport/flows/handle.streamable-http.flow.js +0 -315
- package/src/transport/flows/handle.streamable-http.flow.js.map +0 -1
- package/src/transport/legacy/legacy.sse.tranporter.js +0 -185
- package/src/transport/legacy/legacy.sse.tranporter.js.map +0 -1
- package/src/transport/mcp-handlers/Initialized-notification.hanlder.js +0 -14
- package/src/transport/mcp-handlers/Initialized-notification.hanlder.js.map +0 -1
- package/src/transport/mcp-handlers/call-tool-request.handler.js +0 -46
- package/src/transport/mcp-handlers/call-tool-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/complete-request.handler.js +0 -11
- package/src/transport/mcp-handlers/complete-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/get-prompt-request.handler.js +0 -11
- package/src/transport/mcp-handlers/get-prompt-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/index.js +0 -57
- package/src/transport/mcp-handlers/index.js.map +0 -1
- package/src/transport/mcp-handlers/initialize-request.handler.js +0 -109
- package/src/transport/mcp-handlers/initialize-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/list-prompts-request.handler.js +0 -11
- package/src/transport/mcp-handlers/list-prompts-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/list-resource-templates-request.handler.js +0 -12
- package/src/transport/mcp-handlers/list-resource-templates-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/list-resources-request.handler.js +0 -12
- package/src/transport/mcp-handlers/list-resources-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/list-tools-request.handler.js +0 -11
- package/src/transport/mcp-handlers/list-tools-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/logging-set-level-request.handler.js +0 -34
- package/src/transport/mcp-handlers/logging-set-level-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/mcp-handlers.types.js +0 -3
- package/src/transport/mcp-handlers/mcp-handlers.types.js.map +0 -1
- package/src/transport/mcp-handlers/read-resource-request.handler.js +0 -12
- package/src/transport/mcp-handlers/read-resource-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/roots-list-changed-notification.handler.js +0 -26
- package/src/transport/mcp-handlers/roots-list-changed-notification.handler.js.map +0 -1
- package/src/transport/mcp-handlers/subscribe-request.handler.js +0 -34
- package/src/transport/mcp-handlers/subscribe-request.handler.js.map +0 -1
- package/src/transport/mcp-handlers/unsubscribe-request.handler.js +0 -34
- package/src/transport/mcp-handlers/unsubscribe-request.handler.js.map +0 -1
- package/src/transport/transport.error.js +0 -25
- package/src/transport/transport.error.js.map +0 -1
- package/src/transport/transport.event-store.js +0 -36
- package/src/transport/transport.event-store.js.map +0 -1
- package/src/transport/transport.local.js +0 -71
- package/src/transport/transport.local.js.map +0 -1
- package/src/transport/transport.registry.js +0 -523
- package/src/transport/transport.registry.js.map +0 -1
- package/src/transport/transport.remote.js +0 -31
- package/src/transport/transport.remote.js.map +0 -1
- package/src/transport/transport.types.js +0 -3
- package/src/transport/transport.types.js.map +0 -1
- package/src/types/drinen-hooks.types.js +0 -3
- package/src/types/drinen-hooks.types.js.map +0 -1
- package/src/types/invoke.type.js +0 -34
- package/src/types/invoke.type.js.map +0 -1
- package/src/types/token.types.js +0 -3
- package/src/types/token.types.js.map +0 -1
- package/src/utils/content.utils.js +0 -194
- package/src/utils/content.utils.js.map +0 -1
- package/src/utils/index.js +0 -55
- package/src/utils/index.js.map +0 -1
- package/src/utils/lineage.utils.js +0 -82
- package/src/utils/lineage.utils.js.map +0 -1
- package/src/utils/metadata.utils.js +0 -26
- package/src/utils/metadata.utils.js.map +0 -1
- package/src/utils/naming.utils.js +0 -136
- package/src/utils/naming.utils.js.map +0 -1
- package/src/utils/server.utils.js +0 -59
- package/src/utils/server.utils.js.map +0 -1
- package/src/utils/string.utils.js +0 -10
- package/src/utils/string.utils.js.map +0 -1
- package/src/utils/token.utils.js +0 -65
- package/src/utils/token.utils.js.map +0 -1
- package/src/utils/types.utils.js +0 -3
- package/src/utils/types.utils.js.map +0 -1
- package/src/utils/uri-template.utils.js +0 -113
- package/src/utils/uri-template.utils.js.map +0 -1
- package/src/utils/uri-validation.utils.js +0 -76
- package/src/utils/uri-validation.utils.js.map +0 -1
- package/{src/adapter → adapter}/adapter.instance.d.ts +0 -0
- package/{src/adapter → adapter}/adapter.regsitry.d.ts +0 -0
- package/{src/adapter → adapter}/adapter.utils.d.ts +0 -0
- package/{src/app → app}/app.registry.d.ts +0 -0
- package/{src/app → app}/app.utils.d.ts +0 -0
- package/{src/app → app}/instances/app.local.instance.d.ts +0 -0
- package/{src/app → app}/instances/app.remote.instance.d.ts +0 -0
- package/{src/app → app}/instances/index.d.ts +0 -0
- package/{src/auth → auth}/auth.registry.d.ts +0 -0
- package/{src/auth → auth}/auth.utils.d.ts +0 -0
- package/{src/auth → auth}/authorization/authorization.class.d.ts +0 -0
- package/{src/auth → auth}/authorization/authorization.types.d.ts +0 -0
- package/{src/auth → auth}/authorization/index.d.ts +0 -0
- package/{src/auth → auth}/authorization/orchestrated.authorization.d.ts +0 -0
- package/{src/auth → auth}/authorization/public.authorization.d.ts +0 -0
- package/{src/auth → auth}/authorization/transparent.authorization.d.ts +0 -0
- package/{src/auth → auth}/consent/consent.types.d.ts +0 -0
- package/{src/auth → auth}/consent/index.d.ts +0 -0
- package/{src/auth → auth}/detection/auth-provider-detection.d.ts +0 -0
- package/{src/auth → auth}/detection/index.d.ts +0 -0
- package/{src/auth → auth}/flows/auth.verify.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/oauth.authorize.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/oauth.callback.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/oauth.register.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/oauth.token.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/session.verify.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/well-known.jwks.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/well-known.oauth-authorization-server.flow.d.ts +0 -0
- package/{src/auth → auth}/flows/well-known.prm.flow.d.ts +0 -0
- package/{src/auth → auth}/jwks/dev-key-persistence.d.ts +0 -0
- package/{src/auth → auth}/jwks/index.d.ts +0 -0
- package/{src/auth → auth}/jwks/jwks.service.d.ts +0 -0
- package/{src/auth → auth}/jwks/jwks.types.d.ts +0 -0
- package/{src/auth → auth}/jwks/jwks.utils.d.ts +0 -0
- package/{src/auth → auth}/machine-id.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.authorize.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.device-authorization.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.introspect.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.par.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.revoke.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.token.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oauth.userinfo.flow.d.ts +0 -0
- package/{src/auth → auth}/oauth/flows/oidc.logout.flow.d.ts +0 -0
- package/{src/auth → auth}/session/authorization-vault.d.ts +0 -0
- package/{src/auth → auth}/session/authorization.store.d.ts +0 -0
- package/{src/auth → auth}/session/encrypted-authorization-vault.d.ts +0 -0
- package/{src/auth → auth}/session/record/session.base.d.ts +0 -0
- package/{src/auth → auth}/session/record/session.stateful.d.ts +0 -0
- package/{src/auth → auth}/session/record/session.stateless.d.ts +0 -0
- package/{src/auth → auth}/session/record/session.transparent.d.ts +0 -0
- package/{src/auth → auth}/session/redis-session.store.d.ts +0 -0
- package/{src/auth → auth}/session/session.crypto.d.ts +0 -0
- package/{src/auth → auth}/session/session.schema.d.ts +0 -0
- package/{src/auth → auth}/session/session.service.d.ts +0 -0
- package/{src/auth → auth}/session/session.transport.d.ts +0 -0
- package/{src/auth → auth}/session/session.types.d.ts +0 -0
- package/{src/auth → auth}/session/token.refresh.d.ts +0 -0
- package/{src/auth → auth}/session/token.store.d.ts +0 -0
- package/{src/auth → auth}/session/token.vault.d.ts +0 -0
- package/{src/auth → auth}/session/transport-session.manager.d.ts +0 -0
- package/{src/auth → auth}/session/transport-session.types.d.ts +0 -0
- package/{src/auth → auth}/session/utils/auth-token.utils.d.ts +0 -0
- package/{src/auth → auth}/session/utils/session-id.utils.d.ts +0 -0
- package/{src/auth → auth}/session/utils/tiny-ttl-cache.d.ts +0 -0
- package/{src/auth → auth}/session/vault-encryption.d.ts +0 -0
- package/{src/auth → auth}/ui/base-layout.d.ts +0 -0
- package/{src/auth → auth}/ui/index.d.ts +0 -0
- package/{src/auth → auth}/ui/templates.d.ts +0 -0
- package/{src/auth → auth}/utils/audience.validator.d.ts +0 -0
- package/{src/auth → auth}/utils/index.d.ts +0 -0
- package/{src/auth → auth}/utils/www-authenticate.utils.d.ts +0 -0
- package/{src/common → common}/common.schema.d.ts +0 -0
- package/{src/common → common}/constants.d.ts +0 -0
- package/{src/common → common}/decorators/adapter.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/app.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/auth-provider.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/decorator-utils.d.ts +0 -0
- package/{src/common → common}/decorators/flow.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/front-mcp.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/hook.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/index.d.ts +0 -0
- package/{src/common → common}/decorators/logger.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/plugin.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/prompt.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/provider.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/resource.decorator.d.ts +0 -0
- package/{src/common → common}/decorators/tool.decorator.d.ts +0 -0
- package/{src/common → common}/dynamic/dynamic.adapter.d.ts +0 -0
- package/{src/common → common}/dynamic/dynamic.plugin.d.ts +0 -0
- package/{src/common → common}/dynamic/dynamic.utils.d.ts +0 -0
- package/{src/common → common}/dynamic/index.d.ts +0 -0
- package/{src/common → common}/entries/adapter.entry.d.ts +0 -0
- package/{src/common → common}/entries/app.entry.d.ts +0 -0
- package/{src/common → common}/entries/auth-provider.entry.d.ts +0 -0
- package/{src/common → common}/entries/base.entry.d.ts +0 -0
- package/{src/common → common}/entries/flow.entry.d.ts +0 -0
- package/{src/common → common}/entries/hook.entry.d.ts +0 -0
- package/{src/common → common}/entries/index.d.ts +0 -0
- package/{src/common → common}/entries/logger.entry.d.ts +0 -0
- package/{src/common → common}/entries/plugin.entry.d.ts +0 -0
- package/{src/common → common}/entries/prompt.entry.d.ts +0 -0
- package/{src/common → common}/entries/provider.entry.d.ts +0 -0
- package/{src/common → common}/entries/resource.entry.d.ts +0 -0
- package/{src/common → common}/entries/scope.entry.d.ts +0 -0
- package/{src/common → common}/entries/tool.entry.d.ts +0 -0
- package/{src/common → common}/flow/flow.utils.d.ts +0 -0
- package/{src/common → common}/index.d.ts +0 -0
- package/{src/common → common}/interfaces/adapter.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/app.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/auth-hook.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/auth-provider.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/base.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/execution-context.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/flow.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/front-mcp.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/hook.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/index.d.ts +0 -0
- package/{src/common → common}/interfaces/internal/flow.utils.d.ts +0 -0
- package/{src/common → common}/interfaces/internal/index.d.ts +0 -0
- package/{src/common → common}/interfaces/internal/registry.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/logger.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/plugin.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/prompt.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/provider.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/resource.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/scope.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/server.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/session-hook.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/tool-hook.interface.d.ts +0 -0
- package/{src/common → common}/interfaces/tool.interface.d.ts +0 -0
- package/{src/common → common}/metadata/adapter.metadata.d.ts +0 -0
- package/{src/common → common}/metadata/app.metadata.d.ts +42 -42
- /package/{src/common → common}/metadata/auth-provider.metadata.d.ts +0 -0
- /package/{src/common → common}/metadata/flow.metadata.d.ts +0 -0
- /package/{src/common → common}/metadata/hook.metadata.d.ts +0 -0
- /package/{src/common → common}/metadata/index.d.ts +0 -0
- /package/{src/common → common}/metadata/logger.metadata.d.ts +0 -0
- /package/{src/common → common}/metadata/plugin.metadata.d.ts +0 -0
- /package/{src/common → common}/metadata/provider.metadata.d.ts +0 -0
- /package/{src/common → common}/migrate/auth-transport.migrate.d.ts +0 -0
- /package/{src/common → common}/migrate/index.d.ts +0 -0
- /package/{src/common → common}/providers/base-config.provider.d.ts +0 -0
- /package/{src/common → common}/records/adapter.record.d.ts +0 -0
- /package/{src/common → common}/records/app.record.d.ts +0 -0
- /package/{src/common → common}/records/auth-provider.record.d.ts +0 -0
- /package/{src/common → common}/records/flow.record.d.ts +0 -0
- /package/{src/common → common}/records/hook.record.d.ts +0 -0
- /package/{src/common → common}/records/index.d.ts +0 -0
- /package/{src/common → common}/records/logger.record.d.ts +0 -0
- /package/{src/common → common}/records/plugin.record.d.ts +0 -0
- /package/{src/common → common}/records/prompt.record.d.ts +0 -0
- /package/{src/common → common}/records/provider.record.d.ts +0 -0
- /package/{src/common → common}/records/resource.record.d.ts +0 -0
- /package/{src/common → common}/records/scope.record.d.ts +0 -0
- /package/{src/common → common}/records/tool.record.d.ts +0 -0
- /package/{src/common → common}/schemas/annotated-class.schema.d.ts +0 -0
- /package/{src/common → common}/schemas/http-input.schema.d.ts +0 -0
- /package/{src/common → common}/schemas/index.d.ts +0 -0
- /package/{src/common → common}/schemas/session-header.schema.d.ts +0 -0
- /package/{src/common → common}/tokens/adapter.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/app.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/auth-provider.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/base.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/flow-hook.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/flow.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/front-mcp.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/index.d.ts +0 -0
- /package/{src/common → common}/tokens/logger.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/plugin.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/prompt.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/provider.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/resource.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/server.tokens.d.ts +0 -0
- /package/{src/common → common}/tokens/tool.tokens.d.ts +0 -0
- /package/{src/common → common}/types/auth/index.d.ts +0 -0
- /package/{src/common → common}/types/auth/jwt.types.d.ts +0 -0
- /package/{src/common → common}/types/auth/session.types.d.ts +0 -0
- /package/{src/common → common}/types/common.types.d.ts +0 -0
- /package/{src/common → common}/types/index.d.ts +0 -0
- /package/{src/logger/logger.tokens.d.ts → common/types/options/auth/auth.typecheck.d.ts} +0 -0
- /package/{src/common → common}/types/options/http.options.d.ts +0 -0
- /package/{src/common → common}/types/options/logging.options.d.ts +0 -0
- /package/{src/common → common}/types/options/session.options.d.ts +0 -0
- /package/{src/common → common}/utils/path.utils.d.ts +0 -0
- /package/{src/context → context}/frontmcp-context-storage.d.ts +0 -0
- /package/{src/context → context}/frontmcp-context.d.ts +0 -0
- /package/{src/context → context}/frontmcp-context.provider.d.ts +0 -0
- /package/{src/context → context}/index.d.ts +0 -0
- /package/{src/context → context}/request-context-storage.d.ts +0 -0
- /package/{src/context → context}/request-context.d.ts +0 -0
- /package/{src/context → context}/request-context.provider.d.ts +0 -0
- /package/{src/context → context}/session-key.provider.d.ts +0 -0
- /package/{src/context → context}/trace-context.d.ts +0 -0
- /package/{src/errors → errors}/authorization-required.error.d.ts +0 -0
- /package/{src/errors → errors}/error-handler.d.ts +0 -0
- /package/{src/exceptions → exceptions}/mcp-exceptions/session-missing.exception.d.ts +0 -0
- /package/{src/exceptions → exceptions}/mcp-exceptions/unsupported-client-version.exception.d.ts +0 -0
- /package/{src/flows → flows}/flow.instance.d.ts +0 -0
- /package/{src/flows → flows}/flow.registry.d.ts +0 -0
- /package/{src/flows → flows}/flow.stages.d.ts +0 -0
- /package/{src/flows → flows}/flow.utils.d.ts +0 -0
- /package/{src/front-mcp → front-mcp}/front-mcp.d.ts +0 -0
- /package/{src/front-mcp → front-mcp}/front-mcp.tokens.d.ts +0 -0
- /package/{src/front-mcp → front-mcp}/serverless-handler.d.ts +0 -0
- /package/{src/hooks → hooks}/hook.instance.d.ts +0 -0
- /package/{src/hooks → hooks}/hook.registry.d.ts +0 -0
- /package/{src/hooks → hooks}/hooks.utils.d.ts +0 -0
- /package/{src/logger → logger}/instances/instance.console-logger.d.ts +0 -0
- /package/{src/logger → logger}/instances/instance.logger.d.ts +0 -0
- /package/{src/logger → logger}/logger.registry.d.ts +0 -0
- /package/{src/logger → logger}/logger.types.d.ts +0 -0
- /package/{src/logger → logger}/logger.utils.d.ts +0 -0
- /package/{src/mcp-apps → mcp-apps}/csp.d.ts +0 -0
- /package/{src/mcp-apps → mcp-apps}/index.d.ts +0 -0
- /package/{src/mcp-apps → mcp-apps}/schemas.d.ts +0 -0
- /package/{src/mcp-apps → mcp-apps}/template.d.ts +0 -0
- /package/{src/mcp-apps → mcp-apps}/types.d.ts +0 -0
- /package/{src/notification → notification}/index.d.ts +0 -0
- /package/{src/notification → notification}/notification.service.d.ts +0 -0
- /package/{src/plugin → plugin}/plugin.registry.d.ts +0 -0
- /package/{src/plugin → plugin}/plugin.utils.d.ts +0 -0
- /package/{src/prompt → prompt}/index.d.ts +0 -0
- /package/{src/prompt → prompt}/prompt.events.d.ts +0 -0
- /package/{src/prompt → prompt}/prompt.instance.d.ts +0 -0
- /package/{src/prompt → prompt}/prompt.registry.d.ts +0 -0
- /package/{src/prompt → prompt}/prompt.types.d.ts +0 -0
- /package/{src/prompt → prompt}/prompt.utils.d.ts +0 -0
- /package/{src/provider → provider}/provider.registry.d.ts +0 -0
- /package/{src/provider → provider}/provider.types.d.ts +0 -0
- /package/{src/provider → provider}/provider.utils.d.ts +0 -0
- /package/{src/regsitry → regsitry}/index.d.ts +0 -0
- /package/{src/regsitry → regsitry}/registry.base.d.ts +0 -0
- /package/{src/resource → resource}/index.d.ts +0 -0
- /package/{src/resource → resource}/resource.events.d.ts +0 -0
- /package/{src/resource → resource}/resource.instance.d.ts +0 -0
- /package/{src/resource → resource}/resource.registry.d.ts +0 -0
- /package/{src/resource → resource}/resource.types.d.ts +0 -0
- /package/{src/resource → resource}/resource.utils.d.ts +0 -0
- /package/{src/scope → scope}/flows/http.request.flow.d.ts +0 -0
- /package/{src/scope → scope}/index.d.ts +0 -0
- /package/{src/scope → scope}/scope.instance.d.ts +0 -0
- /package/{src/scope → scope}/scope.registry.d.ts +0 -0
- /package/{src/scope → scope}/scope.utils.d.ts +0 -0
- /package/{src/server → server}/adapters/base.host.adapter.d.ts +0 -0
- /package/{src/server → server}/adapters/express.host.adapter.d.ts +0 -0
- /package/{src/server → server}/server.instance.d.ts +0 -0
- /package/{src/server → server}/server.types.d.ts +0 -0
- /package/{src/server → server}/server.validation.d.ts +0 -0
- /package/{src/store → store}/adapters/store.base.adapter.d.ts +0 -0
- /package/{src/store → store}/adapters/store.memory.adapter.d.ts +0 -0
- /package/{src/store → store}/adapters/store.redis.adapter.d.ts +0 -0
- /package/{src/store → store}/store.helpers.d.ts +0 -0
- /package/{src/store → store}/store.registry.d.ts +0 -0
- /package/{src/store → store}/store.tokens.d.ts +0 -0
- /package/{src/store → store}/store.types.d.ts +0 -0
- /package/{src/store → store}/store.utils.d.ts +0 -0
- /package/{src/tool → tool}/tool.events.d.ts +0 -0
- /package/{src/tool → tool}/tool.instance.d.ts +0 -0
- /package/{src/tool → tool}/tool.registry.d.ts +0 -0
- /package/{src/tool → tool}/tool.types.d.ts +0 -0
- /package/{src/tool → tool}/tool.utils.d.ts +0 -0
- /package/{src/tool → tool}/ui/ui-resource-template.d.ts +0 -0
- /package/{src/transport → transport}/adapters/transport.local.adapter.d.ts +0 -0
- /package/{src/transport → transport}/adapters/transport.sse.adapter.d.ts +0 -0
- /package/{src/transport → transport}/adapters/transport.streamable-http.adapter.d.ts +0 -0
- /package/{src/transport → transport}/flows/handle.sse.flow.d.ts +0 -0
- /package/{src/transport → transport}/flows/handle.stateless-http.flow.d.ts +0 -0
- /package/{src/transport → transport}/flows/handle.streamable-http.flow.d.ts +0 -0
- /package/{src/transport → transport}/legacy/legacy.sse.tranporter.d.ts +0 -0
- /package/{src/transport → transport}/mcp-handlers/Initialized-notification.hanlder.d.ts +0 -0
- /package/{src/transport → transport}/mcp-handlers/call-tool-request.handler.d.ts +0 -0
- /package/{src/transport → transport}/mcp-handlers/initialize-request.handler.d.ts +0 -0
- /package/{src/transport → transport}/mcp-handlers/mcp-handlers.types.d.ts +0 -0
- /package/{src/transport → transport}/mcp-handlers/roots-list-changed-notification.handler.d.ts +0 -0
- /package/{src/transport → transport}/transport.error.d.ts +0 -0
- /package/{src/transport → transport}/transport.event-store.d.ts +0 -0
- /package/{src/transport → transport}/transport.local.d.ts +0 -0
- /package/{src/transport → transport}/transport.remote.d.ts +0 -0
- /package/{src/transport → transport}/transport.types.d.ts +0 -0
- /package/{src/types → types}/drinen-hooks.types.d.ts +0 -0
- /package/{src/types → types}/invoke.type.d.ts +0 -0
- /package/{src/types → types}/token.types.d.ts +0 -0
- /package/{src/utils → utils}/content.utils.d.ts +0 -0
- /package/{src/utils → utils}/index.d.ts +0 -0
- /package/{src/utils → utils}/lineage.utils.d.ts +0 -0
- /package/{src/utils → utils}/metadata.utils.d.ts +0 -0
- /package/{src/utils → utils}/naming.utils.d.ts +0 -0
- /package/{src/utils → utils}/server.utils.d.ts +0 -0
- /package/{src/utils → utils}/string.utils.d.ts +0 -0
- /package/{src/utils → utils}/token.utils.d.ts +0 -0
- /package/{src/utils → utils}/types.utils.d.ts +0 -0
- /package/{src/utils → utils}/uri-template.utils.d.ts +0 -0
- /package/{src/utils → utils}/uri-validation.utils.d.ts +0 -0
|
@@ -1,560 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// common/types/options/auth.options.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.appAuthOptionsSchema = exports.authOptionsSchema = exports.orchestratedAuthOptionsSchema = exports.orchestratedRemoteSchema = exports.orchestratedLocalSchema = exports.transparentAuthOptionsSchema = exports.publicAuthOptionsSchema = exports.transportConfigSchema = exports.transportRecreationConfigSchema = exports.incrementalAuthConfigSchema = exports.consentConfigSchema = exports.skippedAppBehaviorSchema = exports.tokenRefreshConfigSchema = exports.tokenStorageConfigSchema = exports.remoteProviderConfigSchema = exports.localSigningConfigSchema = exports.publicAccessConfigSchema = void 0;
|
|
5
|
-
exports.parseAuthOptions = parseAuthOptions;
|
|
6
|
-
exports.isPublicMode = isPublicMode;
|
|
7
|
-
exports.isTransparentMode = isTransparentMode;
|
|
8
|
-
exports.isOrchestratedMode = isOrchestratedMode;
|
|
9
|
-
exports.isOrchestratedLocal = isOrchestratedLocal;
|
|
10
|
-
exports.isOrchestratedRemote = isOrchestratedRemote;
|
|
11
|
-
exports.allowsPublicAccess = allowsPublicAccess;
|
|
12
|
-
const zod_1 = require("zod");
|
|
13
|
-
const auth_1 = require("../auth");
|
|
14
|
-
const transport_session_types_1 = require("../../../auth/session/transport-session.types");
|
|
15
|
-
// ============================================
|
|
16
|
-
// SHARED SCHEMAS
|
|
17
|
-
// ============================================
|
|
18
|
-
/**
|
|
19
|
-
* Public access configuration for tools/prompts
|
|
20
|
-
*/
|
|
21
|
-
exports.publicAccessConfigSchema = zod_1.z.object({
|
|
22
|
-
/**
|
|
23
|
-
* Allow all tools or explicit whitelist
|
|
24
|
-
* @default 'all'
|
|
25
|
-
*/
|
|
26
|
-
tools: zod_1.z.union([zod_1.z.literal('all'), zod_1.z.array(zod_1.z.string())]).default('all'),
|
|
27
|
-
/**
|
|
28
|
-
* Allow all prompts or explicit whitelist
|
|
29
|
-
* @default 'all'
|
|
30
|
-
*/
|
|
31
|
-
prompts: zod_1.z.union([zod_1.z.literal('all'), zod_1.z.array(zod_1.z.string())]).default('all'),
|
|
32
|
-
/**
|
|
33
|
-
* Rate limit per IP per minute
|
|
34
|
-
* @default 60
|
|
35
|
-
*/
|
|
36
|
-
rateLimit: zod_1.z.number().default(60),
|
|
37
|
-
});
|
|
38
|
-
/**
|
|
39
|
-
* Local signing configuration (for orchestrated local type)
|
|
40
|
-
*/
|
|
41
|
-
exports.localSigningConfigSchema = zod_1.z.object({
|
|
42
|
-
/**
|
|
43
|
-
* Private key for signing orchestrated tokens
|
|
44
|
-
* @default auto-generated
|
|
45
|
-
*/
|
|
46
|
-
signKey: auth_1.jwkSchema.or(zod_1.z.instanceof(Uint8Array)).optional(),
|
|
47
|
-
/**
|
|
48
|
-
* JWKS for token verification
|
|
49
|
-
* @default auto-generated
|
|
50
|
-
*/
|
|
51
|
-
jwks: auth_1.jsonWebKeySetSchema.optional(),
|
|
52
|
-
/**
|
|
53
|
-
* Issuer identifier for orchestrated tokens
|
|
54
|
-
* @default auto-derived from server URL
|
|
55
|
-
*/
|
|
56
|
-
issuer: zod_1.z.string().optional(),
|
|
57
|
-
});
|
|
58
|
-
/**
|
|
59
|
-
* Remote OAuth provider configuration (for orchestrated remote and transparent)
|
|
60
|
-
*/
|
|
61
|
-
exports.remoteProviderConfigSchema = zod_1.z.object({
|
|
62
|
-
/**
|
|
63
|
-
* OAuth provider base URL
|
|
64
|
-
* @example 'https://auth.example.com'
|
|
65
|
-
*/
|
|
66
|
-
provider: zod_1.z.string().url(),
|
|
67
|
-
/**
|
|
68
|
-
* Provider display name
|
|
69
|
-
*/
|
|
70
|
-
name: zod_1.z.string().optional(),
|
|
71
|
-
/**
|
|
72
|
-
* Unique identifier for this provider
|
|
73
|
-
* @default derived from provider URL
|
|
74
|
-
*/
|
|
75
|
-
id: zod_1.z.string().optional(),
|
|
76
|
-
/**
|
|
77
|
-
* Inline JWKS for offline token verification
|
|
78
|
-
* Falls back to fetching from provider's /.well-known/jwks.json
|
|
79
|
-
*/
|
|
80
|
-
jwks: auth_1.jsonWebKeySetSchema.optional(),
|
|
81
|
-
/**
|
|
82
|
-
* Custom JWKS URI if not at standard path
|
|
83
|
-
*/
|
|
84
|
-
jwksUri: zod_1.z.string().url().optional(),
|
|
85
|
-
/**
|
|
86
|
-
* Client ID for this MCP server (for orchestrated mode)
|
|
87
|
-
*/
|
|
88
|
-
clientId: zod_1.z.string().optional(),
|
|
89
|
-
/**
|
|
90
|
-
* Client secret (for confidential clients in orchestrated mode)
|
|
91
|
-
*/
|
|
92
|
-
clientSecret: zod_1.z.string().optional(),
|
|
93
|
-
/**
|
|
94
|
-
* Scopes to request from the upstream provider
|
|
95
|
-
*/
|
|
96
|
-
scopes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
97
|
-
/**
|
|
98
|
-
* Enable Dynamic Client Registration (DCR)
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
dcrEnabled: zod_1.z.boolean().default(false),
|
|
102
|
-
/**
|
|
103
|
-
* Authorization endpoint override
|
|
104
|
-
*/
|
|
105
|
-
authEndpoint: zod_1.z.string().url().optional(),
|
|
106
|
-
/**
|
|
107
|
-
* Token endpoint override
|
|
108
|
-
*/
|
|
109
|
-
tokenEndpoint: zod_1.z.string().url().optional(),
|
|
110
|
-
/**
|
|
111
|
-
* Registration endpoint override (for DCR)
|
|
112
|
-
*/
|
|
113
|
-
registrationEndpoint: zod_1.z.string().url().optional(),
|
|
114
|
-
/**
|
|
115
|
-
* User info endpoint override
|
|
116
|
-
*/
|
|
117
|
-
userInfoEndpoint: zod_1.z.string().url().optional(),
|
|
118
|
-
});
|
|
119
|
-
/**
|
|
120
|
-
* Token storage configuration for orchestrated mode
|
|
121
|
-
*/
|
|
122
|
-
exports.tokenStorageConfigSchema = zod_1.z.discriminatedUnion('type', [
|
|
123
|
-
zod_1.z.object({ type: zod_1.z.literal('memory') }),
|
|
124
|
-
zod_1.z.object({ type: zod_1.z.literal('redis'), config: transport_session_types_1.redisConfigSchema }),
|
|
125
|
-
]);
|
|
126
|
-
/**
|
|
127
|
-
* Token refresh configuration
|
|
128
|
-
*/
|
|
129
|
-
exports.tokenRefreshConfigSchema = zod_1.z.object({
|
|
130
|
-
/**
|
|
131
|
-
* Enable automatic token refresh
|
|
132
|
-
* @default true
|
|
133
|
-
*/
|
|
134
|
-
enabled: zod_1.z.boolean().default(true),
|
|
135
|
-
/**
|
|
136
|
-
* Refresh token before expiry by this many seconds
|
|
137
|
-
* @default 60
|
|
138
|
-
*/
|
|
139
|
-
skewSeconds: zod_1.z.number().default(60),
|
|
140
|
-
});
|
|
141
|
-
/**
|
|
142
|
-
* Behavior when a tool from a skipped (not yet authorized) app is called
|
|
143
|
-
*/
|
|
144
|
-
exports.skippedAppBehaviorSchema = zod_1.z.enum(['anonymous', 'require-auth']);
|
|
145
|
-
/**
|
|
146
|
-
* Consent configuration for tool selection
|
|
147
|
-
* Allows users to choose which MCP tools to expose to the LLM
|
|
148
|
-
*
|
|
149
|
-
* Note: This schema is the canonical definition. It is duplicated in
|
|
150
|
-
* auth/consent/consent.types.ts for domain-specific use. Both schemas
|
|
151
|
-
* MUST be kept in sync. The duplication exists to avoid circular
|
|
152
|
-
* dependencies between common/ and auth/ modules.
|
|
153
|
-
*/
|
|
154
|
-
exports.consentConfigSchema = zod_1.z.object({
|
|
155
|
-
/**
|
|
156
|
-
* Enable consent flow for tool selection
|
|
157
|
-
* When enabled, users can choose which tools to expose to the LLM
|
|
158
|
-
* @default false
|
|
159
|
-
*/
|
|
160
|
-
enabled: zod_1.z.boolean().default(false),
|
|
161
|
-
/**
|
|
162
|
-
* Group tools by app in the consent UI
|
|
163
|
-
* @default true
|
|
164
|
-
*/
|
|
165
|
-
groupByApp: zod_1.z.boolean().default(true),
|
|
166
|
-
/**
|
|
167
|
-
* Show tool descriptions in consent UI
|
|
168
|
-
* @default true
|
|
169
|
-
*/
|
|
170
|
-
showDescriptions: zod_1.z.boolean().default(true),
|
|
171
|
-
/**
|
|
172
|
-
* Allow selecting all tools at once
|
|
173
|
-
* @default true
|
|
174
|
-
*/
|
|
175
|
-
allowSelectAll: zod_1.z.boolean().default(true),
|
|
176
|
-
/**
|
|
177
|
-
* Require at least one tool to be selected
|
|
178
|
-
* @default true
|
|
179
|
-
*/
|
|
180
|
-
requireSelection: zod_1.z.boolean().default(true),
|
|
181
|
-
/**
|
|
182
|
-
* Custom message to display on consent page
|
|
183
|
-
*/
|
|
184
|
-
customMessage: zod_1.z.string().optional(),
|
|
185
|
-
/**
|
|
186
|
-
* Remember consent for future sessions
|
|
187
|
-
* @default true
|
|
188
|
-
*/
|
|
189
|
-
rememberConsent: zod_1.z.boolean().default(true),
|
|
190
|
-
/**
|
|
191
|
-
* Tools to exclude from consent (always available)
|
|
192
|
-
* Useful for essential tools that should always be accessible
|
|
193
|
-
*/
|
|
194
|
-
excludedTools: zod_1.z.array(zod_1.z.string()).optional(),
|
|
195
|
-
/**
|
|
196
|
-
* Tools to always include in consent (pre-selected)
|
|
197
|
-
*/
|
|
198
|
-
defaultSelectedTools: zod_1.z.array(zod_1.z.string()).optional(),
|
|
199
|
-
});
|
|
200
|
-
/**
|
|
201
|
-
* Progressive/Incremental authorization configuration
|
|
202
|
-
* Allows users to authorize apps one at a time after initial auth
|
|
203
|
-
*/
|
|
204
|
-
exports.incrementalAuthConfigSchema = zod_1.z.object({
|
|
205
|
-
/**
|
|
206
|
-
* Enable incremental (progressive) authorization
|
|
207
|
-
* When enabled, users can skip app authorizations during initial auth
|
|
208
|
-
* and authorize individual apps later when needed
|
|
209
|
-
* @default true
|
|
210
|
-
*/
|
|
211
|
-
enabled: zod_1.z.boolean().default(true),
|
|
212
|
-
/**
|
|
213
|
-
* Behavior when a tool from a skipped app is called
|
|
214
|
-
* - 'anonymous': If app supports anonymous access, use it; otherwise require auth
|
|
215
|
-
* - 'require-auth': Always require authorization (return auth_url)
|
|
216
|
-
* @default 'anonymous'
|
|
217
|
-
*/
|
|
218
|
-
skippedAppBehavior: exports.skippedAppBehaviorSchema.default('anonymous'),
|
|
219
|
-
/**
|
|
220
|
-
* Allow users to skip app authorization during initial auth flow
|
|
221
|
-
* @default true
|
|
222
|
-
*/
|
|
223
|
-
allowSkip: zod_1.z.boolean().default(true),
|
|
224
|
-
/**
|
|
225
|
-
* Show all apps in a single authorization page (vs step-by-step)
|
|
226
|
-
* @default true
|
|
227
|
-
*/
|
|
228
|
-
showAllAppsAtOnce: zod_1.z.boolean().default(true),
|
|
229
|
-
});
|
|
230
|
-
// ============================================
|
|
231
|
-
// TRANSPORT CONFIG (DEPRECATED)
|
|
232
|
-
// These schemas are kept for backward compatibility during migration.
|
|
233
|
-
// Use top-level transport config instead.
|
|
234
|
-
// DELETE after v1.0.0
|
|
235
|
-
// ============================================
|
|
236
|
-
/**
|
|
237
|
-
* @deprecated Use top-level transport config instead. This will be removed in v1.0.0.
|
|
238
|
-
*/
|
|
239
|
-
exports.transportRecreationConfigSchema = zod_1.z
|
|
240
|
-
.object({
|
|
241
|
-
enabled: zod_1.z.boolean().default(false),
|
|
242
|
-
redis: transport_session_types_1.redisConfigSchema.optional(),
|
|
243
|
-
defaultTtlMs: zod_1.z.number().int().positive().default(3600000),
|
|
244
|
-
})
|
|
245
|
-
.refine((data) => {
|
|
246
|
-
if (data.enabled && !data.redis) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
return true;
|
|
250
|
-
}, {
|
|
251
|
-
message: 'Redis configuration is required when transport recreation is enabled',
|
|
252
|
-
path: ['redis'],
|
|
253
|
-
});
|
|
254
|
-
/**
|
|
255
|
-
* @deprecated Use top-level transport config instead. This will be removed in v1.0.0.
|
|
256
|
-
*/
|
|
257
|
-
exports.transportConfigSchema = zod_1.z.object({
|
|
258
|
-
enableLegacySSE: zod_1.z.boolean().default(false),
|
|
259
|
-
enableSseListener: zod_1.z.boolean().default(true),
|
|
260
|
-
enableStreamableHttp: zod_1.z.boolean().default(true),
|
|
261
|
-
enableStatelessHttp: zod_1.z.boolean().default(false),
|
|
262
|
-
enableStatefulHttp: zod_1.z.boolean().default(false),
|
|
263
|
-
requireSessionForStreamable: zod_1.z.boolean().default(true),
|
|
264
|
-
recreation: zod_1.z.lazy(() => exports.transportRecreationConfigSchema).optional(),
|
|
265
|
-
});
|
|
266
|
-
// ============================================
|
|
267
|
-
// PUBLIC MODE
|
|
268
|
-
// No authentication required, anonymous access
|
|
269
|
-
// ============================================
|
|
270
|
-
exports.publicAuthOptionsSchema = zod_1.z.object({
|
|
271
|
-
mode: zod_1.z.literal('public'),
|
|
272
|
-
/**
|
|
273
|
-
* Issuer identifier for anonymous JWTs
|
|
274
|
-
* @default auto-derived from server URL
|
|
275
|
-
*/
|
|
276
|
-
issuer: zod_1.z.string().optional(),
|
|
277
|
-
/**
|
|
278
|
-
* Anonymous session TTL in seconds
|
|
279
|
-
* @default 3600 (1 hour)
|
|
280
|
-
*/
|
|
281
|
-
sessionTtl: zod_1.z.number().default(3600),
|
|
282
|
-
/**
|
|
283
|
-
* Scopes granted to anonymous sessions
|
|
284
|
-
* @default ['anonymous']
|
|
285
|
-
*/
|
|
286
|
-
anonymousScopes: zod_1.z.array(zod_1.z.string()).default(['anonymous']),
|
|
287
|
-
/**
|
|
288
|
-
* Tool/prompt access configuration for anonymous users
|
|
289
|
-
*/
|
|
290
|
-
publicAccess: exports.publicAccessConfigSchema.optional(),
|
|
291
|
-
/**
|
|
292
|
-
* JWKS for token verification
|
|
293
|
-
* @default auto-generated
|
|
294
|
-
*/
|
|
295
|
-
jwks: auth_1.jsonWebKeySetSchema.optional(),
|
|
296
|
-
/**
|
|
297
|
-
* Private key for signing anonymous tokens
|
|
298
|
-
* @default auto-generated
|
|
299
|
-
*/
|
|
300
|
-
signKey: auth_1.jwkSchema.or(zod_1.z.instanceof(Uint8Array)).optional(),
|
|
301
|
-
/**
|
|
302
|
-
* @deprecated Use top-level transport config instead. Kept for backward compatibility.
|
|
303
|
-
*/
|
|
304
|
-
transport: exports.transportConfigSchema.optional(),
|
|
305
|
-
});
|
|
306
|
-
// ============================================
|
|
307
|
-
// TRANSPARENT MODE
|
|
308
|
-
// Pass-through OAuth tokens from remote provider
|
|
309
|
-
// ============================================
|
|
310
|
-
exports.transparentAuthOptionsSchema = zod_1.z.object({
|
|
311
|
-
mode: zod_1.z.literal('transparent'),
|
|
312
|
-
/**
|
|
313
|
-
* Remote OAuth provider configuration (required)
|
|
314
|
-
*/
|
|
315
|
-
remote: exports.remoteProviderConfigSchema,
|
|
316
|
-
/**
|
|
317
|
-
* Expected token audience
|
|
318
|
-
* If not set, defaults to the resource URL
|
|
319
|
-
*/
|
|
320
|
-
expectedAudience: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
321
|
-
/**
|
|
322
|
-
* Required scopes for access
|
|
323
|
-
* Empty array means any valid token is accepted
|
|
324
|
-
* @default []
|
|
325
|
-
*/
|
|
326
|
-
requiredScopes: zod_1.z.array(zod_1.z.string()).default([]),
|
|
327
|
-
/**
|
|
328
|
-
* Allow anonymous fallback when no token is provided
|
|
329
|
-
* @default false
|
|
330
|
-
*/
|
|
331
|
-
allowAnonymous: zod_1.z.boolean().default(false),
|
|
332
|
-
/**
|
|
333
|
-
* Scopes granted to anonymous sessions (when allowAnonymous=true)
|
|
334
|
-
* @default ['anonymous']
|
|
335
|
-
*/
|
|
336
|
-
anonymousScopes: zod_1.z.array(zod_1.z.string()).default(['anonymous']),
|
|
337
|
-
/**
|
|
338
|
-
* Public access config for anonymous users (when allowAnonymous=true)
|
|
339
|
-
*/
|
|
340
|
-
publicAccess: exports.publicAccessConfigSchema.optional(),
|
|
341
|
-
/**
|
|
342
|
-
* @deprecated Use top-level transport config instead. Kept for backward compatibility.
|
|
343
|
-
*/
|
|
344
|
-
transport: exports.transportConfigSchema.optional(),
|
|
345
|
-
});
|
|
346
|
-
// ============================================
|
|
347
|
-
// ORCHESTRATED MODE
|
|
348
|
-
// Local auth server that can proxy to remote or be fully local
|
|
349
|
-
// ============================================
|
|
350
|
-
/**
|
|
351
|
-
* Orchestrated mode with local authentication only
|
|
352
|
-
*/
|
|
353
|
-
exports.orchestratedLocalSchema = zod_1.z.object({
|
|
354
|
-
mode: zod_1.z.literal('orchestrated'),
|
|
355
|
-
type: zod_1.z.literal('local'),
|
|
356
|
-
/**
|
|
357
|
-
* Local signing configuration
|
|
358
|
-
*/
|
|
359
|
-
local: exports.localSigningConfigSchema.optional(),
|
|
360
|
-
/**
|
|
361
|
-
* Token storage configuration
|
|
362
|
-
* @default { type: 'memory' }
|
|
363
|
-
*/
|
|
364
|
-
tokenStorage: exports.tokenStorageConfigSchema.default({ type: 'memory' }),
|
|
365
|
-
/**
|
|
366
|
-
* Session storage mode
|
|
367
|
-
* - 'stateful': Store sessions in Redis/memory, JWT contains only reference
|
|
368
|
-
* - 'stateless': All state encrypted in JWT
|
|
369
|
-
* @default 'stateful'
|
|
370
|
-
*/
|
|
371
|
-
sessionMode: zod_1.z.enum(['stateful', 'stateless']).default('stateful'),
|
|
372
|
-
/**
|
|
373
|
-
* Allow default public access for unauthenticated requests
|
|
374
|
-
* When true: all tools are public by default, only tools marked with scopes require auth
|
|
375
|
-
* When false: all tools require authentication by default
|
|
376
|
-
* @default false
|
|
377
|
-
*/
|
|
378
|
-
allowDefaultPublic: zod_1.z.boolean().default(false),
|
|
379
|
-
/**
|
|
380
|
-
* Scopes granted to anonymous sessions (when allowDefaultPublic=true)
|
|
381
|
-
* @default ['anonymous']
|
|
382
|
-
*/
|
|
383
|
-
anonymousScopes: zod_1.z.array(zod_1.z.string()).default(['anonymous']),
|
|
384
|
-
/**
|
|
385
|
-
* Public access config (when allowDefaultPublic=true)
|
|
386
|
-
*/
|
|
387
|
-
publicAccess: exports.publicAccessConfigSchema.optional(),
|
|
388
|
-
/**
|
|
389
|
-
* Consent flow configuration for tool selection
|
|
390
|
-
* Allows users to choose which MCP tools to expose to the LLM
|
|
391
|
-
* @default { enabled: false }
|
|
392
|
-
*/
|
|
393
|
-
consent: exports.consentConfigSchema.optional(),
|
|
394
|
-
/**
|
|
395
|
-
* Token refresh settings
|
|
396
|
-
*/
|
|
397
|
-
refresh: exports.tokenRefreshConfigSchema.optional(),
|
|
398
|
-
/**
|
|
399
|
-
* Expected token audience for validation
|
|
400
|
-
*/
|
|
401
|
-
expectedAudience: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
402
|
-
/**
|
|
403
|
-
* Incremental (progressive) authorization configuration
|
|
404
|
-
* Allows users to skip app authorizations initially and authorize later
|
|
405
|
-
* @default { enabled: true, skippedAppBehavior: 'anonymous' }
|
|
406
|
-
*/
|
|
407
|
-
incrementalAuth: exports.incrementalAuthConfigSchema.optional(),
|
|
408
|
-
/**
|
|
409
|
-
* @deprecated Use top-level transport config instead. Kept for backward compatibility.
|
|
410
|
-
*/
|
|
411
|
-
transport: exports.transportConfigSchema.optional(),
|
|
412
|
-
});
|
|
413
|
-
/**
|
|
414
|
-
* Orchestrated mode with remote OAuth provider
|
|
415
|
-
*/
|
|
416
|
-
exports.orchestratedRemoteSchema = zod_1.z.object({
|
|
417
|
-
mode: zod_1.z.literal('orchestrated'),
|
|
418
|
-
type: zod_1.z.literal('remote'),
|
|
419
|
-
/**
|
|
420
|
-
* Remote OAuth provider configuration (required for remote type)
|
|
421
|
-
*/
|
|
422
|
-
remote: exports.remoteProviderConfigSchema,
|
|
423
|
-
/**
|
|
424
|
-
* Local signing configuration (for issuing local tokens after upstream auth)
|
|
425
|
-
*/
|
|
426
|
-
local: exports.localSigningConfigSchema.optional(),
|
|
427
|
-
/**
|
|
428
|
-
* Token storage configuration
|
|
429
|
-
* @default { type: 'memory' }
|
|
430
|
-
*/
|
|
431
|
-
tokenStorage: exports.tokenStorageConfigSchema.default({ type: 'memory' }),
|
|
432
|
-
/**
|
|
433
|
-
* Session storage mode
|
|
434
|
-
* - 'stateful': Store sessions in Redis/memory, JWT contains only reference
|
|
435
|
-
* - 'stateless': All state encrypted in JWT
|
|
436
|
-
* @default 'stateful'
|
|
437
|
-
*/
|
|
438
|
-
sessionMode: zod_1.z.enum(['stateful', 'stateless']).default('stateful'),
|
|
439
|
-
/**
|
|
440
|
-
* Allow default public access for unauthenticated requests
|
|
441
|
-
* When true: all tools are public by default, only tools marked with scopes require auth
|
|
442
|
-
* When false: all tools require authentication by default
|
|
443
|
-
* @default false
|
|
444
|
-
*/
|
|
445
|
-
allowDefaultPublic: zod_1.z.boolean().default(false),
|
|
446
|
-
/**
|
|
447
|
-
* Scopes granted to anonymous sessions (when allowDefaultPublic=true)
|
|
448
|
-
* @default ['anonymous']
|
|
449
|
-
*/
|
|
450
|
-
anonymousScopes: zod_1.z.array(zod_1.z.string()).default(['anonymous']),
|
|
451
|
-
/**
|
|
452
|
-
* Public access config (when allowDefaultPublic=true)
|
|
453
|
-
*/
|
|
454
|
-
publicAccess: exports.publicAccessConfigSchema.optional(),
|
|
455
|
-
/**
|
|
456
|
-
* Consent flow configuration for tool selection
|
|
457
|
-
* Allows users to choose which MCP tools to expose to the LLM
|
|
458
|
-
* @default { enabled: false }
|
|
459
|
-
*/
|
|
460
|
-
consent: exports.consentConfigSchema.optional(),
|
|
461
|
-
/**
|
|
462
|
-
* Token refresh settings
|
|
463
|
-
*/
|
|
464
|
-
refresh: exports.tokenRefreshConfigSchema.optional(),
|
|
465
|
-
/**
|
|
466
|
-
* Expected token audience for validation
|
|
467
|
-
*/
|
|
468
|
-
expectedAudience: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
469
|
-
/**
|
|
470
|
-
* Incremental (progressive) authorization configuration
|
|
471
|
-
* Allows users to skip app authorizations initially and authorize later
|
|
472
|
-
* @default { enabled: true, skippedAppBehavior: 'anonymous' }
|
|
473
|
-
*/
|
|
474
|
-
incrementalAuth: exports.incrementalAuthConfigSchema.optional(),
|
|
475
|
-
/**
|
|
476
|
-
* @deprecated Use top-level transport config instead. Kept for backward compatibility.
|
|
477
|
-
*/
|
|
478
|
-
transport: exports.transportConfigSchema.optional(),
|
|
479
|
-
});
|
|
480
|
-
// Combined orchestrated schema
|
|
481
|
-
exports.orchestratedAuthOptionsSchema = zod_1.z.discriminatedUnion('type', [
|
|
482
|
-
exports.orchestratedLocalSchema,
|
|
483
|
-
exports.orchestratedRemoteSchema,
|
|
484
|
-
]);
|
|
485
|
-
// ============================================
|
|
486
|
-
// UNIFIED AUTH OPTIONS
|
|
487
|
-
// ============================================
|
|
488
|
-
/**
|
|
489
|
-
* Main auth options schema - discriminated by 'mode'
|
|
490
|
-
*
|
|
491
|
-
* Uses z.union because we have nested discriminators (orchestrated has 'type')
|
|
492
|
-
*/
|
|
493
|
-
exports.authOptionsSchema = zod_1.z.union([
|
|
494
|
-
exports.publicAuthOptionsSchema,
|
|
495
|
-
exports.transparentAuthOptionsSchema,
|
|
496
|
-
exports.orchestratedLocalSchema,
|
|
497
|
-
exports.orchestratedRemoteSchema,
|
|
498
|
-
]);
|
|
499
|
-
const standaloneOptionSchema = {
|
|
500
|
-
standalone: zod_1.z.boolean().optional(),
|
|
501
|
-
excludeFromParent: zod_1.z.boolean().optional(),
|
|
502
|
-
};
|
|
503
|
-
exports.appAuthOptionsSchema = zod_1.z.union([
|
|
504
|
-
exports.publicAuthOptionsSchema.extend(standaloneOptionSchema),
|
|
505
|
-
exports.transparentAuthOptionsSchema.extend(standaloneOptionSchema),
|
|
506
|
-
exports.orchestratedLocalSchema.extend(standaloneOptionSchema),
|
|
507
|
-
exports.orchestratedRemoteSchema.extend(standaloneOptionSchema),
|
|
508
|
-
]);
|
|
509
|
-
// ============================================
|
|
510
|
-
// HELPER FUNCTIONS
|
|
511
|
-
// ============================================
|
|
512
|
-
/**
|
|
513
|
-
* Parse and validate auth options with defaults
|
|
514
|
-
*/
|
|
515
|
-
function parseAuthOptions(input) {
|
|
516
|
-
return exports.authOptionsSchema.parse(input);
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Check if options are public mode
|
|
520
|
-
*/
|
|
521
|
-
function isPublicMode(options) {
|
|
522
|
-
return options.mode === 'public';
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Check if options are transparent mode
|
|
526
|
-
*/
|
|
527
|
-
function isTransparentMode(options) {
|
|
528
|
-
return options.mode === 'transparent';
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
* Check if options are orchestrated mode
|
|
532
|
-
*/
|
|
533
|
-
function isOrchestratedMode(options) {
|
|
534
|
-
return options.mode === 'orchestrated';
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* Check if orchestrated options are local type
|
|
538
|
-
*/
|
|
539
|
-
function isOrchestratedLocal(options) {
|
|
540
|
-
return options.type === 'local';
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Check if orchestrated options are remote type
|
|
544
|
-
*/
|
|
545
|
-
function isOrchestratedRemote(options) {
|
|
546
|
-
return options.type === 'remote';
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Check if options allow public/anonymous access
|
|
550
|
-
*/
|
|
551
|
-
function allowsPublicAccess(options) {
|
|
552
|
-
if (options.mode === 'public')
|
|
553
|
-
return true;
|
|
554
|
-
if (options.mode === 'transparent')
|
|
555
|
-
return options.allowAnonymous;
|
|
556
|
-
if (options.mode === 'orchestrated')
|
|
557
|
-
return options.allowDefaultPublic;
|
|
558
|
-
return false;
|
|
559
|
-
}
|
|
560
|
-
//# sourceMappingURL=auth.options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.options.js","sourceRoot":"","sources":["../../../../../src/common/types/options/auth.options.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAyuBvC,4CAEC;AAKD,oCAEC;AAKD,8CAEC;AAKD,gDAEC;AAKD,kDAEC;AAKD,oDAEC;AAKD,gDAKC;AAtxBD,6BAAwB;AACxB,kCAA6E;AAE7E,2FAA+F;AAE/F,+CAA+C;AAC/C,iBAAiB;AACjB,+CAA+C;AAE/C;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C;;;OAGG;IACH,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEtE;;;OAGG;IACH,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAExE;;;OAGG;IACH,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C;;;OAGG;IACH,OAAO,EAAE,gBAAS,CAAC,EAAE,CAAC,OAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,E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AC,IAAI,KAAK,cAAc,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAC,OAAgC;IAClE,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAAC,OAAgC;IACnE,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,OAAoB;IACrD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,OAAO,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,OAAO,CAAC,cAAc,CAAC;IAClE,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc;QAAE,OAAO,OAAO,CAAC,kBAAkB,CAAC;IACvE,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// common/types/options/auth.options.ts\n\nimport { z } from 'zod';\nimport { JSONWebKeySet, jsonWebKeySetSchema, JWK, jwkSchema } from '../auth';\nimport { RawZodShape } from '../common.types';\nimport { RedisConfig, redisConfigSchema } from '../../../auth/session/transport-session.types';\n\n// ============================================\n// SHARED SCHEMAS\n// ============================================\n\n/**\n * Public access configuration for tools/prompts\n */\nexport const publicAccessConfigSchema = z.object({\n /**\n * Allow all tools or explicit whitelist\n * @default 'all'\n */\n tools: z.union([z.literal('all'), z.array(z.string())]).default('all'),\n\n /**\n * Allow all prompts or explicit whitelist\n * @default 'all'\n */\n prompts: z.union([z.literal('all'), z.array(z.string())]).default('all'),\n\n /**\n * Rate limit per IP per minute\n * @default 60\n */\n rateLimit: z.number().default(60),\n});\n\n/**\n * Local signing configuration (for orchestrated local type)\n */\nexport const localSigningConfigSchema = z.object({\n /**\n * Private key for signing orchestrated tokens\n * @default auto-generated\n */\n signKey: jwkSchema.or(z.instanceof(Uint8Array)).optional(),\n\n /**\n * JWKS for token verification\n * @default auto-generated\n */\n jwks: jsonWebKeySetSchema.optional(),\n\n /**\n * Issuer identifier for orchestrated tokens\n * @default auto-derived from server URL\n */\n issuer: z.string().optional(),\n});\n\n/**\n * Remote OAuth provider configuration (for orchestrated remote and transparent)\n */\nexport const remoteProviderConfigSchema = z.object({\n /**\n * OAuth provider base URL\n * @example 'https://auth.example.com'\n */\n provider: z.string().url(),\n\n /**\n * Provider display name\n */\n name: z.string().optional(),\n\n /**\n * Unique identifier for this provider\n * @default derived from provider URL\n */\n id: z.string().optional(),\n\n /**\n * Inline JWKS for offline token verification\n * Falls back to fetching from provider's /.well-known/jwks.json\n */\n jwks: jsonWebKeySetSchema.optional(),\n\n /**\n * Custom JWKS URI if not at standard path\n */\n jwksUri: z.string().url().optional(),\n\n /**\n * Client ID for this MCP server (for orchestrated mode)\n */\n clientId: z.string().optional(),\n\n /**\n * Client secret (for confidential clients in orchestrated mode)\n */\n clientSecret: z.string().optional(),\n\n /**\n * Scopes to request from the upstream provider\n */\n scopes: z.array(z.string()).optional(),\n\n /**\n * Enable Dynamic Client Registration (DCR)\n * @default false\n */\n dcrEnabled: z.boolean().default(false),\n\n /**\n * Authorization endpoint override\n */\n authEndpoint: z.string().url().optional(),\n\n /**\n * Token endpoint override\n */\n tokenEndpoint: z.string().url().optional(),\n\n /**\n * Registration endpoint override (for DCR)\n */\n registrationEndpoint: z.string().url().optional(),\n\n /**\n * User info endpoint override\n */\n userInfoEndpoint: z.string().url().optional(),\n});\n\n/**\n * Token storage configuration for orchestrated mode\n */\nexport const tokenStorageConfigSchema = z.discriminatedUnion('type', [\n z.object({ type: z.literal('memory') }),\n z.object({ type: z.literal('redis'), config: redisConfigSchema }),\n]);\n\n/**\n * Token refresh configuration\n */\nexport const tokenRefreshConfigSchema = z.object({\n /**\n * Enable automatic token refresh\n * @default true\n */\n enabled: z.boolean().default(true),\n\n /**\n * Refresh token before expiry by this many seconds\n * @default 60\n */\n skewSeconds: z.number().default(60),\n});\n\n/**\n * Behavior when a tool from a skipped (not yet authorized) app is called\n */\nexport const skippedAppBehaviorSchema = z.enum(['anonymous', 'require-auth']);\n\n/**\n * Consent configuration for tool selection\n * Allows users to choose which MCP tools to expose to the LLM\n *\n * Note: This schema is the canonical definition. It is duplicated in\n * auth/consent/consent.types.ts for domain-specific use. Both schemas\n * MUST be kept in sync. The duplication exists to avoid circular\n * dependencies between common/ and auth/ modules.\n */\nexport const consentConfigSchema = z.object({\n /**\n * Enable consent flow for tool selection\n * When enabled, users can choose which tools to expose to the LLM\n * @default false\n */\n enabled: z.boolean().default(false),\n\n /**\n * Group tools by app in the consent UI\n * @default true\n */\n groupByApp: z.boolean().default(true),\n\n /**\n * Show tool descriptions in consent UI\n * @default true\n */\n showDescriptions: z.boolean().default(true),\n\n /**\n * Allow selecting all tools at once\n * @default true\n */\n allowSelectAll: z.boolean().default(true),\n\n /**\n * Require at least one tool to be selected\n * @default true\n */\n requireSelection: z.boolean().default(true),\n\n /**\n * Custom message to display on consent page\n */\n customMessage: z.string().optional(),\n\n /**\n * Remember consent for future sessions\n * @default true\n */\n rememberConsent: z.boolean().default(true),\n\n /**\n * Tools to exclude from consent (always available)\n * Useful for essential tools that should always be accessible\n */\n excludedTools: z.array(z.string()).optional(),\n\n /**\n * Tools to always include in consent (pre-selected)\n */\n defaultSelectedTools: z.array(z.string()).optional(),\n});\n\n/**\n * Progressive/Incremental authorization configuration\n * Allows users to authorize apps one at a time after initial auth\n */\nexport const incrementalAuthConfigSchema = z.object({\n /**\n * Enable incremental (progressive) authorization\n * When enabled, users can skip app authorizations during initial auth\n * and authorize individual apps later when needed\n * @default true\n */\n enabled: z.boolean().default(true),\n\n /**\n * Behavior when a tool from a skipped app is called\n * - 'anonymous': If app supports anonymous access, use it; otherwise require auth\n * - 'require-auth': Always require authorization (return auth_url)\n * @default 'anonymous'\n */\n skippedAppBehavior: skippedAppBehaviorSchema.default('anonymous'),\n\n /**\n * Allow users to skip app authorization during initial auth flow\n * @default true\n */\n allowSkip: z.boolean().default(true),\n\n /**\n * Show all apps in a single authorization page (vs step-by-step)\n * @default true\n */\n showAllAppsAtOnce: z.boolean().default(true),\n});\n\n// ============================================\n// TRANSPORT CONFIG (DEPRECATED)\n// These schemas are kept for backward compatibility during migration.\n// Use top-level transport config instead.\n// DELETE after v1.0.0\n// ============================================\n\n/**\n * @deprecated Use top-level transport config instead. This will be removed in v1.0.0.\n */\nexport const transportRecreationConfigSchema = z\n .object({\n enabled: z.boolean().default(false),\n redis: redisConfigSchema.optional(),\n defaultTtlMs: z.number().int().positive().default(3600000),\n })\n .refine(\n (data) => {\n if (data.enabled && !data.redis) {\n return false;\n }\n return true;\n },\n {\n message: 'Redis configuration is required when transport recreation is enabled',\n path: ['redis'],\n },\n );\n\n/**\n * @deprecated Use top-level transport config instead. This will be removed in v1.0.0.\n */\nexport const transportConfigSchema = z.object({\n enableLegacySSE: z.boolean().default(false),\n enableSseListener: z.boolean().default(true),\n enableStreamableHttp: z.boolean().default(true),\n enableStatelessHttp: z.boolean().default(false),\n enableStatefulHttp: z.boolean().default(false),\n requireSessionForStreamable: z.boolean().default(true),\n recreation: z.lazy(() => transportRecreationConfigSchema).optional(),\n});\n\n// ============================================\n// PUBLIC MODE\n// No authentication required, anonymous access\n// ============================================\n\nexport const publicAuthOptionsSchema = z.object({\n mode: z.literal('public'),\n\n /**\n * Issuer identifier for anonymous JWTs\n * @default auto-derived from server URL\n */\n issuer: z.string().optional(),\n\n /**\n * Anonymous session TTL in seconds\n * @default 3600 (1 hour)\n */\n sessionTtl: z.number().default(3600),\n\n /**\n * Scopes granted to anonymous sessions\n * @default ['anonymous']\n */\n anonymousScopes: z.array(z.string()).default(['anonymous']),\n\n /**\n * Tool/prompt access configuration for anonymous users\n */\n publicAccess: publicAccessConfigSchema.optional(),\n\n /**\n * JWKS for token verification\n * @default auto-generated\n */\n jwks: jsonWebKeySetSchema.optional(),\n\n /**\n * Private key for signing anonymous tokens\n * @default auto-generated\n */\n signKey: jwkSchema.or(z.instanceof(Uint8Array)).optional(),\n\n /**\n * @deprecated Use top-level transport config instead. Kept for backward compatibility.\n */\n transport: transportConfigSchema.optional(),\n});\n\n// ============================================\n// TRANSPARENT MODE\n// Pass-through OAuth tokens from remote provider\n// ============================================\n\nexport const transparentAuthOptionsSchema = z.object({\n mode: z.literal('transparent'),\n\n /**\n * Remote OAuth provider configuration (required)\n */\n remote: remoteProviderConfigSchema,\n\n /**\n * Expected token audience\n * If not set, defaults to the resource URL\n */\n expectedAudience: z.union([z.string(), z.array(z.string())]).optional(),\n\n /**\n * Required scopes for access\n * Empty array means any valid token is accepted\n * @default []\n */\n requiredScopes: z.array(z.string()).default([]),\n\n /**\n * Allow anonymous fallback when no token is provided\n * @default false\n */\n allowAnonymous: z.boolean().default(false),\n\n /**\n * Scopes granted to anonymous sessions (when allowAnonymous=true)\n * @default ['anonymous']\n */\n anonymousScopes: z.array(z.string()).default(['anonymous']),\n\n /**\n * Public access config for anonymous users (when allowAnonymous=true)\n */\n publicAccess: publicAccessConfigSchema.optional(),\n\n /**\n * @deprecated Use top-level transport config instead. Kept for backward compatibility.\n */\n transport: transportConfigSchema.optional(),\n});\n\n// ============================================\n// ORCHESTRATED MODE\n// Local auth server that can proxy to remote or be fully local\n// ============================================\n\n/**\n * Orchestrated mode with local authentication only\n */\nexport const orchestratedLocalSchema = z.object({\n mode: z.literal('orchestrated'),\n type: z.literal('local'),\n\n /**\n * Local signing configuration\n */\n local: localSigningConfigSchema.optional(),\n\n /**\n * Token storage configuration\n * @default { type: 'memory' }\n */\n tokenStorage: tokenStorageConfigSchema.default({ type: 'memory' }),\n\n /**\n * Session storage mode\n * - 'stateful': Store sessions in Redis/memory, JWT contains only reference\n * - 'stateless': All state encrypted in JWT\n * @default 'stateful'\n */\n sessionMode: z.enum(['stateful', 'stateless']).default('stateful'),\n\n /**\n * Allow default public access for unauthenticated requests\n * When true: all tools are public by default, only tools marked with scopes require auth\n * When false: all tools require authentication by default\n * @default false\n */\n allowDefaultPublic: z.boolean().default(false),\n\n /**\n * Scopes granted to anonymous sessions (when allowDefaultPublic=true)\n * @default ['anonymous']\n */\n anonymousScopes: z.array(z.string()).default(['anonymous']),\n\n /**\n * Public access config (when allowDefaultPublic=true)\n */\n publicAccess: publicAccessConfigSchema.optional(),\n\n /**\n * Consent flow configuration for tool selection\n * Allows users to choose which MCP tools to expose to the LLM\n * @default { enabled: false }\n */\n consent: consentConfigSchema.optional(),\n\n /**\n * Token refresh settings\n */\n refresh: tokenRefreshConfigSchema.optional(),\n\n /**\n * Expected token audience for validation\n */\n expectedAudience: z.union([z.string(), z.array(z.string())]).optional(),\n\n /**\n * Incremental (progressive) authorization configuration\n * Allows users to skip app authorizations initially and authorize later\n * @default { enabled: true, skippedAppBehavior: 'anonymous' }\n */\n incrementalAuth: incrementalAuthConfigSchema.optional(),\n\n /**\n * @deprecated Use top-level transport config instead. Kept for backward compatibility.\n */\n transport: transportConfigSchema.optional(),\n});\n\n/**\n * Orchestrated mode with remote OAuth provider\n */\nexport const orchestratedRemoteSchema = z.object({\n mode: z.literal('orchestrated'),\n type: z.literal('remote'),\n\n /**\n * Remote OAuth provider configuration (required for remote type)\n */\n remote: remoteProviderConfigSchema,\n\n /**\n * Local signing configuration (for issuing local tokens after upstream auth)\n */\n local: localSigningConfigSchema.optional(),\n\n /**\n * Token storage configuration\n * @default { type: 'memory' }\n */\n tokenStorage: tokenStorageConfigSchema.default({ type: 'memory' }),\n\n /**\n * Session storage mode\n * - 'stateful': Store sessions in Redis/memory, JWT contains only reference\n * - 'stateless': All state encrypted in JWT\n * @default 'stateful'\n */\n sessionMode: z.enum(['stateful', 'stateless']).default('stateful'),\n\n /**\n * Allow default public access for unauthenticated requests\n * When true: all tools are public by default, only tools marked with scopes require auth\n * When false: all tools require authentication by default\n * @default false\n */\n allowDefaultPublic: z.boolean().default(false),\n\n /**\n * Scopes granted to anonymous sessions (when allowDefaultPublic=true)\n * @default ['anonymous']\n */\n anonymousScopes: z.array(z.string()).default(['anonymous']),\n\n /**\n * Public access config (when allowDefaultPublic=true)\n */\n publicAccess: publicAccessConfigSchema.optional(),\n\n /**\n * Consent flow configuration for tool selection\n * Allows users to choose which MCP tools to expose to the LLM\n * @default { enabled: false }\n */\n consent: consentConfigSchema.optional(),\n\n /**\n * Token refresh settings\n */\n refresh: tokenRefreshConfigSchema.optional(),\n\n /**\n * Expected token audience for validation\n */\n expectedAudience: z.union([z.string(), z.array(z.string())]).optional(),\n\n /**\n * Incremental (progressive) authorization configuration\n * Allows users to skip app authorizations initially and authorize later\n * @default { enabled: true, skippedAppBehavior: 'anonymous' }\n */\n incrementalAuth: incrementalAuthConfigSchema.optional(),\n\n /**\n * @deprecated Use top-level transport config instead. Kept for backward compatibility.\n */\n transport: transportConfigSchema.optional(),\n});\n\n// Combined orchestrated schema\nexport const orchestratedAuthOptionsSchema = z.discriminatedUnion('type', [\n orchestratedLocalSchema,\n orchestratedRemoteSchema,\n]);\n\n// ============================================\n// UNIFIED AUTH OPTIONS\n// ============================================\n\n/**\n * Main auth options schema - discriminated by 'mode'\n *\n * Uses z.union because we have nested discriminators (orchestrated has 'type')\n */\nexport const authOptionsSchema = z.union([\n publicAuthOptionsSchema,\n transparentAuthOptionsSchema,\n orchestratedLocalSchema,\n orchestratedRemoteSchema,\n]);\n\n// ============================================\n// TYPE EXPORTS\n// ============================================\n\n/**\n * Public access configuration\n */\nexport type PublicAccessConfig = z.infer<typeof publicAccessConfigSchema>;\nexport type PublicAccessConfigInput = z.input<typeof publicAccessConfigSchema>;\n\n/**\n * Local signing configuration\n */\nexport type LocalSigningConfig = z.infer<typeof localSigningConfigSchema>;\nexport type LocalSigningConfigInput = z.input<typeof localSigningConfigSchema>;\n\n/**\n * Remote provider configuration\n */\nexport type RemoteProviderConfig = z.infer<typeof remoteProviderConfigSchema>;\nexport type RemoteProviderConfigInput = z.input<typeof remoteProviderConfigSchema>;\n\n/**\n * Token storage configuration\n */\nexport type TokenStorageConfig = z.infer<typeof tokenStorageConfigSchema>;\nexport type TokenStorageConfigInput = z.input<typeof tokenStorageConfigSchema>;\n\n/**\n * Token refresh configuration\n */\nexport type TokenRefreshConfig = z.infer<typeof tokenRefreshConfigSchema>;\nexport type TokenRefreshConfigInput = z.input<typeof tokenRefreshConfigSchema>;\n\n/**\n * Incremental (progressive) authorization configuration\n */\nexport type IncrementalAuthConfig = z.infer<typeof incrementalAuthConfigSchema>;\nexport type IncrementalAuthConfigInput = z.input<typeof incrementalAuthConfigSchema>;\n\n/**\n * Skipped app behavior type\n */\nexport type SkippedAppBehavior = z.infer<typeof skippedAppBehaviorSchema>;\n\n/**\n * Consent configuration for tool selection\n */\nexport type ConsentConfig = z.infer<typeof consentConfigSchema>;\nexport type ConsentConfigInput = z.input<typeof consentConfigSchema>;\n\n/**\n * @deprecated Use TransportOptions from transport.options.ts instead\n */\nexport type TransportConfig = z.infer<typeof transportConfigSchema>;\n/**\n * @deprecated Use TransportOptionsInput from transport.options.ts instead\n */\nexport type TransportConfigInput = z.input<typeof transportConfigSchema>;\n\n/**\n * @deprecated Use TransportPersistenceConfig from transport.options.ts instead\n */\nexport type TransportRecreationConfig = z.infer<typeof transportRecreationConfigSchema>;\n/**\n * @deprecated Use TransportPersistenceConfigInput from transport.options.ts instead\n */\nexport type TransportRecreationConfigInput = z.input<typeof transportRecreationConfigSchema>;\n\n/**\n * Public mode options (output type with defaults applied)\n */\nexport type PublicAuthOptions = z.infer<typeof publicAuthOptionsSchema>;\nexport type PublicAuthOptionsInput = z.input<typeof publicAuthOptionsSchema>;\n\n/**\n * Transparent mode options (output type with defaults applied)\n */\nexport type TransparentAuthOptions = z.infer<typeof transparentAuthOptionsSchema>;\nexport type TransparentAuthOptionsInput = z.input<typeof transparentAuthOptionsSchema>;\n\n/**\n * Orchestrated local mode options\n */\nexport type OrchestratedLocalOptions = z.infer<typeof orchestratedLocalSchema>;\nexport type OrchestratedLocalOptionsInput = z.input<typeof orchestratedLocalSchema>;\n\n/**\n * Orchestrated remote mode options\n */\nexport type OrchestratedRemoteOptions = z.infer<typeof orchestratedRemoteSchema>;\nexport type OrchestratedRemoteOptionsInput = z.input<typeof orchestratedRemoteSchema>;\n\n/**\n * Orchestrated mode options (union of local and remote)\n */\nexport type OrchestratedAuthOptions = z.infer<typeof orchestratedAuthOptionsSchema>;\nexport type OrchestratedAuthOptionsInput = z.input<typeof orchestratedAuthOptionsSchema>;\n\n/**\n * Auth options (output type with defaults applied)\n * Use this type when working with parsed/validated options\n */\nexport type AuthOptions = z.infer<typeof authOptionsSchema>;\n\n/**\n * Auth options input (input type for user configuration)\n * Use this type for the @frontmcp configuration\n */\nexport type AuthOptionsInput = z.input<typeof authOptionsSchema>;\n\n/**\n * Authentication mode\n */\nexport type AuthMode = 'public' | 'transparent' | 'orchestrated';\n\n/**\n * Orchestrated type (local or remote)\n */\nexport type OrchestratedType = 'local' | 'remote';\n\n// ============================================\n// APP-LEVEL AUTH OPTIONS (with standalone)\n// ============================================\n\ntype StandaloneOption = {\n /**\n * If the provider is standalone, it will register an OAuth service provider\n * on app's entry path. If not standalone, it will be registered as a child\n * provider under the root provider.\n * @default false\n */\n standalone?: boolean;\n\n /**\n * If the provider should be excluded from the parent provider's discovery.\n * Used for standalone providers.\n * @default false\n */\n excludeFromParent?: boolean;\n};\n\nconst standaloneOptionSchema = {\n standalone: z.boolean().optional(),\n excludeFromParent: z.boolean().optional(),\n} satisfies RawZodShape<StandaloneOption>;\n\nexport const appAuthOptionsSchema = z.union([\n publicAuthOptionsSchema.extend(standaloneOptionSchema),\n transparentAuthOptionsSchema.extend(standaloneOptionSchema),\n orchestratedLocalSchema.extend(standaloneOptionSchema),\n orchestratedRemoteSchema.extend(standaloneOptionSchema),\n]);\n\nexport type AppAuthOptions = z.infer<typeof appAuthOptionsSchema>;\nexport type AppAuthOptionsInput = z.input<typeof appAuthOptionsSchema>;\n\n// ============================================\n// HELPER FUNCTIONS\n// ============================================\n\n/**\n * Parse and validate auth options with defaults\n */\nexport function parseAuthOptions(input: AuthOptionsInput): AuthOptions {\n return authOptionsSchema.parse(input);\n}\n\n/**\n * Check if options are public mode\n */\nexport function isPublicMode(options: AuthOptions | AuthOptionsInput): options is PublicAuthOptions {\n return options.mode === 'public';\n}\n\n/**\n * Check if options are transparent mode\n */\nexport function isTransparentMode(options: AuthOptions | AuthOptionsInput): options is TransparentAuthOptions {\n return options.mode === 'transparent';\n}\n\n/**\n * Check if options are orchestrated mode\n */\nexport function isOrchestratedMode(options: AuthOptions | AuthOptionsInput): options is OrchestratedAuthOptions {\n return options.mode === 'orchestrated';\n}\n\n/**\n * Check if orchestrated options are local type\n */\nexport function isOrchestratedLocal(options: OrchestratedAuthOptions): options is OrchestratedLocalOptions {\n return options.type === 'local';\n}\n\n/**\n * Check if orchestrated options are remote type\n */\nexport function isOrchestratedRemote(options: OrchestratedAuthOptions): options is OrchestratedRemoteOptions {\n return options.type === 'remote';\n}\n\n/**\n * Check if options allow public/anonymous access\n */\nexport function allowsPublicAccess(options: AuthOptions): boolean {\n if (options.mode === 'public') return true;\n if (options.mode === 'transparent') return options.allowAnonymous;\n if (options.mode === 'orchestrated') return options.allowDefaultPublic;\n return false;\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.httpOptionsSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.httpOptionsSchema = zod_1.z.object({
|
|
6
|
-
port: zod_1.z.number().optional().default(3001),
|
|
7
|
-
entryPath: zod_1.z.string().default(''),
|
|
8
|
-
hostFactory: zod_1.z.any().optional(),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=http.options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.options.js","sourceRoot":"","sources":["../../../../../src/common/types/options/http.options.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAYX,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACjC,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { FrontMcpServer, ServerResponse } from '../../interfaces';\n\nexport type HttpOptions = {\n port?: number;\n /** MCP JSON-RPC entry ('' or '/mcp'); MUST match PRM resourcePath returned in well-known */\n entryPath?: string;\n\n hostFactory?: FrontMcpServer | ((config: HttpOptions) => FrontMcpServer);\n};\n\n\nexport const httpOptionsSchema = z.object({\n port: z.number().optional().default(3001),\n entryPath: z.string().default(''),\n hostFactory: z.any().optional(),\n});\n\n\n\nexport type HttpConfig = z.infer<typeof httpOptionsSchema>;"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./server-info.options"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./session.options"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./http.options"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./auth.options"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./logging.options"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./redis.options"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./transport.options"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/common/types/options/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC;AACtC,4DAAkC;AAClC,yDAA+B;AAC/B,yDAA+B;AAC/B,4DAAkC;AAClC,0DAAgC;AAChC,8DAAoC","sourcesContent":["export * from './server-info.options';\nexport * from './session.options';\nexport * from './http.options';\nexport * from './auth.options';\nexport * from './logging.options';\nexport * from './redis.options';\nexport * from './transport.options';\n"]}
|