Skip to content

cayu.tools.webbridge

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 DEFAULT_WEBBRIDGE_BROWSER_IMAGE
DEFAULT_WEBBRIDGE_BROWSER_IMAGE = PINNED_BROWSER_FETCH_WORKLOAD.image

Release source · Runtime guarantees · Capability guides

DEFAULT_WEBBRIDGE_INTERACTIVE_BROWSER_IMAGE

Section titled “DEFAULT_WEBBRIDGE_INTERACTIVE_BROWSER_IMAGE”
from cayu.tools import DEFAULT_WEBBRIDGE_INTERACTIVE_BROWSER_IMAGE
DEFAULT_WEBBRIDGE_INTERACTIVE_BROWSER_IMAGE = PINNED_BROWSER_SESSION_WORKLOAD.image

Release source · Runtime guarantees · Capability guides

from cayu.tools import WebBridge

A validated set of ordinary Cayu web tools for one explicit profile.

Decorators: @dataclass(frozen=True, slots=True).

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
kind WebBridgeProfileKind required
tools tuple[Any, ...] required
execution_requirements ExecutionRequirements required
execution_location str required
credential_path str required
workspace_requirement str required
credential_authority WebBridgeCredentialAuthority | None None
environment_authority ExecutionEnvironmentAuthority | None None
artifact_store_id str | None None
browser_protocol str | None None
browser_worker_version str | None None
playwright_version str | None None
WebBridge.trusted_local(*, fetch_options: dict[str, Any] | None=None) -> WebBridge

Build credentialless host-process web_fetch.

The host process owns DNS and network access. This profile deliberately makes no sandbox or brokered-egress claim.

WebBridge.hosted(*, adapter: object, search_options: dict[str, Any] | None=None, fetch_options: dict[str, Any] | None=None, execution_profile_identity: ExecutionProfileBehaviorIdentity | None=None) -> WebBridge

Build the capabilities implemented by one explicit hosted adapter.

WebBridge.sandboxed_browser(*, environment: Environment | EnvironmentFactory, browser_image: str, fetch_options: dict[str, Any] | None=None, screenshot_options: dict[str, Any] | None=None, interactive: bool=False, interactive_options: dict[str, Any] | None=None, browser_profile: BrowserProfileBinding | None=None) -> WebBridge

Build browser tools for a static or factory-backed environment.

WebBridge.register_agent(app: CayuApp, spec: AgentSpec, *, environment_name: str | None=None) -> AgentSpec

Validate this bridge against an app environment, then register its agent.

WebBridge.routed(*, routes: tuple[WebBridgeRoute, ...], policy: WebAccessRoutePolicy) -> WebBridge

Build one explicit, finite, durable web_fetch route policy.

Each route must be an already validated WebBridgeRoute. The aggregate does not merge or widen any route’s runner, destination, or credential authority; the active route executes with the same invocation context and application grants it would receive directly.

Release source · Runtime guarantees · Capability guides

from cayu.tools import WebBridgeCredentialAuthority

Secret-reference authority declared by one hosted web adapter.

This object contains references only. Constructing a bridge never resolves credential values or moves them into a tool schema or model context.

Decorators: @dataclass(frozen=True, slots=True).

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
provider str required
origin str required
secret_refs tuple[SecretRef, ...] required

Release source · Runtime guarantees · Capability guides

from cayu.tools import WebBridgeCredentialAuthorityProvider

Hosted adapter contract used for side-effect-free credential binding.

Decorators: @runtime_checkable.

Bases: Protocol.

WebBridgeCredentialAuthorityProvider.webbridge_credential_authority() -> WebBridgeCredentialAuthority

Release source · Runtime guarantees · Capability guides

from cayu.tools import WebBridgeProfileKind

The application-selected execution and credential boundary.

Bases: StrEnum.

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
TRUSTED_LOCAL class attribute 'trusted_local'
HOSTED_PROVIDER class attribute 'hosted_provider'
SANDBOXED_BROWSER class attribute 'sandboxed_browser'
ROUTED class attribute 'routed'

Release source · Runtime guarantees · Capability guides