avelino/dotagent

Add plugin: `preflight-network` (TCP connectivity check)

Open

#19 aperta il 20 mag 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Rust (1 fork)github user discovery
area: pluginsgood first issuetype: feature

Metriche repository

Star
 (2 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Preflight plugins abort an agent run before the spawn happens. preflight-warp and preflight-cmd already ship. A common reason for an agent to fail is "no network" — a laptop just woke from sleep, the VPN dropped, the office wifi flaked. Right now the agent has to run, fail, retry, and probably notify before anyone realizes the actual problem is network.

Proposal

A new plugin preflight-network that checks connectivity to one or more endpoints before the agent runs. If any check fails, preflight aborts with a helpful suggest field.

Manifest usage:

[[preflight]]
plugin = "preflight-network"
hosts = ["api.github.com:443", "honeycomb.io:443"]
timeout_seconds = 5

The plugin reads the host list from its config, opens a TCP connection to each, and exits 0 if all succeed.

Acceptance criteria

  • New plugin crate under plugins/preflight-network/ following the convention of preflight-cmd.
  • Speaks the standard plugin protocol (info / validate / invoke).
  • Each host is checked in parallel; total time bounded by timeout_seconds.
  • On failure, the suggest field names the host(s) that timed out.
  • Doc page under docs/plugins/preflight-network.md.
  • Registered in the workspace Cargo.toml.

Where to start

Non-goals

  • DNS lookups vs TCP connects: do TCP. Anyone wanting "is DNS up" can put 8.8.8.8:53 in the list.
  • HTTP semantics (status codes etc). TCP connect is enough signal.

Guida contributor