@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.
Files changed (267) hide show
  1. package/adapter/adapter.instance.d.ts +4 -0
  2. package/adapter/adapter.instance.d.ts.map +1 -1
  3. package/adapter/adapter.registry.d.ts +2 -0
  4. package/adapter/adapter.registry.d.ts.map +1 -1
  5. package/adapter/adapter.utils.d.ts.map +1 -1
  6. package/agent/agent-call-chain.d.ts +21 -0
  7. package/agent/agent-call-chain.d.ts.map +1 -0
  8. package/agent/agent.instance.d.ts +70 -15
  9. package/agent/agent.instance.d.ts.map +1 -1
  10. package/agent/agent.registry.d.ts +4 -2
  11. package/agent/agent.registry.d.ts.map +1 -1
  12. package/agent/agent.scope.d.ts +18 -1
  13. package/agent/agent.scope.d.ts.map +1 -1
  14. package/agent/agent.utils.d.ts +11 -7
  15. package/agent/agent.utils.d.ts.map +1 -1
  16. package/agent/flows/call-agent.flow.d.ts +9 -1
  17. package/agent/flows/call-agent.flow.d.ts.map +1 -1
  18. package/agent/hooks/agent.hooks.d.ts +4 -4
  19. package/agent/hooks/agent.hooks.d.ts.map +1 -1
  20. package/app/instances/app.local.instance.d.ts.map +1 -1
  21. package/app/instances/app.remote.instance.d.ts +1 -0
  22. package/app/instances/app.remote.instance.d.ts.map +1 -1
  23. package/auth/flows/oauth.auth-ui.flow.d.ts +1 -1
  24. package/auth/flows/oauth.authorize.flow.d.ts +3 -3
  25. package/auth/flows/oauth.callback.flow.d.ts +2 -2
  26. package/auth/flows/oauth.connect.flow.d.ts +1 -1
  27. package/auth/flows/oauth.provider-callback.flow.d.ts +2 -2
  28. package/auth/flows/oauth.register.flow.d.ts +1 -1
  29. package/auth/flows/oauth.token.flow.d.ts +1 -1
  30. package/auth/flows/oauth.userinfo.flow.d.ts +1 -1
  31. package/auth/flows/well-known.jwks.flow.d.ts +3 -3
  32. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +2 -2
  33. package/auth/flows/well-known.prm.flow.d.ts +1 -1
  34. package/auth/session/session-store.factory.d.ts +1 -1
  35. package/auth/session/session-store.factory.d.ts.map +1 -1
  36. package/auth/session/utils/session-id.utils.d.ts +5 -0
  37. package/auth/session/utils/session-id.utils.d.ts.map +1 -1
  38. package/browser/index.cjs +72652 -0
  39. package/browser/index.mjs +72019 -0
  40. package/channel/channel-notification.service.d.ts +24 -5
  41. package/channel/channel-notification.service.d.ts.map +1 -1
  42. package/channel/channel-scope.helper.d.ts +2 -0
  43. package/channel/channel-scope.helper.d.ts.map +1 -1
  44. package/channel/channel.instance.d.ts +7 -2
  45. package/channel/channel.instance.d.ts.map +1 -1
  46. package/channel/flows/list-channels.flow.d.ts.map +1 -1
  47. package/channel/flows/send-channel-notification.flow.d.ts +14 -1
  48. package/channel/flows/send-channel-notification.flow.d.ts.map +1 -1
  49. package/channel/reply/channel-reply.tool.d.ts.map +1 -1
  50. package/common/availability/availability.utils.d.ts +4 -3
  51. package/common/availability/availability.utils.d.ts.map +1 -1
  52. package/common/dynamic/dynamic.adapter.d.ts +13 -7
  53. package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
  54. package/common/dynamic/dynamic.plugin.d.ts +9 -4
  55. package/common/dynamic/dynamic.plugin.d.ts.map +1 -1
  56. package/common/dynamic/dynamic.utils.d.ts +7 -1
  57. package/common/dynamic/dynamic.utils.d.ts.map +1 -1
  58. package/common/entries/channel.entry.d.ts +1 -1
  59. package/common/entries/channel.entry.d.ts.map +1 -1
  60. package/common/entries/scope.entry.d.ts +26 -0
  61. package/common/entries/scope.entry.d.ts.map +1 -1
  62. package/common/interfaces/agent.interface.d.ts +19 -3
  63. package/common/interfaces/agent.interface.d.ts.map +1 -1
  64. package/common/interfaces/execution-context.interface.d.ts +10 -4
  65. package/common/interfaces/execution-context.interface.d.ts.map +1 -1
  66. package/common/interfaces/prompt.interface.d.ts +12 -0
  67. package/common/interfaces/prompt.interface.d.ts.map +1 -1
  68. package/common/metadata/agent.metadata.d.ts +36 -19
  69. package/common/metadata/agent.metadata.d.ts.map +1 -1
  70. package/common/metadata/app.metadata.d.ts +26 -1
  71. package/common/metadata/app.metadata.d.ts.map +1 -1
  72. package/common/metadata/channel.metadata.d.ts +1 -0
  73. package/common/metadata/channel.metadata.d.ts.map +1 -1
  74. package/common/metadata/front-mcp.metadata.d.ts +1211 -27
  75. package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
  76. package/common/metadata/hook.metadata.d.ts +10 -0
  77. package/common/metadata/hook.metadata.d.ts.map +1 -1
  78. package/common/metadata/job.metadata.d.ts +1 -1
  79. package/common/metadata/prompt.metadata.d.ts +1 -0
  80. package/common/metadata/prompt.metadata.d.ts.map +1 -1
  81. package/common/metadata/resource.metadata.d.ts +2 -0
  82. package/common/metadata/resource.metadata.d.ts.map +1 -1
  83. package/common/metadata/skill.metadata.d.ts +20 -3
  84. package/common/metadata/skill.metadata.d.ts.map +1 -1
  85. package/common/metadata/tool.metadata.d.ts +1 -0
  86. package/common/metadata/tool.metadata.d.ts.map +1 -1
  87. package/common/metadata/workflow.metadata.d.ts +2 -2
  88. package/common/records/agent.record.d.ts +5 -1
  89. package/common/records/agent.record.d.ts.map +1 -1
  90. package/common/schemas/http-output.schema.d.ts +28 -28
  91. package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
  92. package/common/tokens/server.tokens.d.ts +1 -0
  93. package/common/tokens/server.tokens.d.ts.map +1 -1
  94. package/common/types/options/elicitation/schema.d.ts +19 -0
  95. package/common/types/options/elicitation/schema.d.ts.map +1 -1
  96. package/common/types/options/http/schema.d.ts.map +1 -1
  97. package/common/types/options/redis/index.d.ts +3 -3
  98. package/common/types/options/redis/index.d.ts.map +1 -1
  99. package/common/types/options/redis/interfaces.d.ts +19 -2
  100. package/common/types/options/redis/interfaces.d.ts.map +1 -1
  101. package/common/types/options/redis/schema.d.ts +84 -0
  102. package/common/types/options/redis/schema.d.ts.map +1 -1
  103. package/common/types/options/session/interfaces.d.ts +4 -2
  104. package/common/types/options/session/interfaces.d.ts.map +1 -1
  105. package/common/types/options/skills-http/schema.d.ts +2 -2
  106. package/common/types/options/sqlite/interfaces.d.ts +8 -0
  107. package/common/types/options/sqlite/interfaces.d.ts.map +1 -1
  108. package/common/types/options/sqlite/resolve.d.ts.map +1 -1
  109. package/common/types/options/sqlite/schema.d.ts +1 -0
  110. package/common/types/options/sqlite/schema.d.ts.map +1 -1
  111. package/common/types/options/transport/interfaces.d.ts +3 -9
  112. package/common/types/options/transport/interfaces.d.ts.map +1 -1
  113. package/common/types/options/transport/schema.d.ts +78 -0
  114. package/common/types/options/transport/schema.d.ts.map +1 -1
  115. package/common/utils/path.utils.d.ts.map +1 -1
  116. package/context/call-surface.d.ts +3 -2
  117. package/context/call-surface.d.ts.map +1 -1
  118. package/context/frontmcp-context-storage.d.ts +7 -0
  119. package/context/frontmcp-context-storage.d.ts.map +1 -1
  120. package/direct/create.d.ts.map +1 -1
  121. package/direct/direct-server.d.ts +11 -5
  122. package/direct/direct-server.d.ts.map +1 -1
  123. package/direct/direct.types.d.ts +100 -14
  124. package/direct/direct.types.d.ts.map +1 -1
  125. package/direct/index.d.ts +1 -1
  126. package/direct/index.d.ts.map +1 -1
  127. package/direct/runtime-tools.d.ts +16 -0
  128. package/direct/runtime-tools.d.ts.map +1 -0
  129. package/errors/agent.errors.d.ts +13 -1
  130. package/errors/agent.errors.d.ts.map +1 -1
  131. package/errors/error-handler.d.ts.map +1 -1
  132. package/errors/index.d.ts +3 -3
  133. package/errors/index.d.ts.map +1 -1
  134. package/errors/mcp.error.d.ts +3 -0
  135. package/errors/mcp.error.d.ts.map +1 -1
  136. package/errors/registry.errors.d.ts +6 -0
  137. package/errors/registry.errors.d.ts.map +1 -1
  138. package/errors/transport.errors.d.ts +17 -0
  139. package/errors/transport.errors.d.ts.map +1 -1
  140. package/esm/index.mjs +14530 -11874
  141. package/ext-apps/ext-apps.handler.d.ts +1 -1
  142. package/ext-apps/ext-apps.handler.d.ts.map +1 -1
  143. package/flows/flow.instance.d.ts.map +1 -1
  144. package/front-mcp/front-mcp.d.ts +8 -0
  145. package/front-mcp/front-mcp.d.ts.map +1 -1
  146. package/front-mcp/front-mcp.providers.d.ts.map +1 -1
  147. package/ha/ha-config.d.ts +21 -0
  148. package/ha/ha-config.d.ts.map +1 -0
  149. package/ha/ha-headers.d.ts +18 -2
  150. package/ha/ha-headers.d.ts.map +1 -1
  151. package/ha/ha-manager.d.ts +24 -2
  152. package/ha/ha-manager.d.ts.map +1 -1
  153. package/ha/ha.types.d.ts +2 -0
  154. package/ha/ha.types.d.ts.map +1 -1
  155. package/ha/heartbeat.service.d.ts +9 -0
  156. package/ha/heartbeat.service.d.ts.map +1 -1
  157. package/ha/index.d.ts +3 -1
  158. package/ha/index.d.ts.map +1 -1
  159. package/ha/notification-relay.d.ts +15 -18
  160. package/ha/notification-relay.d.ts.map +1 -1
  161. package/ha/relay-messages.d.ts +114 -0
  162. package/ha/relay-messages.d.ts.map +1 -0
  163. package/ha/session-takeover.d.ts.map +1 -1
  164. package/hooks/entry-class-hooks.d.ts +27 -0
  165. package/hooks/entry-class-hooks.d.ts.map +1 -0
  166. package/hooks/hook.registry.d.ts +11 -0
  167. package/hooks/hook.registry.d.ts.map +1 -1
  168. package/hooks/hooks.utils.d.ts +19 -5
  169. package/hooks/hooks.utils.d.ts.map +1 -1
  170. package/index.d.ts +31 -13
  171. package/index.d.ts.map +1 -1
  172. package/index.js +15499 -12838
  173. package/job/execution/job-execution.manager.d.ts.map +1 -1
  174. package/job/job.instance.d.ts.map +1 -1
  175. package/job/job.registry.d.ts.map +1 -1
  176. package/metrics/index.d.ts +1 -1
  177. package/metrics/index.d.ts.map +1 -1
  178. package/metrics/metrics.routes.d.ts +23 -0
  179. package/metrics/metrics.routes.d.ts.map +1 -1
  180. package/notification/index.d.ts +1 -1
  181. package/notification/index.d.ts.map +1 -1
  182. package/notification/notification.service.d.ts +24 -0
  183. package/notification/notification.service.d.ts.map +1 -1
  184. package/package.json +16 -10
  185. package/plugin/plugin.registry.d.ts +5 -1
  186. package/plugin/plugin.registry.d.ts.map +1 -1
  187. package/prompt/flows/get-prompt.flow.d.ts +3 -0
  188. package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
  189. package/prompt/prompt.instance.d.ts.map +1 -1
  190. package/prompt/prompt.registry.d.ts +19 -1
  191. package/prompt/prompt.registry.d.ts.map +1 -1
  192. package/provider/provider.registry.d.ts +33 -3
  193. package/provider/provider.registry.d.ts.map +1 -1
  194. package/resource/flows/read-resource.flow.d.ts +3 -0
  195. package/resource/flows/read-resource.flow.d.ts.map +1 -1
  196. package/resource/resource.instance.d.ts.map +1 -1
  197. package/resource/resource.registry.d.ts +19 -1
  198. package/resource/resource.registry.d.ts.map +1 -1
  199. package/scope/flows/http.request.flow.d.ts +12 -1
  200. package/scope/flows/http.request.flow.d.ts.map +1 -1
  201. package/scope/scope.instance.d.ts +12 -1
  202. package/scope/scope.instance.d.ts.map +1 -1
  203. package/server/adapters/express.host.adapter.d.ts.map +1 -1
  204. package/server/middleware/cors-env.d.ts +17 -0
  205. package/server/middleware/cors-env.d.ts.map +1 -0
  206. package/server/security/security-audit.d.ts +2 -0
  207. package/server/security/security-audit.d.ts.map +1 -1
  208. package/server/server.instance.d.ts.map +1 -1
  209. package/skill/auth/skill-http-auth.d.ts.map +1 -1
  210. package/skill/errors/skill-validation.error.d.ts +2 -2
  211. package/skill/errors/skill-validation.error.d.ts.map +1 -1
  212. package/skill/flows/http/llm-full-txt.flow.d.ts +1 -1
  213. package/skill/flows/http/llm-txt.flow.d.ts +1 -1
  214. package/skill/flows/http/skills-api.flow.d.ts +1 -1
  215. package/skill/providers/memory-skill.provider.d.ts +22 -15
  216. package/skill/providers/memory-skill.provider.d.ts.map +1 -1
  217. package/skill/skill.registry.d.ts +8 -6
  218. package/skill/skill.registry.d.ts.map +1 -1
  219. package/task/store/task-store.factory.d.ts +1 -0
  220. package/task/store/task-store.factory.d.ts.map +1 -1
  221. package/task/task.types.d.ts +2 -0
  222. package/task/task.types.d.ts.map +1 -1
  223. package/tool/flows/call-tool.flow.d.ts +3 -0
  224. package/tool/flows/call-tool.flow.d.ts.map +1 -1
  225. package/tool/flows/tools-list.flow.d.ts.map +1 -1
  226. package/tool/tool.instance.d.ts.map +1 -1
  227. package/tool/tool.registry.d.ts +10 -1
  228. package/tool/tool.registry.d.ts.map +1 -1
  229. package/tool/ui/ui-option-warnings.d.ts.map +1 -1
  230. package/tool/ui/ui-shared.d.ts.map +1 -1
  231. package/transport/adapters/sse-transport.d.ts +1 -1
  232. package/transport/adapters/sse-transport.d.ts.map +1 -1
  233. package/transport/bus/redis-transport-bus.d.ts +28 -21
  234. package/transport/bus/redis-transport-bus.d.ts.map +1 -1
  235. package/transport/event-stores/event-store.factory.d.ts.map +1 -1
  236. package/transport/flow-error-output.d.ts +8 -0
  237. package/transport/flow-error-output.d.ts.map +1 -0
  238. package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
  239. package/transport/flows/handle.sse.flow.d.ts.map +1 -1
  240. package/transport/flows/handle.streamable-http.flow.d.ts +1 -1
  241. package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
  242. package/transport/in-memory-server.d.ts.map +1 -1
  243. package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
  244. package/transport/relay/index.d.ts +5 -0
  245. package/transport/relay/index.d.ts.map +1 -0
  246. package/transport/relay/relay-flow.d.ts +17 -0
  247. package/transport/relay/relay-flow.d.ts.map +1 -0
  248. package/transport/relay/relay-http.d.ts +109 -0
  249. package/transport/relay/relay-http.d.ts.map +1 -0
  250. package/transport/relay/relay-scope.helper.d.ts +46 -0
  251. package/transport/relay/relay-scope.helper.d.ts.map +1 -0
  252. package/transport/relay/session-relay.d.ts +105 -0
  253. package/transport/relay/session-relay.d.ts.map +1 -0
  254. package/transport/session-mode.check.d.ts +18 -0
  255. package/transport/session-mode.check.d.ts.map +1 -0
  256. package/transport/transport.registry.d.ts +61 -2
  257. package/transport/transport.registry.d.ts.map +1 -1
  258. package/transport/transport.remote.d.ts +16 -5
  259. package/transport/transport.remote.d.ts.map +1 -1
  260. package/transport/transport.types.d.ts +20 -11
  261. package/transport/transport.types.d.ts.map +1 -1
  262. package/transport/web-fetch-handler.d.ts +11 -0
  263. package/transport/web-fetch-handler.d.ts.map +1 -1
  264. package/transport/web-standard-mcp.d.ts.map +1 -1
  265. package/utils/dynamic-import.utils.d.ts +20 -0
  266. package/utils/dynamic-import.utils.d.ts.map +1 -0
  267. package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
@@ -1,20 +1,19 @@
1
1
  /**
2
2
  * Redis Transport Bus — Distributed Session Location Registry
3
3
  *
4
- * Maps sessions to the pods that own them using Redis Hash keys.
5
- * Used by TransportService in distributed mode to discover which
6
- * pod owns a given session and (optionally) relay operations to it.
4
+ * Maps sessions to the pods that own them using one Redis Hash per session id.
5
+ * Used by TransportService in distributed mode to discover which pod owns a
6
+ * given session, and to relay a request for it to that pod.
7
7
  */
8
+ import type { ServerRequest, ServerResponse } from '../../common';
9
+ import type { SessionRelay } from '../relay/session-relay';
8
10
  import type { RemoteLocation, TransportBus, TransportKey } from '../transport.types';
9
11
  /**
10
12
  * Minimal Redis client interface for the transport bus.
11
13
  * Subset of ioredis — allows plugging any compatible client.
12
14
  */
13
15
  export interface BusRedisClient {
14
- hset(key: string, field: string, value: string): Promise<number>;
15
- hdel(key: string, ...fields: string[]): Promise<number>;
16
- hget(key: string, field: string): Promise<string | null>;
17
- expire(key: string, seconds: number): Promise<number>;
16
+ hgetall(key: string): Promise<Record<string, string>>;
18
17
  del(key: string): Promise<number>;
19
18
  publish(channel: string, message: string): Promise<number>;
20
19
  eval(script: string, numkeys: number, ...args: (string | number)[]): Promise<unknown>;
@@ -29,6 +28,8 @@ export interface RedisTransportBusOptions {
29
28
  ttlSeconds?: number;
30
29
  /** HA relay key prefix for destroy commands. @default 'mcp:ha:' */
31
30
  haKeyPrefix?: string;
31
+ /** `Retry-After` (seconds) given when a request cannot be relayed. @default 30 */
32
+ retryAfterSeconds?: number;
32
33
  /** Logger (optional) */
33
34
  logger?: {
34
35
  info: (msg: string, meta?: Record<string, unknown>) => void;
@@ -39,12 +40,9 @@ export interface RedisTransportBusOptions {
39
40
  /**
40
41
  * Redis-backed TransportBus implementation.
41
42
  *
42
- * For each session, stores a Hash with nodeId and channel fields.
43
- * The bus provides session-to-node mapping for distributed lookups
44
- * and destroy-remote via pub/sub relay.
45
- *
46
- * Note: `proxyRequest()` is deferred — session recreation via
47
- * TransportService.recreateTransporter() handles cross-pod requests.
43
+ * For each session id, stores a Hash with the owning node, its relay channel,
44
+ * and the session's transport type and token hash. Requests are relayed to the
45
+ * owner through the {@link SessionRelay} attached with {@link attachRelay}.
48
46
  */
49
47
  export declare class RedisTransportBus implements TransportBus {
50
48
  private readonly redis;
@@ -52,12 +50,18 @@ export declare class RedisTransportBus implements TransportBus {
52
50
  private readonly keyPrefix;
53
51
  private readonly ttlSeconds;
54
52
  private readonly haKeyPrefix;
53
+ private readonly retryAfterSeconds;
55
54
  private readonly logger?;
55
+ private relay?;
56
56
  constructor(redis: BusRedisClient, machineId: string, options?: RedisTransportBusOptions);
57
57
  nodeId(): string;
58
+ /** Attach the relay that serves requests on their session's owner. */
59
+ attachRelay(relay: SessionRelay | undefined): void;
60
+ canRelay(): boolean;
61
+ channelOf(nodeId: string): string;
58
62
  /**
59
63
  * Advertise that this node owns a session.
60
- * Stores the nodeId and relay channel in a Redis Hash.
64
+ * Stores the nodeId, relay channel, type and token hash in a Redis Hash, with its TTL, atomically.
61
65
  */
62
66
  advertise(key: TransportKey): Promise<void>;
63
67
  /**
@@ -66,24 +70,27 @@ export declare class RedisTransportBus implements TransportBus {
66
70
  */
67
71
  revoke(key: TransportKey): Promise<void>;
68
72
  /**
69
- * Look up which node owns a session.
70
- * Returns null if the session is not registered in the bus.
73
+ * Look up which other node owns this exact session (same transport type and token).
74
+ * Returns null if the session is not registered, belongs to another token, or is ours.
71
75
  */
72
76
  lookup(key: TransportKey): Promise<RemoteLocation | null>;
77
+ /** The node owning a session id (this node included), whatever its type or token. */
78
+ lookupOwner(sessionId: string): Promise<RemoteLocation | null>;
73
79
  /**
74
- * Proxy a request to the owning node.
80
+ * Relay a request to the node owning its session and write that node's response.
75
81
  *
76
- * Phase 1: Not implemented — TransportService.recreateTransporter()
77
- * handles cross-pod session access via Redis session store.
82
+ * A request that was itself relayed here is never relayed again (one hop at most).
83
+ * @throws SessionOwnerUnreachableError when the request cannot be served by the owner.
78
84
  */
79
- proxyRequest(): Promise<void>;
85
+ proxyRequest(location: RemoteLocation, sessionId: string, request: ServerRequest, response: ServerResponse): Promise<void>;
80
86
  /**
81
87
  * Destroy a session on a remote node via pub/sub relay.
82
88
  */
83
89
  destroyRemote(key: TransportKey, reason?: string): Promise<void>;
90
+ private readEntry;
84
91
  /**
85
92
  * Build the Redis key for a session in the bus.
86
- * Format: {prefix}{type}:{tokenHash}:{sessionId}
93
+ * Format: {prefix}session:{sessionId}
87
94
  */
88
95
  private busKey;
89
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"redis-transport-bus.d.ts","sourceRoot":"","sources":["../../../src/transport/bus/redis-transport-bus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACz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,QAAQ,CAAC,MAAM,CAAC,CAAqC;IAC7D,OAAO,CAAC,KAAK,CAAC,CAAe;gBAGV,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,MAAM,EAClC,OAAO,CAAC,EAAE,wBAAwB;IASpC,MAAM,IAAI,MAAM;IAIhB,sEAAsE;IACtE,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAIlD,QAAQ,IAAI,OAAO;IAInB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIjC;;;OAGG;IACG,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBjD;;;OAGG;IACG,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9C;;;OAGG;IACG,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAe/D,qFAAqF;IAC/E,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAKpE;;;;;OAKG;IACG,YAAY,CAChB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAkBhB;;OAEG;IACG,aAAa,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAuBxD,SAAS;IAYvB;;;OAGG;IACH,OAAO,CAAC,MAAM;CAGf"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-store.factory.d.ts","sourceRoot":"","sources":["../../../src/transport/event-stores/event-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EA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IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAyFhH"}
@@ -0,0 +1,8 @@
1
+ import { type HttpOutput } from '../common/schemas/http-output.schema';
2
+ /**
3
+ * Map an error thrown out of `runFlow('http:request', …)` to a normalized
4
+ * `HttpOutput`, mirroring the Express middleware's FlowControl handling. Returns
5
+ * `undefined` for `next`/`handled` (no response → the caller 404s).
6
+ */
7
+ export declare function flowErrorToHttpOutput(error: unknown): HttpOutput | undefined;
8
+ //# sourceMappingURL=flow-error-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-error-output.d.ts","sourceRoot":"","sources":["../../src/transport/flow-error-output.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAIvE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAoC5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"handle.mcp-20260728.flow.d.ts","sourceRoot":"","sources":["../../../src/transport/flows/handle.mcp-20260728.flow.ts"],"names":[],"mappings":"AAmBA,OAAO,EAGL,QAAQ,EAER,eAAe,EACf,gBAAgB,EAKhB,KAAK,cAAc,EACpB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MAAM,cAAc,CAAC;AAKtB,eAAO,MAAM,IAAI;;;;;CAKoB,CAAC;AAoBtC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAItB,CAAC;AAEH,QAAA,MAAM,IAAI,EAAG,mBAA4B,CAAC;AAG1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,mBAAmB,EAAE,cAAc,CACjC,aAAa,EACb,OAAO,IAAI,EACX,OAAO,eAAe,EACtB,OAAO,gBAAgB,EACvB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQtE;AAED,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,gBAAgB,CAAC;IACxC,aAAa,EAAE,MAAM,gBAAgB,CAAC;CACvC,GAAG;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAkC7E;AASD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAExD,UAAU;IAsCV,MAAM;IAiBN,YAAY;IAoBZ,cAAc;IAad,SAAS;CA6ChB"}
@@ -129,7 +129,7 @@ export declare function buildReinitFailedResponse(sessionId: string, requestId:
129
129
  httpOnly: boolean;
130
130
  domain?: string | undefined;
131
131
  secure?: boolean | undefined;
132
- sameSite?: "strict" | "none" | "lax" | undefined;
132
+ sameSite?: "strict" | "lax" | "none" | undefined;
133
133
  maxAge?: number | undefined;
134
134
  expires?: Date | undefined;
135
135
  }[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"handle.streamable-http.flow.d.ts","sourceRoot":"","sources":["../../../src/transport/flows/handle.streamable-http.flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG7G,OAAO,EAEL,QAAQ,EAGR,eAAe,EACf,gBAAgB,EAMhB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAOtB,eAAO,MAAM,IAAI;;;;;CAKoB,CAAC;AAoBtC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAItB,CAAC;AAEH,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAEhG;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACnD,SAAS,EAAE,OAAO,CAAC;IACnB,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,aAAa,EAAE,MAAM,qBAAqB,CAAC;CAC5C,GAAG;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;CACrB,CAsBA;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,GAAG;IAAE,WAAW,EAAE,yBAAyB,CAAA;CAAE,GAAG;IAAE,K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EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACrG;AAED,MAAM,MAAM,mCAAmC,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC;IAAC,SAAS,EAAE,uBAAuB,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,yBAAyB,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEnE,wBAAsB,6BAA6B,CAAC,MAAM,EAAE;IAC1D,gBAAgB,EAAE,oCAAoC,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,cAAc,CAAC;CAC1B,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAkC/C;AAED,QAAA,MAAM,IAAI,EAAG,wBAAiC,CAAC;AAG/C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,wBAAwB,EAAE,cAAc,CACtC,wBAAwB,EACxB,OAAO,IAAI,EACX,OAAO,eAAe,EACtB,OAAO,gBAAgB,EACvB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AASD,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACzE,IAAI,2BAAQ;IAGN,gBAAgB;IAKhB,UAAU;IAsEV,MAAM;IAmCN,YAAY;IAqFZ,cAAc;IAwEd,SAAS;IAoFT,aAAa;IAqDb,SAAS;CA0IhB"}
1
+ {"version":3,"file":"handle.streamable-http.flow.d.ts","sourceRoot":"","sources":["../../../src/transport/flows/handle.streamable-http.flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,oBA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AO,CAAC,oBAAoB,CAAC,CA+D/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"initialize-request.handler.d.ts","sourceRoot":"","sources":["../../../src/transport/mcp-handlers/initialize-request.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAkC/E,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,aAAa,EACb,KAAK,EACL,mBAAmB,GACpB,EAAE,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAqKrE"}
1
+ {"version":3,"file":"initialize-request.handler.d.ts","sourceRoot":"","sources":["../../../src/transport/mcp-handlers/initialize-request.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAkC/E,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,aAAa,EACb,KAAK,EACL,mBAAmB,GACpB,EAAE,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAyKrE"}
@@ -0,0 +1,5 @@
1
+ export { createRelayedServerRequest, decodeRelayChunk, encodeRelayChunk, isRelayedRequest, relayedFrom, RelayServerResponse, serializeRelayRequest, type RelayChunk, type RelayResponseSink, } from './relay-http';
2
+ export { SessionRelay, type RelayResponseTarget, type SessionRelayOptions } from './session-relay';
3
+ export { serveRelayedHttpRequest, type RelayFlowRunner } from './relay-flow';
4
+ export { wireSessionRelay, type SessionRelayHandle, type WireSessionRelayOptions } from './relay-scope.helper';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/relay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Owner-side adapter for relayed requests.
3
+ *
4
+ * Like every other adapter, it only translates: the relayed request arrives as a
5
+ * normalized `ServerRequest` + `ServerResponse` pair and runs through the SAME
6
+ * `http:request` flow a request received directly runs through (IP filter, quota,
7
+ * session verification, routing, the MCP transport, audit and every hook), so the
8
+ * owner serves it exactly as if the client had reached it.
9
+ */
10
+ import type { ServerRequest, ServerResponse } from '../../common';
11
+ /** The part of the scope the adapter needs. */
12
+ export interface RelayFlowRunner {
13
+ runFlow(name: 'http:request', input: never): Promise<unknown>;
14
+ }
15
+ /** Run a relayed request through the `http:request` flow and render its output to `response`. */
16
+ export declare function serveRelayedHttpRequest(scope: RelayFlowRunner, request: ServerRequest, response: ServerResponse): Promise<void>;
17
+ //# sourceMappingURL=relay-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-flow.d.ts","sourceRoot":"","sources":["../../../src/transport/relay/relay-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAKlE,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED,iGAAiG;AACjG,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAwBf"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Request and response objects for an HTTP request relayed between the nodes of a
3
+ * distributed deployment.
4
+ *
5
+ * The node that receives a request for a session another node owns serializes it
6
+ * ({@link serializeRelayRequest}). The owner rebuilds a `ServerRequest` from it
7
+ * ({@link createRelayedServerRequest}) and runs it through its own `http:request`
8
+ * flow with a {@link RelayServerResponse}, whose output is streamed back.
9
+ *
10
+ * Both objects implement the subset of Node's `IncomingMessage` / `ServerResponse`
11
+ * (and Express' `status` / `json` / `send`) that the flows, the transport adapters
12
+ * and the MCP SDK's Streamable HTTP and SSE transports use. They depend on no Node
13
+ * built-in module, so importing them is safe in every runtime.
14
+ */
15
+ import { type ServerRequest, type ServerResponse } from '../../common';
16
+ import type { RelayedHttpRequest } from '../../ha/relay-messages';
17
+ type Listener = (...args: unknown[]) => void;
18
+ /** Minimal event emitter (no dependency on Node's `events`). */
19
+ declare class RelayEmitter {
20
+ private readonly listeners;
21
+ on(event: string | symbol, listener: Listener): this;
22
+ addListener(event: string | symbol, listener: Listener): this;
23
+ once(event: string | symbol, listener: Listener): this;
24
+ off(event: string | symbol, listener: Listener): this;
25
+ removeListener(event: string | symbol, listener: Listener): this;
26
+ removeAllListeners(event?: string | symbol): this;
27
+ listenerCount(event: string | symbol): number;
28
+ emit(event: string | symbol, ...args: unknown[]): boolean;
29
+ }
30
+ /** Serialize a request this node received so its session owner can serve it. */
31
+ export declare function serializeRelayRequest(request: ServerRequest): RelayedHttpRequest;
32
+ /** The node that relayed this request, when it was relayed. */
33
+ export declare function relayedFrom(request: ServerRequest): string | undefined;
34
+ /** Whether a request was relayed here from another node. */
35
+ export declare function isRelayedRequest(request: ServerRequest): boolean;
36
+ /**
37
+ * Rebuild the `ServerRequest` of a relayed request on the session owner.
38
+ * Its socket peer is the client's address on the node that received the request,
39
+ * so client-IP rules see the same client they would have seen there.
40
+ */
41
+ export declare function createRelayedServerRequest(relayed: RelayedHttpRequest, sourceNodeId: string): ServerRequest;
42
+ /** A body chunk as carried in a relay frame. */
43
+ export interface RelayChunk {
44
+ data: string;
45
+ encoding: 'utf8' | 'base64';
46
+ }
47
+ /** Encode a body chunk for a relay frame. Returns `undefined` for an empty chunk. */
48
+ export declare function encodeRelayChunk(chunk: unknown, encoding?: string): RelayChunk | undefined;
49
+ /** Decode a relay frame body chunk. */
50
+ export declare function decodeRelayChunk(chunk: RelayChunk): Uint8Array | string;
51
+ /** Receives what the owner writes to a relayed response, in order. */
52
+ export interface RelayResponseSink {
53
+ head(status: number, headers: Record<string, string | string[]>): void;
54
+ data(chunk: RelayChunk): void;
55
+ end(): void;
56
+ }
57
+ type OutgoingHeaderValue = number | string | readonly string[];
58
+ type OutgoingHeaders = Record<string, OutgoingHeaderValue | undefined> | readonly string[];
59
+ /**
60
+ * The response of a relayed request on the session owner. Whatever the flow writes
61
+ * is handed to the {@link RelayResponseSink} (and from there published back to the
62
+ * node that relayed the request). `destroy()` — called when that node's client goes
63
+ * away — emits `close` before `finish`, which aborts a streaming MCP response.
64
+ */
65
+ export declare class RelayServerResponse extends RelayEmitter {
66
+ private readonly sink;
67
+ statusCode: number;
68
+ statusMessage: string;
69
+ headersSent: boolean;
70
+ writableEnded: boolean;
71
+ writableFinished: boolean;
72
+ destroyed: boolean;
73
+ private readonly headerMap;
74
+ constructor(sink: RelayResponseSink);
75
+ get writable(): boolean;
76
+ get finished(): boolean;
77
+ setHeader(name: string, value: OutgoingHeaderValue): this;
78
+ getHeader(name: string): string | string[] | undefined;
79
+ getHeaders(): Record<string, string | string[]>;
80
+ getHeaderNames(): string[];
81
+ hasHeader(name: string): boolean;
82
+ removeHeader(name: string): void;
83
+ writeHead(statusCode: number, reasonOrHeaders?: string | OutgoingHeaders, maybeHeaders?: OutgoingHeaders): this;
84
+ flushHeaders(): void;
85
+ /** Express `res.status()`. */
86
+ status(code: number): this;
87
+ /** Express `res.json()`. */
88
+ json(body: unknown): this;
89
+ /** Express `res.send()`. */
90
+ send(body?: unknown): this;
91
+ /** Express `res.redirect()`. */
92
+ redirect(statusOrUrl: number | string, maybeUrl?: string): this;
93
+ write(chunk: unknown, encodingOrCallback?: unknown, callback?: unknown): boolean;
94
+ end(chunk?: unknown, encodingOrCallback?: unknown, callback?: unknown): this;
95
+ /**
96
+ * Abort the response: nothing more reaches the sink. `close` fires with the response
97
+ * unfinished, which is how the MCP transports learn the client went away.
98
+ */
99
+ destroy(error?: Error): this;
100
+ /** Node `ServerResponse` no-ops. */
101
+ cork(): void;
102
+ uncork(): void;
103
+ setTimeout(): this;
104
+ /** The response, typed as the `ServerResponse` the flows expect. */
105
+ asServerResponse(): ServerResponse;
106
+ private sendHead;
107
+ }
108
+ export {};
109
+ //# sourceMappingURL=relay-http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-http.d.ts","sourceRoot":"","sources":["../../../src/transport/relay/relay-http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAE7C,gEAAgE;AAChE,cAAM,YAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0C;IAEpE,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAOpD,WAAW,CAAC,KAAK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AM,GAAG,eAAe,EAAE,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI;IAqB/G,YAAY,IAAI,IAAI;IAIpB,8BAA8B;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK1B,4BAA4B;IAC5B,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAKzB,4BAA4B;IAC5B,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI;IAa1B,gCAAgC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ/D,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO;IAUhF,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI;IA4B5E;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI;IAQ5B,oCAAoC;IACpC,IAAI,IAAI,IAAI;IAIZ,MAAM,IAAI,IAAI;IAId,UAAU,IAAI,IAAI;IAIlB,oEAAoE;IACpE,gBAAgB,IAAI,cAAc;IAIlC,OAAO,CAAC,QAAQ;CASjB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Wire a scope's HA relay channel: request relay, remote session destroys and
3
+ * relayed notifications. Kept out of `scope.instance.ts` so the scope stays lean.
4
+ */
5
+ import type { HaManager } from '../../ha';
6
+ import type { RedisTransportBus } from '../bus/redis-transport-bus';
7
+ import type { TransportService } from '../transport.registry';
8
+ import { type RelayFlowRunner } from './relay-flow';
9
+ import { SessionRelay } from './session-relay';
10
+ interface RelayScopeLogger {
11
+ info(message: string, meta?: Record<string, unknown>): void;
12
+ warn(message: string, meta?: Record<string, unknown>): void;
13
+ verbose?(message: string, meta?: Record<string, unknown>): void;
14
+ }
15
+ export interface WireSessionRelayOptions {
16
+ nodeId: string;
17
+ haManager: HaManager;
18
+ bus: RedisTransportBus;
19
+ transportService: TransportService;
20
+ notifications: {
21
+ deliverRelayedNotification(sessionId: string, method: string, params?: Record<string, unknown>): boolean;
22
+ };
23
+ /** Runs relayed requests through the `http:request` flow (the scope). */
24
+ flows: RelayFlowRunner;
25
+ logger: RelayScopeLogger;
26
+ /** Override the relay's acknowledgement timeout (ms). */
27
+ ackTimeoutMs?: number;
28
+ }
29
+ export interface SessionRelayHandle {
30
+ relay: SessionRelay;
31
+ /** Resolves once this node listens on its relay channel (or the handle was closed). */
32
+ ready: Promise<void>;
33
+ /** Stop relaying and stop retrying the subscription. */
34
+ close(): Promise<void>;
35
+ }
36
+ /**
37
+ * Subscribe this node to its relay channel and attach a {@link SessionRelay} to the
38
+ * transport bus. Returns `undefined` when the HA manager has no pub/sub connections.
39
+ *
40
+ * The subscription is retried with backoff (1s doubling to 30s) while Redis is
41
+ * unreachable; until it succeeds the bus cannot relay, and a request for a session
42
+ * another live node owns is answered with a retryable 503.
43
+ */
44
+ export declare function wireSessionRelay(options: WireSessionRelayOptions): SessionRelayHandle | undefined;
45
+ export {};
46
+ //# sourceMappingURL=relay-scope.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay-scope.helper.d.ts","sourceRoot":"","sources":["../../../src/transport/relay/relay-scope.helper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,UAAU,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,UAAU,gBAAgB;IACxB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,GAAG,EAAE,iBAAiB,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE;QACb,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;KAC1G,CAAC;IACF,yEAAyE;IACzE,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,YAAY,CAAC;IACpB,uFAAuF;IACvF,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,wDAAwD;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAKD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,kBAAkB,GAAG,SAAS,CAoFjG"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Session Relay — serve a request on the node that owns its MCP session.
3
+ *
4
+ * In a distributed deployment the node that receives a request may not be the one
5
+ * holding the session's transport. That node ({@link SessionRelay.forward}) publishes
6
+ * the request to the owner's relay channel and streams the owner's response back to
7
+ * its client. The owner ({@link SessionRelay.handleMessage} → `relay-request`) runs
8
+ * the request through its own `http:request` flow — auth, quota, routing, the MCP
9
+ * transport and every hook run there, exactly as for a request it received itself —
10
+ * and publishes what it writes, frame by frame, to the relaying node's channel.
11
+ *
12
+ * Redis Pub/Sub delivers the messages one connection publishes in order, so the
13
+ * frames of a response (`ack`, `head`, `data`…, `end`) arrive in the order written.
14
+ *
15
+ * Failure handling on the relaying node:
16
+ * - the owner does not listen on its channel (publish reached no subscriber) or does
17
+ * not acknowledge within `ackTimeoutMs`, its heartbeat expires while it serves, or no
18
+ * frame (a `keepalive` included) arrives for three owner-check intervals: before any
19
+ * byte reached the client the request fails with {@link SessionOwnerUnreachableError}
20
+ * (503, retryable); after, the response is ended;
21
+ * - the client goes away: the owner is told to cancel, which aborts the response there.
22
+ *
23
+ * On the owner, a response frame that cannot be published (Redis error, or the relaying
24
+ * node no longer listens) aborts the response and reports an `error` frame: a response
25
+ * with a lost frame is never completed.
26
+ */
27
+ import type { ServerRequest, ServerResponse } from '../../common';
28
+ import { SessionOwnerUnreachableError } from '../../errors/transport.errors';
29
+ import type { HaRelayMessage, RelayedHttpRequest } from '../../ha/relay-messages';
30
+ /** Where the relaying node writes the owner's response (a Node / Express `ServerResponse`). */
31
+ export interface RelayResponseTarget {
32
+ readonly headersSent: boolean;
33
+ readonly writableEnded: boolean;
34
+ readonly writableFinished?: boolean;
35
+ writeHead(status: number, headers: Record<string, string | string[]>): unknown;
36
+ flushHeaders?(): void;
37
+ write(chunk: Uint8Array | string): unknown;
38
+ end(): unknown;
39
+ once(event: 'close', listener: () => void): unknown;
40
+ removeListener(event: 'close', listener: () => void): unknown;
41
+ }
42
+ interface RelayLogger {
43
+ info(message: string, meta?: Record<string, unknown>): void;
44
+ warn(message: string, meta?: Record<string, unknown>): void;
45
+ verbose?(message: string, meta?: Record<string, unknown>): void;
46
+ }
47
+ export interface SessionRelayOptions {
48
+ /** This node's machine ID. */
49
+ nodeId: string;
50
+ /** Publish a message to a node's relay channel; resolves to the number of receivers. */
51
+ publish(nodeId: string, message: HaRelayMessage): Promise<number>;
52
+ /** Whether a node's heartbeat is present. */
53
+ isNodeAlive(nodeId: string): Promise<boolean>;
54
+ /** Serve a request relayed to this node (runs it through the `http:request` flow). */
55
+ serve(request: ServerRequest, response: ServerResponse): Promise<void>;
56
+ /** How long the relaying node waits for the owner to acknowledge a request. @default 5000 */
57
+ ackTimeoutMs?: number;
58
+ /**
59
+ * How often the relaying node checks the owner's heartbeat while it serves, and how often
60
+ * the owner sends a `keepalive` frame. @default 10000
61
+ */
62
+ ownerCheckIntervalMs?: number;
63
+ /** `Retry-After` given to a client whose request could not be relayed. @default 30 */
64
+ retryAfterSeconds?: number;
65
+ logger?: RelayLogger;
66
+ }
67
+ export declare class SessionRelay {
68
+ private readonly options;
69
+ private readonly nodeId;
70
+ private readonly ackTimeoutMs;
71
+ private readonly ownerCheckIntervalMs;
72
+ private readonly retryAfterSeconds;
73
+ private readonly logger?;
74
+ /** Requests this node relayed, awaiting the owner's response frames. */
75
+ private readonly pending;
76
+ /** Requests this node is serving for other nodes. */
77
+ private readonly serving;
78
+ private closed;
79
+ constructor(options: SessionRelayOptions);
80
+ /** Requests relayed from this node that are still in flight. */
81
+ get pendingCount(): number;
82
+ /** Requests this node is serving for other nodes. */
83
+ get servingCount(): number;
84
+ /** The error a request gets when its session owner cannot serve it. */
85
+ unreachable(ownerNodeId: string, reason: string): SessionOwnerUnreachableError;
86
+ /**
87
+ * Relay a request to the node that owns its session and write that node's response
88
+ * to `response`. Resolves once the response is complete (or the client went away).
89
+ *
90
+ * @throws SessionOwnerUnreachableError when the owner could not serve the request and
91
+ * nothing has been written to `response` yet.
92
+ */
93
+ forward(ownerNodeId: string, sessionId: string, request: RelayedHttpRequest, response: RelayResponseTarget): Promise<void>;
94
+ /** Dispatch a request-relay message that arrived on this node's channel. */
95
+ handleMessage(message: HaRelayMessage): void;
96
+ /**
97
+ * Stop relaying: requests relayed from this node fail (or end), and requests this
98
+ * node serves for others are aborted after telling their node.
99
+ */
100
+ close(): Promise<void>;
101
+ /** Owner side: serve a request another node relayed here, streaming the response back. */
102
+ private serveRelayed;
103
+ }
104
+ export {};
105
+ //# sourceMappingURL=session-relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-relay.d.ts","sourceRoot":"","sources":["../../../src/transport/relay/session-relay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAInB,MAAM,yBAAyB,CAAC;AAIjC,+FAA+F;AAC/F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC;IAC/E,YAAY,CAAC,IAAI,IAAI,CAAC;IACtB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,GAAG,IAAI,OAAO,CAAC;IACf,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC;IACpD,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC;CAC/D;AAED,UAAU,WAAW;IACnB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,M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rD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,MAAM,CAAS;gBAEM,OAAO,EAAE,mBAAmB;IAQzD,gEAAgE;IAChE,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,qDAAqD;IACrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,uEAAuE;IACvE,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,4BAA4B;IAI9E;;;;;;OAMG;IACH,OAAO,CACL,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC;IAoIhB,4EAA4E;IAC5E,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IA0B5C;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAa5B,0FAA0F;YAC5E,YAAY;CAwD3B"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Warn at startup when `transport.sessionMode` asks for something the server does not do.
3
+ *
4
+ * Nothing reads `sessionMode` since v1.0: whether the server keeps sessions follows
5
+ * `transport.protocol` (`'stateless-api'` serves without sessions). The option is still accepted, so
6
+ * `sessionMode: 'stateless'` (or a function) used to be silently ignored (#678). `'stateful'`, the
7
+ * default, matches what the session-based protocols do and is left alone.
8
+ */
9
+ export declare function warnIfSessionModeIgnored(options: {
10
+ logger: {
11
+ warn(message: string): void;
12
+ };
13
+ transport?: {
14
+ sessionMode?: unknown;
15
+ protocol?: unknown;
16
+ };
17
+ }): void;
18
+ //# sourceMappingURL=session-mode.check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-mode.check.d.ts","sourceRoot":"","sources":["../../src/transport/session-mode.check.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,EAAE;QAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACxC,SAAS,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC3D,GAAG,IAAI,CAYP"}