Skip to main content

Module write_queue

Module write_queue 

Source
Expand description

Replays the writes the MCP server queued under queue/ while this daemon was unreachable. Each entry is the request the MCP server would have sent; it goes through this daemon’s own router, so auth, redaction and every handler apply exactly as for a live call.

Structs§

Entry
One queued write, as the MCP server writes it.
Pass
WriteQueue

Constants§

DIR_NAME
The directory under the data dir where writes wait for the daemon; the MCP server, the daemon’s write gate and its replayer all use it.
INTERVAL

Functions§

entry_names
Entry file names, oldest first.
is_entry_name
<19-digit unix nanos>-<uuid>.json; no other name in the directory is an entry, so a file still being written under a temporary name is never read.
push
Saves a write for the replayer under the name the MCP server would give it, so both writers’ entries replay in the order they were made.