@frontmcp/sdk 1.8.7 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapter/adapter.instance.d.ts +4 -0
- package/adapter/adapter.instance.d.ts.map +1 -1
- package/adapter/adapter.registry.d.ts +2 -0
- package/adapter/adapter.registry.d.ts.map +1 -1
- package/adapter/adapter.utils.d.ts.map +1 -1
- package/agent/agent-call-chain.d.ts +21 -0
- package/agent/agent-call-chain.d.ts.map +1 -0
- package/agent/agent.instance.d.ts +70 -15
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.registry.d.ts +4 -2
- package/agent/agent.registry.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +18 -1
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/agent.utils.d.ts +11 -7
- package/agent/agent.utils.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts +9 -1
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/agent/hooks/agent.hooks.d.ts +4 -4
- package/agent/hooks/agent.hooks.d.ts.map +1 -1
- package/app/instances/app.local.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts +1 -0
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/flows/oauth.auth-ui.flow.d.ts +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +3 -3
- package/auth/flows/oauth.callback.flow.d.ts +2 -2
- package/auth/flows/oauth.connect.flow.d.ts +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +2 -2
- package/auth/flows/oauth.register.flow.d.ts +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/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/session/session-store.factory.d.ts +1 -1
- package/auth/session/session-store.factory.d.ts.map +1 -1
- package/auth/session/utils/session-id.utils.d.ts +5 -0
- package/auth/session/utils/session-id.utils.d.ts.map +1 -1
- package/browser/index.cjs +72652 -0
- package/browser/index.mjs +72019 -0
- package/channel/channel-notification.service.d.ts +24 -5
- package/channel/channel-notification.service.d.ts.map +1 -1
- package/channel/channel-scope.helper.d.ts +2 -0
- package/channel/channel-scope.helper.d.ts.map +1 -1
- package/channel/channel.instance.d.ts +7 -2
- package/channel/channel.instance.d.ts.map +1 -1
- package/channel/flows/list-channels.flow.d.ts.map +1 -1
- package/channel/flows/send-channel-notification.flow.d.ts +14 -1
- package/channel/flows/send-channel-notification.flow.d.ts.map +1 -1
- package/channel/reply/channel-reply.tool.d.ts.map +1 -1
- package/common/availability/availability.utils.d.ts +4 -3
- package/common/availability/availability.utils.d.ts.map +1 -1
- package/common/dynamic/dynamic.adapter.d.ts +13 -7
- package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
- package/common/dynamic/dynamic.plugin.d.ts +9 -4
- package/common/dynamic/dynamic.plugin.d.ts.map +1 -1
- package/common/dynamic/dynamic.utils.d.ts +7 -1
- package/common/dynamic/dynamic.utils.d.ts.map +1 -1
- package/common/entries/channel.entry.d.ts +1 -1
- package/common/entries/channel.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +26 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +19 -3
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/execution-context.interface.d.ts +10 -4
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/prompt.interface.d.ts +12 -0
- package/common/interfaces/prompt.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +36 -19
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +26 -1
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/channel.metadata.d.ts +1 -0
- package/common/metadata/channel.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +1211 -27
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/hook.metadata.d.ts +10 -0
- package/common/metadata/hook.metadata.d.ts.map +1 -1
- package/common/metadata/job.metadata.d.ts +1 -1
- package/common/metadata/prompt.metadata.d.ts +1 -0
- package/common/metadata/prompt.metadata.d.ts.map +1 -1
- package/common/metadata/resource.metadata.d.ts +2 -0
- package/common/metadata/resource.metadata.d.ts.map +1 -1
- package/common/metadata/skill.metadata.d.ts +20 -3
- package/common/metadata/skill.metadata.d.ts.map +1 -1
- package/common/metadata/tool.metadata.d.ts +1 -0
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/metadata/workflow.metadata.d.ts +2 -2
- package/common/records/agent.record.d.ts +5 -1
- package/common/records/agent.record.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +28 -28
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/server.tokens.d.ts +1 -0
- package/common/tokens/server.tokens.d.ts.map +1 -1
- package/common/types/options/elicitation/schema.d.ts +19 -0
- package/common/types/options/elicitation/schema.d.ts.map +1 -1
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/redis/index.d.ts +3 -3
- package/common/types/options/redis/index.d.ts.map +1 -1
- package/common/types/options/redis/interfaces.d.ts +19 -2
- package/common/types/options/redis/interfaces.d.ts.map +1 -1
- package/common/types/options/redis/schema.d.ts +84 -0
- package/common/types/options/redis/schema.d.ts.map +1 -1
- package/common/types/options/session/interfaces.d.ts +4 -2
- package/common/types/options/session/interfaces.d.ts.map +1 -1
- package/common/types/options/skills-http/schema.d.ts +2 -2
- package/common/types/options/sqlite/interfaces.d.ts +8 -0
- package/common/types/options/sqlite/interfaces.d.ts.map +1 -1
- package/common/types/options/sqlite/resolve.d.ts.map +1 -1
- package/common/types/options/sqlite/schema.d.ts +1 -0
- package/common/types/options/sqlite/schema.d.ts.map +1 -1
- package/common/types/options/transport/interfaces.d.ts +3 -9
- package/common/types/options/transport/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts +78 -0
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/common/utils/path.utils.d.ts.map +1 -1
- package/context/call-surface.d.ts +3 -2
- package/context/call-surface.d.ts.map +1 -1
- package/context/frontmcp-context-storage.d.ts +7 -0
- package/context/frontmcp-context-storage.d.ts.map +1 -1
- package/direct/create.d.ts.map +1 -1
- package/direct/direct-server.d.ts +11 -5
- package/direct/direct-server.d.ts.map +1 -1
- package/direct/direct.types.d.ts +100 -14
- package/direct/direct.types.d.ts.map +1 -1
- package/direct/index.d.ts +1 -1
- package/direct/index.d.ts.map +1 -1
- package/direct/runtime-tools.d.ts +16 -0
- package/direct/runtime-tools.d.ts.map +1 -0
- package/errors/agent.errors.d.ts +13 -1
- package/errors/agent.errors.d.ts.map +1 -1
- package/errors/error-handler.d.ts.map +1 -1
- package/errors/index.d.ts +3 -3
- package/errors/index.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +3 -0
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/registry.errors.d.ts +6 -0
- package/errors/registry.errors.d.ts.map +1 -1
- package/errors/transport.errors.d.ts +17 -0
- package/errors/transport.errors.d.ts.map +1 -1
- package/esm/index.mjs +14530 -11874
- package/ext-apps/ext-apps.handler.d.ts +1 -1
- package/ext-apps/ext-apps.handler.d.ts.map +1 -1
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +8 -0
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/ha/ha-config.d.ts +21 -0
- package/ha/ha-config.d.ts.map +1 -0
- package/ha/ha-headers.d.ts +18 -2
- package/ha/ha-headers.d.ts.map +1 -1
- package/ha/ha-manager.d.ts +24 -2
- package/ha/ha-manager.d.ts.map +1 -1
- package/ha/ha.types.d.ts +2 -0
- package/ha/ha.types.d.ts.map +1 -1
- package/ha/heartbeat.service.d.ts +9 -0
- package/ha/heartbeat.service.d.ts.map +1 -1
- package/ha/index.d.ts +3 -1
- package/ha/index.d.ts.map +1 -1
- package/ha/notification-relay.d.ts +15 -18
- package/ha/notification-relay.d.ts.map +1 -1
- package/ha/relay-messages.d.ts +114 -0
- package/ha/relay-messages.d.ts.map +1 -0
- package/ha/session-takeover.d.ts.map +1 -1
- package/hooks/entry-class-hooks.d.ts +27 -0
- package/hooks/entry-class-hooks.d.ts.map +1 -0
- package/hooks/hook.registry.d.ts +11 -0
- package/hooks/hook.registry.d.ts.map +1 -1
- package/hooks/hooks.utils.d.ts +19 -5
- package/hooks/hooks.utils.d.ts.map +1 -1
- package/index.d.ts +31 -13
- package/index.d.ts.map +1 -1
- package/index.js +15499 -12838
- package/job/execution/job-execution.manager.d.ts.map +1 -1
- package/job/job.instance.d.ts.map +1 -1
- package/job/job.registry.d.ts.map +1 -1
- package/metrics/index.d.ts +1 -1
- package/metrics/index.d.ts.map +1 -1
- package/metrics/metrics.routes.d.ts +23 -0
- package/metrics/metrics.routes.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 +24 -0
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +16 -10
- package/plugin/plugin.registry.d.ts +5 -1
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/prompt/flows/get-prompt.flow.d.ts +3 -0
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/prompt/prompt.instance.d.ts.map +1 -1
- package/prompt/prompt.registry.d.ts +19 -1
- package/prompt/prompt.registry.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +33 -3
- package/provider/provider.registry.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +3 -0
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/resource.instance.d.ts.map +1 -1
- package/resource/resource.registry.d.ts +19 -1
- package/resource/resource.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +12 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +12 -1
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/middleware/cors-env.d.ts +17 -0
- package/server/middleware/cors-env.d.ts.map +1 -0
- package/server/security/security-audit.d.ts +2 -0
- package/server/security/security-audit.d.ts.map +1 -1
- package/server/server.instance.d.ts.map +1 -1
- package/skill/auth/skill-http-auth.d.ts.map +1 -1
- package/skill/errors/skill-validation.error.d.ts +2 -2
- package/skill/errors/skill-validation.error.d.ts.map +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +1 -1
- package/skill/providers/memory-skill.provider.d.ts +22 -15
- package/skill/providers/memory-skill.provider.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +8 -6
- package/skill/skill.registry.d.ts.map +1 -1
- package/task/store/task-store.factory.d.ts +1 -0
- package/task/store/task-store.factory.d.ts.map +1 -1
- package/task/task.types.d.ts +2 -0
- package/task/task.types.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +3 -0
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.registry.d.ts +10 -1
- package/tool/tool.registry.d.ts.map +1 -1
- package/tool/ui/ui-option-warnings.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/transport/adapters/sse-transport.d.ts +1 -1
- package/transport/adapters/sse-transport.d.ts.map +1 -1
- package/transport/bus/redis-transport-bus.d.ts +28 -21
- package/transport/bus/redis-transport-bus.d.ts.map +1 -1
- package/transport/event-stores/event-store.factory.d.ts.map +1 -1
- package/transport/flow-error-output.d.ts +8 -0
- package/transport/flow-error-output.d.ts.map +1 -0
- package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
- package/transport/flows/handle.sse.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/in-memory-server.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
- package/transport/relay/index.d.ts +5 -0
- package/transport/relay/index.d.ts.map +1 -0
- package/transport/relay/relay-flow.d.ts +17 -0
- package/transport/relay/relay-flow.d.ts.map +1 -0
- package/transport/relay/relay-http.d.ts +109 -0
- package/transport/relay/relay-http.d.ts.map +1 -0
- package/transport/relay/relay-scope.helper.d.ts +46 -0
- package/transport/relay/relay-scope.helper.d.ts.map +1 -0
- package/transport/relay/session-relay.d.ts +105 -0
- package/transport/relay/session-relay.d.ts.map +1 -0
- package/transport/session-mode.check.d.ts +18 -0
- package/transport/session-mode.check.d.ts.map +1 -0
- package/transport/transport.registry.d.ts +61 -2
- package/transport/transport.registry.d.ts.map +1 -1
- package/transport/transport.remote.d.ts +16 -5
- package/transport/transport.remote.d.ts.map +1 -1
- package/transport/transport.types.d.ts +20 -11
- package/transport/transport.types.d.ts.map +1 -1
- package/transport/web-fetch-handler.d.ts +11 -0
- package/transport/web-fetch-handler.d.ts.map +1 -1
- package/transport/web-standard-mcp.d.ts.map +1 -1
- package/utils/dynamic-import.utils.d.ts +20 -0
- package/utils/dynamic-import.utils.d.ts.map +1 -0
- package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { StoredSession } from '@frontmcp/auth';
|
|
2
|
-
import type { ServerResponse, TransportPersistenceConfigInput } from '../common';
|
|
2
|
+
import type { ServerRequest, ServerResponse, TransportPersistenceConfigInput } from '../common';
|
|
3
|
+
import type { ClaimedSessionInfo } from '../ha';
|
|
3
4
|
import type { Scope } from '../scope';
|
|
4
|
-
import { type TransportBus, type Transporter, type TransportType } from './transport.types';
|
|
5
|
+
import { type RemoteLocation, type TransportBus, type Transporter, type TransportType } from './transport.types';
|
|
5
6
|
export declare class TransportService {
|
|
6
7
|
readonly ready: Promise<void>;
|
|
7
8
|
private readonly byType;
|
|
@@ -70,6 +71,14 @@ export declare class TransportService {
|
|
|
70
71
|
private destroyed;
|
|
71
72
|
/** Last time a request refreshed the stored session's TTL, by session id. */
|
|
72
73
|
private readonly lastTtlRefreshAt;
|
|
74
|
+
/** Last time a request re-advertised a served session on the transport bus, by session id. */
|
|
75
|
+
private readonly lastBusRefreshAt;
|
|
76
|
+
/** Session ids with a transport on this node (any type / token), with their transport count. */
|
|
77
|
+
private readonly localSessionIds;
|
|
78
|
+
/** The HA liveness generation in which this node last confirmed it owns a local session, by session id. */
|
|
79
|
+
private readonly ownershipGeneration;
|
|
80
|
+
/** Sessions whose local transports are being dropped because another node owns them now. */
|
|
81
|
+
private readonly relinquishing;
|
|
73
82
|
/**
|
|
74
83
|
* Redis key prefix under which session records are stored.
|
|
75
84
|
* The session store appends `session:` to the transport key prefix.
|
|
@@ -116,6 +125,8 @@ export declare class TransportService {
|
|
|
116
125
|
/** The backend kind selected at construction (`undefined` if none). Used by
|
|
117
126
|
* the orphan-sqlite WARN guard in scope.instance.ts and by error telemetry. */
|
|
118
127
|
getBackendKind(): 'redis' | 'vercel-kv' | 'sqlite' | undefined;
|
|
128
|
+
/** The configured backend as an operator reads it in a log line. */
|
|
129
|
+
private sessionStoreLabel;
|
|
119
130
|
/**
|
|
120
131
|
* Slide the stored session's TTL while this instance is serving it. Redis and Vercel KV
|
|
121
132
|
* session stores extend the TTL on read, so a plain `get` is enough. Throttled per session
|
|
@@ -123,6 +134,47 @@ export declare class TransportService {
|
|
|
123
134
|
*/
|
|
124
135
|
private refreshStoredSessionTtl;
|
|
125
136
|
getTransporter(type: TransportType, token: string, sessionId: string): Promise<Transporter | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* Distributed routing: the node a request must be relayed to, because another live node
|
|
139
|
+
* owns the session it presents. `undefined` means "serve it here": the session is local,
|
|
140
|
+
* unknown, owned by this node, or owned by a node that stopped (this node takes it over).
|
|
141
|
+
*
|
|
142
|
+
* Runs before authentication — it only decides where the request is served; the owner
|
|
143
|
+
* authenticates it. Only session ids this deployment minted cost a Redis lookup.
|
|
144
|
+
*/
|
|
145
|
+
findRemoteSessionOwner(request: ServerRequest): Promise<RemoteLocation | undefined>;
|
|
146
|
+
/**
|
|
147
|
+
* The node that owns a session: the transport bus entry, else the persisted session record.
|
|
148
|
+
* `undefined` when neither knows the session.
|
|
149
|
+
*/
|
|
150
|
+
lookupSessionOwner(sessionId: string): Promise<RemoteLocation | undefined>;
|
|
151
|
+
/**
|
|
152
|
+
* Relay a request to the node that owns its session and write that node's response.
|
|
153
|
+
* @throws SessionOwnerUnreachableError when the owner could not serve it (nothing written yet).
|
|
154
|
+
*/
|
|
155
|
+
relayToSessionOwner(location: RemoteLocation, request: ServerRequest, response: ServerResponse): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* The orphan scanner claimed a session of a stopped node for this node: point the
|
|
158
|
+
* transport bus at this node, so every node relays the session's requests here. The
|
|
159
|
+
* transport itself is recreated from the session store by the first request.
|
|
160
|
+
*/
|
|
161
|
+
adoptClaimedSession(sessionId: string, previousNodeId: string, info: ClaimedSessionInfo): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Destroy this node's transports for a session (asked by another node through the relay).
|
|
164
|
+
* @returns Whether a transport was found.
|
|
165
|
+
*/
|
|
166
|
+
destroyLocalSession(sessionId: string, reason?: string): Promise<boolean>;
|
|
167
|
+
/**
|
|
168
|
+
* Whether this node still owns a session it holds a transport for. After a gap in this node's
|
|
169
|
+
* heartbeat another node may have taken the session over: the persisted record decides, once per
|
|
170
|
+
* liveness generation, and a session that moved is dropped here (its record is left to the new owner).
|
|
171
|
+
* When the record cannot be read the session is served here, and checked again on its next request.
|
|
172
|
+
*/
|
|
173
|
+
private holdsLocalSession;
|
|
174
|
+
/** Whether a node's heartbeat is present (`true` when liveness cannot be determined). */
|
|
175
|
+
private isNodeAlive;
|
|
176
|
+
/** Re-advertise a session this node serves, so its bus entry does not expire under it. */
|
|
177
|
+
private refreshBusAdvertisement;
|
|
126
178
|
/**
|
|
127
179
|
* Get stored session from Redis (without creating a transport).
|
|
128
180
|
* Used by flows to check if session exists and can be recreated.
|
|
@@ -151,6 +203,11 @@ export declare class TransportService {
|
|
|
151
203
|
* @returns The recreated transport
|
|
152
204
|
*/
|
|
153
205
|
recreateTransporter(type: TransportType, token: string, sessionId: string, storedSession: StoredSession, res: ServerResponse): Promise<Transporter>;
|
|
206
|
+
/**
|
|
207
|
+
* A transporter that relays to `ownerNodeId` when that node is alive and the transport bus
|
|
208
|
+
* is available; `undefined` when the owner stopped (its session can be taken over).
|
|
209
|
+
*/
|
|
210
|
+
private remoteOwnerTransporter;
|
|
154
211
|
/**
|
|
155
212
|
* Internal method to actually recreate the transport (called with mutex protection)
|
|
156
213
|
*/
|
|
@@ -160,6 +217,8 @@ export declare class TransportService {
|
|
|
160
217
|
* Internal method to actually create the transport (called with mutex protection)
|
|
161
218
|
*/
|
|
162
219
|
private doCreateTransporter;
|
|
220
|
+
/** A session transport went away: forget it, and its bus entry and stored record unless another node owns them now. */
|
|
221
|
+
private onSessionTransportDisposed;
|
|
163
222
|
destroyTransporter(type: TransportType, token: string, sessionId: string, reason?: string): Promise<void>;
|
|
164
223
|
/**
|
|
165
224
|
* Update the stored session in Redis with client capabilities from the initialize handshake.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.registry.d.ts","sourceRoot":"","sources":["../../src/transport/transport.registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.registry.d.ts","sourceRoot":"","sources":["../../src/transport/transport.registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKlE,OAAO,KAAK,EA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AAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB/G;;;;;;OAMG;IACG,+BAA+B,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCpH;;;OAGG;IACG,sCAAsC,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5G;;;OAGG;IACG,0CAA0C,CAC9C,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,WAAW,CAAC;IAuBvB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAMjF;;;OAGG;IACG,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkBrG,OAAO,CAAC,MAAM;IAId;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;IA0DnB,OAAO,CAAC,UAAU;CAkBnB"}
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import { type ServerResponse } from '../common';
|
|
2
2
|
import { type AuthenticatedServerRequest } from '../server/server.types';
|
|
3
|
-
import { type TransportBus, type Transporter, type TransportKey, type TransportType } from './transport.types';
|
|
3
|
+
import { type RemoteLocation, type TransportBus, type Transporter, type TransportKey, type TransportType } from './transport.types';
|
|
4
|
+
/**
|
|
5
|
+
* Transporter for a session owned by another live node of a distributed deployment.
|
|
6
|
+
*
|
|
7
|
+
* Requests are relayed to the owning node, which serves them on its own transport;
|
|
8
|
+
* its response is streamed back to this node's client. When the owner cannot be
|
|
9
|
+
* reached the client gets a retryable `503` instead.
|
|
10
|
+
*/
|
|
4
11
|
export declare class RemoteTransporter implements Transporter {
|
|
5
12
|
private readonly key;
|
|
6
13
|
private readonly bus;
|
|
14
|
+
private readonly location;
|
|
7
15
|
readonly type: TransportType;
|
|
8
16
|
readonly tokenHash: string;
|
|
9
17
|
readonly sessionId: string;
|
|
10
|
-
constructor(key: TransportKey, bus: TransportBus);
|
|
11
|
-
|
|
18
|
+
constructor(key: TransportKey, bus: TransportBus, location: RemoteLocation);
|
|
19
|
+
/** The node that owns the session. */
|
|
20
|
+
get ownerNodeId(): string;
|
|
21
|
+
ping(_timeoutMs?: number): Promise<boolean>;
|
|
12
22
|
initialize(req: AuthenticatedServerRequest, res: ServerResponse): Promise<void>;
|
|
13
|
-
handleRequest(
|
|
14
|
-
destroy(
|
|
23
|
+
handleRequest(req: AuthenticatedServerRequest, res: ServerResponse): Promise<void>;
|
|
24
|
+
destroy(reason?: string): Promise<void>;
|
|
15
25
|
get isInitialized(): boolean;
|
|
16
26
|
markAsInitialized(): void;
|
|
17
27
|
resetForReinitialization(): void;
|
|
18
28
|
reregisterServer(): void;
|
|
29
|
+
private relay;
|
|
19
30
|
}
|
|
20
31
|
//# sourceMappingURL=transport.remote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.remote.d.ts","sourceRoot":"","sources":["../../src/transport/transport.remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transport.remote.d.ts","sourceRoot":"","sources":["../../src/transport/transport.remote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IAMjD,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAP3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAGR,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,cAAc;IAO3C,sCAAsC;IACtC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C,UAAU,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E,aAAa,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5E,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,IAAI,IAAI;IAIhC,gBAAgB,IAAI,IAAI;YAIV,KAAK;CAUpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ServerResponse } from '../common';
|
|
1
|
+
import { type ServerRequest, type ServerResponse } from '../common';
|
|
2
2
|
import { type AuthenticatedServerRequest } from '../server/server.types';
|
|
3
3
|
export type TransportType = 'sse' | 'streamable-http' | 'http' | 'stateless-http' | 'in-memory' | 'stdio';
|
|
4
4
|
/** Session id the stateless HTTP transport gives every request; it identifies no client. */
|
|
@@ -14,21 +14,30 @@ export interface RemoteLocation {
|
|
|
14
14
|
nodeId: string;
|
|
15
15
|
channel: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Distributed session registry: which node owns which session, and the relay that
|
|
19
|
+
* serves a request on the owning node.
|
|
20
|
+
*/
|
|
17
21
|
export interface TransportBus {
|
|
18
22
|
nodeId(): string;
|
|
23
|
+
/** Record that this node owns the session. */
|
|
19
24
|
advertise(key: TransportKey): Promise<void>;
|
|
25
|
+
/** Drop this node's ownership record (only when it still owns the session). */
|
|
20
26
|
revoke(key: TransportKey): Promise<void>;
|
|
27
|
+
/** The node owning this exact session (same type and token), unless it is this node. */
|
|
21
28
|
lookup(key: TransportKey): Promise<RemoteLocation | null>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/** The node owning a session id, whatever its type or token — this node included. */
|
|
30
|
+
lookupOwner(sessionId: string): Promise<RemoteLocation | null>;
|
|
31
|
+
/** Relay channel of a node. */
|
|
32
|
+
channelOf(nodeId: string): string;
|
|
33
|
+
/** Whether requests can be relayed to another node from here. */
|
|
34
|
+
canRelay(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Serve a request on the node that owns its session and write that node's response.
|
|
37
|
+
* @throws SessionOwnerUnreachableError when the owner could not serve it (nothing written yet).
|
|
38
|
+
*/
|
|
39
|
+
proxyRequest(location: RemoteLocation, sessionId: string, request: ServerRequest, response: ServerResponse): Promise<void>;
|
|
40
|
+
/** Ask the owning node to destroy its transport for the session. */
|
|
32
41
|
destroyRemote(key: TransportKey, reason?: string): Promise<void>;
|
|
33
42
|
}
|
|
34
43
|
export interface Transporter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.types.d.ts","sourceRoot":"","sources":["../../src/transport/transport.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.types.d.ts","sourceRoot":"","sources":["../../src/transport/transport.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,iBAAiB,GAAG,MAAM,GAAG,gBAAgB,GAAG,WAAW,GAAG,OAAO,CAAC;AAE1G,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,IAAI,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C,+EAA+E;IAC/E,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,wFAAwF;IACxF,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAE1D,qFAAqF;IACrF,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAA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,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AACpE,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type MetricsOptionsInterface } from '../common/types/options/metrics';
|
|
2
|
+
import { type MetricsService } from '../metrics/metrics.service';
|
|
1
3
|
import { type Scope } from '../scope/scope.instance';
|
|
2
4
|
import { type WebStandardMcpPair } from './web-standard-mcp';
|
|
3
5
|
/**
|
|
@@ -81,6 +83,15 @@ export interface CreateWebFetchHandlerOptions {
|
|
|
81
83
|
* in the adapter regardless.
|
|
82
84
|
*/
|
|
83
85
|
sessionRouter?: WebFetchSessionRouter;
|
|
86
|
+
/**
|
|
87
|
+
* The `/metrics` endpoint (`@FrontMcp({ metrics: { enabled: true } })`).
|
|
88
|
+
* `createFetchHandler()` passes the server's service here, as the Express
|
|
89
|
+
* host registers it as a route, so both answer the same scrape.
|
|
90
|
+
*/
|
|
91
|
+
metrics?: {
|
|
92
|
+
service: MetricsService;
|
|
93
|
+
config: MetricsOptionsInterface;
|
|
94
|
+
};
|
|
84
95
|
}
|
|
85
96
|
/**
|
|
86
97
|
* Build a Web-standard fetch handler for a Scope.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-fetch-handler.d.ts","sourceRoot":"","sources":["../../src/transport/web-fetch-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web-fetch-handler.d.ts","sourceRoot":"","sources":["../../src/transport/web-fetch-handler.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAQ/E,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE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C,CAAC,CAAC,CAAC;IACxB,gGAAgG;IAChG,iBAAiB,IAAI,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EACnD,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC7B,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAO,GACzE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAkC3B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,iBAAiB,SAAI,GAAG,QAAQ,CAatF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-standard-mcp.d.ts","sourceRoot":"","sources":["../../src/transport/web-standard-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"web-standard-mcp.d.ts","sourceRoot":"","sources":["../../src/transport/web-standard-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAA4B,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAE9E,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE;QAAE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC;IACtC,SAAS,EAAE;QACT,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;SAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,gGAAgG;IAChG,KAAK,CAAC,EAAE,2BAA2B,CAAC;CACrC;AAED,MAAM,WAAW,wBAAwB;IACvC,uFAAuF;IACvF,aAAa,EAAE,mBAAmB,CAAC;IACnC,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,0GAA0G;IAC1G,GAAG,EAAE,OAAO,CAAC;IACb,yGAAyG;IACzG,GAAG,CAAC,EAAE;QAAE,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;IACtD;;;;OAIG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAkCD;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CACjD,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,2BAA2B,CAAA;CAAE,GAClE,OAAO,CAAC,kBAAkB,CAAC,CAI7B;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,QAAQ,CAAC,CAsCnB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a module lazily with a dynamic `import()`, falling back to `require` when the runtime
|
|
3
|
+
* cannot run the dynamic import.
|
|
4
|
+
*
|
|
5
|
+
* The SDK's CommonJS build keeps `import()` for lazily loaded packages. Jest runs CommonJS
|
|
6
|
+
* modules in a `vm` context, where a dynamic `import()` throws
|
|
7
|
+
* `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG` unless the whole run uses
|
|
8
|
+
* `--experimental-vm-modules` — and with that flag on, Jest's ESM loader can fail on a CommonJS
|
|
9
|
+
* package instead. Either way a FrontMCP server started inside a test (`createHandler()`,
|
|
10
|
+
* `createDirect()`, `connect()`) died on the first lazy import (#680).
|
|
11
|
+
*
|
|
12
|
+
* The dynamic import is tried first, so bundlers (browser, worker) and native ESM keep their
|
|
13
|
+
* behaviour; `require` is only used after it failed and where one exists. When the fallback fails
|
|
14
|
+
* too, the ORIGINAL error is rethrown, so a genuinely missing package is still reported as such.
|
|
15
|
+
*
|
|
16
|
+
* Pass literal specifiers in both callbacks (`() => import('pkg')`, `() => require('pkg')`) so
|
|
17
|
+
* bundlers can see them.
|
|
18
|
+
*/
|
|
19
|
+
export declare function importWithRequireFallback<T>(dynamicImport: () => Promise<T>, requireFallback: () => T): Promise<T>;
|
|
20
|
+
//# sourceMappingURL=dynamic-import.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-import.utils.d.ts","sourceRoot":"","sources":["../../src/utils/dynamic-import.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,EAC/C,aAAa,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC/B,eAAe,EAAE,MAAM,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAUZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step.executor.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow-step.executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAk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