Skip to content

cayu.tools.browser

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.

from cayu.tools import BROWSER_FETCH_PLAYWRIGHT_VERSION
BROWSER_FETCH_PLAYWRIGHT_VERSION = dict(PINNED_BROWSER_FETCH_WORKLOAD.component_versions)['playwright']

Release source · Runtime guarantees · Capability guides

from cayu.tools import BROWSER_FETCH_PROTOCOL_VERSION
BROWSER_FETCH_PROTOCOL_VERSION = PINNED_BROWSER_FETCH_WORKLOAD.protocol_version

Release source · Runtime guarantees · Capability guides

from cayu.tools import BROWSER_FETCH_WORKER_VERSION
BROWSER_FETCH_WORKER_VERSION = PINNED_BROWSER_FETCH_WORKLOAD.worker_version

Release source · Runtime guarantees · Capability guides

from cayu.tools import BrowserWebFetchAdapter

Execute web_fetch through a compatible worker in an admitted runner.

Selection is explicit: construct WebFetchTool(adapter=...). This adapter never imports Playwright in the host process and never falls back to the trusted-process HTTP implementation.

BrowserWebFetchAdapter.__init__(*, worker_command: Sequence[str]=DEFAULT_BROWSER_FETCH_WORKER_COMMAND, max_requests: int=DEFAULT_BROWSER_FETCH_MAX_REQUESTS, max_dom_nodes: int=DEFAULT_BROWSER_FETCH_MAX_DOM_NODES, expected_runner_candidate: str | None=None, expected_environment_authority: ExecutionEnvironmentAuthority | None=None, expected_workload_authority: RunnerWorkloadAuthority | None=None) -> None
async BrowserWebFetchAdapter.fetch(ctx: ToolContext, request: WebFetchAdapterRequest) -> ToolResult

Release source · Runtime guarantees · Capability guides

from cayu.tools import DEFAULT_BROWSER_FETCH_MAX_DOM_NODES
DEFAULT_BROWSER_FETCH_MAX_DOM_NODES = 10000

Release source · Runtime guarantees · Capability guides

from cayu.tools import DEFAULT_BROWSER_FETCH_MAX_REQUESTS
DEFAULT_BROWSER_FETCH_MAX_REQUESTS = 128

Release source · Runtime guarantees · Capability guides

from cayu.tools import DEFAULT_BROWSER_FETCH_WORKER_COMMAND
DEFAULT_BROWSER_FETCH_WORKER_COMMAND = PINNED_BROWSER_FETCH_WORKLOAD.command

Release source · Runtime guarantees · Capability guides

from cayu.tools import MAX_BROWSER_FETCH_MAX_DOM_NODES
MAX_BROWSER_FETCH_MAX_DOM_NODES = 100000

Release source · Runtime guarantees · Capability guides

from cayu.tools import MAX_BROWSER_FETCH_MAX_REQUESTS
MAX_BROWSER_FETCH_MAX_REQUESTS = 512

Release source · Runtime guarantees · Capability guides

from cayu.tools import ScreenshotPageTool

Capture one bounded public HTTPS page as an artifact-backed PNG attachment.

Bases: Tool.

ScreenshotPageTool.__init__(*, worker_command: Sequence[str]=DEFAULT_BROWSER_FETCH_WORKER_COMMAND, max_response_bytes: int=DEFAULT_SCREENSHOT_MAX_RESPONSE_BYTES, timeout_seconds: float=DEFAULT_SCREENSHOT_TIMEOUT_SECONDS, max_redirects: int=DEFAULT_SCREENSHOT_MAX_REDIRECTS, max_requests: int=DEFAULT_BROWSER_FETCH_MAX_REQUESTS, max_screenshot_bytes: int=DEFAULT_SCREENSHOT_MAX_BYTES, viewport_width: int=DEFAULT_SCREENSHOT_VIEWPORT_WIDTH, viewport_height: int=DEFAULT_SCREENSHOT_VIEWPORT_HEIGHT, max_page_width: int=DEFAULT_SCREENSHOT_MAX_PAGE_WIDTH, max_page_height: int=DEFAULT_SCREENSHOT_MAX_PAGE_HEIGHT, max_page_pixels: int=DEFAULT_SCREENSHOT_MAX_PAGE_PIXELS, expected_runner_candidate: str | None=None, expected_environment_authority: ExecutionEnvironmentAuthority | None=None, expected_workload_authority: RunnerWorkloadAuthority | None=None, expected_artifact_store_id: str | None=None, spec: ToolSpec | None=None) -> None
ScreenshotPageTool.name() -> str
ScreenshotPageTool.execution_profile_identity() -> ExecutionProfileBehaviorIdentity | None

Return the stable behavior declaration frozen with this tool’s spec.

ScreenshotPageTool.retain_arguments_for_model() -> bool

Retain bounded redacted original inputs privately for the same profile.

Independent of audit publication; oversized and compacted-away inputs may be omitted. This does not grant knowledge read or activation rights.

ScreenshotPageTool.description() -> str
ScreenshotPageTool.schema() -> dict[str, Any]
async ScreenshotPageTool.run(ctx: ToolContext, args: dict[str, object]) -> ToolResult

Release source · Runtime guarantees · Capability guides