@query-farm/vgi-rpc 0.7.5 → 0.8.0

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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ Define RPC methods with Arrow-typed schemas, serve them over stdin/stdout, and i
16
16
  - **Runtime introspection** — opt-in `__describe__` method for dynamic service discovery via the CLI
17
17
  - **Result validation** — missing required fields in handler results throw descriptive errors at emit time
18
18
  - **Authentication** — bearer tokens, JWT, mTLS (PEM-in-header and XFCC), with chainable authenticators
19
- - **Three client transports** — HTTP, subprocess, and raw pipe, all sharing a unified `RpcClient` interface
19
+ - **Four client transports** — HTTP, subprocess, raw pipe, and raw TCP (`tcpConnect` / `serveTcp`), all sharing a unified `RpcClient` interface. Raw TCP carries no auth/TLS and defaults to loopback (`127.0.0.1`) — trusted networks only; use HTTP otherwise.
20
20
 
21
21
  ## Installation
22
22
 
@@ -4,5 +4,5 @@ export type { OAuthResourceMetadataResponse } from "./oauth.js";
4
4
  export { fetchOAuthMetadata, httpOAuthMetadata, parseClientId, parseClientSecret, parseDeviceCodeClientId, parseDeviceCodeClientSecret, parseResourceMetadataUrl, parseUseIdTokenAsBearer, } from "./oauth.js";
5
5
  export { PipeStreamSession, pipeConnect, subprocessConnect } from "./pipe.js";
6
6
  export { HttpStreamSession } from "./stream.js";
7
- export type { HttpConnectOptions, LogMessage, PipeConnectOptions, StreamSession, SubprocessConnectOptions, } from "./types.js";
7
+ export type { HttpConnectOptions, LogMessage, PipeConnectOptions, StreamSession, SubprocessConnectOptions, TcpConnectOptions, } from "./types.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClH,YAAY,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClH,YAAY,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { RpcClient } from "./connect.js";
2
+ import type { TcpConnectOptions } from "./types.js";
3
+ /**
4
+ * Connect to a vgi-rpc server over a raw TCP socket and wrap it with
5
+ * {@link pipeConnect}. The network analog of `subprocessConnect`: identical
6
+ * lockstep raw Arrow-IPC framing, only the transport differs. Nagle's
7
+ * algorithm is disabled (`setNoDelay(true)`) so lockstep requests are not
8
+ * delayed coalescing writes. The returned client's {@link RpcClient.close}
9
+ * also destroys the socket.
10
+ *
11
+ * SECURITY: raw TCP carries **no authentication or TLS** — only connect to
12
+ * trusted endpoints. Use `httpConnect` for untrusted networks.
13
+ *
14
+ * @param host Hostname or IP address of the TCP server.
15
+ * @param port TCP port of the server.
16
+ * @param options Optional log/external-location configuration.
17
+ */
18
+ export declare function tcpConnect(host: string, port: number, options?: TcpConnectOptions): RpcClient;
19
+ //# sourceMappingURL=tcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tcp.d.ts","sourceRoot":"","sources":["../../src/client/tcp.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAiC7F"}
@@ -42,6 +42,14 @@ export interface PipeConnectOptions {
42
42
  /** External storage config for resolving externalized batches. */
43
43
  externalLocation?: import("../external.js").ExternalLocationConfig;
44
44
  }
45
+ /**
46
+ * Options for {@link tcpConnect}, the raw-TCP-socket RPC client.
47
+ *
48
+ * SECURITY: raw TCP carries no authentication or TLS — connect only to
49
+ * trusted endpoints (use {@link httpConnect} for untrusted networks).
50
+ */
51
+ export interface TcpConnectOptions extends PipeConnectOptions {
52
+ }
45
53
  /** Options for {@link subprocessConnect}, which spawns a server process and pipes to it. */
46
54
  export interface SubprocessConnectOptions extends PipeConnectOptions {
47
55
  /** Working directory for the spawned process. Defaults to the current directory. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAGA,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,4HAA4H;IAC5H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,mIAAmI;IACnI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,EAAE,sBAAsB,CAAC;CACpE;AAED,wFAAwF;AACxF,MAAM,WAAW,UAAU;IACzB,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,2GAA2G;IAC3G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC5C,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACvE,6FAA6F;IAC7F,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACvE,wEAAwE;IACxE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,KAAK,CAAC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E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACvE,6FAA6F;IAC7F,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACvE,wEAAwE;IACxE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,EAAE,sBAAsB,CAAC;CACpE;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;CAAG;AAEhE,4FAA4F;AAC5F,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,gEAAgE;IAChE,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;CACxC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { tcpConnect } from "./client/tcp.js";
1
2
  export * from "./index.core.js";
2
- export { acquireLock, computeHash as launcherComputeHash, defaultStateDir, type FileLockHandle, type GcResult, gcStateDir, type LaunchConfig, launch, probeSocket, type ServeUnixHandle, type ServeUnixOptions, type SocketPaths, type StatusRow, serveUnix, socketPaths, statusRows, tryAcquireLock, } from "./launcher/index.js";
3
+ export { acquireLock, computeHash as launcherComputeHash, defaultStateDir, type FileLockHandle, type GcResult, gcStateDir, type LaunchConfig, launch, probeSocket, type ServeTcpHandle, type ServeTcpOptions, type ServeUnixHandle, type ServeUnixOptions, type SocketPaths, type StatusRow, serveTcp, serveUnix, socketPaths, statusRows, tryAcquireLock, } from "./launcher/index.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,WAAW,IAAI,mBAAmB,EAClC,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,UAAU,EACV,KAAK,YAAY,EACjB,MAAM,EACN,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,SAAS,EACT,WAAW,EACX,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK7C,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,WAAW,IAAI,mBAAmB,EAClC,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,UAAU,EACV,KAAK,YAAY,EACjB,MAAM,EACN,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC"}