Skip to content

Commit 7dcda6d

Browse files
rustyconoverclaude
andcommitted
docs: JSDoc the ServeStreamOptions interface and server option properties
Restore API-doc coverage: document ServeStreamOptions and the VgiRpcServer constructor option properties (enableDescribe, serverId, dispatchHook, externalLocation, protocolVersion). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1235cbf commit 7dcda6d

5 files changed

Lines changed: 15 additions & 4 deletions

File tree

dist/index.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/server.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ export declare class VgiRpcServer {
2020
* re-fires rather than silently skipping. Mirrors Python 7b3999c. */
2121
private serveStartFired;
2222
constructor(protocol: Protocol, options?: {
23+
/** Enable the `describe` RPC method (service self-description). Default `true`. */
2324
enableDescribe?: boolean;
25+
/** Opaque per-process server identifier surfaced to clients and the landing page. */
2426
serverId?: string;
27+
/** Hook invoked around each dispatched request (tracing/metrics/auth enrichment). */
2528
dispatchHook?: DispatchHook;
29+
/** Configuration for externalizing oversized record batches to blob storage. */
2630
externalLocation?: ExternalLocationConfig;
31+
/** Protocol version string reported in the service description. */
2732
protocolVersion?: string;
2833
/** Lifecycle hook fired once before the first dispatched request. */
2934
onServeStart?: ServeStartHook;

dist/server.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/serve-stream.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type { Protocol } from "./protocol.js";
1414
import { VgiRpcServer } from "./server.js";
1515
import { TransportKind } from "./types.js";
1616

17+
/** Options for {@link serveStream} — a single RPC session over one stream pair. */
1718
export interface ServeStreamOptions {
1819
/** Incoming request bytes — a web `ReadableStream<Uint8Array>` or a Node
1920
* `Readable` (e.g. a `Duplex` bridging a MessagePort). */

src/server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ export class VgiRpcServer {
6868
constructor(
6969
protocol: Protocol,
7070
options?: {
71+
/** Enable the `describe` RPC method (service self-description). Default `true`. */
7172
enableDescribe?: boolean;
73+
/** Opaque per-process server identifier surfaced to clients and the landing page. */
7274
serverId?: string;
75+
/** Hook invoked around each dispatched request (tracing/metrics/auth enrichment). */
7376
dispatchHook?: DispatchHook;
77+
/** Configuration for externalizing oversized record batches to blob storage. */
7478
externalLocation?: ExternalLocationConfig;
79+
/** Protocol version string reported in the service description. */
7580
protocolVersion?: string;
7681
/** Lifecycle hook fired once before the first dispatched request. */
7782
onServeStart?: ServeStartHook;

0 commit comments

Comments
 (0)