Expand description
Append-only JSONL audit log.
The file is ${XDG_STATE_HOME:-~/.local/state}/computer-use/audit.jsonl,
or %LOCALAPPDATA%\computer-use\audit.jsonl on Windows when XDG_STATE_HOME
is unset. Typed text, element values, clipboard bytes, and blocked URLs are
not fields on the line, so they are never written. A write failure is
returned to the caller and does not by itself fail the desktop action.
Structs§
- Audit
Record - One audit record. Fields that would carry typed text are intentionally absent.
- State
DirGuard - Restores the previous test state directory when dropped.
Functions§
- push_
state_ dir - Point audit and pause files at
diruntil the guard drops. - record
- Append one JSON line. Does nothing when no state directory is available in tests.
- state_
dir - Directory that holds
audit.jsonland thepausedmarker. - utc_
timestamp - Format a Unix timestamp as
YYYY-MM-DDTHH:MM:SSZ.