ActionLease
yosoi.surface.ActionLease
class ActionLease:
Owned one-action permit. Dropping or closing it preserves uncertain dispatch.
Source: python/yosoi/surface.py:1559
Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.
Methods
Section titled “Methods”def __init__(self, handle: _native.SurfaceActionLease) -> None:
Wrap a Rust permit issued by a hot cursor.
Source: python/yosoi/surface.py:1562
def __enter__(self) -> Self:
Keep the permit scoped to one adapter operation.
Source: python/yosoi/surface.py:1566
def __exit__(self, *_: object) -> None:
Release unfinished authority on exceptions, retaining an outcome event.
Source: python/yosoi/surface.py:1570
revalidate
Section titled “revalidate”def revalidate(self) -> NativeReference:
Recheck live ownership and exact evidence immediately before dispatch.
Source: python/yosoi/surface.py:1574
mark_dispatched
Section titled “mark_dispatched”def mark_dispatched(self) -> None:
Record that a native effect may have begun; this does not confirm success.
Source: python/yosoi/surface.py:1578
finish
Section titled “finish”def finish(self, status: ActionStatus, note: str) -> ActionReceipt:
Consume the permit with the adapter’s observed outcome.
Confirmed requires dispatch; Rejected is forbidden after dispatch. Rust rejects contradictory outcomes and preserves uncertainty when consumed.
Source: python/yosoi/surface.py:1582
def close(self) -> None:
Release an unfinished permit; repeated close is harmless.