@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
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "FrontMCP SDK",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -52,13 +52,18 @@
|
|
|
52
52
|
},
|
|
53
53
|
"./esm": null
|
|
54
54
|
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22.0.0"
|
|
57
|
+
},
|
|
55
58
|
"peerDependencies": {
|
|
56
59
|
"zod": "^4.0.0",
|
|
60
|
+
"zod-from-json-schema": "^0.5.2",
|
|
57
61
|
"express": "^4.18.0 || ^5.0.0",
|
|
58
62
|
"cors": "^2.8.5",
|
|
59
63
|
"raw-body": "^3.0.0",
|
|
60
64
|
"content-type": "^1.0.5",
|
|
61
|
-
"
|
|
65
|
+
"vectoriadb": "^2.0.2",
|
|
66
|
+
"@vercel/kv": "^3.0.0"
|
|
62
67
|
},
|
|
63
68
|
"peerDependenciesMeta": {
|
|
64
69
|
"@vercel/kv": {
|
|
@@ -66,14 +71,16 @@
|
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
"dependencies": {
|
|
69
|
-
"@frontmcp/utils": "0.
|
|
70
|
-
"@frontmcp/di": "0.
|
|
71
|
-
"@frontmcp/uipack": "0.
|
|
72
|
-
"@
|
|
74
|
+
"@frontmcp/utils": "0.8.0",
|
|
75
|
+
"@frontmcp/di": "0.8.0",
|
|
76
|
+
"@frontmcp/uipack": "0.8.0",
|
|
77
|
+
"@frontmcp/auth": "0.8.0",
|
|
78
|
+
"@modelcontextprotocol/sdk": "1.25.3",
|
|
73
79
|
"@langchain/core": "^1.1.8",
|
|
74
80
|
"@langchain/openai": "^1.2.0",
|
|
75
81
|
"@langchain/anthropic": "^1.3.3",
|
|
76
82
|
"ioredis": "^5.8.0",
|
|
83
|
+
"js-yaml": "^4.1.1",
|
|
77
84
|
"jose": "^6.1.3",
|
|
78
85
|
"reflect-metadata": "^0.2.2"
|
|
79
86
|
},
|
|
@@ -83,7 +90,6 @@
|
|
|
83
90
|
"@langchain/groq": "^1.0.2"
|
|
84
91
|
},
|
|
85
92
|
"devDependencies": {
|
|
86
|
-
"@vercel/kv": "^3.0.0",
|
|
87
93
|
"typescript": "^5.9.3"
|
|
88
94
|
}
|
|
89
95
|
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Apps (ext-apps) Message Handler
|
|
3
|
+
*
|
|
4
|
+
* Server-side handler for bidirectional communication with ext-apps widgets.
|
|
5
|
+
* Processes JSON-RPC requests from widgets and routes them to appropriate handlers.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/modelcontextprotocol/ext-apps
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type { FrontMcpLogger } from '../common';
|
|
11
|
+
import type { ExtAppsJsonRpcRequest, ExtAppsJsonRpcResponse, ExtAppsHostCapabilities } from './ext-apps.types';
|
|
12
|
+
/**
|
|
13
|
+
* Context for handling ext-apps messages.
|
|
14
|
+
* Provides access to scope services for routing requests.
|
|
15
|
+
*/
|
|
16
|
+
export interface ExtAppsHandlerContext {
|
|
17
|
+
/** Session ID for this widget connection */
|
|
18
|
+
sessionId: string;
|
|
19
|
+
/** Logger instance */
|
|
20
|
+
logger: FrontMcpLogger;
|
|
21
|
+
/** Call a tool by name */
|
|
22
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
23
|
+
/** Update model context (optional - host may not support) */
|
|
24
|
+
updateModelContext?: (context: unknown, merge: boolean) => Promise<void>;
|
|
25
|
+
/** Open a link (optional - host may not support) */
|
|
26
|
+
openLink?: (url: string) => Promise<void>;
|
|
27
|
+
/** Request display mode change (optional - host may not support) */
|
|
28
|
+
setDisplayMode?: (mode: string) => Promise<void>;
|
|
29
|
+
/** Close the widget (optional - host may not support) */
|
|
30
|
+
close?: (reason?: string) => Promise<void>;
|
|
31
|
+
/** Register a widget-defined tool (optional - host may not support) */
|
|
32
|
+
registerTool?: (name: string, description: string, inputSchema: Record<string, unknown>) => Promise<void>;
|
|
33
|
+
/** Unregister a widget-defined tool (optional - host may not support) */
|
|
34
|
+
unregisterTool?: (name: string) => Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options for creating an ExtAppsMessageHandler.
|
|
38
|
+
*/
|
|
39
|
+
export interface ExtAppsMessageHandlerOptions {
|
|
40
|
+
/** Handler context with routing capabilities */
|
|
41
|
+
context: ExtAppsHandlerContext;
|
|
42
|
+
/** Host capabilities to advertise */
|
|
43
|
+
hostCapabilities?: ExtAppsHostCapabilities;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Message handler for ext-apps widget-to-host JSON-RPC communication.
|
|
47
|
+
*
|
|
48
|
+
* Handles all JSON-RPC methods defined in the MCP Apps specification:
|
|
49
|
+
* - ui/callServerTool - Proxy tool calls to the MCP server
|
|
50
|
+
* - ui/updateModelContext - Update the model context with widget state
|
|
51
|
+
* - ui/openLink - Request to open a URL
|
|
52
|
+
* - ui/setDisplayMode - Request display mode change
|
|
53
|
+
* - ui/close - Close the widget
|
|
54
|
+
* - ui/log - Forward logs to server logger
|
|
55
|
+
* - ui/registerTool - Register a widget-defined tool
|
|
56
|
+
* - ui/unregisterTool - Unregister a widget-defined tool
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* import { ExtAppsMessageHandler } from '@frontmcp/sdk/ext-apps';
|
|
61
|
+
*
|
|
62
|
+
* const handler = new ExtAppsMessageHandler({
|
|
63
|
+
* context: {
|
|
64
|
+
* sessionId: 'session-123',
|
|
65
|
+
* logger: scopeLogger,
|
|
66
|
+
* callTool: async (name, args) => {
|
|
67
|
+
* // Route to tool call flow
|
|
68
|
+
* return scope.flows.run('tools:call-tool', { name, args });
|
|
69
|
+
* },
|
|
70
|
+
* },
|
|
71
|
+
* hostCapabilities: {
|
|
72
|
+
* serverToolProxy: true,
|
|
73
|
+
* logging: true,
|
|
74
|
+
* },
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* // Handle incoming request
|
|
78
|
+
* const response = await handler.handleRequest(request);
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare class ExtAppsMessageHandler {
|
|
82
|
+
private readonly context;
|
|
83
|
+
private readonly hostCapabilities;
|
|
84
|
+
private readonly logger;
|
|
85
|
+
constructor(options: ExtAppsMessageHandlerOptions);
|
|
86
|
+
/**
|
|
87
|
+
* Get the host capabilities for this handler.
|
|
88
|
+
*/
|
|
89
|
+
getHostCapabilities(): ExtAppsHostCapabilities;
|
|
90
|
+
/**
|
|
91
|
+
* Handle a JSON-RPC request from a widget.
|
|
92
|
+
*
|
|
93
|
+
* @param request - The JSON-RPC request
|
|
94
|
+
* @returns The JSON-RPC response
|
|
95
|
+
*/
|
|
96
|
+
handleRequest(request: ExtAppsJsonRpcRequest): Promise<ExtAppsJsonRpcResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Route a method to its handler.
|
|
99
|
+
*/
|
|
100
|
+
private routeMethod;
|
|
101
|
+
/**
|
|
102
|
+
* Handle ui/initialize - Protocol handshake with widget.
|
|
103
|
+
* Returns host capabilities and initial context.
|
|
104
|
+
*/
|
|
105
|
+
private handleInitialize;
|
|
106
|
+
/**
|
|
107
|
+
* Handle ui/callServerTool - Route tool call to MCP server.
|
|
108
|
+
*/
|
|
109
|
+
private handleCallServerTool;
|
|
110
|
+
/**
|
|
111
|
+
* Handle ui/updateModelContext - Update model context with widget state.
|
|
112
|
+
*/
|
|
113
|
+
private handleUpdateModelContext;
|
|
114
|
+
/**
|
|
115
|
+
* Handle ui/openLink - Request to open a URL.
|
|
116
|
+
*/
|
|
117
|
+
private handleOpenLink;
|
|
118
|
+
/**
|
|
119
|
+
* Handle ui/setDisplayMode - Request display mode change.
|
|
120
|
+
*/
|
|
121
|
+
private handleSetDisplayMode;
|
|
122
|
+
/**
|
|
123
|
+
* Handle ui/close - Close the widget.
|
|
124
|
+
*/
|
|
125
|
+
private handleClose;
|
|
126
|
+
/**
|
|
127
|
+
* Handle ui/log - Forward logs to server logger.
|
|
128
|
+
*/
|
|
129
|
+
private handleLog;
|
|
130
|
+
/**
|
|
131
|
+
* Handle ui/registerTool - Register a widget-defined tool.
|
|
132
|
+
*/
|
|
133
|
+
private handleRegisterTool;
|
|
134
|
+
/**
|
|
135
|
+
* Handle ui/unregisterTool - Unregister a widget-defined tool.
|
|
136
|
+
*/
|
|
137
|
+
private handleUnregisterTool;
|
|
138
|
+
/**
|
|
139
|
+
* Get the appropriate error code for an error.
|
|
140
|
+
*/
|
|
141
|
+
private getErrorCode;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Base class for ext-apps errors.
|
|
145
|
+
*/
|
|
146
|
+
export declare class ExtAppsError extends Error {
|
|
147
|
+
constructor(message: string);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Method not found error.
|
|
151
|
+
*/
|
|
152
|
+
export declare class ExtAppsMethodNotFoundError extends ExtAppsError {
|
|
153
|
+
constructor(message: string);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Invalid params error.
|
|
157
|
+
*/
|
|
158
|
+
export declare class ExtAppsInvalidParamsError extends ExtAppsError {
|
|
159
|
+
constructor(message: string);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Feature not supported error.
|
|
163
|
+
*/
|
|
164
|
+
export declare class ExtAppsNotSupportedError extends ExtAppsError {
|
|
165
|
+
constructor(message: string);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Tool not found error.
|
|
169
|
+
*/
|
|
170
|
+
export declare class ExtAppsToolNotFoundError extends ExtAppsError {
|
|
171
|
+
constructor(message: string);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Factory function for creating an ExtAppsMessageHandler.
|
|
175
|
+
*/
|
|
176
|
+
export declare function createExtAppsMessageHandler(options: ExtAppsMessageHandlerOptions): ExtAppsMessageHandler;
|
|
177
|
+
//# sourceMappingURL=ext-apps.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ext-apps.handler.d.ts","sourceRoot":"","sources":["../../src/ext-apps/ext-apps.handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,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P Apps (ext-apps) Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for the MCP Apps Extension protocol (SEP-1865) bidirectional
|
|
5
|
+
* communication between embedded widgets and AI hosts.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/modelcontextprotocol/ext-apps
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Parameters for ui/callServerTool request.
|
|
12
|
+
* Widget requests the host to invoke a server tool.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExtAppsCallServerToolParams {
|
|
15
|
+
/** Tool name to invoke */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Tool arguments */
|
|
18
|
+
arguments?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parameters for ui/updateModelContext request.
|
|
22
|
+
* Widget updates the model context with new state.
|
|
23
|
+
*/
|
|
24
|
+
export interface ExtAppsUpdateModelContextParams {
|
|
25
|
+
/** Context data to update */
|
|
26
|
+
context: unknown;
|
|
27
|
+
/** Whether to merge with existing context (default: true) */
|
|
28
|
+
merge?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parameters for ui/openLink request.
|
|
32
|
+
* Widget requests the host to open a URL.
|
|
33
|
+
*/
|
|
34
|
+
export interface ExtAppsOpenLinkParams {
|
|
35
|
+
/** URL to open */
|
|
36
|
+
url: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Display mode options for ext-apps widgets.
|
|
40
|
+
*/
|
|
41
|
+
export type ExtAppsDisplayMode = 'inline' | 'fullscreen' | 'pip';
|
|
42
|
+
/**
|
|
43
|
+
* Parameters for ui/setDisplayMode request.
|
|
44
|
+
* Widget requests a display mode change.
|
|
45
|
+
*/
|
|
46
|
+
export interface ExtAppsSetDisplayModeParams {
|
|
47
|
+
/** Desired display mode */
|
|
48
|
+
mode: ExtAppsDisplayMode;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parameters for ui/close request.
|
|
52
|
+
* Widget requests to be closed.
|
|
53
|
+
*/
|
|
54
|
+
export interface ExtAppsCloseParams {
|
|
55
|
+
/** Optional reason for closing */
|
|
56
|
+
reason?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Log levels for ext-apps logging.
|
|
60
|
+
*/
|
|
61
|
+
export type ExtAppsLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
62
|
+
/**
|
|
63
|
+
* Parameters for ui/log request.
|
|
64
|
+
* Widget sends a log message to the host.
|
|
65
|
+
*/
|
|
66
|
+
export interface ExtAppsLogParams {
|
|
67
|
+
/** Log level */
|
|
68
|
+
level: ExtAppsLogLevel;
|
|
69
|
+
/** Log message */
|
|
70
|
+
message: string;
|
|
71
|
+
/** Optional additional data */
|
|
72
|
+
data?: unknown;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Parameters for ui/registerTool request.
|
|
76
|
+
* Widget registers a tool it provides.
|
|
77
|
+
*/
|
|
78
|
+
export interface ExtAppsRegisterToolParams {
|
|
79
|
+
/** Tool name */
|
|
80
|
+
name: string;
|
|
81
|
+
/** Tool description */
|
|
82
|
+
description: string;
|
|
83
|
+
/** Tool input schema (JSON Schema format) */
|
|
84
|
+
inputSchema: Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Parameters for ui/unregisterTool request.
|
|
88
|
+
* Widget unregisters a tool it previously registered.
|
|
89
|
+
*/
|
|
90
|
+
export interface ExtAppsUnregisterToolParams {
|
|
91
|
+
/** Tool name to unregister */
|
|
92
|
+
name: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Host capabilities advertised during initialization.
|
|
96
|
+
* These capabilities are returned by the host in the ui/initialize response.
|
|
97
|
+
*/
|
|
98
|
+
export interface ExtAppsHostCapabilities {
|
|
99
|
+
/** Host supports proxying tool calls to the MCP server */
|
|
100
|
+
serverToolProxy?: boolean;
|
|
101
|
+
/** Host supports opening links */
|
|
102
|
+
openLink?: boolean;
|
|
103
|
+
/** Host supports model context updates */
|
|
104
|
+
modelContextUpdate?: boolean;
|
|
105
|
+
/** Host supports widget-defined tools */
|
|
106
|
+
widgetTools?: boolean;
|
|
107
|
+
/** Supported display modes */
|
|
108
|
+
displayModes?: ExtAppsDisplayMode[];
|
|
109
|
+
/** Host supports logging */
|
|
110
|
+
logging?: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Widget capabilities advertised during initialization.
|
|
114
|
+
* These capabilities are sent by the widget in the ui/initialize request.
|
|
115
|
+
*/
|
|
116
|
+
export interface ExtAppsWidgetCapabilities {
|
|
117
|
+
/** Widget tools configuration */
|
|
118
|
+
tools?: {
|
|
119
|
+
/** Widget can emit tool list changes (dynamic tool registration) */
|
|
120
|
+
listChanged?: boolean;
|
|
121
|
+
};
|
|
122
|
+
/** Widget supports partial input streaming */
|
|
123
|
+
supportsPartialInput?: boolean;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* App info provided during initialization.
|
|
127
|
+
*/
|
|
128
|
+
export interface ExtAppsAppInfo {
|
|
129
|
+
/** Application name */
|
|
130
|
+
name: string;
|
|
131
|
+
/** Application version */
|
|
132
|
+
version: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Host context provided during initialization.
|
|
136
|
+
*/
|
|
137
|
+
export interface ExtAppsHostContext {
|
|
138
|
+
/** Current theme */
|
|
139
|
+
theme?: 'light' | 'dark' | 'system';
|
|
140
|
+
/** Current display mode */
|
|
141
|
+
displayMode?: ExtAppsDisplayMode;
|
|
142
|
+
/** Viewport dimensions */
|
|
143
|
+
viewport?: {
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
};
|
|
147
|
+
/** User locale */
|
|
148
|
+
locale?: string;
|
|
149
|
+
/** User timezone */
|
|
150
|
+
timezone?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Parameters for ui/initialize request.
|
|
154
|
+
*/
|
|
155
|
+
export interface ExtAppsInitializeParams {
|
|
156
|
+
/** Widget app info */
|
|
157
|
+
appInfo: ExtAppsAppInfo;
|
|
158
|
+
/** Widget capabilities */
|
|
159
|
+
appCapabilities: ExtAppsWidgetCapabilities;
|
|
160
|
+
/** Protocol version */
|
|
161
|
+
protocolVersion: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Result of ui/initialize request.
|
|
165
|
+
*/
|
|
166
|
+
export interface ExtAppsInitializeResult {
|
|
167
|
+
/** Host capabilities */
|
|
168
|
+
hostCapabilities: ExtAppsHostCapabilities;
|
|
169
|
+
/** Initial host context */
|
|
170
|
+
hostContext?: ExtAppsHostContext;
|
|
171
|
+
/** Protocol version acknowledged */
|
|
172
|
+
protocolVersion: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Parameters for ui/notifications/tool-input notification.
|
|
176
|
+
*/
|
|
177
|
+
export interface ExtAppsToolInputNotification {
|
|
178
|
+
/** Tool input arguments */
|
|
179
|
+
arguments: Record<string, unknown>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Parameters for ui/notifications/tool-result notification.
|
|
183
|
+
*/
|
|
184
|
+
export interface ExtAppsToolResultNotification {
|
|
185
|
+
/** Tool result content */
|
|
186
|
+
content: unknown;
|
|
187
|
+
/** Structured content for widget rendering */
|
|
188
|
+
structuredContent?: unknown;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Parameters for ui/notifications/host-context-changed notification.
|
|
192
|
+
*/
|
|
193
|
+
export interface ExtAppsHostContextChangedNotification {
|
|
194
|
+
/** Updated theme */
|
|
195
|
+
theme?: 'light' | 'dark' | 'system';
|
|
196
|
+
/** Updated display mode */
|
|
197
|
+
displayMode?: ExtAppsDisplayMode;
|
|
198
|
+
/** Updated viewport */
|
|
199
|
+
viewport?: {
|
|
200
|
+
width: number;
|
|
201
|
+
height: number;
|
|
202
|
+
};
|
|
203
|
+
/** Updated locale */
|
|
204
|
+
locale?: string;
|
|
205
|
+
/** Updated timezone */
|
|
206
|
+
timezone?: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Parameters for ui/notifications/cancelled notification.
|
|
210
|
+
*/
|
|
211
|
+
export interface ExtAppsCancelledNotification {
|
|
212
|
+
/** Cancellation reason */
|
|
213
|
+
reason?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* JSON-RPC 2.0 request.
|
|
217
|
+
*/
|
|
218
|
+
export interface ExtAppsJsonRpcRequest {
|
|
219
|
+
jsonrpc: '2.0';
|
|
220
|
+
id: string | number;
|
|
221
|
+
method: string;
|
|
222
|
+
params?: unknown;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* JSON-RPC 2.0 response.
|
|
226
|
+
*/
|
|
227
|
+
export interface ExtAppsJsonRpcResponse {
|
|
228
|
+
jsonrpc: '2.0';
|
|
229
|
+
id: string | number;
|
|
230
|
+
result?: unknown;
|
|
231
|
+
error?: {
|
|
232
|
+
code: number;
|
|
233
|
+
message: string;
|
|
234
|
+
data?: unknown;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* JSON-RPC 2.0 notification (no id, no response expected).
|
|
239
|
+
*/
|
|
240
|
+
export interface ExtAppsJsonRpcNotification {
|
|
241
|
+
jsonrpc: '2.0';
|
|
242
|
+
method: string;
|
|
243
|
+
params?: unknown;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Union type for all JSON-RPC messages.
|
|
247
|
+
*/
|
|
248
|
+
export type ExtAppsJsonRpcMessage = ExtAppsJsonRpcRequest | ExtAppsJsonRpcResponse | ExtAppsJsonRpcNotification;
|
|
249
|
+
/**
|
|
250
|
+
* Standard JSON-RPC error codes for ext-apps.
|
|
251
|
+
*/
|
|
252
|
+
export declare const EXT_APPS_ERROR_CODES: {
|
|
253
|
+
/** Invalid JSON was received */
|
|
254
|
+
readonly PARSE_ERROR: -32700;
|
|
255
|
+
/** The JSON sent is not a valid Request object */
|
|
256
|
+
readonly INVALID_REQUEST: -32600;
|
|
257
|
+
/** The method does not exist or is not available */
|
|
258
|
+
readonly METHOD_NOT_FOUND: -32601;
|
|
259
|
+
/** Invalid method parameter(s) */
|
|
260
|
+
readonly INVALID_PARAMS: -32602;
|
|
261
|
+
/** Internal JSON-RPC error */
|
|
262
|
+
readonly INTERNAL_ERROR: -32603;
|
|
263
|
+
/** Tool not found */
|
|
264
|
+
readonly TOOL_NOT_FOUND: -32001;
|
|
265
|
+
/** Tool execution failed */
|
|
266
|
+
readonly TOOL_EXECUTION_FAILED: -32002;
|
|
267
|
+
/** Feature not supported */
|
|
268
|
+
readonly NOT_SUPPORTED: -32003;
|
|
269
|
+
/** Operation cancelled */
|
|
270
|
+
readonly CANCELLED: -32004;
|
|
271
|
+
};
|
|
272
|
+
export type ExtAppsErrorCode = (typeof EXT_APPS_ERROR_CODES)[keyof typeof EXT_APPS_ERROR_CODES];
|
|
273
|
+
//# sourceMappingURL=ext-apps.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ext-apps.types.d.ts","sourceRoot":"","sources":["../../src/ext-apps/ext-apps.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAMD;;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AG,qBAAqB,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAMhH;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAC/B,gCAAgC;;IAEhC,kDAAkD;;IAElD,oDAAoD;;IAEpD,kCAAkC;;IAElC,8BAA8B;;IAE9B,qBAAqB;;IAErB,4BAA4B;;IAE5B,4BAA4B;;IAE5B,0BAA0B;;CAElB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Apps (ext-apps) Module
|
|
3
|
+
*
|
|
4
|
+
* Server-side support for the MCP Apps Extension protocol (SEP-1865).
|
|
5
|
+
* Provides types and handlers for bidirectional communication between
|
|
6
|
+
* embedded widgets and AI hosts.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export type { ExtAppsCallServerToolParams, ExtAppsUpdateModelContextParams, ExtAppsOpenLinkParams, ExtAppsDisplayMode, ExtAppsSetDisplayModeParams, ExtAppsCloseParams, ExtAppsLogLevel, ExtAppsLogParams, ExtAppsRegisterToolParams, ExtAppsUnregisterToolParams, ExtAppsHostCapabilities, ExtAppsWidgetCapabilities, ExtAppsAppInfo, ExtAppsHostContext, ExtAppsInitializeParams, ExtAppsInitializeResult, ExtAppsToolInputNotification, ExtAppsToolResultNotification, ExtAppsHostContextChangedNotification, ExtAppsCancelledNotification, ExtAppsJsonRpcRequest, ExtAppsJsonRpcResponse, ExtAppsJsonRpcNotification, ExtAppsJsonRpcMessage, ExtAppsErrorCode, } from './ext-apps.types';
|
|
11
|
+
export { EXT_APPS_ERROR_CODES } from './ext-apps.types';
|
|
12
|
+
export { ExtAppsMessageHandler, createExtAppsMessageHandler, type ExtAppsHandlerContext, type ExtAppsMessageHandlerOptions, ExtAppsError, ExtAppsMethodNotFoundError, ExtAppsInvalidParamsError, ExtAppsNotSupportedError, ExtAppsToolNotFoundError, } from './ext-apps.handler';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ext-apps/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAEV,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,EAErB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAElB,eAAe,EACf,gBAAgB,EAEhB,yBAAyB,EACzB,2BAA2B,EAE3B,uBAAuB,EACvB,yBAAyB,EAEzB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EAEvB,4BAA4B,EAC5B,6BAA6B,EAC7B,qCAAqC,EACrC,4BAA4B,EAE5B,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAE3B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EAEjC,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.instance.d.ts","sourceRoot":"","sources":["../../src/flows/flow.instance.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAIL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EAEZ,UAAU,EAKV,SAAS,EACT,aAAa,EACb,KAAK,EACL,IAAI,EACL,MAAM,WAAW,CAAC;AACnB,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA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B,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,KAAK,CAAe;gBAEhB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,gBAAgB;cAUrF,UAAU;IA4DpB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAa3D;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;;;;;;;;OASG;YACW,cAAc;IAiCtB,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;CA4TrG"}
|
package/front-mcp/front-mcp.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FrontMcpConfigType, FrontMcpInterface, ScopeEntry } from '../common';
|
|
1
|
+
import { FrontMcpConfigInput, FrontMcpConfigType, FrontMcpInterface, ScopeEntry } from '../common';
|
|
2
|
+
import type { DirectMcpServer } from '../direct';
|
|
2
3
|
export declare class FrontMcpInstance implements FrontMcpInterface {
|
|
3
4
|
config: FrontMcpConfigType;
|
|
4
5
|
readonly ready: Promise<void>;
|
|
@@ -39,6 +40,67 @@ export declare class FrontMcpInstance implements FrontMcpInterface {
|
|
|
39
40
|
* const instance = await FrontMcpInstance.createForGraph(config);
|
|
40
41
|
* const scopes = instance.getScopes();
|
|
41
42
|
*/
|
|
42
|
-
static createForGraph(options:
|
|
43
|
+
static createForGraph(options: FrontMcpConfigInput): Promise<FrontMcpInstance>;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a DirectMcpServer from a FrontMCP configuration.
|
|
46
|
+
* This provides direct programmatic access to MCP operations
|
|
47
|
+
* without requiring HTTP transport.
|
|
48
|
+
*
|
|
49
|
+
* Use cases:
|
|
50
|
+
* - Unit/integration testing tools, resources, prompts
|
|
51
|
+
* - Embedding MCP capabilities in other applications
|
|
52
|
+
* - CLI tools that need direct access
|
|
53
|
+
* - Agent backends with custom invocation
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import { FrontMcpInstance } from '@frontmcp/sdk';
|
|
58
|
+
* import MyServer from './my-server';
|
|
59
|
+
*
|
|
60
|
+
* const server = await FrontMcpInstance.createDirect(MyServer);
|
|
61
|
+
*
|
|
62
|
+
* // List all tools
|
|
63
|
+
* const tools = await server.listTools();
|
|
64
|
+
*
|
|
65
|
+
* // Call a tool with auth context
|
|
66
|
+
* const result = await server.callTool('my-tool', { param: 'value' }, {
|
|
67
|
+
* authContext: { sessionId: 'user-123', token: 'jwt-token' }
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* // Cleanup when done
|
|
71
|
+
* await server.dispose();
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
static createDirect(options: FrontMcpConfigInput): Promise<DirectMcpServer>;
|
|
75
|
+
/**
|
|
76
|
+
* Runs the FrontMCP server using stdio transport for use with Claude Code
|
|
77
|
+
* or other MCP clients that support stdio communication.
|
|
78
|
+
*
|
|
79
|
+
* This method connects the server to stdin/stdout and handles MCP protocol
|
|
80
|
+
* messages directly. It does not return until the connection is closed.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* // In your CLI entrypoint
|
|
85
|
+
* import { FrontMcpInstance } from '@frontmcp/sdk';
|
|
86
|
+
* import MyServer from './my-server';
|
|
87
|
+
*
|
|
88
|
+
* FrontMcpInstance.runStdio(MyServer);
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```bash
|
|
93
|
+
* # In Claude Desktop config:
|
|
94
|
+
* {
|
|
95
|
+
* "mcpServers": {
|
|
96
|
+
* "my-server": {
|
|
97
|
+
* "command": "node",
|
|
98
|
+
* "args": ["./dist/main.js", "--stdio"]
|
|
99
|
+
* }
|
|
100
|
+
* }
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
static runStdio(options: FrontMcpConfigInput): Promise<void>;
|
|
43
105
|
}
|
|
44
106
|
//# sourceMappingURL=front-mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-mcp.d.ts","sourceRoot":"","sources":["../../src/front-mcp/front-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"front-mcp.d.ts","sourceRoot":"","sources":["../../src/front-mcp/front-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAEjB,UAAU,EAEX,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAKjD,qBAAa,gBAAiB,YAAW,iBAAiB;IACxD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,MAAM,CAAgB;gBAElB,MAAM,EAAE,kBAAkB;IAKhC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAWjC,KAAK;IAQL;;OAEG;IACH,SAAS,IAAI,kBAAkB;IAI/B;;;OAGG;IACH,SAAS,IAAI,UAAU,EAAE;WAIL,SAAS,CAAC,OAAO,EAAE,kBAAkB;IAOzD;;;;;;;;;;OAUG;WACiB,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAahF;;;;;;;;OAQG;WACiB,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQ3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACiB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAoBxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACiB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CA0G1E"}
|