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 it is sent to the daemon.
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, or .sealed; no other name in the directory is an entry, so a file still being written under a temporary name is never read.
publish_device_identity
This device’s age identity, which seals and opens queued writes, after publishing its recipient for the MCP server; None, logged, when the device keys can’t be read, and writes then queue in plaintext.
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; sealed when there is a recipient.