from __future__ import annotations from dataclasses import dataclass, field @dataclass class HookMapping: match_path: str match_source: str = "*" default_agent_id: int = 1 allowed_agent_ids: list[int] = field(default_factory=list) default_session_key: str = "main" allow_request_session_key: bool = False allowed_session_key_prefixes: list[str] = field(default_factory=list) session_key_strategy: str = "main" channel: str = "last" deliver: bool = True max_body_bytes: int = 256 * 1024 secret: str | None = None @dataclass class HooksConfig: mappings: list[HookMapping] = field(default_factory=list)