← Về thư mục
openai4s/diagnostics.py
- _v_number · function · L123-L128 — def _v_number(value: Any) -> Any
- _v_bool · function · L131-L132 — def _v_bool(value: Any) -> Any
- _exact_str · function · L135-L149 — def _exact_str(value: Any) -> bool
- _v_enum · function · L152-L167 — def _v_enum(allowed: frozenset) -> Any
- check · function · L162-L165 — def check(value: Any) -> Any
- _v_lower_enum · function · L170-L180 — def _v_lower_enum(allowed: frozenset) -> Any
- check · function · L173-L178 — def check(value: Any) -> Any: #
value.lower() is the value's own method; call it only after the # exact-type check has established there is no override.
- _v_identity · function · L183-L195 — def _v_identity(value: Any) -> Any
- _v_type_name · function · L198-L206 — def _v_type_name(value: Any) -> Any
- _v_detail · function · L209-L215 — def _v_detail(value: Any) -> Any
- _v_version · function · L218-L236 — def _v_version(value: Any) -> Any
- _stable_repr · function · L336-L349 — def _stable_repr(value: Any) -> str
- _archive_field · function · L352-L359 — def _archive_field(key: str, value: Any) -> Any
- _archive_structured · function · L362-L373 — def _archive_structured(record: Mapping[str, Any]) -> dict
- _classify_plain · function · L376-L380 — def _classify_plain(line: str) -> str
- _archive_plain · function · L383-L409 — def _archive_plain(lines: list[str]) -> list[str]
- _safe_error_type · function · L412-L416 — def _safe_error_type(exc: BaseException) -> str
- _safe_read_tail · function · L419-L462 — def _safe_read_tail(path: Path, limit: int = 512 * 1024) -> str
- _archive_to_schema · function · L528-L559 — def _archive_to_schema(value: Any, schema: Any) -> tuple[Any, int]
- archive_safe · function · L562-L565 — def archive_safe(report: Mapping[str, Any]) -> dict
- environment_report · function · L568-L576 — def environment_report() -> dict
- _version · function · L579-L585 — def _version() -> str
- _probe_failure · function · L588-L592 — def _probe_failure(exc: BaseException) -> dict
- passive_security_posture · function · L595-L618 — def passive_security_posture(cfg: Any) -> dict
- security_posture · function · L621-L690 — def security_posture(cfg: Any) -> dict
- rotate_log · function · L693-L718 — def rotate_log( path: Path, *, max_bytes: int = LOG_MAX_BYTES, keep: int = LOG_KEEP ) -> bool
- BundleTooLarge · class · L721-L722 — class BundleTooLarge(Exception)
- _CappedIO · class · L725-L766 — class _CappedIO
- init · method · L728-L731 — def init(self, fh: BinaryIO, limit: int) -> None
- write · method · L733-L738 — def write(self, data: bytes) -> int: # noqa: D401 - file-like
- seek · method · L740-L741 — def seek(self, offset: int, whence: int = 0) -> int
- tell · method · L743-L744 — def tell(self) -> int
- flush · method · L746-L747 — def flush(self) -> None
- close · method · L749-L750 — def close(self) -> None
- readable · method · L752-L753 — def readable(self) -> bool
- writable · method · L755-L756 — def writable(self) -> bool
- seekable · method · L758-L759 — def seekable(self) -> bool
- read · method · L761-L762 — def read(self, n: int = -1) -> bytes
- name · method · L765-L766 — def name(self) -> str
- _populate_bundle · function · L769-L808 — def _populate_bundle(cfg: Any, bundle: zipfile.ZipFile) -> dict[str, Any]
- _harden · function · L811-L817 — def _harden(path: Path) -> None
- build_bundle · function · L820-L831 — def build_bundle(cfg: Any, destination: Path) -> dict
- write_bundle_file · function · L834-L849 — def write_bundle_file( cfg: Any, path: Path, *, max_bytes: int = BUNDLE_MAX_BYTES ) -> dict