Skip to content
YosoiDocs

Cursor

yosoi.surface.Cursor

class Cursor:

Owned navigation cursor. Close it to release watches and hot authority.

Source: python/yosoi/surface.py:1425

Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.

def __init__(self, handle: _native.SurfaceCursor) -> None:

Wrap a cursor allocated by Session.cursor.

Source: python/yosoi/surface.py:1428

def __enter__(self) -> Self:

Use a cursor with deterministic cleanup.

Source: python/yosoi/surface.py:1432

def __exit__(self, *_: object) -> None:

Release this cursor even when the body raises.

Source: python/yosoi/surface.py:1436

@property
def id(self) -> int:

Return a session-local diagnostic identity, without authority.

Source: python/yosoi/surface.py:1446

@property
def status(self) -> CursorState:

Inspect attachment, authority, subscriptions and evidence freshness.

Source: python/yosoi/surface.py:1451

@property
def position(self) -> Position:

Return the saved region, focus and continuation.

Source: python/yosoi/surface.py:1456

def overview(self, *, continuation: Continuation | None=None, budget: Budget | None=None) -> NativePage:

Read current evidence and save its navigation continuation.

Source: python/yosoi/surface.py:1476

def find(self, query: str, *, continuation: Continuation | None=None, budget: Budget | None=None) -> NativePage:

Search current captured evidence without promoting the cursor.

Source: python/yosoi/surface.py:1484

def expand(self, reference: NativeReference, *, continuation: Continuation | None=None, budget: Budget | None=None) -> NativePage:

Drill into evidence and save scope without granting action authority.

Source: python/yosoi/surface.py:1496

def inspect(self, reference: NativeReference, *, continuation: Continuation | None=None, budget: Budget | None=None) -> NativeInspection:

Read exact captured detail and save focus, preserving its freshness.

Source: python/yosoi/surface.py:1508

def focus(self, reference: NativeReference) -> None:

Select exact evidence; this does not prove current UI eligibility.

Source: python/yosoi/surface.py:1520

def subscribe(self, reference: NativeReference) -> int:

Watch a captured block; an adapter must publish and reconcile updates.

Source: python/yosoi/surface.py:1524

def reconcile(self, watch: int, replacement: NativeReference) -> EventKind:

Compare replacement evidence without asserting durable entity identity.

Source: python/yosoi/surface.py:1528

def unsubscribe(self, watch: int) -> None:

Remove this cursor’s subscription without moving its focus.

Source: python/yosoi/surface.py:1534

def events(self) -> EventBatch:

Consume retained events; lost is true when unread history was evicted.

Source: python/yosoi/surface.py:1538

def promote(self) -> None:

Acquire the single hot slot; detached or competing owners are rejected.

Source: python/yosoi/surface.py:1542

def cool(self) -> None:

Release hot authority; an in-flight action prevents unsafe handoff.

Source: python/yosoi/surface.py:1546

def begin_action(self) -> ActionLease:

Lease focus; the adapter still checks visibility and eligibility.

Source: python/yosoi/surface.py:1550

def close(self) -> None:

Release owned cursor state; further cursor operations are rejected.

Source: python/yosoi/surface.py:1554