@frontmcp/sdk 1.0.4 → 1.1.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/agent.instance.d.ts +5 -7
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +4 -4
- package/agent/flows/call-agent.flow.d.ts +211 -205
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/agent/hooks/agent.hooks.d.ts +4 -4
- package/agent/hooks/agent.hooks.d.ts.map +1 -1
- package/agent/index.d.ts +1 -1
- package/auth/flows/auth.verify.flow.d.ts +48 -44
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +119 -137
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +64 -64
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +52 -52
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts +35 -48
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +53 -80
- package/auth/flows/oauth.token.flow.d.ts.map +1 -1
- package/auth/flows/session.verify.flow.d.ts +86 -83
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +61 -61
- package/auth/flows/well-known.jwks.flow.d.ts.map +1 -1
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +66 -66
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts +35 -36
- package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
- package/auth/session/transport-session.manager.d.ts +1 -1
- package/auth/session/transport-session.manager.d.ts.map +1 -1
- package/auth/session/utils/session-id.utils.d.ts +2 -2
- package/auth/session/utils/session-id.utils.d.ts.map +1 -1
- package/builtin/authorities/authorities.plugin.d.ts +25 -0
- package/builtin/authorities/authorities.plugin.d.ts.map +1 -0
- package/builtin/authorities/authorities.plugin.options.d.ts +45 -0
- package/builtin/authorities/authorities.plugin.options.d.ts.map +1 -0
- package/builtin/authorities/index.d.ts +3 -0
- package/builtin/authorities/index.d.ts.map +1 -0
- package/builtin/config/config.plugin.d.ts +2 -2
- package/builtin/config/config.plugin.d.ts.map +1 -1
- package/builtin/config/config.types.d.ts +1 -1
- package/builtin/config/config.types.d.ts.map +1 -1
- package/builtin/config/index.d.ts +2 -2
- package/builtin/config/index.d.ts.map +1 -1
- package/builtin/config/providers/config-loader.d.ts +1 -1
- package/builtin/config/providers/config-loader.d.ts.map +1 -1
- package/builtin/config/providers/config.service.d.ts +2 -2
- package/builtin/config/providers/config.service.d.ts.map +1 -1
- package/builtin/config/providers/env-loader.d.ts +1 -1
- package/builtin/config/providers/env-loader.d.ts.map +1 -1
- package/channel/channel-notification.service.d.ts +52 -0
- package/channel/channel-notification.service.d.ts.map +1 -0
- package/channel/channel-scope.helper.d.ts +37 -0
- package/channel/channel-scope.helper.d.ts.map +1 -0
- package/channel/channel.events.d.ts +25 -0
- package/channel/channel.events.d.ts.map +1 -0
- package/channel/channel.instance.d.ts +105 -0
- package/channel/channel.instance.d.ts.map +1 -0
- package/channel/channel.registry.d.ts +65 -0
- package/channel/channel.registry.d.ts.map +1 -0
- package/channel/channel.types.d.ts +14 -0
- package/channel/channel.types.d.ts.map +1 -0
- package/channel/channel.utils.d.ts +19 -0
- package/channel/channel.utils.d.ts.map +1 -0
- package/channel/flows/list-channels.flow.d.ts +41 -0
- package/channel/flows/list-channels.flow.d.ts.map +1 -0
- package/channel/flows/send-channel-notification.flow.d.ts +38 -0
- package/channel/flows/send-channel-notification.flow.d.ts.map +1 -0
- package/channel/index.d.ts +14 -0
- package/channel/index.d.ts.map +1 -0
- package/channel/reply/channel-reply.tool.d.ts +15 -0
- package/channel/reply/channel-reply.tool.d.ts.map +1 -0
- package/channel/reply/reply.types.d.ts +14 -0
- package/channel/reply/reply.types.d.ts.map +1 -0
- package/channel/sources/agent-completion.source.d.ts +29 -0
- package/channel/sources/agent-completion.source.d.ts.map +1 -0
- package/channel/sources/app-event.source.d.ts +57 -0
- package/channel/sources/app-event.source.d.ts.map +1 -0
- package/channel/sources/index.d.ts +5 -0
- package/channel/sources/index.d.ts.map +1 -0
- package/channel/sources/job-completion.source.d.ts +28 -0
- package/channel/sources/job-completion.source.d.ts.map +1 -0
- package/channel/sources/webhook.source.d.ts +42 -0
- package/channel/sources/webhook.source.d.ts.map +1 -0
- package/common/common.schema.d.ts +11 -11
- package/common/common.schema.d.ts.map +1 -1
- package/common/decorators/agent.decorator.d.ts +4 -4
- package/common/decorators/agent.decorator.d.ts.map +1 -1
- package/common/decorators/channel.decorator.d.ts +59 -0
- package/common/decorators/channel.decorator.d.ts.map +1 -0
- package/common/decorators/front-mcp.decorator.d.ts +1 -1
- package/common/decorators/front-mcp.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/job.decorator.d.ts +13 -9
- package/common/decorators/job.decorator.d.ts.map +1 -1
- package/common/decorators/tool.decorator.d.ts +12 -7
- package/common/decorators/tool.decorator.d.ts.map +1 -1
- package/common/entries/agent.entry.d.ts +6 -6
- package/common/entries/agent.entry.d.ts.map +1 -1
- package/common/entries/channel.entry.d.ts +58 -0
- package/common/entries/channel.entry.d.ts.map +1 -0
- package/common/entries/index.d.ts +1 -0
- package/common/entries/index.d.ts.map +1 -1
- package/common/entries/job.entry.d.ts +7 -7
- package/common/entries/job.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +32 -14
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/tool.entry.d.ts +12 -8
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/flow/flow.utils.d.ts +1 -1
- package/common/flow/flow.utils.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +8 -8
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/channel.interface.d.ts +131 -0
- package/common/interfaces/channel.interface.d.ts.map +1 -0
- package/common/interfaces/execution-context.interface.d.ts +27 -8
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/flow.interface.d.ts +6 -6
- package/common/interfaces/flow.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/flow.utils.d.ts +2 -2
- package/common/interfaces/internal/flow.utils.d.ts.map +1 -1
- package/common/interfaces/internal/registry.interface.d.ts +3 -1
- package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
- package/common/interfaces/resource.interface.d.ts +7 -0
- package/common/interfaces/resource.interface.d.ts.map +1 -1
- package/common/interfaces/server.interface.d.ts +5 -3
- package/common/interfaces/server.interface.d.ts.map +1 -1
- package/common/interfaces/tool.interface.d.ts +18 -6
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/metadata/adapter.metadata.d.ts +5 -6
- package/common/metadata/adapter.metadata.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +94 -95
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app-filter.metadata.d.ts +21 -22
- package/common/metadata/app-filter.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +554 -547
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/auth-provider.metadata.d.ts +6 -7
- package/common/metadata/auth-provider.metadata.d.ts.map +1 -1
- package/common/metadata/channel.metadata.d.ts +286 -0
- package/common/metadata/channel.metadata.d.ts.map +1 -0
- package/common/metadata/flow.metadata.d.ts +14 -14
- package/common/metadata/flow.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +3591 -2715
- 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/job.metadata.d.ts +26 -27
- package/common/metadata/job.metadata.d.ts.map +1 -1
- package/common/metadata/logger.metadata.d.ts +5 -6
- package/common/metadata/logger.metadata.d.ts.map +1 -1
- package/common/metadata/plugin.metadata.d.ts +21 -22
- package/common/metadata/plugin.metadata.d.ts.map +1 -1
- package/common/metadata/prompt.metadata.d.ts +24 -25
- package/common/metadata/prompt.metadata.d.ts.map +1 -1
- package/common/metadata/provider.metadata.d.ts +6 -7
- package/common/metadata/provider.metadata.d.ts.map +1 -1
- package/common/metadata/resource.metadata.d.ts +40 -41
- package/common/metadata/resource.metadata.d.ts.map +1 -1
- package/common/metadata/skill.metadata.d.ts +57 -57
- package/common/metadata/skill.metadata.d.ts.map +1 -1
- package/common/metadata/tool.metadata.d.ts +145 -120
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/metadata/workflow.metadata.d.ts +43 -44
- package/common/metadata/workflow.metadata.d.ts.map +1 -1
- package/common/records/channel.record.d.ts +52 -0
- package/common/records/channel.record.d.ts.map +1 -0
- package/common/records/index.d.ts +1 -0
- package/common/records/index.d.ts.map +1 -1
- package/common/schemas/annotated-class.schema.d.ts +15 -15
- package/common/schemas/annotated-class.schema.d.ts.map +1 -1
- package/common/schemas/http-input.schema.d.ts +8 -9
- package/common/schemas/http-input.schema.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +500 -496
- package/common/schemas/http-output.schema.d.ts.map +1 -1
- package/common/schemas/session-header.schema.d.ts +1 -2
- package/common/schemas/session-header.schema.d.ts.map +1 -1
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/channel.tokens.d.ts +14 -0
- package/common/tokens/channel.tokens.d.ts.map +1 -0
- package/common/tokens/front-mcp.tokens.d.ts +2 -2
- 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/tool.tokens.d.ts +1 -0
- package/common/tokens/tool.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +49 -50
- package/common/types/auth/session.types.d.ts.map +1 -1
- package/common/types/common.types.d.ts +1 -1
- package/common/types/common.types.d.ts.map +1 -1
- package/common/types/options/elicitation/schema.d.ts +28 -28
- package/common/types/options/elicitation/schema.d.ts.map +1 -1
- package/common/types/options/ext-apps/schema.d.ts +20 -20
- package/common/types/options/ext-apps/schema.d.ts.map +1 -1
- package/common/types/options/ext-apps/typecheck.d.ts.map +1 -1
- package/common/types/options/health/schema.d.ts +16 -16
- package/common/types/options/health/schema.d.ts.map +1 -1
- package/common/types/options/http/index.d.ts +1 -1
- package/common/types/options/http/index.d.ts.map +1 -1
- package/common/types/options/http/interfaces.d.ts +41 -1
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/types/options/http/schema.d.ts +21 -12
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/http/typecheck.d.ts.map +1 -1
- package/common/types/options/logging/schema.d.ts +8 -8
- package/common/types/options/logging/schema.d.ts.map +1 -1
- package/common/types/options/observability/schema.d.ts +6 -6
- package/common/types/options/observability/schema.d.ts.map +1 -1
- package/common/types/options/pagination/schema.d.ts +13 -13
- package/common/types/options/pagination/schema.d.ts.map +1 -1
- package/common/types/options/redis/schema.d.ts +62 -62
- package/common/types/options/redis/schema.d.ts.map +1 -1
- package/common/types/options/redis/typecheck.d.ts.map +1 -1
- package/common/types/options/server-info/schema.d.ts +13 -13
- package/common/types/options/server-info/schema.d.ts.map +1 -1
- package/common/types/options/session/schema.d.ts +22 -22
- package/common/types/options/session/schema.d.ts.map +1 -1
- package/common/types/options/skills-http/schema.d.ts +63 -63
- package/common/types/options/skills-http/schema.d.ts.map +1 -1
- package/common/types/options/skills-http/typecheck.d.ts.map +1 -1
- package/common/types/options/sqlite/schema.d.ts +9 -9
- package/common/types/options/sqlite/schema.d.ts.map +1 -1
- package/common/types/options/sqlite/typecheck.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts +140 -140
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/common/types/options/transport/typecheck.d.ts.map +1 -1
- package/common/utils/decide-request-intent.utils.d.ts +16 -17
- package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
- package/common/utils/path.utils.d.ts +10 -1
- package/common/utils/path.utils.d.ts.map +1 -1
- package/completion/flows/complete.flow.d.ts +68 -69
- package/completion/flows/complete.flow.d.ts.map +1 -1
- package/context/frontmcp-context.d.ts +9 -7
- package/context/frontmcp-context.d.ts.map +1 -1
- package/direct/create.d.ts +1 -1
- package/direct/create.d.ts.map +1 -1
- package/elicitation/elicitation.types.d.ts +2 -2
- package/elicitation/elicitation.types.d.ts.map +1 -1
- package/elicitation/flows/elicitation-request.flow.d.ts +40 -40
- package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -1
- package/elicitation/flows/elicitation-result.flow.d.ts +23 -23
- package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -1
- package/elicitation/helpers/elicit.helper.d.ts +4 -4
- package/elicitation/helpers/elicit.helper.d.ts.map +1 -1
- package/elicitation/helpers/extend-output-schema.d.ts.map +1 -1
- package/elicitation/send-elicitation-result.tool.d.ts.map +1 -1
- package/errors/authorization-required.error.d.ts +44 -44
- package/errors/authorization-required.error.d.ts.map +1 -1
- package/errors/index.d.ts +3 -2
- package/errors/index.d.ts.map +1 -1
- package/errors/sdk.errors.d.ts +6 -0
- package/errors/sdk.errors.d.ts.map +1 -1
- package/errors/task.error.d.ts +55 -0
- package/errors/task.error.d.ts.map +1 -0
- package/errors/transport.errors.d.ts +6 -0
- package/errors/transport.errors.d.ts.map +1 -1
- package/esm/index.mjs +42394 -36842
- package/esm-loader/esm-auth.types.d.ts +5 -6
- package/esm-loader/esm-auth.types.d.ts.map +1 -1
- package/esm-loader/esm-manifest.d.ts +13 -14
- package/esm-loader/esm-manifest.d.ts.map +1 -1
- package/esm-loader/factories/esm-record-builders.d.ts +2 -2
- package/esm-loader/factories/esm-record-builders.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +3 -3
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts +328 -28
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/ha/ha-manager.d.ts +119 -0
- package/ha/ha-manager.d.ts.map +1 -0
- package/ha/ha.constants.d.ts +11 -0
- package/ha/ha.constants.d.ts.map +1 -0
- package/ha/ha.types.d.ts +42 -0
- package/ha/ha.types.d.ts.map +1 -0
- package/ha/heartbeat.service.d.ts +44 -0
- package/ha/heartbeat.service.d.ts.map +1 -0
- package/ha/index.d.ts +8 -0
- package/ha/index.d.ts.map +1 -0
- package/ha/notification-relay.d.ts +60 -0
- package/ha/notification-relay.d.ts.map +1 -0
- package/ha/session-takeover.d.ts +28 -0
- package/ha/session-takeover.d.ts.map +1 -0
- package/health/health.service.d.ts +5 -0
- package/health/health.service.d.ts.map +1 -1
- package/index.d.ts +45 -28
- package/index.d.ts.map +1 -1
- package/index.js +43391 -37819
- package/job/job.instance.d.ts +6 -8
- package/job/job.instance.d.ts.map +1 -1
- package/job/tools/execute-job.tool.d.ts.map +1 -1
- package/job/tools/get-job-status.tool.d.ts.map +1 -1
- package/job/tools/list-jobs.tool.d.ts.map +1 -1
- package/job/tools/register-job.tool.d.ts.map +1 -1
- package/job/tools/remove-job.tool.d.ts.map +1 -1
- package/logging/flows/set-level.flow.d.ts +38 -39
- package/logging/flows/set-level.flow.d.ts.map +1 -1
- package/notification/index.d.ts +1 -1
- package/notification/index.d.ts.map +1 -1
- package/notification/notification.service.d.ts +68 -4
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +18 -14
- package/prompt/flows/get-prompt.flow.d.ts +194 -189
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/prompt/flows/prompts-list.flow.d.ts +60 -56
- package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +91 -86
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/flows/resource-templates-list.flow.d.ts +62 -58
- package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
- package/resource/flows/resources-list.flow.d.ts +62 -58
- package/resource/flows/resources-list.flow.d.ts.map +1 -1
- package/resource/flows/subscribe-resource.flow.d.ts +38 -39
- package/resource/flows/subscribe-resource.flow.d.ts.map +1 -1
- package/resource/flows/unsubscribe-resource.flow.d.ts +38 -39
- package/resource/flows/unsubscribe-resource.flow.d.ts.map +1 -1
- package/resource/resource.events.d.ts +2 -0
- package/resource/resource.events.d.ts.map +1 -1
- package/resource/resource.registry.d.ts +7 -0
- package/resource/resource.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +58 -56
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +81 -15
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/adapters/base.host.adapter.d.ts +4 -1
- package/server/adapters/base.host.adapter.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts +8 -2
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/middleware/csp.middleware.d.ts +64 -0
- package/server/middleware/csp.middleware.d.ts.map +1 -0
- package/server/middleware/host-validation.middleware.d.ts +25 -0
- package/server/middleware/host-validation.middleware.d.ts.map +1 -0
- package/server/security/security-audit.d.ts +66 -0
- package/server/security/security-audit.d.ts.map +1 -0
- package/server/server.instance.d.ts +4 -4
- package/server/server.instance.d.ts.map +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts +27 -32
- package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +27 -32
- package/skill/flows/http/llm-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +33 -38
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts +100 -100
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/flows/search-skills.flow.d.ts +56 -57
- package/skill/flows/search-skills.flow.d.ts.map +1 -1
- package/task/flows/tasks-cancel.flow.d.ts +72 -0
- package/task/flows/tasks-cancel.flow.d.ts.map +1 -0
- package/task/flows/tasks-get.flow.d.ts +69 -0
- package/task/flows/tasks-get.flow.d.ts.map +1 -0
- package/task/flows/tasks-list.flow.d.ts +73 -0
- package/task/flows/tasks-list.flow.d.ts.map +1 -0
- package/task/flows/tasks-result.flow.d.ts +93 -0
- package/task/flows/tasks-result.flow.d.ts.map +1 -0
- package/task/helpers/cli-task-runner.d.ts +46 -0
- package/task/helpers/cli-task-runner.d.ts.map +1 -0
- package/task/helpers/in-process-task-runner.d.ts +28 -0
- package/task/helpers/in-process-task-runner.d.ts.map +1 -0
- package/task/helpers/process-liveness.d.ts +16 -0
- package/task/helpers/process-liveness.d.ts.map +1 -0
- package/task/helpers/task-id.d.ts +10 -0
- package/task/helpers/task-id.d.ts.map +1 -0
- package/task/helpers/task-notifier.d.ts +20 -0
- package/task/helpers/task-notifier.d.ts.map +1 -0
- package/task/helpers/task-runner.d.ts +47 -0
- package/task/helpers/task-runner.d.ts.map +1 -0
- package/task/helpers/task-runner.types.d.ts +32 -0
- package/task/helpers/task-runner.types.d.ts.map +1 -0
- package/task/index.d.ts +24 -0
- package/task/index.d.ts.map +1 -0
- package/task/runtime/execute-task-flag.d.ts +11 -0
- package/task/runtime/execute-task-flag.d.ts.map +1 -0
- package/task/runtime/execute-task.d.ts +21 -0
- package/task/runtime/execute-task.d.ts.map +1 -0
- package/task/store/index.d.ts +4 -0
- package/task/store/index.d.ts.map +1 -0
- package/task/store/storage-task.store.d.ts +42 -0
- package/task/store/storage-task.store.d.ts.map +1 -0
- package/task/store/task-store.factory.d.ts +58 -0
- package/task/store/task-store.factory.d.ts.map +1 -0
- package/task/store/task.store.d.ts +76 -0
- package/task/store/task.store.d.ts.map +1 -0
- package/task/task-scope.helper.d.ts +18 -0
- package/task/task-scope.helper.d.ts.map +1 -0
- package/task/task.registry.d.ts +68 -0
- package/task/task.registry.d.ts.map +1 -0
- package/task/task.types.d.ts +201 -0
- package/task/task.types.d.ts.map +1 -0
- package/tool/flows/call-tool.flow.d.ts +216 -197
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts +82 -76
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts +4 -6
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.utils.d.ts +2 -2
- package/tool/tool.utils.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts +10 -11
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.sse.adapter.d.ts +5 -5
- package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +7 -7
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/bus/index.d.ts +3 -0
- package/transport/bus/index.d.ts.map +1 -0
- package/transport/bus/redis-transport-bus.d.ts +90 -0
- package/transport/bus/redis-transport-bus.d.ts.map +1 -0
- package/transport/flows/handle.sse.flow.d.ts +17 -18
- package/transport/flows/handle.sse.flow.d.ts.map +1 -1
- package/transport/flows/handle.stateless-http.flow.d.ts +6 -7
- package/transport/flows/handle.stateless-http.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +19 -19
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts +2 -3
- package/transport/in-memory-server.d.ts.map +1 -1
- package/transport/mcp-handlers/call-tool-request.handler.d.ts +2 -2
- package/transport/mcp-handlers/call-tool-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts +719 -565
- 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/mcp-error.utils.d.ts +15 -0
- package/transport/mcp-handlers/mcp-error.utils.d.ts.map +1 -0
- package/transport/mcp-handlers/mcp-handlers.types.d.ts +3 -3
- package/transport/mcp-handlers/mcp-handlers.types.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-mcp.types.d.ts +97 -97
- package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -1
- package/transport/mcp-handlers/tasks-cancel-request.handler.d.ts +4 -0
- package/transport/mcp-handlers/tasks-cancel-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/tasks-get-request.handler.d.ts +4 -0
- package/transport/mcp-handlers/tasks-get-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/tasks-list-request.handler.d.ts +4 -0
- package/transport/mcp-handlers/tasks-list-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/tasks-result-request.handler.d.ts +4 -0
- package/transport/mcp-handlers/tasks-result-request.handler.d.ts.map +1 -0
- package/transport/transport.registry.d.ts +9 -4
- package/transport/transport.registry.d.ts.map +1 -1
- package/types/zod.types.d.ts +1 -1
- package/types/zod.types.d.ts.map +1 -1
- package/workflow/tools/execute-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/get-workflow-status.tool.d.ts.map +1 -1
- package/workflow/tools/list-workflows.tool.d.ts.map +1 -1
- package/workflow/tools/register-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/remove-workflow.tool.d.ts.map +1 -1
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
2
|
+
import { FlowBase, type FlowRunOptions, type ScopeEntry, type ServerRequest } from '../../common';
|
|
3
|
+
declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
4
|
+
request: import("@frontmcp/lazy-zod").ZodObject<{}, import("zod/v4/core").$loose>;
|
|
5
|
+
response: import("@frontmcp/lazy-zod").ZodObject<{}, import("zod/v4/core").$loose>;
|
|
6
|
+
next: import("@frontmcp/lazy-zod").ZodOptional<import("zod").ZodFunction<import("zod/v4/core").$ZodFunctionArgs, import("zod/v4/core").$ZodFunctionOut>>;
|
|
7
|
+
}, import("zod/v4/core").$strip>;
|
|
8
|
+
declare const stateSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
9
|
+
resource: import("@frontmcp/lazy-zod").ZodString;
|
|
10
|
+
baseUrl: import("@frontmcp/lazy-zod").ZodString;
|
|
11
|
+
scopesSupported: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
12
|
+
isOrchestrated: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
13
|
+
}, import("zod/v4/core").$strip>;
|
|
14
|
+
declare const outputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
15
|
+
kind: import("@frontmcp/lazy-zod").ZodLiteral<"json">;
|
|
16
|
+
status: import("@frontmcp/lazy-zod").ZodNumber;
|
|
17
|
+
contentType: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodString>;
|
|
18
|
+
headers: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>]>]>>>>;
|
|
19
|
+
cookies: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
20
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
21
|
+
value: import("@frontmcp/lazy-zod").ZodString;
|
|
22
|
+
path: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodString>;
|
|
23
|
+
domain: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
24
|
+
httpOnly: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
25
|
+
secure: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
26
|
+
sameSite: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodEnum<{
|
|
28
27
|
strict: "strict";
|
|
29
28
|
lax: "lax";
|
|
30
29
|
none: "none";
|
|
31
30
|
}>>;
|
|
32
|
-
maxAge:
|
|
33
|
-
expires:
|
|
34
|
-
},
|
|
35
|
-
body:
|
|
36
|
-
resource:
|
|
37
|
-
authorization_servers:
|
|
38
|
-
scopes_supported:
|
|
39
|
-
bearer_methods_supported:
|
|
40
|
-
},
|
|
41
|
-
},
|
|
31
|
+
maxAge: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodNumber>;
|
|
32
|
+
expires: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodDate>;
|
|
33
|
+
}, import("zod/v4/core").$strip>>>>;
|
|
34
|
+
body: import("@frontmcp/lazy-zod").ZodObject<{
|
|
35
|
+
resource: import("@frontmcp/lazy-zod").ZodString;
|
|
36
|
+
authorization_servers: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
37
|
+
scopes_supported: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
38
|
+
bearer_methods_supported: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
39
|
+
}, import("zod/v4/core").$loose>;
|
|
40
|
+
}, import("zod/v4/core").$strip>;
|
|
42
41
|
declare const plan: {
|
|
43
42
|
readonly pre: ["parseInput"];
|
|
44
43
|
readonly execute: ["collectData"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"well-known.prm.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.prm.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"well-known.prm.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.prm.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAI1B,OAAO,EAGL,QAAQ,EAOR,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAGtB,QAAA,MAAM,WAAW;;;;gCAAkB,CAAC;AAEpC,QAAA,MAAM,WAAW;;;;;gCAKf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;gCAShB,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,qCAAqC,EAAE,cAAc,CACnD,gBAAgB,EAChB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,qCAA8C,CAAC;AAa5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACjE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU;IAKtD,UAAU;IAiBY,WAAW;CA+BxC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type SessionStorageConfig, type SessionStore, type StoredSession, type TransportProtocol, type TransportSession, type TransportState } from '@frontmcp/auth';
|
|
1
2
|
import { type EncryptedBlob } from '@frontmcp/utils';
|
|
2
|
-
import type { TransportSession, TransportProtocol, StoredSession, SessionStore, SessionStorageConfig, TransportState } from '@frontmcp/auth';
|
|
3
3
|
/**
|
|
4
4
|
* In-memory session store implementation
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-session.manager.d.ts","sourceRoot":"","sources":["../../../src/auth/session/transport-session.manager.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"transport-session.manager.d.ts","sourceRoot":"","sources":["../../../src/auth/session/transport-session.manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAQL,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAIzB;;GAEG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;IAEvD,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAqBrD,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO7E,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkBjD,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACH,OAAO,IAAI,MAAM;IAmBjB;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED;;;;;;;;;;GAUG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2B;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAa;gBAE/B,MAAM,EAAE,oBAAoB,GAAG;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE;IAoCxE;;;;;;;OAOG;IACG,aAAa,CACjB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KACnC,GACL,OAAO,CAAC,gBAAgB,CAAC;IAgC5B;;;;;OAKG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAWrE;;OAEG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAQxE;;OAEG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,OAAO,CAAC;IAqBnB;;OAEG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAaxD;;;;;;OAMG;IACH,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM;IAe/E;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAoCzB;;OAEG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQxD;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,GAAG,UAAU,CAE1C;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type SessionIdPayload, type TransportProtocolType } from '@frontmcp/auth';
|
|
2
|
+
import { type PlatformDetectionConfig } from '../../../common/types/options/session';
|
|
3
3
|
/**
|
|
4
4
|
* Decrypt a public session ID without signature verification.
|
|
5
5
|
* Public sessions use authSig: 'public' and isPublic: true.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-id.utils.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/utils/session-id.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-id.utils.d.ts","sourceRoot":"","sources":["../../../../src/auth/session/utils/session-id.utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AA8CrF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAe/E;AAMD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,KAAK,EAAE,MAAM,GACZ;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GAAG,SAAS,CAmBvD;AAED,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB;;;EA0B7G;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,SAAU,GAAG,MAAM,CAGvF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,GAAG,IAAI,CA0BzG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiBlG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authorities Plugin (Legacy)
|
|
3
|
+
*
|
|
4
|
+
* This plugin is no longer the enforcement mechanism for authorities.
|
|
5
|
+
* Authority enforcement is handled by native flow stages:
|
|
6
|
+
* - `checkEntryAuthorities` in call flows (tool, resource, prompt, agent)
|
|
7
|
+
* - `filterByAuthorities` in list flows
|
|
8
|
+
*
|
|
9
|
+
* The plugin exists only for backward compatibility with code that
|
|
10
|
+
* references `AuthoritiesPlugin`. The authorities engine is now
|
|
11
|
+
* configured directly via `@FrontMcp({ authorities: { ... } })`.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated Configure authorities via `@FrontMcp({ authorities })` instead.
|
|
14
|
+
*/
|
|
15
|
+
import { AuthoritiesEngine, AuthoritiesContextBuilder } from '@frontmcp/auth';
|
|
16
|
+
import { DynamicPlugin } from '../../common/dynamic/dynamic.plugin';
|
|
17
|
+
import type { AuthoritiesPluginOptions } from './authorities.plugin.options';
|
|
18
|
+
export default class AuthoritiesPlugin extends DynamicPlugin<AuthoritiesPluginOptions> {
|
|
19
|
+
/** The evaluation engine — accessed by scope during init */
|
|
20
|
+
readonly engine: AuthoritiesEngine;
|
|
21
|
+
/** The context builder — accessed by scope during init */
|
|
22
|
+
readonly contextBuilder: AuthoritiesContextBuilder;
|
|
23
|
+
constructor(options?: AuthoritiesPluginOptions);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=authorities.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorities.plugin.d.ts","sourceRoot":"","sources":["../../../src/builtin/authorities/authorities.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EAG1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAM7E,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,aAAa,CAAC,wBAAwB,CAAC;IACpF,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CAAC;gBAEvC,OAAO,GAAE,wBAA6B;CAoBnD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for the AuthoritiesPlugin.
|
|
3
|
+
*/
|
|
4
|
+
import type { AuthoritiesClaimsMapping, AuthoritiesPolicyMetadata, RelationshipResolver, AuthoritiesEvaluator, ClaimsResolverFn } from '@frontmcp/auth';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for `AuthoritiesPlugin.init()`.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* AuthoritiesPlugin.init({
|
|
11
|
+
* claimsMapping: { roles: 'realm_access.roles', permissions: 'scope' },
|
|
12
|
+
* profiles: {
|
|
13
|
+
* admin: { roles: { any: ['admin'] } },
|
|
14
|
+
* matchTenant: { attributes: { conditions: [{ path: 'claims.org_id', op: 'eq', value: { fromInput: 'tenantId' } }] } },
|
|
15
|
+
* },
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface AuthoritiesPluginOptions {
|
|
20
|
+
/**
|
|
21
|
+
* JWT claims mapping for your IdP.
|
|
22
|
+
* Tells the engine where roles, permissions, tenant ID etc. are located in the JWT.
|
|
23
|
+
*/
|
|
24
|
+
claimsMapping?: AuthoritiesClaimsMapping;
|
|
25
|
+
/**
|
|
26
|
+
* Custom function to extract roles/permissions/claims from AuthInfo.
|
|
27
|
+
* Takes precedence over `claimsMapping` when provided.
|
|
28
|
+
*/
|
|
29
|
+
claimsResolver?: ClaimsResolverFn;
|
|
30
|
+
/**
|
|
31
|
+
* Pre-registered named authority profiles.
|
|
32
|
+
* Allows `authorities: 'admin'` shorthand in decorators.
|
|
33
|
+
*/
|
|
34
|
+
profiles?: Record<string, AuthoritiesPolicyMetadata>;
|
|
35
|
+
/**
|
|
36
|
+
* Relationship resolver for ReBAC checks.
|
|
37
|
+
* Required when using `relationships` in policies.
|
|
38
|
+
*/
|
|
39
|
+
relationshipResolver?: RelationshipResolver;
|
|
40
|
+
/**
|
|
41
|
+
* Custom evaluators for the `custom.*` field in policies.
|
|
42
|
+
*/
|
|
43
|
+
evaluators?: Record<string, AuthoritiesEvaluator>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=authorities.plugin.options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorities.plugin.options.d.ts","sourceRoot":"","sources":["../../../src/builtin/authorities/authorities.plugin.options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAEzC;;;OAGG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IAErD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtin/authorities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpE,YAAY,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicPlugin, ProviderType } from '../../common';
|
|
1
|
+
import { DynamicPlugin, type ProviderType } from '../../common';
|
|
2
2
|
import type { ConfigPluginOptions, ConfigPluginOptionsInput } from './config.types';
|
|
3
3
|
/**
|
|
4
4
|
* ConfigPlugin - Environment variable management for FrontMCP.
|
|
@@ -20,7 +20,7 @@ import type { ConfigPluginOptions, ConfigPluginOptionsInput } from './config.typ
|
|
|
20
20
|
* class MyServer {}
|
|
21
21
|
*
|
|
22
22
|
* // With typed schema (convict-style)
|
|
23
|
-
* import { z } from 'zod';
|
|
23
|
+
* import { z } from '@frontmcp/lazy-zod';
|
|
24
24
|
*
|
|
25
25
|
* const configSchema = z.object({
|
|
26
26
|
* database: z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.plugin.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.plugin.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAyB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAKpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAaH,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAE,SAAQ,aAAa,CACtG,mBAAmB,CAAC,OAAO,CAAC,EAC5B,wBAAwB,CAAC,OAAO,CAAC,CAClC;IACC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAQxC;IAEF,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;gBAE1B,OAAO,GAAE,wBAAwB,CAAC,OAAO,CAAM;IAQ3D;;OAEG;IACH,OAAgB,gBAAgB,GAAI,CAAC,SAAS,MAAM,EAAE,SAAS,wBAAwB,CAAC,CAAC,CAAC,KAAG,YAAY,EAAE,CAqEzG;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAClF;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAElH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigService } from './providers/config.service';
|
|
1
2
|
/**
|
|
2
3
|
* Built-in ConfigPlugin for environment variable management.
|
|
3
4
|
*
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
* @example
|
|
8
9
|
* ```typescript
|
|
9
10
|
* import { FrontMcp, App, ConfigPlugin } from '@frontmcp/sdk';
|
|
10
|
-
* import { z } from 'zod';
|
|
11
|
+
* import { z } from '@frontmcp/lazy-zod';
|
|
11
12
|
*
|
|
12
13
|
* // Define configuration schema
|
|
13
14
|
* const configSchema = z.object({
|
|
@@ -49,7 +50,6 @@ export { loadEnvFiles, parseEnvContent, parseEnvContentSync, populateProcessEnv,
|
|
|
49
50
|
export { ConfigPluginConfigToken } from './config.symbols';
|
|
50
51
|
export { normalizeNameForEnv, normalizePathSegment, generateFallbacks, generateEnvFallbacks, resolveWithFallbacks, createContextResolver, createDirectResolver, } from './config-resolver';
|
|
51
52
|
export type { ConfigEntityType, ConfigResolutionContext, ConfigResolver } from './config-resolver';
|
|
52
|
-
import { ConfigService } from './providers/config.service';
|
|
53
53
|
/**
|
|
54
54
|
* Get the ConfigService from an execution context.
|
|
55
55
|
* Alternative to `this.config` for explicit function-style access.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG1D,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGrG,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGtG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG3D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnG;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,CAAC,GAAG,aAAa,CAE/F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,SAAS,CAKlH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/config-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/config-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAM5C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,MAAM,EAC/C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,CAAC,CAAC,CAmDZ;AA2BD;;;GAGG;AACH,iBAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyB5G;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { DottedPath, PathValue } from '../../../common/providers/base-config.provider';
|
|
1
|
+
import { type z } from '@frontmcp/lazy-zod';
|
|
2
|
+
import { type DottedPath, type PathValue } from '../../../common/providers/base-config.provider';
|
|
3
3
|
/**
|
|
4
4
|
* Error thrown when a required config key is missing.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.service.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/config.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.service.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/config.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAEjG;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,GAAG,EAAE,MAAM;CAKxB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ;CAMlD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAKa,aAAa,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;gBAErB,MAAM,EAAE,OAAO;IAI3B;;;;;;;;;;OAUG;IACH,GAAG,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,SAAS;IAC9E,GAAG,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAgBvG;;;;;;;;;OASG;IACH,UAAU,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAQzE;;OAEG;IACH,WAAW,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAI1E;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAe1B;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;;OAGG;IACH,SAAS,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC;IAI3B;;;;;;;OAOG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM;IAYtD;;;;;;;OAOG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO;CAW1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-loader.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/env-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env-loader.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/env-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAG5C;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2CvE;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,QAAQ,SAAW,EACnB,OAAO,SAAS,EAChB,YAAY,SAAe,GAC1B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAkBjC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,UAAQ,GAAG,IAAI,CAMtF;AAoBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA+B/F;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAyBlF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,SAAK,GAAG,MAAM,EAAE,CAoC3E;AAwBD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FrontMcpLogger } from '../common';
|
|
2
|
+
import { NotificationService } from '../notification/notification.service';
|
|
3
|
+
/**
|
|
4
|
+
* Service responsible for sending channel notifications to subscribed Claude Code sessions.
|
|
5
|
+
*
|
|
6
|
+
* **Session-scoped delivery:** Notifications are ONLY sent to sessions that:
|
|
7
|
+
* 1. Have `experimental: { 'claude/channel': {} }` in client capabilities
|
|
8
|
+
* 2. Are subscribed to the specific channel via `subscribeChannel()`
|
|
9
|
+
*
|
|
10
|
+
* This prevents data leaking between sessions — each session only receives
|
|
11
|
+
* notifications from channels it has explicitly subscribed to.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChannelNotificationService {
|
|
14
|
+
private readonly notificationService;
|
|
15
|
+
private readonly logger;
|
|
16
|
+
private readonly defaultMeta;
|
|
17
|
+
constructor(notificationService: NotificationService, logger: FrontMcpLogger, defaultMeta?: Record<string, string>);
|
|
18
|
+
/**
|
|
19
|
+
* Send a channel notification to all sessions subscribed to this channel.
|
|
20
|
+
* Only sends to sessions that both support channels AND are subscribed to
|
|
21
|
+
* the specific channel name.
|
|
22
|
+
*
|
|
23
|
+
* @param content - The notification content
|
|
24
|
+
* @param meta - Metadata key-value pairs (must include `source` for channel name)
|
|
25
|
+
*/
|
|
26
|
+
sendToSubscribedSessions(content: string, meta: Record<string, string>): void;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use sendToSubscribedSessions instead. This method now delegates to
|
|
29
|
+
* subscription-aware delivery.
|
|
30
|
+
*/
|
|
31
|
+
sendToAllCapableSessions(content: string, meta: Record<string, string>): void;
|
|
32
|
+
/**
|
|
33
|
+
* Send a channel notification to a specific session (if it supports channels
|
|
34
|
+
* and is subscribed to the channel).
|
|
35
|
+
*
|
|
36
|
+
* @param sessionId - The target session
|
|
37
|
+
* @param content - The notification content
|
|
38
|
+
* @param meta - Metadata key-value pairs
|
|
39
|
+
* @returns true if the notification was sent
|
|
40
|
+
*/
|
|
41
|
+
sendToSession(sessionId: string, content: string, meta: Record<string, string>): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Send a channel notification with the given channel name as source.
|
|
44
|
+
* Only sends to sessions subscribed to this specific channel.
|
|
45
|
+
*
|
|
46
|
+
* @param channelName - The channel name (becomes the `source` attribute)
|
|
47
|
+
* @param content - The notification content
|
|
48
|
+
* @param additionalMeta - Additional metadata to include
|
|
49
|
+
*/
|
|
50
|
+
send(channelName: string, content: string, additionalMeta?: Record<string, string>): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=channel-notification.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-notification.service.d.ts","sourceRoot":"","sources":["../../src/channel/channel-notification.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAoB,MAAM,sCAAsC,CAAC;AAQ7F;;;;;;;;;GASG;AACH,qBAAa,0BAA0B;IAKnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAJtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;gBAGlC,mBAAmB,EAAE,mBAAmB,EACzD,MAAM,EAAE,cAAc,EACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMtC;;;;;;;OAOG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IA2B7E;;;OAGG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAI7E;;;;;;;;OAQG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO;IA2BxF;;;;;;;OAOG;IACH,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;CAQ1F"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FrontMcpLogger, EntryOwnerRef } from '../common';
|
|
2
|
+
import { ChannelType } from '../common/interfaces/channel.interface';
|
|
3
|
+
import { ChannelsConfigOptions } from '../common/metadata/channel.metadata';
|
|
4
|
+
import ProviderRegistry from '../provider/provider.registry';
|
|
5
|
+
import ChannelRegistry from './channel.registry';
|
|
6
|
+
import { ChannelNotificationService } from './channel-notification.service';
|
|
7
|
+
import { ChannelEventBus } from './sources/app-event.source';
|
|
8
|
+
import type { NotificationService } from '../notification/notification.service';
|
|
9
|
+
import type FlowRegistry from '../flows/flow.registry';
|
|
10
|
+
import type ToolRegistry from '../tool/tool.registry';
|
|
11
|
+
export interface RegisterChannelCapabilitiesArgs {
|
|
12
|
+
providers: ProviderRegistry;
|
|
13
|
+
owner: EntryOwnerRef;
|
|
14
|
+
channelsList: ChannelType[];
|
|
15
|
+
channelsConfig: ChannelsConfigOptions;
|
|
16
|
+
notificationService: NotificationService;
|
|
17
|
+
flowRegistry: FlowRegistry;
|
|
18
|
+
toolRegistry: ToolRegistry;
|
|
19
|
+
/** Optional agent emitter subscribe function for agent-completion sources */
|
|
20
|
+
agentEmitterSubscribe?: (cb: (event: unknown) => void) => () => void;
|
|
21
|
+
/** Optional job emitter subscribe function for job-completion sources */
|
|
22
|
+
jobEmitterSubscribe?: (cb: (event: unknown) => void) => () => void;
|
|
23
|
+
logger: FrontMcpLogger;
|
|
24
|
+
}
|
|
25
|
+
export interface ChannelCapabilitiesResult {
|
|
26
|
+
channelRegistry: ChannelRegistry;
|
|
27
|
+
channelNotificationService: ChannelNotificationService;
|
|
28
|
+
channelEventBus: ChannelEventBus;
|
|
29
|
+
/** Teardown function: disconnects services and cleans up subscriptions */
|
|
30
|
+
teardown: () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Helper function for registering channel capabilities in scope.
|
|
34
|
+
* Follows the skill-scope.helper.ts and job-scope.helper.ts patterns.
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerChannelCapabilities(args: RegisterChannelCapabilitiesArgs): Promise<ChannelCapabilitiesResult>;
|
|
37
|
+
//# sourceMappingURL=channel-scope.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-scope.helper.d.ts","sourceRoot":"","sources":["../../src/channel/channel-scope.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAsB,MAAM,4BAA4B,CAAC;AAMjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AAItD,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,cAAc,EAAE,qBAAqB,CAAC;IACtC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,6EAA6E;IAC7E,qBAAqB,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IACrE,yEAAyE;IACzE,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IACnE,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,eAAe,CAAC;IACjC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,eAAe,EAAE,eAAe,CAAC;IACjC,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,yBAAyB,CAAC,CA4KpC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChannelEntry } from '../common';
|
|
2
|
+
export type ChannelChangeKind = 'added' | 'updated' | 'removed' | 'reset';
|
|
3
|
+
/**
|
|
4
|
+
* The scope of a change event.
|
|
5
|
+
* - `global`: Change affects all sessions
|
|
6
|
+
* - `session`: Change affects only a specific session
|
|
7
|
+
*/
|
|
8
|
+
export type ChannelChangeScope = 'global' | 'session';
|
|
9
|
+
export type ChannelChangeEvent = {
|
|
10
|
+
kind: ChannelChangeKind;
|
|
11
|
+
/** Whether the change affects all sessions or a specific session */
|
|
12
|
+
changeScope: ChannelChangeScope;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
relatedRequestId?: string;
|
|
15
|
+
version: number;
|
|
16
|
+
snapshot: readonly ChannelEntry[];
|
|
17
|
+
};
|
|
18
|
+
type Listener = (e: ChannelChangeEvent) => void;
|
|
19
|
+
export declare class ChannelEmitter {
|
|
20
|
+
private listeners;
|
|
21
|
+
on(l: Listener): () => void;
|
|
22
|
+
emit(e: ChannelChangeEvent): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=channel.events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.events.d.ts","sourceRoot":"","sources":["../../src/channel/channel.events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;CACnC,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAEhD,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAuB;IAExC,EAAE,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,IAAI;IAK3B,IAAI,CAAC,CAAC,EAAE,kBAAkB;CAG3B"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { EntryOwnerRef, ChannelContext, ChannelEntry, ChannelRecord, ScopeEntry } from '../common';
|
|
2
|
+
import ProviderRegistry from '../provider/provider.registry';
|
|
3
|
+
import type { ChannelNotification } from '../common/metadata/channel.metadata';
|
|
4
|
+
import type { ChannelNotificationService } from './channel-notification.service';
|
|
5
|
+
/**
|
|
6
|
+
* Concrete implementation of a channel that can receive events and push notifications.
|
|
7
|
+
*
|
|
8
|
+
* For service connector channels (source: { type: 'service' }), maintains a persistent
|
|
9
|
+
* ChannelContext that is connected on init and disconnected on teardown.
|
|
10
|
+
*
|
|
11
|
+
* **Scope Binding:** The ChannelInstance captures its scope and providers at construction time.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChannelInstance extends ChannelEntry {
|
|
14
|
+
/** The provider registry this channel is bound to */
|
|
15
|
+
private readonly _providers;
|
|
16
|
+
/** The scope this channel operates in */
|
|
17
|
+
readonly scope: ScopeEntry;
|
|
18
|
+
/** The notification service for pushing to Claude Code sessions */
|
|
19
|
+
private _channelNotificationService?;
|
|
20
|
+
/** Persistent context for service connectors (kept alive for the lifetime of the scope) */
|
|
21
|
+
private _serviceContext?;
|
|
22
|
+
/** Replay buffer for events that arrive when no sessions are connected */
|
|
23
|
+
private _replayBuffer;
|
|
24
|
+
/** Maximum replay buffer size */
|
|
25
|
+
private readonly _maxReplayEvents;
|
|
26
|
+
constructor(record: ChannelRecord, providers: ProviderRegistry, owner: EntryOwnerRef);
|
|
27
|
+
/**
|
|
28
|
+
* Set the notification service reference (injected after registry init).
|
|
29
|
+
*/
|
|
30
|
+
setNotificationService(service: ChannelNotificationService): void;
|
|
31
|
+
get providers(): ProviderRegistry;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this channel requires a persistent connection via onConnect()/onDisconnect().
|
|
34
|
+
* True for service connectors and file watchers.
|
|
35
|
+
*/
|
|
36
|
+
get isServiceConnector(): boolean;
|
|
37
|
+
protected initialize(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Connect the service connector (called after notification service is wired).
|
|
40
|
+
* Creates a persistent context, wires pushIncoming, and calls onConnect().
|
|
41
|
+
*/
|
|
42
|
+
connectService(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Disconnect the service connector (called during scope teardown).
|
|
45
|
+
*/
|
|
46
|
+
disconnectService(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Get the persistent service context (for service connectors only).
|
|
49
|
+
*/
|
|
50
|
+
get serviceContext(): ChannelContext | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Create a ChannelContext for handling an event.
|
|
53
|
+
*/
|
|
54
|
+
create(authInfo: Partial<Record<string, unknown>>): ChannelContext;
|
|
55
|
+
/**
|
|
56
|
+
* Whether replay buffering is enabled for this channel.
|
|
57
|
+
*/
|
|
58
|
+
get replayEnabled(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get the current replay buffer contents (read-only).
|
|
61
|
+
*/
|
|
62
|
+
get replayBuffer(): readonly ChannelNotification[];
|
|
63
|
+
/**
|
|
64
|
+
* Push a notification to subscribed Claude Code sessions.
|
|
65
|
+
*
|
|
66
|
+
* **Session isolation:** If `targetSessionId` is provided, the notification is sent
|
|
67
|
+
* ONLY to that specific session. This prevents session-scoped data (job results,
|
|
68
|
+
* agent outputs) from leaking to other connected sessions.
|
|
69
|
+
*
|
|
70
|
+
* If `targetSessionId` is undefined, the notification goes to ALL subscribed sessions
|
|
71
|
+
* (appropriate for global events like webhooks, file changes, etc.).
|
|
72
|
+
*
|
|
73
|
+
* @param content - The notification content
|
|
74
|
+
* @param meta - Additional metadata
|
|
75
|
+
* @param targetSessionId - If set, deliver ONLY to this session
|
|
76
|
+
*/
|
|
77
|
+
pushNotification(content: string, meta?: Record<string, string>, targetSessionId?: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Replay buffered events to a specific session.
|
|
80
|
+
* Called when a new Claude Code session connects and the channel has buffered events.
|
|
81
|
+
*
|
|
82
|
+
* @param sessionId - The session to replay events to
|
|
83
|
+
* @returns Number of events replayed
|
|
84
|
+
*/
|
|
85
|
+
replayBufferedEvents(sessionId: string): number;
|
|
86
|
+
/**
|
|
87
|
+
* Clear the replay buffer.
|
|
88
|
+
*/
|
|
89
|
+
clearReplayBuffer(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Handle an incoming event from the channel's source.
|
|
92
|
+
* Creates a context, transforms the payload, and pushes the notification.
|
|
93
|
+
*
|
|
94
|
+
* @param payload - The raw event payload from the source
|
|
95
|
+
* @param targetSessionId - If set, deliver notification ONLY to this session
|
|
96
|
+
* (prevents session-scoped data from leaking to other sessions)
|
|
97
|
+
* @returns The notification that was sent (or null if transform failed)
|
|
98
|
+
*/
|
|
99
|
+
handleEvent(payload: unknown, targetSessionId?: string): Promise<ChannelNotification | null>;
|
|
100
|
+
/**
|
|
101
|
+
* Handle a reply from Claude Code (for two-way channels).
|
|
102
|
+
*/
|
|
103
|
+
handleReply(reply: string, meta?: Record<string, string>): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=channel.instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.instance.d.ts","sourceRoot":"","sources":["../../src/channel/channel.instance.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,cAAc,EAEd,YAAY,EAEZ,aAAa,EAGb,UAAU,EACX,MAAM,WAAW,CAAC;AACnB,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEjF;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,mEAAmE;IACnE,OAAO,CAAC,2BAA2B,CAAC,CAA6B;IACjE,2FAA2F;IAC3F,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,0EAA0E;IAC1E,OAAO,CAAC,aAAa,CAA6B;IAClD,iCAAiC;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAE9B,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa;IAWpF;;OAEG;IACH,sBAAsB,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI;IAIjE,IAAI,SAAS,IAAI,gBAAgB,CAEhC;IAED;;;OAGG;IACH,IAAI,kBAAkB,IAAI,OAAO,CAEhC;cAEe,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BrC;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAaxC;;OAEG;IACH,IAAI,cAAc,IAAI,cAAc,GAAG,SAAS,CAE/C;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,cAAc;IAwBlE;;OAEG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,SAAS,mBAAmB,EAAE,CAEjD;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI;IAgChG;;;;;;OAMG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAe/C;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAIzB;;;;;;;;OAQG;IACG,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAelG;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAY/E"}
|