models.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from __future__ import annotations
  2. from typing import Any, Literal, TypedDict
  3. RunStatus = Literal["running", "success", "blocked", "failed"]
  4. FinalAction = Literal["POOL", "CANDIDATE", "PENDING", "REJECT"]
  5. EffectStatus = Literal["success", "weak_effective", "pending", "blocked", "failed"]
  6. class RunState(TypedDict, total=False):
  7. trace_id: str
  8. platform: str
  9. platform_mode: str
  10. source: str | None
  11. policy_bundle_version: str
  12. current_step: str
  13. status: RunStatus
  14. errors: list[str]
  15. source_context: dict[str, Any]
  16. pattern_seed_pack: dict[str, Any]
  17. queries: list[dict[str, Any]]
  18. platform_results: list[dict[str, Any]]
  19. candidates: list[dict[str, Any]]
  20. media_assets: list[dict[str, Any]]
  21. evidence_bundles: list[dict[str, Any]]
  22. policy_bundle: dict[str, Any]
  23. rule_decisions: list[dict[str, Any]]
  24. walk_actions: list[dict[str, Any]]
  25. source_edge_basis: list[dict[str, Any]]
  26. trace_events: list[dict[str, Any]]
  27. source_edges: list[dict[str, Any]]
  28. search_clues: list[dict[str, Any]]
  29. final_output: dict[str, Any]
  30. strategy_review: dict[str, Any]