@frontmcp/sdk 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/adapters/adapter.factory.d.ts +27 -18
- package/agent/adapters/adapter.factory.d.ts.map +1 -1
- package/agent/agent.instance.d.ts +5 -0
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +54 -72
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts +1 -0
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/app/instances/app.local.instance.d.ts +3 -0
- package/app/instances/app.local.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts +3 -0
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/auth.registry.d.ts.map +1 -1
- package/auth/authorization/authorization.types.d.ts +7 -180
- package/auth/authorization/authorization.types.d.ts.map +1 -1
- package/auth/authorization/index.d.ts +2 -0
- package/auth/authorization/index.d.ts.map +1 -1
- package/auth/authorization/orchestrated.accessor.d.ts +161 -0
- package/auth/authorization/orchestrated.accessor.d.ts.map +1 -0
- package/auth/authorization/orchestrated.authorization.d.ts +19 -4
- package/auth/authorization/orchestrated.authorization.d.ts.map +1 -1
- package/auth/authorization/orchestrated.context-extension.d.ts +108 -0
- package/auth/authorization/orchestrated.context-extension.d.ts.map +1 -0
- package/auth/cimd/index.d.ts +14 -0
- package/auth/cimd/index.d.ts.map +1 -0
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +30 -3
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +11 -3
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +118 -0
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -0
- package/auth/flows/oauth.register.flow.d.ts +1 -1
- package/auth/flows/oauth.token.flow.d.ts +1 -1
- package/auth/flows/session.verify.flow.d.ts +8 -0
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +3 -3
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -2
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +88 -1
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/machine-id.d.ts +14 -0
- package/auth/machine-id.d.ts.map +1 -1
- package/auth/session/encrypted-authorization-vault.d.ts +2 -3
- package/auth/session/encrypted-authorization-vault.d.ts.map +1 -1
- package/auth/session/federated-auth.session.d.ts +252 -0
- package/auth/session/federated-auth.session.d.ts.map +1 -0
- package/auth/session/index.d.ts +6 -2
- package/auth/session/index.d.ts.map +1 -1
- package/auth/session/orchestrated-token.store.d.ts +155 -0
- package/auth/session/orchestrated-token.store.d.ts.map +1 -0
- package/auth/session/record/session.base.d.ts +7 -7
- package/auth/session/record/session.base.d.ts.map +1 -1
- package/auth/session/record/session.mcp.d.ts +11 -0
- package/auth/session/record/session.mcp.d.ts.map +1 -0
- package/auth/session/redis-session.store.d.ts +10 -5
- package/auth/session/redis-session.store.d.ts.map +1 -1
- package/auth/session/session-crypto.d.ts +6 -9
- package/auth/session/session-crypto.d.ts.map +1 -1
- package/{store/store.factory.d.ts → auth/session/session-store.factory.d.ts} +10 -36
- package/auth/session/session-store.factory.d.ts.map +1 -0
- package/auth/session/session.service.d.ts +4 -8
- package/auth/session/session.service.d.ts.map +1 -1
- package/auth/session/session.transport.d.ts +8 -2
- package/auth/session/session.transport.d.ts.map +1 -1
- package/auth/session/session.types.d.ts +5 -5
- package/auth/session/session.types.d.ts.map +1 -1
- package/auth/session/token.refresh.d.ts +1 -2
- package/auth/session/token.refresh.d.ts.map +1 -1
- package/auth/session/transport-session.manager.d.ts +7 -6
- package/auth/session/transport-session.manager.d.ts.map +1 -1
- package/auth/session/utils/session-id.utils.d.ts +18 -1
- package/auth/session/utils/session-id.utils.d.ts.map +1 -1
- package/auth/session/vercel-kv-session.store.d.ts +16 -16
- package/auth/session/vercel-kv-session.store.d.ts.map +1 -1
- package/auth/utils/authorization-id.utils.d.ts +12 -0
- package/auth/utils/authorization-id.utils.d.ts.map +1 -0
- package/auth/utils/index.d.ts +1 -2
- package/auth/utils/index.d.ts.map +1 -1
- package/auth/vault/auth-providers.accessor.d.ts +153 -0
- package/auth/vault/auth-providers.accessor.d.ts.map +1 -0
- package/auth/vault/auth-providers.accessor.impl.d.ts +52 -0
- package/auth/vault/auth-providers.accessor.impl.d.ts.map +1 -0
- package/auth/vault/auth-providers.context-extension.d.ts +68 -0
- package/auth/vault/auth-providers.context-extension.d.ts.map +1 -0
- package/auth/vault/auth-providers.providers.d.ts +40 -0
- package/auth/vault/auth-providers.providers.d.ts.map +1 -0
- package/auth/vault/auth-providers.registry.d.ts +110 -0
- package/auth/vault/auth-providers.registry.d.ts.map +1 -0
- package/auth/vault/auth-providers.vault.d.ts +93 -0
- package/auth/vault/auth-providers.vault.d.ts.map +1 -0
- package/auth/vault/credential-cache.d.ts +13 -0
- package/auth/vault/credential-cache.d.ts.map +1 -0
- package/auth/vault/credential-loaders/eager-loader.d.ts +46 -0
- package/auth/vault/credential-loaders/eager-loader.d.ts.map +1 -0
- package/auth/vault/credential-loaders/index.d.ts +7 -0
- package/auth/vault/credential-loaders/index.d.ts.map +1 -0
- package/auth/vault/credential-loaders/lazy-loader.d.ts +53 -0
- package/auth/vault/credential-loaders/lazy-loader.d.ts.map +1 -0
- package/auth/vault/index.d.ts +56 -0
- package/auth/vault/index.d.ts.map +1 -0
- package/builtin/config/config-resolver.d.ts +162 -0
- package/builtin/config/config-resolver.d.ts.map +1 -0
- package/builtin/config/config.plugin.d.ts +63 -0
- package/builtin/config/config.plugin.d.ts.map +1 -0
- package/builtin/config/config.symbols.d.ts +7 -0
- package/builtin/config/config.symbols.d.ts.map +1 -0
- package/builtin/config/config.types.d.ts +71 -0
- package/builtin/config/config.types.d.ts.map +1 -0
- package/builtin/config/index.d.ts +68 -0
- package/builtin/config/index.d.ts.map +1 -0
- package/builtin/config/providers/config-loader.d.ts +36 -0
- package/builtin/config/providers/config-loader.d.ts.map +1 -0
- package/builtin/config/providers/config.service.d.ts +108 -0
- package/builtin/config/providers/config.service.d.ts.map +1 -0
- package/builtin/config/providers/env-loader.d.ts +76 -0
- package/builtin/config/providers/env-loader.d.ts.map +1 -0
- package/builtin/index.d.ts +7 -0
- package/builtin/index.d.ts.map +1 -0
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/hook.decorator.d.ts +0 -10
- package/common/decorators/hook.decorator.d.ts.map +1 -1
- package/common/decorators/index.d.ts +1 -0
- package/common/decorators/index.d.ts.map +1 -1
- package/common/decorators/skill.decorator.d.ts +105 -0
- package/common/decorators/skill.decorator.d.ts.map +1 -0
- package/common/dynamic/dynamic.adapter.d.ts +14 -4
- package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
- package/common/entries/app.entry.d.ts +2 -0
- package/common/entries/app.entry.d.ts.map +1 -1
- package/common/entries/index.d.ts +1 -0
- package/common/entries/index.d.ts.map +1 -1
- package/common/entries/prompt.entry.d.ts +0 -6
- package/common/entries/prompt.entry.d.ts.map +1 -1
- package/common/entries/resource.entry.d.ts +0 -6
- package/common/entries/resource.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +2 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/skill.entry.d.ts +95 -0
- package/common/entries/skill.entry.d.ts.map +1 -0
- package/common/entries/tool.entry.d.ts +17 -9
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +35 -6
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/execution-context.interface.d.ts +14 -0
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/index.d.ts +1 -0
- package/common/interfaces/index.d.ts.map +1 -1
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts +1 -7
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
- package/common/interfaces/internal/registry.interface.d.ts +4 -1
- package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
- package/common/interfaces/skill.interface.d.ts +91 -0
- package/common/interfaces/skill.interface.d.ts.map +1 -0
- package/common/interfaces/tool.interface.d.ts +39 -0
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +62 -2
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +168 -169
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +2182 -721
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/index.d.ts +1 -0
- package/common/metadata/index.d.ts.map +1 -1
- package/common/metadata/plugin.metadata.d.ts +8 -1
- package/common/metadata/plugin.metadata.d.ts.map +1 -1
- package/common/metadata/skill.metadata.d.ts +366 -0
- package/common/metadata/skill.metadata.d.ts.map +1 -0
- package/common/metadata/tool.metadata.d.ts +71 -0
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/records/index.d.ts +1 -0
- package/common/records/index.d.ts.map +1 -1
- package/common/records/skill.record.d.ts +55 -0
- package/common/records/skill.record.d.ts.map +1 -0
- package/common/schemas/annotated-class.schema.d.ts +1 -0
- package/common/schemas/annotated-class.schema.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +24 -24
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/index.d.ts +1 -0
- package/common/tokens/index.d.ts.map +1 -1
- package/common/tokens/plugin.tokens.d.ts +1 -0
- package/common/tokens/plugin.tokens.d.ts.map +1 -1
- package/common/tokens/skill.tokens.d.ts +18 -0
- package/common/tokens/skill.tokens.d.ts.map +1 -0
- package/common/tokens/tool.tokens.d.ts +2 -0
- package/common/tokens/tool.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +21 -0
- package/common/types/auth/session.types.d.ts.map +1 -1
- package/common/types/options/auth/app-auth.schema.d.ts +80 -84
- package/common/types/options/auth/app-auth.schema.d.ts.map +1 -1
- package/common/types/options/auth/index.d.ts +6 -8
- package/common/types/options/auth/index.d.ts.map +1 -1
- package/common/types/options/auth/{auth.interfaces.d.ts → interfaces.d.ts} +17 -48
- package/common/types/options/auth/interfaces.d.ts.map +1 -0
- package/common/types/options/auth/orchestrated.schema.d.ts +160 -84
- package/common/types/options/auth/orchestrated.schema.d.ts.map +1 -1
- package/common/types/options/auth/public.schema.d.ts +0 -21
- package/common/types/options/auth/public.schema.d.ts.map +1 -1
- package/common/types/options/auth/{auth.schema.d.ts → schema.d.ts} +81 -85
- package/common/types/options/auth/schema.d.ts.map +1 -0
- package/common/types/options/auth/shared.schemas.d.ts +12 -0
- package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
- package/common/types/options/auth/transparent.schema.d.ts +0 -21
- package/common/types/options/auth/transparent.schema.d.ts.map +1 -1
- package/common/types/options/auth/typecheck.d.ts +2 -0
- package/common/types/options/auth/typecheck.d.ts.map +1 -0
- package/common/types/options/auth/{auth.utils.d.ts → utils.d.ts} +2 -2
- package/common/types/options/auth/utils.d.ts.map +1 -0
- package/common/types/options/elicitation/index.d.ts +4 -0
- package/common/types/options/elicitation/index.d.ts.map +1 -0
- package/common/types/options/elicitation/interfaces.d.ts +80 -0
- package/common/types/options/elicitation/interfaces.d.ts.map +1 -0
- package/common/types/options/elicitation/schema.d.ts +75 -0
- package/common/types/options/elicitation/schema.d.ts.map +1 -0
- package/common/types/options/ext-apps/index.d.ts +3 -0
- package/common/types/options/ext-apps/index.d.ts.map +1 -0
- package/common/types/options/ext-apps/interfaces.d.ts +2 -0
- package/common/types/options/ext-apps/interfaces.d.ts.map +1 -0
- package/common/types/options/ext-apps/schema.d.ts +80 -0
- package/common/types/options/ext-apps/schema.d.ts.map +1 -0
- package/common/types/options/http/index.d.ts +4 -0
- package/common/types/options/http/index.d.ts.map +1 -0
- package/common/types/options/http/interfaces.d.ts +23 -0
- package/common/types/options/http/interfaces.d.ts.map +1 -0
- package/common/types/options/http/schema.d.ts +18 -0
- package/common/types/options/http/schema.d.ts.map +1 -0
- package/common/types/options/index.d.ts +10 -6
- package/common/types/options/index.d.ts.map +1 -1
- package/common/types/options/logging/index.d.ts +5 -0
- package/common/types/options/logging/index.d.ts.map +1 -0
- package/common/types/options/logging/interfaces.d.ts +41 -0
- package/common/types/options/logging/interfaces.d.ts.map +1 -0
- package/common/types/options/logging/schema.d.ts +24 -0
- package/common/types/options/logging/schema.d.ts.map +1 -0
- package/common/types/options/pagination/index.d.ts +4 -0
- package/common/types/options/pagination/index.d.ts.map +1 -0
- package/common/types/options/pagination/interfaces.d.ts +43 -0
- package/common/types/options/pagination/interfaces.d.ts.map +1 -0
- package/common/types/options/pagination/schema.d.ts +41 -0
- package/common/types/options/pagination/schema.d.ts.map +1 -0
- package/common/types/options/redis/index.d.ts +4 -0
- package/common/types/options/redis/index.d.ts.map +1 -0
- package/common/types/options/redis/interfaces.d.ts +81 -0
- package/common/types/options/redis/interfaces.d.ts.map +1 -0
- package/common/types/options/{redis.options.d.ts → redis/schema.d.ts} +2 -2
- package/common/types/options/redis/schema.d.ts.map +1 -0
- package/common/types/options/server-info/index.d.ts +4 -0
- package/common/types/options/server-info/index.d.ts.map +1 -0
- package/common/types/options/server-info/interfaces.d.ts +27 -0
- package/common/types/options/server-info/interfaces.d.ts.map +1 -0
- package/common/types/options/{server-info.options.d.ts → server-info/schema.d.ts} +13 -10
- package/common/types/options/server-info/schema.d.ts.map +1 -0
- package/common/types/options/session/index.d.ts +4 -0
- package/common/types/options/session/index.d.ts.map +1 -0
- package/common/types/options/session/interfaces.d.ts +66 -0
- package/common/types/options/session/interfaces.d.ts.map +1 -0
- package/common/types/options/session/schema.d.ts +79 -0
- package/common/types/options/session/schema.d.ts.map +1 -0
- package/common/types/options/skills-http/index.d.ts +4 -0
- package/common/types/options/skills-http/index.d.ts.map +1 -0
- package/common/types/options/skills-http/interfaces.d.ts +321 -0
- package/common/types/options/skills-http/interfaces.d.ts.map +1 -0
- package/common/types/options/skills-http/schema.d.ts +139 -0
- package/common/types/options/skills-http/schema.d.ts.map +1 -0
- package/common/types/options/transport/index.d.ts +4 -0
- package/common/types/options/transport/index.d.ts.map +1 -0
- package/common/types/options/transport/interfaces.d.ts +354 -0
- package/common/types/options/transport/interfaces.d.ts.map +1 -0
- package/common/types/options/transport/schema.d.ts +309 -0
- package/common/types/options/transport/schema.d.ts.map +1 -0
- package/common/types/options/transport/typecheck.d.ts +2 -0
- package/common/types/options/transport/typecheck.d.ts.map +1 -0
- package/common/utils/decide-request-intent.utils.d.ts +3 -3
- package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
- package/context/context-extension.d.ts +1 -28
- package/context/context-extension.d.ts.map +1 -1
- package/context/frontmcp-context-storage.d.ts.map +1 -1
- package/context/frontmcp-context.d.ts +36 -39
- package/context/frontmcp-context.d.ts.map +1 -1
- package/context/frontmcp-context.provider.d.ts +3 -9
- package/context/frontmcp-context.provider.d.ts.map +1 -1
- package/context/index.d.ts +5 -20
- package/context/index.d.ts.map +1 -1
- package/context/metadata.utils.d.ts +24 -0
- package/context/metadata.utils.d.ts.map +1 -0
- package/direct/client.types.d.ts +447 -0
- package/direct/client.types.d.ts.map +1 -0
- package/direct/connect.d.ts +188 -0
- package/direct/connect.d.ts.map +1 -0
- package/direct/direct-client.d.ts +7 -0
- package/direct/direct-client.d.ts.map +1 -0
- package/direct/direct-server.d.ts +38 -0
- package/direct/direct-server.d.ts.map +1 -0
- package/direct/direct.types.d.ts +134 -0
- package/direct/direct.types.d.ts.map +1 -0
- package/direct/index.d.ts +15 -0
- package/direct/index.d.ts.map +1 -0
- package/direct/llm-platform.d.ts +94 -0
- package/direct/llm-platform.d.ts.map +1 -0
- package/elicitation/elicitation-fallback.schema.d.ts +32 -0
- package/elicitation/elicitation-fallback.schema.d.ts.map +1 -0
- package/elicitation/elicitation.types.d.ts +160 -0
- package/elicitation/elicitation.types.d.ts.map +1 -0
- package/elicitation/flows/elicitation-request.flow.d.ts +98 -0
- package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -0
- package/elicitation/flows/elicitation-result.flow.d.ts +79 -0
- package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -0
- package/elicitation/flows/index.d.ts +10 -0
- package/elicitation/flows/index.d.ts.map +1 -0
- package/elicitation/helpers/elicit.helper.d.ts +65 -0
- package/elicitation/helpers/elicit.helper.d.ts.map +1 -0
- package/elicitation/helpers/extend-output-schema.d.ts +31 -0
- package/elicitation/helpers/extend-output-schema.d.ts.map +1 -0
- package/elicitation/helpers/fallback.helper.d.ts +60 -0
- package/elicitation/helpers/fallback.helper.d.ts.map +1 -0
- package/elicitation/helpers/index.d.ts +12 -0
- package/elicitation/helpers/index.d.ts.map +1 -0
- package/elicitation/helpers/validate-elicitation-content.d.ts +52 -0
- package/elicitation/helpers/validate-elicitation-content.d.ts.map +1 -0
- package/elicitation/hooks/elicitation.hooks.d.ts +66 -0
- package/elicitation/hooks/elicitation.hooks.d.ts.map +1 -0
- package/elicitation/hooks/index.d.ts +9 -0
- package/elicitation/hooks/index.d.ts.map +1 -0
- package/elicitation/index.d.ts +18 -0
- package/elicitation/index.d.ts.map +1 -0
- package/elicitation/send-elicitation-result.tool.d.ts +18 -0
- package/elicitation/send-elicitation-result.tool.d.ts.map +1 -0
- package/elicitation/store/elicitation-encryption.d.ts +134 -0
- package/elicitation/store/elicitation-encryption.d.ts.map +1 -0
- package/elicitation/store/elicitation-store.factory.d.ts +197 -0
- package/elicitation/store/elicitation-store.factory.d.ts.map +1 -0
- package/elicitation/store/elicitation.store.d.ts +191 -0
- package/elicitation/store/elicitation.store.d.ts.map +1 -0
- package/elicitation/store/encrypted-elicitation.store.d.ts +121 -0
- package/elicitation/store/encrypted-elicitation.store.d.ts.map +1 -0
- package/elicitation/store/index.d.ts +14 -0
- package/elicitation/store/index.d.ts.map +1 -0
- package/elicitation/store/storage-elicitation.store.d.ts +118 -0
- package/elicitation/store/storage-elicitation.store.d.ts.map +1 -0
- package/errors/elicitation.error.d.ts +115 -0
- package/errors/elicitation.error.d.ts.map +1 -0
- package/errors/index.d.ts +1 -0
- package/errors/index.d.ts.map +1 -1
- package/esm/index.mjs +30824 -19537
- package/esm/package.json +13 -7
- package/ext-apps/ext-apps.handler.d.ts +177 -0
- package/ext-apps/ext-apps.handler.d.ts.map +1 -0
- package/ext-apps/ext-apps.types.d.ts +273 -0
- package/ext-apps/ext-apps.types.d.ts.map +1 -0
- package/ext-apps/index.d.ts +13 -0
- package/ext-apps/index.d.ts.map +1 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +64 -2
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts +604 -236
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/index.d.ts +17 -0
- package/index.d.ts.map +1 -1
- package/index.js +31066 -19707
- package/notification/index.d.ts +1 -1
- package/notification/index.d.ts.map +1 -1
- package/notification/notification.service.d.ts +18 -0
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +13 -7
- package/plugin/plugin.registry.d.ts +2 -0
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +8 -3
- package/provider/provider.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +4 -0
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +74 -0
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/server.instance.d.ts +3 -3
- package/server/server.instance.d.ts.map +1 -1
- package/skill/auth/index.d.ts +10 -0
- package/skill/auth/index.d.ts.map +1 -0
- package/skill/auth/skill-http-auth.d.ts +112 -0
- package/skill/auth/skill-http-auth.d.ts.map +1 -0
- package/skill/cache/index.d.ts +13 -0
- package/skill/cache/index.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.d.ts +144 -0
- package/skill/cache/skill-http-cache.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.factory.d.ts +83 -0
- package/skill/cache/skill-http-cache.factory.d.ts.map +1 -0
- package/skill/cache/skill-http-cache.holder.d.ts +35 -0
- package/skill/cache/skill-http-cache.holder.d.ts.map +1 -0
- package/skill/errors/index.d.ts +3 -0
- package/skill/errors/index.d.ts.map +1 -0
- package/skill/errors/skill-validation.error.d.ts +110 -0
- package/skill/errors/skill-validation.error.d.ts.map +1 -0
- package/skill/errors/tool-not-allowed.error.d.ts +66 -0
- package/skill/errors/tool-not-allowed.error.d.ts.map +1 -0
- package/skill/flows/http/index.d.ts +12 -0
- package/skill/flows/http/index.d.ts.map +1 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts +70 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -0
- package/skill/flows/http/llm-txt.flow.d.ts +77 -0
- package/skill/flows/http/llm-txt.flow.d.ts.map +1 -0
- package/skill/flows/http/skills-api.flow.d.ts +81 -0
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -0
- package/skill/flows/index.d.ts +13 -0
- package/skill/flows/index.d.ts.map +1 -0
- package/skill/flows/load-skill.flow.d.ts +169 -0
- package/skill/flows/load-skill.flow.d.ts.map +1 -0
- package/skill/flows/search-skills.flow.d.ts +101 -0
- package/skill/flows/search-skills.flow.d.ts.map +1 -0
- package/skill/guards/index.d.ts +2 -0
- package/skill/guards/index.d.ts.map +1 -0
- package/skill/guards/tool-authorization.guard.d.ts +87 -0
- package/skill/guards/tool-authorization.guard.d.ts.map +1 -0
- package/skill/hooks/index.d.ts +2 -0
- package/skill/hooks/index.d.ts.map +1 -0
- package/skill/hooks/skill-tool.hook.d.ts +52 -0
- package/skill/hooks/skill-tool.hook.d.ts.map +1 -0
- package/skill/index.d.ts +74 -0
- package/skill/index.d.ts.map +1 -0
- package/skill/providers/external-skill.provider.d.ts +240 -0
- package/skill/providers/external-skill.provider.d.ts.map +1 -0
- package/skill/providers/index.d.ts +12 -0
- package/skill/providers/index.d.ts.map +1 -0
- package/skill/providers/memory-skill.provider.d.ts +97 -0
- package/skill/providers/memory-skill.provider.d.ts.map +1 -0
- package/skill/session/index.d.ts +4 -0
- package/skill/session/index.d.ts.map +1 -0
- package/skill/session/skill-session-store.interface.d.ts +79 -0
- package/skill/session/skill-session-store.interface.d.ts.map +1 -0
- package/skill/session/skill-session.manager.d.ts +137 -0
- package/skill/session/skill-session.manager.d.ts.map +1 -0
- package/skill/session/skill-session.types.d.ts +303 -0
- package/skill/session/skill-session.types.d.ts.map +1 -0
- package/skill/skill-http.utils.d.ts +107 -0
- package/skill/skill-http.utils.d.ts.map +1 -0
- package/skill/skill-mode.utils.d.ts +53 -0
- package/skill/skill-mode.utils.d.ts.map +1 -0
- package/skill/skill-scope.helper.d.ts +55 -0
- package/skill/skill-scope.helper.d.ts.map +1 -0
- package/skill/skill-storage.factory.d.ts +194 -0
- package/skill/skill-storage.factory.d.ts.map +1 -0
- package/skill/skill-storage.interface.d.ts +230 -0
- package/skill/skill-storage.interface.d.ts.map +1 -0
- package/skill/skill-validator.d.ts +63 -0
- package/skill/skill-validator.d.ts.map +1 -0
- package/skill/skill.events.d.ts +88 -0
- package/skill/skill.events.d.ts.map +1 -0
- package/skill/skill.instance.d.ts +92 -0
- package/skill/skill.instance.d.ts.map +1 -0
- package/skill/skill.registry.d.ts +309 -0
- package/skill/skill.registry.d.ts.map +1 -0
- package/skill/skill.utils.d.ts +90 -0
- package/skill/skill.utils.d.ts.map +1 -0
- package/skill/sync/index.d.ts +16 -0
- package/skill/sync/index.d.ts.map +1 -0
- package/skill/sync/memory-sync-state.store.d.ts +49 -0
- package/skill/sync/memory-sync-state.store.d.ts.map +1 -0
- package/skill/sync/skill-hash.d.ts +65 -0
- package/skill/sync/skill-hash.d.ts.map +1 -0
- package/skill/sync/sync-state.interface.d.ts +125 -0
- package/skill/sync/sync-state.interface.d.ts.map +1 -0
- package/skill/tools/index.d.ts +21 -0
- package/skill/tools/index.d.ts.map +1 -0
- package/skill/tools/load-skills.tool.d.ts +76 -0
- package/skill/tools/load-skills.tool.d.ts.map +1 -0
- package/skill/tools/search-skills.tool.d.ts +61 -0
- package/skill/tools/search-skills.tool.d.ts.map +1 -0
- package/tool/flows/call-tool.flow.d.ts +1 -0
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts +15 -0
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts +8 -0
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.registry.d.ts +11 -0
- package/tool/tool.registry.d.ts.map +1 -1
- package/tool/tool.utils.d.ts.map +1 -1
- package/tool/ui/template-helpers.d.ts +0 -5
- package/tool/ui/template-helpers.d.ts.map +1 -1
- package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts +54 -9
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.sse.adapter.d.ts +11 -2
- package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +21 -2
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/event-stores/event-store.factory.d.ts +96 -0
- package/transport/event-stores/event-store.factory.d.ts.map +1 -0
- package/transport/event-stores/index.d.ts +47 -0
- package/transport/event-stores/index.d.ts.map +1 -0
- package/transport/event-stores/memory.event-store.d.ts +51 -0
- package/transport/event-stores/memory.event-store.d.ts.map +1 -0
- package/transport/event-stores/redis.event-store.d.ts +79 -0
- package/transport/event-stores/redis.event-store.d.ts.map +1 -0
- package/transport/flows/handle.sse.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +3 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts +85 -0
- package/transport/in-memory-server.d.ts.map +1 -0
- package/transport/index.d.ts +47 -0
- package/transport/index.d.ts.map +1 -1
- package/transport/mcp-handlers/complete-request.handler.d.ts +3 -84
- package/transport/mcp-handlers/complete-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/get-prompt-request.handler.d.ts +3 -128
- package/transport/mcp-handlers/get-prompt-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts +463 -490
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-prompts-request.handler.d.ts +3 -70
- package/transport/mcp-handlers/list-prompts-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts +3 -72
- package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resources-request.handler.d.ts +3 -72
- package/transport/mcp-handlers/list-resources-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-tools-request.handler.d.ts +3 -85
- package/transport/mcp-handlers/list-tools-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/read-resource-request.handler.d.ts +3 -61
- package/transport/mcp-handlers/read-resource-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-list-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-list-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-load-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-load-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-mcp.types.d.ts +157 -0
- package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -0
- package/transport/mcp-handlers/skills-search-request.handler.d.ts +9 -0
- package/transport/mcp-handlers/skills-search-request.handler.d.ts.map +1 -0
- package/transport/transport.registry.d.ts +9 -1
- package/transport/transport.registry.d.ts.map +1 -1
- package/transport/transport.types.d.ts +1 -8
- package/transport/transport.types.d.ts.map +1 -1
- package/auth/jwks/dev-key-persistence.d.ts +0 -64
- package/auth/jwks/dev-key-persistence.d.ts.map +0 -1
- package/auth/jwks/index.d.ts +0 -4
- package/auth/jwks/index.d.ts.map +0 -1
- package/auth/jwks/jwks.service.d.ts +0 -58
- package/auth/jwks/jwks.service.d.ts.map +0 -1
- package/auth/jwks/jwks.types.d.ts +0 -33
- package/auth/jwks/jwks.types.d.ts.map +0 -1
- package/auth/jwks/jwks.utils.d.ts +0 -5
- package/auth/jwks/jwks.utils.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.authorize.flow.d.ts +0 -32
- package/auth/oauth/flows/oauth.authorize.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.device-authorization.flow.d.ts +0 -47
- package/auth/oauth/flows/oauth.device-authorization.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.introspect.flow.d.ts +0 -27
- package/auth/oauth/flows/oauth.introspect.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.par.flow.d.ts +0 -28
- package/auth/oauth/flows/oauth.par.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.revoke.flow.d.ts +0 -26
- package/auth/oauth/flows/oauth.revoke.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.token.flow.d.ts +0 -58
- package/auth/oauth/flows/oauth.token.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oauth.userinfo.flow.d.ts +0 -23
- package/auth/oauth/flows/oauth.userinfo.flow.d.ts.map +0 -1
- package/auth/oauth/flows/oidc.logout.flow.d.ts +0 -19
- package/auth/oauth/flows/oidc.logout.flow.d.ts.map +0 -1
- package/auth/session/authorization-vault.d.ts +0 -612
- package/auth/session/authorization-vault.d.ts.map +0 -1
- package/auth/session/authorization.store.d.ts +0 -302
- package/auth/session/authorization.store.d.ts.map +0 -1
- package/auth/session/record/session.stateful.d.ts +0 -21
- package/auth/session/record/session.stateful.d.ts.map +0 -1
- package/auth/session/record/session.stateless.d.ts +0 -18
- package/auth/session/record/session.stateless.d.ts.map +0 -1
- package/auth/session/record/session.transparent.d.ts +0 -18
- package/auth/session/record/session.transparent.d.ts.map +0 -1
- package/auth/session/session.crypto.d.ts +0 -8
- package/auth/session/session.crypto.d.ts.map +0 -1
- package/auth/session/session.schema.d.ts +0 -6
- package/auth/session/session.schema.d.ts.map +0 -1
- package/auth/session/token.store.d.ts +0 -36
- package/auth/session/token.store.d.ts.map +0 -1
- package/auth/session/token.vault.d.ts +0 -27
- package/auth/session/token.vault.d.ts.map +0 -1
- package/auth/session/vault-encryption.d.ts +0 -190
- package/auth/session/vault-encryption.d.ts.map +0 -1
- package/auth/utils/audience.validator.d.ts +0 -130
- package/auth/utils/audience.validator.d.ts.map +0 -1
- package/auth/utils/www-authenticate.utils.d.ts +0 -98
- package/auth/utils/www-authenticate.utils.d.ts.map +0 -1
- package/common/migrate/auth-transport.migrate.d.ts +0 -63
- package/common/migrate/auth-transport.migrate.d.ts.map +0 -1
- package/common/migrate/index.d.ts +0 -2
- package/common/migrate/index.d.ts.map +0 -1
- package/common/types/options/auth/auth.interfaces.d.ts.map +0 -1
- package/common/types/options/auth/auth.schema.d.ts.map +0 -1
- package/common/types/options/auth/auth.typecheck.d.ts +0 -2
- package/common/types/options/auth/auth.typecheck.d.ts.map +0 -1
- package/common/types/options/auth/auth.utils.d.ts.map +0 -1
- package/common/types/options/auth/transport.deprecated.d.ts +0 -64
- package/common/types/options/auth/transport.deprecated.d.ts.map +0 -1
- package/common/types/options/http.options.d.ts +0 -15
- package/common/types/options/http.options.d.ts.map +0 -1
- package/common/types/options/logging.options.d.ts +0 -29
- package/common/types/options/logging.options.d.ts.map +0 -1
- package/common/types/options/redis.options.d.ts.map +0 -1
- package/common/types/options/server-info.options.d.ts.map +0 -1
- package/common/types/options/session.options.d.ts +0 -148
- package/common/types/options/session.options.d.ts.map +0 -1
- package/common/types/options/transport.options.d.ts +0 -178
- package/common/types/options/transport.options.d.ts.map +0 -1
- package/context/request-context-storage.d.ts +0 -90
- package/context/request-context-storage.d.ts.map +0 -1
- package/context/request-context.d.ts +0 -185
- package/context/request-context.d.ts.map +0 -1
- package/context/request-context.provider.d.ts +0 -38
- package/context/request-context.provider.d.ts.map +0 -1
- package/context/session-key.provider.d.ts +0 -46
- package/context/session-key.provider.d.ts.map +0 -1
- package/store/adapters/store.base.adapter.d.ts +0 -22
- package/store/adapters/store.base.adapter.d.ts.map +0 -1
- package/store/adapters/store.memory.adapter.d.ts +0 -27
- package/store/adapters/store.memory.adapter.d.ts.map +0 -1
- package/store/adapters/store.redis.adapter.d.ts +0 -34
- package/store/adapters/store.redis.adapter.d.ts.map +0 -1
- package/store/adapters/store.vercel-kv.adapter.d.ts +0 -87
- package/store/adapters/store.vercel-kv.adapter.d.ts.map +0 -1
- package/store/index.d.ts +0 -11
- package/store/index.d.ts.map +0 -1
- package/store/store.factory.d.ts.map +0 -1
- package/store/store.helpers.d.ts +0 -10
- package/store/store.helpers.d.ts.map +0 -1
- package/store/store.registry.d.ts +0 -14
- package/store/store.registry.d.ts.map +0 -1
- package/store/store.tokens.d.ts +0 -4
- package/store/store.tokens.d.ts.map +0 -1
- package/store/store.types.d.ts +0 -65
- package/store/store.types.d.ts.map +0 -1
- package/store/store.utils.d.ts +0 -9
- package/store/store.utils.d.ts.map +0 -1
- package/transport/transport.event-store.d.ts +0 -11
- package/transport/transport.event-store.d.ts.map +0 -1
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Policy mode for skill tool authorization.
|
|
3
|
+
* Determines how the system handles tool calls not in the skill's allowlist.
|
|
4
|
+
*/
|
|
5
|
+
export type SkillPolicyMode = 'strict' | 'approval' | 'permissive';
|
|
6
|
+
/**
|
|
7
|
+
* Information about a single active skill.
|
|
8
|
+
*/
|
|
9
|
+
export interface ActiveSkillInfo {
|
|
10
|
+
/**
|
|
11
|
+
* Skill identifier.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Human-readable skill name.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Tools allowed by this skill.
|
|
20
|
+
*/
|
|
21
|
+
allowedTools: Set<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Tools required by this skill.
|
|
24
|
+
*/
|
|
25
|
+
requiredTools: Set<string>;
|
|
26
|
+
/**
|
|
27
|
+
* When this skill was activated.
|
|
28
|
+
*/
|
|
29
|
+
activatedAt: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* State of an active skill session.
|
|
33
|
+
* Tracks which skills are active and what tools they allow.
|
|
34
|
+
* Multiple skills can be active simultaneously, expanding the allowed toolset.
|
|
35
|
+
*/
|
|
36
|
+
export interface SkillSessionState {
|
|
37
|
+
/**
|
|
38
|
+
* Unique session identifier (from MCP session).
|
|
39
|
+
*/
|
|
40
|
+
sessionId: string;
|
|
41
|
+
/**
|
|
42
|
+
* ID of the most recently activated skill, or null if no skill is active.
|
|
43
|
+
* When multiple skills are active, this is the most recent one.
|
|
44
|
+
*/
|
|
45
|
+
activeSkillId: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Name of the most recently activated skill, or null if no skill is active.
|
|
48
|
+
* When multiple skills are active, this is the most recent one.
|
|
49
|
+
*/
|
|
50
|
+
activeSkillName: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Map of active skills by ID.
|
|
53
|
+
* Multiple skills can be active at once, expanding the allowed toolset.
|
|
54
|
+
*/
|
|
55
|
+
activeSkills: Map<string, ActiveSkillInfo>;
|
|
56
|
+
/**
|
|
57
|
+
* Set of tool names allowed by all active skills (union).
|
|
58
|
+
* When skills are loaded, this is the combined allowlist from all active skills.
|
|
59
|
+
*/
|
|
60
|
+
allowedTools: Set<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Set of tool names that are required by any active skill.
|
|
63
|
+
* Missing required tools may cause skill execution to fail.
|
|
64
|
+
*/
|
|
65
|
+
requiredTools: Set<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Policy mode for this session.
|
|
68
|
+
* Determines how unapproved tool calls are handled.
|
|
69
|
+
*/
|
|
70
|
+
policyMode: SkillPolicyMode;
|
|
71
|
+
/**
|
|
72
|
+
* Timestamp when the skill was activated.
|
|
73
|
+
*/
|
|
74
|
+
startedAt: number;
|
|
75
|
+
/**
|
|
76
|
+
* Tools that have been dynamically approved during this session.
|
|
77
|
+
* Used when policyMode is 'approval' and user approves additional tools.
|
|
78
|
+
*/
|
|
79
|
+
approvedTools: Set<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Tools that have been explicitly denied during this session.
|
|
82
|
+
*/
|
|
83
|
+
deniedTools: Set<string>;
|
|
84
|
+
/**
|
|
85
|
+
* Count of tool calls made during this skill session.
|
|
86
|
+
*/
|
|
87
|
+
toolCallCount: number;
|
|
88
|
+
/**
|
|
89
|
+
* Optional metadata for tracking/analytics.
|
|
90
|
+
*/
|
|
91
|
+
metadata?: Record<string, unknown>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Options for configuring skill session behavior.
|
|
95
|
+
*/
|
|
96
|
+
export interface SkillSessionOptions {
|
|
97
|
+
/**
|
|
98
|
+
* Default policy mode for new skill sessions.
|
|
99
|
+
* @default 'permissive'
|
|
100
|
+
*/
|
|
101
|
+
defaultPolicyMode?: SkillPolicyMode;
|
|
102
|
+
/**
|
|
103
|
+
* Whether skills must be explicitly activated via loadSkill.
|
|
104
|
+
* If false, tool calls without an active skill are always allowed.
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
requireExplicitActivation?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether to track tool usage statistics.
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
trackToolUsage?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Maximum number of tool calls allowed per skill session.
|
|
115
|
+
* Set to 0 for unlimited.
|
|
116
|
+
* @default 0
|
|
117
|
+
*/
|
|
118
|
+
maxToolCallsPerSession?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Maximum duration in milliseconds for a skill session.
|
|
121
|
+
* Session is automatically deactivated after this time.
|
|
122
|
+
* Set to 0 for unlimited.
|
|
123
|
+
* @default 0
|
|
124
|
+
*/
|
|
125
|
+
maxSessionDuration?: number;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Result of activating a skill session.
|
|
129
|
+
*/
|
|
130
|
+
export interface SkillActivationResult {
|
|
131
|
+
/**
|
|
132
|
+
* The created session state.
|
|
133
|
+
*/
|
|
134
|
+
session: SkillSessionState;
|
|
135
|
+
/**
|
|
136
|
+
* Tools from the skill that are available in the current scope.
|
|
137
|
+
*/
|
|
138
|
+
availableTools: string[];
|
|
139
|
+
/**
|
|
140
|
+
* Tools from the skill that are missing from the current scope.
|
|
141
|
+
*/
|
|
142
|
+
missingTools: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Whether all required tools are available.
|
|
145
|
+
*/
|
|
146
|
+
isComplete: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Warning message if some tools are missing.
|
|
149
|
+
*/
|
|
150
|
+
warning?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Result of checking tool authorization.
|
|
154
|
+
*/
|
|
155
|
+
export interface ToolAuthorizationResult {
|
|
156
|
+
/**
|
|
157
|
+
* Whether the tool call is allowed.
|
|
158
|
+
*/
|
|
159
|
+
allowed: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Reason for the authorization decision.
|
|
162
|
+
*/
|
|
163
|
+
reason: 'skill_allowlist' | 'dynamically_approved' | 'no_active_skill' | 'not_in_allowlist' | 'denied' | 'rate_limited';
|
|
164
|
+
/**
|
|
165
|
+
* Whether human approval should be requested.
|
|
166
|
+
* Only true when policyMode is 'approval' and tool not in allowlist.
|
|
167
|
+
*/
|
|
168
|
+
requiresApproval?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* ID of the primary/most recent active skill, if any.
|
|
171
|
+
* When multiple skills are active, this is the most recently activated one.
|
|
172
|
+
*/
|
|
173
|
+
skillId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Human-readable name of the primary/most recent active skill, if any.
|
|
176
|
+
* When multiple skills are active, this is the most recently activated one.
|
|
177
|
+
*/
|
|
178
|
+
skillName?: string;
|
|
179
|
+
/**
|
|
180
|
+
* IDs of all active skills in the session.
|
|
181
|
+
* When multiple skills are loaded, this contains all of them.
|
|
182
|
+
*/
|
|
183
|
+
activeSkillIds?: string[];
|
|
184
|
+
/**
|
|
185
|
+
* Names of all active skills in the session.
|
|
186
|
+
* When multiple skills are loaded, this contains all of them.
|
|
187
|
+
*/
|
|
188
|
+
activeSkillNames?: string[];
|
|
189
|
+
/**
|
|
190
|
+
* Name of the tool being checked.
|
|
191
|
+
*/
|
|
192
|
+
toolName: string;
|
|
193
|
+
/**
|
|
194
|
+
* Additional context for the authorization decision.
|
|
195
|
+
*/
|
|
196
|
+
context?: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Event emitted when a skill session changes.
|
|
200
|
+
*/
|
|
201
|
+
export interface SkillSessionEvent {
|
|
202
|
+
/**
|
|
203
|
+
* Type of session event.
|
|
204
|
+
*/
|
|
205
|
+
type: 'activated' | 'deactivated' | 'tool_approved' | 'tool_denied' | 'tool_called';
|
|
206
|
+
/**
|
|
207
|
+
* Session ID.
|
|
208
|
+
*/
|
|
209
|
+
sessionId: string;
|
|
210
|
+
/**
|
|
211
|
+
* Skill ID, if applicable.
|
|
212
|
+
*/
|
|
213
|
+
skillId?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Tool name, if applicable.
|
|
216
|
+
*/
|
|
217
|
+
toolName?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Timestamp of the event.
|
|
220
|
+
*/
|
|
221
|
+
timestamp: number;
|
|
222
|
+
/**
|
|
223
|
+
* Additional event data.
|
|
224
|
+
*/
|
|
225
|
+
data?: Record<string, unknown>;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Security policy for a specific skill.
|
|
229
|
+
* Can be defined in skill metadata to override session defaults.
|
|
230
|
+
*/
|
|
231
|
+
export interface SkillSecurityPolicy {
|
|
232
|
+
/**
|
|
233
|
+
* Policy mode for this skill.
|
|
234
|
+
* Overrides session default.
|
|
235
|
+
*/
|
|
236
|
+
policyMode?: SkillPolicyMode;
|
|
237
|
+
/**
|
|
238
|
+
* If true, only explicitly listed tools are allowed.
|
|
239
|
+
* No dynamic approval possible.
|
|
240
|
+
* @default false
|
|
241
|
+
*/
|
|
242
|
+
strictAllowlist?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Whether tools can be dynamically approved at runtime.
|
|
245
|
+
* @default true
|
|
246
|
+
*/
|
|
247
|
+
allowDynamicApproval?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Audit level for this skill.
|
|
250
|
+
* @default 'basic'
|
|
251
|
+
*/
|
|
252
|
+
auditLevel?: 'none' | 'basic' | 'verbose';
|
|
253
|
+
/**
|
|
254
|
+
* Maximum tool calls for this skill.
|
|
255
|
+
* Overrides session default.
|
|
256
|
+
*/
|
|
257
|
+
maxToolCalls?: number;
|
|
258
|
+
/**
|
|
259
|
+
* Maximum session duration for this skill in milliseconds.
|
|
260
|
+
* Overrides session default.
|
|
261
|
+
*/
|
|
262
|
+
maxDuration?: number;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Serialized version of ActiveSkillInfo for storage.
|
|
266
|
+
*/
|
|
267
|
+
export interface SerializedActiveSkillInfo {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
allowedTools: string[];
|
|
271
|
+
requiredTools: string[];
|
|
272
|
+
activatedAt: number;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Serializable version of SkillSessionState for storage.
|
|
276
|
+
*/
|
|
277
|
+
export interface SerializedSkillSessionState {
|
|
278
|
+
sessionId: string;
|
|
279
|
+
activeSkillId: string | null;
|
|
280
|
+
activeSkillName: string | null;
|
|
281
|
+
activeSkills: SerializedActiveSkillInfo[];
|
|
282
|
+
allowedTools: string[];
|
|
283
|
+
requiredTools: string[];
|
|
284
|
+
policyMode: SkillPolicyMode;
|
|
285
|
+
startedAt: number;
|
|
286
|
+
approvedTools: string[];
|
|
287
|
+
deniedTools: string[];
|
|
288
|
+
toolCallCount: number;
|
|
289
|
+
metadata?: Record<string, unknown>;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Convert SkillSessionState to serializable format.
|
|
293
|
+
*/
|
|
294
|
+
export declare function serializeSessionState(state: SkillSessionState): SerializedSkillSessionState;
|
|
295
|
+
/**
|
|
296
|
+
* Convert serialized format back to SkillSessionState.
|
|
297
|
+
*/
|
|
298
|
+
export declare function deserializeSessionState(data: SerializedSkillSessionState): SkillSessionState;
|
|
299
|
+
/**
|
|
300
|
+
* Create a new empty skill session state.
|
|
301
|
+
*/
|
|
302
|
+
export declare function createEmptySessionState(sessionId: string, options?: SkillSessionOptions): SkillSessionState;
|
|
303
|
+
//# sourceMappingURL=skill-session.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-session.types.d.ts","sourceRoot":"","sources":["../../../src/skill/session/skill-session.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for formatting skills for HTTP endpoints.
|
|
3
|
+
*
|
|
4
|
+
* These utilities provide formatted output for:
|
|
5
|
+
* - /llm.txt - Compact skill summaries
|
|
6
|
+
* - /llm_full.txt - Full skills with instructions and tool schemas
|
|
7
|
+
* - /skills API - JSON responses
|
|
8
|
+
*/
|
|
9
|
+
import type { SkillContent, SkillEntry, ToolRegistryInterface } from '../common';
|
|
10
|
+
import type { SkillVisibility } from '../common/metadata/skill.metadata';
|
|
11
|
+
import type { SkillRegistryInterface as SkillRegistryInterfaceType } from './skill.registry';
|
|
12
|
+
/**
|
|
13
|
+
* Compact skill summary for /llm.txt endpoint.
|
|
14
|
+
*/
|
|
15
|
+
export interface CompactSkillSummary {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
tools?: string[];
|
|
19
|
+
tags?: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format skills for compact /llm.txt output.
|
|
23
|
+
* Returns a plain text format suitable for LLM consumption.
|
|
24
|
+
*
|
|
25
|
+
* @param skills - Array of skill entries to format
|
|
26
|
+
* @returns Formatted plain text string
|
|
27
|
+
*
|
|
28
|
+
* @example Output format
|
|
29
|
+
* ```
|
|
30
|
+
* # review-pr
|
|
31
|
+
* Review a GitHub pull request
|
|
32
|
+
* Tools: github_get_pr, github_add_comment
|
|
33
|
+
* Tags: github, code-review
|
|
34
|
+
*
|
|
35
|
+
* ---
|
|
36
|
+
*
|
|
37
|
+
* # deploy-app
|
|
38
|
+
* Deploy application to production
|
|
39
|
+
* Tools: docker_build, k8s_apply
|
|
40
|
+
* Tags: deployment, kubernetes
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatSkillsForLlmCompact(skills: SkillEntry[]): string;
|
|
44
|
+
/**
|
|
45
|
+
* Format skills with full instructions AND tool schemas for /llm_full.txt.
|
|
46
|
+
* Loads full skill content and includes complete tool schemas.
|
|
47
|
+
*
|
|
48
|
+
* @param registry - Skill registry to load skills from
|
|
49
|
+
* @param toolRegistry - Tool registry to get tool schemas
|
|
50
|
+
* @param visibility - Optional visibility filter ('http' or 'both')
|
|
51
|
+
* @returns Formatted plain text with full skill details
|
|
52
|
+
*/
|
|
53
|
+
export declare function formatSkillsForLlmFull(registry: SkillRegistryInterfaceType, toolRegistry: ToolRegistryInterface, visibility?: SkillVisibility): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Format a skill with FULL tool schemas (input/output) - not just names.
|
|
56
|
+
* Used by /llm_full.txt and enhanced loadSkill response.
|
|
57
|
+
*
|
|
58
|
+
* @param skill - The loaded skill content
|
|
59
|
+
* @param availableTools - List of available tool names
|
|
60
|
+
* @param missingTools - List of missing tool names
|
|
61
|
+
* @param toolRegistry - Tool registry for schema lookup
|
|
62
|
+
* @returns Formatted markdown string
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatSkillForLLMWithSchemas(skill: SkillContent, availableTools: string[], missingTools: string[], toolRegistry: ToolRegistryInterface): string;
|
|
65
|
+
/**
|
|
66
|
+
* Skill API response structure.
|
|
67
|
+
*/
|
|
68
|
+
export interface SkillApiResponse {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
tags: string[];
|
|
73
|
+
tools: string[];
|
|
74
|
+
parameters?: Array<{
|
|
75
|
+
name: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
required: boolean;
|
|
78
|
+
type: string;
|
|
79
|
+
}>;
|
|
80
|
+
priority: number;
|
|
81
|
+
visibility: SkillVisibility;
|
|
82
|
+
availableTools?: string[];
|
|
83
|
+
missingTools?: string[];
|
|
84
|
+
isComplete?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Convert a skill entry to a JSON-serializable summary.
|
|
88
|
+
* Used by the /skills API endpoint.
|
|
89
|
+
*
|
|
90
|
+
* @param skill - The skill entry
|
|
91
|
+
* @param loadResult - Optional load result with tool availability info
|
|
92
|
+
* @returns JSON-serializable object
|
|
93
|
+
*/
|
|
94
|
+
export declare function skillToApiResponse(skill: SkillEntry, loadResult?: {
|
|
95
|
+
availableTools: string[];
|
|
96
|
+
missingTools: string[];
|
|
97
|
+
isComplete: boolean;
|
|
98
|
+
}): SkillApiResponse;
|
|
99
|
+
/**
|
|
100
|
+
* Filter skills by visibility for a given context.
|
|
101
|
+
*
|
|
102
|
+
* @param skills - Array of skill entries
|
|
103
|
+
* @param context - The context requesting skills ('mcp' or 'http')
|
|
104
|
+
* @returns Filtered array of skills visible in the given context
|
|
105
|
+
*/
|
|
106
|
+
export declare function filterSkillsByVisibility(skills: SkillEntry[], context: 'mcp' | 'http'): SkillEntry[];
|
|
107
|
+
//# sourceMappingURL=skill-http.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-http.utils.d.ts","sourceRoot":"","sources":["../../src/skill/skill-http.utils.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAa,MAAM,WAAW,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,IAAI,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE7F;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CA4BtE;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,0BAA0B,EACpC,YAAY,EAAE,qBAAqB,EACnC,UAAU,GAAE,eAAwB,GACnC,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,YAAY,EACnB,cAAc,EAAE,MAAM,EAAE,EACxB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,qBAAqB,GAClC,MAAM,CA6FR;AAaD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,eAAe,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,UAAU,CAAC,EAAE;IACX,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,GACA,gBAAgB,CAwBlB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,EAAE,CAMpG"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for skills-only mode detection.
|
|
3
|
+
*
|
|
4
|
+
* Skills-only mode is a special operational mode where:
|
|
5
|
+
* - The tools list returns empty (no tools exposed)
|
|
6
|
+
* - Only skill discovery tools are available
|
|
7
|
+
* - Used for planner agents that need skills but not execution tools
|
|
8
|
+
*
|
|
9
|
+
* @module skill/skill-mode.utils
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Session payload interface for skills-only mode detection.
|
|
13
|
+
*/
|
|
14
|
+
export interface SkillsOnlySessionPayload {
|
|
15
|
+
skillsOnlyMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Detect if skills-only mode is requested from query parameters.
|
|
19
|
+
*
|
|
20
|
+
* Skills-only mode returns empty tools list, exposing only skill discovery.
|
|
21
|
+
* Clients can request this mode by adding `?mode=skills_only` to the connection URL.
|
|
22
|
+
*
|
|
23
|
+
* @param query - Query parameters from the request (may be undefined)
|
|
24
|
+
* @returns true if skills_only mode is requested
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* // In transport flow
|
|
29
|
+
* const query = request.query as Record<string, string | string[]> | undefined;
|
|
30
|
+
* const skillsOnlyMode = detectSkillsOnlyMode(query);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectSkillsOnlyMode(query: Record<string, string | string[] | undefined> | undefined): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Check if the current session is in skills-only mode.
|
|
36
|
+
*
|
|
37
|
+
* This checks the session payload for the skillsOnlyMode flag that was
|
|
38
|
+
* set during session creation based on the initial query parameters.
|
|
39
|
+
*
|
|
40
|
+
* @param sessionPayload - Session payload from authorization (may be undefined)
|
|
41
|
+
* @returns true if the session is in skills-only mode
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // In tools/list flow
|
|
46
|
+
* const isSkillsOnly = isSkillsOnlySession(authorization.session?.payload);
|
|
47
|
+
* if (isSkillsOnly) {
|
|
48
|
+
* return { tools: [] }; // Return empty tools list
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function isSkillsOnlySession(sessionPayload: SkillsOnlySessionPayload | undefined): boolean;
|
|
53
|
+
//# sourceMappingURL=skill-mode.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-mode.utils.d.ts","sourceRoot":"","sources":["../../src/skill/skill-mode.utils.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,GAAG,OAAO,CAgB9G;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,wBAAwB,GAAG,SAAS,GAAG,OAAO,CAEjG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper for registering skill capabilities in scope.
|
|
3
|
+
*
|
|
4
|
+
* This module extracts skill-specific registration logic from scope.instance.ts
|
|
5
|
+
* to maintain separation of concerns and improve maintainability.
|
|
6
|
+
*
|
|
7
|
+
* @module skill/skill-scope.helper
|
|
8
|
+
*/
|
|
9
|
+
import type { FrontMcpLogger } from '../common';
|
|
10
|
+
import type { SkillsConfigOptions } from '../common/types/options/skills-http';
|
|
11
|
+
import type FlowRegistry from '../flows/flow.registry';
|
|
12
|
+
import type ToolRegistry from '../tool/tool.registry';
|
|
13
|
+
import type ProviderRegistry from '../provider/provider.registry';
|
|
14
|
+
import type SkillRegistry from './skill.registry';
|
|
15
|
+
/**
|
|
16
|
+
* Options for registering skill capabilities.
|
|
17
|
+
*/
|
|
18
|
+
export interface SkillScopeRegistrationOptions {
|
|
19
|
+
/** Skill registry containing registered skills */
|
|
20
|
+
skillRegistry: SkillRegistry;
|
|
21
|
+
/** Flow registry for registering skill flows */
|
|
22
|
+
flowRegistry: FlowRegistry;
|
|
23
|
+
/** Tool registry for registering skill tools */
|
|
24
|
+
toolRegistry: ToolRegistry;
|
|
25
|
+
/** Provider registry for dependency injection */
|
|
26
|
+
providers: ProviderRegistry;
|
|
27
|
+
/** Skills configuration from @FrontMcp metadata */
|
|
28
|
+
skillsConfig?: SkillsConfigOptions;
|
|
29
|
+
/** Logger instance for logging */
|
|
30
|
+
logger: FrontMcpLogger;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Register skill-related flows and tools in the scope.
|
|
34
|
+
*
|
|
35
|
+
* This function handles:
|
|
36
|
+
* - Registering MCP flows for skill discovery/loading (SearchSkillsFlow, LoadSkillFlow)
|
|
37
|
+
* - Registering skill MCP tools (searchSkills, loadSkill) unless disabled
|
|
38
|
+
* - Registering HTTP flows (llm.txt, llm_full.txt, /skills) when skillsConfig is enabled
|
|
39
|
+
*
|
|
40
|
+
* @param options - Registration options
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* await registerSkillCapabilities({
|
|
45
|
+
* skillRegistry: this.scopeSkills,
|
|
46
|
+
* flowRegistry: this.scopeFlows,
|
|
47
|
+
* toolRegistry: this.scopeTools,
|
|
48
|
+
* providers: this.scopeProviders,
|
|
49
|
+
* skillsConfig: this.metadata.skillsConfig,
|
|
50
|
+
* logger: this.logger,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function registerSkillCapabilities(options: SkillScopeRegistrationOptions): Promise<void>;
|
|
55
|
+
//# sourceMappingURL=skill-scope.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-scope.helper.d.ts","sourceRoot":"","sources":["../../src/skill/skill-scope.helper.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,WAAW,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,gBAAgB,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,gDAAgD;IAChD,YAAY,EAAE,YAAY,CAAC;IAC3B,gDAAgD;IAChD,YAAY,EAAE,YAAY,CAAC;IAC3B,iDAAiD;IACjD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,mDAAmD;IACnD,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,kCAAkC;IAClC,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBrG"}
|