@zyno-io/ts-server-foundation 26.930.307 → 26.1003.2105

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.
@@ -6,7 +6,7 @@ exports.createModuleClass = createModuleClass;
6
6
  exports.normalizeModule = normalizeModule;
7
7
  const tslib_1 = require("tslib");
8
8
  const _a = tslib_1.__importStar(require("@zyno-io/ts-reflection/type-metadata-runtime"));
9
- const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":18,\"typeName\":\"ModuleDefinition\",\"types\":[{\"$tsfNode\":0},{\"$tsfNode\":1},{\"kind\":20,\"name\":\"imports\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"ModuleDefinition\",\"types\":[{\"$tsfNode\":0},{\"$tsfNode\":1},{\"kind\":20,\"name\":\"imports\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"ModuleDefinition\"},{\"kind\":2,\"typeName\":\"ClassType\"},{\"kind\":18,\"typeName\":\"ModuleInstance\",\"types\":[{\"kind\":20,\"name\":\"definition\",\"type\":{\"kind\":2,\"typeName\":\"ModuleDefinition\"},\"optional\":false}]}],\"typeName\":\"ModuleLike\"}},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":2},{\"$tsfNode\":3},{\"$tsfNode\":4},{\"$tsfNode\":5},{\"$tsfNode\":6}],\"typeParameters\":[\"C\"]},{\"kind\":2,\"typeName\":\"ClassType\"},{\"kind\":18,\"typeName\":\"ModuleInstance\",\"types\":[{\"kind\":20,\"name\":\"definition\",\"type\":{\"kind\":18,\"typeName\":\"ModuleDefinition\",\"types\":[{\"$tsfNode\":0},{\"$tsfNode\":1},{\"kind\":20,\"name\":\"imports\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"ModuleDefinition\"},{\"kind\":2,\"typeName\":\"ClassType\"},{\"kind\":2,\"typeName\":\"ModuleInstance\"}],\"typeName\":\"ModuleLike\"}},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":2},{\"$tsfNode\":3},{\"$tsfNode\":4},{\"$tsfNode\":5},{\"$tsfNode\":6}],\"typeParameters\":[\"C\"]},\"optional\":false}]}],\"typeName\":\"ModuleLike\"}},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":2},{\"$tsfNode\":3},{\"$tsfNode\":4},{\"$tsfNode\":5},{\"$tsfNode\":6}]}],[{\"kind\":20,\"name\":\"config\",\"type\":{\"$tsfNode\":7},\"optional\":true},{\"kind\":20,\"name\":\"defaultConfig\",\"type\":{\"$tsfNode\":8},\"optional\":true},{\"kind\":20,\"name\":\"exports\",\"type\":{\"$tsfNode\":9},\"optional\":true},{\"kind\":20,\"name\":\"providers\",\"type\":{\"$tsfNode\":10},\"optional\":true},{\"kind\":20,\"name\":\"controllers\",\"type\":{\"$tsfNode\":11},\"optional\":true},{\"kind\":20,\"name\":\"listeners\",\"type\":{\"$tsfNode\":11},\"optional\":true},{\"kind\":20,\"name\":\"commands\",\"type\":{\"$tsfNode\":11},\"optional\":true},{\"kind\":12,\"types\":{\"$tsfNode\":12}},{\"kind\":12,\"types\":{\"$tsfNode\":13}},{\"kind\":12,\"types\":{\"$tsfNode\":14}},{\"kind\":12,\"types\":{\"$tsfNode\":15}},{\"kind\":12,\"types\":{\"$tsfNode\":16}},[{\"$tsfNode\":17},{\"kind\":4}],[{\"$tsfNode\":18},{\"kind\":4}],[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"Token\"}},{\"kind\":4}],[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"Provider\"}},{\"kind\":4}],[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"ClassType\"}},{\"kind\":4}],{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"}]},{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"}],\"utilityKeys\":[],\"types\":[]}]]", []);
9
+ const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":18,\"typeName\":\"ModuleDefinition\",\"types\":[{\"kind\":20,\"name\":\"config\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"ClassType\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"defaultConfig\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"}],\"utilityKeys\":[],\"types\":[]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"imports\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"ModuleDefinition\"},{\"kind\":2,\"typeName\":\"ClassType\"},{\"kind\":18,\"typeName\":\"ModuleInstance\",\"types\":[{\"kind\":20,\"name\":\"definition\",\"type\":{\"kind\":2,\"typeName\":\"ModuleDefinition\"},\"optional\":false}]}],\"typeName\":\"ModuleLike\"}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"exports\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"Token\"}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"providers\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"Provider\"}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"controllers\",\"type\":{\"$tsfNode\":0},\"optional\":true},{\"kind\":20,\"name\":\"listeners\",\"type\":{\"$tsfNode\":0},\"optional\":true},{\"kind\":20,\"name\":\"commands\",\"type\":{\"$tsfNode\":0},\"optional\":true}]}],[{\"kind\":12,\"types\":{\"$tsfNode\":1}},[{\"kind\":14,\"type\":{\"kind\":2,\"typeName\":\"ClassType\"}},{\"kind\":4}]]]", []);
10
10
  let _AppModuleMetadata_1;
11
11
  class AppModule {
12
12
  definition;
@@ -8,7 +8,7 @@ const node_zlib_1 = require("node:zlib");
8
8
  const errors_1 = require("./errors");
9
9
  const form_body_1 = require("./form-body");
10
10
  const headers_1 = require("./headers");
11
- const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":2,\"typeName\":\"symbol\"}]},{\"kind\":2}],\"index\":{\"kind\":2},\"types\":[]},{\"$tsfNode\":0},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"$tsfNode\":1}],\"index\":{\"$tsfNode\":1},\"types\":[]},{\"kind\":6},{\"kind\":13,\"types\":[{\"$tsfNode\":0},{\"kind\":2,\"typeName\":\"(headers: HttpHeaderInput) =\\u003e HttpRequest\"}],\"typeName\":\"HttpRequestHeaders\"},{\"kind\":2},{\"kind\":8},{\"$tsfNode\":2},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":7},{\"kind\":8}]},{\"kind\":17},{\"kind\":22,\"type\":{\"kind\":6}},{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"$tsfNode\":2}],\"utilityKeys\":[],\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":3},{\"kind\":7},{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"GET\"},{\"kind\":10,\"literal\":\"POST\"},{\"kind\":10,\"literal\":\"PUT\"},{\"kind\":10,\"literal\":\"PATCH\"},{\"kind\":10,\"literal\":\"DELETE\"},{\"kind\":10,\"literal\":\"OPTIONS\"},{\"kind\":10,\"literal\":\"HEAD\"}],\"typeName\":\"KnownHttpMethod\"},{\"kind\":13,\"types\":[{\"kind\":6},{\"kind\":18,\"types\":[]}]}],\"typeName\":\"HttpMethod\"},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"$tsfNode\":3}],\"index\":{\"$tsfNode\":3},\"types\":[],\"typeName\":\"HttpHeaderInput\"},{\"kind\":2,\"typeName\":\"(error?: Error | null, data?: Buffer) =\\u003e void\"},{\"kind\":2,\"typeName\":\"(chunk: Buffer) =\\u003e void\"}],[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]},{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":{\"$tsfNode\":4}},{\"kind\":12,\"types\":{\"$tsfNode\":5}},[{\"$tsfNode\":6},{\"$tsfNode\":7},{\"$tsfNode\":8},{\"$tsfNode\":9},{\"$tsfNode\":10},{\"$tsfNode\":11}],[{\"kind\":6},{\"kind\":7},{\"kind\":8},{\"kind\":14,\"type\":{\"kind\":6}},{\"kind\":4}],{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]]", []);
11
+ const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":2,\"typeName\":\"symbol\"}]},{\"kind\":2}],\"index\":{\"kind\":2},\"types\":[]},{\"$tsfNode\":0},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"$tsfNode\":1}],\"index\":{\"$tsfNode\":1},\"types\":[]},{\"kind\":6},{\"kind\":13,\"types\":[{\"$tsfNode\":0},{\"kind\":2,\"typeName\":\"(headers: HttpHeaderInput) =\\u003e HttpRequest\"}],\"typeName\":\"HttpRequestHeaders\"},{\"kind\":2},{\"kind\":8},{\"$tsfNode\":2},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":7},{\"kind\":8}]},{\"kind\":17},{\"kind\":22,\"type\":{\"kind\":6}},{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"$tsfNode\":2}],\"utilityKeys\":[],\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":3},{\"kind\":7},{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"GET\"},{\"kind\":10,\"literal\":\"POST\"},{\"kind\":10,\"literal\":\"PUT\"},{\"kind\":10,\"literal\":\"PATCH\"},{\"kind\":10,\"literal\":\"DELETE\"},{\"kind\":10,\"literal\":\"OPTIONS\"},{\"kind\":10,\"literal\":\"HEAD\"}],\"typeName\":\"KnownHttpMethod\"},{\"kind\":13,\"types\":[{\"kind\":6},{\"kind\":18,\"types\":[]}]}],\"typeName\":\"HttpMethod\"},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"$tsfNode\":3}],\"index\":{\"$tsfNode\":3},\"types\":[],\"typeName\":\"HttpHeaderInput\"},{\"kind\":2,\"typeName\":\"(error?: Error | null, data?: Buffer) =\\u003e void\"},{\"kind\":2,\"typeName\":\"(chunk: Buffer) =\\u003e void\"}],[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]},{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":{\"$tsfNode\":4}},{\"kind\":12,\"types\":{\"$tsfNode\":5}},[{\"$tsfNode\":6},{\"$tsfNode\":7},{\"$tsfNode\":8},{\"$tsfNode\":9},{\"$tsfNode\":10},{\"$tsfNode\":11}],[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}},{\"kind\":7},{\"kind\":8},{\"kind\":4}],{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]]", []);
12
12
  exports.defaultHttpRequestBodyLimits = {
13
13
  maxBodyBytes: 100 * 1024 * 1024,
14
14
  maxCompressedBodyBytes: 25 * 1024 * 1024,
@@ -1732,7 +1732,7 @@ class MeshSrpcServer extends SrpcServer_1.SrpcServer {
1732
1732
  }
1733
1733
  return this.options.httpServer;
1734
1734
  }
1735
- static __tsfType = _MeshSrpcServerMetadata_1 = _a.decodeCompactMetadataV2("[2,{\"kind\":16,\"name\":\"MeshSrpcServer\",\"typeName\":\"MeshSrpcServer\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[{\"name\":\"beforeClientAdmission\",\"parameters\":[],\"returnType\":{\"$tsfType\":0},\"description\":\"A mesh client is never admitted until this process can reserve its ownership in the shared registry. This centralizes the readiness gate rather than requiring each application authorizer to remember it.\"},{\"name\":\"postEstablishCheck\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":1},\"description\":\"Defers stream activation until mesh reservation succeeds. Installs meta proxy and reserves the client atomically in Redis using the protocol-version supersession rules, all serialized in the per-client registry chain. Protocol v1 retains its implicit replacement behavior; protocol v2+ requires the explicit supersede flag. Reserved clients remain hidden from lookup/invoke until onStreamActivated promotes them to active.\"},{\"name\":\"onStreamConnected\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamWillActivate\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamActivated\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamDisconnected\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"cause\",\"type\":{\"$tsfType\":2},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"ready\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"getRegisteredClient\",\"parameters\":[{\"$tsfNode\":2}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":3},{\"kind\":4}]}},\"description\":\"Read a generation-fenced registry record without materializing a remote connection, link capability, or byte-stream sender pool. Use this for connection-state and metadata decisions; resolveClient() is for an imminent invoke, byte stream, metadata mutation, or disconnect.\"},{\"name\":\"listRegisteredClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"$tsfNode\":3}}},\"description\":\"Registry-only counterpart to listClients(); it never creates remote handles.\"},{\"name\":\"updateClientMetadata\",\"parameters\":[{\"$tsfNode\":4},{\"name\":\"metadata\",\"type\":{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"$tsfNode\":5}],\"utilityKeys\":[],\"types\":[]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1},\"description\":\"Update metadata for a client, regardless of which node owns it. Routes through the mesh to the owning node so that stream.meta reflects the change immediately and the proxy auto-syncs to Redis. For local streams, you can also mutate stream.meta directly.\"},{\"name\":\"onClientConnected\",\"parameters\":{\"$tsfNode\":6},\"returnType\":{\"$tsfType\":3}},{\"name\":\"onClientDisconnected\",\"parameters\":{\"$tsfNode\":6},\"returnType\":{\"$tsfType\":3}},{\"name\":\"onNodeClientsOrphaned\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":6},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"registerBroadcastHandler\",\"parameters\":[{\"$tsfNode\":7},{\"name\":\"handler\",\"type\":{\"$tsfType\":8},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"broadcast\",\"parameters\":[{\"$tsfNode\":7},{\"name\":\"data\",\"type\":{\"$tsfType\":9},\"optional\":false,\"default\":false},{\"name\":\"options\",\"type\":{\"$tsfType\":10},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":0}},{\"name\":\"resolveClient\",\"parameters\":[{\"$tsfNode\":2},{\"name\":\"deadlineAt\",\"type\":{\"$tsfType\":11},\"optional\":true,\"default\":false}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":8},{\"kind\":4}]}}},{\"name\":\"listClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"$tsfNode\":8}}}},{\"name\":\"disconnectClient\",\"parameters\":[{\"$tsfNode\":4},{\"name\":\"reason\",\"type\":{\"$tsfType\":4},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"invoke\",\"parameters\":[{\"name\":\"connectionOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":8},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":12},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":13},\"optional\":false,\"default\":false},{\"$tsfNode\":9}],\"returnType\":{\"$tsfType\":14},\"description\":\"Invoke a client method across any node in the mesh. Overloaded: when called with a stream, delegates to SrpcServer.invoke. When called with a clientId string, routes through the mesh.\"},{\"name\":\"invoke\",\"parameters\":[{\"$tsfNode\":4},{\"$tsfNode\":10},{\"$tsfNode\":11},{\"$tsfNode\":9}],\"returnType\":{\"$tsfType\":16}},{\"name\":\"invoke\",\"parameters\":[{\"$tsfNode\":4},{\"$tsfNode\":10},{\"$tsfNode\":11},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":15},\"optional\":true,\"default\":true}],\"returnType\":{\"$tsfType\":16}},{\"name\":\"meshStart\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"meshStop\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"close\",\"parameters\":[],\"returnType\":{\"$tsfType\":3}},{\"name\":\"handleByteSubstreamOperation\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"operation\",\"type\":{\"$tsfType\":17},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":4},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"hasExternalByteStreamSender\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"streamId\",\"type\":{\"$tsfType\":11},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":18}}],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"options\",\"type\":{\"kind\":13,\"types\":[{\"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\":[{\"$tsfNode\":12},{\"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\":[1,\"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},{\"$tsfNode\":13},{\"$tsfNode\":14},{\"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},{\"$tsfNode\":15},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":16},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":18,\"typeName\":\"MeshSrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"meshKey\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"meshOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshServiceOptions\",\"types\":[{\"kind\":20,\"name\":\"heartbeatIntervalMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"nodeTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"leaderOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"LeaderServiceOptions\",\"types\":[{\"kind\":20,\"name\":\"ttlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"renewalIntervalMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"retryDelayMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"redisConfigPrefix\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"nodeMetadata\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"Omit\",\"utilityType\":\"Omit\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"MeshNode\",\"types\":[{\"kind\":20,\"name\":\"instanceId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"hostname\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"self\",\"type\":{\"kind\":8},\"optional\":false},{\"$tsfNode\":17},{\"$tsfNode\":18},{\"$tsfNode\":19},{\"$tsfNode\":20},{\"$tsfNode\":21}]}],\"utilityKeys\":[\"instanceId\",\"hostname\",\"self\"],\"types\":[{\"$tsfNode\":17},{\"$tsfNode\":18},{\"$tsfNode\":19},{\"$tsfNode\":20},{\"$tsfNode\":21}]},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":14},{\"kind\":20,\"name\":\"maxActiveHandlers\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveHandlerBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":22}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"autoLifecycle\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"registryBackend\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshClientRegistryBackend\",\"types\":[]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"registryOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshClientRedisRegistryOptions\",\"types\":[{\"$tsfNode\":15},{\"kind\":20,\"name\":\"maxMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientsPerNode\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"scanBatchSize\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":22},{\"$tsfNode\":16},{\"kind\":20,\"name\":\"maxAuthNoncesPerPrincipal\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxOrphanItems\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxOrphanBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"extractRegistryMetadata\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(stream: SrpcStream\\u003cTMeta\\u003e) =\\u003e TRegistryMeta\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"meshLink\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"advertiseUrl\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"path\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"secret\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"$tsfAlias\":[1,\"node:http\",\"Server\",\"Server\"]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"requestTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"idleTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFrameBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":13},{\"kind\":20,\"name\":\"maxEndpointPins\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]}]},\"optional\":false,\"default\":false}]},[[{\"$tsfNode\":1}],{\"name\":\"stream\",\"type\":{\"$tsfNode\":23},\"optional\":false,\"default\":false},{\"name\":\"clientId\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false},{\"kind\":18,\"typeName\":\"RegisteredClient\",\"types\":{\"$tsfNode\":24}},{\"name\":\"connectionOrClientId\",\"type\":{\"$tsfNode\":25},\"optional\":false,\"default\":false},{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":2}},[{\"$tsfNode\":26}],{\"name\":\"type\",\"type\":{\"$tsfType\":7},\"optional\":false,\"default\":false},{\"kind\":2,\"typeName\":\"MeshSrpcConnection\",\"typeArguments\":{\"$tsfNode\":27}},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":11},\"optional\":true,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false},{\"kind\":12,\"types\":{\"$tsfNode\":28}},{\"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\":\"maxClientIdBytes\",\"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\":\"processId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkEndpointId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkEndpointPublicKey\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkUrl\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"startedAt\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"cleanupBatchSize\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":{\"$tsfNode\":29}},[{\"$tsfNode\":30},{\"$tsfNode\":31},{\"$tsfNode\":32},{\"$tsfNode\":17},{\"$tsfNode\":33},{\"$tsfNode\":34}],{\"kind\":12,\"types\":{\"$tsfNode\":35}},{\"name\":\"handler\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},[{\"$tsfNode\":5},{\"$tsfNode\":36}],[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3}],[{\"$tsfNode\":37},{\"$tsfNode\":38},{\"$tsfNode\":39},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"$tsfNode\":40},{\"$tsfNode\":41},{\"$tsfNode\":30},{\"$tsfNode\":42},{\"$tsfNode\":43},{\"$tsfNode\":44},{\"$tsfNode\":45},{\"$tsfNode\":46},{\"$tsfNode\":47},{\"$tsfNode\":33},{\"$tsfNode\":48},{\"$tsfNode\":49},{\"$tsfNode\":50}],{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"nodeId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connectionId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"metadata\",\"type\":{\"$tsfNode\":36},\"optional\":false},[{\"$tsfNode\":51},{\"kind\":6}],{\"kind\":16,\"typeName\":\"TRegistryMeta\",\"classType\":{\"$tsf\":3}},{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"$tsfNode\":52},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"$tsfNode\":53},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"$tsfNode\":54},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"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\":{\"$tsfNode\":12},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"$tsfNode\":55},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"$tsfNode\":5},\"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\":18,\"typeName\":\"SrpcConnection\",\"types\":{\"$tsfNode\":56}},{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":{\"$tsfNode\":57}},{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":5},\"typeArguments\":{\"$tsfNode\":58}},{\"kind\":12,\"types\":{\"$tsfNode\":59}},[{\"$tsfNode\":37},{\"$tsfNode\":60},{\"$tsfNode\":61},{\"$tsfNode\":62},{\"$tsfNode\":63},{\"$tsfNode\":64}],[{\"$tsfNode\":65},{\"$tsfNode\":66}],[{\"kind\":6},{\"$tsfNode\":67}],[{\"$tsfNode\":68},{\"kind\":4}],{\"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\":{\"$tsfNode\":69},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"$tsfNode\":70},\"optional\":true},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":{\"$tsfNode\":71}},{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":6},\"typeArguments\":[{\"kind\":6}]},{\"kind\":12,\"types\":{\"$tsfNode\":27}},{\"kind\":12,\"types\":{\"$tsfNode\":72}},[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"$tsfNode\":73},{\"$tsfNode\":74}],[{\"$tsfNode\":75},{\"kind\":4}],{\"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},{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]}]]", [() => MeshSrpcServer, require, () => (typeof TMeta !== "undefined" ? TMeta : (typeof exports !== "undefined" ? exports.TMeta : undefined)), () => (typeof TRegistryMeta !== "undefined" ? TRegistryMeta : (typeof exports !== "undefined" ? exports.TRegistryMeta : undefined)), () => (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))], __tsf_metadata_type);
1735
+ static __tsfType = _MeshSrpcServerMetadata_1 = _a.decodeCompactMetadataV2("[2,{\"kind\":16,\"name\":\"MeshSrpcServer\",\"typeName\":\"MeshSrpcServer\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[{\"name\":\"beforeClientAdmission\",\"parameters\":[],\"returnType\":{\"$tsfType\":0},\"description\":\"A mesh client is never admitted until this process can reserve its ownership in the shared registry. This centralizes the readiness gate rather than requiring each application authorizer to remember it.\"},{\"name\":\"postEstablishCheck\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":1},\"description\":\"Defers stream activation until mesh reservation succeeds. Installs meta proxy and reserves the client atomically in Redis using the protocol-version supersession rules, all serialized in the per-client registry chain. Protocol v1 retains its implicit replacement behavior; protocol v2+ requires the explicit supersede flag. Reserved clients remain hidden from lookup/invoke until onStreamActivated promotes them to active.\"},{\"name\":\"onStreamConnected\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamWillActivate\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamActivated\",\"parameters\":{\"$tsfNode\":0},\"returnType\":{\"$tsfType\":0}},{\"name\":\"onStreamDisconnected\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"cause\",\"type\":{\"$tsfType\":2},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"ready\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"getRegisteredClient\",\"parameters\":[{\"$tsfNode\":2}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":3},{\"kind\":4}]}},\"description\":\"Read a generation-fenced registry record without materializing a remote connection, link capability, or byte-stream sender pool. Use this for connection-state and metadata decisions; resolveClient() is for an imminent invoke, byte stream, metadata mutation, or disconnect.\"},{\"name\":\"listRegisteredClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"$tsfNode\":3}}},\"description\":\"Registry-only counterpart to listClients(); it never creates remote handles.\"},{\"name\":\"updateClientMetadata\",\"parameters\":[{\"$tsfNode\":4},{\"name\":\"metadata\",\"type\":{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"$tsfNode\":5}],\"utilityKeys\":[],\"types\":[]},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":1},\"description\":\"Update metadata for a client, regardless of which node owns it. Routes through the mesh to the owning node so that stream.meta reflects the change immediately and the proxy auto-syncs to Redis. For local streams, you can also mutate stream.meta directly.\"},{\"name\":\"onClientConnected\",\"parameters\":{\"$tsfNode\":6},\"returnType\":{\"$tsfType\":3}},{\"name\":\"onClientDisconnected\",\"parameters\":{\"$tsfNode\":6},\"returnType\":{\"$tsfType\":3}},{\"name\":\"onNodeClientsOrphaned\",\"parameters\":[{\"name\":\"handler\",\"type\":{\"$tsfType\":6},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"registerBroadcastHandler\",\"parameters\":[{\"$tsfNode\":7},{\"name\":\"handler\",\"type\":{\"$tsfType\":8},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"broadcast\",\"parameters\":[{\"$tsfNode\":7},{\"name\":\"data\",\"type\":{\"$tsfType\":9},\"optional\":false,\"default\":false},{\"name\":\"options\",\"type\":{\"$tsfType\":10},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":0}},{\"name\":\"resolveClient\",\"parameters\":[{\"$tsfNode\":2},{\"name\":\"deadlineAt\",\"type\":{\"$tsfType\":11},\"optional\":true,\"default\":false}],\"returnType\":{\"kind\":22,\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":8},{\"kind\":4}]}}},{\"name\":\"listClients\",\"parameters\":[],\"returnType\":{\"kind\":22,\"type\":{\"kind\":14,\"type\":{\"$tsfNode\":8}}}},{\"name\":\"disconnectClient\",\"parameters\":[{\"$tsfNode\":4},{\"name\":\"reason\",\"type\":{\"$tsfType\":4},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":1}},{\"name\":\"invoke\",\"parameters\":[{\"name\":\"connectionOrClientId\",\"type\":{\"kind\":12,\"types\":[{\"$tsfNode\":8},{\"kind\":6}]},\"optional\":false,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":12},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":13},\"optional\":false,\"default\":false},{\"$tsfNode\":9}],\"returnType\":{\"$tsfType\":14},\"description\":\"Invoke a client method across any node in the mesh. Overloaded: when called with a stream, delegates to SrpcServer.invoke. When called with a clientId string, routes through the mesh.\"},{\"name\":\"invoke\",\"parameters\":[{\"$tsfNode\":4},{\"$tsfNode\":10},{\"$tsfNode\":11},{\"$tsfNode\":9}],\"returnType\":{\"$tsfType\":16}},{\"name\":\"invoke\",\"parameters\":[{\"$tsfNode\":4},{\"$tsfNode\":10},{\"$tsfNode\":11},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":15},\"optional\":true,\"default\":true}],\"returnType\":{\"$tsfType\":16}},{\"name\":\"meshStart\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"meshStop\",\"parameters\":[],\"returnType\":{\"$tsfType\":0}},{\"name\":\"close\",\"parameters\":[],\"returnType\":{\"$tsfType\":3}},{\"name\":\"handleByteSubstreamOperation\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"operation\",\"type\":{\"$tsfType\":17},\"optional\":false,\"default\":false},{\"name\":\"requestId\",\"type\":{\"$tsfType\":4},\"optional\":true,\"default\":false}],\"returnType\":{\"$tsfType\":3}},{\"name\":\"hasExternalByteStreamSender\",\"parameters\":[{\"$tsfNode\":1},{\"name\":\"streamId\",\"type\":{\"$tsfType\":11},\"optional\":false,\"default\":false}],\"returnType\":{\"$tsfType\":18}}],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"options\",\"type\":{\"kind\":13,\"types\":[{\"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\":10,\"literal\":3}]},{\"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},{\"kind\":20,\"name\":\"pingPong\",\"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\":[1,\"node:http\",\"Server\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"disconnectOnRequestTimeout\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"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},{\"$tsfNode\":12},{\"$tsfNode\":13},{\"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},{\"$tsfNode\":14},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":15},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":18,\"typeName\":\"MeshSrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"meshKey\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"meshOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshServiceOptions\",\"types\":[{\"kind\":20,\"name\":\"heartbeatIntervalMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"nodeTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"leaderOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"LeaderServiceOptions\",\"types\":[{\"kind\":20,\"name\":\"ttlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"renewalIntervalMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"retryDelayMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"redisConfigPrefix\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"nodeMetadata\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"Omit\",\"utilityType\":\"Omit\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"MeshNode\",\"types\":[{\"kind\":20,\"name\":\"instanceId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"hostname\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"self\",\"type\":{\"kind\":8},\"optional\":false},{\"$tsfNode\":16},{\"$tsfNode\":17},{\"$tsfNode\":18},{\"$tsfNode\":19},{\"$tsfNode\":20}]}],\"utilityKeys\":[\"instanceId\",\"hostname\",\"self\"],\"types\":[{\"$tsfNode\":16},{\"$tsfNode\":17},{\"$tsfNode\":18},{\"$tsfNode\":19},{\"$tsfNode\":20}]},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":13},{\"kind\":20,\"name\":\"maxActiveHandlers\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveHandlerBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":21}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"autoLifecycle\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"registryBackend\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshClientRegistryBackend\",\"types\":[]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"registryOptions\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"typeName\":\"MeshClientRedisRegistryOptions\",\"types\":[{\"$tsfNode\":14},{\"kind\":20,\"name\":\"maxMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientsPerNode\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"scanBatchSize\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":21},{\"$tsfNode\":15},{\"kind\":20,\"name\":\"maxAuthNoncesPerPrincipal\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxOrphanItems\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxOrphanBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"extractRegistryMetadata\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(stream: SrpcStream\\u003cTMeta\\u003e) =\\u003e TRegistryMeta\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"meshLink\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"advertiseUrl\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"path\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"secret\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"$tsfAlias\":[1,\"node:http\",\"Server\",\"Server\"]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"requestTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"idleTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFrameBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"$tsfNode\":12},{\"kind\":20,\"name\":\"maxEndpointPins\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]}]},\"optional\":false,\"default\":false}]},[[{\"$tsfNode\":1}],{\"name\":\"stream\",\"type\":{\"$tsfNode\":22},\"optional\":false,\"default\":false},{\"name\":\"clientId\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false},{\"kind\":18,\"typeName\":\"RegisteredClient\",\"types\":{\"$tsfNode\":23}},{\"name\":\"connectionOrClientId\",\"type\":{\"$tsfNode\":24},\"optional\":false,\"default\":false},{\"kind\":16,\"typeName\":\"TMeta\",\"classType\":{\"$tsf\":2}},[{\"$tsfNode\":25}],{\"name\":\"type\",\"type\":{\"$tsfType\":7},\"optional\":false,\"default\":false},{\"kind\":2,\"typeName\":\"MeshSrpcConnection\",\"typeArguments\":{\"$tsfNode\":26}},{\"name\":\"timeoutMs\",\"type\":{\"$tsfType\":11},\"optional\":true,\"default\":false},{\"name\":\"prefix\",\"type\":{\"$tsfType\":4},\"optional\":false,\"default\":false},{\"name\":\"data\",\"type\":{\"$tsfType\":15},\"optional\":false,\"default\":false},{\"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\":\"maxClientIdBytes\",\"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\":\"processId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkEndpointId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkEndpointPublicKey\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"linkUrl\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"startedAt\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"cleanupBatchSize\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":{\"$tsfNode\":27}},[{\"$tsfNode\":28},{\"$tsfNode\":29},{\"$tsfNode\":30},{\"$tsfNode\":16},{\"$tsfNode\":31},{\"$tsfNode\":32}],{\"kind\":12,\"types\":{\"$tsfNode\":33}},{\"name\":\"handler\",\"type\":{\"$tsfType\":5},\"optional\":false,\"default\":false},[{\"$tsfNode\":5},{\"$tsfNode\":34}],[{\"$tsfNode\":35},{\"$tsfNode\":36},{\"$tsfNode\":37},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"$tsfNode\":38},{\"$tsfNode\":39},{\"$tsfNode\":28},{\"$tsfNode\":40},{\"$tsfNode\":41},{\"$tsfNode\":42},{\"$tsfNode\":43},{\"$tsfNode\":44},{\"$tsfNode\":45},{\"$tsfNode\":31},{\"$tsfNode\":46},{\"$tsfNode\":47},{\"$tsfNode\":48}],{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"nodeId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connectionId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"metadata\",\"type\":{\"$tsfNode\":34},\"optional\":false},[{\"$tsfNode\":49},{\"kind\":6}],{\"kind\":16,\"typeName\":\"TRegistryMeta\",\"classType\":{\"$tsf\":3}},{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"$tsfNode\":50},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"$tsfNode\":51},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"$tsfNode\":52},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"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\":{\"$tsfNode\":53},\"optional\":false},{\"kind\":20,\"name\":\"capabilities\",\"type\":{\"$tsfNode\":54},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"$tsfNode\":5},\"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\":18,\"typeName\":\"SrpcConnection\",\"types\":{\"$tsfNode\":55}},{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":{\"$tsfNode\":56}},{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":4}},{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":5},\"typeArguments\":{\"$tsfNode\":57}},{\"kind\":12,\"types\":{\"$tsfNode\":58}},{\"kind\":12,\"types\":{\"$tsfNode\":59}},[{\"$tsfNode\":35},{\"$tsfNode\":60},{\"$tsfNode\":61},{\"$tsfNode\":62},{\"$tsfNode\":63},{\"$tsfNode\":64}],[{\"$tsfNode\":65},{\"$tsfNode\":66}],[{\"kind\":6},{\"$tsfNode\":67}],[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2},{\"kind\":10,\"literal\":3},{\"kind\":10,\"literal\":4}],[{\"$tsfNode\":68},{\"kind\":4}],{\"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\":{\"$tsfNode\":69},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"$tsfNode\":70},\"optional\":true},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":{\"$tsfNode\":71}},{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":6},\"typeArguments\":[{\"kind\":6}]},{\"kind\":12,\"types\":{\"$tsfNode\":26}},{\"kind\":12,\"types\":{\"$tsfNode\":72}},[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"$tsfNode\":73},{\"$tsfNode\":74},{\"$tsfNode\":75}],[{\"$tsfNode\":76},{\"kind\":4}],{\"kind\":20,\"name\":\"acknowledge\",\"type\":{\"$tsfNode\":77},\"optional\":true},{\"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},{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"() =\\u003e void\"},{\"kind\":4}]}]]", [() => MeshSrpcServer, require, () => (typeof TMeta !== "undefined" ? TMeta : (typeof exports !== "undefined" ? exports.TMeta : undefined)), () => (typeof TRegistryMeta !== "undefined" ? TRegistryMeta : (typeof exports !== "undefined" ? exports.TRegistryMeta : undefined)), () => (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))], __tsf_metadata_type);
1736
1736
  }
1737
1737
  exports.MeshSrpcServer = MeshSrpcServer;
1738
1738
  _MeshSrpcServerMetadata_1.classType = MeshSrpcServer;
@@ -4,6 +4,8 @@ export declare class SrpcConflictError extends Error {
4
4
  constructor();
5
5
  }
6
6
  export interface SrpcClientOptions {
7
+ /** Defaults to v3 for existing codecs/servers. v4 requires requestAck in both envelope codecs. */
8
+ protocolVersion?: 3 | 4;
7
9
  enableReconnect?: boolean;
8
10
  logTraffic?: SrpcTrafficLogging;
9
11
  /** Audience signed into canonical credentials. Defaults to the WebSocket path. */
@@ -1 +1 @@
1
- {"version":3,"file":"SrpcClient.d.ts","sourceRoot":"","sources":["../../../src/srpc/SrpcClient.ts"],"names":[],"mappings":"AAQA,OAAO,EAA2B,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAExF,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,cAAc,EAEd,WAAW,EACX,gBAAgB,EAEhB,oBAAoB,EACpB,WAAW,EAEX,YAAY,EACZ,mBAAmB,EAInB,cAAc,EACd,QAAQ,EAER,kBAAkB,EAMrB,MAAM,SAAS,CAAC;AAEjB,qBAAa,iBAAkB,SAAQ,KAAK;IACxC,cAGC;CACJ;AAED,MAAM,WAAW,iBAAiB;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mHAAmH;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kBAAkB,GAE7B;IACD,OAAO,KAAK,sBAAsB,GAEjC;IACD,OAAO,KAAK,yBAAyB,GAEpC;IACD,OAAO,KAAK,6BAA6B,GAExC;IACD,OAAO,KAAK,gBAAgB,GAE3B;IACD,OAAO,KAAK,eAAe,GAE1B;IACD,OAAO,KAAK,gBAAgB,GAM3B;IACD,OAAO,KAAK,gBAAgB,GAG3B;CACJ"}
@@ -13,7 +13,7 @@ const telemetry_1 = require("../telemetry");
13
13
  const SrpcByteStream_1 = require("./SrpcByteStream");
14
14
  const handshake_1 = require("./handshake");
15
15
  const types_1 = require("./types");
16
- const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":8},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]},{\"kind\":22,\"type\":{\"kind\":3}},{\"kind\":3},{\"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}]},{\"kind\":2,\"typeName\":\"() =\\u003e void\"},{\"kind\":2,\"typeName\":\"P\"},{\"kind\":2,\"typeName\":\"(data: HandlerRequestData\\u003cTServerOutput, P\\u003e) =\\u003e Promise\\u003cResponseData\\u003cTClientInput, P\\u003e\\u003e | ResponseData\\u003cTClientInput, P\\u003e\"},{\"kind\":2,\"typeName\":\"(data: NotificationData\\u003cTServerOutput, P\\u003e) =\\u003e void | Promise\\u003cvoid\\u003e\"},{\"kind\":2,\"typeName\":\"(cause: SrpcDisconnectCause) =\\u003e void\"},{\"kind\":0},{\"kind\":2},{\"kind\":18,\"typeName\":\"ResponseData\\u003cTServerOutput, P\\u003e\",\"types\":[{\"kind\":20,\"name\":\"\u00FE@toStringTag@14\",\"type\":{\"kind\":6},\"optional\":false}]},{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},{\"kind\":6},{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},{\"kind\":17,\"typeName\":\"SrpcMeta\"},{\"kind\":18,\"typeName\":\"SrpcClientOptions\",\"types\":[{\"kind\":20,\"name\":\"enableReconnect\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"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\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"tlsServerName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"senderAnnouncements\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequestBytes\",\"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\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]}],[]]", []);
16
+ const __tsf_metadata_type = _a.createCompactMetadataRegistryV2("[2,[{\"kind\":8},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]},{\"kind\":22,\"type\":{\"kind\":3}},{\"kind\":3},{\"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}]},{\"kind\":2,\"typeName\":\"() =\\u003e void\"},{\"kind\":2,\"typeName\":\"P\"},{\"kind\":2,\"typeName\":\"(data: HandlerRequestData\\u003cTServerOutput, P\\u003e) =\\u003e Promise\\u003cResponseData\\u003cTClientInput, P\\u003e\\u003e | ResponseData\\u003cTClientInput, P\\u003e\"},{\"kind\":2,\"typeName\":\"(data: NotificationData\\u003cTServerOutput, P\\u003e) =\\u003e void | Promise\\u003cvoid\\u003e\"},{\"kind\":2,\"typeName\":\"(cause: SrpcDisconnectCause) =\\u003e void\"},{\"kind\":0},{\"kind\":2},{\"kind\":18,\"typeName\":\"ResponseData\\u003cTServerOutput, P\\u003e\",\"types\":[{\"kind\":20,\"name\":\"\u00FE@toStringTag@14\",\"type\":{\"kind\":6},\"optional\":false}]},{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},{\"kind\":6},{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},{\"kind\":17,\"typeName\":\"SrpcMeta\"},{\"kind\":18,\"typeName\":\"SrpcClientOptions\",\"types\":[{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":3},{\"kind\":10,\"literal\":4}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableReconnect\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"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},{\"kind\":20,\"name\":\"pingPong\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"tlsServerName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"senderAnnouncements\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequestBytes\",\"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\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]}],[]]", []);
17
17
  let _SrpcConflictErrorMetadata_1;
18
18
  class SrpcConflictError extends Error {
19
19
  constructor() {
@@ -81,6 +81,10 @@ class SrpcClient {
81
81
  this.clientSecret = clientSecret;
82
82
  this.clientOptions = clientOptions;
83
83
  validateClientResourceOptions(clientOptions);
84
+ if (clientOptions?.protocolVersion === 4 &&
85
+ (!(0, types_1.supportsSrpcRequestAcknowledgments)(clientMessage) || !(0, types_1.supportsSrpcRequestAcknowledgments)(serverMessage))) {
86
+ throw new Error('Protocol v4 requires request acknowledgment codecs');
87
+ }
84
88
  this.enableReconnect = clientOptions?.enableReconnect !== false;
85
89
  this.senderAnnouncements = clientOptions?.senderAnnouncements !== false;
86
90
  }
@@ -332,6 +336,16 @@ class SrpcClient {
332
336
  return;
333
337
  }
334
338
  this.logTraffic('inbound', message);
339
+ if (message.requestAck) {
340
+ if (this.clientOptions?.protocolVersion !== 4 || !(0, types_1.isSrpcRequestAcknowledgment)(message)) {
341
+ this.closeGenerationWithError(ws, generation, 'badArg', 'Invalid request acknowledgment');
342
+ return;
343
+ }
344
+ if (!this.requestQueue.has(message.requestId) && !this.isLateReply(message.requestId)) {
345
+ this.closeGenerationWithError(ws, generation, 'badArg', 'Unknown request ID');
346
+ }
347
+ return;
348
+ }
335
349
  if (message.pingPong) {
336
350
  this.lastPongMs = Date.now();
337
351
  const type = message.pingPong.type ?? types_1.SrpcPingPongType.UNSPECIFIED;
@@ -387,6 +401,10 @@ class SrpcClient {
387
401
  this.closeGenerationWithError(ws, generation, 'badArg', 'Too many in-flight server requests');
388
402
  return;
389
403
  }
404
+ if (!notification && this.clientOptions?.protocolVersion === 4) {
405
+ if (!this.writeMessage({ requestId: message.requestId, requestAck: true }, generation))
406
+ return;
407
+ }
390
408
  pressure.requests++;
391
409
  pressure.bytes += bytes;
392
410
  this.handlerPressureByGeneration.set(generation, pressure);
@@ -540,6 +558,7 @@ class SrpcClient {
540
558
  const metadata = (0, handshake_1.srpcQueryMetadata)(normalizeMetadata(this.clientMeta));
541
559
  const supersede = this.supersede ? '1' : '0';
542
560
  const audience = this.clientOptions?.authAudience ?? url.pathname;
561
+ const protocol = String(this.clientOptions?.protocolVersion ?? 3);
543
562
  const signable = canonicalAuthV2({
544
563
  path: url.pathname,
545
564
  audience,
@@ -548,7 +567,7 @@ class SrpcClient {
548
567
  nonce,
549
568
  id: this.streamId,
550
569
  cid,
551
- protocol: '3',
570
+ protocol,
552
571
  supersede,
553
572
  capabilities,
554
573
  metadata
@@ -560,7 +579,7 @@ class SrpcClient {
560
579
  id: this.streamId,
561
580
  cid,
562
581
  signature,
563
- pv: '3',
582
+ pv: protocol,
564
583
  nonce,
565
584
  aud: audience,
566
585
  ...(capabilities ? { cap: capabilities } : {}),
@@ -658,6 +677,8 @@ class SrpcClient {
658
677
  const options = this.clientOptions?.logTraffic;
659
678
  if (!options)
660
679
  return;
680
+ if (!(typeof options === 'object' && options.pingPong === true) && (0, types_1.isSrpcPingPongOnly)(message))
681
+ return;
661
682
  const bodies = typeof options === 'object' && options.bodies === true;
662
683
  this.logger.info('SRPC traffic', {
663
684
  direction,
@@ -1004,6 +1025,9 @@ function configuredPositiveInteger(value, fallback) {
1004
1025
  function validateClientResourceOptions(options) {
1005
1026
  if (!options)
1006
1027
  return;
1028
+ if (options.protocolVersion !== undefined && options.protocolVersion !== 3 && options.protocolVersion !== 4) {
1029
+ throw new Error('sRPC client protocolVersion must be 3 or 4');
1030
+ }
1007
1031
  for (const [name, value] of [
1008
1032
  ['maxPendingRequests', options.maxPendingRequests],
1009
1033
  ['maxPendingRequestBytes', options.maxPendingRequestBytes],
@@ -1045,5 +1069,5 @@ function compareCodeUnits(a, b) {
1045
1069
  function isPlainObject(value) {
1046
1070
  return typeof value === 'object' && value !== null && !Array.isArray(value);
1047
1071
  }
1048
- exports.__tsfTypeAliases = _a.decodeCompactMetadataV2("[2,{\"SrpcClientOptions\":{\"kind\":18,\"typeName\":\"SrpcClientOptions\",\"types\":[{\"kind\":20,\"name\":\"enableReconnect\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"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\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"tlsServerName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"senderAnnouncements\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequestBytes\",\"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\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]}},[]]", [], __tsf_metadata_type);
1072
+ exports.__tsfTypeAliases = _a.decodeCompactMetadataV2("[2,{\"SrpcClientOptions\":{\"kind\":18,\"typeName\":\"SrpcClientOptions\",\"types\":[{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":3},{\"kind\":10,\"literal\":4}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableReconnect\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"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},{\"kind\":20,\"name\":\"pingPong\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true}]}],\"typeName\":\"SrpcTrafficLogging\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"tlsServerName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"senderAnnouncements\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightServerRequestBytes\",\"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\":\"connectTimeoutMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]}},[]]", [], __tsf_metadata_type);
1049
1073
  //# sourceMappingURL=SrpcClient.js.map