Skip to main content

audit_log_capture_window

Function audit_log_capture_window 

Source
pub(crate) fn audit_log_capture_window(
    query_desc: &str,
    outcome: &Result<CaptureOutcome>,
    resolved: &Option<(CaptureTier, String)>,
)
Expand description

Audit trail for CaptureWindow — reagent P1 (PR #2709 round 4): the residual risk after rounds 2-3’s scoping (a different AgentMux instance’s window, which can belong to a different OS user on a shared machine) is a disclosure-across-a-human-boundary question, not a technical one a capability flag alone would fully answer — a real per-agent opt-in gate is tracked as a separate follow-up (no existing settings/enforcement mechanism to build it on today). Logging every call — who, what was requested, what happened — is the honest, shippable Phase-1 answer: best-effort (a logging failure must never break the tool itself), append-only NDJSON inside capture_window_dir() itself — prune_old_captures’s PNG-only extension filter already leaves a .log file in that same directory untouched, so this doesn’t need (or want) its own separate directory alongside it.