Skip to main content

Module server

Module server 

Source
Expand description

The daemon server: accepts UDS connections under .pushkin/, answers protocol requests with the shared pipeline (spec §4.3). One tokio runtime per serve call; connections are tracked in a JoinSet so no task is fire-and-forget (AGENTS.md tokio rule). The daemon is a transport for the cold pipeline, never a second brain: Check calls pushkin_core::pipeline::check_write — the same function, the same envelope. Read-only daemons (spec §8.4: the offer made to non-canonical binaries) serve on private sockets and refuse wire mutations.

Enums§

ServerError

Constants§

SOCKET_FILE
Socket location relative to the repo root — inside .pushkin/ so the gate surface owns its own transport.

Functions§

request
One round trip against the canonical socket of repo_root.
request_at
One round trip against an explicit socket: connect, send one request line, read one response line. Synchronous std transport — the shim side has no runtime, and one blocking round trip is exactly its job.
serve
Serve requests on the canonical socket until a Shutdown request arrives. Blocking: owns a current-thread tokio runtime for its lifetime. The socket file is created on bind and removed before returning.
serve_at
Serve on an explicit socket path. read_only daemons answer checks and pings (flagged in DaemonInfo) but refuse Shutdown over the wire — their lifecycle belongs to the OS session that spawned them (spec §8.4), so they run until killed.
serve_resolved
serve_at, with the governing manifest named explicitly (F73 phase 3).
socket_path