Sidecar JSON file written next to the socket; lets daemon status show details without an IPC roundtrip.
-
cwd: string
Working directory the daemon was started in (matches its socket-path hash).
-
nodeVersion: string
Daemon's
process.versionat startup. -
pid: number
OS process id of the running daemon.
-
socketPath: string
Absolute path to the daemon's listening Unix socket.
-
startedAt: number
Epoch ms when the daemon began listening.
The options a daemon run accepts: everything from UserRunOptions that survives a socket.
-
reporter: ReporterName | false
One built-in reporter by name, or
false. An instance cannot cross a socket. -
reporters: ReadonlyArray<ReporterName>
Several built-in reporters by name. Mutually exclusive with
reporter, as it is locally.
Client → daemon: request to execute a test run with the given argv/env in the daemon's persistent Chrome.
-
argv: string[]
CLI arguments after
qunitx(i.e.process.argv.slice(2)). -
cwd: string
Client's working directory. The daemon rejects mismatched cwds (different project).
-
env: Record<string, string | undefined>
Client's full process environment, applied to the run and restored on completion.
-
nodeVersion: string
Client's
process.version. The daemon shuts down on mismatch to avoid module-graph drift. -
options: DaemonRunOptions
Resolved options, when the request came from the JS API rather than a command line. Present means "build the config from these and answer with a
resultchunk"; absent means the daemon parsesargvexactly as the CLI would. -
type: "run"
Discriminator for the protocol union; always
'run'for this variant.
Client → daemon: graceful shutdown request.
-
type: "shutdown"
Discriminator; always
'shutdown'.
Discriminated union of every request the daemon accepts.
| { type: "result"; result: RunResult; }
| { type: "stderr"; data: string; }
| { type: "pong"; pid: number; nodeVersion: string; cwd: string; startedAt: number; }
| { type: "done"; exitCode: number; }
| { type: "fatal"; message: string; }
Daemon → client: one streamed response chunk in the per-request stream.
Usage
import * as mod from "lib/commands/daemon/protocol.ts";