Skip to main content

Module reactive

Module reactive 

Source
Expand description

Reactive messaging system for agent-to-agent terminal communication. Port of Go’s pkg/reactive/.

Provides message injection into terminal panes, agent registration, rate limiting, message sanitization, audit logging, and cross-host polling via AgentMux cloud service.

Re-exports§

pub use handler::get_global_handler;
pub use handler::Handler;
pub use handler::ReactiveHandler;
pub use poller::Poller;
pub use sanitize::broadcast_turn_message;
pub use sanitize::format_injected_message;
pub use sanitize::sanitize_message;
pub use sanitize::validate_agent_id;
pub use sanitize::validate_muxbus_url;
pub use types::*;

Modules§

activity_watcher
Empty-title recovery: a running agent with conversation and no usable session title gets one, written straight to its block’s term:ambient_summary, which the pane header and the Swarm row read.
handler
poller
progress_watcher
Pushed per-agent progress: the agent’s current todo checklist and the tool it is running right now, published as an agent:progress MuxEvent so the Swarm pane can list them under the agent’s name.
registry
File-based cross-instance agent registry.
sanitize
types

Constants§

AUDIT_LOG_MAX 🔒
Maximum entries in the audit log ring buffer.
DEFAULT_POLL_INTERVAL_SECS
Default poll interval for AgentMux poller (seconds).
MAX_MESSAGE_LENGTH
Maximum message length in bytes.
RATE_LIMIT_MAX 🔒
Rate limit: max tokens (requests per second).
TRUNCATION_SUFFIX
Suffix appended when a message is truncated.

Functions§

audit_hash 🔒
A short hex hash of a message, so the audit log can tell messages apart without storing their text. DefaultHasher, not SHA-256: privacy, not security (it was named sha256_hex until the §5.3 #7 cleanup).
held_jekt_wake
Woken whenever an agent registers, so jekts held for an absent agent are replayed promptly (SPEC_DURABLE_JEKT_DELIVERY_2026_09_24.md §2.3). notify_one does no I/O, so it is safe under the handler lock.
now_unix_millis 🔒
Get current time as Unix milliseconds.