@frontmcp/sdk 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Authorization Store for OAuth flows
|
|
3
|
-
*
|
|
4
|
-
* Stores authorization codes, PKCE challenges, and pending authorizations.
|
|
5
|
-
* Supports both in-memory (dev/test) and Redis (production) backends.
|
|
6
|
-
*/
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
/**
|
|
9
|
-
* PKCE challenge data
|
|
10
|
-
*/
|
|
11
|
-
export interface PkceChallenge {
|
|
12
|
-
/** S256 hashed code_challenge */
|
|
13
|
-
challenge: string;
|
|
14
|
-
/** Always 'S256' per OAuth 2.1 */
|
|
15
|
-
method: 'S256';
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Authorization code record stored during the OAuth flow
|
|
19
|
-
*/
|
|
20
|
-
export interface AuthorizationCodeRecord {
|
|
21
|
-
/** The authorization code (opaque string) */
|
|
22
|
-
code: string;
|
|
23
|
-
/** Client ID that requested authorization */
|
|
24
|
-
clientId: string;
|
|
25
|
-
/** Redirect URI used in the authorization request */
|
|
26
|
-
redirectUri: string;
|
|
27
|
-
/** Requested scopes */
|
|
28
|
-
scopes: string[];
|
|
29
|
-
/** PKCE challenge for verification */
|
|
30
|
-
pkce: PkceChallenge;
|
|
31
|
-
/** User identifier (sub claim) */
|
|
32
|
-
userSub: string;
|
|
33
|
-
/** User email if available */
|
|
34
|
-
userEmail?: string;
|
|
35
|
-
/** User name if available */
|
|
36
|
-
userName?: string;
|
|
37
|
-
/** Original state parameter */
|
|
38
|
-
state?: string;
|
|
39
|
-
/** Creation timestamp (epoch ms) */
|
|
40
|
-
createdAt: number;
|
|
41
|
-
/** Expiration timestamp (epoch ms) - codes are short-lived (60s default) */
|
|
42
|
-
expiresAt: number;
|
|
43
|
-
/** Whether this code has been used (single-use) */
|
|
44
|
-
used: boolean;
|
|
45
|
-
/** Resource/audience the token will be issued for */
|
|
46
|
-
resource?: string;
|
|
47
|
-
/** Selected tool IDs from consent flow */
|
|
48
|
-
selectedToolIds?: string[];
|
|
49
|
-
/** Selected provider IDs from federated login */
|
|
50
|
-
selectedProviderIds?: string[];
|
|
51
|
-
/** Skipped provider IDs from federated login (for progressive auth) */
|
|
52
|
-
skippedProviderIds?: string[];
|
|
53
|
-
/** Whether consent was enabled for this authorization */
|
|
54
|
-
consentEnabled?: boolean;
|
|
55
|
-
/** Whether federated login was used */
|
|
56
|
-
federatedLoginUsed?: boolean;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Consent state for tool selection
|
|
60
|
-
*/
|
|
61
|
-
export interface ConsentStateRecord {
|
|
62
|
-
/** Whether consent flow is enabled */
|
|
63
|
-
enabled: boolean;
|
|
64
|
-
/** Available tool IDs for consent */
|
|
65
|
-
availableToolIds: string[];
|
|
66
|
-
/** Selected tool IDs (after user selection) */
|
|
67
|
-
selectedToolIds?: string[];
|
|
68
|
-
/** Whether consent has been completed */
|
|
69
|
-
consentCompleted: boolean;
|
|
70
|
-
/** Timestamp when consent was completed */
|
|
71
|
-
consentCompletedAt?: number;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Federated login state for multi-provider auth
|
|
75
|
-
*/
|
|
76
|
-
export interface FederatedLoginStateRecord {
|
|
77
|
-
/** Available provider IDs */
|
|
78
|
-
providerIds: string[];
|
|
79
|
-
/** Selected provider IDs */
|
|
80
|
-
selectedProviderIds?: string[];
|
|
81
|
-
/** Skipped provider IDs */
|
|
82
|
-
skippedProviderIds?: string[];
|
|
83
|
-
/** Provider-specific user data (after auth) */
|
|
84
|
-
providerUserData?: Record<string, {
|
|
85
|
-
email?: string;
|
|
86
|
-
name?: string;
|
|
87
|
-
sub?: string;
|
|
88
|
-
}>;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Pending authorization request (before user authenticates)
|
|
92
|
-
*/
|
|
93
|
-
export interface PendingAuthorizationRecord {
|
|
94
|
-
/** Unique ID for this pending authorization */
|
|
95
|
-
id: string;
|
|
96
|
-
/** Client ID requesting authorization */
|
|
97
|
-
clientId: string;
|
|
98
|
-
/** Redirect URI for callback */
|
|
99
|
-
redirectUri: string;
|
|
100
|
-
/** Requested scopes */
|
|
101
|
-
scopes: string[];
|
|
102
|
-
/** PKCE challenge */
|
|
103
|
-
pkce: PkceChallenge;
|
|
104
|
-
/** Original state parameter from client */
|
|
105
|
-
state?: string;
|
|
106
|
-
/** Resource/audience */
|
|
107
|
-
resource?: string;
|
|
108
|
-
/** Creation timestamp */
|
|
109
|
-
createdAt: number;
|
|
110
|
-
/** Expiration timestamp (pending requests expire after 10 minutes) */
|
|
111
|
-
expiresAt: number;
|
|
112
|
-
/** Whether this is an incremental authorization request */
|
|
113
|
-
isIncremental?: boolean;
|
|
114
|
-
/** Target app ID for incremental authorization */
|
|
115
|
-
targetAppId?: string;
|
|
116
|
-
/** Target tool ID that triggered the incremental auth */
|
|
117
|
-
targetToolId?: string;
|
|
118
|
-
/** Existing session ID for incremental auth (to expand the token vault) */
|
|
119
|
-
existingSessionId?: string;
|
|
120
|
-
/** Existing authorization ID to expand */
|
|
121
|
-
existingAuthorizationId?: string;
|
|
122
|
-
/** Federated login state for multi-provider auth */
|
|
123
|
-
federatedLogin?: FederatedLoginStateRecord;
|
|
124
|
-
/** Consent state for tool selection */
|
|
125
|
-
consent?: ConsentStateRecord;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Refresh token record
|
|
129
|
-
*/
|
|
130
|
-
export interface RefreshTokenRecord {
|
|
131
|
-
/** The refresh token (opaque string) */
|
|
132
|
-
token: string;
|
|
133
|
-
/** Client ID */
|
|
134
|
-
clientId: string;
|
|
135
|
-
/** User identifier */
|
|
136
|
-
userSub: string;
|
|
137
|
-
/** Granted scopes */
|
|
138
|
-
scopes: string[];
|
|
139
|
-
/** Resource/audience */
|
|
140
|
-
resource?: string;
|
|
141
|
-
/** Creation timestamp */
|
|
142
|
-
createdAt: number;
|
|
143
|
-
/** Expiration timestamp */
|
|
144
|
-
expiresAt: number;
|
|
145
|
-
/** Whether this token has been revoked */
|
|
146
|
-
revoked: boolean;
|
|
147
|
-
/** Previous token if rotated */
|
|
148
|
-
previousToken?: string;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Zod schemas for validation
|
|
152
|
-
*/
|
|
153
|
-
export declare const pkceChallengeSchema: z.ZodObject<{
|
|
154
|
-
challenge: z.ZodString;
|
|
155
|
-
method: z.ZodLiteral<"S256">;
|
|
156
|
-
}, z.core.$strip>;
|
|
157
|
-
export declare const authorizationCodeRecordSchema: z.ZodObject<{
|
|
158
|
-
code: z.ZodString;
|
|
159
|
-
clientId: z.ZodString;
|
|
160
|
-
redirectUri: z.ZodString;
|
|
161
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
162
|
-
pkce: z.ZodObject<{
|
|
163
|
-
challenge: z.ZodString;
|
|
164
|
-
method: z.ZodLiteral<"S256">;
|
|
165
|
-
}, z.core.$strip>;
|
|
166
|
-
userSub: z.ZodString;
|
|
167
|
-
userEmail: z.ZodOptional<z.ZodString>;
|
|
168
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
169
|
-
state: z.ZodOptional<z.ZodString>;
|
|
170
|
-
createdAt: z.ZodNumber;
|
|
171
|
-
expiresAt: z.ZodNumber;
|
|
172
|
-
used: z.ZodBoolean;
|
|
173
|
-
resource: z.ZodOptional<z.ZodString>;
|
|
174
|
-
}, z.core.$strip>;
|
|
175
|
-
/**
|
|
176
|
-
* Authorization Store Interface
|
|
177
|
-
*/
|
|
178
|
-
export interface AuthorizationStore {
|
|
179
|
-
storeAuthorizationCode(record: AuthorizationCodeRecord): Promise<void>;
|
|
180
|
-
getAuthorizationCode(code: string): Promise<AuthorizationCodeRecord | null>;
|
|
181
|
-
markCodeUsed(code: string): Promise<void>;
|
|
182
|
-
deleteAuthorizationCode(code: string): Promise<void>;
|
|
183
|
-
storePendingAuthorization(record: PendingAuthorizationRecord): Promise<void>;
|
|
184
|
-
getPendingAuthorization(id: string): Promise<PendingAuthorizationRecord | null>;
|
|
185
|
-
deletePendingAuthorization(id: string): Promise<void>;
|
|
186
|
-
storeRefreshToken(record: RefreshTokenRecord): Promise<void>;
|
|
187
|
-
getRefreshToken(token: string): Promise<RefreshTokenRecord | null>;
|
|
188
|
-
revokeRefreshToken(token: string): Promise<void>;
|
|
189
|
-
rotateRefreshToken(oldToken: string, newRecord: RefreshTokenRecord): Promise<void>;
|
|
190
|
-
generateCode(): string;
|
|
191
|
-
generateRefreshToken(): string;
|
|
192
|
-
cleanup(): Promise<void>;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* PKCE utilities
|
|
196
|
-
*/
|
|
197
|
-
export declare function verifyPkce(codeVerifier: string, challenge: PkceChallenge): boolean;
|
|
198
|
-
export declare function generatePkceChallenge(codeVerifier: string): PkceChallenge;
|
|
199
|
-
/**
|
|
200
|
-
* In-Memory Authorization Store
|
|
201
|
-
*
|
|
202
|
-
* Development/testing implementation. Data is lost on restart.
|
|
203
|
-
* For production, use RedisAuthorizationStore.
|
|
204
|
-
*/
|
|
205
|
-
export declare class InMemoryAuthorizationStore implements AuthorizationStore {
|
|
206
|
-
private codes;
|
|
207
|
-
private pending;
|
|
208
|
-
private refreshTokens;
|
|
209
|
-
/** Default TTL for authorization codes (60 seconds) */
|
|
210
|
-
private readonly codeTtlMs;
|
|
211
|
-
/** Default TTL for pending authorizations (10 minutes) */
|
|
212
|
-
private readonly pendingTtlMs;
|
|
213
|
-
/** Default TTL for refresh tokens (30 days) */
|
|
214
|
-
private readonly refreshTtlMs;
|
|
215
|
-
generateCode(): string;
|
|
216
|
-
generateRefreshToken(): string;
|
|
217
|
-
storeAuthorizationCode(record: AuthorizationCodeRecord): Promise<void>;
|
|
218
|
-
getAuthorizationCode(code: string): Promise<AuthorizationCodeRecord | null>;
|
|
219
|
-
markCodeUsed(code: string): Promise<void>;
|
|
220
|
-
deleteAuthorizationCode(code: string): Promise<void>;
|
|
221
|
-
storePendingAuthorization(record: PendingAuthorizationRecord): Promise<void>;
|
|
222
|
-
getPendingAuthorization(id: string): Promise<PendingAuthorizationRecord | null>;
|
|
223
|
-
deletePendingAuthorization(id: string): Promise<void>;
|
|
224
|
-
storeRefreshToken(record: RefreshTokenRecord): Promise<void>;
|
|
225
|
-
getRefreshToken(token: string): Promise<RefreshTokenRecord | null>;
|
|
226
|
-
revokeRefreshToken(token: string): Promise<void>;
|
|
227
|
-
rotateRefreshToken(oldToken: string, newRecord: RefreshTokenRecord): Promise<void>;
|
|
228
|
-
cleanup(): Promise<void>;
|
|
229
|
-
/**
|
|
230
|
-
* Create an authorization code record with defaults
|
|
231
|
-
*/
|
|
232
|
-
createCodeRecord(params: {
|
|
233
|
-
clientId: string;
|
|
234
|
-
redirectUri: string;
|
|
235
|
-
scopes: string[];
|
|
236
|
-
pkce: PkceChallenge;
|
|
237
|
-
userSub: string;
|
|
238
|
-
userEmail?: string;
|
|
239
|
-
userName?: string;
|
|
240
|
-
state?: string;
|
|
241
|
-
resource?: string;
|
|
242
|
-
selectedToolIds?: string[];
|
|
243
|
-
selectedProviderIds?: string[];
|
|
244
|
-
skippedProviderIds?: string[];
|
|
245
|
-
consentEnabled?: boolean;
|
|
246
|
-
federatedLoginUsed?: boolean;
|
|
247
|
-
}): AuthorizationCodeRecord;
|
|
248
|
-
/**
|
|
249
|
-
* Create a pending authorization record with defaults
|
|
250
|
-
*/
|
|
251
|
-
createPendingRecord(params: {
|
|
252
|
-
clientId: string;
|
|
253
|
-
redirectUri: string;
|
|
254
|
-
scopes: string[];
|
|
255
|
-
pkce: PkceChallenge;
|
|
256
|
-
state?: string;
|
|
257
|
-
resource?: string;
|
|
258
|
-
isIncremental?: boolean;
|
|
259
|
-
targetAppId?: string;
|
|
260
|
-
targetToolId?: string;
|
|
261
|
-
existingSessionId?: string;
|
|
262
|
-
existingAuthorizationId?: string;
|
|
263
|
-
federatedLogin?: FederatedLoginStateRecord;
|
|
264
|
-
consent?: ConsentStateRecord;
|
|
265
|
-
}): PendingAuthorizationRecord;
|
|
266
|
-
/**
|
|
267
|
-
* Create a refresh token record with defaults
|
|
268
|
-
*/
|
|
269
|
-
createRefreshTokenRecord(params: {
|
|
270
|
-
clientId: string;
|
|
271
|
-
userSub: string;
|
|
272
|
-
scopes: string[];
|
|
273
|
-
resource?: string;
|
|
274
|
-
}): RefreshTokenRecord;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Redis Authorization Store (placeholder)
|
|
278
|
-
*
|
|
279
|
-
* Production implementation using Redis for distributed storage.
|
|
280
|
-
* TODO: Implement after in-memory store is validated.
|
|
281
|
-
*/
|
|
282
|
-
export declare class RedisAuthorizationStore implements AuthorizationStore {
|
|
283
|
-
private readonly redis;
|
|
284
|
-
private readonly namespace;
|
|
285
|
-
constructor(redis: any, namespace?: string);
|
|
286
|
-
private key;
|
|
287
|
-
generateCode(): string;
|
|
288
|
-
generateRefreshToken(): string;
|
|
289
|
-
storeAuthorizationCode(record: AuthorizationCodeRecord): Promise<void>;
|
|
290
|
-
getAuthorizationCode(code: string): Promise<AuthorizationCodeRecord | null>;
|
|
291
|
-
markCodeUsed(code: string): Promise<void>;
|
|
292
|
-
deleteAuthorizationCode(code: string): Promise<void>;
|
|
293
|
-
storePendingAuthorization(record: PendingAuthorizationRecord): Promise<void>;
|
|
294
|
-
getPendingAuthorization(id: string): Promise<PendingAuthorizationRecord | null>;
|
|
295
|
-
deletePendingAuthorization(id: string): Promise<void>;
|
|
296
|
-
storeRefreshToken(record: RefreshTokenRecord): Promise<void>;
|
|
297
|
-
getRefreshToken(token: string): Promise<RefreshTokenRecord | null>;
|
|
298
|
-
revokeRefreshToken(token: string): Promise<void>;
|
|
299
|
-
rotateRefreshToken(oldToken: string, newRecord: RefreshTokenRecord): Promise<void>;
|
|
300
|
-
cleanup(): Promise<void>;
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=authorization.store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.store.d.ts","sourceRoot":"","sources":["../../../src/auth/session/authorization.store.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB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AE,MAAM,GAAG,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAM/E,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5D,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAQlE,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Session, type BaseCreateCtx } from './session.base';
|
|
2
|
-
export type StatefulCreateCtx = BaseCreateCtx & {};
|
|
3
|
-
/**
|
|
4
|
-
* Represents a **stateful session** stored server-side (e.g., Redis).
|
|
5
|
-
* Nested OAuth tokens are never exposed in the JWT; instead, they are
|
|
6
|
-
* encrypted and persisted in Redis under a session key. The client only
|
|
7
|
-
* receives a lightweight reference to that key.
|
|
8
|
-
*
|
|
9
|
-
* Advantages:
|
|
10
|
-
* - Smaller JWT payloads and reduced token leakage risk.
|
|
11
|
-
* - Can refresh nested provider tokens on the fly without requiring
|
|
12
|
-
* the user to re-authorize.
|
|
13
|
-
* - Well suited for multi-app setups with short-lived OAuth tokens.
|
|
14
|
-
*/
|
|
15
|
-
export declare class StatefulSession extends Session {
|
|
16
|
-
#private;
|
|
17
|
-
readonly mode = "stateful";
|
|
18
|
-
constructor(ctx: StatefulCreateCtx);
|
|
19
|
-
getToken(providerId?: string): Promise<string> | string;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=session.stateful.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.stateful.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.stateful.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK7D,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,SAAQ,OAAO;;IAC1C,QAAQ,CAAC,IAAI,cAAc;gBA8Bf,GAAG,EAAE,iBAAiB;IAKzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;CAoCjE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Session, type BaseCreateCtx } from './session.base';
|
|
2
|
-
export type StatefulCreateCtx = BaseCreateCtx & Record<string, never>;
|
|
3
|
-
/**
|
|
4
|
-
* Represents a **stateful session (non-refreshable)** where nested OAuth
|
|
5
|
-
* tokens cannot be refreshed server-side. When a nested provider token
|
|
6
|
-
* expires, the user must re-authorize to obtain new credentials.
|
|
7
|
-
*
|
|
8
|
-
* Notes:
|
|
9
|
-
* - Simpler flow, but degrades UX when tokens are short-lived.
|
|
10
|
-
* - Prefer the refreshable stateful session for multi-app environments.
|
|
11
|
-
*/
|
|
12
|
-
export declare class StatelessSession extends Session {
|
|
13
|
-
#private;
|
|
14
|
-
readonly mode = "stateless";
|
|
15
|
-
constructor(ctx: StatefulCreateCtx);
|
|
16
|
-
getToken(_providerId?: string): Promise<string> | string;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=session.stateless.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.stateless.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.stateless.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI7D,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEtE;;;;;;;;GAQG;AACH,qBAAa,gBAAiB,SAAQ,OAAO;;IAC3C,QAAQ,CAAC,IAAI,eAAe;gBAOhB,GAAG,EAAE,iBAAiB;IAIzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;CAGlE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BaseCreateCtx, Session } from './session.base';
|
|
2
|
-
interface TransparentCreateCtx extends BaseCreateCtx {
|
|
3
|
-
apps: string[];
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Represents a transparent (Non-Orchestrated) session where delivered by authorization server.
|
|
7
|
-
* The session cannot have nest auth providers.
|
|
8
|
-
* The session cannot be refreshed.
|
|
9
|
-
* The session cannot be revoked.
|
|
10
|
-
* Useful for OAuth flows where the authorization server delivers the session.
|
|
11
|
-
*/
|
|
12
|
-
export declare class TransparentSession extends Session {
|
|
13
|
-
readonly mode = "transparent";
|
|
14
|
-
constructor(ctx: TransparentCreateCtx);
|
|
15
|
-
getToken(): Promise<string> | string;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=session.transparent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.transparent.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/record/session.transparent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAExD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,OAAO;IAC7C,QAAQ,CAAC,IAAI,iBAAiB;gBAClB,GAAG,EAAE,oBAAoB;IAI5B,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;CAG9C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EncBlob } from './session.types';
|
|
2
|
-
/** Encrypt UTF-8 text using AES-256-GCM. Returns base64url fields. */
|
|
3
|
-
export declare function encryptAesGcm(key: Buffer, plaintext: string): EncBlob;
|
|
4
|
-
/** Decrypt an AES-256-GCM blob (base64url fields) to UTF-8 text. */
|
|
5
|
-
export declare function decryptAesGcm(key: Buffer, blob: EncBlob): string;
|
|
6
|
-
/** HKDF-SHA256 (RFC 5869) to derive key material. */
|
|
7
|
-
export declare function hkdfSha256(ikm: Buffer, salt: Buffer, info: Buffer, length: number): Buffer;
|
|
8
|
-
//# sourceMappingURL=session.crypto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.crypto.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.crypto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAWrE;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAQhE;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAa1F"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { TransparentSession } from './record/session.transparent';
|
|
3
|
-
import { StatefulSession } from './record/session.stateful';
|
|
4
|
-
import { StatelessSession } from './record/session.stateless';
|
|
5
|
-
export declare const SessionSchema: z.ZodUnion<readonly [z.ZodCustom<TransparentSession, TransparentSession>, z.ZodCustom<StatefulSession, StatefulSession>, z.ZodCustom<StatelessSession, StatelessSession>]>;
|
|
6
|
-
//# sourceMappingURL=session.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.schema.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,eAAO,MAAM,aAAa,4KAIxB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { EncBlob } from './token.vault';
|
|
2
|
-
export type SecretRecord = {
|
|
3
|
-
id: string;
|
|
4
|
-
blob: EncBlob;
|
|
5
|
-
updatedAt: number;
|
|
6
|
-
};
|
|
7
|
-
export interface TokenStore {
|
|
8
|
-
/** Create or overwrite a blob under a stable id. */
|
|
9
|
-
put(id: string, blob: EncBlob): Promise<void>;
|
|
10
|
-
/** Fetch encrypted blob by id. */
|
|
11
|
-
get(id: string): Promise<SecretRecord | undefined>;
|
|
12
|
-
/** Delete a reference. */
|
|
13
|
-
del(id: string): Promise<void>;
|
|
14
|
-
/** Allocate a new id (opaque). */
|
|
15
|
-
allocId(): string;
|
|
16
|
-
}
|
|
17
|
-
/** In-memory reference store (dev/test). */
|
|
18
|
-
export declare class MemoryTokenStore implements TokenStore {
|
|
19
|
-
private m;
|
|
20
|
-
allocId(): string;
|
|
21
|
-
put(id: string, blob: EncBlob): Promise<void>;
|
|
22
|
-
get(id: string): Promise<SecretRecord | undefined>;
|
|
23
|
-
del(id: string): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
/** Redis (sketch) — replace `any` with your redis client type. */
|
|
26
|
-
export declare class RedisTokenStore implements TokenStore {
|
|
27
|
-
private readonly redis;
|
|
28
|
-
private readonly ns;
|
|
29
|
-
constructor(redis: any, ns?: string);
|
|
30
|
-
allocId(): string;
|
|
31
|
-
key(id: string): string;
|
|
32
|
-
put(id: string, blob: EncBlob): Promise<void>;
|
|
33
|
-
get(id: string): Promise<SecretRecord | undefined>;
|
|
34
|
-
del(id: string): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=token.store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.store.d.ts","sourceRoot":"","sources":["../../../src/auth/session/token.store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,kCAAkC;IAClC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IACnD,0BAA0B;IAC1B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,kCAAkC;IAClC,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,4CAA4C;AAC5C,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,CAAC,CAAmC;IAC5C,OAAO;IAGD,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;IAG7B,GAAG,CAAC,EAAE,EAAE,MAAM;IAGd,GAAG,CAAC,EAAE,EAAE,MAAM;CAGrB;AAED,kEAAkE;AAClE,qBAAa,eAAgB,YAAW,UAAU;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAO,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAA/B,KAAK,EAAE,GAAG,EAAmB,EAAE,SAAS;IACrE,OAAO;IAGP,GAAG,CAAC,EAAE,EAAE,MAAM;IAIR,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;IAM7B,GAAG,CAAC,EAAE,EAAE,MAAM;IAMd,GAAG,CAAC,EAAE,EAAE,MAAM;CAGrB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type EncBlob = {
|
|
2
|
-
alg: 'A256GCM';
|
|
3
|
-
kid: string;
|
|
4
|
-
iv: string;
|
|
5
|
-
tag: string;
|
|
6
|
-
data: string;
|
|
7
|
-
exp?: number;
|
|
8
|
-
meta?: Record<string, unknown>;
|
|
9
|
-
};
|
|
10
|
-
export type VaultKey = {
|
|
11
|
-
kid: string;
|
|
12
|
-
key: Buffer;
|
|
13
|
-
};
|
|
14
|
-
export declare class TokenVault {
|
|
15
|
-
/** Active key used for new encryptions */
|
|
16
|
-
private active;
|
|
17
|
-
/** All known keys by kid for decryption (includes active) */
|
|
18
|
-
private keys;
|
|
19
|
-
constructor(keys: VaultKey[]);
|
|
20
|
-
rotateTo(k: VaultKey): void;
|
|
21
|
-
encrypt(plaintext: string, opts?: {
|
|
22
|
-
exp?: number;
|
|
23
|
-
meta?: Record<string, unknown>;
|
|
24
|
-
}): EncBlob;
|
|
25
|
-
decrypt(blob: EncBlob): string;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=token.vault.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.vault.d.ts","sourceRoot":"","sources":["../../../src/auth/session/token.vault.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,SAAS,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,qBAAa,UAAU;IACrB,0CAA0C;IAC1C,OAAO,CAAC,MAAM,CAAW;IACzB,6DAA6D;IAC7D,OAAO,CAAC,IAAI,CAA6B;gBAE7B,IAAI,EAAE,QAAQ,EAAE;IAS5B,QAAQ,CAAC,CAAC,EAAE,QAAQ;IAKpB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO;IAgB5F,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;CAW/B"}
|