Skip to content

ServeUnixOptions

Defined in: src/launcher/serve-unix.ts:46

Configuration for serveUnix.

optional announcementSink?: WritableStream;

Defined in: src/launcher/serve-unix.ts:77

Override the stream used for the UNIX:<path> line. Defaults to process.stdout.


optional backlog?: number;

Defined in: src/launcher/serve-unix.ts:70

Maximum sequential listen backlog. Mirrors Python’s serve_unix (backlog=16). Default: 16.


optional dispatchHook?: DispatchHook;

Defined in: src/launcher/serve-unix.ts:63

Optional dispatch hook for observability.


optional enableDescribe?: boolean;

Defined in: src/launcher/serve-unix.ts:61

Enable describe method. Default: true.


optional externalLocation?: ExternalLocationConfig;

Defined in: src/launcher/serve-unix.ts:65

Optional external-storage config for large-batch externalisation.


optional idleTimeout?: number;

Defined in: src/launcher/serve-unix.ts:51

Self-terminate after this many seconds with zero connected clients. Default: 300. 0 disables the timer (server runs until killed).


optional onBound?: (sockPath) => void;

Defined in: src/launcher/serve-unix.ts:74

Called after listen() returns successfully but before UNIX:<path> is printed. The launcher uses this hook to write the announcement only after we’re sure the bind took.

ParameterType
sockPathstring

void


optional onServeStart?: ServeStartHook;

Defined in: src/launcher/serve-unix.ts:67

Lifecycle hook fired once before the first dispatched request.


optional protocolVersion?: string;

Defined in: src/launcher/serve-unix.ts:57

Optional logical-service / protocol-contract version label.


optional serverId?: string;

Defined in: src/launcher/serve-unix.ts:59

Custom server identifier.


optional startupGraceSeconds?: number;

Defined in: src/launcher/serve-unix.ts:55

Grace period after listen() succeeds before the idle timer starts ticking. Default: 5 — gives the first launcher caller a chance to connect after the UNIX:<path> announcement.


unixPath: string;

Defined in: src/launcher/serve-unix.ts:48

Absolute path to the Unix socket file the worker should bind.