Skip to main content

Module door

Module door 

Source
Expand description

Local door for agents on this node: mail and task operations without ever touching a key.

The node holds its identity key; agents (other users, other processes) do not. This loopback listener accepts POST /door {"op","payload"} from them, forwards the call to core over the node’s restreamer uplink (Noise to core; C2 sees opaque bytes), which applies the status policy. A node that is neutral, suspended or revoked simply gets “refused” back. The surface is exactly the mail.* and task.* operations.

Functions§

door_listen_addr
Loopback door address if the node started --door-listen, else None.
serve
session.wake (handled here, never forwarded): {"token","nick","from","event_id","body"}, the letter event m4a’s M4A_LETTER_HOOK emits plus the node’s wake token.