| 12345678910111213141516171819202122 |
- from __future__ import annotations
- from typing import Any
- from content_agent.business_modules.rule_judgment.evaluator import decide
- from content_agent.interfaces import RuntimeFileStore
- def run(
- run_id: str,
- policy_run_id: str,
- evidence_bundles: list[dict[str, Any]],
- policy_bundle: dict[str, Any],
- runtime: RuntimeFileStore,
- start_index: int = 1,
- ) -> list[dict[str, Any]]:
- decisions = [
- decide(run_id, policy_run_id, start_index + index, bundle, policy_bundle)
- for index, bundle in enumerate(evidence_bundles)
- ]
- runtime.append_jsonl(run_id, "rule_decisions.jsonl", decisions)
- return decisions
|