Repository navigation
Releases
Releases · sao-coding/sightline
v0.2.0
Install
$env:SIGHT_VERSION = '0.2.0'; irm https://github.com/sao-coding/sightline/releases/download/v0.2.0/install.ps1 | iexOr download sight.exe below and put it on your PATH. Verify it with sight.exe.sha256.
What's changed
Breaking Changes
Warnings are plain code strings; details moved to data
baseline_size_changedno longer embeds JSON. The sizes aredata.baseline_size {w,h}anddata.size {w,h}.other_candidate_windowis now one warning per command, and the other windows are listed indata.other_candidates [{hwnd,title,rect}].list_truncatedno longer carries "showing N of M" text (count,totaland the newlimitare indata).processes_exited_during_samplingandaccess_denied_for_some_processeslose their explanatory text; the denied processes are indata.access_denied [{pid,exe}], and eachprocessesentry already has itsexitedflag.
Features
--baseline <image> for shot and wait
- Compare against an earlier shot instead of the first captured frame, so a change that finished before
sightstarted (an instant UI reaction after a click) is still detected. Implies--expect-change/--change. - Every shot now writes a sidecar
<name>.sight.json(target, window-relative crop, pixel size before scaling, saved size, format).--baselinechecks it and fails withINVALID_ARGSand a hint on a different target or a different--crop(a different pixel size counts as a change), instead of comparing mismatched images. - JPEG (default) and downscaled baselines compare exactly: the live frame goes through the same resize and JPEG encode as
shot, so no tolerance is needed.
Change-aware waiting, window-relative crop and window coordinate formulas
shot --expect-changewaits for pixels to differ from the first frame before--settle, so a click that has not started changing the UI yet no longer returns the old frame.--min-change-px(default 16) ignores noise such as a blinking caret. Output always haschangedandchange_ms; no change before--timeoutis aTIMEOUTwithchanged:false.- New
waitcommand with the same waiting logic and no image:sight wait --hwnd N --change --settle 300printschanged,change_ms,settled,elapsed_ms. --crop x,y,w,h(onshotandwait) is relative to the window's DWM frame top-left, so it works wherever the window is. It is applied before--scaleand--max-edge, and also works with the popup screen-capture fallback.- Window shots add
window(frame,client,client_offset),formula_windowandformula_clientnext to the screenformula. - Documented that
--max-edge 0disables downscaling.
sight rec: record a window or region to an animated GIF
sight rec (--hwnd N | --pid N | --region x,y,w,h) [--crop ...] --duration ms [--fps N] [--max-edge N] [--until-settled ms] [--keyframes N] [--out path.gif]blocks until the duration has passed (or, with--until-settled, until the image changed and then stayed unchanged), so agents run it in the background while they act.- Uses the
gifcrate and supports multi-monitor regions. Identical frames are merged by extending the previous frame's delay;gif_largewarns above about 10 MB. - Output has
path,frames,fps,duration_ms,image,size_bytesand the samemaps_to,formula,formula_windowandformula_clientasshot.--keyframes Nalso saves N PNG stills of the most changed moments and lists them witht_ms.
rec picks one capture source at the start: --source auto|screen|window
--source auto(default) records the window's screen rect (monitor capture, so menus, tooltips and popups are included) unless another visible window above the target overlaps its frame; then it uses window capture and warnsrec_window_source_no_popups.screenandwindowforce a source. The source is never switched mid-recording. Output hassourceandsource_reason(auto_not_occluded,auto_occluded,forced).--pad Nrecords N px around the window in a screen recording (for dropdowns that stick out),--cursorincludes the mouse cursor.- The screen capture follows a window that moves (fixed canvas size,
moved:true, formulas valid for the start position) and keeps the start size when it resizes (rec_window_resized). Windows covering or uncovering the target mid-recording are listed inocclusion_events(rec_occlusion_changed).
Fixes
--baseline: a different window size now counts as a change
- When the target window (or the
--cropresult) has another pixel size than the baseline,shot/wait --baselinenow returnchanged:truewith the warningbaseline_size_changed(sizes indata.baseline_size {w,h}anddata.size {w,h}) and then settle as usual, instead ofINVALID_ARGS. Clicks often resize or expand a window. - Still
INVALID_ARGS: a different target kind (window vs region), a different--crop, a missing file, a foreign image with no sidecar and a different size, and a--cropthat falls outside the window's new size.
v0.1.0
Install
$env:SIGHT_VERSION = '0.1.0'; irm https://github.com/sao-coding/sightline/releases/download/v0.1.0/install.ps1 | iexOr download sight.exe below and put it on your PATH. Verify it with sight.exe.sha256.
What's changed
Features
Initial release: observe and measure Windows apps
listfinds windows (hwnd, pid, exe, title, rect, minimized) with--pid,--exe,--titleand--allfilters.shotcaptures a window (--pid/--hwnd) or a screen--region, with--settle,--scale,--max-edge,--timeoutand--out. Popups are included, and a mapping formula from image pixels to screen coordinates is returned.statsamples CPU and memory of a process tree over time.doctorlists monitors and their DPI scale.- Every command prints a single-line JSON envelope (
v,ok,data,warningsorerror) with stable error codes and exit codes.
Features
- initial project setup