area: pluginsgood first issuetype: feature
倉庫指標
- Star
- (2 star)
- PR 合併指標
- (PR 指標待抓取)
描述
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 ofpreflight-cmd. - Speaks the standard plugin protocol (
info/validate/invoke). - Each host is checked in parallel; total time bounded by
timeout_seconds. - On failure, the
suggestfield names the host(s) that timed out. - Doc page under
docs/plugins/preflight-network.md. - Registered in the workspace
Cargo.toml.
Where to start
plugins/preflight-cmd/— closest analogue.docs/reference/plugin-protocol.md— protocol spec..claude/skills/new-plugin/SKILL.md— scaffolding skill if available.
Non-goals
- DNS lookups vs TCP connects: do TCP. Anyone wanting "is DNS up" can put
8.8.8.8:53in the list. - HTTP semantics (status codes etc). TCP connect is enough signal.