Live Screen Surface

Phase 2 introduces a public live-screen API in packages/api/pkg/sikuli without changing the existing API-runtime architecture.

Public Entry Point

Use NewRuntime to connect to a running sikuli-go API process:

runtime, err := sikuli.NewRuntime("127.0.0.1:50051")

The runtime exposes:

Screen Model

Screen is now a usable live surface instead of a metadata-only descriptor.

It exposes:

Screen.Region(...) coordinates are screen-local. The runtime translates them to the correct absolute desktop region before searching or capturing.

LiveRegion Model

LiveRegion is the screen-backed region facade used for live screen operations.

It exposes:

The existing image-backed Region API remains intact and is still the correct surface for image-to-image workflows.

Capture Scope Rules

Multi-Monitor Selection

The runtime protocol now supports:

For screen-targeted operations, region coordinates are interpreted relative to the selected screen, not the full desktop.

Semantics

Phase 1 search semantics remain in force:

The live surface reuses the same parity contract rather than inventing a separate runtime-specific search model.