App and Window Surface

Phase 8 expands app/window parity without changing the current app-backend architecture in sikuli-go.

Public Go Surface

packages/api/pkg/sikuli/app.go now exposes a richer record and deterministic query helpers:

The returned Window record now includes:

This keeps Window as a returned value type with helper-driven selection. It does not introduce a separate Java-style mutable window object hierarchy.

Stable Query Model

WindowQuery supports:

Selection rules are deterministic:

  1. the backend returns windows in platform order
  2. FindWindows filters that list without reordering it
  3. GetWindow applies Index to the filtered list
  4. FocusedWindow is shorthand for the focused-only query

This gives ports a stable way to express SikuliX-style window(), focusedWindow(), and allWindows() flows without changing the app backend model.

Protocol Surface

The gRPC API now exposes:

The RPC layer delegates to the same AppController query logic used by the Go package surface. There is no parallel window-selection implementation in the transport layer.

Platform Variance

Window metadata is richer, but still platform-dependent.

Linux

Linux uses wmctrl -lxG plus _NET_ACTIVE_WINDOW probing.

Available where the desktop environment supports those tools:

Limitations:

macOS

macOS uses System Events / AppleScript window enumeration.

Available where accessibility permissions allow it:

Limitations:

Windows

Windows uses PowerShell with Win32 window probing.

Available where a main window handle exists:

Limitations:

Result

Common SikuliX app/window workflows now have first-class API support in the Go port:

The remaining differences are about platform portability of metadata, not about missing API concepts.