← Về thư mục
openai4s/server/guardian_enforce.py
- _DenialCircuit · class · L50-L107 — class _DenialCircuit
- init · method · L64-L68 — def init(self) -> None
- is_open · method · L70-L72 — def is_open(self, key: str) -> bool
- record · method · L74-L101 — def record( self, key: str, *, denied: bool, consecutive_limit: int, window_size: int, window_limit: int, ) -> bool
- reset · method · L103-L107 — def reset(self, key: str) -> None
- circuit · function · L113-L116 — def circuit() -> _DenialCircuit
- _flag · function · L119-L120 — def _flag(value: str) -> bool
- _file_path_argument · function · L156-L177 — def _file_path_argument( tool: str, canonical_arguments: Any, *, target: str, ) -> str | None
- feature_enabled · function · L180-L185 — def feature_enabled(config: Any | None = None) -> bool
- auto_review_requested · function · L188-L221 — def auto_review_requested( config: Any | None = None, approvals_reviewer: str | None = None ) -> bool
- _budget · function · L224-L241 — def _budget(config: Any | None, name: str, fallback: int) -> int
- denial_circuit_open · function · L244-L271 — def denial_circuit_open( history: Sequence[bool], *, config: Any | None = None, ) -> bool
- unattended_file_deny_reason · function · L274-L305 — def unattended_file_deny_reason( *, tool: str, target: str, canonical_arguments: Any = None, resolved_file_path: str | None = None, resolved_file_is_credential: bool = False, ) -> str | None
- decide_unattended · function · L308-L455 — def decide_unattended( payload: Mapping[str, Any], *, canonical_arguments: Any = None, resolved_file_path: str | None = None, resolved_file_is_credential: bool = False, config: Any | None = None, approvals_reviewer: str | None = None, expected_digest: str | None = None, recomputed_digest: str | None = None, hard_deny: bool = False, audit_persisted: bool = False, interactive: bool = False, circuit_key: str | None = None, denial_history: Sequence[bool] | None = None, decision_meta: dict[str, bool] | None = None, ) -> tuple[bool, str] | None
- settle · function · L378-L412 — def settle( allow: bool, message: str, *, structural: bool = False ) -> tuple[bool, str]