Expand description
HTTP broker for agent coordination.
Provides an HTTP server that agents use to publish messages, poll for
incoming messages, and report status. The broker runs on a background
tokio runtime and is managed through BrokerHandle.
§Lock discipline
BrokerState wraps its inner state in an RwLock. Guards MUST NOT be
held across .await boundaries. The clippy::await_holding_lock lint is
enabled project-wide to catch violations at compile time. Use the
read() / write() methods to obtain guards inside synchronous closures
only.
Re-exports§
pub use messages::BrokerMessage;
Modules§
- conflict
- Broker-internal conflict detector.
- delivery
- Message routing, cursor-based polling, and log flush.
- learnings
- Broker-internal learnings aggregator.
- messages
- Broker message types, validation, and branch slug conversion.
- publish
- Helpers for constructing and publishing
BrokerMessagevalues to a running broker over HTTP. - server
- Axum HTTP server for the broker.
- watcher
- Git-status polling watcher.
Structs§
- Agent
Record - Record of a known agent’s latest state.
- Agent
Status Entry - JSON-serializable snapshot of an agent’s status for the
/statusendpoint and the dashboard TUI. - Broker
Handle - Handle to a running broker, including the optional flush thread.
- Broker
State - Shared broker state.
- Broker
State Inner - Mutable broker state protected by an
RwLock. - Watch
Target - Worktree to watch for git-status changes.
Enums§
- Broker
Error - Errors specific to broker operations.
- Probe
Result - Result of probing an existing listener on the broker port.
Functions§
- probe_
broker - Probes an existing listener at the given URL to determine what is running.
- start_
broker - Starts the HTTP broker server.
- start_
broker_ with - Starts the HTTP broker server with optional conflict-detector wiring and a configurable learnings-flush interval.