@zyno-io/ts-server-foundation 26.802.817 → 26.802.1639
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/dist/src/devconsole/server.d.ts.map +1 -1
- package/dist/src/devconsole/server.js +1 -2
- package/dist/src/devconsole/server.js.map +1 -1
- package/dist/src/http/request.js +1 -1
- package/dist/src/http/response.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/services/mesh-client/mesh-srpc-server.js +1 -1
- package/dist/src/srpc/SrpcByteStream.d.ts +2 -0
- package/dist/src/srpc/SrpcByteStream.d.ts.map +1 -1
- package/dist/src/srpc/SrpcByteStream.js +19 -0
- package/dist/src/srpc/SrpcByteStream.js.map +1 -1
- package/dist/src/srpc/SrpcClient.d.ts +1 -0
- package/dist/src/srpc/SrpcClient.d.ts.map +1 -1
- package/dist/src/srpc/SrpcClient.js +181 -72
- package/dist/src/srpc/SrpcClient.js.map +1 -1
- package/dist/src/srpc/SrpcServer.d.ts +4 -1
- package/dist/src/srpc/SrpcServer.d.ts.map +1 -1
- package/dist/src/srpc/SrpcServer.js +279 -141
- package/dist/src/srpc/SrpcServer.js.map +1 -1
- package/dist/src/srpc/index.js +1 -1
- package/dist/src/srpc/types.d.ts +2 -2
- package/dist/src/srpc/types.d.ts.map +1 -1
- package/dist/src/srpc/types.js +17 -1
- package/dist/src/srpc/types.js.map +1 -1
- package/docs/content/srpc.md +6 -6
- package/package.json +1 -1
|
@@ -7,11 +7,14 @@ const node_crypto_1 = require("node:crypto");
|
|
|
7
7
|
const ws_1 = tslib_1.__importDefault(require("ws"));
|
|
8
8
|
const app_1 = require("../app");
|
|
9
9
|
const helpers_1 = require("../helpers");
|
|
10
|
+
const http_1 = require("../http");
|
|
11
|
+
const services_1 = require("../services");
|
|
12
|
+
const telemetry_1 = require("../telemetry");
|
|
10
13
|
const SrpcByteStream_1 = require("./SrpcByteStream");
|
|
11
14
|
const observer_1 = require("./observer");
|
|
12
15
|
const types_1 = require("./types");
|
|
13
|
-
const
|
|
14
|
-
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":2},{\"kind\":22,\"type\":{\"kind\":8}},{\"kind\":12,\"types\":[{\"kind\":3},{\"kind\":22,\"type\":{\"kind\":3}}]},{\"kind\":7},{\"kind\":8},{\"kind\":
|
|
16
|
+
const http_2 = require("../http");
|
|
17
|
+
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":6},{\"kind\":2},{\"kind\":22,\"type\":{\"kind\":8}},{\"kind\":12,\"types\":[{\"kind\":3},{\"kind\":22,\"type\":{\"kind\":3}}]},{\"kind\":7},{\"kind\":8},{\"kind\":2,\"typeName\":\"TClientOutput['byteStreamOperation']\"},{\"kind\":3},{\"kind\":22,\"type\":{\"kind\":2}},{\"kind\":22,\"type\":{\"kind\":3}},{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"disconnect\"},{\"kind\":10,\"literal\":\"conflict\"},{\"kind\":10,\"literal\":\"supersede\"},{\"kind\":10,\"literal\":\"timeout\"},{\"kind\":10,\"literal\":\"badArg\"}],\"typeName\":\"SrpcDisconnectCause\"},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"code\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"reason\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":2,\"typeName\":\"(metadata: Record\\u003cstring, unknown\\u003e, req: IncomingMessage) =\\u003e Promise\\u003cboolean | Partial\\u003cTMeta\\u003e\\u003e | boolean | Partial\\u003cTMeta\\u003e\"},{\"kind\":2,\"typeName\":\"(clientId: string) =\\u003e Promise\\u003cfalse | string\\u003e | false | string\"},{\"kind\":2,\"typeName\":\"(principal: string, nonce: string, expiresAt: number) =\\u003e boolean | Promise\\u003cboolean\\u003e\"},{\"kind\":2,\"typeName\":\"(stream: SrpcStream\\u003cTMeta\\u003e) =\\u003e void | Promise\\u003cvoid\\u003e\"},{\"kind\":2,\"typeName\":\"P\"},{\"kind\":2,\"typeName\":\"(stream: SrpcStream\\u003cTMeta\\u003e, cause: SrpcDisconnectCause) =\\u003e void\"},{\"kind\":2,\"typeName\":\"(data: any, senderInstanceId: number) =\\u003e void | Promise\\u003cvoid\\u003e\"},{\"kind\":1},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"skipSelf\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]},{\"kind\":0},{\"kind\":18,\"typeName\":\"ResponseData\\u003cTClientOutput, P\\u003e\",\"types\":[{\"kind\":20,\"name\":\"\u00FE@toStringTag@64\",\"type\":{\"kind\":6},\"optional\":false}]},{\"kind\":14,\"type\":{\"kind\":7}},{\"kind\":2,\"typeName\":\"TServerOutput['byteStreamOperation']\"}]]", []);
|
|
15
18
|
const StreamInfoSymbol = Symbol('srpc-info');
|
|
16
19
|
const DefaultLateReplyTombstoneTtlMs = 60000;
|
|
17
20
|
const MaxLateReplyTombstonesPerStream = 256;
|
|
@@ -32,12 +35,16 @@ const MaxBackpressuredByteStreamsPerStream = 1024;
|
|
|
32
35
|
const MaxBackpressuredByteStreamBytesPerStream = DefaultMaxBufferedBytes;
|
|
33
36
|
const MaxByteStreamId = 0x7fffffff;
|
|
34
37
|
const MaxAuthReplayNoncesPerPrincipal = 256;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
38
|
+
let _AuthenticationFailureMetadata_1;
|
|
39
|
+
class AuthenticationFailure {
|
|
40
|
+
reason;
|
|
41
|
+
constructor(reason) {
|
|
42
|
+
this.reason = reason;
|
|
43
|
+
}
|
|
44
|
+
static __tsfType = _AuthenticationFailureMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"AuthenticationFailure\",\"typeName\":\"AuthenticationFailure\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"reason\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}]}]", [() => AuthenticationFailure], __tsf_metadata_type);
|
|
45
|
+
}
|
|
46
|
+
_AuthenticationFailureMetadata_1.classType = AuthenticationFailure;
|
|
47
|
+
AuthenticationFailure.__tsfType = _AuthenticationFailureMetadata_1;
|
|
41
48
|
let _SrpcServerMetadata_1;
|
|
42
49
|
class SrpcServer {
|
|
43
50
|
options;
|
|
@@ -70,21 +77,21 @@ class SrpcServer {
|
|
|
70
77
|
constructor(options) {
|
|
71
78
|
this.options = options;
|
|
72
79
|
validateServerResourceOptions(options);
|
|
73
|
-
this.logger =
|
|
80
|
+
this.logger = options.logger;
|
|
74
81
|
this.wsServer = new ws_1.default.Server({ noServer: true, maxPayload: this.maxMessageBytes });
|
|
75
82
|
this.wsServer.on('connection', (ws, request) => this.attachConnection(ws, request));
|
|
76
83
|
if (options.httpServer) {
|
|
77
|
-
const handler = (0,
|
|
84
|
+
const handler = (0, http_2.installWebSocketUpgradeHandler)({
|
|
78
85
|
httpServer: options.httpServer,
|
|
79
86
|
wsPath: options.wsPath,
|
|
80
87
|
wsServer: this.wsServer,
|
|
81
88
|
verifyClient: this.verifyClient
|
|
82
89
|
});
|
|
83
|
-
this.cleanupUpgradeHandler = () => (0,
|
|
90
|
+
this.cleanupUpgradeHandler = () => (0, http_2.removeWebSocketUpgradeHandler)(options.httpServer, options.wsPath, handler);
|
|
84
91
|
}
|
|
85
92
|
else {
|
|
86
93
|
const app = (0, app_1.getCurrentApp)();
|
|
87
|
-
const handler = (0,
|
|
94
|
+
const handler = (0, http_2.createWebSocketUpgradeHandler)({
|
|
88
95
|
wsPath: options.wsPath,
|
|
89
96
|
wsServer: this.wsServer,
|
|
90
97
|
verifyClient: this.verifyClient
|
|
@@ -101,27 +108,41 @@ class SrpcServer {
|
|
|
101
108
|
const { id: clientStreamId, cid: clientId, appv: appVersion } = query;
|
|
102
109
|
const address = this.getRemoteAddress(info.req);
|
|
103
110
|
const protocolVersion = query._v === undefined ? this.options.defaultUnspecifiedProtocolVersion : Number(query._v);
|
|
111
|
+
const handshakeLogData = {
|
|
112
|
+
address: logSafeText(address),
|
|
113
|
+
clientId: logSafeText(clientId),
|
|
114
|
+
clientStreamId: logSafeText(clientStreamId),
|
|
115
|
+
protocolVersion: Number.isSafeInteger(protocolVersion) ? protocolVersion : undefined
|
|
116
|
+
};
|
|
117
|
+
const rejectHandshake = (event, code, message, extra) => {
|
|
118
|
+
this.logger.warn(event, { srpc: { ...handshakeLogData, ...extra } });
|
|
119
|
+
cb(false, code, safeHandshakeMessage(message));
|
|
120
|
+
};
|
|
104
121
|
if (!clientStreamId || !clientId || !appVersion || (protocolVersion !== 1 && protocolVersion !== 2)) {
|
|
105
|
-
|
|
122
|
+
rejectHandshake('SRPC client missing required handshake parameters', 400, 'Missing required query parameters');
|
|
106
123
|
return;
|
|
107
124
|
}
|
|
108
125
|
if (Buffer.byteLength(clientId) > this.maxClientIdBytes) {
|
|
109
|
-
|
|
126
|
+
rejectHandshake('SRPC client ID exceeds the configured limit', 400, 'Client ID exceeds the configured limit');
|
|
110
127
|
return;
|
|
111
128
|
}
|
|
112
129
|
if (this.pendingHandshakeCount >= this.maxPendingHandshakes) {
|
|
113
|
-
|
|
130
|
+
rejectHandshake('SRPC handshake capacity exceeded', 503, 'Too many pending client handshakes', {
|
|
131
|
+
pendingHandshakes: this.pendingHandshakeCount
|
|
132
|
+
});
|
|
114
133
|
return;
|
|
115
134
|
}
|
|
116
135
|
if (this.streamsById.size >= this.maxActiveStreams) {
|
|
117
|
-
|
|
136
|
+
rejectHandshake('SRPC active-stream capacity exceeded', 503, 'Too many active client streams', { activeStreams: this.streamsById.size });
|
|
118
137
|
return;
|
|
119
138
|
}
|
|
120
139
|
this.pendingHandshakeCount++;
|
|
121
140
|
this.validateClientAuth(query, info.req)
|
|
122
141
|
.then(result => {
|
|
123
|
-
if (!result) {
|
|
124
|
-
|
|
142
|
+
if (!result || result instanceof AuthenticationFailure) {
|
|
143
|
+
rejectHandshake('SRPC client authentication failed', 403, 'Failed authentication', {
|
|
144
|
+
reason: result instanceof AuthenticationFailure ? result.reason : 'custom authorizer rejected'
|
|
145
|
+
});
|
|
125
146
|
return;
|
|
126
147
|
}
|
|
127
148
|
const queryMeta = Object.fromEntries(Object.entries(query)
|
|
@@ -134,11 +155,13 @@ class SrpcServer {
|
|
|
134
155
|
metadataBytes = encodedJsonBytes(mergedMeta);
|
|
135
156
|
}
|
|
136
157
|
catch {
|
|
137
|
-
|
|
158
|
+
rejectHandshake('SRPC client metadata is not JSON-serializable', 400, 'Client metadata must be JSON-serializable');
|
|
138
159
|
return;
|
|
139
160
|
}
|
|
140
161
|
if (metadataBytes > this.maxClientMetadataBytes) {
|
|
141
|
-
|
|
162
|
+
rejectHandshake('SRPC client metadata exceeds the configured limit', 400, 'Client metadata exceeds the configured limit', {
|
|
163
|
+
metadataBytes
|
|
164
|
+
});
|
|
142
165
|
return;
|
|
143
166
|
}
|
|
144
167
|
info.req[StreamInfoSymbol] = {
|
|
@@ -156,8 +179,15 @@ class SrpcServer {
|
|
|
156
179
|
};
|
|
157
180
|
cb(true);
|
|
158
181
|
}, error => {
|
|
159
|
-
|
|
160
|
-
|
|
182
|
+
if (error instanceof http_1.HttpError) {
|
|
183
|
+
rejectHandshake('SRPC client authorization rejected the handshake', error.httpCode, error.message, {
|
|
184
|
+
statusCode: error.httpCode,
|
|
185
|
+
message: logSafeText(error.message)
|
|
186
|
+
});
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.logger.error('Error validating SRPC client auth', error, { srpc: handshakeLogData });
|
|
190
|
+
cb(false, 500, 'Error during authentication');
|
|
161
191
|
})
|
|
162
192
|
.finally(() => {
|
|
163
193
|
this.pendingHandshakeCount = Math.max(0, this.pendingHandshakeCount - 1);
|
|
@@ -166,16 +196,28 @@ class SrpcServer {
|
|
|
166
196
|
attachConnection(ws, request) {
|
|
167
197
|
const info = request[StreamInfoSymbol];
|
|
168
198
|
if (!info) {
|
|
199
|
+
this.logger.warn('SRPC WebSocket connection is missing verified stream information');
|
|
169
200
|
ws.close(4000, 'Missing stream info');
|
|
170
201
|
return;
|
|
171
202
|
}
|
|
172
203
|
if (this.streamsById.size >= this.maxActiveStreams) {
|
|
204
|
+
this.logger.warn('SRPC active-stream capacity exceeded after handshake', {
|
|
205
|
+
srpc: {
|
|
206
|
+
address: logSafeText(info.address),
|
|
207
|
+
clientId: logSafeText(info.clientId),
|
|
208
|
+
clientStreamId: logSafeText(info.clientStreamId),
|
|
209
|
+
activeStreams: this.streamsById.size
|
|
210
|
+
}
|
|
211
|
+
});
|
|
173
212
|
ws.close(1013, 'Too many active client streams');
|
|
174
213
|
return;
|
|
175
214
|
}
|
|
176
215
|
const stream = this.createStream(ws, info);
|
|
216
|
+
this.logger.info('SRPC WebSocket connection accepted', {
|
|
217
|
+
srpc: streamLogData(stream)
|
|
218
|
+
});
|
|
177
219
|
ws.on('error', error => this.handleStreamError(stream, error));
|
|
178
|
-
ws.on('close', code => this.handleStreamDisconnected(stream, code));
|
|
220
|
+
ws.on('close', (code, reason) => this.handleStreamDisconnected(stream, code, reason));
|
|
179
221
|
this.handleStreamEstablished(stream);
|
|
180
222
|
}
|
|
181
223
|
createStream(ws, info) {
|
|
@@ -222,6 +264,7 @@ class SrpcServer {
|
|
|
222
264
|
receiverBufferChanged: (substreamId, bufferedBytes) => {
|
|
223
265
|
this.updateByteStreamBufferedBytes(stream, substreamId, bufferedBytes);
|
|
224
266
|
},
|
|
267
|
+
logDebug: (message, data) => this.logger?.debug(message, { srpc: { ...streamLogData(stream), ...data } }),
|
|
225
268
|
attachDisconnectHandler: handler => ws.on('close', handler),
|
|
226
269
|
detachDisconnectHandler: handler => ws.off('close', handler),
|
|
227
270
|
getBufferedAmount: () => ws.bufferedAmount
|
|
@@ -239,9 +282,19 @@ class SrpcServer {
|
|
|
239
282
|
const conflictingStream = this.getCurrentStreamByClientId(stream.clientId);
|
|
240
283
|
if (conflictingStream) {
|
|
241
284
|
if (stream.protocolVersion >= 2 && !stream.supersede) {
|
|
285
|
+
this.logger.warn('SRPC client connection rejected because its client ID is already active', {
|
|
286
|
+
srpc: {
|
|
287
|
+
...streamLogData(stream),
|
|
288
|
+
existingStreamId: logSafeText(conflictingStream.id),
|
|
289
|
+
protocolVersion: stream.protocolVersion
|
|
290
|
+
}
|
|
291
|
+
});
|
|
242
292
|
this.closeStreamWithError(stream, 'conflict', 'Client ID already connected');
|
|
243
293
|
return;
|
|
244
294
|
}
|
|
295
|
+
this.logger.warn('SRPC stream superseding an existing client connection', {
|
|
296
|
+
srpc: { ...streamLogData(stream), supersededStreamId: logSafeText(conflictingStream.id) }
|
|
297
|
+
});
|
|
245
298
|
this.cleanupStream(conflictingStream, 'supersede');
|
|
246
299
|
}
|
|
247
300
|
this.streamsById.set(stream.id, stream);
|
|
@@ -273,11 +326,13 @@ class SrpcServer {
|
|
|
273
326
|
return;
|
|
274
327
|
}
|
|
275
328
|
await this.onStreamActivated(stream);
|
|
276
|
-
if (stream.lastPingAt >= 0 && stream.isActivated)
|
|
329
|
+
if (stream.lastPingAt >= 0 && stream.isActivated) {
|
|
330
|
+
this.logger.info('SRPC stream activated', { srpc: streamLogData(stream) });
|
|
277
331
|
this.openClientRequests(stream);
|
|
332
|
+
}
|
|
278
333
|
})
|
|
279
334
|
.catch(error => {
|
|
280
|
-
this.logger.error('SRPC connection handler failed', error);
|
|
335
|
+
this.logger.error('SRPC connection handler failed', error, { srpc: streamLogData(stream) });
|
|
281
336
|
this.cleanupStream(stream, 'disconnect');
|
|
282
337
|
});
|
|
283
338
|
}
|
|
@@ -325,7 +380,7 @@ class SrpcServer {
|
|
|
325
380
|
this.handleStreamDataReceived(stream, decoded, encoded.length);
|
|
326
381
|
}
|
|
327
382
|
catch (error) {
|
|
328
|
-
this.logger.warn('Failed to decode SRPC message', error);
|
|
383
|
+
this.logger.warn('Failed to decode SRPC message', error, { srpc: streamLogData(stream) });
|
|
329
384
|
this.closeStreamWithError(stream, 'badArg', 'Invalid message format');
|
|
330
385
|
}
|
|
331
386
|
}
|
|
@@ -359,7 +414,7 @@ class SrpcServer {
|
|
|
359
414
|
const queueItem = stream.$queue.get(data.requestId);
|
|
360
415
|
if (!queueItem) {
|
|
361
416
|
if (this.isLateReply(stream, data.requestId)) {
|
|
362
|
-
this.logger.debug('Ignoring reply for an expired request', { requestId: data.requestId });
|
|
417
|
+
this.logger.debug('Ignoring reply for an expired request', { requestId: logSafeText(data.requestId) });
|
|
363
418
|
return;
|
|
364
419
|
}
|
|
365
420
|
this.closeStreamWithError(stream, 'badArg', 'Unknown request ID');
|
|
@@ -385,6 +440,9 @@ class SrpcServer {
|
|
|
385
440
|
pending.push({ data, retainedBytes });
|
|
386
441
|
this.pendingClientRequests.set(stream, pending);
|
|
387
442
|
this.pendingClientRequestBytes.set(stream, (this.pendingClientRequestBytes.get(stream) ?? 0) + retainedBytes);
|
|
443
|
+
this.logger?.debug('Queueing SRPC client request before stream activation', {
|
|
444
|
+
srpc: { ...streamLogData(stream), requestId: logSafeText(data.requestId), queuedRequests: pending.length }
|
|
445
|
+
});
|
|
388
446
|
return;
|
|
389
447
|
}
|
|
390
448
|
const inFlight = this.inFlightClientRequests.get(stream) ?? 0;
|
|
@@ -447,12 +505,16 @@ class SrpcServer {
|
|
|
447
505
|
this.updateByteStreamBufferedBytes(stream, op.streamId, SrpcByteStream_1.SrpcByteStream.getReceiverBufferedBytes(stream, op.streamId));
|
|
448
506
|
if (!accepted) {
|
|
449
507
|
if (wasBackpressured) {
|
|
508
|
+
this.logger?.warn('SRPC byte-stream receiver is not draining', { srpc: { ...streamLogData(stream), byteStreamId: op.streamId } });
|
|
450
509
|
SrpcByteStream_1.SrpcByteStream.abortReceiver(stream, op.streamId, new Error(`SRPC byte stream ${op.streamId} receiver is not draining`));
|
|
451
510
|
this.clearByteStreamState(stream, op.streamId);
|
|
452
511
|
return;
|
|
453
512
|
}
|
|
454
513
|
const ids = backpressured ?? new Set();
|
|
455
514
|
if (ids.size >= MaxBackpressuredByteStreamsPerStream) {
|
|
515
|
+
this.logger?.warn('SRPC stream has too many backpressured byte streams', {
|
|
516
|
+
srpc: { ...streamLogData(stream), byteStreamId: op.streamId, backpressuredStreams: ids.size }
|
|
517
|
+
});
|
|
456
518
|
SrpcByteStream_1.SrpcByteStream.abortReceiver(stream, op.streamId, new Error('Too many backpressured SRPC byte streams'));
|
|
457
519
|
this.clearByteStreamState(stream, op.streamId);
|
|
458
520
|
return;
|
|
@@ -464,6 +526,9 @@ class SrpcServer {
|
|
|
464
526
|
this.clearByteStreamBackpressureFlag(stream, op.streamId);
|
|
465
527
|
}
|
|
466
528
|
if (this.totalBackpressuredByteStreamBytes(stream) > MaxBackpressuredByteStreamBytesPerStream) {
|
|
529
|
+
this.logger?.warn('SRPC stream byte-stream buffer limit exceeded', {
|
|
530
|
+
srpc: { ...streamLogData(stream), byteStreamId: op.streamId, bufferedBytes: this.totalBackpressuredByteStreamBytes(stream) }
|
|
531
|
+
});
|
|
467
532
|
SrpcByteStream_1.SrpcByteStream.abortReceiver(stream, op.streamId, new Error('Too many buffered SRPC byte stream bytes'));
|
|
468
533
|
this.clearByteStreamState(stream, op.streamId);
|
|
469
534
|
}
|
|
@@ -517,9 +582,29 @@ class SrpcServer {
|
|
|
517
582
|
const requestData = message[key];
|
|
518
583
|
if (requestData == null)
|
|
519
584
|
continue;
|
|
520
|
-
const
|
|
521
|
-
|
|
585
|
+
const trace = (0, types_1.isValidSrpcTrace)(message.trace) ? message.trace : undefined;
|
|
586
|
+
const logMeta = { ...streamLogData(stream), requestId: logSafeText(_requestId), requestType: key, traceId: trace?.traceId };
|
|
587
|
+
return (0, telemetry_1.withRemoteSpan)('srpc:handleClientRequest', trace, logMeta, () => (0, services_1.withLoggerContext)({ srpc: logMeta }, async () => {
|
|
588
|
+
try {
|
|
589
|
+
this.logger?.info('SRPC client request received');
|
|
590
|
+
const result = await this.runMessageHandler(handlerMeta.handler, stream, requestData);
|
|
591
|
+
this.logger?.info('SRPC client request processed');
|
|
592
|
+
return { [handlerMeta.resultType]: result };
|
|
593
|
+
}
|
|
594
|
+
catch (error) {
|
|
595
|
+
if (error instanceof types_1.SrpcError && error.isUserError) {
|
|
596
|
+
this.logger?.info('SRPC client request returned a user error', {
|
|
597
|
+
srpc: { ...logMeta, error: logSafeText(error.message) }
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
this.logger?.warn('SRPC client request failed', error);
|
|
602
|
+
}
|
|
603
|
+
throw error;
|
|
604
|
+
}
|
|
605
|
+
}));
|
|
522
606
|
}
|
|
607
|
+
this.logger?.warn('Unhandled SRPC client message type', { srpc: { ...streamLogData(stream), requestId: logSafeText(_requestId) } });
|
|
523
608
|
throw new Error('Unhandled message type');
|
|
524
609
|
}
|
|
525
610
|
async runMessageHandler(handler, stream, data) {
|
|
@@ -542,11 +627,11 @@ class SrpcServer {
|
|
|
542
627
|
handler(stream, cause);
|
|
543
628
|
}
|
|
544
629
|
catch (error) {
|
|
545
|
-
this.logger.error('SRPC disconnect handler failed', error);
|
|
630
|
+
this.logger.error('SRPC disconnect handler failed', error, { srpc: { ...streamLogData(stream), cause } });
|
|
546
631
|
}
|
|
547
632
|
}
|
|
548
633
|
}
|
|
549
|
-
revokeStream(stream, cause) {
|
|
634
|
+
revokeStream(stream, cause, remoteClose) {
|
|
550
635
|
if (stream.lastPingAt < 0)
|
|
551
636
|
return false;
|
|
552
637
|
stream.lastPingAt = -1;
|
|
@@ -568,54 +653,66 @@ class SrpcServer {
|
|
|
568
653
|
if (this.streamsByClientId?.get(stream.clientId) === stream)
|
|
569
654
|
this.streamsByClientId.delete(stream.clientId);
|
|
570
655
|
const wasPublished = this.publishedStreams?.has(stream) ?? false;
|
|
656
|
+
const disconnectLogData = { ...streamLogData(stream), cause, ...remoteClose };
|
|
657
|
+
this.logger?.info('SRPC stream disconnected', { srpc: disconnectLogData });
|
|
571
658
|
try {
|
|
572
659
|
this.onStreamDisconnected(stream, cause);
|
|
573
660
|
}
|
|
574
661
|
catch (error) {
|
|
575
|
-
this.logger.error('SRPC disconnect callback failed', error);
|
|
662
|
+
this.logger.error('SRPC disconnect callback failed', error, { srpc: disconnectLogData });
|
|
576
663
|
}
|
|
577
664
|
if (wasPublished) {
|
|
578
665
|
try {
|
|
579
666
|
(0, observer_1.notifySrpcObservers)({ type: 'disconnection', stream, cause, at: Date.now() });
|
|
580
667
|
}
|
|
581
668
|
catch (error) {
|
|
582
|
-
this.logger.error('SRPC observer failed', error);
|
|
669
|
+
this.logger.error('SRPC observer failed', error, { srpc: disconnectLogData });
|
|
583
670
|
}
|
|
584
671
|
this.publishedStreams.delete(stream);
|
|
585
672
|
}
|
|
586
673
|
return true;
|
|
587
674
|
}
|
|
588
|
-
cleanupStream(stream, cause = 'disconnect') {
|
|
589
|
-
if (!this.revokeStream(stream, cause))
|
|
675
|
+
cleanupStream(stream, cause = 'disconnect', remoteClose) {
|
|
676
|
+
if (!this.revokeStream(stream, cause, remoteClose))
|
|
590
677
|
return;
|
|
591
678
|
if (stream.$ws.readyState === ws_1.default.OPEN || stream.$ws.readyState === ws_1.default.CONNECTING) {
|
|
592
679
|
stream.$ws.close(closeCodeForCause(cause), `Stream terminated with cause: ${cause}`);
|
|
593
680
|
}
|
|
594
681
|
}
|
|
595
682
|
closeStreamGracefully(stream, reason) {
|
|
596
|
-
|
|
683
|
+
const closeReason = reason
|
|
684
|
+
? logSafeText(reason, 123) || 'Stream terminated with cause: disconnect'
|
|
685
|
+
: 'Stream terminated with cause: disconnect';
|
|
686
|
+
if (!this.revokeStream(stream, 'disconnect', { code: 1000, reason: closeReason }))
|
|
597
687
|
return;
|
|
598
688
|
if (stream.$ws.readyState === ws_1.default.OPEN || stream.$ws.readyState === ws_1.default.CONNECTING) {
|
|
599
|
-
stream.$ws.close(1000,
|
|
689
|
+
stream.$ws.close(1000, closeReason);
|
|
600
690
|
}
|
|
601
691
|
}
|
|
602
|
-
handleStreamDisconnected(stream, code) {
|
|
603
|
-
this.cleanupStream(stream, causeForCloseCode(code)
|
|
692
|
+
handleStreamDisconnected(stream, code, reason) {
|
|
693
|
+
this.cleanupStream(stream, causeForCloseCode(code), {
|
|
694
|
+
code,
|
|
695
|
+
reason: reason ? logSafeText(reason.toString('utf8'), 123) : undefined
|
|
696
|
+
});
|
|
604
697
|
}
|
|
605
698
|
handleStreamError(stream, error) {
|
|
606
|
-
this.logger.warn('SRPC stream error', error);
|
|
699
|
+
this.logger.warn('SRPC stream error', error, { srpc: streamLogData(stream) });
|
|
607
700
|
this.cleanupStream(stream);
|
|
608
701
|
}
|
|
609
702
|
terminateInactiveStreams() {
|
|
610
703
|
const deadline = Date.now() - 75000;
|
|
611
704
|
for (const stream of this.streamsById.values()) {
|
|
612
|
-
if (stream.lastPingAt >= 0 && stream.lastPingAt < deadline)
|
|
705
|
+
if (stream.lastPingAt >= 0 && stream.lastPingAt < deadline) {
|
|
706
|
+
this.logger.warn('Terminating inactive SRPC stream', { srpc: streamLogData(stream) });
|
|
613
707
|
this.cleanupStream(stream, 'timeout');
|
|
708
|
+
}
|
|
614
709
|
}
|
|
615
710
|
}
|
|
616
711
|
async validateClientAuth(meta, request) {
|
|
617
|
-
if (this.clientAuthorizer)
|
|
618
|
-
|
|
712
|
+
if (this.clientAuthorizer) {
|
|
713
|
+
const result = await this.clientAuthorizer(meta, request);
|
|
714
|
+
return result === false ? new AuthenticationFailure('custom authorizer rejected') : result;
|
|
715
|
+
}
|
|
619
716
|
const authv = String(meta.authv ?? '');
|
|
620
717
|
const appv = String(meta.appv ?? '');
|
|
621
718
|
const ts = String(meta.ts ?? '');
|
|
@@ -623,23 +720,23 @@ class SrpcServer {
|
|
|
623
720
|
const cid = String(meta.cid ?? '');
|
|
624
721
|
const signature = String(meta.signature ?? '');
|
|
625
722
|
if (!authv || !appv || !ts || !id || !cid || !signature)
|
|
626
|
-
return
|
|
723
|
+
return new AuthenticationFailure('missing required credentials');
|
|
627
724
|
const tsInt = Number(ts);
|
|
628
725
|
if (!Number.isFinite(tsInt))
|
|
629
|
-
return
|
|
726
|
+
return new AuthenticationFailure('invalid timestamp');
|
|
630
727
|
const config = getOptionalAppConfig();
|
|
631
728
|
const driftMs = config?.SRPC_AUTH_CLOCK_DRIFT_MS ?? 30000;
|
|
632
729
|
if (!Number.isSafeInteger(driftMs) || driftMs <= 0 || driftMs > helpers_1.MAX_SAFE_TIMER_MS)
|
|
633
|
-
return
|
|
730
|
+
return new AuthenticationFailure('invalid server clock-drift configuration');
|
|
634
731
|
if (Math.abs(Date.now() - tsInt) > driftMs)
|
|
635
|
-
return
|
|
732
|
+
return new AuthenticationFailure('expired timestamp');
|
|
636
733
|
if (authv !== '2')
|
|
637
|
-
return
|
|
734
|
+
return new AuthenticationFailure('unsupported auth version');
|
|
638
735
|
if (!isAuthToken(meta.nonce) || !meta.aud || !Number.isSafeInteger(Number(meta._v)) || Number(meta._v) !== 2)
|
|
639
|
-
return
|
|
736
|
+
return new AuthenticationFailure('invalid protocol credentials');
|
|
640
737
|
const clientKey = await this.fetchClientKey(cid);
|
|
641
738
|
if (clientKey === false)
|
|
642
|
-
return
|
|
739
|
+
return new AuthenticationFailure('unknown client key');
|
|
643
740
|
const url = new URL(request.url ?? '', 'http://localhost');
|
|
644
741
|
const metadata = normalizeMetadata(Object.fromEntries(Object.entries(meta)
|
|
645
742
|
.filter(([key]) => key.startsWith('m--'))
|
|
@@ -666,24 +763,24 @@ class SrpcServer {
|
|
|
666
763
|
const signatureBuffer = Buffer.from(signature);
|
|
667
764
|
const computedBuffer = Buffer.from(computedSignature);
|
|
668
765
|
if (signatureBuffer.length !== computedBuffer.length || !(0, node_crypto_1.timingSafeEqual)(signatureBuffer, computedBuffer))
|
|
669
|
-
return
|
|
766
|
+
return new AuthenticationFailure('invalid signature');
|
|
670
767
|
if (String(meta.aud) !== (this.options.authAudience ?? url.pathname))
|
|
671
|
-
return
|
|
768
|
+
return new AuthenticationFailure('invalid audience');
|
|
672
769
|
const nonce = String(meta.nonce);
|
|
673
770
|
const expiresAt = tsInt + driftMs;
|
|
674
771
|
if (this.isLocalAuthNonceReplay(cid, nonce))
|
|
675
|
-
return
|
|
772
|
+
return new AuthenticationFailure('replayed nonce');
|
|
676
773
|
if (this.authNonceConsumer) {
|
|
677
774
|
if (!(await this.authNonceConsumer(cid, nonce, expiresAt)))
|
|
678
|
-
return
|
|
775
|
+
return new AuthenticationFailure('replayed nonce');
|
|
679
776
|
// The shared consumer is authoritative under saturation. Keep the
|
|
680
777
|
// local duplicate fast path bounded by evicting its least-recent
|
|
681
778
|
// principal/nonce entries instead of imposing a service-wide CID cap.
|
|
682
779
|
if (!this.consumeLocalAuthNonce(cid, nonce, expiresAt, true))
|
|
683
|
-
return
|
|
780
|
+
return new AuthenticationFailure('replayed nonce');
|
|
684
781
|
}
|
|
685
782
|
else if (!this.consumeLocalAuthNonce(cid, nonce, expiresAt, false)) {
|
|
686
|
-
return
|
|
783
|
+
return new AuthenticationFailure('replay cache capacity exceeded');
|
|
687
784
|
}
|
|
688
785
|
return true;
|
|
689
786
|
}
|
|
@@ -716,7 +813,8 @@ class SrpcServer {
|
|
|
716
813
|
try {
|
|
717
814
|
stream.$ws.send(encoded);
|
|
718
815
|
}
|
|
719
|
-
catch {
|
|
816
|
+
catch (error) {
|
|
817
|
+
this.logger.warn('Failed to send SRPC response', error, { srpc: streamLogData(stream) });
|
|
720
818
|
this.closeStreamWithError(stream, 'badArg', 'Failed to send response');
|
|
721
819
|
return false;
|
|
722
820
|
}
|
|
@@ -735,6 +833,7 @@ class SrpcServer {
|
|
|
735
833
|
try {
|
|
736
834
|
stream.$ws.send(encoded, error => {
|
|
737
835
|
if (error) {
|
|
836
|
+
this.logger.warn('Failed to send SRPC response', error, { srpc: streamLogData(stream) });
|
|
738
837
|
this.closeStreamWithError(stream, 'badArg', 'Failed to send response');
|
|
739
838
|
reject(error);
|
|
740
839
|
}
|
|
@@ -754,6 +853,7 @@ class SrpcServer {
|
|
|
754
853
|
});
|
|
755
854
|
}
|
|
756
855
|
catch (error) {
|
|
856
|
+
this.logger.warn('Failed to send SRPC response', error, { srpc: streamLogData(stream) });
|
|
757
857
|
this.closeStreamWithError(stream, 'badArg', 'Failed to send response');
|
|
758
858
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
759
859
|
}
|
|
@@ -766,8 +866,8 @@ class SrpcServer {
|
|
|
766
866
|
const bodies = typeof options === 'object' && options.bodies === true;
|
|
767
867
|
this.logger.info('SRPC traffic', {
|
|
768
868
|
direction,
|
|
769
|
-
streamId: stream.id,
|
|
770
|
-
clientId: stream.clientId,
|
|
869
|
+
streamId: logSafeText(stream.id),
|
|
870
|
+
clientId: logSafeText(stream.clientId),
|
|
771
871
|
messageTypes: (0, types_1.srpcMessageTypes)(message),
|
|
772
872
|
...(bodies ? { body: message } : {})
|
|
773
873
|
});
|
|
@@ -785,6 +885,7 @@ class SrpcServer {
|
|
|
785
885
|
return false;
|
|
786
886
|
}
|
|
787
887
|
closeStreamWithError(stream, cause, message) {
|
|
888
|
+
this.logger?.warn('Closing SRPC stream due to a protocol or transport error', { srpc: { ...streamLogData(stream), cause, message } });
|
|
788
889
|
if (!this.revokeStream(stream, cause))
|
|
789
890
|
return;
|
|
790
891
|
stream.$ws.close(closeCodeForCause(cause), message.slice(0, 123));
|
|
@@ -861,79 +962,95 @@ class SrpcServer {
|
|
|
861
962
|
assertTimeout(timeoutMs);
|
|
862
963
|
const requestType = `${prefix}Request`;
|
|
863
964
|
const resultType = `${prefix}Response`;
|
|
864
|
-
const message = { requestId, [requestType]: data };
|
|
865
965
|
if (stream.$queue.has(requestId))
|
|
866
966
|
return Promise.reject(new Error(`Duplicate SRPC request ID ${requestId}`));
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
967
|
+
const spanMeta = { ...streamLogData(stream), requestId, requestType };
|
|
968
|
+
return (0, telemetry_1.withSpan)('srpc:invokeClient', spanMeta, () => {
|
|
969
|
+
const trace = toWireTrace((0, telemetry_1.getTraceContext)());
|
|
970
|
+
const logMeta = { ...spanMeta, traceId: trace?.traceId };
|
|
971
|
+
return (0, services_1.withLoggerContext)({ srpc: logMeta }, async () => {
|
|
972
|
+
try {
|
|
973
|
+
this.logger?.info('Requesting SRPC client invocation');
|
|
974
|
+
const message = { requestId, trace, [requestType]: data };
|
|
975
|
+
const encoded = (0, types_1.encodeSrpcMessage)(this.options.serverMessage, message);
|
|
976
|
+
if (stream.$queue.size >= this.maxPendingServerRequests) {
|
|
977
|
+
throw new types_1.SrpcBackpressureError('Too many pending server SRPC requests');
|
|
978
|
+
}
|
|
979
|
+
if ((this.pendingServerRequestBytes.get(stream) ?? 0) + encoded.byteLength > this.maxPendingServerRequestBytes) {
|
|
980
|
+
throw new types_1.SrpcBackpressureError('Too many pending server SRPC request bytes');
|
|
981
|
+
}
|
|
982
|
+
this.pendingServerRequestBytes.set(stream, (this.pendingServerRequestBytes.get(stream) ?? 0) + encoded.byteLength);
|
|
983
|
+
let retained = true;
|
|
984
|
+
const releaseRetainedBytes = () => {
|
|
985
|
+
if (!retained)
|
|
986
|
+
return;
|
|
987
|
+
retained = false;
|
|
988
|
+
const remaining = Math.max(0, (this.pendingServerRequestBytes.get(stream) ?? encoded.byteLength) - encoded.byteLength);
|
|
989
|
+
if (remaining)
|
|
990
|
+
this.pendingServerRequestBytes.set(stream, remaining);
|
|
991
|
+
else
|
|
992
|
+
this.pendingServerRequestBytes.delete(stream);
|
|
993
|
+
};
|
|
994
|
+
const response = await new Promise((resolve, reject) => {
|
|
995
|
+
const timeout = setTimeout(() => {
|
|
996
|
+
if (!stream.$queue.has(requestId))
|
|
997
|
+
return;
|
|
998
|
+
stream.$queue.delete(requestId);
|
|
999
|
+
this.addLateReplyTombstone(stream, requestId);
|
|
1000
|
+
releaseRetainedBytes();
|
|
1001
|
+
reject(new types_1.SrpcIndeterminateDeliveryError(stream.clientId, new Error(`Request timeout after ${timeoutMs}ms`)));
|
|
1002
|
+
}, timeoutMs);
|
|
1003
|
+
const queueItem = {
|
|
1004
|
+
exp: Date.now() + timeoutMs,
|
|
1005
|
+
resolve: response => {
|
|
1006
|
+
clearTimeout(timeout);
|
|
1007
|
+
releaseRetainedBytes();
|
|
1008
|
+
resolve(response);
|
|
1009
|
+
},
|
|
1010
|
+
reject: error => {
|
|
1011
|
+
clearTimeout(timeout);
|
|
1012
|
+
releaseRetainedBytes();
|
|
1013
|
+
reject(error);
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
stream.$queue.set(requestId, queueItem);
|
|
1017
|
+
let sent;
|
|
1018
|
+
try {
|
|
1019
|
+
sent = this.writeEncodedToStream(stream, message, encoded);
|
|
1020
|
+
}
|
|
1021
|
+
catch (error) {
|
|
1022
|
+
if (stream.$queue.get(requestId) === queueItem)
|
|
1023
|
+
stream.$queue.delete(requestId);
|
|
1024
|
+
clearTimeout(timeout);
|
|
1025
|
+
releaseRetainedBytes();
|
|
1026
|
+
reject(error);
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
if (!sent) {
|
|
1030
|
+
stream.$queue.delete(requestId);
|
|
1031
|
+
clearTimeout(timeout);
|
|
1032
|
+
releaseRetainedBytes();
|
|
1033
|
+
reject(new Error('Failed to send request: not connected'));
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
906
1036
|
const result = response[resultType];
|
|
907
1037
|
if (result == null)
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
-
reject: error => {
|
|
913
|
-
clearTimeout(timeout);
|
|
914
|
-
releaseRetainedBytes();
|
|
915
|
-
reject(error);
|
|
1038
|
+
throw new Error('Invalid response from client');
|
|
1039
|
+
this.logger?.info('SRPC client invocation completed');
|
|
1040
|
+
return result;
|
|
916
1041
|
}
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
if (!sent) {
|
|
932
|
-
stream.$queue.delete(requestId);
|
|
933
|
-
clearTimeout(timeout);
|
|
934
|
-
releaseRetainedBytes();
|
|
935
|
-
reject(new Error('Failed to send request: not connected'));
|
|
936
|
-
}
|
|
1042
|
+
catch (error) {
|
|
1043
|
+
if (error instanceof types_1.SrpcError) {
|
|
1044
|
+
this.logger?.[error.isUserError ? 'info' : 'warn']('SRPC client invocation returned a remote error', {
|
|
1045
|
+
srpc: { ...logMeta, error: logSafeText(error.message), userError: error.isUserError === true }
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
this.logger?.warn('SRPC client invocation failed', error);
|
|
1050
|
+
}
|
|
1051
|
+
throw error;
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
937
1054
|
});
|
|
938
1055
|
}
|
|
939
1056
|
encodeMeshInvokeRequest(prefix, data) {
|
|
@@ -1114,24 +1231,11 @@ class SrpcServer {
|
|
|
1114
1231
|
static createInvoke(instanceFn) {
|
|
1115
1232
|
return ((...args) => instanceFn().invoke(...args));
|
|
1116
1233
|
}
|
|
1117
|
-
static __tsfType = _SrpcServerMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcServer\",\"typeName\":\"SrpcServer\",\"classType\":{\"$tsf\":0},\"properties\":[{\"name\":\"streamsById\",\"type\":{\"$tsfType\":0},\"optional\":false},{\"name\":\"streamsByClientId\",\"type\":{\"$tsfType\":0},\"optional\":false},{\"name\":\"pendingStreamsByClientId\",\"type\":{\"$tsfType\":0},\"optional\":false}],\"methods\":[{\"name\":\"postEstablishCheck\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"onStreamWillActivate\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":2},\"description\":\"Hook for private/cluster CAS work after the initial protocol frame is queued but before user connection handlers and public local publication.\"},{\"name\":\"hasExternalByteStreamSender\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"_streamId\",\"type\":{\"$tsfType\":3},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":4},\"description\":\"Allows a transport extension to recognize a locally-owned sender whose state is maintained outside the core SrpcByteStream sender map. Core remains strict by default.\"},{\"name\":\"getCurrentStreamByClientId\",\"parameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":4}]}},{\"name\":\"isCurrentStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":4}},{\"name\":\"handleByteSubstreamOperation\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"op\",\"type\":{\"$tsfType\":6},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":5},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"runMessageHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2},{\"kind\":2}]},{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2},{\"kind\":2}]},\"optional\":false}]}],\"typeName\":\"TSrpcMessageHandlerClass\"}],\"typeName\":\"TSrpcMessageHandlerFnOrClass\"},\"optional\":false,\"default\":false},{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":8}},{\"name\":\"onStreamConnected\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"onStreamActivated\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":2}},{\"name\":\"onStreamDisconnected\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":10},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"cleanupStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":10},\"optional\":true,\"default\":true}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"writeToStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":4}},{\"name\":\"writeToStreamAsync\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"setClientAuthorizer\",\"parameters\":[{\"name\":\"authorizer\",\"type\":{\"$tsfType\":11},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"setClientKeyFetcher\",\"parameters\":[{\"name\":\"fetcher\",\"type\":{\"$tsfType\":12},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"setAuthNonceConsumer\",\"parameters\":[{\"name\":\"consumer\",\"type\":{\"$tsfType\":13},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7},\"description\":\"Installs an atomic service-wide auth-v2 nonce consumer. It must return true only for the first `(principal, nonce)` consumption through `expiresAt`; false rejects a replay. Core retains its fair local guard.\"},{\"name\":\"registerConnectionHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":14},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerMessageHandler\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false},{\"name\":\"handler\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2,\"typeName\":\"HandlerRequestData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TClientOutput\",\"classType\":{\"$tsf\":6}},{\"kind\":2,\"typeName\":\"P\"}]},{\"kind\":2,\"typeName\":\"ResponseData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},{\"kind\":2,\"typeName\":\"P\"}]}]},{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2,\"typeName\":\"HandlerRequestData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TClientOutput\",\"classType\":{\"$tsf\":6}},{\"kind\":2,\"typeName\":\"P\"}]},{\"kind\":2,\"typeName\":\"ResponseData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},{\"kind\":2,\"typeName\":\"P\"}]}]},\"optional\":false}]}],\"typeName\":\"TSrpcMessageHandlerClass\"}],\"typeName\":\"TSrpcMessageHandlerFnOrClass\"},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerDisconnectHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":16},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerBroadcastHandler\",\"parameters\":[{\"name\":\"type\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"handler\",\"type\":{\"$tsfType\":17},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"broadcast\",\"parameters\":[{\"name\":\"type\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":18},\"optional\":false,\"default\":false},{\"name\":\"options\",\"type\":{\"$tsfType\":19},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"resolveClient\",\"parameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"TResolvedMeta\",\"classType\":{\"$tsf\":7}}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":4}]}}},{\"name\":\"listClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"TResolvedMeta\",\"classType\":{\"$tsf\":7}}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}]}}}},{\"name\":\"disconnectClient\",\"parameters\":[{\"name\":\"streamOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"reason\",\"type\":{\"$tsfType\":5},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"updateClientMetadata\",\"parameters\":[{\"name\":\"streamOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"metadata\",\"type\":{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}}],\"utilityKeys\":[],\"types\":[]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"invoke\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":20},\"optional\":false,\"default\":false},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":0},\"optional\":true,\"default\":true}],\"returnType\":{\"$tsfType\":21}},{\"name\":\"invokeWithRequestId\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":20},\"optional\":false,\"default\":false},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":3},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":21}},{\"name\":\"encodeMeshInvokeRequest\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}}},{\"name\":\"decodeMeshInvokeRequest\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":0}},{\"name\":\"encodeMeshInvokeResponse\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}}},{\"name\":\"decodeMeshInvokeResponse\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":0}},{\"name\":\"reserveByteStreamSenderIds\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"count\",\"type\":{\"$tsfType\":3},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":22}},{\"name\":\"writeByteStreamOperation\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"operation\",\"type\":{\"$tsfType\":23},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"close\",\"parameters\":[],\"returnType\":{\"$tsfType\":7}}],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"options\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"logger\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"clientMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"serverMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"wsPath\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"defaultUnspecifiedProtocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logTraffic\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":18,\"typeName\":\"SrpcTrafficLoggingOptions\",\"types\":[{\"kind\":20,\"name\":\"bodies\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"debug\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logLevel\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"info\"},{\"kind\":10,\"literal\":\"debug\"},{\"kind\":10,\"literal\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"Server\",\"classType\":{\"$tsfImport\":[9,\"node:http\",\"Server\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBufferedBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxMessageBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingHandshakes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveStreams\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientIdBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxAuthReplayPrincipals\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},\"optional\":false,\"default\":false}]}]", [() => SrpcServer, () => (typeof WebSocket !== "undefined" ? WebSocket : (typeof exports !== "undefined" ? exports.WebSocket : undefined)), () => (typeof Map !== "undefined" ? Map : (typeof exports !== "undefined" ? exports.Map : undefined)), () => (typeof ReadonlySet !== "undefined" ? ReadonlySet : (typeof exports !== "undefined" ? exports.ReadonlySet : undefined)), () => (typeof TMeta !== "undefined" ? TMeta : (typeof exports !== "undefined" ? exports.TMeta : undefined)), () => (typeof TServerOutput !== "undefined" ? TServerOutput : (typeof exports !== "undefined" ? exports.TServerOutput : undefined)), () => (typeof TClientOutput !== "undefined" ? TClientOutput : (typeof exports !== "undefined" ? exports.TClientOutput : undefined)), () => (typeof TResolvedMeta !== "undefined" ? TResolvedMeta : (typeof exports !== "undefined" ? exports.TResolvedMeta : undefined)), () => (typeof Uint8Array !== "undefined" ? Uint8Array : (typeof exports !== "undefined" ? exports.Uint8Array : undefined)), require], __tsf_metadata_type);
|
|
1234
|
+
static __tsfType = _SrpcServerMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcServer\",\"typeName\":\"SrpcServer\",\"classType\":{\"$tsf\":0},\"properties\":[{\"name\":\"streamsById\",\"type\":{\"$tsfType\":1},\"optional\":false},{\"name\":\"streamsByClientId\",\"type\":{\"$tsfType\":1},\"optional\":false},{\"name\":\"pendingStreamsByClientId\",\"type\":{\"$tsfType\":1},\"optional\":false}],\"methods\":[{\"name\":\"postEstablishCheck\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":2}},{\"name\":\"onStreamWillActivate\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3},\"description\":\"Hook for private/cluster CAS work after the initial protocol frame is queued but before user connection handlers and public local publication.\"},{\"name\":\"hasExternalByteStreamSender\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"_streamId\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":5},\"description\":\"Allows a transport extension to recognize a locally-owned sender whose state is maintained outside the core SrpcByteStream sender map. Core remains strict by default.\"},{\"name\":\"getCurrentStreamByClientId\",\"parameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":4}]}},{\"name\":\"isCurrentStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":5}},{\"name\":\"handleByteSubstreamOperation\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"op\",\"type\":{\"$tsfType\":6},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":0},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"runMessageHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2},{\"kind\":2}]},{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2},{\"kind\":2}]},\"optional\":false}]}],\"typeName\":\"TSrpcMessageHandlerClass\"}],\"typeName\":\"TSrpcMessageHandlerFnOrClass\"},\"optional\":false,\"default\":false},{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":1},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":8}},{\"name\":\"onStreamConnected\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"onStreamActivated\",\"parameters\":[{\"name\":\"_stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"onStreamDisconnected\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":10},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"cleanupStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":10},\"optional\":true,\"default\":true},{\"name\":\"remoteClose\",\"type\":{\"$tsfType\":11},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"writeToStream\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":5}},{\"name\":\"writeToStreamAsync\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"setClientAuthorizer\",\"parameters\":[{\"name\":\"authorizer\",\"type\":{\"$tsfType\":12},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"setClientKeyFetcher\",\"parameters\":[{\"name\":\"fetcher\",\"type\":{\"$tsfType\":13},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"setAuthNonceConsumer\",\"parameters\":[{\"name\":\"consumer\",\"type\":{\"$tsfType\":14},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7},\"description\":\"Installs an atomic service-wide auth-v2 nonce consumer. It must return true only for the first `(principal, nonce)` consumption through `expiresAt`; false rejects a replay. Core retains its fair local guard.\"},{\"name\":\"registerConnectionHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerMessageHandler\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":16},\"optional\":false,\"default\":false},{\"name\":\"handler\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2,\"typeName\":\"HandlerRequestData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TClientOutput\",\"classType\":{\"$tsf\":6}},{\"kind\":2,\"typeName\":\"P\"}]},{\"kind\":2,\"typeName\":\"ResponseData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},{\"kind\":2,\"typeName\":\"P\"}]}]},{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":2,\"typeName\":\"HandlerRequestData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TClientOutput\",\"classType\":{\"$tsf\":6}},{\"kind\":2,\"typeName\":\"P\"}]},{\"kind\":2,\"typeName\":\"ResponseData\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TServerOutput\",\"classType\":{\"$tsf\":5}},{\"kind\":2,\"typeName\":\"P\"}]}]},\"optional\":false}]}],\"typeName\":\"TSrpcMessageHandlerClass\"}],\"typeName\":\"TSrpcMessageHandlerFnOrClass\"},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerDisconnectHandler\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":17},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"registerBroadcastHandler\",\"parameters\":[{\"name\":\"type\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"handler\",\"type\":{\"$tsfType\":18},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":7}},{\"name\":\"broadcast\",\"parameters\":[{\"name\":\"type\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":19},\"optional\":false,\"default\":false},{\"name\":\"options\",\"type\":{\"$tsfType\":20},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"resolveClient\",\"parameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"TResolvedMeta\",\"classType\":{\"$tsf\":7}}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":4}]}}},{\"name\":\"listClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"TResolvedMeta\",\"classType\":{\"$tsf\":7}}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}]}}}},{\"name\":\"disconnectClient\",\"parameters\":[{\"name\":\"streamOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"reason\",\"type\":{\"$tsfType\":0},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":2}},{\"name\":\"updateClientMetadata\",\"parameters\":[{\"name\":\"streamOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"metadata\",\"type\":{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}}],\"utilityKeys\":[],\"types\":[]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":2}},{\"name\":\"invoke\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":16},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":21},\"optional\":false,\"default\":false},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":1},\"optional\":true,\"default\":true}],\"returnType\":{\"$tsfType\":22}},{\"name\":\"invokeWithRequestId\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":16},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":21},\"optional\":false,\"default\":false},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":22}},{\"name\":\"encodeMeshInvokeRequest\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":1},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}}},{\"name\":\"decodeMeshInvokeRequest\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"encodeMeshInvokeResponse\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":1},\"optional\":false,\"default\":false}],\"returnType\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}}},{\"name\":\"decodeMeshInvokeResponse\",\"parameters\":[{\"name\":\"prefix\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":8}},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"reserveByteStreamSenderIds\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"count\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":23}},{\"name\":\"writeByteStreamOperation\",\"parameters\":[{\"name\":\"stream\",\"type\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":1}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":2},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":4}},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}]},\"optional\":false,\"default\":false},{\"name\":\"operation\",\"type\":{\"$tsfType\":24},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":9}},{\"name\":\"close\",\"parameters\":[],\"returnType\":{\"$tsfType\":7}}],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"options\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"logger\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"clientMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"serverMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"wsPath\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"defaultUnspecifiedProtocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logTraffic\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":18,\"typeName\":\"SrpcTrafficLoggingOptions\",\"types\":[{\"kind\":20,\"name\":\"bodies\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"Server\",\"classType\":{\"$tsfImport\":[9,\"node:http\",\"Server\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBufferedBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxMessageBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingHandshakes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveStreams\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientIdBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxAuthReplayPrincipals\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},\"optional\":false,\"default\":false}]}]", [() => SrpcServer, () => (typeof WebSocket !== "undefined" ? WebSocket : (typeof exports !== "undefined" ? exports.WebSocket : undefined)), () => (typeof Map !== "undefined" ? Map : (typeof exports !== "undefined" ? exports.Map : undefined)), () => (typeof ReadonlySet !== "undefined" ? ReadonlySet : (typeof exports !== "undefined" ? exports.ReadonlySet : undefined)), () => (typeof TMeta !== "undefined" ? TMeta : (typeof exports !== "undefined" ? exports.TMeta : undefined)), () => (typeof TServerOutput !== "undefined" ? TServerOutput : (typeof exports !== "undefined" ? exports.TServerOutput : undefined)), () => (typeof TClientOutput !== "undefined" ? TClientOutput : (typeof exports !== "undefined" ? exports.TClientOutput : undefined)), () => (typeof TResolvedMeta !== "undefined" ? TResolvedMeta : (typeof exports !== "undefined" ? exports.TResolvedMeta : undefined)), () => (typeof Uint8Array !== "undefined" ? Uint8Array : (typeof exports !== "undefined" ? exports.Uint8Array : undefined)), require], __tsf_metadata_type);
|
|
1118
1235
|
}
|
|
1119
1236
|
exports.SrpcServer = SrpcServer;
|
|
1120
1237
|
_SrpcServerMetadata_1.classType = SrpcServer;
|
|
1121
1238
|
SrpcServer.__tsfType = _SrpcServerMetadata_1;
|
|
1122
|
-
function createLogger(logger, logLevel) {
|
|
1123
|
-
if (logLevel === false)
|
|
1124
|
-
return noopLogger;
|
|
1125
|
-
if (logLevel === 'debug') {
|
|
1126
|
-
return {
|
|
1127
|
-
info: logger.debug.bind(logger),
|
|
1128
|
-
warn: logger.warn.bind(logger),
|
|
1129
|
-
error: logger.error.bind(logger),
|
|
1130
|
-
debug: logger.debug.bind(logger)
|
|
1131
|
-
};
|
|
1132
|
-
}
|
|
1133
|
-
return logger;
|
|
1134
|
-
}
|
|
1135
1239
|
function toBuffer(data) {
|
|
1136
1240
|
if (Buffer.isBuffer(data))
|
|
1137
1241
|
return data;
|
|
@@ -1142,6 +1246,40 @@ function toBuffer(data) {
|
|
|
1142
1246
|
function configuredPositiveInteger(value, defaultValue) {
|
|
1143
1247
|
return value != null && Number.isSafeInteger(value) && value > 0 ? value : defaultValue;
|
|
1144
1248
|
}
|
|
1249
|
+
function streamLogData(stream) {
|
|
1250
|
+
return {
|
|
1251
|
+
streamId: logSafeText(stream.id),
|
|
1252
|
+
clientId: logSafeText(stream.clientId),
|
|
1253
|
+
clientStreamId: logSafeText(stream.clientStreamId),
|
|
1254
|
+
address: logSafeText(stream.address),
|
|
1255
|
+
protocolVersion: stream.protocolVersion
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
function logSafeText(value, maxBytes = 256) {
|
|
1259
|
+
if (typeof value !== 'string')
|
|
1260
|
+
return undefined;
|
|
1261
|
+
const printable = value.replace(/[\u0000-\u001f\u007f-\u009f]/g, '?');
|
|
1262
|
+
if (Buffer.byteLength(printable) <= maxBytes)
|
|
1263
|
+
return printable;
|
|
1264
|
+
const suffix = '…';
|
|
1265
|
+
const prefixBytes = Math.max(0, maxBytes - Buffer.byteLength(suffix));
|
|
1266
|
+
let truncated = Buffer.from(printable).subarray(0, prefixBytes).toString('utf8');
|
|
1267
|
+
while (Buffer.byteLength(truncated) > prefixBytes)
|
|
1268
|
+
truncated = truncated.slice(0, -1);
|
|
1269
|
+
return `${truncated}${suffix}`;
|
|
1270
|
+
}
|
|
1271
|
+
function safeHandshakeMessage(value) {
|
|
1272
|
+
return logSafeText(value, 123) || 'Handshake rejected';
|
|
1273
|
+
}
|
|
1274
|
+
function toWireTrace(traceContext) {
|
|
1275
|
+
if (!traceContext)
|
|
1276
|
+
return undefined;
|
|
1277
|
+
return {
|
|
1278
|
+
traceId: traceContext.traceId,
|
|
1279
|
+
spanId: traceContext.spanId,
|
|
1280
|
+
traceFlags: traceContext.traceFlags
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1145
1283
|
function assertTimeout(value) {
|
|
1146
1284
|
(0, helpers_1.assertSafeTimerMs)(value, 'Request timeout');
|
|
1147
1285
|
}
|