Witness

v0.7.0
io.github.wookat/witness Checked 4 days ago Published 10 days ago

Voice-anchored evidence recorder for AI coding agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

session_overview

Session metadata: app URL, duration, lang, audio captured, ASR engine, counts of says/marks/errors/requests/ws frames, file list

list_segments

Speech anchor index — every spoken segment with suspects, dead clicks and shot/dom refs. Segments are mechanically cut, NOT confirmed issues: merge adjacent ones or split as the semantics require. READ THIS FIRST.

segment_detail

One speech segment's evidence bundle: verbatim speech, suspect elements, dead clicks, errors, and the exact shots/dom snapshots to inspect. n = segment number (1-based)

ParameterTypeDescription
n *number

list_says

All spoken feedback fragments with timestamps — the issue anchors

session_md

The rendered evidence timeline (SAY blocks + attached events). Capped at ~80k chars — for long sessions prefer list_segments/segment_detail first, then events_around for raw precision

ParameterTypeDescription
offsetnumber

events_around

Raw events within a time window. t_ms = timeline ms, radius_ms default 3000, kinds = comma list (click,input,req,res,ws,console,error,mut,mark,nav,say,scroll,shot,note,issue,dom,key)

ParameterTypeDescription
t_ms *number
kindsstring
radius_msnumber

get_errors

All console errors, page errors and HTTP responses >= 400

get_shot

A screenshot image. path is relative to the session dir, e.g. shots/011-mark.jpg

ParameterTypeDescription
path *string

get_dom_state

DOM snapshot HTML nearest to a timeline ms (snapshots at nav/mark/every 30s). Returns path + html, capped — pass max_chars for more. For visuals prefer get_shot/keyframes

ParameterTypeDescription
t_ms *number
max_charsnumber

get_body

Captured HTTP response body. path relative to session dir, e.g. bodies/r3.json

ParameterTypeDescription
path *string

get_audio

Session microphone audio (audio.webm, opus). Returns the whole recording inline when ≤15MB — use it to verify what the user actually said against the transcript. Larger files return the path+size instead; extract a time range locally with ffmpeg if needed

get_transcript

Speech recognition output: full transcript text + segments with timestamps (engine/model/lang recorded). Returns say events if no transcript.json exists

search_events

Full-text search across event fields (say text, console, errors, urls, selectors, input values, ws payloads). Case-insensitive substring. Returns matching events as JSON, oldest first

ParameterTypeDescription
query *string
kindsstring
limitnumber

get_asr

Current live speech-recognition engine for future recordings (auto|local|doubao-web|doubao-ime|sr|off)

set_asr

Switch the live ASR engine for FUTURE recordings (persists to ~/.witness/config.json). local = offline sherpa-onnx; doubao-web = best cloud punctuation; doubao-ime = sentence timestamps; sr = browser builtin; off = none.

ParameterTypeDescription
engine *string