You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All additive and backward-compatible; defaults unchanged (silent
observability, unbounded backpressure, ackBatch off, poolSize 1).
- Observability: injectable Logger + onTelemetry sink (zero hard deps);
Connection extends EventEmitter emitting connect/disconnect/
reconnect_scheduled; per-command latency, timeout, auth and
backpressure telemetry. Consumer sink/logger errors are isolated
(Telemetry.safely) so they can never break the transport hot path.
- Backpressure: optional maxInFlight bounds in-flight commands with a
waiter queue (released on settle, cleared on teardown).
- ACK batching: opt-in Worker ackBatch coalesces ACKs into ACKB
round-trips; a job stays active (lock renewed) until its batch is
confirmed; slots are freed BEFORE event emits and the batcher settles
each item exactly once even when a callback throws (adversarially
verified error-path tests included).
- ConnectionPool: round-robin producer-side pool (Queue poolSize);
workers intentionally stay single-connection.
- Typed responses: generic call<R> over exported response shapes;
removed internal `as Record<string, unknown>` casts.
- CI: .github/workflows/sdk.yml runs both SDK suites (TS on bun+node,
Python 3.10/3.12) against a real server on every sdk/src change;
sdk-release.yml publishes with npm provenance, gated on the e2e suite.
e2e 100/100 on bun AND node; biome clean; build clean. Skeptic PASS.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: sdk/typescript/README.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,6 +272,49 @@ const queue = new Queue('emails', {
272
272
273
273
Authentication uses server side tokens (`AUTH_TOKENS`). Transport security uses native TLS, with support for system certificate authorities, a custom CA bundle, or disabled verification for development environments.
274
274
275
+
## Observability
276
+
277
+
Inject a logger and a telemetry sink to bridge the client into your stack. There are no hard dependencies — you wire OpenTelemetry, Prometheus or your own logger. Defaults are silent.
Always attach a `worker.on('error', …)` listener: per Node `EventEmitter` semantics an unhandled `error` event throws. The worker frees each job's concurrency slot before emitting, so even a throwing listener cannot degrade throughput — but the error itself is yours to observe.
311
+
312
+
Half-open links are detected via TCP keepalive and a consecutive-timeout teardown, so a silently dropped connection (cloud LB/NAT idle drop) recovers in seconds rather than minutes.
313
+
314
+
## Typed responses
315
+
316
+
`connection.call<R>()` and `queue.call<R>()` are generic over the exported response shapes (`JobResponse`, `PulledJobsResponse`, `JobCountsResponse`, `WaitJobResponse`, …), so raw command access is fully typed without casting.
0 commit comments