@frontmcp/sdk 1.11.2 → 1.12.0-rc.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/README.md +9 -0
- package/agent/adapters/anthropic.adapter.d.ts +4 -4
- package/agent/adapters/anthropic.adapter.d.ts.map +1 -1
- package/agent/adapters/base.adapter.d.ts +12 -2
- package/agent/adapters/base.adapter.d.ts.map +1 -1
- package/agent/adapters/index.d.ts +1 -1
- package/agent/adapters/index.d.ts.map +1 -1
- package/agent/adapters/openai.adapter.d.ts +7 -7
- package/agent/adapters/openai.adapter.d.ts.map +1 -1
- package/agent/agent-execution-loop.d.ts +27 -14
- package/agent/agent-execution-loop.d.ts.map +1 -1
- package/agent/agent.registry.d.ts +9 -0
- package/agent/agent.registry.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/answer/answer-meter.d.ts +2 -0
- package/answer/answer-meter.d.ts.map +1 -1
- package/app/instances/app.esm.instance.d.ts +29 -5
- package/app/instances/app.esm.instance.d.ts.map +1 -1
- package/app/instances/app.lazy.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/app/instances/esm-normalize.utils.d.ts +3 -1
- package/app/instances/esm-normalize.utils.d.ts.map +1 -1
- package/app/instances/esm-package-version.d.ts +48 -0
- package/app/instances/esm-package-version.d.ts.map +1 -0
- package/app/lazy/lazy-app.rules.d.ts +4 -0
- package/app/lazy/lazy-app.rules.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.contract.d.ts +27 -0
- package/auth/auth-ui/auth-ui.contract.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.state.d.ts +2 -1
- package/auth/auth-ui/auth-ui.state.d.ts.map +1 -1
- package/auth/auth-ui/index.d.ts +1 -1
- package/auth/auth-ui/index.d.ts.map +1 -1
- package/auth/authorization/orchestrated.context-extension.d.ts +1 -1
- package/auth/authorization/orchestrated.context-extension.d.ts.map +1 -1
- package/auth/authorized-apps.utils.d.ts +22 -0
- package/auth/authorized-apps.utils.d.ts.map +1 -1
- package/auth/federated-steps.d.ts +66 -0
- package/auth/federated-steps.d.ts.map +1 -0
- package/auth/flows/oauth.authorize.flow.d.ts +2 -2
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +17 -6
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts +1 -1
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +9 -0
- package/auth/flows/oauth.token.flow.d.ts.map +1 -1
- package/auth/flows/oauth.userinfo.flow.d.ts +1 -1
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -0
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +38 -7
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/required-providers.utils.d.ts +19 -0
- package/auth/required-providers.utils.d.ts.map +1 -0
- package/browser/agent/adapters/anthropic.adapter.mjs +14 -10
- package/browser/agent/adapters/base.adapter.mjs +10 -3
- package/browser/agent/adapters/openai.adapter.mjs +39 -25
- package/browser/agent/agent-execution-loop.mjs +102 -70
- package/browser/agent/agent.registry.mjs +56 -20
- package/browser/agent/flows/call-agent.flow.mjs +2 -1
- package/browser/agent/index.mjs +1 -1
- package/browser/answer/answer-meter.mjs +1 -0
- package/browser/app/instances/app.esm.instance.mjs +128 -154
- package/browser/app/instances/app.lazy.instance.mjs +7 -3
- package/browser/app/instances/app.remote.instance.mjs +3 -4
- package/browser/app/instances/esm-normalize.utils.mjs +10 -5
- package/browser/app/instances/esm-package-version.mjs +118 -0
- package/browser/app/lazy/lazy-app.rules.mjs +4 -1
- package/browser/auth/auth-ui/auth-ui.state.mjs +1 -1
- package/browser/auth/authorization/orchestrated.context-extension.mjs +2 -2
- package/browser/auth/authorized-apps.utils.mjs +24 -2
- package/browser/auth/federated-steps.mjs +199 -0
- package/browser/auth/flows/oauth.authorize.flow.mjs +61 -76
- package/browser/auth/flows/oauth.callback.flow.mjs +112 -42
- package/browser/auth/flows/oauth.provider-callback.flow.mjs +14 -2
- package/browser/auth/flows/oauth.register.flow.mjs +3 -3
- package/browser/auth/flows/oauth.token.flow.mjs +33 -3
- package/browser/auth/flows/session.verify.flow.mjs +1 -1
- package/browser/auth/flows/well-known.oauth-authorization-server.flow.mjs +11 -6
- package/browser/auth/flows/well-known.prm.flow.mjs +2 -1
- package/browser/auth/instances/instance.local-primary-auth.mjs +131 -37
- package/browser/auth/required-providers.utils.mjs +16 -0
- package/browser/channel/channel-notification.service.mjs +20 -8
- package/browser/channel/channel-scope.helper.mjs +2 -2
- package/browser/channel/channel.instance.mjs +10 -1
- package/browser/channel/channel.utils.mjs +22 -1
- package/browser/channel/flows/send-channel-notification.flow.mjs +1 -1
- package/browser/channel/sources/app-event.source.mjs +5 -2
- package/browser/channel/sources/file-watcher.source.mjs +66 -0
- package/browser/common/decorators/duty.decorator.mjs +3 -4
- package/browser/common/decorators/event.decorator.mjs +49 -0
- package/browser/common/decorators/index.mjs +2 -0
- package/browser/common/decorators/worker.decorator.mjs +23 -0
- package/browser/common/entries/event.entry.mjs +59 -0
- package/browser/common/entries/index.mjs +1 -0
- package/browser/common/entries/tool.entry.mjs +21 -4
- package/browser/common/index.mjs +8 -8
- package/browser/common/interfaces/agent.interface.mjs +25 -4
- package/browser/common/interfaces/event.interface.mjs +17 -0
- package/browser/common/interfaces/execution-context.interface.mjs +8 -0
- package/browser/common/interfaces/index.mjs +2 -0
- package/browser/common/interfaces/tool.interface.mjs +31 -5
- package/browser/common/interfaces/worker.interface.mjs +0 -0
- package/browser/common/metadata/app.metadata.mjs +10 -2
- package/browser/common/metadata/duty.metadata.mjs +28 -13
- package/browser/common/metadata/duty.resolved.mjs +13 -0
- package/browser/common/metadata/event.metadata.mjs +137 -0
- package/browser/common/metadata/front-mcp.metadata.mjs +3 -0
- package/browser/common/metadata/index.mjs +6 -2
- package/browser/common/metadata/output-policy.mjs +4 -0
- package/browser/common/metadata/worker.metadata.mjs +44 -0
- package/browser/common/metadata/worker.resolved.mjs +13 -0
- package/browser/common/metadata/workflow.metadata.mjs +10 -2
- package/browser/common/records/event.record.mjs +9 -0
- package/browser/common/records/index.mjs +1 -0
- package/browser/common/schemas/annotated-class.schema.mjs +10 -0
- package/browser/common/schemas/index.mjs +1 -1
- package/browser/common/tokens/app.tokens.mjs +1 -0
- package/browser/common/tokens/event.tokens.mjs +11 -0
- package/browser/common/tokens/front-mcp.tokens.mjs +2 -0
- package/browser/common/tokens/index.mjs +1 -0
- package/browser/common/tokens/workflow.tokens.mjs +2 -0
- package/browser/common/types/options/transport/schema.mjs +3 -0
- package/browser/common/utils/auth-info.utils.mjs +1 -2
- package/browser/common/utils/index.mjs +1 -1
- package/browser/common/utils/offset-cursor.utils.mjs +23 -0
- package/browser/common/utils/principal.utils.mjs +25 -1
- package/browser/common/utils/time-zone.utils.mjs +12 -0
- package/browser/context/frontmcp-context-storage.mjs +14 -3
- package/browser/context/frontmcp-context.mjs +24 -2
- package/browser/direct/create.mjs +3 -1
- package/browser/direct/direct-client.mjs +16 -2
- package/browser/direct/direct-events-transport.mjs +47 -0
- package/browser/direct/direct-server.mjs +5 -1
- package/browser/duty/cron-schedule.mjs +62 -0
- package/browser/duty/describe-thrown.mjs +12 -0
- package/browser/duty/duty.lifecycle.mjs +102 -97
- package/browser/duty/duty.runner.mjs +117 -115
- package/browser/duty/lazy-lease-store.mjs +60 -0
- package/browser/duty/lease-holder.mjs +132 -0
- package/browser/duty/lease-store.mjs +125 -0
- package/browser/elicitation/helpers/checked-elicit-answer.mjs +18 -0
- package/browser/elicitation/helpers/elicit.helper.mjs +5 -21
- package/browser/elicitation/questions/question-subject.mjs +8 -2
- package/browser/elicitation/store/elicitation-encryption.mjs +6 -6
- package/browser/elicitation/store/encrypted-elicitation.store.mjs +2 -2
- package/browser/elicitation/store/storage-elicitation.store.mjs +1 -2
- package/browser/errors/auth-internal.errors.mjs +2 -0
- package/browser/errors/duty.errors.mjs +20 -0
- package/browser/errors/event.errors.mjs +128 -0
- package/browser/errors/index.mjs +42 -2
- package/browser/errors/mcp.error.mjs +22 -3
- package/browser/errors/misconfiguration.mjs +2 -0
- package/browser/errors/remote.errors.mjs +1 -1
- package/browser/errors/tool-ui.errors.mjs +22 -0
- package/browser/errors/worker.errors.mjs +14 -0
- package/browser/errors/workflow.errors.mjs +7 -1
- package/browser/esm-loader/esm-cache.mjs +2 -2
- package/browser/esm-loader/esm-entries.mjs +15 -1
- package/browser/esm-loader/esm-manifest.mjs +32 -25
- package/browser/esm-loader/esm-module-loader.mjs +22 -4
- package/browser/esm-loader/factories/esm-context-factories.mjs +3 -3
- package/browser/esm-loader/factories/esm-instance-factories.mjs +7 -3
- package/browser/esm-loader/factories/esm-record-builders.mjs +27 -2
- package/browser/esm-loader/semver.utils.mjs +3 -5
- package/browser/esm-loader/version-poller.mjs +1 -1
- package/browser/esm-loader/version-resolver.mjs +5 -1
- package/browser/event/delivery/event-metrics.mjs +37 -0
- package/browser/event/delivery/event-outbox.mjs +251 -0
- package/browser/event/event-channel.mjs +30 -0
- package/browser/event/event-dialect.mjs +23 -0
- package/browser/event/event-gates.mjs +72 -0
- package/browser/event/event-outbound.mjs +8 -0
- package/browser/event/event-publisher.mjs +55 -0
- package/browser/event/event-reauthorization.mjs +48 -0
- package/browser/event/event-scope.helper.mjs +266 -0
- package/browser/event/event-subscriber.mjs +31 -0
- package/browser/event/event.instance.mjs +44 -0
- package/browser/event/event.registry.mjs +145 -0
- package/browser/event/event.utils.mjs +31 -0
- package/browser/event/flows/event-deliver.flow.mjs +175 -0
- package/browser/event/flows/event-poll.flow.mjs +308 -0
- package/browser/event/flows/event-publish-http.flow.mjs +288 -0
- package/browser/event/flows/event-publish.flow.mjs +371 -0
- package/browser/event/flows/event-stream.flow.mjs +222 -0
- package/browser/event/flows/event-subscribe.flow.mjs +351 -0
- package/browser/event/flows/event-unsubscribe.flow.mjs +120 -0
- package/browser/event/flows/list-events.flow.mjs +145 -0
- package/browser/event/index.mjs +104 -0
- package/browser/event/poll/event-buffer.mjs +77 -0
- package/browser/event/poll/event-poll-leases.mjs +118 -0
- package/browser/event/publish-endpoint/event-publish-endpoint.mjs +75 -0
- package/browser/event/publish-endpoint/event-publish-idempotency.mjs +54 -0
- package/browser/event/replay/event-replays.mjs +298 -0
- package/browser/event/stream/event-stream.mjs +279 -0
- package/browser/event/stream/event-streams.mjs +122 -0
- package/browser/event/subscription/event-callback-verifier.mjs +165 -0
- package/browser/event/subscription/event-subscription-store.factory.mjs +59 -0
- package/browser/event/subscription/event-subscription-termination.mjs +34 -0
- package/browser/event/subscription/event-subscription.store.mjs +167 -0
- package/browser/event/subscription/event-subscriptions.mjs +126 -0
- package/browser/event-client/event-client.errors.mjs +50 -0
- package/browser/event-client/event-webhook-receiver.mjs +155 -0
- package/browser/event-client/events-client.mjs +471 -0
- package/browser/event-client/index.mjs +28 -0
- package/browser/ext-apps/ext-apps.handler.mjs +6 -1
- package/browser/flows/flow.http-path.mjs +5 -1
- package/browser/flows/flow.instance.mjs +42 -9
- package/browser/front-mcp/authorities-rules.check.mjs +15 -1
- package/browser/front-mcp/front-mcp.mjs +23 -8
- package/browser/front-mcp/session-secret.check.mjs +22 -0
- package/browser/http-route/http-route.table.mjs +23 -3
- package/browser/index.cjs +35274 -25258
- package/browser/index.mjs +43 -4
- package/browser/job/execution/job-execution.manager.mjs +58 -21
- package/browser/job/flows/execute-job.flow.mjs +5 -3
- package/browser/job/index.mjs +2 -2
- package/browser/job/job-attempt.mjs +15 -10
- package/browser/job/job-context-providers.mjs +2 -1
- package/browser/job/job-scope.helper.mjs +97 -4
- package/browser/job/job.registry.mjs +30 -0
- package/browser/job/store/memory-job-state.store.mjs +5 -0
- package/browser/job/store/redis-job-state.store.mjs +11 -0
- package/browser/job/store/storage-job-state.store.mjs +18 -2
- package/browser/job/tools/index.mjs +3 -1
- package/browser/job/tools/list-jobs.tool.mjs +7 -5
- package/browser/job/tools/update-job.tool.mjs +75 -0
- package/browser/logger/instances/instance.logger.mjs +31 -6
- package/browser/notification/notification.service.mjs +62 -11
- package/browser/prompt/flows/get-prompt.flow.mjs +3 -3
- package/browser/prompt/flows/prompts-list.flow.mjs +11 -4
- package/browser/provider/create-container.mjs +20 -9
- package/browser/provider/provider.lifecycle.mjs +4 -0
- package/browser/provider/provider.registry.mjs +56 -12
- package/browser/remote-mcp/factories/instance-factories.mjs +4 -4
- package/browser/remote-mcp/factories/record-builders.mjs +5 -0
- package/browser/remote-mcp/mcp-client.service.mjs +113 -68
- package/browser/remote-mcp/mcp-stateless-client.adapter.mjs +2 -2
- package/browser/remote-mcp/remote-entries.mjs +2 -1
- package/browser/remote-mcp/remote-oauth.mjs +102 -0
- package/browser/remote-mcp/remote-request-headers.mjs +42 -12
- package/browser/remote-mcp/resilience/circuit-breaker.mjs +3 -2
- package/browser/resource/flows/read-resource.flow.mjs +6 -4
- package/browser/resource/flows/resource-templates-list.flow.mjs +24 -9
- package/browser/resource/flows/resources-list.flow.mjs +11 -4
- package/browser/scope/event-publisher.providers.mjs +32 -0
- package/browser/scope/flows/http.request.flow.mjs +1 -1
- package/browser/scope/observability-scope.helper.mjs +6 -1
- package/browser/scope/scope.instance.mjs +312 -96
- package/browser/skill/errors/tool-not-allowed.error.mjs +2 -2
- package/browser/skill/flows/filter-skills.flow.mjs +1 -1
- package/browser/skill/flows/load-skill.flow.mjs +27 -15
- package/browser/skill/guards/tool-authorization.guard.mjs +1 -1
- package/browser/skill/hooks/skill-tool.hook.mjs +32 -24
- package/browser/skill/providers/external-skill.provider.mjs +4 -2
- package/browser/skill/session/skill-session-store.interface.mjs +10 -0
- package/browser/skill/session/skill-session.manager.mjs +8 -0
- package/browser/skill/skill-authorities.helper.mjs +9 -3
- package/browser/skill/skill-instructions.helper.mjs +12 -6
- package/browser/skill/skill-scope.helper.mjs +7 -2
- package/browser/skill/skill.registry.mjs +21 -2
- package/browser/subsystems.mjs +9 -2
- package/browser/surface/entry-authorized.mjs +15 -0
- package/browser/tool/flows/call-tool.flow.mjs +59 -13
- package/browser/tool/flows/tools-list.flow.mjs +14 -37
- package/browser/tool/tool.utils.mjs +46 -61
- package/browser/tool/ui/serving-mode-default.mjs +11 -2
- package/browser/tool/ui/template-detection.mjs +1 -1
- package/browser/tool/ui/ui-option-warnings.mjs +1 -28
- package/browser/tool/ui/ui-render.mjs +6 -0
- package/browser/tool/ui/ui-resource.handler.mjs +50 -6
- package/browser/tool/ui/ui-shared.mjs +61 -7
- package/browser/tool/ui/widget-routes.mjs +73 -0
- package/browser/tool/ui/widget-serving.mjs +112 -0
- package/browser/transport/adapters/transport.local.adapter.mjs +9 -2
- package/browser/transport/build-scoped-server-options.mjs +5 -1
- package/browser/transport/flows/handle.mcp-20260728.flow.mjs +77 -4
- package/browser/transport/flows/handle.stateless-http.flow.mjs +1 -2
- package/browser/transport/in-memory-server.mjs +3 -0
- package/browser/transport/mcp-20260728/client/index.mjs +1 -1
- package/browser/transport/mcp-20260728/client/mcp-stateless.client.mjs +2 -1
- package/browser/transport/mcp-20260728/discover.mjs +1 -0
- package/browser/transport/mcp-20260728/event-stream-response.mjs +44 -0
- package/browser/transport/mcp-20260728/index.mjs +3 -2
- package/browser/transport/mcp-20260728/protocol-20260728.constants.mjs +8 -1
- package/browser/transport/mcp-20260728/request-validation.mjs +9 -5
- package/browser/transport/mcp-handlers/events-list-request.handler.mjs +23 -0
- package/browser/transport/mcp-handlers/events-poll-request.handler.mjs +23 -0
- package/browser/transport/mcp-handlers/events-stream-request.handler.mjs +44 -0
- package/browser/transport/mcp-handlers/events-subscribe-request.handler.mjs +23 -0
- package/browser/transport/mcp-handlers/events-unsubscribe-request.handler.mjs +25 -0
- package/browser/transport/mcp-handlers/index.mjs +13 -0
- package/browser/transport/mcp-handlers/initialize-request.handler.mjs +3 -1
- package/browser/transport/stdio-revision-router.mjs +29 -2
- package/browser/transport/web-fetch-handler.mjs +5 -1
- package/browser/utils/abort.utils.mjs +7 -2
- package/browser/utils/content.utils.mjs +1 -1
- package/browser/worker/worker.lifecycle.mjs +199 -0
- package/browser/worker/worker.supervisor.mjs +111 -0
- package/browser/workflow/engine/workflow-step.executor.mjs +1 -1
- package/browser/workflow/engine/workflow.engine.mjs +13 -10
- package/browser/workflow/index.mjs +2 -2
- package/browser/workflow/tools/execute-workflow.tool.mjs +1 -1
- package/browser/workflow/tools/index.mjs +3 -1
- package/browser/workflow/tools/list-workflows.tool.mjs +4 -2
- package/browser/workflow/tools/register-workflow.tool.mjs +11 -2
- package/browser/workflow/tools/update-workflow.tool.mjs +80 -0
- package/browser/workflow/trigger/workflow-events.mjs +41 -0
- package/browser/workflow/trigger/workflow-schedules.mjs +173 -0
- package/browser/workflow/trigger/workflow-triggers.mjs +111 -0
- package/browser/workflow/trigger/workflow-webhook.routes.mjs +104 -0
- package/browser/workflow/trigger/workflow-webhook.signature.mjs +59 -0
- package/browser/workflow/workflow.registry.mjs +27 -0
- package/browser/workflow/workflow.utils.mjs +13 -2
- package/builtin/authorities/authorities.plugin.d.ts +1 -1
- package/builtin/authorities/authorities.plugin.d.ts.map +1 -1
- package/builtin/authorities/authorities.plugin.options.d.ts +1 -1
- package/builtin/authorities/authorities.plugin.options.d.ts.map +1 -1
- package/builtin/config/config-resolver.d.ts.map +1 -1
- package/channel/channel-notification.service.d.ts +5 -2
- package/channel/channel-notification.service.d.ts.map +1 -1
- package/channel/channel-scope.helper.d.ts +6 -1
- package/channel/channel-scope.helper.d.ts.map +1 -1
- package/channel/channel.instance.d.ts +7 -1
- package/channel/channel.instance.d.ts.map +1 -1
- package/channel/channel.types.d.ts +1 -1
- package/channel/channel.types.d.ts.map +1 -1
- package/channel/channel.utils.d.ts +20 -0
- package/channel/channel.utils.d.ts.map +1 -1
- package/channel/sources/agent-completion.source.d.ts +1 -1
- package/channel/sources/agent-completion.source.d.ts.map +1 -1
- package/channel/sources/app-event.source.d.ts +11 -2
- package/channel/sources/app-event.source.d.ts.map +1 -1
- package/channel/sources/file-watcher.source.d.ts +21 -0
- package/channel/sources/file-watcher.source.d.ts.map +1 -0
- package/channel/sources/index.d.ts +1 -0
- package/channel/sources/index.d.ts.map +1 -1
- package/common/decorators/app.decorator.d.ts +1 -1
- package/common/decorators/app.decorator.d.ts.map +1 -1
- package/common/decorators/duty.decorator.d.ts +3 -2
- package/common/decorators/duty.decorator.d.ts.map +1 -1
- package/common/decorators/event.decorator.d.ts +38 -0
- package/common/decorators/event.decorator.d.ts.map +1 -0
- package/common/decorators/index.d.ts +2 -0
- package/common/decorators/index.d.ts.map +1 -1
- package/common/decorators/worker.decorator.d.ts +13 -0
- package/common/decorators/worker.decorator.d.ts.map +1 -0
- package/common/entries/event.entry.d.ts +34 -0
- package/common/entries/event.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/provider.entry.d.ts +2 -2
- package/common/entries/provider.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +28 -3
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/tool.entry.d.ts +5 -3
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +4 -2
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/event.interface.d.ts +124 -0
- package/common/interfaces/event.interface.d.ts.map +1 -0
- package/common/interfaces/execution-context.interface.d.ts +3 -0
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/index.d.ts +2 -0
- package/common/interfaces/index.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/llm-adapter.interface.d.ts +5 -0
- package/common/interfaces/llm-adapter.interface.d.ts.map +1 -1
- package/common/interfaces/logger.interface.d.ts +2 -1
- package/common/interfaces/logger.interface.d.ts.map +1 -1
- package/common/interfaces/tool.interface.d.ts +12 -2
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/interfaces/worker.interface.d.ts +13 -0
- package/common/interfaces/worker.interface.d.ts.map +1 -0
- package/common/metadata/agent.metadata.d.ts +8 -3
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +39 -12
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/channel.metadata.d.ts +40 -8
- package/common/metadata/channel.metadata.d.ts.map +1 -1
- package/common/metadata/duty.metadata.d.ts +67 -13
- package/common/metadata/duty.metadata.d.ts.map +1 -1
- package/common/metadata/duty.resolved.d.ts +4 -0
- package/common/metadata/duty.resolved.d.ts.map +1 -0
- package/common/metadata/event.metadata.d.ts +451 -0
- package/common/metadata/event.metadata.d.ts.map +1 -0
- package/common/metadata/flow.metadata.d.ts +14 -0
- package/common/metadata/flow.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +1654 -17
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/index.d.ts +4 -0
- package/common/metadata/index.d.ts.map +1 -1
- package/common/metadata/job.metadata.d.ts +12 -1
- package/common/metadata/job.metadata.d.ts.map +1 -1
- package/common/metadata/output-policy.d.ts +2 -0
- package/common/metadata/output-policy.d.ts.map +1 -1
- package/common/metadata/prompt.metadata.d.ts +1 -1
- package/common/metadata/remote-primitive.metadata.d.ts +6 -3
- package/common/metadata/remote-primitive.metadata.d.ts.map +1 -1
- package/common/metadata/resource.metadata.d.ts +3 -3
- package/common/metadata/skill.metadata.d.ts +1 -1
- package/common/metadata/tool.metadata.d.ts +1 -1
- package/common/metadata/worker.metadata.d.ts +69 -0
- package/common/metadata/worker.metadata.d.ts.map +1 -0
- package/common/metadata/worker.resolved.d.ts +4 -0
- package/common/metadata/worker.resolved.d.ts.map +1 -0
- package/common/metadata/workflow.metadata.d.ts +80 -16
- package/common/metadata/workflow.metadata.d.ts.map +1 -1
- package/common/records/event.record.d.ts +21 -0
- package/common/records/event.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 +1 -0
- package/common/schemas/annotated-class.schema.d.ts.map +1 -1
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/event.tokens.d.ts +9 -0
- package/common/tokens/event.tokens.d.ts.map +1 -0
- 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/workflow.tokens.d.ts +2 -0
- package/common/tokens/workflow.tokens.d.ts.map +1 -1
- package/common/types/options/logging/interfaces.d.ts +3 -1
- package/common/types/options/logging/interfaces.d.ts.map +1 -1
- package/common/types/options/observability/interfaces.d.ts +4 -2
- package/common/types/options/observability/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/interfaces.d.ts +3 -0
- package/common/types/options/transport/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/common/utils/auth-info.utils.d.ts +1 -0
- package/common/utils/auth-info.utils.d.ts.map +1 -1
- package/common/utils/global-config.utils.d.ts.map +1 -1
- package/common/utils/offset-cursor.utils.d.ts +5 -0
- package/common/utils/offset-cursor.utils.d.ts.map +1 -0
- package/common/utils/principal.utils.d.ts +26 -0
- package/common/utils/principal.utils.d.ts.map +1 -1
- package/common/utils/time-zone.utils.d.ts +3 -0
- package/common/utils/time-zone.utils.d.ts.map +1 -0
- package/context/frontmcp-context-storage.d.ts +3 -1
- package/context/frontmcp-context-storage.d.ts.map +1 -1
- package/context/frontmcp-context.d.ts +9 -1
- package/context/frontmcp-context.d.ts.map +1 -1
- package/direct/client.types.d.ts +8 -0
- package/direct/client.types.d.ts.map +1 -1
- package/direct/create.d.ts.map +1 -1
- package/direct/create.types.d.ts +3 -1
- package/direct/create.types.d.ts.map +1 -1
- package/direct/direct-events-transport.d.ts +20 -0
- package/direct/direct-events-transport.d.ts.map +1 -0
- package/direct/direct-server.d.ts +3 -0
- package/direct/direct-server.d.ts.map +1 -1
- package/direct/direct.types.d.ts +6 -0
- package/direct/direct.types.d.ts.map +1 -1
- package/duty/cron-schedule.d.ts +51 -0
- package/duty/cron-schedule.d.ts.map +1 -0
- package/duty/describe-thrown.d.ts +3 -0
- package/duty/describe-thrown.d.ts.map +1 -0
- package/duty/duty.lifecycle.d.ts +33 -4
- package/duty/duty.lifecycle.d.ts.map +1 -1
- package/duty/duty.runner.d.ts +49 -31
- package/duty/duty.runner.d.ts.map +1 -1
- package/duty/lazy-lease-store.d.ts +29 -0
- package/duty/lazy-lease-store.d.ts.map +1 -0
- package/duty/lease-holder.d.ts +73 -0
- package/duty/lease-holder.d.ts.map +1 -0
- package/duty/lease-store.d.ts +40 -0
- package/duty/lease-store.d.ts.map +1 -0
- package/elicitation/helpers/checked-elicit-answer.d.ts +10 -0
- package/elicitation/helpers/checked-elicit-answer.d.ts.map +1 -0
- package/elicitation/helpers/elicit.helper.d.ts.map +1 -1
- package/elicitation/hooks/elicitation.hooks.d.ts +5 -5
- package/elicitation/questions/question-subject.d.ts +8 -3
- package/elicitation/questions/question-subject.d.ts.map +1 -1
- package/elicitation/store/elicitation-encryption.d.ts.map +1 -1
- package/elicitation/store/encrypted-elicitation.store.d.ts +2 -2
- package/elicitation/store/encrypted-elicitation.store.d.ts.map +1 -1
- package/elicitation/store/storage-elicitation.store.d.ts +3 -3
- package/elicitation/store/storage-elicitation.store.d.ts.map +1 -1
- package/errors/auth-internal.errors.d.ts +1 -1
- package/errors/auth-internal.errors.d.ts.map +1 -1
- package/errors/duty.errors.d.ts +10 -0
- package/errors/duty.errors.d.ts.map +1 -1
- package/errors/error-handler.d.ts.map +1 -1
- package/errors/event.errors.d.ts +73 -0
- package/errors/event.errors.d.ts.map +1 -0
- package/errors/index.d.ts +7 -3
- package/errors/index.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +6 -1
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/misconfiguration.d.ts.map +1 -1
- package/errors/remote.errors.d.ts +1 -1
- package/errors/remote.errors.d.ts.map +1 -1
- package/errors/tool-ui.errors.d.ts +13 -0
- package/errors/tool-ui.errors.d.ts.map +1 -0
- package/errors/worker.errors.d.ts +7 -0
- package/errors/worker.errors.d.ts.map +1 -0
- package/errors/workflow.errors.d.ts +4 -0
- package/errors/workflow.errors.d.ts.map +1 -1
- package/esm/index.mjs +52 -47
- package/esm/job/tools/index.mjs +3 -2
- package/esm/workflow/tools/index.mjs +3 -2
- package/esm-loader/app-helpers.d.ts +4 -4
- package/esm-loader/app-helpers.d.ts.map +1 -1
- package/esm-loader/esm-entries.d.ts +11 -1
- package/esm-loader/esm-entries.d.ts.map +1 -1
- package/esm-loader/esm-manifest.d.ts +11 -8
- package/esm-loader/esm-manifest.d.ts.map +1 -1
- package/esm-loader/esm-module-loader.d.ts +6 -1
- package/esm-loader/esm-module-loader.d.ts.map +1 -1
- package/esm-loader/factories/esm-context-factories.d.ts +6 -3
- package/esm-loader/factories/esm-context-factories.d.ts.map +1 -1
- package/esm-loader/factories/esm-instance-factories.d.ts +3 -3
- package/esm-loader/factories/esm-instance-factories.d.ts.map +1 -1
- package/esm-loader/factories/esm-record-builders.d.ts.map +1 -1
- package/esm-loader/semver.utils.d.ts +8 -0
- package/esm-loader/semver.utils.d.ts.map +1 -1
- package/esm-loader/version-resolver.d.ts.map +1 -1
- package/event/delivery/event-metrics.d.ts +25 -0
- package/event/delivery/event-metrics.d.ts.map +1 -0
- package/event/delivery/event-outbox.d.ts +129 -0
- package/event/delivery/event-outbox.d.ts.map +1 -0
- package/event/event-channel.d.ts +21 -0
- package/event/event-channel.d.ts.map +1 -0
- package/event/event-dialect.d.ts +20 -0
- package/event/event-dialect.d.ts.map +1 -0
- package/event/event-gates.d.ts +23 -0
- package/event/event-gates.d.ts.map +1 -0
- package/event/event-outbound.d.ts +9 -0
- package/event/event-outbound.d.ts.map +1 -0
- package/event/event-publisher.d.ts +14 -0
- package/event/event-publisher.d.ts.map +1 -0
- package/event/event-reauthorization.d.ts +35 -0
- package/event/event-reauthorization.d.ts.map +1 -0
- package/event/event-scope.helper.d.ts +23 -0
- package/event/event-scope.helper.d.ts.map +1 -0
- package/event/event-subscriber.d.ts +12 -0
- package/event/event-subscriber.d.ts.map +1 -0
- package/event/event.instance.d.ts +15 -0
- package/event/event.instance.d.ts.map +1 -0
- package/event/event.registry.d.ts +97 -0
- package/event/event.registry.d.ts.map +1 -0
- package/event/event.utils.d.ts +6 -0
- package/event/event.utils.d.ts.map +1 -0
- package/event/flows/event-deliver.flow.d.ts +73 -0
- package/event/flows/event-deliver.flow.d.ts.map +1 -0
- package/event/flows/event-poll.flow.d.ts +105 -0
- package/event/flows/event-poll.flow.d.ts.map +1 -0
- package/event/flows/event-publish-http.flow.d.ts +114 -0
- package/event/flows/event-publish-http.flow.d.ts.map +1 -0
- package/event/flows/event-publish.flow.d.ts +109 -0
- package/event/flows/event-publish.flow.d.ts.map +1 -0
- package/event/flows/event-stream.flow.d.ts +78 -0
- package/event/flows/event-stream.flow.d.ts.map +1 -0
- package/event/flows/event-subscribe.flow.d.ts +132 -0
- package/event/flows/event-subscribe.flow.d.ts.map +1 -0
- package/event/flows/event-unsubscribe.flow.d.ts +71 -0
- package/event/flows/event-unsubscribe.flow.d.ts.map +1 -0
- package/event/flows/list-events.flow.d.ts +75 -0
- package/event/flows/list-events.flow.d.ts.map +1 -0
- package/event/index.d.ts +46 -0
- package/event/index.d.ts.map +1 -0
- package/event/poll/event-buffer.d.ts +54 -0
- package/event/poll/event-buffer.d.ts.map +1 -0
- package/event/poll/event-poll-leases.d.ts +63 -0
- package/event/poll/event-poll-leases.d.ts.map +1 -0
- package/event/publish-endpoint/event-publish-endpoint.d.ts +29 -0
- package/event/publish-endpoint/event-publish-endpoint.d.ts.map +1 -0
- package/event/publish-endpoint/event-publish-idempotency.d.ts +35 -0
- package/event/publish-endpoint/event-publish-idempotency.d.ts.map +1 -0
- package/event/replay/event-replays.d.ts +116 -0
- package/event/replay/event-replays.d.ts.map +1 -0
- package/event/stream/event-stream.d.ts +116 -0
- package/event/stream/event-stream.d.ts.map +1 -0
- package/event/stream/event-streams.d.ts +52 -0
- package/event/stream/event-streams.d.ts.map +1 -0
- package/event/subscription/event-callback-verifier.d.ts +58 -0
- package/event/subscription/event-callback-verifier.d.ts.map +1 -0
- package/event/subscription/event-subscription-store.factory.d.ts +31 -0
- package/event/subscription/event-subscription-store.factory.d.ts.map +1 -0
- package/event/subscription/event-subscription-termination.d.ts +25 -0
- package/event/subscription/event-subscription-termination.d.ts.map +1 -0
- package/event/subscription/event-subscription.store.d.ts +131 -0
- package/event/subscription/event-subscription.store.d.ts.map +1 -0
- package/event/subscription/event-subscriptions.d.ts +66 -0
- package/event/subscription/event-subscriptions.d.ts.map +1 -0
- package/event-client/event-client.errors.d.ts +35 -0
- package/event-client/event-client.errors.d.ts.map +1 -0
- package/event-client/event-webhook-receiver.d.ts +75 -0
- package/event-client/event-webhook-receiver.d.ts.map +1 -0
- package/event-client/events-client.d.ts +33 -0
- package/event-client/events-client.d.ts.map +1 -0
- package/event-client/events-client.types.d.ts +74 -0
- package/event-client/events-client.types.d.ts.map +1 -0
- package/event-client/index.d.ts +6 -0
- package/event-client/index.d.ts.map +1 -0
- package/ext-apps/ext-apps.handler.d.ts +2 -1
- package/ext-apps/ext-apps.handler.d.ts.map +1 -1
- package/flows/flow.http-path.d.ts +8 -0
- package/flows/flow.http-path.d.ts.map +1 -1
- package/flows/flow.instance.d.ts +9 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/authorities-rules.check.d.ts +5 -0
- package/front-mcp/authorities-rules.check.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +2 -0
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/session-secret.check.d.ts +19 -0
- package/front-mcp/session-secret.check.d.ts.map +1 -0
- package/http-route/http-route.table.d.ts.map +1 -1
- package/index.d.ts +74 -4
- package/index.d.ts.map +1 -1
- package/index.js +59 -54
- package/job/execution/job-execution.manager.d.ts +16 -4
- package/job/execution/job-execution.manager.d.ts.map +1 -1
- package/job/flows/execute-job.flow.d.ts +1 -0
- package/job/flows/execute-job.flow.d.ts.map +1 -1
- package/job/job-attempt.d.ts +7 -2
- package/job/job-attempt.d.ts.map +1 -1
- package/job/job-context-providers.d.ts +2 -2
- package/job/job-context-providers.d.ts.map +1 -1
- package/job/job-scope.helper.d.ts +26 -0
- package/job/job-scope.helper.d.ts.map +1 -1
- package/job/job.registry.d.ts +11 -0
- package/job/job.registry.d.ts.map +1 -1
- package/job/store/job-state.interface.d.ts +2 -0
- package/job/store/job-state.interface.d.ts.map +1 -1
- package/job/store/memory-job-state.store.d.ts +1 -0
- package/job/store/memory-job-state.store.d.ts.map +1 -1
- package/job/store/redis-job-state.store.d.ts +3 -0
- package/job/store/redis-job-state.store.d.ts.map +1 -1
- package/job/store/storage-job-state.store.d.ts +1 -0
- package/job/store/storage-job-state.store.d.ts.map +1 -1
- package/job/tools/index.d.ts +1 -0
- package/job/tools/index.d.ts.map +1 -1
- package/job/tools/index.js +4 -2
- package/job/tools/list-jobs.tool.d.ts +3 -3
- package/job/tools/list-jobs.tool.d.ts.map +1 -1
- package/job/tools/update-job.tool.d.ts +16 -0
- package/job/tools/update-job.tool.d.ts.map +1 -0
- package/logger/instances/instance.logger.d.ts +1 -0
- package/logger/instances/instance.logger.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 +40 -4
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +11 -10
- package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
- package/provider/create-container.d.ts +14 -4
- package/provider/create-container.d.ts.map +1 -1
- package/provider/provider.lifecycle.d.ts +11 -1
- package/provider/provider.lifecycle.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +18 -4
- package/provider/provider.registry.d.ts.map +1 -1
- package/remote-mcp/factories/instance-factories.d.ts +4 -4
- package/remote-mcp/factories/instance-factories.d.ts.map +1 -1
- package/remote-mcp/factories/record-builders.d.ts.map +1 -1
- package/remote-mcp/mcp-client.service.d.ts +11 -0
- package/remote-mcp/mcp-client.service.d.ts.map +1 -1
- package/remote-mcp/mcp-client.types.d.ts +15 -2
- package/remote-mcp/mcp-client.types.d.ts.map +1 -1
- package/remote-mcp/mcp-stateless-client.adapter.d.ts +1 -1
- package/remote-mcp/mcp-stateless-client.adapter.d.ts.map +1 -1
- package/remote-mcp/remote-entries.d.ts +2 -1
- package/remote-mcp/remote-entries.d.ts.map +1 -1
- package/remote-mcp/remote-oauth.d.ts +27 -0
- package/remote-mcp/remote-oauth.d.ts.map +1 -0
- package/remote-mcp/remote-request-headers.d.ts +8 -2
- package/remote-mcp/remote-request-headers.d.ts.map +1 -1
- package/remote-mcp/resilience/circuit-breaker.d.ts +3 -2
- package/remote-mcp/resilience/circuit-breaker.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
- package/resource/flows/resources-list.flow.d.ts.map +1 -1
- package/scope/event-publisher.providers.d.ts +17 -0
- package/scope/event-publisher.providers.d.ts.map +1 -0
- package/scope/observability-scope.helper.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +41 -2
- package/scope/scope.instance.d.ts.map +1 -1
- package/shared/shared-attach.d.ts +3 -1
- package/shared/shared-attach.d.ts.map +1 -1
- package/shared/shared-server.lifecycle.d.ts +14 -5
- package/shared/shared-server.lifecycle.d.ts.map +1 -1
- package/skill/errors/tool-not-allowed.error.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/guards/tool-authorization.guard.d.ts +1 -1
- package/skill/guards/tool-authorization.guard.d.ts.map +1 -1
- package/skill/hooks/skill-tool.hook.d.ts +2 -0
- package/skill/hooks/skill-tool.hook.d.ts.map +1 -1
- package/skill/providers/external-skill.provider.d.ts +2 -2
- package/skill/providers/external-skill.provider.d.ts.map +1 -1
- package/skill/session/skill-session-store.interface.d.ts +5 -0
- package/skill/session/skill-session-store.interface.d.ts.map +1 -1
- package/skill/session/skill-session.manager.d.ts +4 -0
- package/skill/session/skill-session.manager.d.ts.map +1 -1
- package/skill/session/skill-session.types.d.ts +1 -1
- package/skill/skill-authorities.helper.d.ts +6 -3
- package/skill/skill-authorities.helper.d.ts.map +1 -1
- package/skill/skill-instructions.helper.d.ts +10 -4
- package/skill/skill-instructions.helper.d.ts.map +1 -1
- package/skill/skill-scope.helper.d.ts +5 -0
- package/skill/skill-scope.helper.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +7 -0
- package/skill/skill.registry.d.ts.map +1 -1
- package/subsystems.d.ts +3 -2
- package/subsystems.d.ts.map +1 -1
- package/surface/entry-authorized.d.ts +5 -0
- package/surface/entry-authorized.d.ts.map +1 -0
- package/tool/flows/call-tool.flow.d.ts +6 -0
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts +1 -12
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.utils.d.ts.map +1 -1
- package/tool/ui/serving-mode-default.d.ts +6 -2
- package/tool/ui/serving-mode-default.d.ts.map +1 -1
- package/tool/ui/ui-option-warnings.d.ts.map +1 -1
- package/tool/ui/ui-render.d.ts +2 -2
- package/tool/ui/ui-render.d.ts.map +1 -1
- package/tool/ui/ui-resource.handler.d.ts +10 -2
- package/tool/ui/ui-resource.handler.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts +31 -5
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/tool/ui/widget-routes.d.ts +38 -0
- package/tool/ui/widget-routes.d.ts.map +1 -0
- package/tool/ui/widget-serving.d.ts +37 -0
- package/tool/ui/widget-serving.d.ts.map +1 -0
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/build-scoped-server-options.d.ts.map +1 -1
- package/transport/flows/handle.mcp-20260728.flow.d.ts +8 -2
- package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts.map +1 -1
- package/transport/mcp-20260728/client/mcp-stateless.client.d.ts +2 -0
- package/transport/mcp-20260728/client/mcp-stateless.client.d.ts.map +1 -1
- package/transport/mcp-20260728/discover.d.ts.map +1 -1
- package/transport/mcp-20260728/event-stream-response.d.ts +12 -0
- package/transport/mcp-20260728/event-stream-response.d.ts.map +1 -0
- package/transport/mcp-20260728/index.d.ts +1 -0
- package/transport/mcp-20260728/index.d.ts.map +1 -1
- package/transport/mcp-20260728/protocol-20260728.constants.d.ts.map +1 -1
- package/transport/mcp-20260728/request-validation.d.ts +2 -0
- package/transport/mcp-20260728/request-validation.d.ts.map +1 -1
- package/transport/mcp-handlers/events-list-request.handler.d.ts +5 -0
- package/transport/mcp-handlers/events-list-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/events-poll-request.handler.d.ts +5 -0
- package/transport/mcp-handlers/events-poll-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/events-stream-request.handler.d.ts +8 -0
- package/transport/mcp-handlers/events-stream-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/events-subscribe-request.handler.d.ts +5 -0
- package/transport/mcp-handlers/events-subscribe-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/events-unsubscribe-request.handler.d.ts +5 -0
- package/transport/mcp-handlers/events-unsubscribe-request.handler.d.ts.map +1 -0
- package/transport/mcp-handlers/index.d.ts +162 -3
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
- package/transport/stdio-revision-router.d.ts +2 -0
- package/transport/stdio-revision-router.d.ts.map +1 -1
- package/transport/web-fetch-handler.d.ts.map +1 -1
- package/utils/abort.utils.d.ts +5 -0
- package/utils/abort.utils.d.ts.map +1 -1
- package/worker/worker.lifecycle.d.ts +63 -0
- package/worker/worker.lifecycle.d.ts.map +1 -0
- package/worker/worker.supervisor.d.ts +62 -0
- package/worker/worker.supervisor.d.ts.map +1 -0
- package/workflow/engine/workflow.engine.d.ts +8 -1
- package/workflow/engine/workflow.engine.d.ts.map +1 -1
- package/workflow/tools/execute-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/index.d.ts +1 -0
- package/workflow/tools/index.d.ts.map +1 -1
- package/workflow/tools/index.js +4 -2
- package/workflow/tools/list-workflows.tool.d.ts.map +1 -1
- package/workflow/tools/register-workflow.tool.d.ts +2 -1
- package/workflow/tools/register-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/update-workflow.tool.d.ts +21 -0
- package/workflow/tools/update-workflow.tool.d.ts.map +1 -0
- package/workflow/trigger/workflow-events.d.ts +22 -0
- package/workflow/trigger/workflow-events.d.ts.map +1 -0
- package/workflow/trigger/workflow-schedules.d.ts +76 -0
- package/workflow/trigger/workflow-schedules.d.ts.map +1 -0
- package/workflow/trigger/workflow-triggers.d.ts +49 -0
- package/workflow/trigger/workflow-triggers.d.ts.map +1 -0
- package/workflow/trigger/workflow-webhook.routes.d.ts +16 -0
- package/workflow/trigger/workflow-webhook.routes.d.ts.map +1 -0
- package/workflow/trigger/workflow-webhook.signature.d.ts +41 -0
- package/workflow/trigger/workflow-webhook.signature.d.ts.map +1 -0
- package/workflow/workflow.registry.d.ts +11 -0
- package/workflow/workflow.registry.d.ts.map +1 -1
- package/workflow/workflow.utils.d.ts +7 -0
- package/workflow/workflow.utils.d.ts.map +1 -1
package/esm/job/tools/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// <stdin>
|
|
2
|
-
import { CancelJobTool, ExecuteJobTool, GetJobStatusTool, ListJobsTool, RegisterJobTool, RemoveJobTool } from "@frontmcp/sdk";
|
|
2
|
+
import { CancelJobTool, ExecuteJobTool, GetJobStatusTool, ListJobsTool, RegisterJobTool, RemoveJobTool, UpdateJobTool } from "@frontmcp/sdk";
|
|
3
3
|
export {
|
|
4
4
|
CancelJobTool,
|
|
5
5
|
ExecuteJobTool,
|
|
6
6
|
GetJobStatusTool,
|
|
7
7
|
ListJobsTool,
|
|
8
8
|
RegisterJobTool,
|
|
9
|
-
RemoveJobTool
|
|
9
|
+
RemoveJobTool,
|
|
10
|
+
UpdateJobTool
|
|
10
11
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// <stdin>
|
|
2
|
-
import { ExecuteWorkflowTool, GetWorkflowStatusTool, ListWorkflowsTool, RegisterWorkflowTool, RemoveWorkflowTool } from "@frontmcp/sdk";
|
|
2
|
+
import { ExecuteWorkflowTool, GetWorkflowStatusTool, ListWorkflowsTool, RegisterWorkflowTool, RemoveWorkflowTool, UpdateWorkflowTool } from "@frontmcp/sdk";
|
|
3
3
|
export {
|
|
4
4
|
ExecuteWorkflowTool,
|
|
5
5
|
GetWorkflowStatusTool,
|
|
6
6
|
ListWorkflowsTool,
|
|
7
7
|
RegisterWorkflowTool,
|
|
8
|
-
RemoveWorkflowTool
|
|
8
|
+
RemoveWorkflowTool,
|
|
9
|
+
UpdateWorkflowTool
|
|
9
10
|
};
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
* export default class Server {}
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
import type { RemoteAppMetadata } from '../common/metadata/app.metadata';
|
|
24
|
-
import type { EsmAppOptions, RemoteUrlAppOptions } from '../common/metadata/app.metadata';
|
|
23
|
+
import type { EsmAppOptions, RemoteAppMetadata, RemoteUrlAppOptions } from '../common/metadata/app.metadata';
|
|
25
24
|
export type { EsmAppOptions, RemoteUrlAppOptions } from '../common/metadata/app.metadata';
|
|
26
25
|
export type { PackageLoader } from '../common/metadata/app.metadata';
|
|
27
26
|
export type { AppFilterConfig, PrimitiveFilterMap } from '../common/metadata/app-filter.metadata';
|
|
@@ -39,8 +38,9 @@ export type { AppFilterConfig, PrimitiveFilterMap } from '../common/metadata/app
|
|
|
39
38
|
*/
|
|
40
39
|
export declare const app: {
|
|
41
40
|
/**
|
|
42
|
-
* Declare an npm package to load at runtime.
|
|
43
|
-
*
|
|
41
|
+
* Declare an npm package to load at runtime, as `App.esm()` does: every kind of entry it exports (tools, resources,
|
|
42
|
+
* prompts, skills, agents, jobs, workflows, and the providers they use) is served as a local `@App`'s is.
|
|
43
|
+
* The package exports a default `@App` or `@FrontMcp` class, a manifest, or named exports of entries.
|
|
44
44
|
*
|
|
45
45
|
* @param specifier - npm package specifier (e.g., '@acme/tools@^1.0.0')
|
|
46
46
|
* @param options - Optional per-app overrides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-helpers.d.ts","sourceRoot":"","sources":["../../src/esm-loader/app-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"app-helpers.d.ts","sourceRoot":"","sources":["../../src/esm-loader/app-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAG7G,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAMlG;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG;IACd;;;;;;;;OAQG;8BACY,MAAM,YAAY,aAAa,KAAG,iBAAiB;IAmClE;;;;;;;OAOG;2BACS,MAAM,YAAY,mBAAmB,KAAG,iBAAiB;CAwB7D,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { type FrontMcpLogger, type PackageLoader, type PromptEsmRecord, type PromptEsmTargetRecord, type PromptRecord, type ResourceEsmRecord, type ResourceEsmTargetRecord, type ResourceRecord, type ScopeEntry, type ToolEsmRecord, type ToolEsmTargetRecord, type ToolRecord } from '../common';
|
|
1
|
+
import { type FrontMcpLogger, type PackageLoader, type PromptEsmRecord, type PromptEsmTargetRecord, type PromptRecord, type ResourceEsmRecord, type ResourceEsmTargetRecord, type ResourceRecord, type ScopeEntry, type SkillRecord, type ToolEsmRecord, type ToolEsmTargetRecord, type ToolRecord } from '../common';
|
|
2
2
|
import { type EsmRegistryAuth } from './esm-auth.types';
|
|
3
3
|
import { EsmModuleLoader } from './esm-module-loader';
|
|
4
4
|
/** The registry auth a `PackageLoader` resolves package versions with. */
|
|
5
5
|
export declare function registryAuthOf(loader?: PackageLoader): EsmRegistryAuth | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The loader an entry uses: the server's, with the fields the entry's own loader sets in place of the server's.
|
|
8
|
+
* A token is taken as a whole: an entry that sets `token` or `tokenEnvVar` gets neither of the server's.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergePackageLoaders(serverLoader?: PackageLoader, entryLoader?: PackageLoader): PackageLoader | undefined;
|
|
6
11
|
/**
|
|
7
12
|
* A module loader for packages fetched through `loader` (the registry and bundle CDN), cached for `cacheTTL` ms,
|
|
8
13
|
* with the imports `importMap` names rewritten.
|
|
@@ -19,6 +24,11 @@ export declare function esmToolRecord(raw: unknown, namespace?: string): ToolRec
|
|
|
19
24
|
export declare function esmResourceRecord(raw: unknown, namespace?: string): ResourceRecord | undefined;
|
|
20
25
|
/** The record of a manifest's prompt export, its name prefixed by `namespace` when given. */
|
|
21
26
|
export declare function esmPromptRecord(raw: unknown, namespace?: string): PromptRecord | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The record of a manifest's skill export: a `@Skill` class, a `skill()` result, or a plain
|
|
29
|
+
* `{ name, description, instructions }` object, checked as `skill()` checks it. Anything else is not a skill, and throws.
|
|
30
|
+
*/
|
|
31
|
+
export declare function esmSkillRecord(raw: unknown): SkillRecord;
|
|
22
32
|
/** The records of a manifest's exports of one kind; exports that are not entries of that kind are skipped. */
|
|
23
33
|
export declare function esmManifestRecords<R>(exported: unknown[] | undefined, recordOf: (raw: unknown) => R | undefined): R[];
|
|
24
34
|
/** The tools a `Tool.esm()` entry or a package specifier string in `tools` names. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-entries.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-entries.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"esm-entries.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-entries.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,UAAU,EAEf,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAQnB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAsB,MAAM,qBAAqB,CAAC;AAI1E,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,SAAS,CAIlF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,CAAC,EAAE,aAAa,EAC5B,WAAW,CAAC,EAAE,aAAa,GAC1B,aAAa,GAAG,SAAS,CAK3B;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IACjD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,GAAG,eAAe,CAQlB;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAUtF;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAQ9F;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAQ1F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAGxD;AAED,8GAA8G;AAC9G,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,CAAC,GAAG,SAAS,GAAG,CAAC,EAAE,CAErH;AAkDD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,aAAa,GAAG,mBAAmB,GAC1C,OAAO,CAAC,UAAU,EAAE,CAAC,CAEvB;AAED,mDAAmD;AACnD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,iBAAiB,GAAG,uBAAuB,GAClD,OAAO,CAAC,cAAc,EAAE,CAAC,CAI3B;AAED,+CAA+C;AAC/C,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,eAAe,GAAG,qBAAqB,GAC9C,OAAO,CAAC,YAAY,EAAE,CAAC,CAEzB"}
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
* Defines the contract that npm packages must follow to be loadable by FrontMCP.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The manifest that ESM packages export to declare their MCP primitives.
|
|
7
|
+
* The manifest that ESM packages export to declare their MCP primitives. An `App.esm()` app serves every kind as a
|
|
8
|
+
* local `@App` serves it.
|
|
8
9
|
*
|
|
9
10
|
* Package authors export this as the default export of their package:
|
|
10
11
|
* ```typescript
|
|
11
12
|
* export default {
|
|
12
13
|
* name: '@acme/mcp-tools',
|
|
13
14
|
* version: '1.0.0',
|
|
15
|
+
* providers: [IssueStore],
|
|
14
16
|
* tools: [SearchTool, CreateIssueTool],
|
|
15
|
-
* skills: [{ name: 'triage',
|
|
17
|
+
* skills: [{ name: 'triage', description: 'Triage an issue', instructions: 'Search, then label it.' }],
|
|
18
|
+
* jobs: [ReindexJob],
|
|
16
19
|
* } satisfies FrontMcpPackageManifest;
|
|
17
20
|
* ```
|
|
18
21
|
*/
|
|
@@ -29,15 +32,15 @@ export interface FrontMcpPackageManifest {
|
|
|
29
32
|
prompts?: unknown[];
|
|
30
33
|
/** Resource classes or function-style resources */
|
|
31
34
|
resources?: unknown[];
|
|
32
|
-
/** Skill
|
|
35
|
+
/** `@Skill` classes, `skill()` results, or `{ name, description, instructions, tools? }` objects */
|
|
33
36
|
skills?: unknown[];
|
|
34
|
-
/** Agent classes or
|
|
37
|
+
/** `@Agent` classes or `agent()` functions */
|
|
35
38
|
agents?: unknown[];
|
|
36
|
-
/** Job classes or
|
|
39
|
+
/** `@Job` classes or `job()` functions; they join the server's job system */
|
|
37
40
|
jobs?: unknown[];
|
|
38
|
-
/** Workflow classes or
|
|
41
|
+
/** `@Workflow` classes or `workflow()` values, whose steps name the jobs they run */
|
|
39
42
|
workflows?: unknown[];
|
|
40
|
-
/**
|
|
43
|
+
/** Providers the package's own entries inject, registered for each loaded version */
|
|
41
44
|
providers?: unknown[];
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
@@ -68,7 +71,7 @@ export type ManifestPrimitiveKey = (typeof MANIFEST_PRIMITIVE_KEYS)[number];
|
|
|
68
71
|
*
|
|
69
72
|
* Handles five formats:
|
|
70
73
|
* 1. A plain manifest object with tools/prompts/etc arrays
|
|
71
|
-
* 2. A class decorated with @FrontMcp (
|
|
74
|
+
* 2. A class decorated with @App or @FrontMcp (its entries, and those of a @FrontMcp server's @App classes)
|
|
72
75
|
* 3. A module with named exports (tools, prompts, etc. arrays)
|
|
73
76
|
* 4. A single default export of a decorated primitive class (@Tool, @Resource, etc.)
|
|
74
77
|
* 5. Named exports of individual decorated classes (scanned and grouped by type)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-manifest.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"esm-manifest.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,oGAAoG;IACpG,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;gCAYxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,kGAS1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,OAAO,GAAG,uBAAuB,CA6DjF"}
|
|
@@ -38,7 +38,7 @@ export interface EsmModuleLoaderOptions {
|
|
|
38
38
|
timeout?: number;
|
|
39
39
|
/** Logger instance */
|
|
40
40
|
logger?: FrontMcpLogger;
|
|
41
|
-
/** Custom ESM CDN base URL */
|
|
41
|
+
/** Custom ESM CDN base URL; bundle downloads from it carry the `registryAuth` token */
|
|
42
42
|
esmBaseUrl?: string;
|
|
43
43
|
/** Import map: the bundle's imports of these specifiers are rewritten to their targets */
|
|
44
44
|
importMap?: Record<string, string>;
|
|
@@ -57,6 +57,7 @@ export interface EsmModuleLoaderOptions {
|
|
|
57
57
|
export declare class EsmModuleLoader {
|
|
58
58
|
private readonly cache;
|
|
59
59
|
private readonly versionResolver;
|
|
60
|
+
private readonly registryAuth?;
|
|
60
61
|
private readonly timeout;
|
|
61
62
|
private readonly logger?;
|
|
62
63
|
private readonly esmBaseUrl?;
|
|
@@ -86,6 +87,10 @@ export declare class EsmModuleLoader {
|
|
|
86
87
|
*/
|
|
87
88
|
private fetchAndCache;
|
|
88
89
|
private fetchAndImport;
|
|
90
|
+
/** Where bundles are downloaded from: the loader `url`, else esm.sh. */
|
|
91
|
+
private get bundleServer();
|
|
92
|
+
/** The token goes with a bundle download from the configured loader `url`, never to the default esm.sh. */
|
|
93
|
+
private bundleHeaders;
|
|
89
94
|
/**
|
|
90
95
|
* Import a bundle from a local file path (Node.js only).
|
|
91
96
|
* Uses dynamic import with file:// URL for cross-platform compatibility.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-module-loader.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-module-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"esm-module-loader.d.ts","sourceRoot":"","sources":["../../src/esm-loader/esm-module-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAKL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAG7B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,QAAQ,EAAE,uBAAuB,CAAC;IAClC,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,KAAK,EAAE,eAAe,CAAC;IACvB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAkB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;gBAEvC,OAAO,EAAE,sBAAsB;IAa3C;;;;;OAKG;IACG,IAAI,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC;IAoBrE,0GAA0G;IAC1G,OAAO,CAAC,cAAc;IAOtB,6FAA6F;IAC7F,OAAO,CAAC,UAAU;IAQlB;;OAEG;IACG,cAAc,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxE;;OAEG;YACW,aAAa;IA0C3B;;OAEG;YACW,aAAa;YAab,cAAc;IAiE5B,wEAAwE;IACxE,OAAO,KAAK,YAAY,GAEvB;IAED,2GAA2G;IAC3G,OAAO,CAAC,aAAa;IAKrB;;;OAGG;YACW,cAAc;IAc5B;;;OAGG;YACW,YAAY;IAW1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;OAEG;YACW,eAAe;CAsC9B"}
|
|
@@ -13,15 +13,18 @@ import { PromptContext, ResourceContext, ToolContext, type ToolInputType, type T
|
|
|
13
13
|
* Handler type for ESM tool execution.
|
|
14
14
|
* This is the execute function exported by the ESM package.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
/** A plain-object tool's `execute`; `context` is the call's tool context, whose `get()` resolves the package's providers. */
|
|
17
|
+
export type EsmToolExecuteHandler = (input: Record<string, unknown>, context: ToolContext<ToolInputType, ToolOutputType, unknown, CallToolResult>) => Promise<CallToolResult>;
|
|
17
18
|
/**
|
|
18
19
|
* Handler type for ESM resource reading.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
/** A plain-object resource's `read`; `context` is the read's resource context. */
|
|
22
|
+
export type EsmResourceReadHandler = (uri: string, params: Record<string, string>, context: ResourceContext) => Promise<ReadResourceResult>;
|
|
21
23
|
/**
|
|
22
24
|
* Handler type for ESM prompt execution.
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
/** A plain-object prompt's `execute`; `context` is the request's prompt context. */
|
|
27
|
+
export type EsmPromptExecuteHandler = (args: Record<string, string>, context: PromptContext) => Promise<GetPromptResult>;
|
|
25
28
|
/**
|
|
26
29
|
* Creates an ESM tool context class that executes locally in-process.
|
|
27
30
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-context-factories.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-context-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpH;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"esm-context-factories.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-context-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpH;;;GAGG;AACH,6HAA6H;AAC7H,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,CAAC,KACzE,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B;;GAEG;AACH,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,CACnC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,EAAE,eAAe,KACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC;;GAEG;AACH,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,CACpC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,aAAa,KACnB,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,qBAAqB,EAChC,QAAQ,EAAE,MAAM,GACf,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAW3E;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1G,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,MAAM,GACnB,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAUnD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,uBAAuB,EAClC,UAAU,EAAE,MAAM,GACjB,IAAI,CAAC,aAAa,CAAC,CAUrB"}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* entities to use the same hook lifecycle and registry infrastructure as local entities.
|
|
8
8
|
*/
|
|
9
9
|
import type { EntryOwnerRef } from '../../common';
|
|
10
|
+
import { PromptInstance } from '../../prompt/prompt.instance';
|
|
10
11
|
import type ProviderRegistry from '../../provider/provider.registry';
|
|
11
|
-
import { ToolInstance } from '../../tool/tool.instance';
|
|
12
12
|
import { ResourceInstance } from '../../resource/resource.instance';
|
|
13
|
-
import {
|
|
14
|
-
import type
|
|
13
|
+
import { ToolInstance } from '../../tool/tool.instance';
|
|
14
|
+
import { type EsmPromptDefinition, type EsmResourceDefinition, type EsmToolDefinition } from './esm-record-builders';
|
|
15
15
|
/**
|
|
16
16
|
* Create a standard ToolInstance for an ESM-loaded tool.
|
|
17
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-instance-factories.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-instance-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"esm-instance-factories.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-instance-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,EACvB,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,aAAa,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,YAAY,CAGd;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,qBAAqB,EAC/B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,aAAa,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,gBAAgB,CAGlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,aAAa,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm-record-builders.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-record-builders.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"esm-record-builders.d.ts","sourceRoot":"","sources":["../../../src/esm-loader/factories/esm-record-builders.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAIL,KAAK,sBAAsB,EAG3B,KAAK,wBAAwB,EAG7B,KAAK,oBAAoB,EAG1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAIL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC9E,OAAO,EAAE,uBAAuB,CAAC;CAClC;AAUD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAoCpG;AAkCD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAiBpH;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAqB5G"}
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
* @description Thin wrapper around the `semver` package for version comparison utilities.
|
|
4
4
|
* Isolates the semver dependency to a single file for easier maintenance.
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a range string is a dist-tag (not a semver range).
|
|
8
|
+
* Dist-tags like 'next', 'beta', 'canary' are simple alphanumeric identifiers
|
|
9
|
+
* that are not valid semver ranges.
|
|
10
|
+
* `latest` counts as one; callers that read it as "the highest version" check for it first.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isDistTag(range: string): boolean;
|
|
6
13
|
/**
|
|
7
14
|
* Check if a specific version satisfies a semver range.
|
|
8
15
|
*
|
|
@@ -13,6 +20,7 @@
|
|
|
13
20
|
export declare function satisfiesRange(version: string, range: string): boolean;
|
|
14
21
|
/**
|
|
15
22
|
* Find the highest version in a list that satisfies a semver range.
|
|
23
|
+
* `latest` is the highest version that isn't a prerelease; a dist-tag can't be read from a version list.
|
|
16
24
|
*
|
|
17
25
|
* @param versions - Array of version strings
|
|
18
26
|
* @param range - Semver range to match against
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semver.utils.d.ts","sourceRoot":"","sources":["../../src/esm-loader/semver.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"semver.utils.d.ts","sourceRoot":"","sources":["../../src/esm-loader/semver.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAE9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-resolver.d.ts","sourceRoot":"","sources":["../../src/esm-loader/version-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAkB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,CAAC,EAAE,sBAAsB;IAK5C;;;;;;;OAOG;IACG,OAAO,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;YASpE,eAAe;IAmD7B;;OAEG;IACH,OAAO,CAAC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"version-resolver.d.ts","sourceRoot":"","sources":["../../src/esm-loader/version-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAkB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,CAAC,EAAE,sBAAsB;IAK5C;;;;;;;OAOG;IACG,OAAO,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;YASpE,eAAe;IAmD7B;;OAEG;IACH,OAAO,CAAC,uBAAuB;CAqDhC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MetricsOptionsInterface } from '../../common/types/options/metrics';
|
|
2
|
+
/** The `/metrics` counters of event publishing and delivery, labelled `event`. */
|
|
3
|
+
export declare const EVENT_COUNTERS: {
|
|
4
|
+
readonly published: "frontmcp_events_published_total";
|
|
5
|
+
readonly matched: "frontmcp_events_matched_total";
|
|
6
|
+
readonly delivered: "frontmcp_events_delivered_total";
|
|
7
|
+
readonly retried: "frontmcp_events_retried_total";
|
|
8
|
+
readonly abandoned: "frontmcp_events_abandoned_total";
|
|
9
|
+
readonly dropped: "frontmcp_events_dropped_total";
|
|
10
|
+
readonly suspended: "frontmcp_events_suspended_total";
|
|
11
|
+
readonly terminated: "frontmcp_events_terminated_total";
|
|
12
|
+
readonly notified: "frontmcp_events_channel_notified_total";
|
|
13
|
+
};
|
|
14
|
+
export type EventCounter = keyof typeof EVENT_COUNTERS;
|
|
15
|
+
type CounterFactory = (name: string, description?: string) => {
|
|
16
|
+
inc(by?: number, attributes?: Record<string, string>): void;
|
|
17
|
+
};
|
|
18
|
+
/** Counts what happens to published events. */
|
|
19
|
+
export interface EventMetrics {
|
|
20
|
+
count(counter: EventCounter, eventName: string, by?: number): void;
|
|
21
|
+
}
|
|
22
|
+
/** The event counters of a server: recorded when `/metrics` is on, otherwise ignored. */
|
|
23
|
+
export declare function createEventMetrics(metrics: Pick<MetricsOptionsInterface, 'enabled'> | undefined, loadFactory?: () => CounterFactory): EventMetrics;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=event-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-metrics.d.ts","sourceRoot":"","sources":["../../../src/event/delivery/event-metrics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAElF,kFAAkF;AAClF,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAC;AAevD,KAAK,cAAc,GAAG,CACpB,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,KACjB;IAAE,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC;AAErE,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpE;AAED,yFAAyF;AACzF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG,SAAS,EAC7D,WAAW,GAAE,MAAM,cAAmC,GACrD,YAAY,CAQd"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { EventDeliveryErrorCategory } from '@frontmcp/protocol';
|
|
2
|
+
import { type NamespacedStorage } from '@frontmcp/utils';
|
|
3
|
+
import { type FrontMcpLogger } from '../../common';
|
|
4
|
+
import { type EventsConfig } from '../../common/metadata/event.metadata';
|
|
5
|
+
import { type EventMetrics } from './event-metrics';
|
|
6
|
+
/** What a delivery carries: an occurrence of an event, or an envelope: the subscription ended, or events were skipped. */
|
|
7
|
+
export type EventDeliveryKind = 'event' | 'terminated' | 'gap';
|
|
8
|
+
/** The callback and secrets of a delivery whose subscription is no longer stored. */
|
|
9
|
+
export interface EventDeliveryTarget {
|
|
10
|
+
url: string;
|
|
11
|
+
secret: string;
|
|
12
|
+
previousSecret?: string;
|
|
13
|
+
previousSecretUntil?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface EventDeliveryRecord {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: EventDeliveryKind;
|
|
18
|
+
subscriptionId: string;
|
|
19
|
+
eventName: string;
|
|
20
|
+
/** The body, serialized once: these exact bytes are signed and sent on every attempt. */
|
|
21
|
+
body: string;
|
|
22
|
+
/** The `webhook-id`, the same on every attempt. */
|
|
23
|
+
webhookId: string;
|
|
24
|
+
/** How many attempts were made. */
|
|
25
|
+
attempt: number;
|
|
26
|
+
nextAttemptAt: number;
|
|
27
|
+
firstAttemptAt: number;
|
|
28
|
+
/** The process that holds the delivery until `leaseUntil`. */
|
|
29
|
+
leaseOwner: string;
|
|
30
|
+
leaseUntil: number;
|
|
31
|
+
/** Set for a `terminated` envelope, whose subscription was removed before it is sent. */
|
|
32
|
+
target?: EventDeliveryTarget;
|
|
33
|
+
}
|
|
34
|
+
/** What `enqueue` takes: the outbox adds the id, the attempt count, the times and the lease. */
|
|
35
|
+
export type NewEventDelivery = Pick<EventDeliveryRecord, 'kind' | 'subscriptionId' | 'eventName' | 'body' | 'webhookId' | 'target'>;
|
|
36
|
+
export type EventDeliveryOutcome = {
|
|
37
|
+
result: 'delivered';
|
|
38
|
+
} | {
|
|
39
|
+
result: 'dropped';
|
|
40
|
+
reason: 'gone' | 'refused';
|
|
41
|
+
} | {
|
|
42
|
+
result: 'failed';
|
|
43
|
+
category: EventDeliveryErrorCategory;
|
|
44
|
+
} | {
|
|
45
|
+
result: 'waiting';
|
|
46
|
+
};
|
|
47
|
+
export interface EventOutboxOptions {
|
|
48
|
+
/** The storage of the subscription store: the outbox keeps its records under `outbox:`. */
|
|
49
|
+
storage: NamespacedStorage;
|
|
50
|
+
/** Encrypts each record, as the subscription store does. */
|
|
51
|
+
secret?: string;
|
|
52
|
+
/** Whether the storage outlives the process: only then can another process finish a delivery. */
|
|
53
|
+
durable: boolean;
|
|
54
|
+
settings: EventsConfig['webhook']['delivery'];
|
|
55
|
+
/** Makes one attempt of a delivery. */
|
|
56
|
+
attempt: (delivery: EventDeliveryRecord) => Promise<EventDeliveryOutcome>;
|
|
57
|
+
metrics: EventMetrics;
|
|
58
|
+
logger: FrontMcpLogger;
|
|
59
|
+
/** @default Math.random */
|
|
60
|
+
random?: () => number;
|
|
61
|
+
}
|
|
62
|
+
/** How often deliveries another process left behind are looked for. */
|
|
63
|
+
export declare const OUTBOX_SWEEP_INTERVAL_MS = 30000;
|
|
64
|
+
/**
|
|
65
|
+
* The handoff from publishing to delivery, at least once: each pending delivery is a stored record that the process
|
|
66
|
+
* holding its lease attempts until it completes or is abandoned, and that another process takes over when the lease
|
|
67
|
+
* expires.
|
|
68
|
+
*/
|
|
69
|
+
export declare class EventOutbox {
|
|
70
|
+
private readonly options;
|
|
71
|
+
private readonly ownerId;
|
|
72
|
+
private readonly logger;
|
|
73
|
+
private readonly random;
|
|
74
|
+
private readonly usesTimers;
|
|
75
|
+
private readonly timers;
|
|
76
|
+
private readonly inFlight;
|
|
77
|
+
private readonly waitingForSlot;
|
|
78
|
+
private activeAttempts;
|
|
79
|
+
private sweepTimer?;
|
|
80
|
+
private lastSweepAt;
|
|
81
|
+
private stopped;
|
|
82
|
+
/** Takes the storage, the delivery settings and the function that makes one attempt. */
|
|
83
|
+
constructor(options: EventOutboxOptions);
|
|
84
|
+
/** Store a delivery and attempt it: on a timer in a long-lived process, before returning elsewhere. Gives its id. */
|
|
85
|
+
enqueue(delivery: NewEventDelivery): Promise<string>;
|
|
86
|
+
/** Whether a delivery is still stored: neither acknowledged, dropped nor abandoned yet. */
|
|
87
|
+
isPending(deliveryId: string): Promise<boolean>;
|
|
88
|
+
/** Look for deliveries on a timer, where the process is long-lived and the storage is shared. */
|
|
89
|
+
start(): void;
|
|
90
|
+
/** Sweep when the last sweep is old enough: how retries and left-behind deliveries run without timers. */
|
|
91
|
+
sweepIfDue(now?: number): Promise<void>;
|
|
92
|
+
/** Take the deliveries nobody holds: those whose lease expired, and this process's own that no timer runs. */
|
|
93
|
+
sweep(now?: number): Promise<void>;
|
|
94
|
+
/** How many deliveries are stored, waiting for an attempt. */
|
|
95
|
+
depth(): Promise<number>;
|
|
96
|
+
/** Stop the timers, wait for the attempts in flight, and leave unfinished deliveries for the next process to take. */
|
|
97
|
+
stop(): Promise<void>;
|
|
98
|
+
/** Give up the leases this process holds, so another process takes its deliveries without waiting for them to expire. */
|
|
99
|
+
private releaseLeases;
|
|
100
|
+
/** Run a delivery after `delayMs`, on a timer that does not keep the process alive. */
|
|
101
|
+
private schedule;
|
|
102
|
+
/** Make one attempt of a delivery, within the concurrency limit; a failure of the outbox itself is logged. */
|
|
103
|
+
private run;
|
|
104
|
+
/** Take a slot or wait to be handed one, make the attempt, then hand the slot to the next waiter or free it. */
|
|
105
|
+
private attemptWithinLimit;
|
|
106
|
+
/** Renew the lease, attempt the delivery and act on its outcome. */
|
|
107
|
+
private attemptOnce;
|
|
108
|
+
/** The outcome of one attempt; an attempt that throws counts as a failed one, so the delivery is not left behind. */
|
|
109
|
+
private outcomeOf;
|
|
110
|
+
/** Keep a delivery for a later attempt, or give it up when its attempts or its retry window are used. */
|
|
111
|
+
private retryOrAbandon;
|
|
112
|
+
/** The wait before the next attempt: it doubles with each attempt up to the maximum, less a random part of half. */
|
|
113
|
+
private backoffMs;
|
|
114
|
+
/** When a lease taken for an attempt at `attemptAt` ends: after the attempt can no longer be running. */
|
|
115
|
+
private leaseEnd;
|
|
116
|
+
/** Take a delivery whose lease expired, or that this process already holds; undefined when another holds it. */
|
|
117
|
+
private claim;
|
|
118
|
+
/** Replace a stored delivery only when it is still the one that was read. */
|
|
119
|
+
private replace;
|
|
120
|
+
/** The stored delivery with the exact value a compare-and-set needs; undefined when it is gone or unreadable. */
|
|
121
|
+
private read;
|
|
122
|
+
/** The record as stored: encrypted when the outbox has a secret. */
|
|
123
|
+
private encode;
|
|
124
|
+
/** The record a stored value holds; undefined for one that cannot be read or belongs to another id. */
|
|
125
|
+
private decode;
|
|
126
|
+
/** Run a sweep nobody waits for; its failure is logged. */
|
|
127
|
+
private sweepInBackground;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=event-outbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-outbox.d.ts","sourceRoot":"","sources":["../../../src/event/delivery/event-outbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,0HAA0H;AAC1H,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,YAAY,GAAG,KAAK,CAAC;AAE/D,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,gGAAgG;AAChG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,mBAAmB,EACnB,MAAM,GAAG,gBAAgB,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAC1E,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,0BAA0B,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,OAAO,EAAE,iBAAiB,CAAC;IAC3B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iGAAiG;IACjG,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9C,uCAAuC;IACvC,OAAO,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1E,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;CACvB;AAGD,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAwB/C;;;;GAIG;AACH,qBAAa,WAAW;IAcV,OAAO,CAAC,QAAQ,CAAC,OAAO;IAbpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoD;IAC3E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;IAC7D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAiC;IACpD,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,OAAO,CAAS;IAExB,wFAAwF;gBAC3D,OAAO,EAAE,kBAAkB;IAQxD,qHAAqH;IAC/G,OAAO,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoB1D,2FAA2F;IACrF,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrD,iGAAiG;IACjG,KAAK,IAAI,IAAI;IAOb,0GAA0G;IACpG,UAAU,CAAC,GAAG,SAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjD,8GAA8G;IACxG,KAAK,CAAC,GAAG,SAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB5C,8DAA8D;IACxD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9B,sHAAsH;IAChH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,yHAAyH;YAC3G,aAAa;IAU3B,uFAAuF;IACvF,OAAO,CAAC,QAAQ;IAUhB,8GAA8G;IAC9G,OAAO,CAAC,GAAG;IAUX,gHAAgH;YAClG,kBAAkB;IAehC,oEAAoE;YACtD,WAAW;IAgBzB,qHAAqH;YACvG,SAAS;IASvB,yGAAyG;YAC3F,cAAc;IAyB5B,oHAAoH;IACpH,OAAO,CAAC,SAAS;IAMjB,yGAAyG;IACzG,OAAO,CAAC,QAAQ;IAIhB,gHAAgH;YAClG,KAAK;IASnB,6EAA6E;YAC/D,OAAO;IAMrB,iHAAiH;YACnG,IAAI;IAOlB,oEAAoE;YACtD,MAAM;IAMpB,uGAAuG;YACzF,MAAM;IAapB,2DAA2D;IAC3D,OAAO,CAAC,iBAAiB;CAG1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type EventOccurrence } from '@frontmcp/protocol';
|
|
2
|
+
import { type EventEntry, type ScopeEntry } from '../common';
|
|
3
|
+
import { type RegisteredServer } from '../notification/notification.service';
|
|
4
|
+
import { type EventReader } from './event-gates';
|
|
5
|
+
/** One occurrence as a Claude Code session gets it: the text and the attributes of a `<channel>` tag. */
|
|
6
|
+
export type EventChannelMessage = {
|
|
7
|
+
content: string;
|
|
8
|
+
meta: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The channel message of an occurrence of an event with `channel`: the event's `content`, or the payload as JSON,
|
|
12
|
+
* and the event's `meta` under `event` (its name) and `event_id`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function eventChannelMessage(event: EventEntry, occurrence: EventOccurrence): EventChannelMessage;
|
|
15
|
+
/**
|
|
16
|
+
* Who a channel capable session reads an event as: the caller of its latest request, or an anonymous one. Undefined
|
|
17
|
+
* when that caller's credentials have expired, the event is not offered to MCP clients, or the server lets no
|
|
18
|
+
* anonymous caller read events.
|
|
19
|
+
*/
|
|
20
|
+
export declare function channelSessionReader(scope: ScopeEntry, event: EventEntry, session: Pick<RegisteredServer, 'caller'>): EventReader | undefined;
|
|
21
|
+
//# sourceMappingURL=event-channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-channel.d.ts","sourceRoot":"","sources":["../../src/event/event-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAG7D,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAG/F,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE,yGAAyG;AACzG,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,GAAG,mBAAmB,CAOvG;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GACxC,WAAW,GAAG,SAAS,CASzB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AIPlatformType } from '@frontmcp/auth';
|
|
2
|
+
import { type AuthInfo } from '@frontmcp/protocol';
|
|
3
|
+
import { type ScopeEntry } from '../common';
|
|
4
|
+
import { type EventsCompat } from '../common/metadata/event.metadata';
|
|
5
|
+
import { type EventErrorCodes } from '../errors';
|
|
6
|
+
/** The revision of the events protocol a caller speaks: SEP-3415, or the design sketch ChatGPT implements. */
|
|
7
|
+
export type EventDialect = 'sep-3415' | 'sketch';
|
|
8
|
+
export interface EventDialectRules {
|
|
9
|
+
errorCodes: EventErrorCodes;
|
|
10
|
+
/** The `webhook-id` of an event delivery: the event's id, or an id the server makes for each message. */
|
|
11
|
+
webhookId: 'eventId' | 'message';
|
|
12
|
+
/** Whether `gap` and `terminated` envelopes are sent. The `verification` envelope always is. */
|
|
13
|
+
sendsControlEnvelopes: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const EVENT_DIALECTS: Readonly<Record<EventDialect, EventDialectRules>>;
|
|
16
|
+
/** The caller's detected platform: from its session id, else this request, else its `initialize` client info. */
|
|
17
|
+
export declare function callerPlatformOf(scope: ScopeEntry, authInfo: Partial<AuthInfo>, requestPlatform: AIPlatformType | undefined): AIPlatformType;
|
|
18
|
+
/** The dialect a caller is answered in: `events.compat`, or under `auto` the sketch for OpenAI and SEP-3415 otherwise. */
|
|
19
|
+
export declare function resolveEventDialect(compat: EventsCompat, platform: AIPlatformType): EventDialect;
|
|
20
|
+
//# sourceMappingURL=event-dialect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-dialect.d.ts","sourceRoot":"","sources":["../../src/event/event-dialect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAElG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,8GAA8G;AAC9G,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,eAAe,CAAC;IAC5B,yGAAyG;IACzG,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,gGAAgG;IAChG,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAG5E,CAAC;AAOF,iHAAiH;AACjH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC3B,eAAe,EAAE,cAAc,GAAG,SAAS,GAC1C,cAAc,CAIhB;AAED,0HAA0H;AAC1H,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,GAAG,YAAY,CAGhG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AuthInfo, EventDeliveryMode } from '@frontmcp/protocol';
|
|
2
|
+
import { type EventContext, type EventEntry, type EventSubscriber, type EventSubscriptionRef, type ScopeEntry } from '../common';
|
|
3
|
+
import { type EventErrorCodes } from '../errors';
|
|
4
|
+
import type EventRegistry from './event.registry';
|
|
5
|
+
/** Who polls or streams an event: a signed-in caller, or the anonymous callers of a public server together. */
|
|
6
|
+
export interface EventReader {
|
|
7
|
+
/** The owner's key; undefined for anonymous callers, who share one subscription per event and arguments. */
|
|
8
|
+
principalKey: string | undefined;
|
|
9
|
+
subscriber: EventSubscriber;
|
|
10
|
+
}
|
|
11
|
+
/** The event a request names, when the caller's surface is offered it in `mode`. */
|
|
12
|
+
export declare function offeredEventOf(events: EventRegistry, eventName: string, mode: EventDeliveryMode, requestContext: unknown, codes: EventErrorCodes): EventEntry;
|
|
13
|
+
/** The reader of a poll or a stream: anonymous callers are readers on a server in public auth mode only. */
|
|
14
|
+
export declare function eventReaderOf(scope: ScopeEntry, authInfo: Partial<AuthInfo>, eventName: string, codes: EventErrorCodes): EventReader;
|
|
15
|
+
/** Refuse a caller the event's `authorities` do not allow, with the arguments as the rule's input. */
|
|
16
|
+
export declare function assertEventAuthorities(scope: ScopeEntry, event: EventEntry, authInfo: Partial<AuthInfo>, args: Record<string, unknown>, codes: EventErrorCodes): Promise<void>;
|
|
17
|
+
/** The arguments of a request as the event's `inputSchema` parses them. */
|
|
18
|
+
export declare function parsedEventArguments(event: EventEntry, args: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
19
|
+
/** Run the event's own `authorize()`: whatever it throws refuses the reader. */
|
|
20
|
+
export declare function assertEventAuthorizes(context: EventContext, eventName: string, args: Record<string, unknown>, subscriber: EventSubscriber, codes: EventErrorCodes): Promise<void>;
|
|
21
|
+
/** The subscription a poll or a stream stands for: one per reader, mode, event and arguments. */
|
|
22
|
+
export declare function readerSubscriptionOf(reader: EventReader, mode: 'poll' | 'push', eventName: string, args: Record<string, unknown>): EventSubscriptionRef;
|
|
23
|
+
//# sourceMappingURL=event-gates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-gates.d.ts","sourceRoot":"","sources":["../../src/event/event-gates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,+GAA+G;AAC/G,MAAM,WAAW,WAAW;IAC1B,4GAA4G;IAC5G,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,EAAE,eAAe,CAAC;CAC7B;AAID,oFAAoF;AACpF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EACvB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,eAAe,GACrB,UAAU,CAQZ;AAED,4GAA4G;AAC5G,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,GACrB,WAAW,CAQb;AAED,sGAAsG;AACtG,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AAED,gFAAgF;AAChF,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,UAAU,EAAE,eAAe,EAC3B,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,oBAAoB,CAGtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OutboundTargetOptions } from '@frontmcp/utils';
|
|
2
|
+
/** What the events feature tells the hardened fetch about a callback target. */
|
|
3
|
+
export interface EventOutboundTargetOptions extends OutboundTargetOptions {
|
|
4
|
+
/** Lets the platform resolve the host where the runtime cannot pin DNS. Set on edge runtimes only. */
|
|
5
|
+
allowPlatformDns?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** The target options of every request to a callback: local targets when configured, platform DNS on edge only. */
|
|
8
|
+
export declare function eventOutboundTargetOptions(allowLocal: boolean): EventOutboundTargetOptions;
|
|
9
|
+
//# sourceMappingURL=event-outbound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-outbound.d.ts","sourceRoot":"","sources":["../../src/event/event-outbound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,gFAAgF;AAChF,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACvE,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,mHAAmH;AACnH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,OAAO,GAAG,0BAA0B,CAE1F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type EventPublisher, type EventPublishOptions, type EventPublishResult, type EventReference, type ScopeEntry } from '../common';
|
|
2
|
+
import type EventRegistry from './event.registry';
|
|
3
|
+
/** A new event id: `evt_` and 24 random URL-safe characters. */
|
|
4
|
+
export declare function newEventId(): string;
|
|
5
|
+
/** Publishes the events of one scope through its `events:publish` flow. */
|
|
6
|
+
export declare class ScopeEventPublisher implements EventPublisher {
|
|
7
|
+
private readonly scope;
|
|
8
|
+
private readonly events;
|
|
9
|
+
/** Takes the scope whose flow publishes and the registry its events are found in. */
|
|
10
|
+
constructor(scope: ScopeEntry, events: EventRegistry);
|
|
11
|
+
/** Check the event and its data, give the occurrence an id and a time, and queue its deliveries. */
|
|
12
|
+
publish(event: string | EventReference<unknown>, data: unknown, options?: EventPublishOptions): Promise<EventPublishResult>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=event-publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-publisher.d.ts","sourceRoot":"","sources":["../../src/event/event-publisher.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEnB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAKlD,gEAAgE;AAChE,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAgBD,2EAA2E;AAC3E,qBAAa,mBAAoB,YAAW,cAAc;IAGtD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,qFAAqF;gBAElE,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,aAAa;IAGxC,oGAAoG;IAC9F,OAAO,CACX,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,EACvC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC;CAyB/B"}
|