Skip to main content

Module protocol

Module protocol 

Source
Expand description

IPC protocol definitions for tmai wrapper ↔ parent communication

Uses newline-delimited JSON (ndjson) for bidirectional messaging over Unix domain sockets.

Structs§

WrapState
State data for a wrapped agent

Enums§

ClientMessage
Message from wrapper to tmai parent (upstream)
ServerMessage
Message from tmai parent to wrapper (downstream)
WrapApprovalType
Type of approval being requested (for wrapped agents)
WrapStatus
Status of a wrapped agent

Functions§

current_time_millis
Get current time in milliseconds
decode
Decode a message from a JSON line
encode
Encode a message as ndjson (JSON + newline)
socket_path
Get the IPC socket path
state_dir
Get the base state directory, preferring XDG_RUNTIME_DIR for security