@frontmcp/sdk 0.7.2 → 0.8.1
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/agent/adapters/adapter.factory.d.ts +27 -18
- package/agent/adapters/adapter.factory.d.ts.map +1 -1
- package/agent/agent.instance.d.ts +5 -0
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +54 -72
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts +1 -0
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/app/instances/app.local.instance.d.ts +3 -0
- package/app/instances/app.local.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts +3 -0
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/auth.registry.d.ts.map +1 -1
- package/auth/authorization/authorization.types.d.ts +7 -180
- package/auth/authorization/authorization.types.d.ts.map +1 -1
- package/auth/authorization/index.d.ts +2 -0
- package/auth/authorization/index.d.ts.map +1 -1
- package/auth/authorization/orchestrated.accessor.d.ts +161 -0
- package/auth/authorization/orchestrated.accessor.d.ts.map +1 -0
- package/auth/authorization/orchestrated.authorization.d.ts +19 -4
- package/auth/authorization/orchestrated.authorization.d.ts.map +1 -1
- package/auth/authorization/orchestrated.context-extension.d.ts +108 -0
- package/auth/authorization/orchestrated.context-extension.d.ts.map +1 -0
- package/auth/cimd/index.d.ts +14 -0
- package/auth/cimd/index.d.ts.map +1 -0
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +30 -3
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +11 -3
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +118 -0
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -0
- package/auth/flows/oauth.register.flow.d.ts +1 -1
- package/auth/flows/oauth.token.flow.d.ts +1 -1
- package/auth/flows/session.verify.flow.d.ts +8 -0
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +3 -3
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -2
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +88 -1
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/machine-id.d.ts +14 -0
- package/auth/machine-id.d.ts.map +1 -1
- package/auth/session/encrypted-authorization-vault.d.ts +2 -3
- package/auth/session/encrypted-authorization-vault.d.ts.map +1 -1
- package/auth/session/federated-auth.session.d.ts +252 -0
- package/auth/session/federated-auth.session.d.ts.map +1 -0
- package/auth/session/index.d.ts +6 -2
- package/auth/session/index.d.ts.map +1 -1
- package/auth/session/orchestrated-token.store.d.ts +155 -0
- package/auth/session/orchestrated-token.store.d.ts.map +1 -0
- package/auth/session/record/session.base.d.ts +7 -7
- package/auth/session/record/session.base.d.ts.map +1 -1
- package/auth/session/record/session.mcp.d.ts +11 -0
- package/auth/session/record/session.mcp.d.ts.map +1 -0
- package/auth/session/redis-session.store.d.ts +10 -5
- package/auth/session/redis-session.store.d.ts.map +1 -1
- package/auth/session/session-crypto.d.ts +6 -9
- package/auth/session/session-crypto.d.ts.map +1 -1
- package/{store/store.factory.d.ts → auth/session/session-store.factory.d.ts} +10 -36
- package/auth/session/session-store.factory.d.ts.map +1 -0
- package/auth/session/session.service.d.ts +4 -8
- package/auth/session/session.service.d.ts.map +1 -1
- package/auth/session/session.transport.d.ts +8 -2
- package/auth/session/session.transport.d.ts.map +1 -1
- package/auth/session/session.types.d.ts +5 -5
- package/auth/session/session.types.d.ts.map +1 -1
- package/auth/session/token.refresh.d.ts +1 -2
- package/auth/session/token.refresh.d.ts.map +1 -1
- package/auth/session/transport-session.manager.d.ts +7 -6
- package/auth/session/transport-session.manager.d.ts.map +1 -1
- package/auth/session/utils/session-id.utils.d.ts +18 -1
- package/auth/session/utils/session-id.utils.d.ts.map +1 -1
- package/auth/session/vercel-kv-session.store.d.ts +16 -16
- package/auth/session/vercel-kv-session.store.d.ts.map +1 -1
- package/auth/utils/authorization-id.utils.d.ts +12 -0
- package/auth/utils/authorization-id.utils.d.ts.map +1 -0
- package/auth/utils/index.d.ts +1 -2
- package/auth/utils/index.d.ts.map +1 -1
- package/auth/vault/auth-providers.accessor.d.ts +153 -0
- package/auth/vault/auth-providers.accessor.d.ts.map +1 -0
- package/auth/vault/auth-providers.accessor.impl.d.ts +52 -0
- package/auth/vault/auth-providers.accessor.impl.d.ts.map +1 -0
- package/auth/vault/auth-providers.context-extension.d.ts +68 -0
- package/auth/vault/auth-providers.context-extension.d.ts.map +1 -0
- package/auth/vault/auth-providers.providers.d.ts +40 -0
- package/auth/vault/auth-providers.providers.d.ts.map +1 -0
- package/auth/vault/auth-providers.registry.d.ts +110 -0
- package/auth/vault/auth-providers.registry.d.ts.map +1 -0
- package/auth/vault/auth-providers.vault.d.ts +93 -0
- package/auth/vault/auth-providers.vault.d.ts.map +1 -0
- package/auth/vault/credential-cache.d.ts +13 -0
- package/auth/vault/credential-cache.d.ts.map +1 -0
- package/auth/vault/credential-loaders/eager-loader.d.ts +46 -0
- package/auth/vault/credential-loaders/eager-loader.d.ts.map +1 -0
- package/auth/vault/credential-loaders/index.d.ts +7 -0
- package/auth/vault/credential-loaders/index.d.ts.map +1 -0
- package/auth/vault/credential-loaders/lazy-loader.d.ts +53 -0
- package/auth/vault/credential-loaders/lazy-loader.d.ts.map +1 -0
- package/auth/vault/index.d.ts +56 -0
- package/auth/vault/index.d.ts.map +1 -0
- package/builtin/config/config-resolver.d.ts +162 -0
- package/builtin/config/config-resolver.d.ts.map +1 -0
- package/builtin/config/config.plugin.d.ts +63 -0
- package/builtin/config/config.plugin.d.ts.map +1 -0
- package/builtin/config/config.symbols.d.ts +7 -0
- package/builtin/config/config.symbols.d.ts.map +1 -0
- package/builtin/config/config.types.d.ts +71 -0
- package/builtin/config/config.types.d.ts.map +1 -0
- package/builtin/config/index.d.ts +68 -0
- package/builtin/config/index.d.ts.map +1 -0
- package/builtin/config/providers/config-loader.d.ts +36 -0
- package/builtin/config/providers/config-loader.d.ts.map +1 -0
- package/builtin/config/providers/config.service.d.ts +108 -0
- package/builtin/config/providers/config.service.d.ts.map +1 -0
- package/builtin/config/providers/env-loader.d.ts +76 -0
- package/builtin/config/providers/env-loader.d.ts.map +1 -0
- package/builtin/index.d.ts +7 -0
- package/builtin/index.d.ts.map +1 -0
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/hook.decorator.d.ts +0 -10
- package/common/decorators/hook.decorator.d.ts.map +1 -1
- package/common/decorators/index.d.ts +1 -0
- package/common/decorators/index.d.ts.map +1 -1
- package/common/decorators/skill.decorator.d.ts +105 -0
- package/common/decorators/skill.decorator.d.ts.map +1 -0
- package/common/dynamic/dynamic.adapter.d.ts +14 -4
- package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
- package/common/entries/app.entry.d.ts +2 -0
- package/common/entries/app.entry.d.ts.map +1 -1
- package/common/entries/index.d.ts +1 -0
- package/common/entries/index.d.ts.map +1 -1
- package/common/entries/prompt.entry.d.ts +0 -6
- package/common/entries/prompt.entry.d.ts.map +1 -1
- package/common/entries/resource.entry.d.ts +0 -6
- package/common/entries/resource.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +2 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/skill.entry.d.ts +95 -0
- package/common/entries/skill.entry.d.ts.map +1 -0
- package/common/entries/tool.entry.d.ts +17 -9
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +35 -6
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/execution-context.interface.d.ts +14 -0
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/index.d.ts +1 -0
- package/common/interfaces/index.d.ts.map +1 -1
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts +1 -7
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
- package/common/interfaces/internal/registry.interface.d.ts +4 -1
- package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
- package/common/interfaces/skill.interface.d.ts +91 -0
- package/common/interfaces/skill.interface.d.ts.map +1 -0
- package/common/interfaces/tool.interface.d.ts +39 -0
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +62 -2
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +168 -169
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +2182 -721
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/index.d.ts +1 -0
- package/common/metadata/index.d.ts.map +1 -1
- package/common/metadata/plugin.metadata.d.ts +8 -1
- package/common/metadata/plugin.metadata.d.ts.map +1 -1
- package/common/metadata/skill.metadata.d.ts +366 -0
- package/common/metadata/skill.metadata.d.ts.map +1 -0
- package/common/metadata/tool.metadata.d.ts +71 -0
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/records/index.d.ts +1 -0
- package/common/records/index.d.ts.map +1 -1
- package/common/records/skill.record.d.ts +55 -0
- package/common/records/skill.record.d.ts.map +1 -0
- package/common/schemas/annotated-class.schema.d.ts +1 -0
- package/common/schemas/annotated-class.schema.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +24 -24
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/index.d.ts +1 -0
- package/common/tokens/index.d.ts.map +1 -1
- package/common/tokens/plugin.tokens.d.ts +1 -0
- package/common/tokens/plugin.tokens.d.ts.map +1 -1
- package/common/tokens/skill.tokens.d.ts +18 -0
- package/common/tokens/skill.tokens.d.ts.map +1 -0
- package/common/tokens/tool.tokens.d.ts +2 -0
- package/common/tokens/tool.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +21 -0
- package/common/types/auth/session.types.d.ts.map +1 -1
- package/common/types/options/auth/app-auth.schema.d.ts +80 -84
- package/common/types/options/auth/app-auth.schema.d.ts.map +1 -1
- package/common/types/options/auth/index.d.ts +6 -8
- package/common/types/options/auth/index.d.ts.map +1 -1
- package/common/types/options/auth/{auth.interfaces.d.ts → interfaces.d.ts} +17 -48
- package/common/types/options/auth/interfaces.d.ts.map +1 -0
- package/common/types/options/auth/orchestrated.schema.d.ts +160 -84
- package/common/types/options/auth/orchestrated.schema.d.ts.map +1 -1
- package/common/types/options/auth/public.schema.d.ts +0 -21
- package/common/types/options/auth/public.schema.d.ts.map +1 -1
- package/common/types/options/auth/{auth.schema.d.ts → schema.d.ts} +81 -85
- package/common/types/options/auth/schema.d.ts.map +1 -0
- package/common/types/options/auth/shared.schemas.d.ts +12 -0
- package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
- package/common/types/options/auth/transparent.schema.d.ts +0 -21
- package/common/types/options/auth/transparent.schema.d.ts.map +1 -1
- package/common/types/options/auth/typecheck.d.ts +2 -0
- package/common/types/options/auth/typecheck.d.ts.map +1 -0
- package/common/types/options/auth/{auth.utils.d.ts → utils.d.ts} +2 -2
- package/common/types/options/auth/utils.d.ts.map +1 -0
- package/common/types/options/elicitation/index.d.ts +4 -0
- package/common/types/options/elicitation/index.d.ts.map +1 -0
- package/common/types/options/elicitation/interfaces.d.ts +80 -0
- package/common/types/options/elicitation/interfaces.d.ts.map +1 -0
- package/common/types/options/elicitation/schema.d.ts +75 -0
- package/common/types/options/elicitation/schema.d.ts.map +1 -0
- package/common/types/options/ext-apps/index.d.ts +3 -0
- package/common/types/options/ext-apps/index.d.ts.map +1 -0
- package/common/types/options/ext-apps/interfaces.d.ts +2 -0
- package/common/types/options/ext-apps/interfaces.d.ts.map +1 -0
- package/common/types/options/ext-apps/schema.d.ts +80 -0
- package/common/types/options/ext-apps/schema.d.ts.map +1 -0
- package/common/types/options/http/index.d.ts +4 -0
- package/common/types/options/http/index.d.ts.map +1 -0
- package/common/types/options/http/interfaces.d.ts +23 -0
- package/common/types/options/http/interfaces.d.ts.map +1 -0
- package/common/types/options/http/schema.d.ts +18 -0
- package/common/types/options/http/schema.d.ts.map +1 -0
- package/common/types/options/index.d.ts +10 -6
- package/common/types/options/index.d.ts.map +1 -1
- package/common/types/options/logging/index.d.ts +5 -0
- package/common/types/options/logging/index.d.ts.map +1 -0
- package/common/types/options/logging/interfaces.d.ts +41 -0
- package/common/types/options/logging/interfaces.d.ts.map +1 -0
- package/common/types/options/logging/schema.d.ts +24 -0
- package/common/types/options/logging/schema.d.ts.map +1 -0
- package/common/types/options/pagination/index.d.ts +4 -0
- package/common/types/options/pagination/index.d.ts.map +1 -0
- package/common/types/options/pagination/interfaces.d.ts +43 -0
- package/common/types/options/pagination/interfaces.d.ts.map +1 -0
- package/common/types/options/pagination/schema.d.ts +41 -0
- package/common/types/options/pagination/schema.d.ts.map +1 -0
- package/common/types/options/redis/index.d.ts +4 -0
- package/common/types/options/redis/index.d.ts.map +1 -0
- package/common/types/options/redis/interfaces.d.ts +81 -0
- package/common/types/options/redis/interfaces.d.ts.map +1 -0
- package/common/types/options/{redis.options.d.ts → redis/schema.d.ts} +2 -2
- package/common/types/options/redis/schema.d.ts.map +1 -0
- package/common/types/options/server-info/index.d.ts +4 -0
- package/common/types/options/server-info/index.d.ts.map +1 -0
- package/common/types/options/server-info/interfaces.d.ts +27 -0
- package/common/types/options/server-info/interfaces.d.ts.map +1 -0
- package/common/types/options/{server-info.options.d.ts → server-info/schema.d.ts} +13 -10
- package/common/types/options/server-info/schema.d.ts.map +1 -0
- package/common/types/options/session/index.d.ts +4 -0
- package/common/types/options/session/index.d.ts.map +1 -0
- package/common/types/options/session/interfaces.d.ts +66 -0
- package/common/types/options/session/interfaces.d.ts.map +1 -0
- package/common/types/options/session/schema.d.ts +79 -0
- package/common/types/options/session/schema.d.ts.map +1 -0
- package/common/types/options/skills-http/index.d.ts +4 -0
- package/common/types/options/skills-http/index.d.ts.map +1 -0
- package/common/types/options/skills-http/interfaces.d.ts +321 -0
- package/common/types/options/skills-http/interfaces.d.ts.map +1 -0
- package/common/types/options/skills-http/schema.d.ts +139 -0
- package/common/types/options/skills-http/schema.d.ts.map +1 -0
- package/common/types/options/transport/index.d.ts +4 -0
- package/common/types/options/transport/index.d.ts.map +1 -0
- package/common/types/options/transport/interfaces.d.ts +354 -0
- package/common/types/options/transport/interfaces.d.ts.map +1 -0
- package/common/types/options/transport/schema.d.ts +309 -0
- package/common/types/options/transport/schema.d.ts.map +1 -0
- package/common/types/options/transport/typecheck.d.ts +2 -0
- package/common/types/options/transport/typecheck.d.ts.map +1 -0
- package/common/utils/decide-request-intent.utils.d.ts +3 -3
- package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
- package/context/context-extension.d.ts +1 -28
- package/context/context-extension.d.ts.map +1 -1
- package/context/frontmcp-context-storage.d.ts.map +1 -1
- package/context/frontmcp-context.d.ts +36 -39
- package/context/frontmcp-context.d.ts.map +1 -1
- package/context/frontmcp-context.provider.d.ts +3 -9
- package/context/frontmcp-context.provider.d.ts.map +1 -1
- package/context/index.d.ts +5 -20
- package/context/index.d.ts.map +1 -1
- package/context/metadata.utils.d.ts +24 -0
- package/context/metadata.utils.d.ts.map +1 -0
- package/direct/client.types.d.ts +447 -0
- package/direct/client.types.d.ts.map +1 -0
- package/direct/connect.d.ts +188 -0
- package/direct/connect.d.ts.map +1 -0
- package/direct/direct-client.d.ts +7 -0
- package/direct/direct-client.d.ts.map +1 -0
- package/direct/direct-server.d.ts +38 -0
- package/direct/direct-server.d.ts.map +1 -0
- package/direct/direct.types.d.ts +134 -0
- package/direct/direct.types.d.ts.map +1 -0
- package/direct/index.d.ts +15 -0
- package/direct/index.d.ts.map +1 -0
- package/direct/llm-platform.d.ts +94 -0
- package/direct/llm-platform.d.ts.map +1 -0
- package/elicitation/elicitation-fallback.schema.d.ts +32 -0
- package/elicitation/elicitation-fallback.schema.d.ts.map +1 -0
- package/elicitation/elicitation.types.d.ts +160 -0
- package/elicitation/elicitation.types.d.ts.map +1 -0
- package/elicitation/flows/elicitation-request.flow.d.ts +98 -0
- package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -0
- package/elicitation/flows/elicitation-result.flow.d.ts +79 -0
- package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -0
- package/elicitation/flows/index.d.ts +10 -0
- package/elicitation/flows/index.d.ts.map +1 -0
- package/elicitation/helpers/elicit.helper.d.ts +65 -0
- package/elicitation/helpers/elicit.helper.d.ts.map +1 -0
- package/elicitation/helpers/extend-output-schema.d.ts +31 -0
- package/elicitation/helpers/extend-output-schema.d.ts.map +1 -0
- package/elicitation/helpers/fallback.helper.d.ts +60 -0
- package/elicitation/helpers/fallback.helper.d.ts.map +1 -0
- package/elicitation/helpers/index.d.ts +12 -0
- package/elicitation/helpers/index.d.ts.map +1 -0
- package/elicitation/helpers/validate-elicitation-content.d.ts +52 -0
- package/elicitation/helpers/validate-elicitation-content.d.ts.map +1 -0
- package/elicitation/hooks/elicitation.hooks.d.ts +66 -0
- package/elicitation/hooks/elicitation.hooks.d.ts.map +1 -0
- package/elicitation/hooks/index.d.ts +9 -0
- package/elicitation/hooks/index.d.ts.map +1 -0
- package/elicitation/index.d.ts +18 -0
- package/elicitation/index.d.ts.map +1 -0
- package/elicitation/send-elicitation-result.tool.d.ts +18 -0
- package/elicitation/send-elicitation-result.tool.d.ts.map +1 -0
- package/elicitation/store/elicitation-encryption.d.ts +134 -0
- package/elicitation/store/elicitation-encryption.d.ts.map +1 -0
- package/elicitation/store/elicitation-store.factory.d.ts +197 -0
- package/elicitation/store/elicitation-store.factory.d.ts.map +1 -0
- package/elicitation/store/elicitation.store.d.ts +191 -0
- package/elicitation/store/elicitation.store.d.ts.map +1 -0
- package/elicitation/store/encrypted-elicitation.store.d.ts +121 -0
- package/elicitation/store/encrypted-elicitation.store.d.ts.map +1 -0
- package/elicitation/store/index.d.ts +14 -0
- package/elicitation/store/index.d.ts.map +1 -0
- package/elicitation/store/storage-elicitation.store.d.ts +118 -0
- package/elicitation/store/storage-elicitation.store.d.ts.map +1 -0
- package/errors/elicitation.error.d.ts +115 -0
- package/errors/elicitation.error.d.ts.map +1 -0
- package/errors/index.d.ts +1 -0
- package/errors/index.d.ts.map +1 -1
- package/esm/index.mjs +30824 -19537
- package/esm/package.json +13 -7
- package/ext-apps/ext-apps.handler.d.ts +177 -0
- package/ext-apps/ext-apps.handler.d.ts.map +1 -0
- package/ext-apps/ext-apps.types.d.ts +273 -0
- package/ext-apps/ext-apps.types.d.ts.map +1 -0
- package/ext-apps/index.d.ts +13 -0
- package/ext-apps/index.d.ts.map +1 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +64 -2
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts +604 -236
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/index.d.ts +17 -0
- package/index.d.ts.map +1 -1
- package/index.js +31066 -19707
- package/notification/index.d.ts +1 -1
- package/notification/index.d.ts.map +1 -1
- package/notification/notification.service.d.ts +18 -0
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +13 -7
- package/plugin/plugin.registry.d.ts +2 -0
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +8 -3
- package/provider/provider.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +4 -0
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +74 -0
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/server.instance.d.ts +3 -3
- package/server/server.instance.d.ts.map +1 -1
- package/skill/auth/index.d.ts +10 -0
- package/skill/auth/index.d.ts.map +1 -0
- package/skill/auth/skill-http-auth.d.ts +112 -0
- package/skill/auth/skill-http-auth.d.ts.map +1 -0
- package/skill/cache/index.d.ts +13 -0
- package/skill/cache/index.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.d.ts +144 -0
- package/skill/cache/skill-http-cache.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.factory.d.ts +83 -0
- package/skill/cache/skill-http-cache.factory.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.holder.d.ts +35 -0
- package/skill/cache/skill-http-cache.holder.d.ts.map +1 -0
- package/skill/errors/index.d.ts +3 -0
- package/skill/errors/index.d.ts.map +1 -0
- package/skill/errors/skill-validation.error.d.ts +110 -0
- package/skill/errors/skill-validation.error.d.ts.map +1 -0
- package/skill/errors/tool-not-allowed.error.d.ts +66 -0
- package/skill/errors/tool-not-allowed.error.d.ts.map +1 -0
- package/skill/flows/http/index.d.ts +12 -0
- package/skill/flows/http/index.d.ts.map +1 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts +70 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -0
- package/skill/flows/http/llm-txt.flow.d.ts +77 -0
- package/skill/flows/http/llm-txt.flow.d.ts.map +1 -0
- package/skill/flows/http/skills-api.flow.d.ts +81 -0
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -0
- package/skill/flows/index.d.ts +13 -0
- package/skill/flows/index.d.ts.map +1 -0
- package/skill/flows/load-skill.flow.d.ts +169 -0
- package/skill/flows/load-skill.flow.d.ts.map +1 -0
- package/skill/flows/search-skills.flow.d.ts +101 -0
- package/skill/flows/search-skills.flow.d.ts.map +1 -0
- package/skill/guards/index.d.ts +2 -0
- package/skill/guards/index.d.ts.map +1 -0
- package/skill/guards/tool-authorization.guard.d.ts +87 -0
- package/skill/guards/tool-authorization.guard.d.ts.map +1 -0
- package/skill/hooks/index.d.ts +2 -0
- package/skill/hooks/index.d.ts.map +1 -0
- package/skill/hooks/skill-tool.hook.d.ts +52 -0
- package/skill/hooks/skill-tool.hook.d.ts.map +1 -0
- package/skill/index.d.ts +74 -0
- package/skill/index.d.ts.map +1 -0
- package/skill/providers/external-skill.provider.d.ts +240 -0
- package/skill/providers/external-skill.provider.d.ts.map +1 -0
- package/skill/providers/index.d.ts +12 -0
- package/skill/providers/index.d.ts.map +1 -0
- package/skill/providers/memory-skill.provider.d.ts +97 -0
- package/skill/providers/memory-skill.provider.d.ts.map +1 -0
- package/skill/session/index.d.ts +4 -0
- package/skill/session/index.d.ts.map +1 -0
- package/skill/session/skill-session-store.interface.d.ts +79 -0
- package/skill/session/skill-session-store.interface.d.ts.map +1 -0
- package/skill/session/skill-session.manager.d.ts +137 -0
- package/skill/session/skill-session.manager.d.ts.map +1 -0
- package/skill/session/skill-session.types.d.ts +303 -0
- package/skill/session/skill-session.types.d.ts.map +1 -0
- package/skill/skill-http.utils.d.ts +107 -0
- package/skill/skill-http.utils.d.ts.map +1 -0
- package/skill/skill-mode.utils.d.ts +53 -0
- package/skill/skill-mode.utils.d.ts.map +1 -0
- package/skill/skill-scope.helper.d.ts +55 -0
- package/skill/skill-scope.helper.d.ts.map +1 -0
- package/skill/skill-storage.factory.d.ts +194 -0
- package/skill/skill-storage.factory.d.ts.map +1 -0
- package/skill/skill-storage.interface.d.ts +230 -0
- package/skill/skill-storage.interface.d.ts.map +1 -0
- package/skill/skill-validator.d.ts +63 -0
- package/skill/skill-validator.d.ts.map +1 -0
- package/skill/skill.events.d.ts +88 -0
- package/skill/skill.events.d.ts.map +1 -0
- package/skill/skill.instance.d.ts +92 -0
- package/skill/skill.instance.d.ts.map +1 -0
- package/skill/skill.registry.d.ts +309 -0
- package/skill/skill.registry.d.ts.map +1 -0
- package/skill/skill.utils.d.ts +90 -0
- package/skill/skill.utils.d.ts.map +1 -0
- package/skill/sync/index.d.ts +16 -0
- package/skill/sync/index.d.ts.map +1 -0
- package/skill/sync/memory-sync-state.store.d.ts +49 -0
- package/skill/sync/memory-sync-state.store.d.ts.map +1 -0
- package/skill/sync/skill-hash.d.ts +65 -0
- package/skill/sync/skill-hash.d.ts.map +1 -0
- package/skill/sync/sync-state.interface.d.ts +125 -0
- package/skill/sync/sync-state.interface.d.ts.map +1 -0
- package/skill/tools/index.d.ts +21 -0
- package/skill/tools/index.d.ts.map +1 -0
- package/skill/tools/load-skills.tool.d.ts +76 -0
- package/skill/tools/load-skills.tool.d.ts.map +1 -0
- package/skill/tools/search-skills.tool.d.ts +61 -0
- package/skill/tools/search-skills.tool.d.ts.map +1 -0
- package/tool/flows/call-tool.flow.d.ts +1 -0
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts +15 -0
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts +8 -0
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.registry.d.ts +11 -0
- package/tool/tool.registry.d.ts.map +1 -1
- package/tool/tool.utils.d.ts.map +1 -1
- package/tool/ui/template-helpers.d.ts +0 -5
- package/tool/ui/template-helpers.d.ts.map +1 -1
- package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts +54 -9
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.sse.adapter.d.ts +11 -2
- package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +21 -2
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/event-stores/event-store.factory.d.ts +96 -0
- package/transport/event-stores/event-store.factory.d.ts.map +1 -0
- package/transport/event-stores/index.d.ts +47 -0
- package/transport/event-stores/index.d.ts.map +1 -0
- package/transport/event-stores/memory.event-store.d.ts +51 -0
- package/transport/event-stores/memory.event-store.d.ts.map +1 -0
- package/transport/event-stores/redis.event-store.d.ts +79 -0
- package/transport/event-stores/redis.event-store.d.ts.map +1 -0
- package/transport/flows/handle.sse.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +3 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts +85 -0
- package/transport/in-memory-server.d.ts.map +1 -0
- package/transport/index.d.ts +47 -0
- package/transport/index.d.ts.map +1 -1
- package/transport/mcp-handlers/complete-request.handler.d.ts +3 -84
- package/transport/mcp-handlers/complete-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/get-prompt-request.handler.d.ts +3 -128
- package/transport/mcp-handlers/get-prompt-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts +463 -490
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-prompts-request.handler.d.ts +3 -70
- package/transport/mcp-handlers/list-prompts-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts +3 -72
- package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resources-request.handler.d.ts +3 -72
- package/transport/mcp-handlers/list-resources-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-tools-request.handler.d.ts +3 -85
- package/transport/mcp-handlers/list-tools-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/read-resource-request.handler.d.ts +3 -61
- package/transport/mcp-handlers/read-resource-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-list-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-list-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-load-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-load-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-mcp.types.d.ts +157 -0
- package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-search-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-search-request.handler.d.ts.map +1 -0
- package/transport/transport.registry.d.ts +9 -1
- package/transport/transport.registry.d.ts.map +1 -1
- package/transport/transport.types.d.ts +1 -8
- package/transport/transport.types.d.ts.map +1 -1
- package/auth/jwks/dev-key-persistence.d.ts +0 -64
- package/auth/jwks/dev-key-persistence.d.ts.map +0 -1
- package/auth/jwks/index.d.ts +0 -4
- package/auth/jwks/index.d.ts.map +0 -1
- package/auth/jwks/jwks.service.d.ts +0 -58
- package/auth/jwks/jwks.service.d.ts.map +0 -1
- package/auth/jwks/jwks.types.d.ts +0 -33
- package/auth/jwks/jwks.types.d.ts.map +0 -1
- package/auth/jwks/jwks.utils.d.ts +0 -5
- package/auth/jwks/jwks.utils.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.authorize.flow.d.ts +0 -32
- package/auth/oauth/flows/oauth.authorize.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.device-authorization.flow.d.ts +0 -47
- package/auth/oauth/flows/oauth.device-authorization.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.introspect.flow.d.ts +0 -27
- package/auth/oauth/flows/oauth.introspect.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.par.flow.d.ts +0 -28
- package/auth/oauth/flows/oauth.par.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.revoke.flow.d.ts +0 -26
- package/auth/oauth/flows/oauth.revoke.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.token.flow.d.ts +0 -58
- package/auth/oauth/flows/oauth.token.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.userinfo.flow.d.ts +0 -23
- package/auth/oauth/flows/oauth.userinfo.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oidc.logout.flow.d.ts +0 -19
- package/auth/oauth/flows/oidc.logout.flow.d.ts.map +0 -1
- package/auth/session/authorization-vault.d.ts +0 -612
- package/auth/session/authorization-vault.d.ts.map +0 -1
- package/auth/session/authorization.store.d.ts +0 -302
- package/auth/session/authorization.store.d.ts.map +0 -1
- package/auth/session/record/session.stateful.d.ts +0 -21
- package/auth/session/record/session.stateful.d.ts.map +0 -1
- package/auth/session/record/session.stateless.d.ts +0 -18
- package/auth/session/record/session.stateless.d.ts.map +0 -1
- package/auth/session/record/session.transparent.d.ts +0 -18
- package/auth/session/record/session.transparent.d.ts.map +0 -1
- package/auth/session/session.crypto.d.ts +0 -8
- package/auth/session/session.crypto.d.ts.map +0 -1
- package/auth/session/session.schema.d.ts +0 -6
- package/auth/session/session.schema.d.ts.map +0 -1
- package/auth/session/token.store.d.ts +0 -36
- package/auth/session/token.store.d.ts.map +0 -1
- package/auth/session/token.vault.d.ts +0 -27
- package/auth/session/token.vault.d.ts.map +0 -1
- package/auth/session/vault-encryption.d.ts +0 -190
- package/auth/session/vault-encryption.d.ts.map +0 -1
- package/auth/utils/audience.validator.d.ts +0 -130
- package/auth/utils/audience.validator.d.ts.map +0 -1
- package/auth/utils/www-authenticate.utils.d.ts +0 -98
- package/auth/utils/www-authenticate.utils.d.ts.map +0 -1
- package/common/migrate/auth-transport.migrate.d.ts +0 -63
- package/common/migrate/auth-transport.migrate.d.ts.map +0 -1
- package/common/migrate/index.d.ts +0 -2
- package/common/migrate/index.d.ts.map +0 -1
- package/common/types/options/auth/auth.interfaces.d.ts.map +0 -1
- package/common/types/options/auth/auth.schema.d.ts.map +0 -1
- package/common/types/options/auth/auth.typecheck.d.ts +0 -2
- package/common/types/options/auth/auth.typecheck.d.ts.map +0 -1
- package/common/types/options/auth/auth.utils.d.ts.map +0 -1
- package/common/types/options/auth/transport.deprecated.d.ts +0 -64
- package/common/types/options/auth/transport.deprecated.d.ts.map +0 -1
- package/common/types/options/http.options.d.ts +0 -15
- package/common/types/options/http.options.d.ts.map +0 -1
- package/common/types/options/logging.options.d.ts +0 -29
- package/common/types/options/logging.options.d.ts.map +0 -1
- package/common/types/options/redis.options.d.ts.map +0 -1
- package/common/types/options/server-info.options.d.ts.map +0 -1
- package/common/types/options/session.options.d.ts +0 -148
- package/common/types/options/session.options.d.ts.map +0 -1
- package/common/types/options/transport.options.d.ts +0 -178
- package/common/types/options/transport.options.d.ts.map +0 -1
- package/context/request-context-storage.d.ts +0 -90
- package/context/request-context-storage.d.ts.map +0 -1
- package/context/request-context.d.ts +0 -185
- package/context/request-context.d.ts.map +0 -1
- package/context/request-context.provider.d.ts +0 -38
- package/context/request-context.provider.d.ts.map +0 -1
- package/context/session-key.provider.d.ts +0 -46
- package/context/session-key.provider.d.ts.map +0 -1
- package/store/adapters/store.base.adapter.d.ts +0 -22
- package/store/adapters/store.base.adapter.d.ts.map +0 -1
- package/store/adapters/store.memory.adapter.d.ts +0 -27
- package/store/adapters/store.memory.adapter.d.ts.map +0 -1
- package/store/adapters/store.redis.adapter.d.ts +0 -34
- package/store/adapters/store.redis.adapter.d.ts.map +0 -1
- package/store/adapters/store.vercel-kv.adapter.d.ts +0 -87
- package/store/adapters/store.vercel-kv.adapter.d.ts.map +0 -1
- package/store/index.d.ts +0 -11
- package/store/index.d.ts.map +0 -1
- package/store/store.factory.d.ts.map +0 -1
- package/store/store.helpers.d.ts +0 -10
- package/store/store.helpers.d.ts.map +0 -1
- package/store/store.registry.d.ts +0 -14
- package/store/store.registry.d.ts.map +0 -1
- package/store/store.tokens.d.ts +0 -4
- package/store/store.tokens.d.ts.map +0 -1
- package/store/store.types.d.ts +0 -65
- package/store/store.types.d.ts.map +0 -1
- package/store/store.utils.d.ts +0 -9
- package/store/store.utils.d.ts.map +0 -1
- package/transport/transport.event-store.d.ts +0 -11
- package/transport/transport.event-store.d.ts.map +0 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrated Token Store
|
|
3
|
+
*
|
|
4
|
+
* Token store implementations for OrchestratedAuthorization.
|
|
5
|
+
* These stores manage upstream provider tokens (access + refresh) indexed
|
|
6
|
+
* by authorization ID and provider ID.
|
|
7
|
+
*
|
|
8
|
+
* Key differences from the low-level TokenStore in @frontmcp/auth:
|
|
9
|
+
* - Uses composite keys (authorizationId + providerId)
|
|
10
|
+
* - Handles access/refresh tokens as separate entries
|
|
11
|
+
* - Returns decrypted strings directly (encryption is handled internally)
|
|
12
|
+
*/
|
|
13
|
+
import { TokenStore } from '../authorization/orchestrated.authorization';
|
|
14
|
+
/**
|
|
15
|
+
* Options for InMemoryOrchestratedTokenStore
|
|
16
|
+
*/
|
|
17
|
+
export interface InMemoryOrchestratedTokenStoreOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Encryption key for token storage. If not provided, tokens are stored in plain text.
|
|
20
|
+
* For production, always provide an encryption key.
|
|
21
|
+
*/
|
|
22
|
+
encryptionKey?: Uint8Array;
|
|
23
|
+
/**
|
|
24
|
+
* Default TTL in milliseconds for token records.
|
|
25
|
+
* If not set and token has no expiresAt, records persist until explicitly deleted.
|
|
26
|
+
* @default undefined (no automatic expiration)
|
|
27
|
+
*/
|
|
28
|
+
defaultTtlMs?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Interval for cleanup of expired tokens (ms).
|
|
31
|
+
* @default 60000 (1 minute)
|
|
32
|
+
*/
|
|
33
|
+
cleanupIntervalMs?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* In-Memory Orchestrated Token Store
|
|
37
|
+
*
|
|
38
|
+
* Development/testing implementation for storing upstream provider tokens.
|
|
39
|
+
* Supports optional encryption for tokens at rest.
|
|
40
|
+
*
|
|
41
|
+
* For production, use a persistent store backed by Redis or similar.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import { InMemoryOrchestratedTokenStore } from '@frontmcp/sdk';
|
|
46
|
+
*
|
|
47
|
+
* // Without encryption (dev only)
|
|
48
|
+
* const store = new InMemoryOrchestratedTokenStore();
|
|
49
|
+
*
|
|
50
|
+
* // With encryption (recommended)
|
|
51
|
+
* const key = randomBytes(32);
|
|
52
|
+
* const store = new InMemoryOrchestratedTokenStore({ encryptionKey: key });
|
|
53
|
+
*
|
|
54
|
+
* // Store tokens
|
|
55
|
+
* await store.storeTokens('auth-123', 'github', {
|
|
56
|
+
* accessToken: 'gho_xxxx',
|
|
57
|
+
* refreshToken: 'ghr_yyyy',
|
|
58
|
+
* expiresAt: Date.now() + 3600000,
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* // Retrieve tokens
|
|
62
|
+
* const accessToken = await store.getAccessToken('auth-123', 'github');
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class InMemoryOrchestratedTokenStore implements TokenStore {
|
|
66
|
+
/** Token storage: Map<compositeKey, ProviderTokenRecord> */
|
|
67
|
+
private readonly tokens;
|
|
68
|
+
/** Encryption key for secure storage */
|
|
69
|
+
private readonly encryptionKey?;
|
|
70
|
+
/** Derived keys cache for HKDF */
|
|
71
|
+
private readonly derivedKeys;
|
|
72
|
+
/** Cleanup interval timer */
|
|
73
|
+
private cleanupTimer?;
|
|
74
|
+
/** Default TTL for records */
|
|
75
|
+
private readonly defaultTtlMs?;
|
|
76
|
+
constructor(options?: InMemoryOrchestratedTokenStoreOptions);
|
|
77
|
+
/**
|
|
78
|
+
* Build composite key from authorizationId and providerId
|
|
79
|
+
*/
|
|
80
|
+
private buildKey;
|
|
81
|
+
/**
|
|
82
|
+
* Derive encryption key for a specific composite key using HKDF
|
|
83
|
+
*/
|
|
84
|
+
private deriveKeyForRecord;
|
|
85
|
+
/**
|
|
86
|
+
* Encrypt a token record
|
|
87
|
+
*/
|
|
88
|
+
private encryptRecord;
|
|
89
|
+
/**
|
|
90
|
+
* Decrypt a token record
|
|
91
|
+
*/
|
|
92
|
+
private decryptRecord;
|
|
93
|
+
/**
|
|
94
|
+
* Get raw record (handles encryption if enabled)
|
|
95
|
+
*/
|
|
96
|
+
private getRecord;
|
|
97
|
+
/**
|
|
98
|
+
* Retrieve decrypted access token for a provider
|
|
99
|
+
*/
|
|
100
|
+
getAccessToken(authorizationId: string, providerId: string): Promise<string | null>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieve decrypted refresh token for a provider
|
|
103
|
+
*/
|
|
104
|
+
getRefreshToken(authorizationId: string, providerId: string): Promise<string | null>;
|
|
105
|
+
/**
|
|
106
|
+
* Store tokens for a provider
|
|
107
|
+
*/
|
|
108
|
+
storeTokens(authorizationId: string, providerId: string, tokens: {
|
|
109
|
+
accessToken: string;
|
|
110
|
+
refreshToken?: string;
|
|
111
|
+
expiresAt?: number;
|
|
112
|
+
}): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Delete tokens for a provider
|
|
115
|
+
*/
|
|
116
|
+
deleteTokens(authorizationId: string, providerId: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Check if tokens exist for a provider
|
|
119
|
+
*/
|
|
120
|
+
hasTokens(authorizationId: string, providerId: string): Promise<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Delete all tokens for an authorization
|
|
123
|
+
*/
|
|
124
|
+
deleteAllForAuthorization(authorizationId: string): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Get all provider IDs for an authorization
|
|
127
|
+
*/
|
|
128
|
+
getProviderIds(authorizationId: string): Promise<string[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Clean up expired tokens
|
|
131
|
+
*/
|
|
132
|
+
cleanup(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Stop the cleanup timer
|
|
135
|
+
*/
|
|
136
|
+
dispose(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Get total number of stored token records (for testing/monitoring)
|
|
139
|
+
*/
|
|
140
|
+
get size(): number;
|
|
141
|
+
/**
|
|
142
|
+
* Clear all tokens (for testing)
|
|
143
|
+
*/
|
|
144
|
+
clear(): void;
|
|
145
|
+
/**
|
|
146
|
+
* Migrate tokens from one authorization ID to another.
|
|
147
|
+
* Used when tokens are stored with a pending ID during federated auth
|
|
148
|
+
* and need to be accessible under the real authorization ID.
|
|
149
|
+
*
|
|
150
|
+
* @param fromAuthId - Source authorization ID (e.g., "pending:abc123")
|
|
151
|
+
* @param toAuthId - Target authorization ID (e.g., "def456")
|
|
152
|
+
*/
|
|
153
|
+
migrateTokens(fromAuthId: string, toAuthId: string): Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=orchestrated-token.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrated-token.store.d.ts","sourceRoot":"","sources":["../../../src/auth/session/orchestrated-token.store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAczE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD;;;OAGG;IACH,aAAa,CAAC,EAAE,UAAU,CAAC;IAE3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,8BAA+B,YAAW,UAAU;IAC/D,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmD;IAE1E,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAa;IAE5C,kCAAkC;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiC;IAE7D,6BAA6B;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAiC;IAEtD,8BAA8B;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;gBAE3B,OAAO,GAAE,qCAA0C;IAgB/D;;OAEG;IACH,OAAO,CAAC,QAAQ;IAIhB;;OAEG;YACW,kBAAkB;IAqBhC;;OAEG;YACW,aAAa;IAe3B;;OAEG;YACW,aAAa;IAa3B;;OAEG;YACW,SAAS;IAqCvB;;OAEG;IACG,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAKzF;;OAEG;IACG,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK1F;;OAEG;IACG,WAAW,CACf,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,IAAI,CAAC;IAsBhB;;OAEG;IACG,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9E;;OAEG;IACG,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9E;;OAEG;IACG,yBAAyB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvE;;OAEG;IACG,cAAc,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkBhE;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgC9B;;OAEG;IACH,OAAO,IAAI,IAAI;IAOf;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;;;;;;OAOG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA0CzE"}
|
|
@@ -20,12 +20,12 @@ export interface BaseCreateCtx {
|
|
|
20
20
|
scopes?: string[];
|
|
21
21
|
authorizedTools?: Record<string, {
|
|
22
22
|
executionPath: [string, string];
|
|
23
|
-
details?: Record<string,
|
|
23
|
+
details?: Record<string, unknown>;
|
|
24
24
|
}>;
|
|
25
25
|
authorizedToolIds?: string[];
|
|
26
26
|
authorizedPrompts?: Record<string, {
|
|
27
27
|
executionPath: [string, string];
|
|
28
|
-
details?: Record<string,
|
|
28
|
+
details?: Record<string, unknown>;
|
|
29
29
|
}>;
|
|
30
30
|
authorizedPromptIds?: string[];
|
|
31
31
|
}
|
|
@@ -36,7 +36,7 @@ export interface SessionUser {
|
|
|
36
36
|
picture?: string;
|
|
37
37
|
}
|
|
38
38
|
export interface SessionClaims {
|
|
39
|
-
[key: string]:
|
|
39
|
+
[key: string]: unknown;
|
|
40
40
|
}
|
|
41
41
|
export declare abstract class Session {
|
|
42
42
|
#private;
|
|
@@ -59,12 +59,12 @@ export declare abstract class Session {
|
|
|
59
59
|
readonly scopes?: string[];
|
|
60
60
|
readonly authorizedTools?: Record<string, {
|
|
61
61
|
executionPath: [string, string];
|
|
62
|
-
details?: Record<string,
|
|
62
|
+
details?: Record<string, unknown>;
|
|
63
63
|
}>;
|
|
64
64
|
readonly authorizedToolIds?: string[];
|
|
65
65
|
readonly authorizedPrompts?: Record<string, {
|
|
66
66
|
executionPath: [string, string];
|
|
67
|
-
details?: Record<string,
|
|
67
|
+
details?: Record<string, unknown>;
|
|
68
68
|
}>;
|
|
69
69
|
readonly authorizedPromptIds?: string[];
|
|
70
70
|
protected token: string;
|
|
@@ -91,7 +91,7 @@ export declare class SessionView {
|
|
|
91
91
|
private readonly allow;
|
|
92
92
|
constructor(parent: Session, allow: (id: string) => boolean);
|
|
93
93
|
get id(): string;
|
|
94
|
-
get mode():
|
|
94
|
+
get mode(): "mcp";
|
|
95
95
|
get user(): SessionUser;
|
|
96
96
|
get claims(): Record<string, unknown> | undefined;
|
|
97
97
|
get authorizedApps(): Record<string, {
|
|
@@ -99,6 +99,6 @@ export declare class SessionView {
|
|
|
99
99
|
toolIds: string[];
|
|
100
100
|
}>;
|
|
101
101
|
getToken(providerId: string): Promise<string>;
|
|
102
|
-
|
|
102
|
+
getTransportSessionId(): Promise<string>;
|
|
103
103
|
}
|
|
104
104
|
//# sourceMappingURL=session.base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.base.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.base.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"session.base.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.base.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvD,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACnE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IACzG,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MA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ACD,IAAI,IAAI,UAEP;IACD,IAAI,IAAI,gBAEP;IACD,IAAI,MAAM,wCAET;IACD,IAAI,cAAc;YArG4B,MAAM;iBAAW,MAAM,EAAE;OAuGtE;IAEK,QAAQ,CAAC,UAAU,EAAE,MAAM;IAKjC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;CAGzC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCreateCtx, Session } from './session.base';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an MCP session created from a verified authorization.
|
|
4
|
+
* The session holds user identity, claims, and authorized entities (apps, tools, resources).
|
|
5
|
+
*/
|
|
6
|
+
export declare class McpSession extends Session {
|
|
7
|
+
readonly mode = "mcp";
|
|
8
|
+
constructor(ctx: BaseCreateCtx);
|
|
9
|
+
getToken(): Promise<string> | string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=session.mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.mcp.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;GAGG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC,QAAQ,CAAC,IAAI,SAAS;gBACV,GAAG,EAAE,aAAa;IAIrB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;CAG9C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Redis } from 'ioredis';
|
|
1
|
+
import type { Redis } from 'ioredis';
|
|
2
2
|
import { SessionStore, StoredSession, RedisConfig, SessionSecurityConfig } from './transport-session.types';
|
|
3
3
|
import { FrontMcpLogger } from '../../common/interfaces/logger.interface';
|
|
4
4
|
/**
|
|
@@ -13,6 +13,7 @@ export interface RedisSessionStoreConfig extends RedisConfig {
|
|
|
13
13
|
*
|
|
14
14
|
* Provides persistent session storage for distributed deployments.
|
|
15
15
|
* Sessions are stored as JSON with optional TTL.
|
|
16
|
+
* Uses @frontmcp/utils RedisStorageAdapter internally.
|
|
16
17
|
*
|
|
17
18
|
* Security features (configurable via security option):
|
|
18
19
|
* - HMAC signing: Detects session data tampering
|
|
@@ -20,7 +21,7 @@ export interface RedisSessionStoreConfig extends RedisConfig {
|
|
|
20
21
|
* - Max lifetime: Prevents indefinite session extension
|
|
21
22
|
*/
|
|
22
23
|
export declare class RedisSessionStore implements SessionStore {
|
|
23
|
-
private readonly
|
|
24
|
+
private readonly storage;
|
|
24
25
|
private readonly keyPrefix;
|
|
25
26
|
private readonly defaultTtlMs;
|
|
26
27
|
private readonly logger?;
|
|
@@ -34,10 +35,14 @@ export declare class RedisSessionStore implements SessionStore {
|
|
|
34
35
|
security?: SessionSecurityConfig;
|
|
35
36
|
}, logger?: FrontMcpLogger);
|
|
36
37
|
/**
|
|
37
|
-
* Get the full
|
|
38
|
+
* Get the full key for a session ID (without prefix, adapter handles it)
|
|
38
39
|
* @throws Error if sessionId is empty
|
|
39
40
|
*/
|
|
40
|
-
private
|
|
41
|
+
private validateSessionId;
|
|
42
|
+
/**
|
|
43
|
+
* Ensure the storage adapter is connected
|
|
44
|
+
*/
|
|
45
|
+
private ensureConnected;
|
|
41
46
|
/**
|
|
42
47
|
* Get a stored session by ID
|
|
43
48
|
*
|
|
@@ -76,7 +81,7 @@ export declare class RedisSessionStore implements SessionStore {
|
|
|
76
81
|
/**
|
|
77
82
|
* Get the underlying Redis client (for advanced use cases)
|
|
78
83
|
*/
|
|
79
|
-
getRedisClient(): Redis;
|
|
84
|
+
getRedisClient(): Redis | undefined;
|
|
80
85
|
/**
|
|
81
86
|
* Test Redis connection by sending a PING command.
|
|
82
87
|
* Useful for validating connection on startup.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-session.store.d.ts","sourceRoot":"","sources":["../../../src/auth/session/redis-session.store.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+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AAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BnF;;OAEG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9C;;OAEG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMjD;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAMjC;;OAEG;IACH,cAAc,IAAI,KAAK,GAAG,SAAS;IAInC;;;;;OAKG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CAW/B"}
|
|
@@ -4,20 +4,17 @@
|
|
|
4
4
|
* Provides HMAC signing and verification for stored session data.
|
|
5
5
|
* Protects against session data tampering when stored in external
|
|
6
6
|
* systems like Redis that don't provide application-level integrity.
|
|
7
|
+
*
|
|
8
|
+
* This module wraps the generic @frontmcp/utils HMAC signing utilities
|
|
9
|
+
* with session-specific types and environment-based secret handling.
|
|
7
10
|
*/
|
|
11
|
+
import { isSignedData, type SignedData } from '@frontmcp/utils';
|
|
8
12
|
import type { StoredSession } from './transport-session.types';
|
|
9
13
|
/**
|
|
10
14
|
* Signed session wrapper structure.
|
|
11
15
|
* Contains the session data and its HMAC signature.
|
|
12
16
|
*/
|
|
13
|
-
export
|
|
14
|
-
/** The session data */
|
|
15
|
-
data: StoredSession;
|
|
16
|
-
/** HMAC-SHA256 signature in base64url format */
|
|
17
|
-
sig: string;
|
|
18
|
-
/** Signature version for future algorithm changes */
|
|
19
|
-
v: 1;
|
|
20
|
-
}
|
|
17
|
+
export type SignedSession = SignedData<StoredSession>;
|
|
21
18
|
/**
|
|
22
19
|
* Configuration for session signing.
|
|
23
20
|
*/
|
|
@@ -74,7 +71,7 @@ export declare function verifySession(signedData: string, config?: SessionSignin
|
|
|
74
71
|
* @param data - Raw data from storage
|
|
75
72
|
* @returns true if the data appears to be a signed session
|
|
76
73
|
*/
|
|
77
|
-
export
|
|
74
|
+
export { isSignedData as isSignedSession };
|
|
78
75
|
/**
|
|
79
76
|
* Verify or parse a session, supporting both signed and unsigned formats.
|
|
80
77
|
* Useful for backwards compatibility during migration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-crypto.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session-crypto.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"session-crypto.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session-crypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAGL,YAAY,EAEZ,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA+BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAEzF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,aAAa,GAAG,IAAI,CAErG;AAED;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,aAAa,GAAG,IAAI,CAEtG"}
|
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Session Store Factory
|
|
3
3
|
*
|
|
4
|
-
* Factory functions for creating
|
|
5
|
-
*
|
|
4
|
+
* Factory functions for creating session stores based on configuration.
|
|
5
|
+
* Supports Redis, Vercel KV providers.
|
|
6
|
+
* Uses @frontmcp/utils storage adapters internally.
|
|
6
7
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import type { SessionStore } from '
|
|
9
|
-
import type
|
|
10
|
-
import { type RedisOptions, type PubsubOptions } from '../common/types/options/redis.options';
|
|
11
|
-
/**
|
|
12
|
-
* Create a store driver based on configuration
|
|
13
|
-
*
|
|
14
|
-
* @param options - Storage configuration (Redis or Vercel KV)
|
|
15
|
-
* @returns A store driver instance (not connected)
|
|
16
|
-
*
|
|
17
|
-
* @example Redis
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const driver = createStoreDriver({
|
|
20
|
-
* provider: 'redis',
|
|
21
|
-
* host: 'localhost',
|
|
22
|
-
* port: 6379,
|
|
23
|
-
* });
|
|
24
|
-
* await driver.connect();
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @example Vercel KV
|
|
28
|
-
* ```typescript
|
|
29
|
-
* const driver = createStoreDriver({
|
|
30
|
-
* provider: 'vercel-kv',
|
|
31
|
-
* // Uses KV_REST_API_URL and KV_REST_API_TOKEN env vars
|
|
32
|
-
* });
|
|
33
|
-
* await driver.connect();
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export declare function createStoreDriver(options: RedisOptions): StoreDriver;
|
|
8
|
+
import { type StorageAdapter } from '@frontmcp/utils';
|
|
9
|
+
import type { SessionStore } from './transport-session.types';
|
|
10
|
+
import { type FrontMcpLogger, type RedisOptions, type PubsubOptions } from '../../common';
|
|
37
11
|
/**
|
|
38
12
|
* Create a session store based on configuration
|
|
39
13
|
*
|
|
@@ -74,7 +48,7 @@ export declare function createSessionStoreSync(options: RedisOptions, logger?: F
|
|
|
74
48
|
* Use this when you need resource subscriptions with Vercel KV for sessions.
|
|
75
49
|
*
|
|
76
50
|
* @param options - Pub/sub configuration (Redis only)
|
|
77
|
-
* @returns A Redis
|
|
51
|
+
* @returns A Redis storage adapter with pub/sub support
|
|
78
52
|
*
|
|
79
53
|
* @example Hybrid config
|
|
80
54
|
* ```typescript
|
|
@@ -83,5 +57,5 @@ export declare function createSessionStoreSync(options: RedisOptions, logger?: F
|
|
|
83
57
|
* const pubsubStore = createPubsubStore({ host: 'localhost', port: 6379 });
|
|
84
58
|
* ```
|
|
85
59
|
*/
|
|
86
|
-
export declare function createPubsubStore(options: PubsubOptions):
|
|
87
|
-
//# sourceMappingURL=store.factory.d.ts.map
|
|
60
|
+
export declare function createPubsubStore(options: PubsubOptions): StorageAdapter;
|
|
61
|
+
//# sourceMappingURL=session-store.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-store.factory.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EAGjB,KAAK,aAAa,EAGnB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAW9G;AAiDD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,YAAY,CAqBnG;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,CAYxE"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { StatelessSession } from './record/session.stateless';
|
|
2
|
-
import { StatefulSession } from './record/session.stateful';
|
|
3
1
|
import { Scope } from '../../scope';
|
|
4
2
|
import { CreateSessionArgs } from './session.types';
|
|
5
|
-
import {
|
|
3
|
+
import { McpSession } from './record/session.mcp';
|
|
6
4
|
export declare class SessionService {
|
|
7
|
-
private store;
|
|
8
5
|
/**
|
|
9
|
-
* Create
|
|
6
|
+
* Create a new Session from verified auth data.
|
|
10
7
|
* The returned Session exposes async token helpers, scoped view, and transport JWT helpers.
|
|
11
8
|
*/
|
|
12
|
-
createSession(scope: Scope, args: CreateSessionArgs):
|
|
13
|
-
private
|
|
14
|
-
private createTransparentSession;
|
|
9
|
+
createSession(scope: Scope, args: CreateSessionArgs): McpSession;
|
|
10
|
+
private createMcpSession;
|
|
15
11
|
}
|
|
16
12
|
//# sourceMappingURL=session.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.service.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"session.service.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,qBAAa,cAAc;IACzB;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,GAAG,UAAU;IAIhE,OAAO,CAAC,gBAAgB;CAqFzB"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { TransportIdMode } from '../../common';
|
|
2
1
|
export declare class TransportIdGenerator {
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Create a transport session ID.
|
|
4
|
+
* Always generates JWT-style IDs for distributed session support.
|
|
5
|
+
*
|
|
6
|
+
* @param _mode - Deprecated parameter, kept for backwards compatibility
|
|
7
|
+
* @returns A JWT-style transport session ID (UUID without dashes)
|
|
8
|
+
*/
|
|
9
|
+
static createId(_mode?: 'jwt'): string;
|
|
4
10
|
}
|
|
5
11
|
//# sourceMappingURL=session.transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.transport.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.transport.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.transport.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAC/B;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM;CAIvC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SessionUser } from './record/session.base';
|
|
2
|
-
/**
|
|
3
|
-
export type SessionMode = '
|
|
2
|
+
/** Session mode identifier. */
|
|
3
|
+
export type SessionMode = 'mcp';
|
|
4
4
|
/**
|
|
5
5
|
* How a single provider’s access token is represented inside the session payload.
|
|
6
6
|
*/
|
|
@@ -41,7 +41,7 @@ export type ProviderSnapshot = {
|
|
|
41
41
|
export type CreateSessionArgs = {
|
|
42
42
|
token: string;
|
|
43
43
|
sessionId?: string;
|
|
44
|
-
claims: Record<string,
|
|
44
|
+
claims: Record<string, unknown>;
|
|
45
45
|
user: SessionUser;
|
|
46
46
|
authorizedProviders?: Record<string, import('./session.types').ProviderSnapshot>;
|
|
47
47
|
authorizedProviderIds?: string[];
|
|
@@ -54,12 +54,12 @@ export type CreateSessionArgs = {
|
|
|
54
54
|
scopes?: string[];
|
|
55
55
|
authorizedTools?: Record<string, {
|
|
56
56
|
executionPath: [string, string];
|
|
57
|
-
details?: Record<string,
|
|
57
|
+
details?: Record<string, unknown>;
|
|
58
58
|
}>;
|
|
59
59
|
authorizedToolIds?: string[];
|
|
60
60
|
authorizedPrompts?: Record<string, {
|
|
61
61
|
executionPath: [string, string];
|
|
62
|
-
details?: Record<string,
|
|
62
|
+
details?: Record<string, unknown>;
|
|
63
63
|
}>;
|
|
64
64
|
authorizedPromptIds?: string[];
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.types.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"session.types.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,+BAA+B;AAC/B,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,WAAW,GACX,OAAO,GACP,KAAK,CAAC;AAEV,oDAAoD;AACpD,MAAM,MAAM,OAAO,GAAG;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACjD,SAAS,EAAE,iBAAiB,CAAC;IAG7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,SAAS,CAAC;QAAC,EAAE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,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC3G,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ProviderSnapshot } from './session.types';
|
|
2
|
-
import type { TokenStore } from '
|
|
3
|
-
import type { TokenVault } from './token.vault';
|
|
2
|
+
import type { TokenStore, TokenVault } from '@frontmcp/auth';
|
|
4
3
|
export type TokenRefreshCtx = {
|
|
5
4
|
/** The provider we’re refreshing for. */
|
|
6
5
|
providerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.refresh.d.ts","sourceRoot":"","sources":["../../../src/auth/session/token.refresh.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"token.refresh.d.ts","sourceRoot":"","sources":["../../../src/auth/session/token.refresh.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO7D,MAAM,MAAM,eAAe,GAAG;IAC5B,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IAEnB,uEAAuE;IACvE,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,+DAA+D;QAC/D,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QACtD,sEAAsE;QACtE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;YAAE,cAAc,CAAC,EAAE,MAAM,CAAC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@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type EncryptedBlob } from '@frontmcp/utils';
|
|
2
|
+
import { TransportSession, TransportProtocol, StoredSession, SessionStore, SessionStorageConfig, TransportState } from './transport-session.types';
|
|
2
3
|
/**
|
|
3
4
|
* In-memory session store implementation
|
|
4
5
|
*/
|
|
@@ -76,18 +77,18 @@ export declare class TransportSessionManager {
|
|
|
76
77
|
* Encode a session as an encrypted JWT for the Mcp-Session-Id header
|
|
77
78
|
*
|
|
78
79
|
* @param session - The transport session to encode
|
|
79
|
-
* @param
|
|
80
|
+
* @param _additionalState - (deprecated) Reserved for backwards compatibility
|
|
80
81
|
* @returns Encrypted session JWT
|
|
81
82
|
*/
|
|
82
|
-
encodeSessionJwt(session: TransportSession,
|
|
83
|
-
state?: unknown;
|
|
84
|
-
tokens?: Record<string, unknown>;
|
|
85
|
-
}): string;
|
|
83
|
+
encodeSessionJwt(session: TransportSession, _additionalState?: unknown): string;
|
|
86
84
|
/**
|
|
87
85
|
* Decode an encrypted session JWT
|
|
88
86
|
*
|
|
89
87
|
* @param jwt - The encrypted session JWT
|
|
90
88
|
* @returns Decoded session or null if invalid
|
|
89
|
+
*
|
|
90
|
+
* Note: In stateless mode, the session.id is the JWT token itself (not the decoded sid).
|
|
91
|
+
* This ensures consistency with createSession() which sets session.id = encodeSessionJwt().
|
|
91
92
|
*/
|
|
92
93
|
private decryptSessionJwt;
|
|
93
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-session.manager.d.ts","sourceRoot":"","sources":["../../../src/auth/session/transport-session.manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transport-session.manager.d.ts","sourceRoot":"","sources":["../../../src/auth/session/transport-session.manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EAEjB,aAAa,EACb,Y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OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAWrE;;OAEG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAQxE;;OAEG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,OAAO,CAAC;IAqBnB;;OAEG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAaxD;;;;;;OAMG;IACH,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM;IAe/E;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAoCzB;;OAEG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQxD;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,GAAG,UAAU,CAE1C;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SessionIdPayload, TransportProtocolType } from '../../../common';
|
|
2
|
-
import type { PlatformDetectionConfig } from '../../../common/types/options/session
|
|
2
|
+
import type { PlatformDetectionConfig } from '../../../common/types/options/session';
|
|
3
3
|
export declare function encryptJson(obj: unknown): string;
|
|
4
4
|
/**
|
|
5
5
|
* Decrypt a public session ID without signature verification.
|
|
@@ -21,6 +21,12 @@ export interface CreateSessionOptions {
|
|
|
21
21
|
userAgent?: string;
|
|
22
22
|
/** Platform detection configuration from scope */
|
|
23
23
|
platformDetectionConfig?: PlatformDetectionConfig;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this session is in skills-only mode.
|
|
26
|
+
* When true, tools/list returns empty array but skills/search and skills/load work normally.
|
|
27
|
+
* Detected from `?mode=skills_only` query param on connection.
|
|
28
|
+
*/
|
|
29
|
+
skillsOnlyMode?: boolean;
|
|
24
30
|
}
|
|
25
31
|
export declare function createSessionId(protocol: TransportProtocolType, token: string, options?: CreateSessionOptions): {
|
|
26
32
|
id: string;
|
|
@@ -38,4 +44,15 @@ export declare function extractSessionFromCookie(cookie?: string): string | unde
|
|
|
38
44
|
* @returns true if the session was found and updated, false otherwise
|
|
39
45
|
*/
|
|
40
46
|
export declare function updateSessionPayload(sessionId: string, updates: Partial<SessionIdPayload>): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieve client info (name/version) from a session ID.
|
|
49
|
+
* Useful for logging, stateless access, or when NotificationService is not available.
|
|
50
|
+
*
|
|
51
|
+
* @param sessionId - The encrypted session ID
|
|
52
|
+
* @returns Client info object or null if session is invalid or has no client info
|
|
53
|
+
*/
|
|
54
|
+
export declare function getSessionClientInfo(sessionId: string): {
|
|
55
|
+
name?: string;
|
|
56
|
+
version?: string;
|
|
57
|
+
} | null;
|
|
41
58
|
//# sourceMappingURL=session-id.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-id.utils.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/utils/session-id.utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAkB,MAAM,iBAAiB,CAAC;AAG1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"session-id.utils.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/utils/session-id.utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAkB,MAAM,iBAAiB,CAAC;AAG1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AA4CrF,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAKhD;AAyDD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,I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