Skip to main content

urirun-cdp

The CDP (Chrome DevTools Protocol) browser-surface primitive for urirun, extracted from urirun.connectors.surfaces.cdp as a standalone, dependency-free package.

It speaks raw CDP over a WebSocket to a Chrome DevTools endpoint and exposes the small set of primitives the reversible window-snapshot is built on: reachable, navigate, evaluate, nav-history, scroll/forms round-trip. Pure stdlib — no urirun dependency — so any connector can adopt it without pulling in the backend.

Why it's its own package

extraction_audit.py --preset D reports this surface GREEN (0 OUTWARD, 0 CYCLE; stdlib only). It is consumed by URI, swappable, and reusable across connectors — the textbook case for lifting a capability primitive out of the core. The KVM connector already carries its own deployed copy (urirun_connector_kvm.cdp); this is the canonical reference implementation.

Install

pip install -e .          # editable, from this repo

Back-compat

The old import path still works via a re-export shim in the urirun package:

from urirun.connectors.surfaces import cdp   # → urirun_cdp.cdp (sys.modules shim)

So existing code and the test_kernel_adoption contract test (which guards the symbols the KVM connector relies on) keep working unchanged. That contract test skips gracefully when this package isn't installed (pytestmark = skipif(cdp is None)), matching how the connector packages are tested in their own CI rather than urirun's.

Tests

PYTHONPATH=../urirun/adapters/python python -m pytest tests/ -q

The surface's own tests live here (tests/test_cdp_surface.py); they exercise the protocol + snapshot primitives against a fake in-memory page, no real Chrome required.

License

Apache-2.0 — see LICENSE.

Metadata

Release files for urirun-cdp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urirun-cdp 0.2.0
File Size Uploaded
urirun_cdp-0.2.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for urirun-cdp 0.2.0
File Interpreter ABI Platform
urirun_cdp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / urirun_cdp-0.2.0.tar.gz

Download URL urirun_cdp-0.2.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e02c609f175ad35711f1629407b58dc6d7bf948df250ce831e6c03e473f0ffd
BLAKE2b-256 checksum
How to use checksums
c27ae9ac305b9fc6c08dbbace394fd9cab17cb007e9a07e5300399d50a6a6c78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / urirun_cdp-0.2.0-py3-none-any.whl

Download URL urirun_cdp-0.2.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
360d5d1b76b12e219ef70cae13e3fb2f00704d67b185371e8147b20a6e3e74cb
BLAKE2b-256 checksum
How to use checksums
ca9a13f82d2d4cb39d74d1b485765d257dfd167764048fe06378ceb55cd2e37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page