avelino/dotagent
Voir sur GitHubAdd plugin: `preflight-disk-space` (abort below free-space threshold)
Open
#20 ouverte le 20 mai 2026
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
Agents that write reports, dumps, or logs can fail mid-run with ENOSPC, leaving partial state. The examples/disk-alert/ agent already monitors disk space, but there is no preflight that prevents an agent from starting when disk is below a threshold.
Proposal
A new plugin preflight-disk-space that aborts an agent run if free space on a target volume is below a configurable threshold.
Manifest usage:
[[preflight]]
plugin = "preflight-disk-space"
path = "/Users/me/reports"
min_free_gb = 5 # abort if free space < 5 GiB
# or:
min_free_percent = 10 # abort if less than 10% free
Acceptance criteria
- New plugin crate under
plugins/preflight-disk-space/following the convention ofpreflight-cmd. - Both absolute (
min_free_gb) and percentage (min_free_percent) thresholds work; either or both. - When both are set, abort if either is breached.
-
suggestfield on abort names which volume is full and how much short it is. - Works on macOS and Linux (use
statvfsor equivalent cross-platform crate). - Doc page under
docs/plugins/preflight-disk-space.md. - Registered in the workspace
Cargo.toml.
Where to start
plugins/preflight-cmd/— convention to copy.docs/reference/plugin-protocol.md— protocol.examples/disk-alert/— the existing reactive disk agent for inspiration.
Non-goals
- Inode exhaustion checks (separate failure mode, future plugin).
- Mount-point health beyond free space.