@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,447 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct Client Types
|
|
3
|
+
*
|
|
4
|
+
* Types for connecting to FrontMCP servers as an MCP client with LLM-aware responses.
|
|
5
|
+
*/
|
|
6
|
+
import type { ServerCapabilities, Implementation, ClientCapabilities, ListResourcesResult, ReadResourceResult, ListResourceTemplatesResult, ListPromptsResult, GetPromptResult, CompleteResult, LoggingLevel } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import type { FormattedTools, FormattedToolResult } from './llm-platform';
|
|
8
|
+
export type { FormattedTools, FormattedToolResult };
|
|
9
|
+
/**
|
|
10
|
+
* Supported LLM platforms for tool/result formatting.
|
|
11
|
+
*
|
|
12
|
+
* - `openai`: OpenAI function calling format
|
|
13
|
+
* - `claude`: Anthropic Claude tool format
|
|
14
|
+
* - `langchain`: LangChain tool schema format
|
|
15
|
+
* - `vercel-ai`: Vercel AI SDK tool format
|
|
16
|
+
* - `raw`: Raw MCP protocol format (no transformation)
|
|
17
|
+
*/
|
|
18
|
+
export type LLMPlatform = 'openai' | 'claude' | 'langchain' | 'vercel-ai' | 'raw';
|
|
19
|
+
/**
|
|
20
|
+
* Options for searching skills.
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchSkillsOptions {
|
|
23
|
+
/** Filter by specific tags */
|
|
24
|
+
tags?: string[];
|
|
25
|
+
/** Filter by specific tools (skills must reference these tools) */
|
|
26
|
+
tools?: string[];
|
|
27
|
+
/** Maximum number of results (1-50, default: 10) */
|
|
28
|
+
limit?: number;
|
|
29
|
+
/** Require all specified tools to be available */
|
|
30
|
+
requireAllTools?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A single skill search result item.
|
|
34
|
+
*/
|
|
35
|
+
export interface SkillSearchResultItem {
|
|
36
|
+
/** Unique skill identifier */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Display name */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Description of what the skill does */
|
|
41
|
+
description: string;
|
|
42
|
+
/** Relevance score (0-1) */
|
|
43
|
+
score: number;
|
|
44
|
+
/** Tags associated with the skill */
|
|
45
|
+
tags?: string[];
|
|
46
|
+
/** Tools referenced by this skill with availability info */
|
|
47
|
+
tools: Array<{
|
|
48
|
+
name: string;
|
|
49
|
+
available: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
/** Source of the skill */
|
|
52
|
+
source: 'local' | 'external';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Result of searching for skills.
|
|
56
|
+
*/
|
|
57
|
+
export interface SearchSkillsResult {
|
|
58
|
+
/** List of matching skills */
|
|
59
|
+
skills: SkillSearchResultItem[];
|
|
60
|
+
/** Total number of matching skills */
|
|
61
|
+
total: number;
|
|
62
|
+
/** Whether there are more results beyond this page */
|
|
63
|
+
hasMore: boolean;
|
|
64
|
+
/** Guidance message for using the results */
|
|
65
|
+
guidance: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Options for loading skills.
|
|
69
|
+
*/
|
|
70
|
+
export interface LoadSkillsOptions {
|
|
71
|
+
/** Format of the returned content */
|
|
72
|
+
format?: 'full' | 'instructions-only';
|
|
73
|
+
/** Whether to activate a skill session */
|
|
74
|
+
activateSession?: boolean;
|
|
75
|
+
/** Policy mode for the skill session */
|
|
76
|
+
policyMode?: 'strict' | 'approval' | 'permissive';
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A single loaded skill item.
|
|
80
|
+
*/
|
|
81
|
+
export interface LoadedSkillItem {
|
|
82
|
+
/** Unique skill identifier */
|
|
83
|
+
id: string;
|
|
84
|
+
/** Display name */
|
|
85
|
+
name: string;
|
|
86
|
+
/** Description of what the skill does */
|
|
87
|
+
description: string;
|
|
88
|
+
/** Instructions for using the skill */
|
|
89
|
+
instructions: string;
|
|
90
|
+
/** Tools used by this skill with their schemas */
|
|
91
|
+
tools: Array<{
|
|
92
|
+
name: string;
|
|
93
|
+
purpose?: string;
|
|
94
|
+
available: boolean;
|
|
95
|
+
inputSchema?: unknown;
|
|
96
|
+
outputSchema?: unknown;
|
|
97
|
+
}>;
|
|
98
|
+
/** Parameters that can be passed to the skill */
|
|
99
|
+
parameters?: Array<{
|
|
100
|
+
name: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
required?: boolean;
|
|
103
|
+
type?: string;
|
|
104
|
+
}>;
|
|
105
|
+
/** Names of tools that are available */
|
|
106
|
+
availableTools: string[];
|
|
107
|
+
/** Names of tools that are missing */
|
|
108
|
+
missingTools: string[];
|
|
109
|
+
/** Whether all required tools are available */
|
|
110
|
+
isComplete: boolean;
|
|
111
|
+
/** Formatted content for LLM consumption */
|
|
112
|
+
formattedContent: string;
|
|
113
|
+
/** Session info if activateSession was true */
|
|
114
|
+
session?: {
|
|
115
|
+
activated: boolean;
|
|
116
|
+
sessionId?: string;
|
|
117
|
+
policyMode?: string;
|
|
118
|
+
allowedTools?: string[];
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Result of loading skills.
|
|
123
|
+
*/
|
|
124
|
+
export interface LoadSkillsResult {
|
|
125
|
+
/** Loaded skills */
|
|
126
|
+
skills: LoadedSkillItem[];
|
|
127
|
+
/** Summary of the load operation */
|
|
128
|
+
summary: {
|
|
129
|
+
totalSkills: number;
|
|
130
|
+
totalTools: number;
|
|
131
|
+
allToolsAvailable: boolean;
|
|
132
|
+
combinedWarnings?: string[];
|
|
133
|
+
};
|
|
134
|
+
/** Guidance for next steps */
|
|
135
|
+
nextSteps: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Options for listing skills.
|
|
139
|
+
*/
|
|
140
|
+
export interface ListSkillsOptions {
|
|
141
|
+
/** Number of skills to skip (for pagination) */
|
|
142
|
+
offset?: number;
|
|
143
|
+
/** Maximum number of skills to return */
|
|
144
|
+
limit?: number;
|
|
145
|
+
/** Filter by specific tags */
|
|
146
|
+
tags?: string[];
|
|
147
|
+
/** Field to sort by */
|
|
148
|
+
sortBy?: 'name' | 'priority' | 'createdAt';
|
|
149
|
+
/** Sort order */
|
|
150
|
+
sortOrder?: 'asc' | 'desc';
|
|
151
|
+
/** Include hidden skills */
|
|
152
|
+
includeHidden?: boolean;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Result of listing skills.
|
|
156
|
+
*/
|
|
157
|
+
export interface ListSkillsResult {
|
|
158
|
+
/** List of skills */
|
|
159
|
+
skills: Array<{
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
tags?: string[];
|
|
164
|
+
priority?: number;
|
|
165
|
+
}>;
|
|
166
|
+
/** Total number of skills matching the filter */
|
|
167
|
+
total: number;
|
|
168
|
+
/** Whether there are more skills beyond this page */
|
|
169
|
+
hasMore: boolean;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* An elicitation request from the server.
|
|
173
|
+
*/
|
|
174
|
+
export interface ElicitationRequest {
|
|
175
|
+
/** Unique identifier for this elicitation */
|
|
176
|
+
elicitId: string;
|
|
177
|
+
/** Message to display to the user */
|
|
178
|
+
message: string;
|
|
179
|
+
/** JSON Schema for the expected response */
|
|
180
|
+
requestedSchema: Record<string, unknown>;
|
|
181
|
+
/** Mode of elicitation */
|
|
182
|
+
mode: 'form' | 'url';
|
|
183
|
+
/** Timestamp when the elicitation expires */
|
|
184
|
+
expiresAt: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Response to an elicitation request.
|
|
188
|
+
*/
|
|
189
|
+
export interface ElicitationResponse {
|
|
190
|
+
/** User's action */
|
|
191
|
+
action: 'accept' | 'cancel' | 'decline';
|
|
192
|
+
/** Content if action is 'accept' */
|
|
193
|
+
content?: unknown;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Handler function for elicitation requests.
|
|
197
|
+
*/
|
|
198
|
+
export type ElicitationHandler = (request: ElicitationRequest) => ElicitationResponse | Promise<ElicitationResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* Options for argument completion.
|
|
201
|
+
*/
|
|
202
|
+
export interface CompleteOptions {
|
|
203
|
+
/** Reference to the prompt or resource */
|
|
204
|
+
ref: {
|
|
205
|
+
type: 'ref/prompt';
|
|
206
|
+
name: string;
|
|
207
|
+
} | {
|
|
208
|
+
type: 'ref/resource';
|
|
209
|
+
uri: string;
|
|
210
|
+
};
|
|
211
|
+
/** The argument to complete */
|
|
212
|
+
argument: {
|
|
213
|
+
name: string;
|
|
214
|
+
value: string;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export type { CompleteResult };
|
|
218
|
+
/**
|
|
219
|
+
* MCP logging levels per spec.
|
|
220
|
+
* Re-export from MCP SDK for convenience.
|
|
221
|
+
*/
|
|
222
|
+
export type McpLogLevel = LoggingLevel;
|
|
223
|
+
/**
|
|
224
|
+
* Client info for MCP protocol handshake.
|
|
225
|
+
* Used to identify the client and detect LLM platform.
|
|
226
|
+
*/
|
|
227
|
+
export interface ClientInfo {
|
|
228
|
+
/** Client name (e.g., 'openai', 'my-agent') */
|
|
229
|
+
name: string;
|
|
230
|
+
/** Client version */
|
|
231
|
+
version: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Session options for connection.
|
|
235
|
+
*/
|
|
236
|
+
export interface SessionOptions {
|
|
237
|
+
/** Session ID (auto-generated if not provided) */
|
|
238
|
+
id?: string;
|
|
239
|
+
/** User information for auth context */
|
|
240
|
+
user?: {
|
|
241
|
+
/** User subject identifier */
|
|
242
|
+
sub?: string;
|
|
243
|
+
/** User display name */
|
|
244
|
+
name?: string;
|
|
245
|
+
/** User email */
|
|
246
|
+
email?: string;
|
|
247
|
+
/** Additional user claims */
|
|
248
|
+
[key: string]: unknown;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Full connect options for generic `connect()` function.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```typescript
|
|
256
|
+
* const client = await connect(MyServer, {
|
|
257
|
+
* clientInfo: { name: 'my-agent', version: '1.0.0' },
|
|
258
|
+
* session: { id: 'session-123', user: { sub: 'user-1' } },
|
|
259
|
+
* authToken: 'jwt-token',
|
|
260
|
+
* capabilities: { tools: true },
|
|
261
|
+
* });
|
|
262
|
+
* ```
|
|
263
|
+
*/
|
|
264
|
+
export interface ConnectOptions {
|
|
265
|
+
/** MCP client info for handshake (used for platform detection) */
|
|
266
|
+
clientInfo?: ClientInfo;
|
|
267
|
+
/** Session configuration */
|
|
268
|
+
session?: SessionOptions;
|
|
269
|
+
/** Direct auth token injection (e.g., JWT) */
|
|
270
|
+
authToken?: string;
|
|
271
|
+
/** Optional client capabilities override */
|
|
272
|
+
capabilities?: Partial<ClientCapabilities>;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Simplified connect options for LLM-specific helpers.
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const client = await connectOpenAI(MyServer, {
|
|
280
|
+
* session: { id: 'session-123' },
|
|
281
|
+
* authToken: 'jwt-token',
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
export interface LLMConnectOptions {
|
|
286
|
+
/** Session configuration */
|
|
287
|
+
session?: SessionOptions;
|
|
288
|
+
/** Direct auth token injection (e.g., JWT) */
|
|
289
|
+
authToken?: string;
|
|
290
|
+
/** Optional client capabilities override */
|
|
291
|
+
capabilities?: Partial<ClientCapabilities>;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Connected client interface for interacting with FrontMCP servers.
|
|
295
|
+
*
|
|
296
|
+
* The client provides MCP operations with responses formatted for the detected LLM platform.
|
|
297
|
+
* Tools are automatically formatted for OpenAI, Claude, LangChain, or Vercel AI SDK.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* import { connectOpenAI } from '@frontmcp/sdk';
|
|
302
|
+
*
|
|
303
|
+
* const client = await connectOpenAI(MyServer, { authToken: 'token' });
|
|
304
|
+
*
|
|
305
|
+
* // Tools are already in OpenAI format
|
|
306
|
+
* const tools = await client.listTools();
|
|
307
|
+
*
|
|
308
|
+
* // Call and get formatted result
|
|
309
|
+
* const result = await client.callTool('weather', { city: 'NYC' });
|
|
310
|
+
*
|
|
311
|
+
* await client.close();
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
export interface DirectClient {
|
|
315
|
+
/**
|
|
316
|
+
* List all available tools, formatted for the detected LLM platform.
|
|
317
|
+
*
|
|
318
|
+
* Return format depends on platform:
|
|
319
|
+
* - OpenAI: `[{ type: 'function', function: { name, description, parameters, strict } }]`
|
|
320
|
+
* - Claude: `[{ name, description, input_schema }]`
|
|
321
|
+
* - LangChain: `[{ name, description, schema }]`
|
|
322
|
+
* - Vercel AI: `{ [name]: { description, parameters } }`
|
|
323
|
+
* - Raw: MCP `Tool[]` format
|
|
324
|
+
*/
|
|
325
|
+
listTools(): Promise<FormattedTools>;
|
|
326
|
+
/**
|
|
327
|
+
* Call a tool and get the result, formatted for the detected LLM platform.
|
|
328
|
+
*
|
|
329
|
+
* @param name - Tool name
|
|
330
|
+
* @param args - Tool arguments
|
|
331
|
+
*/
|
|
332
|
+
callTool(name: string, args?: Record<string, unknown>): Promise<FormattedToolResult>;
|
|
333
|
+
/**
|
|
334
|
+
* List all available resources.
|
|
335
|
+
*/
|
|
336
|
+
listResources(): Promise<ListResourcesResult>;
|
|
337
|
+
/**
|
|
338
|
+
* Read a resource by URI.
|
|
339
|
+
*
|
|
340
|
+
* @param uri - Resource URI
|
|
341
|
+
*/
|
|
342
|
+
readResource(uri: string): Promise<ReadResourceResult>;
|
|
343
|
+
/**
|
|
344
|
+
* List all available resource templates.
|
|
345
|
+
*/
|
|
346
|
+
listResourceTemplates(): Promise<ListResourceTemplatesResult>;
|
|
347
|
+
/**
|
|
348
|
+
* List all available prompts.
|
|
349
|
+
*/
|
|
350
|
+
listPrompts(): Promise<ListPromptsResult>;
|
|
351
|
+
/**
|
|
352
|
+
* Get a prompt with arguments.
|
|
353
|
+
*
|
|
354
|
+
* @param name - Prompt name
|
|
355
|
+
* @param args - Prompt arguments
|
|
356
|
+
*/
|
|
357
|
+
getPrompt(name: string, args?: Record<string, string>): Promise<GetPromptResult>;
|
|
358
|
+
/** Get the session ID for this connection */
|
|
359
|
+
getSessionId(): string;
|
|
360
|
+
/** Get the client info used for the connection */
|
|
361
|
+
getClientInfo(): ClientInfo;
|
|
362
|
+
/** Get the server info from the MCP handshake */
|
|
363
|
+
getServerInfo(): Implementation;
|
|
364
|
+
/** Get the server capabilities from the MCP handshake */
|
|
365
|
+
getCapabilities(): ServerCapabilities;
|
|
366
|
+
/** Get the detected LLM platform (based on clientInfo) */
|
|
367
|
+
getDetectedPlatform(): LLMPlatform;
|
|
368
|
+
/**
|
|
369
|
+
* Close the connection and cleanup resources.
|
|
370
|
+
*/
|
|
371
|
+
close(): Promise<void>;
|
|
372
|
+
/**
|
|
373
|
+
* Search for skills matching a query.
|
|
374
|
+
*
|
|
375
|
+
* @param query - Search query string
|
|
376
|
+
* @param options - Search options
|
|
377
|
+
* @returns Matching skills with relevance scores
|
|
378
|
+
*/
|
|
379
|
+
searchSkills(query: string, options?: SearchSkillsOptions): Promise<SearchSkillsResult>;
|
|
380
|
+
/**
|
|
381
|
+
* Load one or more skills by ID.
|
|
382
|
+
*
|
|
383
|
+
* @param skillIds - Array of skill IDs to load
|
|
384
|
+
* @param options - Load options
|
|
385
|
+
* @returns Loaded skills with their content and tool info
|
|
386
|
+
*/
|
|
387
|
+
loadSkills(skillIds: string[], options?: LoadSkillsOptions): Promise<LoadSkillsResult>;
|
|
388
|
+
/**
|
|
389
|
+
* List all available skills.
|
|
390
|
+
*
|
|
391
|
+
* @param options - List options (pagination, filtering)
|
|
392
|
+
* @returns Paginated list of skills
|
|
393
|
+
*/
|
|
394
|
+
listSkills(options?: ListSkillsOptions): Promise<ListSkillsResult>;
|
|
395
|
+
/**
|
|
396
|
+
* Register a handler for elicitation requests.
|
|
397
|
+
*
|
|
398
|
+
* When a tool calls `this.elicit()`, the handler will be invoked with the
|
|
399
|
+
* elicitation details. Return the user's response.
|
|
400
|
+
*
|
|
401
|
+
* @param handler - Function to handle elicitation requests
|
|
402
|
+
* @returns Unsubscribe function
|
|
403
|
+
*/
|
|
404
|
+
onElicitation(handler: ElicitationHandler): () => void;
|
|
405
|
+
/**
|
|
406
|
+
* Submit an elicitation result manually.
|
|
407
|
+
*
|
|
408
|
+
* Use this when handling elicitation asynchronously or through a separate channel.
|
|
409
|
+
*
|
|
410
|
+
* @param elicitId - The elicitation ID
|
|
411
|
+
* @param response - The user's response
|
|
412
|
+
*/
|
|
413
|
+
submitElicitationResult(elicitId: string, response: ElicitationResponse): Promise<void>;
|
|
414
|
+
/**
|
|
415
|
+
* Request argument completion for a prompt or resource.
|
|
416
|
+
*
|
|
417
|
+
* @param options - Completion options (ref and argument)
|
|
418
|
+
* @returns Completion suggestions
|
|
419
|
+
*/
|
|
420
|
+
complete(options: CompleteOptions): Promise<CompleteResult>;
|
|
421
|
+
/**
|
|
422
|
+
* Subscribe to updates for a resource.
|
|
423
|
+
*
|
|
424
|
+
* @param uri - Resource URI to subscribe to
|
|
425
|
+
*/
|
|
426
|
+
subscribeResource(uri: string): Promise<void>;
|
|
427
|
+
/**
|
|
428
|
+
* Unsubscribe from updates for a resource.
|
|
429
|
+
*
|
|
430
|
+
* @param uri - Resource URI to unsubscribe from
|
|
431
|
+
*/
|
|
432
|
+
unsubscribeResource(uri: string): Promise<void>;
|
|
433
|
+
/**
|
|
434
|
+
* Register a handler for resource update notifications.
|
|
435
|
+
*
|
|
436
|
+
* @param handler - Function called when a subscribed resource is updated
|
|
437
|
+
* @returns Unsubscribe function
|
|
438
|
+
*/
|
|
439
|
+
onResourceUpdated(handler: (uri: string) => void): () => void;
|
|
440
|
+
/**
|
|
441
|
+
* Set the logging level for the server.
|
|
442
|
+
*
|
|
443
|
+
* @param level - The logging level
|
|
444
|
+
*/
|
|
445
|
+
setLogLevel(level: McpLogLevel): Promise<void>;
|
|
446
|
+
}
|
|
447
|
+
//# sourceMappingURL=client.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.types.d.ts","sourceRoot":"","sources":["../../src/direct/client.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EAC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,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;OAKG;IACH,iBAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAM9D;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect Utilities
|
|
3
|
+
*
|
|
4
|
+
* Factory functions for creating DirectClient connections to FrontMCP servers.
|
|
5
|
+
* These utilities are separate from the decorator to keep @FrontMcp lean.
|
|
6
|
+
*/
|
|
7
|
+
import type { FrontMcpConfigInput } from '../common';
|
|
8
|
+
import type { DirectClient, ConnectOptions, LLMConnectOptions } from './client.types';
|
|
9
|
+
/**
|
|
10
|
+
* Connect to a FrontMCP server with full options.
|
|
11
|
+
*
|
|
12
|
+
* Creates a DirectClient that connects via in-memory transport.
|
|
13
|
+
* The client provides MCP operations with LLM-aware response formatting.
|
|
14
|
+
*
|
|
15
|
+
* @param config - FrontMCP configuration (same as @FrontMcp decorator)
|
|
16
|
+
* @param options - Connection options including clientInfo, session, and authToken
|
|
17
|
+
* @returns Connected DirectClient instance
|
|
18
|
+
*
|
|
19
|
+
* @example Basic connection
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { connect } from '@frontmcp/sdk';
|
|
22
|
+
*
|
|
23
|
+
* const client = await connect(MyServerConfig);
|
|
24
|
+
* const tools = await client.listTools(); // Raw MCP format
|
|
25
|
+
* await client.close();
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example With auth token
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const client = await connect(MyServerConfig, {
|
|
31
|
+
* clientInfo: { name: 'my-agent', version: '1.0.0' },
|
|
32
|
+
* session: { id: 'session-123', user: { sub: 'user-1' } },
|
|
33
|
+
* authToken: 'jwt-token',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example With custom client info (for platform detection)
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const client = await connect(MyServerConfig, {
|
|
40
|
+
* clientInfo: { name: 'openai-agent', version: '1.0.0' },
|
|
41
|
+
* });
|
|
42
|
+
* // Tools will be formatted for OpenAI
|
|
43
|
+
* const tools = await client.listTools();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function connect(config: FrontMcpConfigInput, options?: ConnectOptions): Promise<DirectClient>;
|
|
47
|
+
/**
|
|
48
|
+
* Connect to a FrontMCP server as an OpenAI client.
|
|
49
|
+
*
|
|
50
|
+
* Tools are automatically formatted for OpenAI function calling:
|
|
51
|
+
* ```json
|
|
52
|
+
* [{
|
|
53
|
+
* "type": "function",
|
|
54
|
+
* "function": {
|
|
55
|
+
* "name": "tool_name",
|
|
56
|
+
* "description": "Tool description",
|
|
57
|
+
* "parameters": { ... },
|
|
58
|
+
* "strict": true
|
|
59
|
+
* }
|
|
60
|
+
* }]
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param config - FrontMCP configuration
|
|
64
|
+
* @param options - Connection options (session, authToken)
|
|
65
|
+
* @returns Connected DirectClient with OpenAI formatting
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { connectOpenAI } from '@frontmcp/sdk';
|
|
70
|
+
* import OpenAI from 'openai';
|
|
71
|
+
*
|
|
72
|
+
* const client = await connectOpenAI(MyServerConfig, {
|
|
73
|
+
* authToken: 'user-jwt-token',
|
|
74
|
+
* session: { id: 'user-123' },
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* const openai = new OpenAI();
|
|
78
|
+
* const tools = await client.listTools(); // Already OpenAI format!
|
|
79
|
+
*
|
|
80
|
+
* const response = await openai.chat.completions.create({
|
|
81
|
+
* model: 'gpt-4-turbo',
|
|
82
|
+
* tools,
|
|
83
|
+
* messages: [{ role: 'user', content: 'What is the weather?' }],
|
|
84
|
+
* });
|
|
85
|
+
*
|
|
86
|
+
* await client.close();
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function connectOpenAI(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
|
|
90
|
+
/**
|
|
91
|
+
* Connect to a FrontMCP server as a Claude client.
|
|
92
|
+
*
|
|
93
|
+
* Tools are automatically formatted for Anthropic Claude:
|
|
94
|
+
* ```json
|
|
95
|
+
* [{
|
|
96
|
+
* "name": "tool_name",
|
|
97
|
+
* "description": "Tool description",
|
|
98
|
+
* "input_schema": { ... }
|
|
99
|
+
* }]
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @param config - FrontMCP configuration
|
|
103
|
+
* @param options - Connection options (session, authToken)
|
|
104
|
+
* @returns Connected DirectClient with Claude formatting
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* import { connectClaude } from '@frontmcp/sdk';
|
|
109
|
+
* import Anthropic from '@anthropic-ai/sdk';
|
|
110
|
+
*
|
|
111
|
+
* const client = await connectClaude(MyServerConfig, { authToken: 'token' });
|
|
112
|
+
* const tools = await client.listTools(); // Claude format
|
|
113
|
+
*
|
|
114
|
+
* const anthropic = new Anthropic();
|
|
115
|
+
* const response = await anthropic.messages.create({
|
|
116
|
+
* model: 'claude-3-opus-20240229',
|
|
117
|
+
* tools,
|
|
118
|
+
* messages: [{ role: 'user', content: 'What is the weather?' }],
|
|
119
|
+
* });
|
|
120
|
+
*
|
|
121
|
+
* await client.close();
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare function connectClaude(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
|
|
125
|
+
/**
|
|
126
|
+
* Connect to a FrontMCP server as a LangChain client.
|
|
127
|
+
*
|
|
128
|
+
* Tools are automatically formatted for LangChain:
|
|
129
|
+
* ```json
|
|
130
|
+
* [{
|
|
131
|
+
* "name": "tool_name",
|
|
132
|
+
* "description": "Tool description",
|
|
133
|
+
* "schema": { ... }
|
|
134
|
+
* }]
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* @param config - FrontMCP configuration
|
|
138
|
+
* @param options - Connection options (session, authToken)
|
|
139
|
+
* @returns Connected DirectClient with LangChain formatting
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```typescript
|
|
143
|
+
* import { connectLangChain } from '@frontmcp/sdk';
|
|
144
|
+
*
|
|
145
|
+
* const client = await connectLangChain(MyServerConfig);
|
|
146
|
+
* const tools = await client.listTools(); // LangChain format
|
|
147
|
+
*
|
|
148
|
+
* // Use with LangChain agent
|
|
149
|
+
* await client.close();
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare function connectLangChain(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
|
|
153
|
+
/**
|
|
154
|
+
* Connect to a FrontMCP server as a Vercel AI SDK client.
|
|
155
|
+
*
|
|
156
|
+
* Tools are automatically formatted for Vercel AI SDK:
|
|
157
|
+
* ```json
|
|
158
|
+
* {
|
|
159
|
+
* "tool_name": {
|
|
160
|
+
* "description": "Tool description",
|
|
161
|
+
* "parameters": { ... }
|
|
162
|
+
* }
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @param config - FrontMCP configuration
|
|
167
|
+
* @param options - Connection options (session, authToken)
|
|
168
|
+
* @returns Connected DirectClient with Vercel AI SDK formatting
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* import { connectVercelAI } from '@frontmcp/sdk';
|
|
173
|
+
* import { generateText } from 'ai';
|
|
174
|
+
*
|
|
175
|
+
* const client = await connectVercelAI(MyServerConfig);
|
|
176
|
+
* const tools = await client.listTools(); // Vercel AI SDK format
|
|
177
|
+
*
|
|
178
|
+
* const { text } = await generateText({
|
|
179
|
+
* model: openai('gpt-4-turbo'),
|
|
180
|
+
* tools,
|
|
181
|
+
* prompt: 'What is the weather?',
|
|
182
|
+
* });
|
|
183
|
+
*
|
|
184
|
+
* await client.close();
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
export declare function connectVercelAI(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
|
|
188
|
+
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/direct/connect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA+CtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAI1G;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKnH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKnH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAKvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKrH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direct-client.d.ts","sourceRoot":"","sources":["../../src/direct/direct-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|