|
| 1 | +""" |
| 2 | +Browser Use integration (Predicate plugin). |
| 3 | +
|
| 4 | +This package provides a low-friction integration layer that lets browser-use users |
| 5 | +attach Predicate's deterministic verification (AgentRuntime / PredicateDebugger) |
| 6 | +to existing Browser Use agent loops via lifecycle hooks and optional tools. |
| 7 | +
|
| 8 | +Public surface is intentionally small and may evolve. |
| 9 | +""" |
| 10 | + |
| 11 | +from __future__ import annotations |
| 12 | + |
| 13 | +from typing import TYPE_CHECKING, Any |
| 14 | + |
| 15 | +if TYPE_CHECKING: # pragma: no cover |
| 16 | + from .plugin import ( |
| 17 | + PredicateBrowserUsePlugin, |
| 18 | + PredicateBrowserUsePluginConfig, |
| 19 | + PredicateBrowserUseVerificationError, |
| 20 | + StepCheckSpec, |
| 21 | + ) |
| 22 | + |
| 23 | +__all__ = [ |
| 24 | + "PredicateBrowserUsePlugin", |
| 25 | + "PredicateBrowserUsePluginConfig", |
| 26 | + "PredicateBrowserUseVerificationError", |
| 27 | + "StepCheckSpec", |
| 28 | +] |
| 29 | + |
| 30 | + |
| 31 | +def __getattr__(name: str) -> Any: # pragma: no cover |
| 32 | + if name in __all__: |
| 33 | + from .plugin import ( # local import keeps linting/packaging robust |
| 34 | + PredicateBrowserUsePlugin, |
| 35 | + PredicateBrowserUsePluginConfig, |
| 36 | + PredicateBrowserUseVerificationError, |
| 37 | + StepCheckSpec, |
| 38 | + ) |
| 39 | + |
| 40 | + return { |
| 41 | + "PredicateBrowserUsePlugin": PredicateBrowserUsePlugin, |
| 42 | + "PredicateBrowserUsePluginConfig": PredicateBrowserUsePluginConfig, |
| 43 | + "PredicateBrowserUseVerificationError": PredicateBrowserUseVerificationError, |
| 44 | + "StepCheckSpec": StepCheckSpec, |
| 45 | + }[name] |
| 46 | + raise AttributeError(name) |
| 47 | + |
0 commit comments