@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.
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/srpc/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,sEAAsE;AACtE,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,qEAAe,CAAA;IACf,yDAAS,CAAA;IACT,iEAAa,CAAA;IACb,iEAAa,CAAA;IACb,uDAAQ,CAAA;IACR,uDAAQ,CAAA;AACZ,CAAC,EAPW,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAO3B;AAsBD,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAE5C,gFAAgF;AAChF,0BAAiC,KAA2B;IACxD,OAAO,CACH,KAAK,IAAI,IAAI;QACb,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QACtC,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QAC/B,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;QAChC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QACpC,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;QAClC,KAAK,CAAC,UAAU,IAAI,CAAC;QACrB,KAAK,CAAC,UAAU,IAAI,IAAI,CAC3B,CAAC;AACN,CAAC;;AAeD,eAAuB,SAAQ,KAAK;IAGrB,WAAW;IAFtB,YACI,OAAe,EACR,WAAqB;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;2BAFR,WAAW;QAGlB,IAAI,CAAC,IAAI,GAAG,WA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AC,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC"}
@@ -338,6 +338,15 @@ new MeshSrpcServer(options: ISrpcServerOptions & MeshSrpcServerOptions)
338
338
 
339
339
  `MeshSrpcServerOptions`:
340
340
 
341
+ The inherited `ISrpcServerOptions.disconnectOnRequestTimeout` policy defaults
342
+ to `true` for protocol-v4 streams; v1–v3 are unaffected. The physical client
343
+ owner revokes an unacknowledged request at its existing deadline, with normal
344
+ registry cleanup. An acknowledged handler may time out without losing its
345
+ session. Local, forwarded typed, and service calls share this policy, which
346
+ survives requester shutdown. A routing or peer-link timeout alone does not
347
+ revoke the endpoint. See [Errors And Timeouts](./srpc#errors-and-timeouts) for
348
+ receipt and delivery semantics.
349
+
341
350
  | Option | Type | Description |
342
351
  | ------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
343
352
  | `meshKey` | `string` | Mesh key |
@@ -165,13 +165,14 @@ server.registerDisconnectHandler((stream, cause) => {
165
165
 
166
166
  Server options:
167
167
 
168
- | Option | Description |
169
- | --------------- | ---------------------------------------------------------- |
170
- | `logger` | Logger with `info`, `warn`, `error`, and `debug` methods. |
171
- | `clientMessage` | Generated codec for client-to-server envelope messages. |
172
- | `serverMessage` | Generated codec for server-to-client envelope messages. |
173
- | `wsPath` | WebSocket path. |
174
- | `httpServer` | Optional Node HTTP server for direct upgrade registration. |
168
+ | Option | Description |
169
+ | --------------- | ------------------------------------------------------------------------------------------------ |
170
+ | `logger` | Logger with `info`, `warn`, `error`, and `debug` methods. |
171
+ | `clientMessage` | Generated codec for client-to-server envelope messages. |
172
+ | `serverMessage` | Generated codec for server-to-client envelope messages. |
173
+ | `wsPath` | WebSocket path. |
174
+ | `httpServer` | Optional Node HTTP server for direct upgrade registration. |
175
+ | `logTraffic` | Optional [traffic logging](#traffic-logging); heartbeats are excluded unless explicitly enabled. |
175
176
 
176
177
  Handlers may also be zero-argument classes with a `handle(stream, data)` method. A new class instance is created for each request; SRPC does not resolve handler classes through application DI.
177
178
 
@@ -226,13 +227,14 @@ client.disconnect();
226
227
 
227
228
  Client options:
228
229
 
229
- | Option | Default | Description |
230
- | ----------------- | ------- | ---------------------------------------- |
231
- | `enableReconnect` | `true` | Reconnects after unexpected disconnects. |
230
+ | Option | Default | Description |
231
+ | ----------------- | ------- | --------------------------------------------------------------------------------------- |
232
+ | `enableReconnect` | `true` | Reconnects after unexpected disconnects. |
233
+ | `logTraffic` | `false` | [Traffic logging](#traffic-logging); heartbeats are excluded unless explicitly enabled. |
232
234
 
233
235
  The exported `SrpcClientOptions` type describes this object. `connect({ supersede?: boolean })` controls only that connection attempt and is separate from the constructor options.
234
236
 
235
- Protocol-v2 and protocol-v3 connections reject a duplicate `clientId` unless `connect({ supersede: true })` is used. Legacy protocol-v1 connections retain replacement behavior: a later connection with the same `clientId` silently supersedes the existing stream.
237
+ Protocol-v2, protocol-v3, and protocol-v4 connections reject a duplicate `clientId` unless `connect({ supersede: true })` is used. Legacy protocol-v1 connections retain replacement behavior: a later connection with the same `clientId` silently supersedes the existing stream.
236
238
 
237
239
  The optional `PingPong.type` enum distinguishes handshake messages from client pings and server pongs. Generated TypeScript codecs represent it as a numeric `PingPongType` enum with the prefixed names shown above and an optional `type` property (`undefined` when absent). The library exports matching numeric values as `SrpcPingPongType`.
238
240
 
@@ -255,7 +257,7 @@ This is wire-compatible with empty legacy `PingPong` messages. Old protobuf deco
255
257
 
256
258
  Clients sign connection metadata with HMAC-SHA256. New clients send `pv=3`, `appv`, `ts`, `nonce`, `aud`, `id`, `cid`, `signature`, optional `cap` capabilities and `supersede`, and custom metadata as ordinary WebSocket query parameters. Every query parameter other than those transport fields becomes `stream.meta`. The canonical signature covers the request path, audience, protocol version, capabilities, and normalized metadata.
257
259
 
258
- Servers require an explicit `pv` by default, but accept `_v` when `pv` is absent for compatibility. The protocol version selects the authentication format: v1/v2 use the legacy HMAC format and v3 uses the canonical HMAC format. Legacy `_supersede` and `m--<key>` metadata are accepted; `_supersede` is used only when `supersede` is absent, and `m--<key>` is normalized to `<key>` in `stream.meta` with unprefixed metadata taking precedence. Set `defaultUnspecifiedProtocolVersion` to `1`, `2`, or `3` only while migrating an unmarked client. Protocol v2 continues to use its original signature (`1`, `appv`, `ts`, `id`, `cid`), whose stream ID is consumed once for replay protection and whose capability field is ignored. New clients must use v3. Deploy servers before clients: a v3 client requires a server that recognizes v3. An explicit `pv=1` always selects v1 behavior; use it only while supporting a legacy client that intentionally relies on same-`clientId` replacement.
260
+ Servers require an explicit `pv` by default, but accept `_v` when `pv` is absent for compatibility. The protocol version selects the authentication format: v1/v2 use the legacy HMAC format and v3/v4 use the canonical HMAC format. Legacy `_supersede` and `m--<key>` metadata are accepted; `_supersede` is used only when `supersede` is absent, and `m--<key>` is normalized to `<key>` in `stream.meta` with unprefixed metadata taking precedence. Set `defaultUnspecifiedProtocolVersion` to `1`, `2`, or `3` only while migrating an unmarked client. Protocol v2 continues to use its original signature (`1`, `appv`, `ts`, `id`, `cid`), whose stream ID is consumed once for replay protection and whose capability field is ignored. Clients use v3 by default. Set `SrpcClientOptions.protocolVersion: 4` after both envelope codecs and the server support receipts. The canonical signature binds the advertised version. Deploy servers before clients: v4 requires a server that recognizes v4. An explicit `pv=1` always selects v1 behavior; use it only while supporting a legacy client that intentionally relies on same-`clientId` replacement.
259
261
 
260
262
  By default the server verifies signatures with `SRPC_AUTH_SECRET`. Provide per-client secrets with:
261
263
 
@@ -300,7 +302,7 @@ Connected streams expose metadata:
300
302
 
301
303
  The exported `SrpcStream<TMeta>` type describes these server-side streams. It also exposes the underlying WebSocket and request queue through `$ws` and `$queue`; treat those fields as low-level protocol surfaces and prefer `SrpcServer.invoke()`, handlers, and `SrpcByteStream` for application work.
302
304
 
303
- Established-stream disconnect callbacks receive `disconnect`, `supersede`, `timeout`, or `badArg`. A rejected protocol-v2 or protocol-v3 duplicate closes with the `conflict` wire cause and rejects the connecting client with `SrpcConflictError` before activation, so connection and disconnect callbacks do not run for that rejected stream. `supersede` identifies a replaced connection, `timeout` identifies ping inactivity, and `badArg` identifies malformed or out-of-sequence messages. Outstanding invocations reject when their stream disconnects.
305
+ Established-stream disconnect callbacks receive `disconnect`, `supersede`, `timeout`, or `badArg`. A rejected protocol-v2, protocol-v3, or protocol-v4 duplicate closes with the `conflict` wire cause and rejects the connecting client with `SrpcConflictError` before activation, so connection and disconnect callbacks do not run for that rejected stream. `supersede` identifies a replaced connection, `timeout` identifies ping inactivity or an unacknowledged v4 request deadline, and `badArg` identifies malformed or out-of-sequence messages. Outstanding invocations reject when their stream disconnects.
304
306
 
305
307
  ## Byte Streams
306
308
 
@@ -346,7 +348,7 @@ Observers receive connection entries with `{ type, stream, at }`, disconnection
346
348
 
347
349
  ## Traffic Logging
348
350
 
349
- Set `logTraffic: true` on an `SrpcServer` or `SrpcClient` to log every inbound and outbound envelope at info level with its direction and message type. To also log the decoded body, opt in explicitly:
351
+ Set `logTraffic: true` on an `SrpcServer` or `SrpcClient` to log inbound and outbound envelopes at info level with their direction and message type, excluding `pingPong`-only heartbeat envelopes. Heartbeat logging defaults to off, including when body logging is enabled. To also log the decoded body, opt in explicitly:
350
352
 
351
353
  ```ts
352
354
  logTraffic: {
@@ -354,6 +356,17 @@ logTraffic: {
354
356
  }
355
357
  ```
356
358
 
359
+ To include heartbeat envelopes, use `logTraffic: { pingPong: true }`, or combine both options:
360
+
361
+ ```ts
362
+ logTraffic: {
363
+ pingPong: true,
364
+ bodies: true
365
+ }
366
+ ```
367
+
368
+ Only envelopes whose sole payload is `pingPong` are suppressed, including heartbeat pongs with `reply: true`. Envelope metadata such as `requestId` and `trace`, and undefined fields from generated codecs, do not prevent heartbeat suppression. Envelopes containing `pingPong` alongside another payload, `byteStreamOperation`, or a defined `error` or `userError` remain logged so other traffic is visible, including with codecs that allow multiple payload fields. These options affect only traffic logs; heartbeat handling, activation, and observer notifications are unchanged.
369
+
357
370
  Traffic bodies can contain application data, so enable body logging only where that data is appropriate for the configured log sink and retention policy.
358
371
 
359
372
  ## Observability
@@ -386,3 +399,44 @@ and byte-stream frames as well as inbound frames. A definitive WebSocket send
386
399
  throw or callback error also revokes before closing. Normal graceful
387
400
  disconnects retain their ordinary close-event semantics and carry the supplied
388
401
  bounded close reason.
402
+
403
+ Protocol v4 adds receipt acknowledgments: `{ requestId, requestAck: true }`
404
+ contains no reply, error, or application payload. Both peers acknowledge an
405
+ admitted request before dispatching its handler. This confirms receipt by the
406
+ transport; it does not establish authorization, success, or completion. Replies
407
+ and errors continue to use `reply: true`. Notifications receive no acknowledgment.
408
+
409
+ For server-to-client calls, `disconnectOnRequestTimeout` defaults to `true`,
410
+ but applies only to an explicitly negotiated v4 stream. If the RPC deadline
411
+ expires without either a receipt or a final response, the existing timer
412
+ synchronously revokes the exact stream with cause `timeout` and close code
413
+ `4003`, before the close handshake or inactivity timer completes. Normal
414
+ cleanup rejects other pending calls and runs disconnect callbacks once. A
415
+ replacement generation is preserved. Setting the option to `false` disables
416
+ this policy; v1–v3 retain their prior timeout behavior even when it is enabled.
417
+
418
+ A receipt does not resolve a call, extend its deadline, release its queue
419
+ accounting, or request a retry. If an acknowledged handler takes too long,
420
+ `invoke()` still rejects at its ordinary deadline but the session remains
421
+ usable. Late receipts and results for expired calls are ignored for the normal
422
+ bounded tombstone period. A final response before receipt also completes the
423
+ call normally.
424
+
425
+ Both envelope codecs must preserve `requestAck` before a client advertises
426
+ v4. For protobuf, add `bool requestAck` (or `optional bool requestAck`) using an
427
+ unused field number in each message container and regenerate bindings. TSF's
428
+ DevConsole schema and the RMM bridge schema reserve field 9 for this purpose.
429
+ A v4 client or server refuses negotiation when its codecs drop the field.
430
+ `SrpcClient` stays on v3 by default so upgrading TSF alone does not advertise a
431
+ wire version unsupported by an existing server or codec. Versionless clients
432
+ cannot acquire v4 through `defaultUnspecifiedProtocolVersion`.
433
+
434
+ The policy also applies to `MeshSrpcServer`: the physical connection owner
435
+ tracks receipts and enforces its existing local RPC deadline. Local, forwarded
436
+ typed, and service calls share this path. Owner-side expiry continues if the
437
+ requesting node disappears. Routing or peer-link deadlines alone do not revoke
438
+ the client, and mesh registry removal uses the existing ownership-safe cleanup.
439
+
440
+ Delivery remains indeterminate on timeout, with or without a receipt. A
441
+ receipt does not prove an operation ran, and a missing receipt does not prove
442
+ it did not. Commands are not automatically retried.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyno-io/ts-server-foundation",
3
- "version": "26.930.307",
3
+ "version": "26.1003.2105",
4
4
  "description": "TypeScript server foundation with reflected type metadata",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -92,7 +92,7 @@
92
92
  "@ttsc/graph": "^0.30.1",
93
93
  "@types/ws": "^8.18.1",
94
94
  "@zyno-io/config": "^1.14.0",
95
- "@zyno-io/ts-reflection": "26.930.307",
95
+ "@zyno-io/ts-reflection": "26.1003.2105",
96
96
  "bcrypt": "^6.0.0",
97
97
  "bullmq": "^6.3.4",
98
98
  "busboy": "^1.6.0",
@@ -223,6 +223,7 @@ message DevConsoleClientMessage {
223
223
  optional string error = 3;
224
224
  optional bool userError = 4;
225
225
  optional TraceContext trace = 5;
226
+ optional bool requestAck = 9; // Transport v4 receipt; reply remains false.
226
227
 
227
228
  oneof request {
228
229
  // framework
@@ -261,6 +262,7 @@ message DevConsoleServerMessage {
261
262
  optional string error = 3;
262
263
  optional bool userError = 4;
263
264
  optional TraceContext trace = 5;
265
+ optional bool requestAck = 9; // Transport v4 receipt; reply remains false.
264
266
 
265
267
  oneof response {
266
268
  // framework