c1a5ef9dd7
- Remove token auth entirely; only Ed25519 pubkey auth or --no-auth - Add 32 MB message-size cap in serve and client (DoS protection) - Set Unix socket to 0o600 after bind in native_host (multi-user hardening) - Enforce browser-cli/VERSION user-agent on all TCP connections - Add PROTOCOL_MIN_CLIENT check (>= 0.9.0) server- and client-side - Include server_version + min_client_version in challenge frame - Add browser_cli/version_manager.py: parse_version, get_installed_version - Add browser_cli/compat.py: Stripe-style versioning layer with adapt_request / adapt_response hooks; baseline 0.9.2, no shims needed yet - Fix BrowserCLI key handling: no Path() wrap for agent specs - Fix _multi_browser_targets() to forward key to remote_browser_targets() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
384 B
Python
18 lines
384 B
Python
from importlib.metadata import version as _pkg_version
|
|
|
|
PROTOCOL_MIN_CLIENT = "0.9.0"
|
|
|
|
|
|
def parse_version(v: str) -> tuple[int, ...]:
|
|
try:
|
|
return tuple(int(x) for x in v.lstrip("v").split("."))
|
|
except ValueError:
|
|
return (0,)
|
|
|
|
|
|
def get_installed_version() -> str:
|
|
try:
|
|
return _pkg_version("browser-cli")
|
|
except Exception:
|
|
return "0.0.0"
|