protocol/network
packages/protocol/src/network
Purpose
Public barrel for connect protocol descriptors.Public surface
agentCallableNetworkRpcMethods
Variable
agentConnect
Variable
- Principal: none — the unauthenticated handshake. No principal exists
pre-auth, so
requiresis empty and no gate runs before it. - Params:
agentKey,minProtocol,maxProtocol. - Result: an empty HelloOk; success is the signal (the client holds its own id).
checkProtocolRange
Function
compareProtocolVersion
Function
HelloOk
TypeAlias
httpBaseUrl
Function
InvalidProtocolVersionError
Class
networkNotifications
Variable
networkRpcMethods
Variable
PROTOCOL_VERSION
Variable
ProtocolMismatchError
Class
[minProtocol, maxProtocol]
range does not bracket the server’s PROTOCOL_VERSION. The server’s connect
handlers raise it BEFORE auth resolution
so old clients are rejected at the version gate. data carries the
diagnostic { reason, serverVersion, clientMinProtocol, clientMaxProtocol },
concretely typed so error.data.reason narrows at every reader.
ProtocolMismatchReason
TypeAlias
ProtocolMismatchError.data.reason:
server-above-client-max — the server is newer than the client’s
maxProtocol; the client must update. server-below-client-min — the
client is newer than the server supports.
serverBaseUrl
Variable
Schema.decodeEither(ServerBaseUrl) wherever the value comes from
configuration or another package.
ServerBaseUrl
TypeAlias
http, https, ws, or wss.
serverBaseUrlSchema
Variable
serverUrlTypeCanaries
Variable
webSocketUrl
Function
Files
connect.tsindex.tsserver-url.tsserver-url.types-check.ts