avelino/dotagent

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

Open

#19 ouverte le 20 mai 2026

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Rust (1 fork)github user discovery
area: pluginsgood first issuetype: feature

Métriques du dépôt

Stars
 (2 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur