Skip to content

common_browser.schemas.results

One safe operation report for browser work, with explicit partial evidence.

Classes

BrowserCoverage

Observed scope, not a claim of complete site or catalog coverage.

__init__

def __init__(matched: int = 0, attempted: int = 0, returned: int = 0, limit: int | None = None, truncated: bool = False, interrupted: bool = False, unavailable_frames: tuple[str, ...] = ()) -> None

Fields and properties declared here; inherited members belong to the bases above.

attempted

attempted: int = 0

interrupted

interrupted: bool = False

limit

limit: int | None = None

matched

matched: int = 0

returned

returned: int = 0

truncated

truncated: bool = False

unavailable_frames

unavailable_frames: tuple[str, ...] = ()

BrowserError

Bases: RuntimeError

Safe failure whose report retains explicitly accessible evidence.

__init__

def __init__(reason: str, *, status: BrowserStatus = 'error', result: BrowserResult[Any] | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

reason

reason = reason

result

result = result

status

status = status

BrowserInfo

Declared mode capabilities and the runtime’s current lifecycle state.

__init__

def __init__(engine: str, mode: str, state: str, capabilities: frozenset[str], sdk_version: str | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

capabilities

capabilities: frozenset[str]

engine

engine: str

mode

mode: str

sdk_version

sdk_version: str | None = None

state

state: str

supports

def supports(capability: str) -> bool

BrowserIssue

A stable error code and location, never copied input or exception text.

__init__

def __init__(code: str, row_index: int | None = None, field_path: tuple[str | int, ...] = ()) -> None

Fields and properties declared here; inherited members belong to the bases above.

code

code: str

field_path

field_path: tuple[str | int, ...] = ()

row_index

row_index: int | None = None

BrowserResult

Browser outcome; SDK completion never asserts application mutation success.

unwrap admits only complete success. Partial values, captured events and original errors remain explicitly inspectable and absent from repr.

__init__

def __init__(op: str, status: BrowserStatus, value: T | None = None, phase: OperationPhase = 'not_started', reason: str | None = None, issues: tuple[BrowserIssue, ...] = (), coverage: BrowserCoverage | None = None, evidence: object | None = None, operation_id: str = '', observed_at: datetime = (lambda: datetime.now(UTC))(), duration_sec: float = 0.0, error: BaseException | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

coverage

coverage: BrowserCoverage | None = None

duration_sec

duration_sec: float = 0.0

error

error: BaseException | None = field(default=None, repr=False, compare=False)

evidence

evidence: object | None = field(default=None, repr=False, compare=False)

issues

issues: tuple[BrowserIssue, ...] = ()

observed_at

observed_at: datetime = field(default_factory=(lambda: datetime.now(UTC)))

ok

Read-only property.

ok: bool

op

op: str

operation_id

operation_id: str = ''

phase

phase: OperationPhase = 'not_started'

reason

reason: str | None = None

status

status: BrowserStatus

value

value: T | None = field(default=None, repr=False)

unwrap

def unwrap() -> T

Return a complete value or raise a safe error retaining this result.