cayu.tools.browser_control
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
BrowserControlPolicy
Section titled “BrowserControlPolicy”from cayu.tools import BrowserControlPolicyApplication-owned live-view and operator-action permission.
Implementations must authorize the session/allocation and action explicitly. Authentication or a matching tenant alone is not an authorization decision. Decisions are scoped to the supplied revision; they are not reusable grants for later control generations. No page content, pixels, or input is supplied.
Bases: ABC.
identity (property)
Section titled “identity (property)”BrowserControlPolicy.identity() -> strReturn a stable, versioned, non-secret application policy identity.
decide (method)
Section titled “decide (method)”async BrowserControlPolicy.decide(request: BrowserControlPolicyRequest) -> BrowserControlPolicyResultAuthorize this exact action, or deny without causing browser effects.
Release source · Runtime guarantees · Capability guides
BrowserControlPolicyRequest
Section titled “BrowserControlPolicyRequest”from cayu.tools import BrowserControlPolicyRequestOne exact, content-free application authorization question.
Bases: _ControlModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
principal |
BrowserControlPrincipal |
Field(repr=False) |
identity |
BrowserControlIdentity |
required |
operator_session_id |
_Identity |
Field(repr=False) |
action |
BrowserControlAction |
required |
record_revision |
_Counter |
required |
control_epoch |
_Counter |
required |
state |
BrowserControlState |
required |
portable_text (method)
Section titled “portable_text (method)”BrowserControlPolicyRequest.portable_text(value: Any) -> Anymodel_copy (method)
Section titled “model_copy (method)”BrowserControlPolicyRequest.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> SelfRelease source · Runtime guarantees · Capability guides
BrowserControlPolicyResult
Section titled “BrowserControlPolicyResult”from cayu.tools import BrowserControlPolicyResultNo permission is granted by omission or by a truthy extension value.
Bases: _ControlModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
allowed |
Annotated[bool, Field(strict=True)] |
False |
portable_text (method)
Section titled “portable_text (method)”BrowserControlPolicyResult.portable_text(value: Any) -> Anymodel_copy (method)
Section titled “model_copy (method)”BrowserControlPolicyResult.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> SelfRelease source · Runtime guarantees · Capability guides
BrowserOperatorPurpose
Section titled “BrowserOperatorPurpose”from cayu.tools import BrowserOperatorPurposeApplication-declared intervention scope, never page-authored instructions.
Bases: _ControlModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
code |
Annotated[str, Field(strict=True, pattern='^[a-z][a-z0-9_]{0,63}$')] |
required |
expected_origins |
tuple[Annotated[str, Field(strict=True, max_length=2048)], ...] |
Field(min_length=1, max_length=32) |
portable_text (method)
Section titled “portable_text (method)”BrowserOperatorPurpose.portable_text(value: Any) -> Anymodel_copy (method)
Section titled “model_copy (method)”BrowserOperatorPurpose.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> Selfcanonical_origins (method)
Section titled “canonical_origins (method)”BrowserOperatorPurpose.canonical_origins(values: tuple[str, ...]) -> tuple[str, ...]