ov.util#
Internal helpers: content-addressing, hashing, redaction, and requirements.
Nothing here knows about Playwright or analysis specifics – these are the
small, reusable primitives the rest of the package leans on. The most
user-facing item is check_requirements(), which detects missing system
dependencies (Playwright browsers, Node, the sidecar, optional CLIs) and prints
the exact commands to install them, per the spec’s check_requirements
mandate (§9).
Functions
|
Detect missing system dependencies and print exact install commands. |
|
Return a short, stable SHA-256 hex digest for content-addressing. |
|
Return a copy of |
|
Replace a value with a length-tagged placeholder (keeps shape, drops content). |
Return the path to the Node sidecar directory ( |
|
|
Hash an arbitrary JSON-able object deterministically (sorted keys). |
Classes
|
One checked system dependency. |
|
The result of |
- class ov.util.Requirement(name, present, detail='', install_hint='', optional=True)[source]#
Bases:
objectOne checked system dependency.
- class ov.util.RequirementReport(requirements=list())[source]#
Bases:
objectThe result of
check_requirements()– iterable, with a tidy summary.- property missing: list[Requirement]#
Requirements that are absent (optional or not).
- ov.util.check_requirements(*, components=None, verbose=True)[source]#
Detect missing system dependencies and print exact install commands.
componentsfilters which groups to check ("browser","node","sidecar","clis");Nonechecks all. The deterministic analysis core needs none of these – they gate capture and the arch sidecar, so every requirement here is reported as optional unless capture is requested.>>> rep = check_requirements(components=["clis"], verbose=False) >>> isinstance(rep, RequirementReport) True
- Return type:
- ov.util.content_hash(data, *, length=16)[source]#
Return a short, stable SHA-256 hex digest for content-addressing.
>>> content_hash(b"hello") '2cf24dba5fb0a30e' >>> content_hash("hello") == content_hash(b"hello") True
- Return type:
- ov.util.redact_mapping(mapping, *, redact=True)[source]#
Return a copy of
mappingwith values redacted whenredactis true.
- ov.util.redact_value(value)[source]#
Replace a value with a length-tagged placeholder (keeps shape, drops content).
>>> redact_value("super-secret-token") '<redacted:18>' >>> redact_value(None) '<redacted>'
- Return type: