interfaces.py 883 B

1234567891011121314151617181920212223
  1. from __future__ import annotations
  2. from pathlib import Path
  3. from typing import Any, Protocol
  4. class RuntimeFileStore(Protocol):
  5. def prepare_run(self, trace_id: str) -> Path: ...
  6. def run_dir(self, trace_id: str) -> Path: ...
  7. def write_json(self, trace_id: str, filename: str, data: dict[str, Any]) -> Path: ...
  8. def append_jsonl(self, trace_id: str, filename: str, rows: list[dict[str, Any]]) -> Path: ...
  9. def read_json(self, trace_id: str, filename: str) -> dict[str, Any]: ...
  10. def read_jsonl(self, trace_id: str, filename: str) -> list[dict[str, Any]]: ...
  11. def file_status(self, trace_id: str) -> dict[str, bool]: ...
  12. class PlatformSearchClient(Protocol):
  13. def search(self, query: dict[str, Any]) -> list[dict[str, Any]]: ...
  14. class PolicyBundleStore(Protocol):
  15. def load_policy_bundle(self, policy_bundle_version: str) -> dict[str, Any]: ...