Skip to main content

Crate provider_agent

Crate provider_agent 

Source
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.toml parsing and validation. See plan/V2_AGENT_SPEC.md §3.
discovery
Backend discovery. See plan/V2_AGENT_SPEC.md §6.
heartbeat
Heartbeat loop. Posts a heartbeat JSON 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_challengeauth_responseauth_ok) and runs heartbeat/job loops thereafter. Reconnect with exponential backoff per plan/V2_AGENT_SPEC.md §9.