ov.operate.strategies

Journey-strategy helpers – intent shaping for the three strategies (§2.3).

The three strategies reuse the same primitives, varying only the intent written to the journal: crawl-and-map (enumerate), goal-pursuit (advance), and guided-replay (replay). These helpers keep that vocabulary in one place and provide the deterministic target-selection a model-free driver needs.

ov.operate.strategies.NAV_ROLES = frozenset({'a', 'link', 'menuitem', 'tab'})

Roles treated as navigable for crawl-and-map.

ov.operate.strategies.absolutize(href: str, base_url: str) str[source]

Resolve href against base_url (drops fragments).

ov.operate.strategies.is_same_origin(url: str, base_url: str) bool[source]

True when url shares scheme+host(+port) with base_url.

>>> is_same_origin("https://x.com/a", "https://x.com/b")
True
>>> is_same_origin("https://y.com/a", "https://x.com/b")
False
ov.operate.strategies.navigable_affordances(observation: Observation) list[Affordance][source]

Return affordances suitable for breadth-first crawl (links/tabs/menuitems).