Skip to main content

Module daemon

Module daemon 

Source
Expand description

Persistent per-user controller daemon and its authenticated local protocol.

Structs§

CreateSessionControl
Cancellation and committing a newly started session are one atomic decision.
CreateSessionRequest
DaemonClient
DaemonMetadata
DaemonStatus
DraftPreview
ManagementClient
A handle to whatever daemon the metadata file advertises, regardless of its protocol version. It only exposes the frozen management subset (Ping, Status, Stop), which encodes identically in every protocol version.
RegisteredSession
RequestEnvelope
ResponseEnvelope
ResumeSessionRequest
RuntimeLifecycleView
RuntimeNotice
Something the daemon did on its own that a surface should report once.
RuntimeSessionView
RuntimeSnapshot
RuntimeState
SessionPreview
WorkspaceListing
WorkspaceSnapshot

Enums§

DaemonAction
Ping, Status, and Stop form the frozen management subset: their wire encoding — together with RequestEnvelope, ResponseEnvelope, DaemonStatus, and WebViewerStatus — must never change shape, because clients and daemons of any protocol version rely on them to identify, stop, and replace each other. Every other action may change freely behind a PROTOCOL_VERSION bump.
DaemonReply
RuntimeLifecycleKind
WebViewerStatus

Constants§

MAX_FRAME_BYTES
PROTOCOL_VERSION
RETRY_DELAY
STOP_TIMEOUT
How long a daemon is given to exit after it accepts a stop.

Functions§

connect_existing
connect_management
daemon_process_is_alive
Whether a daemon that Mjolnir launched in its own process group is alive.
ensure_supported_daemon_protocol
metadata_path
process_is_alive
process_is_zombie
Whether a non-child process has exited but not yet been reaped.
read_frame
read_metadata
read_metadata_any
run_daemon_process
wait_for_exit
Wait for a process to leave, within STOP_TIMEOUT.
write_frame