Releases: Query-farm/vgi-rpc-typescript
v0.9.0 — serveStream / serveConnection
Add a public server-side serve-over-stream seam (the sibling of the client's pipeConnect):
VgiRpcServer.serveConnection(readable, writable, transportKind?)— the transport-agnostic core thatrun()(stdin/stdout) now delegates to.serveStream(protocol, { readable, writable })— convenience wrapper.
Lets a worker be served over any duplex channel that isn't a process/socket — e.g. a Web Worker MessagePort bridge, or an in-memory pipe.
v0.8.0
Raw-TCP socket transport
New serveTcp / tcpConnect and TransportKind.TCP — the network analog of the Unix-socket transport, speaking the same raw Arrow-IPC framing without the HTTP envelope. Loopback-only by default (127.0.0.1); no auth/TLS, so use HTTP for untrusted networks.
- Conformance worker gains
--tcp [HOST:]PORT, emitting aTCP:<host>:<port>discovery line. - Verified at full conformance parity via the Python
vgi-rpc-test --tcpharness.
Full changelog: v0.7.5...v0.8.0
v0.7.5
What's changed
- CF/browser: launcher-free
workerd/worker/browserentry. The barrel is split intoindex.core.ts(runtime-agnostic),index.ts(core + node-only AF_UNIX launcher, for node/bun), andindex.workerd.ts(core only). Theworkerd/worker/browserexport conditions now resolve to the launcher-free entry, sonode:net/node:fs/node:child_processno longer enter Cloudflare Worker / browser bundles.
Node/bun consumers are unaffected — index.ts still re-exports the launcher.
Published to npm as @query-farm/vgi-rpc@0.7.5.
v0.7.4
What's changed
- deps: replace the
@uwdata/flechetteGitHub fork + install-time patch pipeline with the published, self-contained@query-farm/flechette@^2.4.0. The per-batchcustom_metadata, multi-batch ordering, and empty-batch patches are now baked into that package. - Removed
scripts/patch-flechette.mjsandscripts/flechette-patches/; postinstall now only does the apache-arrow dev fixup.
The dependency tree is now fully npm-resolvable — no github: deps for flechette — so Cloudflare Worker / browser consumers bundle flechette straight from the registry.
Published to npm as @query-farm/vgi-rpc@0.7.4.
v0.7.3
What's changed since v0.7.2
- fix(describe): correct
protocol_nameandis_exchangeto match the conformance spec - flechette: normalize foreign Arrow types before building columns
- build: commit
dist/for github-dependency consumption - fix(lint): sort flechette imports to unblock CI
Published to npm as @query-farm/vgi-rpc@0.7.3.
v0.7.2
Fixes the unloadable dist shipped in 0.7.0/0.7.1.
bun-version: latest in the publish workflow resolved to bun 1.3.14, whose bundler mis-emits re-export aliases (export { RpcError2 as RpcError } and similar, with the renamed binding never declared). The result was a syntactically valid but unloadable ESM module — every import from @query-farm/vgi-rpc threw.
- Pin the publish workflow to bun 1.3.5 (builds a correct bundle).
- Add a post-build step that imports
dist/index.jsso a broken bundle fails CI instead of being published.
No source changes.
v0.7.1
Republish with a corrected build.
The published 0.7.0 dist/index.js emitted export { RpcError2 as RpcError } with RpcError2 never defined — an older bun bundler re-export bug that made the entire ESM module fail to load for every import consumer (e.g. import { RpcError } from "@query-farm/vgi-rpc"). Rebuilt with bun 1.3.5, which resolves the alias correctly. No source changes.
v0.7.0
First feature release since v0.6.4 — 51 commits tracking the vgi-rpc-python reference for wire compatibility, plus a full docs refresh.
✨ New features
Transports & serving
- AF_UNIX socket launcher —
serveUnix/launchwith spawn-or-reuse, a deterministic per-command socket path, cross-process locking, a shared state directory, and GC of stale sockets (TransportKind.UNIX).
HTTP
- OAuth & PKCE — browser-login middleware with origin allowlist, token-exchange proxy for SPA clients, RFC 9728 protected-resource metadata, device-code discovery, and
_vgi_authcookie auth. - Sticky sessions —
enableSticky/stickyDefaultTtl/stickyEchoHeaderswithDELETE /__session__teardown. - Compression — accepts
zstdandgziprequest bodies; response compression viacompressionLevel;maxDecompressedRequestBytesdecompression-bomb defense. - Cookies for unary methods; CORS preflight now reflects
Access-Control-Request-Headers. - Response caps —
maxResponseBytes/maxExternalizedResponseBytes.
Large payloads / external storage
- External-location pointer batches (
vgi_rpc.location) with theExternalStorageinterface,maybeExternalizeBatch/resolveExternalLocation, andhttpsOnlyValidator. - Request externalization via upload URLs —
POST /__upload_url__/init,uploadUrlProvider,maxUploadBytes.
Streaming
cancel()support for streaming calls — server-sideonCancelhook driven byvgi_rpc.cancelinput metadata.
Arrow backend
- Backend-agnostic arrow facade with arrow-js and flechette implementations; workerd-compatible bundling and a Web Crypto migration.
Observability
AccessLogHook+--access-log(JSONL records that validate cross-language).
🔌 Protocol / wire changes
- State tokens are now sealed with XChaCha20-Poly1305 AEAD (was HMAC-SHA256) and bound to the authenticated principal. The new key option is
tokenKey(32-byte master key). - Slim
__describe__wire format —DESCRIBE_VERSION = 4, 8-column schema, plus aprotocol_hashdigest. protocol_versionenforcement at the dispatch boundary (ProtocolVersionError,error_kind = protocol_version_mismatch).- Typed errors —
MethodNotImplementedError,ServerDrainingError,SessionLostErrorwithvgi_rpc.error_kindmetadata. - Over HTTP, RPC errors now return HTTP 200 +
X-VGI-RPC-Error(with an EXCEPTION batch) instead of 500.
⚠️ Upgrade notes
- The HTTP state-token format changed (HMAC → AEAD); tokens are not compatible across the upgrade and in-flight streams won't resume from an older server. The option rename
signingKey→tokenKeyis required. - Introspection no longer carries
doc/param_typeson the wire (slim v4) — theProtocolclass is the source of human-readable type info.
📚 Docs
- Full documentation refresh aligned to the current API, new guides (Unix Socket Launcher, OAuth & PKCE, Sticky Sessions, Compression, Large Payloads), and a new logo.
Full changelog: v0.6.4...v0.7.0
v0.6.4
What's new
- Access-Control-Max-Age on CORS preflight: New
corsMaxAgeoption inHttpHandlerOptionssets theAccess-Control-Max-Ageheader on OPTIONS responses. Default is 7200 seconds (2 hours). Passnullto omit the header.
v0.6.3
Add X-VGI-Content-Encoding to the CORS Access-Control-Expose-Headers response header, so browser clients can detect zstd-compressed responses cross-origin.
The full exposed header list is now: WWW-Authenticate, X-Request-ID, X-VGI-Content-Encoding.