@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Result Flow
|
|
3
|
+
*
|
|
4
|
+
* Flow for handling incoming elicitation results from the client.
|
|
5
|
+
* Provides hook points for middleware/plugins to intercept result processing.
|
|
6
|
+
*
|
|
7
|
+
* @module elicitation/flows/elicitation-result.flow
|
|
8
|
+
*/
|
|
9
|
+
import { FlowBase, FlowRunOptions } from '../../common';
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
import type { ElicitResult } from '../elicitation.types';
|
|
12
|
+
import type { PendingElicitRecord } from '../store';
|
|
13
|
+
declare const inputSchema: z.ZodObject<{
|
|
14
|
+
sessionId: z.ZodString;
|
|
15
|
+
result: z.ZodObject<{
|
|
16
|
+
action: z.ZodEnum<{
|
|
17
|
+
accept: "accept";
|
|
18
|
+
cancel: "cancel";
|
|
19
|
+
decline: "decline";
|
|
20
|
+
}>;
|
|
21
|
+
content: z.ZodOptional<z.ZodUnknown>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
declare const outputSchema: z.ZodObject<{
|
|
25
|
+
handled: z.ZodBoolean;
|
|
26
|
+
elicitId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
result: z.ZodType<ElicitResult | undefined>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
declare const stateSchema: z.ZodObject<{
|
|
30
|
+
sessionId: z.ZodString;
|
|
31
|
+
action: z.ZodEnum<{
|
|
32
|
+
accept: "accept";
|
|
33
|
+
cancel: "cancel";
|
|
34
|
+
decline: "decline";
|
|
35
|
+
}>;
|
|
36
|
+
content: z.ZodOptional<z.ZodUnknown>;
|
|
37
|
+
pendingRecord: z.ZodType<PendingElicitRecord | undefined>;
|
|
38
|
+
elicitResult: z.ZodType<ElicitResult | undefined>;
|
|
39
|
+
handled: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
handled: z.ZodBoolean;
|
|
42
|
+
elicitId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
result: z.ZodType<ElicitResult | undefined>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
declare const plan: {
|
|
47
|
+
readonly pre: ["parseInput"];
|
|
48
|
+
readonly execute: ["lookupPending", "validateContent", "buildResult", "publishResult"];
|
|
49
|
+
readonly finalize: ["finalize"];
|
|
50
|
+
};
|
|
51
|
+
declare global {
|
|
52
|
+
interface ExtendFlows {
|
|
53
|
+
'elicitation:result': FlowRunOptions<ElicitationResultFlow, typeof plan, typeof inputSchema, typeof outputSchema, typeof stateSchema>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
declare const name: "elicitation:result";
|
|
57
|
+
/**
|
|
58
|
+
* Flow for handling elicitation results.
|
|
59
|
+
*
|
|
60
|
+
* This flow handles the processing of elicitation results:
|
|
61
|
+
* 1. Parse and validate input
|
|
62
|
+
* 2. Lookup pending record by session ID
|
|
63
|
+
* 3. Build the result object
|
|
64
|
+
* 4. Publish result via store (for distributed routing)
|
|
65
|
+
*
|
|
66
|
+
* The local handling (clearing timeouts, resolving promises) is still
|
|
67
|
+
* done by the transport adapter for performance.
|
|
68
|
+
*/
|
|
69
|
+
export default class ElicitationResultFlow extends FlowBase<typeof name> {
|
|
70
|
+
logger: import("../../common").FrontMcpLogger;
|
|
71
|
+
parseInput(): Promise<void>;
|
|
72
|
+
lookupPending(): Promise<void>;
|
|
73
|
+
validateContent(): Promise<void>;
|
|
74
|
+
buildResult(): Promise<void>;
|
|
75
|
+
publishResult(): Promise<void>;
|
|
76
|
+
finalize(): Promise<void>;
|
|
77
|
+
}
|
|
78
|
+
export { ElicitationResultFlow };
|
|
79
|
+
//# sourceMappingURL=elicitation-result.flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation-result.flow.d.ts","sourceRoot":"","sources":["../../../src/elicitation/flows/elicitation-result.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,QAAQ,EAAyB,cAAc,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,QAAA,MAAM,WAAW;;;;;;;;;;iBAQf,CAAC;AAEH,QAAA,MAAM,YAAY;;;YAMc,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;iBACjE,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;mBAIsB,CAAC,CAAC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;kBAC3C,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;;;;;gBARzC,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;;iBAWjE,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,oBAAoB,EAAE,cAAc,CAClC,qBAAqB,EACrB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,oBAA6B,CAAC;AAG3C;;;;;;;;;;;GAWG;AAQH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACtE,MAAM,wCAAmD;IAGnD,UAAU;IAkBV,aAAa;IAoBb,eAAe;IAyCf,WAAW;IAkBX,aAAa;IA+Bb,QAAQ;CAaf;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Flows
|
|
3
|
+
*
|
|
4
|
+
* Flow-based architecture for elicitation with hook support.
|
|
5
|
+
*
|
|
6
|
+
* @module elicitation/flows
|
|
7
|
+
*/
|
|
8
|
+
export { default as ElicitationRequestFlow, ElicitationRequestFlow as ElicitRequestFlow, } from './elicitation-request.flow';
|
|
9
|
+
export { default as ElicitationResultFlow, ElicitationResultFlow as ElicitResultFlow } from './elicitation-result.flow';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elicitation/flows/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,IAAI,sBAAsB,EACjC,sBAAsB,IAAI,iBAAiB,GAC5C,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicit Helper
|
|
3
|
+
*
|
|
4
|
+
* Extracted helper function for performing elicitation from context classes.
|
|
5
|
+
* This removes duplication between ToolContext and AgentContext.
|
|
6
|
+
*
|
|
7
|
+
* @module elicitation/helpers/elicit.helper
|
|
8
|
+
*/
|
|
9
|
+
import { ZodType } from 'zod';
|
|
10
|
+
import type { ClientCapabilities } from '../../notification';
|
|
11
|
+
import type { ElicitResult, ElicitOptions } from '../elicitation.types';
|
|
12
|
+
import type { FrontMcpContext } from '../../context';
|
|
13
|
+
/**
|
|
14
|
+
* Transport interface for elicitation.
|
|
15
|
+
* Matches the shape exposed by FrontMcpContext.
|
|
16
|
+
*/
|
|
17
|
+
export interface ElicitTransport {
|
|
18
|
+
elicit<S extends ZodType>(message: string, requestedSchema: S, options?: ElicitOptions): Promise<ElicitResult<S extends ZodType<infer O> ? O : unknown>>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Dependencies required by the elicit helper.
|
|
22
|
+
*/
|
|
23
|
+
export interface ElicitHelperDeps {
|
|
24
|
+
/** Session ID for the current request */
|
|
25
|
+
sessionId: string | undefined;
|
|
26
|
+
/** Function to get client capabilities for the session */
|
|
27
|
+
getClientCapabilities: (sessionId: string) => ClientCapabilities | undefined;
|
|
28
|
+
/** Function to get the FrontMcpContext (may be unavailable) */
|
|
29
|
+
tryGetContext: () => FrontMcpContext | undefined;
|
|
30
|
+
/** Entry name for fallback context (tool name or agent name) */
|
|
31
|
+
entryName: string;
|
|
32
|
+
/** Entry input for fallback context (tool input or agent input) */
|
|
33
|
+
entryInput: unknown;
|
|
34
|
+
/**
|
|
35
|
+
* Whether elicitation is enabled in a server configuration.
|
|
36
|
+
* When false, calls to elicit() will throw ElicitationDisabledError.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
elicitationEnabled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Perform an elicitation request.
|
|
43
|
+
*
|
|
44
|
+
* This helper encapsulates the common elicitation logic shared between
|
|
45
|
+
* ToolContext and AgentContext.
|
|
46
|
+
*
|
|
47
|
+
* @param deps - Dependencies for the elicitation
|
|
48
|
+
* @param message - Message to display to the user
|
|
49
|
+
* @param requestedSchema - Zod schema for the expected response
|
|
50
|
+
* @param options - Elicitation options (mode, ttl, elicitationId)
|
|
51
|
+
* @returns The elicitation result
|
|
52
|
+
*
|
|
53
|
+
* @throws {ElicitationDisabledError} If elicitation is disabled in server configuration
|
|
54
|
+
* @throws {ElicitationNotSupportedError} If no session is available
|
|
55
|
+
* @throws {ElicitationNotSupportedError} If transport is not available
|
|
56
|
+
* @throws {ElicitationFallbackRequired} If client doesn't support elicitation (caught by flow)
|
|
57
|
+
*/
|
|
58
|
+
export declare function performElicit<S extends ZodType>(deps: ElicitHelperDeps, message: string, requestedSchema: S, options?: ElicitOptions): Promise<ElicitResult<S extends ZodType<infer O> ? O : unknown>>;
|
|
59
|
+
/**
|
|
60
|
+
* Generate a unique elicitation ID using cryptographically strong UUID.
|
|
61
|
+
*
|
|
62
|
+
* @returns A unique elicitation ID
|
|
63
|
+
*/
|
|
64
|
+
export declare function generateElicitationId(): string;
|
|
65
|
+
//# sourceMappingURL=elicit.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicit.helper.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/elicit.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAK,MAAM,KAAK,CAAC;AAGjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,CAAC,SAAS,OAAO,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,CAAC,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CACpE;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B,0DAA0D;IAC1D,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAE7E,+DAA+D;IAC/D,aAAa,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC;IAEjD,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAElB,mEAAmE;IACnE,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,OAAO,EACnD,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,CAAC,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAkDjE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output Schema Extension Utility
|
|
3
|
+
*
|
|
4
|
+
* Extends tool output schemas to include the elicitation fallback response type.
|
|
5
|
+
* This allows tools to return either their normal output OR an elicitation pending
|
|
6
|
+
* response when the client doesn't support the standard elicitation protocol.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Extend a tool's output schema to include the elicitation fallback response type.
|
|
10
|
+
*
|
|
11
|
+
* When elicitation is enabled, tools may return an elicitation pending response
|
|
12
|
+
* instead of their normal output. This function wraps the original schema in a
|
|
13
|
+
* `oneOf` union to allow either response type.
|
|
14
|
+
*
|
|
15
|
+
* @param originalSchema - The tool's original output schema (may be undefined)
|
|
16
|
+
* @returns Extended schema that allows either the original output or elicitation fallback
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Original schema:
|
|
20
|
+
* { type: 'object', properties: { result: { type: 'string' } } }
|
|
21
|
+
*
|
|
22
|
+
* // Extended schema:
|
|
23
|
+
* {
|
|
24
|
+
* oneOf: [
|
|
25
|
+
* { type: 'object', properties: { result: { type: 'string' } } },
|
|
26
|
+
* { type: 'object', properties: { elicitationPending: { ... } }, required: ['elicitationPending'] }
|
|
27
|
+
* ]
|
|
28
|
+
* }
|
|
29
|
+
*/
|
|
30
|
+
export declare function extendOutputSchemaForElicitation(originalSchema: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
31
|
+
//# sourceMappingURL=extend-output-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extend-output-schema.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/extend-output-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAClD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsCzB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Fallback Helpers
|
|
3
|
+
*
|
|
4
|
+
* Handles fallback logic when clients don't support native MCP elicitation.
|
|
5
|
+
* Used by CallToolFlow to choose between waiting and fire-and-forget patterns.
|
|
6
|
+
*
|
|
7
|
+
* @module elicitation/helpers/fallback.helper
|
|
8
|
+
*/
|
|
9
|
+
import type { FrontMcpLogger } from '../../common';
|
|
10
|
+
import type { Scope } from '../../scope';
|
|
11
|
+
import { ElicitationFallbackRequired } from '../../errors';
|
|
12
|
+
/**
|
|
13
|
+
* Dependencies required by fallback handler functions.
|
|
14
|
+
*/
|
|
15
|
+
export interface FallbackHandlerDeps {
|
|
16
|
+
/** The scope instance with notification service and elicitation store */
|
|
17
|
+
scope: Scope;
|
|
18
|
+
/** Session ID for the current request */
|
|
19
|
+
sessionId: string;
|
|
20
|
+
/** Logger for diagnostic output */
|
|
21
|
+
logger: FrontMcpLogger;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Check if notifications can be delivered to this session.
|
|
25
|
+
*
|
|
26
|
+
* Returns true if the client is registered with at least one defined capability,
|
|
27
|
+
* indicating it's a full MCP client that can process notifications.
|
|
28
|
+
* Clients with empty capabilities (e.g., `{}`) or all-undefined values are
|
|
29
|
+
* assumed to be minimal clients that cannot process notification-based flows.
|
|
30
|
+
*
|
|
31
|
+
* @param scope - The scope with notification service
|
|
32
|
+
* @param sessionId - The session to check
|
|
33
|
+
* @returns true if notifications can be delivered
|
|
34
|
+
*/
|
|
35
|
+
export declare function canDeliverNotifications(scope: Scope, sessionId: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Send a fallback notification to inform the LLM about elicitation requirements.
|
|
38
|
+
*
|
|
39
|
+
* This notification tells the LLM to call the `sendElicitationResult` tool
|
|
40
|
+
* with the collected user input.
|
|
41
|
+
*
|
|
42
|
+
* @param deps - Dependencies including scope, sessionId, and logger
|
|
43
|
+
* @param error - The ElicitationFallbackRequired error with elicitation details
|
|
44
|
+
*/
|
|
45
|
+
export declare function sendFallbackNotification(deps: FallbackHandlerDeps, error: ElicitationFallbackRequired): void;
|
|
46
|
+
/**
|
|
47
|
+
* Handle elicitation fallback using the waiting pattern.
|
|
48
|
+
*
|
|
49
|
+
* For streamable-http with notification support:
|
|
50
|
+
* 1. Send notification with fallback instructions BEFORE waiting
|
|
51
|
+
* 2. Subscribe to pub/sub channel for the result
|
|
52
|
+
* 3. Wait for result with timeout
|
|
53
|
+
* 4. Return the actual tool result (not fallback instructions)
|
|
54
|
+
*
|
|
55
|
+
* @param deps - Dependencies including scope, sessionId, and logger
|
|
56
|
+
* @param error - The ElicitationFallbackRequired error with elicitation details
|
|
57
|
+
* @returns Promise that resolves with the tool result when sendElicitationResult is called
|
|
58
|
+
*/
|
|
59
|
+
export declare function handleWaitingFallback(deps: FallbackHandlerDeps, error: ElicitationFallbackRequired): Promise<unknown>;
|
|
60
|
+
//# sourceMappingURL=fallback.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback.helper.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/fallback.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,2BAA2B,EAAgC,MAAM,cAAc,CAAC;AAUzF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,KAAK,EAAE,KAAK,CAAC;IACb,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAMhF;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,2BAA2B,GAAG,IAAI,CAqB5G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,OAAO,CAAC,CA2FlB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Helpers Module
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for elicitation that can be used by context classes.
|
|
5
|
+
*
|
|
6
|
+
* @module elicitation/helpers
|
|
7
|
+
*/
|
|
8
|
+
export { performElicit, generateElicitationId, type ElicitHelperDeps, type ElicitTransport } from './elicit.helper';
|
|
9
|
+
export { extendOutputSchemaForElicitation } from './extend-output-schema';
|
|
10
|
+
export { validateElicitationContent, type ElicitationValidationResult } from './validate-elicitation-content';
|
|
11
|
+
export { canDeliverNotifications, sendFallbackNotification, handleWaitingFallback, type FallbackHandlerDeps, } from './fallback.helper';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,KAAK,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Content Validation Helper
|
|
3
|
+
*
|
|
4
|
+
* Validates elicitation result content against the stored JSON Schema.
|
|
5
|
+
* Uses zod-from-json-schema for JSON Schema to Zod conversion.
|
|
6
|
+
*
|
|
7
|
+
* @module elicitation/helpers/validate-elicitation-content
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Validation result interface.
|
|
11
|
+
*/
|
|
12
|
+
export interface ElicitationValidationResult {
|
|
13
|
+
/** Whether validation succeeded */
|
|
14
|
+
success: boolean;
|
|
15
|
+
/** Validation errors (if any) */
|
|
16
|
+
errors?: Array<{
|
|
17
|
+
path: string[];
|
|
18
|
+
message: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validate elicitation content against a JSON Schema.
|
|
23
|
+
*
|
|
24
|
+
* This function converts the JSON Schema to a Zod schema and validates
|
|
25
|
+
* the content against it.
|
|
26
|
+
*
|
|
27
|
+
* @param content - The content to validate
|
|
28
|
+
* @param jsonSchema - The JSON Schema to validate against
|
|
29
|
+
* @returns Validation result with success flag and optional errors
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const result = validateElicitationContent(
|
|
34
|
+
* { name: 'John', age: '30' }, // age should be number
|
|
35
|
+
* {
|
|
36
|
+
* type: 'object',
|
|
37
|
+
* properties: {
|
|
38
|
+
* name: { type: 'string' },
|
|
39
|
+
* age: { type: 'number' }
|
|
40
|
+
* },
|
|
41
|
+
* required: ['name', 'age']
|
|
42
|
+
* }
|
|
43
|
+
* );
|
|
44
|
+
*
|
|
45
|
+
* if (!result.success) {
|
|
46
|
+
* console.log(result.errors);
|
|
47
|
+
* // [{ path: ['age'], message: 'Expected number, received string' }]
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function validateElicitationContent(content: unknown, jsonSchema: Record<string, unknown>): ElicitationValidationResult;
|
|
52
|
+
//# sourceMappingURL=validate-elicitation-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-elicitation-content.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/validate-elicitation-content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,2BAA2B,CA4B7B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Hook Decorators
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe hook decorators for intercepting elicitation flows.
|
|
5
|
+
*
|
|
6
|
+
* @module elicitation/hooks/elicitation.hooks
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Hook decorators for the elicitation:request flow.
|
|
10
|
+
*
|
|
11
|
+
* Use these decorators in plugins or middleware to intercept
|
|
12
|
+
* elicitation request processing at various stages.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { ElicitationRequestHook } from '@frontmcp/sdk/elicitation';
|
|
17
|
+
*
|
|
18
|
+
* class MyPlugin {
|
|
19
|
+
* @ElicitationRequestHook.Will('storePendingRecord')
|
|
20
|
+
* async beforeStorePending(state) {
|
|
21
|
+
* // Modify state before storing
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* @ElicitationRequestHook.Did('finalize')
|
|
25
|
+
* async afterFinalize(state) {
|
|
26
|
+
* // React to completed elicitation request
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const ElicitationRequestHook: {
|
|
32
|
+
Stage: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("../flows").ElicitationRequestFlow>) => MethodDecorator;
|
|
33
|
+
Will: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("../flows").ElicitationRequestFlow>) => MethodDecorator;
|
|
34
|
+
Did: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("../flows").ElicitationRequestFlow>) => MethodDecorator;
|
|
35
|
+
Around: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("../flows").ElicitationRequestFlow>) => MethodDecorator;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Hook decorators for the elicitation:result flow.
|
|
39
|
+
*
|
|
40
|
+
* Use these decorators in plugins or middleware to intercept
|
|
41
|
+
* elicitation result processing at various stages.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import { ElicitationResultHook } from '@frontmcp/sdk/elicitation';
|
|
46
|
+
*
|
|
47
|
+
* class MyPlugin {
|
|
48
|
+
* @ElicitationResultHook.Will('publishResult')
|
|
49
|
+
* async beforePublish(state) {
|
|
50
|
+
* // Validate or transform result before publishing
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* @ElicitationResultHook.Did('finalize')
|
|
54
|
+
* async afterFinalize(state) {
|
|
55
|
+
* // Log or audit completed result handling
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const ElicitationResultHook: {
|
|
61
|
+
Stage: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("../flows").ElicitationResultFlow>) => MethodDecorator;
|
|
62
|
+
Will: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("../flows").ElicitationResultFlow>) => MethodDecorator;
|
|
63
|
+
Did: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("../flows").ElicitationResultFlow>) => MethodDecorator;
|
|
64
|
+
Around: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("../flows").ElicitationResultFlow>) => MethodDecorator;
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=elicitation.hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation.hooks.d.ts","sourceRoot":"","sources":["../../../src/elicitation/hooks/elicitation.hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,sBAAsB;;;;;CAA4D,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB;;;;;CAA0D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elicitation/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Module
|
|
3
|
+
*
|
|
4
|
+
* MCP elicitation support for requesting interactive user input
|
|
5
|
+
* from clients during tool or agent execution.
|
|
6
|
+
*
|
|
7
|
+
* Uses @frontmcp/utils storage for unified backend support:
|
|
8
|
+
* - Memory: For development and single-node deployments
|
|
9
|
+
* - Redis: For distributed/multi-node production deployments
|
|
10
|
+
* - Upstash: For edge deployments with pub/sub support
|
|
11
|
+
*
|
|
12
|
+
* Note: Vercel KV is NOT supported (no pub/sub capability).
|
|
13
|
+
*/
|
|
14
|
+
export * from './elicitation.types';
|
|
15
|
+
export { ELICITATION_FALLBACK_JSON_SCHEMA, type ElicitationFallbackResponse } from './elicitation-fallback.schema';
|
|
16
|
+
export * from './store';
|
|
17
|
+
export * from './helpers';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGnH,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SendElicitationResult System Tool
|
|
3
|
+
*
|
|
4
|
+
* System tool for submitting user responses for pending elicitation requests.
|
|
5
|
+
* Used as a fallback for MCP clients that don't support the standard elicitation protocol.
|
|
6
|
+
*
|
|
7
|
+
* Flow:
|
|
8
|
+
* 1. Tool calls elicit() -> client doesn't support elicitation -> ElicitationFallbackRequired thrown
|
|
9
|
+
* 2. CallToolFlow catches error, stores pending context, returns instructions to LLM
|
|
10
|
+
* 3. LLM asks user for input, then calls this tool with the response
|
|
11
|
+
* 4. This tool stores the resolved result and re-invokes the original tool
|
|
12
|
+
* 5. Original tool's elicit() returns the pre-resolved result immediately
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a tool name is the sendElicitationResult system tool.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isSendElicitationResultTool(toolName: string): boolean;
|
|
18
|
+
//# sourceMappingURL=send-elicitation-result.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-elicitation-result.tool.d.ts","sourceRoot":"","sources":["../../src/elicitation/send-elicitation-result.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqLH;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elicitation Store Encryption
|
|
3
|
+
*
|
|
4
|
+
* Session-based encryption for elicitation store data.
|
|
5
|
+
* Uses HKDF-SHA256 for key derivation and AES-256-GCM for encryption.
|
|
6
|
+
*
|
|
7
|
+
* Security Model:
|
|
8
|
+
* - Each session gets a unique encryption key derived from sessionId + server secret
|
|
9
|
+
* - Only requests with the actual sessionId can decrypt the elicitation data
|
|
10
|
+
* - Zero-knowledge: Server storage contains only encrypted blobs
|
|
11
|
+
*
|
|
12
|
+
* @module elicitation/store/elicitation-encryption
|
|
13
|
+
*/
|
|
14
|
+
import { type EncBlob } from '@frontmcp/utils';
|
|
15
|
+
/**
|
|
16
|
+
* Encrypted blob structure for elicitation storage.
|
|
17
|
+
* Re-exports EncBlob from @frontmcp/utils for consistency.
|
|
18
|
+
*/
|
|
19
|
+
export type ElicitationEncryptedBlob = EncBlob;
|
|
20
|
+
/**
|
|
21
|
+
* Configuration for elicitation encryption.
|
|
22
|
+
*/
|
|
23
|
+
export interface ElicitationEncryptionConfig {
|
|
24
|
+
/**
|
|
25
|
+
* Whether encryption is enabled.
|
|
26
|
+
* @default true in production, false in development
|
|
27
|
+
*/
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Server secret for key derivation.
|
|
31
|
+
* Falls back to MCP_ELICITATION_SECRET or MCP_SESSION_SECRET env vars.
|
|
32
|
+
*/
|
|
33
|
+
secret?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the base secret for elicitation encryption.
|
|
37
|
+
* Checks environment variables in order of specificity.
|
|
38
|
+
*
|
|
39
|
+
* @returns The secret string, or null if not configured
|
|
40
|
+
*/
|
|
41
|
+
export declare function getElicitationSecret(): string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Check if elicitation encryption is available.
|
|
44
|
+
* Returns true if a secret is configured via environment variables.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isElicitationEncryptionAvailable(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Derive a session-specific encryption key using HKDF-SHA256.
|
|
49
|
+
*
|
|
50
|
+
* Key derivation:
|
|
51
|
+
* - IKM (Input Key Material): serverSecret + sessionId
|
|
52
|
+
* - Salt: "elicitation-store-v1"
|
|
53
|
+
* - Info: "elicit:{sessionId}"
|
|
54
|
+
* - Output: 32-byte (256-bit) key for AES-256-GCM
|
|
55
|
+
*
|
|
56
|
+
* This ensures each session gets a unique key that:
|
|
57
|
+
* 1. Cannot be derived without knowing the server secret
|
|
58
|
+
* 2. Is deterministic for a given sessionId (same key on all nodes)
|
|
59
|
+
* 3. Is cryptographically isolated from other sessions
|
|
60
|
+
*
|
|
61
|
+
* @param sessionId - The session ID to derive a key for
|
|
62
|
+
* @param secret - Optional secret override (defaults to env var)
|
|
63
|
+
* @returns 32-byte encryption key
|
|
64
|
+
* @throws Error if no secret is available
|
|
65
|
+
*/
|
|
66
|
+
export declare function deriveElicitationKey(sessionId: string, secret?: string): Promise<Uint8Array>;
|
|
67
|
+
/**
|
|
68
|
+
* Encrypt elicitation data using session-derived key.
|
|
69
|
+
*
|
|
70
|
+
* Uses AES-256-GCM for authenticated encryption:
|
|
71
|
+
* - 12-byte random IV
|
|
72
|
+
* - 16-byte authentication tag
|
|
73
|
+
* - Ciphertext
|
|
74
|
+
*
|
|
75
|
+
* @param data - Data to encrypt (will be JSON serialized)
|
|
76
|
+
* @param sessionId - Session ID for key derivation
|
|
77
|
+
* @param secret - Optional secret override
|
|
78
|
+
* @returns Encrypted blob
|
|
79
|
+
*/
|
|
80
|
+
export declare function encryptElicitationData<T>(data: T, sessionId: string, secret?: string): Promise<ElicitationEncryptedBlob>;
|
|
81
|
+
/**
|
|
82
|
+
* Decrypt elicitation data using session-derived key.
|
|
83
|
+
*
|
|
84
|
+
* @param blob - Encrypted blob to decrypt
|
|
85
|
+
* @param sessionId - Session ID for key derivation
|
|
86
|
+
* @param secret - Optional secret override
|
|
87
|
+
* @returns Decrypted and parsed value, or null if decryption fails
|
|
88
|
+
*/
|
|
89
|
+
export declare function decryptElicitationData<T>(blob: ElicitationEncryptedBlob, sessionId: string, secret?: string): Promise<T | null>;
|
|
90
|
+
/**
|
|
91
|
+
* Serialize encrypted blob to a string for storage.
|
|
92
|
+
*/
|
|
93
|
+
export declare function serializeElicitationBlob(blob: ElicitationEncryptedBlob): string;
|
|
94
|
+
/**
|
|
95
|
+
* Deserialize a string back to encrypted blob.
|
|
96
|
+
* Returns null if the string is not a valid encrypted blob.
|
|
97
|
+
*/
|
|
98
|
+
export declare function deserializeElicitationBlob(str: string): ElicitationEncryptedBlob | null;
|
|
99
|
+
/**
|
|
100
|
+
* Check if a value is an encrypted blob.
|
|
101
|
+
* Used for migration: detecting encrypted vs. plaintext data.
|
|
102
|
+
*/
|
|
103
|
+
export declare function isEncryptedBlob(value: unknown): value is ElicitationEncryptedBlob;
|
|
104
|
+
/**
|
|
105
|
+
* Encrypt and serialize in one step.
|
|
106
|
+
*
|
|
107
|
+
* @param data - Data to encrypt
|
|
108
|
+
* @param sessionId - Session ID for key derivation
|
|
109
|
+
* @param secret - Optional secret override
|
|
110
|
+
* @returns Serialized encrypted blob string
|
|
111
|
+
*/
|
|
112
|
+
export declare function encryptAndSerialize<T>(data: T, sessionId: string, secret?: string): Promise<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Deserialize and decrypt in one step.
|
|
115
|
+
*
|
|
116
|
+
* @param str - Serialized encrypted blob string
|
|
117
|
+
* @param sessionId - Session ID for key derivation
|
|
118
|
+
* @param secret - Optional secret override
|
|
119
|
+
* @returns Decrypted value, or null if decryption fails
|
|
120
|
+
*/
|
|
121
|
+
export declare function deserializeAndDecrypt<T>(str: string, sessionId: string, secret?: string): Promise<T | null>;
|
|
122
|
+
/**
|
|
123
|
+
* Try to decrypt stored data.
|
|
124
|
+
*
|
|
125
|
+
* Similar to deserializeAndDecrypt but accepts parsed value directly.
|
|
126
|
+
* Useful when the storage layer already parsed the JSON.
|
|
127
|
+
*
|
|
128
|
+
* @param value - Stored value (must be encrypted blob)
|
|
129
|
+
* @param sessionId - Session ID for key derivation
|
|
130
|
+
* @param secret - Optional secret override
|
|
131
|
+
* @returns Decrypted value, or null if not encrypted or decryption fails
|
|
132
|
+
*/
|
|
133
|
+
export declare function tryDecryptStoredValue<T>(value: unknown, sessionId: string, secret?: string): Promise<T | null>;
|
|
134
|
+
//# sourceMappingURL=elicitation-encryption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation-encryption.d.ts","sourceRoot":"","sources":["../../../src/elicitation/store/elicitation-encryption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAMzB;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAOpD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAE1D;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBlG;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,EAC5C,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,wBAAwB,CAAC,CAanC;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,EAC5C,IAAI,EAAE,wBAAwB,EAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAenB;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,wBAAwB,GAAG,MAAM,CAE/E;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI,CAUvF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAajF;AAMD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGzG;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAMjH;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAKpH"}
|