Skip to main content

Meta-package: CDP (Chrome DevTools Protocol) browser-surface primitive for urirun. The `urirun_cdp` import package now ships inside the `urirun` distribution (the single source of truth); this distribution just depends on it so `pip install urirun-cdp` and `import urirun_cdp` keep working.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urirun_cdp-0.2.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urirun_cdp-0.2.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file urirun_cdp-0.2.0.tar.gz.

File metadata

  • Download URL: urirun_cdp-0.2.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for urirun_cdp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4e02c609f175ad35711f1629407b58dc6d7bf948df250ce831e6c03e473f0ffd
MD5 7cd537e366b8f2d5e04303c9a415bc04
BLAKE2b-256 c27ae9ac305b9fc6c08dbbace394fd9cab17cb007e9a07e5300399d50a6a6c78

See more details on using hashes here.

File details

Details for the file urirun_cdp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: urirun_cdp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for urirun_cdp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 360d5d1b76b12e219ef70cae13e3fb2f00704d67b185371e8147b20a6e3e74cb
MD5 90f6977ba15050258decf210726525c5
BLAKE2b-256 ca9a13f82d2d4cb39d74d1b485765d257dfd167764048fe06378ceb55cd2e37d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page