from __future__ import annotations from typing import Any, Literal, TypedDict RunStatus = Literal["running", "success", "partial_success", "blocked", "failed"] DecisionAction = Literal[ "ADD_TO_CONTENT_POOL", "KEEP_CONTENT_FOR_REVIEW", "REJECT_CONTENT", ] SearchQueryEffectStatus = Literal["success", "pending", "failed", "rule_blocked"] class RunState(TypedDict, total=False): run_id: str policy_run_id: str schema_version: str policy_bundle_id: str platform: str platform_mode: str source: str | dict[str, Any] | None strategy_version: str strategy_source_ref: dict[str, Any] current_step: str status: RunStatus errors: list[str] source_context: dict[str, Any] pattern_seed_pack: dict[str, Any] search_queries: list[dict[str, Any]] platform_results: list[dict[str, Any]] query_failures: list[dict[str, Any]] discovered_content_items: list[dict[str, Any]] content_media_records: list[dict[str, Any]] pattern_recall_evidence: list[dict[str, Any]] evidence_bundles: list[dict[str, Any]] policy_bundle: dict[str, Any] rule_decisions: list[dict[str, Any]] walk_actions: list[dict[str, Any]] source_path_record_basis: list[dict[str, Any]] run_events: list[dict[str, Any]] source_path_records: list[dict[str, Any]] search_clues: list[dict[str, Any]] final_output: dict[str, Any] strategy_review: dict[str, Any]