@frontmcp/sdk 1.13.2 → 1.14.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/agent/agent.instance.d.ts +4 -0
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +3 -0
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/app/instances/app.local.instance.d.ts.map +1 -1
- package/app/lazy/lazy-placeholders.d.ts +6 -9
- package/app/lazy/lazy-placeholders.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.contract.d.ts +4 -1
- package/auth/auth-ui/auth-ui.contract.d.ts.map +1 -1
- package/auth/authorized-apps.utils.d.ts +2 -0
- package/auth/authorized-apps.utils.d.ts.map +1 -1
- package/auth/client-display-name.d.ts +52 -0
- package/auth/client-display-name.d.ts.map +1 -0
- package/auth/federated-steps.d.ts.map +1 -1
- package/auth/flows/oauth.auth-ui.flow.d.ts +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +6 -3
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +3 -8
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.connect.flow.d.ts +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +9 -2
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts +6 -4
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +1 -1
- package/auth/flows/oauth.userinfo.flow.d.ts +1 -1
- package/auth/flows/session.verify.flow.d.ts +20 -4
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +3 -3
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +2 -2
- package/auth/flows/well-known.prm.flow.d.ts +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +8 -0
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/instances/instance.remote-primary-auth.d.ts +2 -0
- package/auth/instances/instance.remote-primary-auth.d.ts.map +1 -1
- package/auth/session/session-store.factory.d.ts.map +1 -1
- package/browser/agent/agent.instance.mjs +16 -0
- package/browser/agent/agent.scope.mjs +9 -0
- package/browser/agent/flows/call-agent.flow.mjs +3 -1
- package/browser/app/instances/app.local.instance.mjs +6 -1
- package/browser/app/lazy/lazy-placeholders.mjs +3 -3
- package/browser/auth/authorized-apps.utils.mjs +15 -0
- package/browser/auth/client-display-name.mjs +62 -0
- package/browser/auth/federated-steps.mjs +2 -0
- package/browser/auth/flows/oauth.authorize.flow.mjs +25 -10
- package/browser/auth/flows/oauth.callback.flow.mjs +29 -31
- package/browser/auth/flows/oauth.provider-callback.flow.mjs +83 -14
- package/browser/auth/flows/oauth.register.flow.mjs +5 -24
- package/browser/auth/flows/session.verify.flow.mjs +31 -12
- package/browser/auth/instances/instance.local-primary-auth.mjs +43 -10
- package/browser/auth/instances/instance.remote-primary-auth.mjs +15 -0
- package/browser/auth/session/session-store.factory.mjs +15 -36
- package/browser/builtin/authorities/authorities-input.mjs +12 -0
- package/browser/common/decorators/front-mcp.decorator.mjs +2 -1
- package/browser/common/decorators/http-route.decorator.mjs +4 -0
- package/browser/common/index.mjs +2 -2
- package/browser/common/interfaces/server.interface.mjs +4 -0
- package/browser/common/metadata/duty.metadata.mjs +29 -6
- package/browser/common/metadata/event.metadata.mjs +2 -1
- package/browser/common/metadata/front-mcp.metadata.mjs +18 -1
- package/browser/common/metadata/workflow.metadata.mjs +1 -0
- package/browser/common/tokens/front-mcp.tokens.mjs +3 -0
- package/browser/common/tokens/workflow.tokens.mjs +1 -0
- package/browser/common/types/auth/session.types.mjs +2 -0
- package/browser/common/types/index.mjs +1 -1
- package/browser/common/types/options/http/schema.mjs +14 -6
- package/browser/common/types/options/index.mjs +1 -1
- package/browser/common/types/options/redis/connection.mjs +19 -0
- package/browser/common/types/options/redis/index.mjs +12 -0
- package/browser/common/types/options/redis/schema.mjs +145 -12
- package/browser/common/types/options/skills-http/schema.mjs +18 -0
- package/browser/common/types/options/transport/schema.mjs +10 -0
- package/browser/common/utils/auth-info.utils.mjs +17 -3
- package/browser/common/utils/guard.utils.mjs +3 -2
- package/browser/common/utils/index.mjs +2 -1
- package/browser/completion/flows/complete.flow.mjs +13 -7
- package/browser/duty/duty.lifecycle.mjs +32 -5
- package/browser/duty/duty.runner.mjs +3 -1
- package/browser/duty/lease-holder.mjs +50 -3
- package/browser/duty/lease-store.mjs +9 -6
- package/browser/elicitation/flows/elicitation-request.flow.mjs +7 -1
- package/browser/elicitation/flows/elicitation-result.flow.mjs +8 -2
- package/browser/elicitation/questions/question-store.factory.mjs +2 -5
- package/browser/elicitation/store/elicitation-store.factory.mjs +11 -4
- package/browser/errors/browser-entry-point.errors.mjs +1 -0
- package/browser/errors/duty.errors.mjs +9 -0
- package/browser/errors/index.mjs +11 -1
- package/browser/errors/job.errors.mjs +29 -4
- package/browser/errors/mcp.error.mjs +54 -8
- package/browser/errors/provider.errors.mjs +18 -0
- package/browser/errors/transport.errors.mjs +31 -0
- package/browser/event/delivery/event-outbox.mjs +43 -9
- package/browser/event/event-gates.mjs +6 -2
- package/browser/event/event-scope.helper.mjs +5 -1
- package/browser/event/flows/event-ended.flow.mjs +9 -3
- package/browser/event/flows/event-poll.flow.mjs +3 -1
- package/browser/event/flows/event-publish.flow.mjs +1 -0
- package/browser/event/flows/event-subscribe.flow.mjs +2 -9
- package/browser/event/flows/event-unsubscribe.flow.mjs +5 -2
- package/browser/event/poll/event-poll-leases.mjs +4 -3
- package/browser/event/replay/event-replays.mjs +2 -0
- package/browser/event/stream/event-stream.mjs +4 -0
- package/browser/event/stream/event-streams.mjs +9 -6
- package/browser/event/subscription/event-subscription-store.factory.mjs +3 -4
- package/browser/event/subscription/event-subscription-termination.mjs +1 -0
- package/browser/event/subscription/event-subscription.store.mjs +11 -1
- package/browser/event/subscription/event-subscriptions.mjs +4 -1
- package/browser/front-mcp/front-mcp.mjs +38 -4
- package/browser/ha/ha-manager.mjs +2 -1
- package/browser/ha/ha-redis-client.mjs +22 -0
- package/browser/ha/heartbeat.service.mjs +2 -1
- package/browser/ha/index.mjs +2 -0
- package/browser/ha/notification-relay.mjs +11 -3
- package/browser/http-route/flows/http.route.flow.mjs +78 -7
- package/browser/http-route/http-route.table.mjs +38 -11
- package/browser/http-route/people-session-store.mjs +7 -6
- package/browser/http-route/people-sign-in.routes.mjs +44 -3
- package/browser/index.cjs +21320 -17819
- package/browser/index.mjs +10 -3
- package/browser/job/execution/job-execution.manager.mjs +293 -84
- package/browser/job/flows/execute-job.flow.mjs +6 -4
- package/browser/job/index.mjs +3 -1
- package/browser/job/job-admission.mjs +284 -2
- package/browser/job/job-attempt.mjs +2 -1
- package/browser/job/job-run-access.mjs +20 -0
- package/browser/job/job-scope.helper.mjs +37 -10
- package/browser/job/runner/detached-job.worker.mjs +71 -10
- package/browser/job/runner/job-runner.mjs +27 -1
- package/browser/job/store/job-definition-store.factory.mjs +13 -12
- package/browser/job/store/job-state-store.factory.mjs +14 -5
- package/browser/job/store/memory-job-state.store.mjs +91 -7
- package/browser/job/store/redis-job-state.store.mjs +39 -6
- package/browser/job/store/storage-job-state.store.mjs +35 -2
- package/browser/job/tools/cancel-job.tool.mjs +2 -2
- package/browser/job/tools/register-job.tool.mjs +5 -2
- package/browser/job/tools/remove-job.tool.mjs +9 -0
- package/browser/job/tools/update-job.tool.mjs +8 -0
- package/browser/notification/notification.service.mjs +14 -3
- package/browser/prompt/flows/get-prompt.flow.mjs +10 -3
- package/browser/prompt/flows/prompts-list.flow.mjs +7 -2
- package/browser/provider/borrow-providers.mjs +40 -0
- package/browser/provider/container-handle.mjs +10 -0
- package/browser/provider/create-container.mjs +25 -3
- package/browser/provider/provider.registry.mjs +43 -6
- package/browser/remote-mcp/remote-oauth.mjs +43 -13
- package/browser/resource/flows/read-resource.flow.mjs +15 -4
- package/browser/resource/flows/resource-templates-list.flow.mjs +7 -2
- package/browser/resource/flows/resources-list.flow.mjs +7 -2
- package/browser/resource/flows/subscribe-resource.flow.mjs +21 -5
- package/browser/resource/materialized/materialized-resources.mjs +53 -23
- package/browser/resource/materialized/resource-store.mjs +97 -26
- package/browser/resource/resource.events.mjs +12 -1
- package/browser/resource/resource.registry.mjs +66 -8
- package/browser/scope/flows/http.request.flow.mjs +52 -3
- package/browser/scope/scope.instance.mjs +12 -14
- package/browser/server/custom-routes.helper.mjs +57 -6
- package/browser/server/security/resolve-allowed-hosts.mjs +26 -2
- package/browser/server/security/same-origin.mjs +5 -5
- package/browser/server/server.instance.mjs +56 -3
- package/browser/skill/cache/skill-http-cache.catalog.mjs +7 -6
- package/browser/skill/cache/skill-http-cache.factory.mjs +16 -19
- package/browser/skill/cache/skill-http-cache.mjs +14 -4
- package/browser/skill/flows/http/llm-full-txt.flow.mjs +16 -5
- package/browser/skill/flows/http/llm-txt.flow.mjs +1 -0
- package/browser/skill/flows/http/skills-api.flow.mjs +6 -5
- package/browser/skill/flows/load-skill.flow.mjs +9 -4
- package/browser/skill/skill-filter.helper.mjs +41 -4
- package/browser/skill/skill-http.utils.mjs +8 -8
- package/browser/surface/entry-enabled.mjs +22 -6
- package/browser/surface/index.mjs +8 -2
- package/browser/surface/live-surface.mjs +63 -3
- package/browser/task/helpers/task-run-context.mjs +12 -0
- package/browser/task/helpers/task-runner.mjs +2 -0
- package/browser/task/store/storage-task.store.mjs +1 -4
- package/browser/task/store/task-store.factory.mjs +2 -3
- package/browser/task/task.types.mjs +2 -0
- package/browser/tool/flows/call-tool.flow.mjs +56 -17
- package/browser/tool/flows/tools-list.flow.mjs +2 -2
- package/browser/tool/ui/ui-shared.mjs +5 -1
- package/browser/tool/ui/widget-enabled.mjs +11 -0
- package/browser/tool/undeclared-arguments-message.mjs +7 -5
- package/browser/tool/undeclared-arguments.mjs +8 -1
- package/browser/transport/adapters/streamable-http-transport.mjs +4 -0
- package/browser/transport/adapters/transport.local.adapter.mjs +26 -21
- package/browser/transport/adapters/transport.sse.adapter.mjs +15 -2
- package/browser/transport/adapters/transport.streamable-http.adapter.mjs +7 -1
- package/browser/transport/bus/redis-transport-bus.mjs +83 -28
- package/browser/transport/channel-signature.mjs +40 -0
- package/browser/transport/event-stores/redis.event-store.mjs +14 -27
- package/browser/transport/flows/handle.mcp-20260728.flow.mjs +4 -3
- package/browser/transport/flows/handle.streamable-http.flow.mjs +17 -10
- package/browser/transport/mcp-20260728/client/index.mjs +1 -1
- package/browser/transport/mcp-20260728/client/mcp-stateless.client.mjs +77 -15
- package/browser/transport/mcp-20260728/index.mjs +1 -1
- package/browser/transport/mcp-20260728/result-decorator.mjs +14 -7
- package/browser/transport/mcp-20260728/subscriptions.mjs +27 -7
- package/browser/transport/mcp-handlers/index.mjs +11 -2
- package/browser/transport/relay/relay-scope.helper.mjs +34 -6
- package/browser/transport/session-end-channel.mjs +199 -0
- package/browser/transport/transport.local.mjs +3 -0
- package/browser/transport/transport.registry.mjs +352 -21
- package/browser/transport/web-fetch-handler.mjs +64 -4
- package/browser/utils/same-origin-fetch.utils.mjs +33 -0
- package/browser/work/index.mjs +13 -0
- package/browser/work/work-spans.mjs +55 -0
- package/browser/worker/worker.lifecycle.mjs +3 -1
- package/browser/workflow/engine/workflow-step.executor.mjs +32 -12
- package/browser/workflow/engine/workflow.engine.mjs +5 -0
- package/browser/workflow/tools/register-workflow.tool.mjs +5 -2
- package/browser/workflow/tools/remove-workflow.tool.mjs +9 -0
- package/browser/workflow/tools/update-workflow.tool.mjs +8 -0
- package/builtin/authorities/authorities-input.d.ts +3 -0
- package/builtin/authorities/authorities-input.d.ts.map +1 -0
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/http-route.decorator.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +3 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/interfaces/server.interface.d.ts +2 -0
- package/common/interfaces/server.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +2 -2
- package/common/metadata/app.metadata.d.ts +500 -52
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/duty.metadata.d.ts +41 -11
- package/common/metadata/duty.metadata.d.ts.map +1 -1
- package/common/metadata/enabled.metadata.d.ts +32 -0
- package/common/metadata/enabled.metadata.d.ts.map +1 -1
- package/common/metadata/event.metadata.d.ts +146 -0
- package/common/metadata/event.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +9457 -348
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/http-route.metadata.d.ts +7 -0
- package/common/metadata/http-route.metadata.d.ts.map +1 -1
- package/common/metadata/job.metadata.d.ts +1 -1
- package/common/metadata/output-policy.d.ts +1 -1
- package/common/metadata/plugin.metadata.d.ts +2 -2
- package/common/metadata/tool.metadata.d.ts +1 -1
- package/common/metadata/worker.metadata.d.ts +4 -4
- package/common/metadata/workflow.metadata.d.ts +15 -1
- package/common/metadata/workflow.metadata.d.ts.map +1 -1
- package/common/records/job.record.d.ts +6 -0
- package/common/records/job.record.d.ts.map +1 -1
- package/common/records/workflow.record.d.ts +6 -0
- package/common/records/workflow.record.d.ts.map +1 -1
- package/common/schemas/annotated-class.schema.d.ts +1 -1
- package/common/schemas/http-output.schema.d.ts +24 -24
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/workflow.tokens.d.ts +1 -0
- package/common/tokens/workflow.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +12 -1
- package/common/types/auth/session.types.d.ts.map +1 -1
- package/common/types/options/elicitation/schema.d.ts +137 -0
- package/common/types/options/elicitation/schema.d.ts.map +1 -1
- package/common/types/options/http/interfaces.d.ts +41 -4
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/types/options/http/schema.d.ts +5 -2
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/redis/connection.d.ts +18 -0
- package/common/types/options/redis/connection.d.ts.map +1 -0
- package/common/types/options/redis/index.d.ts +7 -3
- package/common/types/options/redis/index.d.ts.map +1 -1
- package/common/types/options/redis/interfaces.d.ts +54 -2
- package/common/types/options/redis/interfaces.d.ts.map +1 -1
- package/common/types/options/redis/schema.d.ts +412 -2
- package/common/types/options/redis/schema.d.ts.map +1 -1
- package/common/types/options/skills-http/interfaces.d.ts +7 -0
- package/common/types/options/skills-http/interfaces.d.ts.map +1 -1
- package/common/types/options/skills-http/schema.d.ts +19 -0
- package/common/types/options/skills-http/schema.d.ts.map +1 -1
- package/common/types/options/transport/index.d.ts +1 -1
- package/common/types/options/transport/index.d.ts.map +1 -1
- package/common/types/options/transport/interfaces.d.ts +32 -0
- package/common/types/options/transport/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts +548 -0
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/common/utils/auth-info.utils.d.ts +29 -1
- package/common/utils/auth-info.utils.d.ts.map +1 -1
- package/common/utils/guard.utils.d.ts +6 -3
- package/common/utils/guard.utils.d.ts.map +1 -1
- package/common/utils/index.d.ts +1 -0
- package/common/utils/index.d.ts.map +1 -1
- package/completion/flows/complete.flow.d.ts +5 -1
- package/completion/flows/complete.flow.d.ts.map +1 -1
- package/context/frontmcp-context.provider.d.ts +1 -1
- package/direct/direct.types.d.ts +4 -4
- package/direct/direct.types.d.ts.map +1 -1
- package/duty/duty.lifecycle.d.ts +1 -1
- package/duty/duty.lifecycle.d.ts.map +1 -1
- package/duty/duty.runner.d.ts +6 -1
- package/duty/duty.runner.d.ts.map +1 -1
- package/duty/lease-holder.d.ts +26 -3
- package/duty/lease-holder.d.ts.map +1 -1
- package/duty/lease-store.d.ts +2 -0
- package/duty/lease-store.d.ts.map +1 -1
- package/elicitation/elicitation.types.d.ts +2 -0
- package/elicitation/elicitation.types.d.ts.map +1 -1
- package/elicitation/flows/elicitation-request.flow.d.ts +2 -0
- package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -1
- package/elicitation/flows/elicitation-result.flow.d.ts +3 -1
- package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -1
- package/elicitation/questions/question-store.factory.d.ts.map +1 -1
- package/elicitation/store/elicitation-store.factory.d.ts.map +1 -1
- package/elicitation/store/elicitation.store.d.ts +2 -0
- package/elicitation/store/elicitation.store.d.ts.map +1 -1
- package/errors/browser-entry-point.errors.d.ts +1 -0
- package/errors/browser-entry-point.errors.d.ts.map +1 -1
- package/errors/duty.errors.d.ts +4 -0
- package/errors/duty.errors.d.ts.map +1 -1
- package/errors/index.d.ts +3 -3
- package/errors/index.d.ts.map +1 -1
- package/errors/job.errors.d.ts +22 -4
- package/errors/job.errors.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +11 -1
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/provider.errors.d.ts +11 -0
- package/errors/provider.errors.d.ts.map +1 -1
- package/errors/transport.errors.d.ts +29 -0
- package/errors/transport.errors.d.ts.map +1 -1
- package/esm/index.mjs +56 -51
- package/event/delivery/event-outbox.d.ts +15 -2
- package/event/delivery/event-outbox.d.ts.map +1 -1
- package/event/event-gates.d.ts +6 -1
- package/event/event-gates.d.ts.map +1 -1
- package/event/event-scope.helper.d.ts.map +1 -1
- package/event/flows/event-ended.flow.d.ts +4 -3
- package/event/flows/event-ended.flow.d.ts.map +1 -1
- package/event/flows/event-poll.flow.d.ts.map +1 -1
- package/event/flows/event-publish-http.flow.d.ts +1 -1
- package/event/flows/event-publish.flow.d.ts.map +1 -1
- package/event/flows/event-subscribe.flow.d.ts.map +1 -1
- package/event/flows/event-unsubscribe.flow.d.ts +2 -2
- package/event/flows/event-unsubscribe.flow.d.ts.map +1 -1
- package/event/index.d.ts +1 -1
- package/event/index.d.ts.map +1 -1
- package/event/poll/event-poll-leases.d.ts +4 -2
- package/event/poll/event-poll-leases.d.ts.map +1 -1
- package/event/replay/event-replays.d.ts.map +1 -1
- package/event/stream/event-stream.d.ts +2 -0
- package/event/stream/event-stream.d.ts.map +1 -1
- package/event/stream/event-streams.d.ts +5 -2
- package/event/stream/event-streams.d.ts.map +1 -1
- package/event/subscription/event-subscription-store.factory.d.ts.map +1 -1
- package/event/subscription/event-subscription-termination.d.ts.map +1 -1
- package/event/subscription/event-subscription.store.d.ts +6 -0
- package/event/subscription/event-subscription.store.d.ts.map +1 -1
- package/event/subscription/event-subscriptions.d.ts +4 -4
- package/event/subscription/event-subscriptions.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +7 -2
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/ha/ha-manager.d.ts.map +1 -1
- package/ha/ha-redis-client.d.ts +16 -0
- package/ha/ha-redis-client.d.ts.map +1 -0
- package/ha/heartbeat.service.d.ts +4 -2
- package/ha/heartbeat.service.d.ts.map +1 -1
- package/ha/index.d.ts +2 -1
- package/ha/index.d.ts.map +1 -1
- package/ha/notification-relay.d.ts +8 -3
- package/ha/notification-relay.d.ts.map +1 -1
- package/ha/relay-messages.d.ts +23 -4
- package/ha/relay-messages.d.ts.map +1 -1
- package/http-route/flows/http.route.flow.d.ts +15 -4
- package/http-route/flows/http.route.flow.d.ts.map +1 -1
- package/http-route/http-route.table.d.ts +5 -1
- package/http-route/http-route.table.d.ts.map +1 -1
- package/http-route/people-session-store.d.ts +4 -2
- package/http-route/people-session-store.d.ts.map +1 -1
- package/http-route/people-sign-in.routes.d.ts +10 -0
- package/http-route/people-sign-in.routes.d.ts.map +1 -1
- package/index.d.ts +15 -14
- package/index.d.ts.map +1 -1
- package/index.js +62 -57
- package/job/execution/job-execution.manager.d.ts +73 -7
- package/job/execution/job-execution.manager.d.ts.map +1 -1
- package/job/flows/execute-job.flow.d.ts.map +1 -1
- package/job/index.d.ts +2 -2
- package/job/index.d.ts.map +1 -1
- package/job/job-admission.d.ts +81 -2
- package/job/job-admission.d.ts.map +1 -1
- package/job/job-attempt.d.ts +2 -2
- package/job/job-attempt.d.ts.map +1 -1
- package/job/job-run-access.d.ts +14 -0
- package/job/job-run-access.d.ts.map +1 -1
- package/job/job-scope.helper.d.ts +20 -0
- package/job/job-scope.helper.d.ts.map +1 -1
- package/job/runner/detached-job.worker.d.ts +9 -0
- package/job/runner/detached-job.worker.d.ts.map +1 -1
- package/job/runner/job-runner.d.ts +18 -0
- package/job/runner/job-runner.d.ts.map +1 -1
- package/job/store/job-definition-store.factory.d.ts +5 -1
- package/job/store/job-definition-store.factory.d.ts.map +1 -1
- package/job/store/job-state-store.factory.d.ts +5 -1
- package/job/store/job-state-store.factory.d.ts.map +1 -1
- package/job/store/job-state.interface.d.ts +16 -0
- package/job/store/job-state.interface.d.ts.map +1 -1
- package/job/store/memory-job-state.store.d.ts +33 -2
- package/job/store/memory-job-state.store.d.ts.map +1 -1
- package/job/store/redis-job-state.store.d.ts +13 -3
- package/job/store/redis-job-state.store.d.ts.map +1 -1
- package/job/store/storage-job-state.store.d.ts +4 -0
- package/job/store/storage-job-state.store.d.ts.map +1 -1
- package/job/tools/cancel-job.tool.d.ts.map +1 -1
- package/job/tools/register-job.tool.d.ts.map +1 -1
- package/job/tools/remove-job.tool.d.ts.map +1 -1
- package/job/tools/update-job.tool.d.ts.map +1 -1
- package/mcp-registry/flows/server-card.flow.d.ts +3 -3
- package/mcp-registry/flows/well-known.ai-catalog.flow.d.ts +2 -2
- package/mcp-registry/flows/well-known.mcp-registry-auth.flow.d.ts +1 -1
- package/notification/notification.service.d.ts +5 -1
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +10 -10
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/prompt/flows/prompts-list.flow.d.ts +1 -1
- package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
- package/provider/borrow-providers.d.ts +15 -0
- package/provider/borrow-providers.d.ts.map +1 -0
- package/provider/container-handle.d.ts +31 -0
- package/provider/container-handle.d.ts.map +1 -0
- package/provider/create-container.d.ts +8 -2
- package/provider/create-container.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +23 -4
- package/provider/provider.registry.d.ts.map +1 -1
- package/remote-mcp/remote-oauth.d.ts +3 -1
- package/remote-mcp/remote-oauth.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 +1 -1
- package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
- package/resource/flows/resources-list.flow.d.ts +1 -1
- package/resource/flows/resources-list.flow.d.ts.map +1 -1
- package/resource/flows/subscribe-resource.flow.d.ts +1 -0
- package/resource/flows/subscribe-resource.flow.d.ts.map +1 -1
- package/resource/materialized/materialized-resources.d.ts +15 -3
- package/resource/materialized/materialized-resources.d.ts.map +1 -1
- package/resource/materialized/resource-store.d.ts +6 -2
- package/resource/materialized/resource-store.d.ts.map +1 -1
- package/resource/resource.events.d.ts +3 -0
- package/resource/resource.events.d.ts.map +1 -1
- package/resource/resource.registry.d.ts +8 -3
- package/resource/resource.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +8 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +2 -2
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts +26 -0
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/adapters/user-content.listener.d.ts +5 -1
- package/server/adapters/user-content.listener.d.ts.map +1 -1
- package/server/custom-routes.helper.d.ts +19 -2
- package/server/custom-routes.helper.d.ts.map +1 -1
- package/server/security/resolve-allowed-hosts.d.ts +16 -0
- package/server/security/resolve-allowed-hosts.d.ts.map +1 -1
- package/server/security/same-origin.d.ts +2 -1
- package/server/security/same-origin.d.ts.map +1 -1
- package/server/server.instance.d.ts +10 -0
- package/server/server.instance.d.ts.map +1 -1
- package/shared/ensure-shared-server.d.ts +9 -2
- package/shared/ensure-shared-server.d.ts.map +1 -1
- package/shared/flows/shared.drain.flow.d.ts +1 -1
- package/shared/flows/shared.identify.flow.d.ts +6 -2
- package/shared/flows/shared.identify.flow.d.ts.map +1 -1
- package/shared/index.d.ts.map +1 -1
- package/shared/shared-attach.d.ts +15 -6
- package/shared/shared-attach.d.ts.map +1 -1
- package/shared/shared-embedded.d.ts +12 -2
- package/shared/shared-embedded.d.ts.map +1 -1
- package/shared/shared-endpoint.d.ts +3 -1
- package/shared/shared-endpoint.d.ts.map +1 -1
- package/shared/shared-files.d.ts +2 -0
- package/shared/shared-files.d.ts.map +1 -1
- package/shared/shared-serve.d.ts +20 -1
- package/shared/shared-serve.d.ts.map +1 -1
- package/shared/shared-server.lifecycle.d.ts +40 -10
- package/shared/shared-server.lifecycle.d.ts.map +1 -1
- package/shared/shared-server.options.d.ts +43 -6
- package/shared/shared-server.options.d.ts.map +1 -1
- package/skill/cache/skill-http-cache.catalog.d.ts +4 -4
- package/skill/cache/skill-http-cache.catalog.d.ts.map +1 -1
- package/skill/cache/skill-http-cache.d.ts +15 -2
- package/skill/cache/skill-http-cache.d.ts.map +1 -1
- package/skill/cache/skill-http-cache.factory.d.ts +12 -0
- package/skill/cache/skill-http-cache.factory.d.ts.map +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +1 -1
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/skill-filter.helper.d.ts +16 -0
- package/skill/skill-filter.helper.d.ts.map +1 -1
- package/skill/skill-http.utils.d.ts +7 -1
- package/skill/skill-http.utils.d.ts.map +1 -1
- package/surface/entry-enabled.d.ts +23 -6
- package/surface/entry-enabled.d.ts.map +1 -1
- package/surface/index.d.ts +2 -2
- package/surface/index.d.ts.map +1 -1
- package/surface/live-surface.d.ts +32 -7
- package/surface/live-surface.d.ts.map +1 -1
- package/task/helpers/task-run-context.d.ts +5 -0
- package/task/helpers/task-run-context.d.ts.map +1 -0
- package/task/helpers/task-runner.d.ts.map +1 -1
- package/task/store/storage-task.store.d.ts.map +1 -1
- package/task/store/task-store.factory.d.ts.map +1 -1
- package/task/store/task.store.d.ts +1 -1
- package/task/store/task.store.d.ts.map +1 -1
- package/task/task.types.d.ts +1 -0
- package/task/task.types.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +10 -3
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts +1 -1
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts +2 -0
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/tool/ui/widget-enabled.d.ts +8 -0
- package/tool/ui/widget-enabled.d.ts.map +1 -0
- package/tool/undeclared-arguments-message.d.ts.map +1 -1
- package/tool/undeclared-arguments.d.ts +4 -0
- package/tool/undeclared-arguments.d.ts.map +1 -1
- package/transport/adapters/streamable-http-transport.d.ts +2 -0
- package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts +3 -0
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.sse.adapter.d.ts +3 -0
- package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +1 -0
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/bus/redis-transport-bus.d.ts +25 -4
- package/transport/bus/redis-transport-bus.d.ts.map +1 -1
- package/transport/channel-signature.d.ts +16 -0
- package/transport/channel-signature.d.ts.map +1 -0
- package/transport/event-stores/redis.event-store.d.ts +1 -1
- package/transport/event-stores/redis.event-store.d.ts.map +1 -1
- package/transport/flows/handle.mcp-20260728.flow.d.ts +2 -1
- package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/mcp-20260728/client/mcp-stateless.client.d.ts +8 -0
- package/transport/mcp-20260728/client/mcp-stateless.client.d.ts.map +1 -1
- package/transport/mcp-20260728/result-decorator.d.ts +4 -2
- package/transport/mcp-20260728/result-decorator.d.ts.map +1 -1
- package/transport/mcp-20260728/subscriptions.d.ts +2 -0
- package/transport/mcp-20260728/subscriptions.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts +5 -3
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- package/transport/relay/relay-scope.helper.d.ts +2 -2
- package/transport/relay/relay-scope.helper.d.ts.map +1 -1
- package/transport/session-end-channel.d.ts +81 -0
- package/transport/session-end-channel.d.ts.map +1 -0
- package/transport/transport.local.d.ts +2 -1
- package/transport/transport.local.d.ts.map +1 -1
- package/transport/transport.registry.d.ts +73 -2
- package/transport/transport.registry.d.ts.map +1 -1
- package/transport/transport.types.d.ts +6 -1
- package/transport/transport.types.d.ts.map +1 -1
- package/transport/web-fetch-handler.d.ts.map +1 -1
- package/utils/same-origin-fetch.utils.d.ts +5 -0
- package/utils/same-origin-fetch.utils.d.ts.map +1 -0
- package/work/index.d.ts +2 -0
- package/work/index.d.ts.map +1 -0
- package/work/work-spans.d.ts +42 -0
- package/work/work-spans.d.ts.map +1 -0
- package/worker/worker.lifecycle.d.ts.map +1 -1
- package/workflow/engine/workflow-step.executor.d.ts +10 -3
- package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
- package/workflow/engine/workflow.engine.d.ts +2 -0
- package/workflow/engine/workflow.engine.d.ts.map +1 -1
- package/workflow/tools/register-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/remove-workflow.tool.d.ts.map +1 -1
- package/workflow/tools/update-workflow.tool.d.ts.map +1 -1
|
@@ -18,8 +18,12 @@ var LeaseHolder = class {
|
|
|
18
18
|
held = false;
|
|
19
19
|
stopped = false;
|
|
20
20
|
settled = false;
|
|
21
|
+
/** Set by a stop whose work did not end: the lease then ends by its TTL, and a hand-over releases nothing. */
|
|
22
|
+
leftToExpire = false;
|
|
21
23
|
reportedHeldElsewhere = false;
|
|
22
24
|
leaseCheck;
|
|
25
|
+
/** The hand-over to a preferred process, while what ran under the lease ends: the lease is renewed meanwhile. */
|
|
26
|
+
handingOver;
|
|
23
27
|
leaseTimer;
|
|
24
28
|
leaseDeadline;
|
|
25
29
|
/** Whether this process holds the lease now. */
|
|
@@ -30,6 +34,10 @@ var LeaseHolder = class {
|
|
|
30
34
|
get stopping() {
|
|
31
35
|
return this.stopped;
|
|
32
36
|
}
|
|
37
|
+
/** Where a preferred process marks that it wants the lease. */
|
|
38
|
+
get preferKey() {
|
|
39
|
+
return `${this.options.key}:prefer`;
|
|
40
|
+
}
|
|
33
41
|
/** Contend for the lease once now, then renew or contend again every third of the lease. */
|
|
34
42
|
async start() {
|
|
35
43
|
this.leaseCheck = this.checkLease();
|
|
@@ -37,16 +45,23 @@ var LeaseHolder = class {
|
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
39
47
|
* Stop contending, keep renewing the lease until `untilSettled` resolves (what ran under it has ended), then
|
|
40
|
-
* release it. When it resolves `false` (what ran did not end), stop renewing without releasing
|
|
41
|
-
* by the store's TTL.
|
|
48
|
+
* release it. When it resolves `false` (what ran did not end), stop renewing without releasing, and without waiting
|
|
49
|
+
* for a hand-over in progress: the lease then ends by the store's TTL.
|
|
42
50
|
*/
|
|
43
51
|
async stop(untilSettled) {
|
|
44
52
|
this.stopped = true;
|
|
45
53
|
const ended = await untilSettled() !== false;
|
|
46
54
|
this.settled = true;
|
|
55
|
+
this.leftToExpire = !ended;
|
|
47
56
|
clearTimeout(this.leaseTimer);
|
|
48
57
|
await this.leaseCheck;
|
|
58
|
+
if (ended) await this.handingOver;
|
|
49
59
|
clearTimeout(this.leaseDeadline);
|
|
60
|
+
if (this.options.prefer === true) {
|
|
61
|
+
await this.options.storage.deleteIfEquals(this.preferKey, this.id).catch((error) => {
|
|
62
|
+
this.reportStoreFailure(error);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
50
65
|
if (!this.held) return;
|
|
51
66
|
this.held = false;
|
|
52
67
|
if (!ended) return;
|
|
@@ -82,7 +97,12 @@ var LeaseHolder = class {
|
|
|
82
97
|
async checkLease() {
|
|
83
98
|
let nextCheckMs = this.options.leaseMs / 3;
|
|
84
99
|
try {
|
|
85
|
-
if (this.
|
|
100
|
+
if (this.options.prefer === true && !this.stopped) await this.markPreferred();
|
|
101
|
+
if (this.handingOver) {
|
|
102
|
+
await this.options.storage.expireIfEquals(this.options.key, this.id, this.leaseSeconds);
|
|
103
|
+
} else if (this.held && await this.preferredElsewhere()) {
|
|
104
|
+
this.handOver();
|
|
105
|
+
} else if (this.held) {
|
|
86
106
|
if (!await this.renew()) this.lose("lost its lease; another process runs it now");
|
|
87
107
|
} else if (!this.stopped) {
|
|
88
108
|
const acquired = await this.acquire();
|
|
@@ -99,9 +119,36 @@ var LeaseHolder = class {
|
|
|
99
119
|
}, nextCheckMs);
|
|
100
120
|
this.leaseTimer.unref?.();
|
|
101
121
|
}
|
|
122
|
+
/** Mark the lease as wanted by this preferred process, for as long as a lease lasts; renewed at each check. */
|
|
123
|
+
async markPreferred() {
|
|
124
|
+
await this.options.storage.set(this.preferKey, this.id, { ttlSeconds: this.leaseSeconds });
|
|
125
|
+
}
|
|
126
|
+
/** Whether this process is not preferred and a preferred one wants the lease. */
|
|
127
|
+
async preferredElsewhere() {
|
|
128
|
+
const { prefer, storage } = this.options;
|
|
129
|
+
if (prefer !== false || !storage.get) return false;
|
|
130
|
+
const marked = await storage.get(this.preferKey);
|
|
131
|
+
return marked !== null && marked !== this.id;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Stop what runs under the lease, and release the lease to the preferred process once that ended; the checks renew
|
|
135
|
+
* it meanwhile, and start nothing under it.
|
|
136
|
+
*/
|
|
137
|
+
handOver() {
|
|
138
|
+
this.held = false;
|
|
139
|
+
clearTimeout(this.leaseDeadline);
|
|
140
|
+
this.options.onLost();
|
|
141
|
+
this.handingOver = (async () => {
|
|
142
|
+
await this.options.settled?.();
|
|
143
|
+
if (this.leftToExpire) return;
|
|
144
|
+
await this.options.storage.deleteIfEquals(this.options.key, this.id);
|
|
145
|
+
this.options.logger.info(`${this.options.label} hands its lease over to a preferred process`);
|
|
146
|
+
})().catch((error) => this.reportStoreFailure(error)).finally(() => this.handingOver = void 0);
|
|
147
|
+
}
|
|
102
148
|
/** Write the lease if no one holds it, then renew it to learn whether this holder's id is stored. */
|
|
103
149
|
async acquire() {
|
|
104
150
|
const { key, storage } = this.options;
|
|
151
|
+
if (await this.preferredElsewhere()) return false;
|
|
105
152
|
await storage.set(key, this.id, { ttlSeconds: this.leaseSeconds, ifNotExists: true });
|
|
106
153
|
this.held = await this.renew();
|
|
107
154
|
return this.held;
|
|
@@ -20,8 +20,9 @@ import {
|
|
|
20
20
|
writeFile
|
|
21
21
|
} from "@frontmcp/utils";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
redisOptionsSchema
|
|
23
|
+
isRedisConnectionOptions,
|
|
24
|
+
redisOptionsSchema,
|
|
25
|
+
redisStorageConfigOf
|
|
25
26
|
} from "../common/index.mjs";
|
|
26
27
|
import { findProjectRoot } from "../common/types/options/sqlite/resolve.mjs";
|
|
27
28
|
import { UnsafeDutyStoreError } from "../errors/duty.errors.mjs";
|
|
@@ -54,11 +55,9 @@ function registerReadinessProbe(providers, probe) {
|
|
|
54
55
|
}
|
|
55
56
|
function leaseStorageConfig(redis, kind, scope) {
|
|
56
57
|
const parsed = redis === void 0 ? void 0 : redisOptionsSchema.safeParse(redis);
|
|
57
|
-
if (parsed?.success &&
|
|
58
|
-
const { host, port, password, db, tls } = parsed.data;
|
|
58
|
+
if (parsed?.success && isRedisConnectionOptions(parsed.data)) {
|
|
59
59
|
return {
|
|
60
|
-
|
|
61
|
-
redis: { config: { host, port, password, db, tls } },
|
|
60
|
+
...redisStorageConfigOf(parsed.data),
|
|
62
61
|
prefix: scope === "cluster" ? `frontmcp:cluster:${kind}:` : `frontmcp:${kind}:${nodeOs().hostname()}:`,
|
|
63
62
|
fallback: "error"
|
|
64
63
|
};
|
|
@@ -80,6 +79,9 @@ function leaseKey(name, scope, serverName) {
|
|
|
80
79
|
const cwd = process.cwd();
|
|
81
80
|
return `${key}:${sha256Hex(findProjectRoot(cwd) ?? cwd)}`;
|
|
82
81
|
}
|
|
82
|
+
function keyedLeaseKey(name, key, serverName) {
|
|
83
|
+
return `${nameKey(name, serverName)}:key:${sha256Hex(key)}`;
|
|
84
|
+
}
|
|
83
85
|
async function openLeaseStore(config) {
|
|
84
86
|
if (config.sqlite) await prepareLeaseFile(config.sqlite.path);
|
|
85
87
|
return createStorage(config);
|
|
@@ -120,6 +122,7 @@ var LeaseClaims = class {
|
|
|
120
122
|
export {
|
|
121
123
|
LeaseClaims,
|
|
122
124
|
isLongLivedProcess,
|
|
125
|
+
keyedLeaseKey,
|
|
123
126
|
leaseKey,
|
|
124
127
|
leaseStorageConfig,
|
|
125
128
|
nameKey,
|
|
@@ -19,6 +19,8 @@ import { DEFAULT_ELICIT_TTL } from "../elicitation.types.mjs";
|
|
|
19
19
|
var inputSchema = z.object({
|
|
20
20
|
/** Related request ID from the transport */
|
|
21
21
|
relatedRequestId: z.union([z.string(), z.number()]),
|
|
22
|
+
/** The JSON-RPC id the transport sends the `elicitation/create` request under */
|
|
23
|
+
requestId: z.union([z.string(), z.number()]).optional(),
|
|
22
24
|
/** Session ID for the elicitation */
|
|
23
25
|
sessionId: z.string(),
|
|
24
26
|
/** Message to display to the user */
|
|
@@ -49,6 +51,7 @@ var outputSchema = z.object({
|
|
|
49
51
|
});
|
|
50
52
|
var stateSchema = z.object({
|
|
51
53
|
relatedRequestId: z.union([z.string(), z.number()]),
|
|
54
|
+
requestId: z.union([z.string(), z.number()]).optional(),
|
|
52
55
|
sessionId: z.string(),
|
|
53
56
|
message: z.string(),
|
|
54
57
|
requestedSchema: z.record(z.string(), z.unknown()),
|
|
@@ -77,6 +80,7 @@ var ElicitationRequestFlow = class extends FlowBase {
|
|
|
77
80
|
const { mode = "form", ttl = DEFAULT_ELICIT_TTL, elicitationId, url } = input.options ?? {};
|
|
78
81
|
this.state.set({
|
|
79
82
|
relatedRequestId: input.relatedRequestId,
|
|
83
|
+
...input.requestId === void 0 ? {} : { requestId: input.requestId },
|
|
80
84
|
sessionId: input.sessionId,
|
|
81
85
|
message: input.message,
|
|
82
86
|
requestedSchema: input.requestedSchema,
|
|
@@ -106,6 +110,7 @@ var ElicitationRequestFlow = class extends FlowBase {
|
|
|
106
110
|
async storePendingRecord() {
|
|
107
111
|
this.logger.verbose("storePendingRecord:start");
|
|
108
112
|
const { elicitId, sessionId, message, mode, expiresAt, requestedSchema } = this.state.required;
|
|
113
|
+
const { requestId } = this.state;
|
|
109
114
|
const store = this.scope.elicitationStore;
|
|
110
115
|
if (!store) {
|
|
111
116
|
throw new ElicitationStoreNotInitializedError();
|
|
@@ -117,7 +122,8 @@ var ElicitationRequestFlow = class extends FlowBase {
|
|
|
117
122
|
expiresAt,
|
|
118
123
|
message,
|
|
119
124
|
mode,
|
|
120
|
-
requestedSchema
|
|
125
|
+
requestedSchema,
|
|
126
|
+
...requestId === void 0 ? {} : { requestId }
|
|
121
127
|
};
|
|
122
128
|
await store.setPending(pendingRecord);
|
|
123
129
|
this.state.set("pendingRecord", pendingRecord);
|
|
@@ -18,6 +18,8 @@ import { validateElicitationContent } from "../helpers/index.mjs";
|
|
|
18
18
|
var inputSchema = z.object({
|
|
19
19
|
/** Session ID for the elicitation */
|
|
20
20
|
sessionId: z.string(),
|
|
21
|
+
/** The JSON-RPC id of the client's response: when given, it answers only the pending request of that id */
|
|
22
|
+
requestId: z.union([z.string(), z.number()]).optional(),
|
|
21
23
|
/** The result from the client */
|
|
22
24
|
result: z.object({
|
|
23
25
|
action: z.enum(["accept", "cancel", "decline"]),
|
|
@@ -34,6 +36,7 @@ var outputSchema = z.object({
|
|
|
34
36
|
});
|
|
35
37
|
var stateSchema = z.object({
|
|
36
38
|
sessionId: z.string(),
|
|
39
|
+
requestId: z.union([z.string(), z.number()]).optional(),
|
|
37
40
|
action: z.enum(["accept", "cancel", "decline"]),
|
|
38
41
|
content: z.unknown().optional(),
|
|
39
42
|
pendingRecord: z.any().optional(),
|
|
@@ -55,6 +58,7 @@ var ElicitationResultFlow = class extends FlowBase {
|
|
|
55
58
|
const input = inputSchema.parse(this.rawInput);
|
|
56
59
|
this.state.set({
|
|
57
60
|
sessionId: input.sessionId,
|
|
61
|
+
...input.requestId === void 0 ? {} : { requestId: input.requestId },
|
|
58
62
|
action: input.result.action,
|
|
59
63
|
content: input.result.content
|
|
60
64
|
});
|
|
@@ -70,8 +74,10 @@ var ElicitationResultFlow = class extends FlowBase {
|
|
|
70
74
|
if (!store) {
|
|
71
75
|
throw new ElicitationStoreNotInitializedError();
|
|
72
76
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
77
|
+
const { requestId } = this.state;
|
|
78
|
+
const found = await store.getPending(sessionId);
|
|
79
|
+
const pendingRecord = found && (requestId === void 0 || found.requestId === requestId) ? found : void 0;
|
|
80
|
+
this.state.set("pendingRecord", pendingRecord);
|
|
75
81
|
if (!pendingRecord) {
|
|
76
82
|
this.logger.verbose("lookupPending:notFound", { sessionIdHash: sessionIdHash(sessionId) });
|
|
77
83
|
} else {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
realpath,
|
|
20
20
|
writeFile
|
|
21
21
|
} from "@frontmcp/utils";
|
|
22
|
-
import {
|
|
22
|
+
import { isRedisConnectionOptions, redisOptionsSchema, redisStorageConfigOf } from "../../common/index.mjs";
|
|
23
23
|
import { findReplaceableDirectory } from "../../server/security/replaceable-directory.mjs";
|
|
24
24
|
import { getElicitationSecret } from "../store/elicitation-encryption.mjs";
|
|
25
25
|
import { InvalidQuestionStoreError } from "./question.errors.mjs";
|
|
@@ -54,10 +54,7 @@ async function createQuestionStore(options) {
|
|
|
54
54
|
async function resolveQuestionStorage(sources) {
|
|
55
55
|
if (sources.storage) return sources.storage;
|
|
56
56
|
const redis = sources.redis === void 0 ? void 0 : redisOptionsSchema.safeParse(sources.redis);
|
|
57
|
-
if (redis?.success &&
|
|
58
|
-
const { host, port, password, db, tls } = redis.data;
|
|
59
|
-
return { type: "redis", redis: { config: { host, port, password, db, tls } } };
|
|
60
|
-
}
|
|
57
|
+
if (redis?.success && isRedisConnectionOptions(redis.data)) return redisStorageConfigOf(redis.data);
|
|
61
58
|
if (sources.sqlite) return { type: "sqlite", sqlite: sources.sqlite };
|
|
62
59
|
const { runtime, deployment } = getRuntimeContext();
|
|
63
60
|
if (runtime !== "node" || deployment === "serverless") {
|
|
@@ -10,7 +10,10 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
10
10
|
|
|
11
11
|
// libs/sdk/src/elicitation/store/elicitation-store.factory.ts
|
|
12
12
|
import { createMemoryStorage, createStorage, getEnv } from "@frontmcp/utils";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
isVercelKvProvider,
|
|
15
|
+
redisStorageConfigOf
|
|
16
|
+
} from "../../common/index.mjs";
|
|
14
17
|
import { normalizeRedisOptions } from "../../common/types/options/redis/schema.mjs";
|
|
15
18
|
import { ElicitationNotSupportedError } from "../../errors/elicitation.error.mjs";
|
|
16
19
|
import { requireOptionalModule } from "../../scope/optional-dependency.util.mjs";
|
|
@@ -85,9 +88,13 @@ async function createElicitationStore(options = {}) {
|
|
|
85
88
|
'Vercel KV is not supported for elicitation stores. Elicitation requires pub/sub for cross-node result routing, which Vercel KV does not support. Use Redis provider instead: { provider: "redis", host: "...", port: ... }'
|
|
86
89
|
);
|
|
87
90
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
logger?.debug("[ElicitationStoreFactory] Converted redis option to storage config", {
|
|
91
|
+
finalStorageConfig = redisStorageConfigOf(redisOptions);
|
|
92
|
+
const { host, port, client } = redisOptions;
|
|
93
|
+
logger?.debug("[ElicitationStoreFactory] Converted redis option to storage config", {
|
|
94
|
+
host,
|
|
95
|
+
port,
|
|
96
|
+
client: client !== void 0
|
|
97
|
+
});
|
|
91
98
|
}
|
|
92
99
|
const explicitBackend = Boolean(storageConfig || redis);
|
|
93
100
|
if (finalStorageConfig?.type === "vercel-kv" || !explicitBackend && getEnv("KV_REST_API_URL")) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// libs/sdk/src/errors/browser-entry-point.errors.ts
|
|
2
2
|
import { InternalMcpError } from "./mcp.error.mjs";
|
|
3
3
|
var NODE_ONLY_ENTRY_POINTS = {
|
|
4
|
+
bootstrap: "a page cannot listen on an HTTP port",
|
|
4
5
|
runShared: "the shared local server needs stdio, a child process and a Unix socket or loopback port",
|
|
5
6
|
runUnixSocket: "a page cannot listen on a Unix socket"
|
|
6
7
|
};
|
|
@@ -8,6 +8,14 @@ var DutyNameConflictError = class extends InternalMcpError {
|
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
+
var DutyLeaseKeyError = class extends InternalMcpError {
|
|
12
|
+
constructor(dutyName, reason) {
|
|
13
|
+
super(
|
|
14
|
+
`Duty "${dutyName}" could not name its lease: scope.key ${reason}; it answers the key its processes share`,
|
|
15
|
+
"DUTY_LEASE_KEY"
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
11
19
|
var InvalidDutyCronError = class extends InternalMcpError {
|
|
12
20
|
/** Names the duty, its expression and why it can't be read. */
|
|
13
21
|
constructor(dutyName, expression, reason) {
|
|
@@ -37,6 +45,7 @@ var UnsafeDutyStoreError = class extends InternalMcpError {
|
|
|
37
45
|
};
|
|
38
46
|
export {
|
|
39
47
|
ClusterScopeNeedsRedisError,
|
|
48
|
+
DutyLeaseKeyError,
|
|
40
49
|
DutyNameConflictError,
|
|
41
50
|
InvalidDutyCronError,
|
|
42
51
|
UnsafeDutyStoreError
|
package/browser/errors/index.mjs
CHANGED
|
@@ -146,6 +146,8 @@ import {
|
|
|
146
146
|
DependencyCycleError,
|
|
147
147
|
ProviderConstructionError,
|
|
148
148
|
ProviderBootstrapError,
|
|
149
|
+
ContainerDisposedError,
|
|
150
|
+
ContainerProviderScopeError,
|
|
149
151
|
ProviderDependencyError,
|
|
150
152
|
ProviderScopedAccessError,
|
|
151
153
|
ProviderNotAvailableError,
|
|
@@ -156,6 +158,7 @@ import { InvalidDecoratorMetadataError, HookTargetNotDefinedError } from "./deco
|
|
|
156
158
|
import {
|
|
157
159
|
ClusterScopeNeedsRedisError,
|
|
158
160
|
DutyNameConflictError,
|
|
161
|
+
DutyLeaseKeyError,
|
|
159
162
|
InvalidDutyCronError,
|
|
160
163
|
UnsafeDutyStoreError
|
|
161
164
|
} from "./duty.errors.mjs";
|
|
@@ -203,6 +206,8 @@ import {
|
|
|
203
206
|
TransportServiceNotAvailableError,
|
|
204
207
|
SessionClaimConflictError,
|
|
205
208
|
SessionOwnerUnreachableError,
|
|
209
|
+
SessionEndUnconfirmedError,
|
|
210
|
+
SessionLimitReachedError,
|
|
206
211
|
UnsafeSocketDirectoryError,
|
|
207
212
|
SocketInUseError,
|
|
208
213
|
SocketPathConflictError,
|
|
@@ -282,7 +287,7 @@ import {
|
|
|
282
287
|
DynamicJobDirectExecutionError,
|
|
283
288
|
CallRecorderConfigurationError
|
|
284
289
|
} from "./sdk.errors.mjs";
|
|
285
|
-
export { DynamicJobRegistrationDisabledError, JobAdmissionTimeoutError, JobCancelledError, JobInterruptedError, JobNotAuthorizedError, JobRunFinishedError, JobRunNotCancellableError, JobRunNotFoundError, JobRunnerBootError, JobRunnerUnavailableError, JobStoreNotSupportedError, JobTimeoutError } from "./job.errors.mjs";
|
|
290
|
+
export { DynamicJobRegistrationDisabledError, JobAdmissionLostError, JobAdmissionTimeoutError, JobCancelledError, JobInterruptedError, JobNotAuthorizedError, JobRunFinishedError, JobRunNotCancellableError, JobRunNotFoundError, JobRunnerBootError, JobRunnerBusyError, JobRunnerUnavailableError, JobStoreNotSupportedError, JobTimeoutError } from "./job.errors.mjs";
|
|
286
291
|
export { DuplicatePluginEntryError, DuplicatePluginError, PluginConfiguredTwiceError, UnenforcedMetadataError } from "./plugin.errors.mjs";
|
|
287
292
|
export { InvalidToolUiConfigError, ToolUiConfigurationError } from "./tool-ui.errors.mjs";
|
|
288
293
|
export {
|
|
@@ -307,12 +312,15 @@ export {
|
|
|
307
312
|
CallRecorderConfigurationError,
|
|
308
313
|
ClusterScopeNeedsRedisError,
|
|
309
314
|
ConfigNotFoundError,
|
|
315
|
+
ContainerDisposedError,
|
|
316
|
+
ContainerProviderScopeError,
|
|
310
317
|
ContextExtensionNotAvailableError,
|
|
311
318
|
CredentialProviderAlreadyRegisteredError,
|
|
312
319
|
CrossOriginRequestError,
|
|
313
320
|
DependencyCycleError,
|
|
314
321
|
DependencyNotFoundError,
|
|
315
322
|
DuplicateAppIdError,
|
|
323
|
+
DutyLeaseKeyError,
|
|
316
324
|
DutyNameConflictError,
|
|
317
325
|
DynamicAdapterNameError,
|
|
318
326
|
DynamicJobDirectExecutionError,
|
|
@@ -460,8 +468,10 @@ export {
|
|
|
460
468
|
ServerNotFoundError,
|
|
461
469
|
ServerlessHandlerNotInitializedError,
|
|
462
470
|
SessionClaimConflictError,
|
|
471
|
+
SessionEndUnconfirmedError,
|
|
463
472
|
SessionIdEmptyError,
|
|
464
473
|
SessionIdentityRequiredError,
|
|
474
|
+
SessionLimitReachedError,
|
|
465
475
|
SessionMissingError,
|
|
466
476
|
SessionOwnerUnreachableError,
|
|
467
477
|
SessionSecretRequiredError,
|
|
@@ -33,18 +33,36 @@ var JobInterruptedError = class extends PublicMcpError {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
var JobRunnerUnavailableError = class extends PublicMcpError {
|
|
36
|
-
constructor(jobName, why, remedy) {
|
|
37
|
-
super(
|
|
36
|
+
constructor(jobName, why, remedy, kind = "Job") {
|
|
37
|
+
super(`${kind} "${jobName}" cannot use its runner: ${why}`, "JOB_RUNNER_UNAVAILABLE", 501, void 0, {
|
|
38
38
|
say: remedy
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
var JobRunnerBootError = class extends PublicMcpError {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
/** Why the runner did not start, as the system or its boot reported it; never sent to a caller. */
|
|
44
|
+
reason;
|
|
45
|
+
constructor(runId, reason) {
|
|
46
|
+
super(`The detached runner of run "${runId}" did not start`, "JOB_RUNNER_BOOT_FAILED", 503, void 0, {
|
|
45
47
|
say: "Run the job again; if it keeps failing, check that the server starts from its entry",
|
|
46
48
|
tool: "execute_job"
|
|
47
49
|
});
|
|
50
|
+
this.reason = reason;
|
|
51
|
+
}
|
|
52
|
+
getInternalMessage() {
|
|
53
|
+
return `${this.message}: ${this.reason}`;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var JobRunnerBusyError = class extends PublicMcpError {
|
|
57
|
+
constructor(name, active, limit, kind = "Job") {
|
|
58
|
+
const holder = limit === "server" ? "this server holds" : "you hold";
|
|
59
|
+
super(
|
|
60
|
+
`${kind} "${name}" was not started: ${holder} ${active} detached runs, the most allowed at once`,
|
|
61
|
+
"JOB_RUNNER_BUSY",
|
|
62
|
+
429,
|
|
63
|
+
void 0,
|
|
64
|
+
{ say: "Retry once a detached run has ended, or ask the operator to raise jobs.detached.maxRuns" }
|
|
65
|
+
);
|
|
48
66
|
}
|
|
49
67
|
};
|
|
50
68
|
var JobAdmissionTimeoutError = class extends PublicMcpError {
|
|
@@ -60,6 +78,11 @@ var JobAdmissionTimeoutError = class extends PublicMcpError {
|
|
|
60
78
|
);
|
|
61
79
|
}
|
|
62
80
|
};
|
|
81
|
+
var JobAdmissionLostError = class extends PublicMcpError {
|
|
82
|
+
constructor(jobName, why) {
|
|
83
|
+
super(`Job "${jobName}" lost its admission slot and was stopped: ${why}`, "JOB_ADMISSION_LOST", 503);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
63
86
|
var JobRunNotFoundError = class extends PublicMcpError {
|
|
64
87
|
constructor(runId) {
|
|
65
88
|
super(`Run "${runId}" not found`, "JOB_RUN_NOT_FOUND", 404, void 0, {
|
|
@@ -99,6 +122,7 @@ var JobStoreNotSupportedError = class extends InternalMcpError {
|
|
|
99
122
|
};
|
|
100
123
|
export {
|
|
101
124
|
DynamicJobRegistrationDisabledError,
|
|
125
|
+
JobAdmissionLostError,
|
|
102
126
|
JobAdmissionTimeoutError,
|
|
103
127
|
JobCancelledError,
|
|
104
128
|
JobInterruptedError,
|
|
@@ -107,6 +131,7 @@ export {
|
|
|
107
131
|
JobRunNotCancellableError,
|
|
108
132
|
JobRunNotFoundError,
|
|
109
133
|
JobRunnerBootError,
|
|
134
|
+
JobRunnerBusyError,
|
|
110
135
|
JobRunnerUnavailableError,
|
|
111
136
|
JobStoreNotSupportedError,
|
|
112
137
|
JobTimeoutError
|
|
@@ -321,22 +321,66 @@ var InvalidResourceUriError = class extends PublicMcpError {
|
|
|
321
321
|
super(`Invalid resource URI: ${uri}${reason ? ` (${reason})` : ""}`, "INVALID_RESOURCE_URI", 400);
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
|
+
var MAX_REPORTED_VALIDATION_ISSUES = 20;
|
|
325
|
+
var MAX_VALIDATION_DETAILS_CHARS = 16 * 1024;
|
|
326
|
+
function nestedIssueLists(issue) {
|
|
327
|
+
const nested = issue?.errors;
|
|
328
|
+
return Array.isArray(nested) && nested.every(Array.isArray) ? nested : void 0;
|
|
329
|
+
}
|
|
330
|
+
function countIssues(issue) {
|
|
331
|
+
let count = 0;
|
|
332
|
+
const pending = [issue];
|
|
333
|
+
while (pending.length > 0) {
|
|
334
|
+
count += 1;
|
|
335
|
+
for (const branch of nestedIssueLists(pending.pop()) ?? []) for (const nested of branch) pending.push(nested);
|
|
336
|
+
}
|
|
337
|
+
return count;
|
|
338
|
+
}
|
|
339
|
+
function keepIssues(issues, budget) {
|
|
340
|
+
const kept = [];
|
|
341
|
+
for (const issue of issues) {
|
|
342
|
+
if (budget.left <= 0) {
|
|
343
|
+
budget.omitted += countIssues(issue);
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
budget.left -= 1;
|
|
347
|
+
const nested = nestedIssueLists(issue);
|
|
348
|
+
if (nested) {
|
|
349
|
+
kept.push({ ...issue, errors: nested.map((branch) => keepIssues(branch, budget)) });
|
|
350
|
+
} else {
|
|
351
|
+
kept.push(issue);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return kept;
|
|
355
|
+
}
|
|
324
356
|
var InvalidInputError = class extends PublicMcpError {
|
|
325
357
|
validationErrors;
|
|
358
|
+
/** How many issues past {@link MAX_REPORTED_VALIDATION_ISSUES} were left out of `validationErrors`. */
|
|
359
|
+
omittedValidationErrors = 0;
|
|
326
360
|
constructor(message = "Invalid input: validation failed", validationErrors) {
|
|
327
361
|
super(message, "INVALID_INPUT", 400);
|
|
328
|
-
|
|
362
|
+
if (Array.isArray(validationErrors)) {
|
|
363
|
+
const budget = { left: MAX_REPORTED_VALIDATION_ISSUES, omitted: 0 };
|
|
364
|
+
this.validationErrors = keepIssues(validationErrors, budget);
|
|
365
|
+
this.omittedValidationErrors = budget.omitted;
|
|
366
|
+
} else {
|
|
367
|
+
this.validationErrors = validationErrors;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
detailsText() {
|
|
371
|
+
if (!this.validationErrors) return "";
|
|
372
|
+
let details = JSON.stringify(this.validationErrors, null, 2) ?? "";
|
|
373
|
+
if (details.length > MAX_VALIDATION_DETAILS_CHARS) details = `${details.slice(0, MAX_VALIDATION_DETAILS_CHARS)}\u2026`;
|
|
374
|
+
const omitted = this.omittedValidationErrors ? `
|
|
375
|
+
(${this.omittedValidationErrors} more issue${this.omittedValidationErrors === 1 ? "" : "s"} not shown)` : "";
|
|
376
|
+
return `
|
|
377
|
+
Details: ${details}${omitted}`;
|
|
329
378
|
}
|
|
330
379
|
getInternalMessage() {
|
|
331
|
-
return this.message +
|
|
332
|
-
Details: ${JSON.stringify(this.validationErrors, null, 2)}` : "");
|
|
380
|
+
return this.message + this.detailsText();
|
|
333
381
|
}
|
|
334
382
|
getPublicMessage() {
|
|
335
|
-
|
|
336
|
-
return `${this.message}
|
|
337
|
-
Details: ${JSON.stringify(this.validationErrors, null, 2)}`;
|
|
338
|
-
}
|
|
339
|
-
return this.message;
|
|
383
|
+
return this.message + this.detailsText();
|
|
340
384
|
}
|
|
341
385
|
};
|
|
342
386
|
var InvalidOutputError = class extends InternalMcpError {
|
|
@@ -672,6 +716,8 @@ export {
|
|
|
672
716
|
InvalidPluginScopeError,
|
|
673
717
|
InvalidResourceStoreError,
|
|
674
718
|
InvalidResourceUriError,
|
|
719
|
+
MAX_REPORTED_VALIDATION_ISSUES,
|
|
720
|
+
MAX_VALIDATION_DETAILS_CHARS,
|
|
675
721
|
MCP_ERROR_CODES,
|
|
676
722
|
McpError,
|
|
677
723
|
PayloadTooLargeError,
|
|
@@ -40,6 +40,22 @@ var ProviderConstructionError = class extends InternalMcpError {
|
|
|
40
40
|
this.originalError = cause instanceof Error ? cause : void 0;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
var ContainerDisposedError = class extends InternalMcpError {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(
|
|
46
|
+
"The container was disposed, so a server can't start on it: create the container again, or start the server without it",
|
|
47
|
+
"CONTAINER_DISPOSED"
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var ContainerProviderScopeError = class extends InternalMcpError {
|
|
52
|
+
constructor(tokenName, scope) {
|
|
53
|
+
super(
|
|
54
|
+
`Provider "${tokenName}" has scope "${scope}" here, but the container built it as one instance for every caller: give it the same scope in the container, or list it in only one of them`,
|
|
55
|
+
"CONTAINER_PROVIDER_SCOPE"
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
43
59
|
var ProviderBootstrapError = class extends InternalMcpError {
|
|
44
60
|
originalError;
|
|
45
61
|
constructor(tokenName, cause) {
|
|
@@ -77,6 +93,8 @@ var InvalidDependencyScopeError = class extends InternalMcpError {
|
|
|
77
93
|
}
|
|
78
94
|
};
|
|
79
95
|
export {
|
|
96
|
+
ContainerDisposedError,
|
|
97
|
+
ContainerProviderScopeError,
|
|
80
98
|
DependencyCycleError,
|
|
81
99
|
InvalidDependencyScopeError,
|
|
82
100
|
PluginDependencyError,
|
|
@@ -38,6 +38,13 @@ var UnsupportedContentTypeError = class extends PublicMcpError {
|
|
|
38
38
|
this.contentType = contentType;
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
var SessionLimitReachedError = class extends PublicMcpError {
|
|
42
|
+
maxSessions;
|
|
43
|
+
constructor(maxSessions) {
|
|
44
|
+
super("The server holds as many sessions as it allows. Retry later.", "SESSION_LIMIT_REACHED", 503);
|
|
45
|
+
this.maxSessions = maxSessions;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
41
48
|
var TransportServiceNotAvailableError = class extends InternalMcpError {
|
|
42
49
|
constructor() {
|
|
43
50
|
super("Transport service not available", "TRANSPORT_SERVICE_NOT_AVAILABLE");
|
|
@@ -67,6 +74,28 @@ var SessionOwnerUnreachableError = class extends PublicMcpError {
|
|
|
67
74
|
this.reason = reason;
|
|
68
75
|
}
|
|
69
76
|
};
|
|
77
|
+
var SessionEndUnconfirmedError = class extends PublicMcpError {
|
|
78
|
+
/** Seconds after which a retried DELETE can succeed. */
|
|
79
|
+
retryAfterSeconds;
|
|
80
|
+
/** The instance that did not confirm (a node id, or how many instances). Logged, never sent to the client. */
|
|
81
|
+
holder;
|
|
82
|
+
/** Why it is unconfirmed. Logged, never sent to the client. */
|
|
83
|
+
reason;
|
|
84
|
+
/** `not-listening`: none was asked; `timed-out`: one did not answer; `uncounted`: who to ask is unknown. */
|
|
85
|
+
kind;
|
|
86
|
+
constructor(holder, retryAfterSeconds, reason, kind) {
|
|
87
|
+
const retryAfter = Math.max(1, Math.ceil(retryAfterSeconds));
|
|
88
|
+
super(
|
|
89
|
+
`This MCP session is ending, but an instance of the server that holds it did not confirm that it stopped the session's requests in flight. Retry the DELETE after ${retryAfter}s.`,
|
|
90
|
+
"SESSION_END_UNCONFIRMED",
|
|
91
|
+
503
|
|
92
|
+
);
|
|
93
|
+
this.retryAfterSeconds = retryAfter;
|
|
94
|
+
this.holder = holder;
|
|
95
|
+
this.reason = reason;
|
|
96
|
+
this.kind = kind;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
70
99
|
function octalMode(mode) {
|
|
71
100
|
return `0${(mode & 4095).toString(8)}`;
|
|
72
101
|
}
|
|
@@ -103,6 +132,8 @@ export {
|
|
|
103
132
|
InvalidTransportSessionError,
|
|
104
133
|
MethodNotImplementedError,
|
|
105
134
|
SessionClaimConflictError,
|
|
135
|
+
SessionEndUnconfirmedError,
|
|
136
|
+
SessionLimitReachedError,
|
|
106
137
|
SessionOwnerUnreachableError,
|
|
107
138
|
SocketInUseError,
|
|
108
139
|
SocketPathConflictError,
|