Expand description
Library surface of the Use Pod provider agent.
The binary (src/main.rs) is a thin wrapper around these modules so that
integration tests can exercise config parsing, identity, and protocol
plumbing directly.
Modules§
- backend
- Backend abstraction. See
plan/V2_AGENT_SPEC.md§5. - config
agent.tomlparsing and validation. Seeplan/V2_AGENT_SPEC.md§3.- discovery
- Backend discovery. See
plan/V2_AGENT_SPEC.md§6. - heartbeat
- Heartbeat loop. Posts a
heartbeatJSON message every 15s. Real metrics collection lands in a later task; this scaffold sends hardcoded zeroes so the coordinator’s connection-liveness logic still works end-to-end. - identity
- Ed25519 identity keypair: generate-on-first-run, persist with mode 0600,
idempotent reload. See
plan/V2_AGENT_SPEC.md§4.1. - job_
executor - Agent-side job executor. See
plan/V2_AGENT_SPEC.md§7. - service
usepod-agent service ...— install / start / stop / status / uninstall the agent as a managed system service.- setup
usepod-agent setup— device-flow pairing on first run.- ws_
client - Long-lived WSS client. Performs the signed handshake (
auth_challenge→auth_response→auth_ok) and runs heartbeat/job loops thereafter. Reconnect with exponential backoff perplan/V2_AGENT_SPEC.md§9.