Skip to main content

Module watch_file

Module watch_file 

Source
Expand description

watch_file tool — register a file for mid-run event wakes.

The TUI loop arbiter polls the registered file and re-invokes the agent when new bytes are appended. This lets a supervising agent react to a long-running command’s structured events (one JSON object per line) without burning a turn every tick — the agent only wakes when there is something new to read.

The watched file must live inside the workspace sandbox (resolved via super::resolve_within). The watch state lives on the shared BackgroundJobManager so the arbiter — which already holds that manager — can poll it without a new shared slot.

Structs§

WatchFile
The watch_file tool: register a file for event-driven wakes.