avelino/dotagent

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

Open

#19 opened on 2026年5月20日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Rust (1 fork)github user discovery
area: pluginsgood first issuetype: feature

Repository metrics

Stars
 (2 stars)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド