from __future__ import annotations

from app.services.scenes.gate_rules import GateRule, SceneRoute
from app.services.scenes.scene_descriptor import SceneDescriptor
from app.services.scenes.scene_registry import register_scene


def register() -> None:
    register_scene(
        SceneDescriptor(
            scene_id="query_travel_standard",
            label="差旅标准查询",
            assigned_agent="policy_query_assistant",
            signal_keywords=(
                "差旅标准", "住宿标准", "出差标准", "交通标准", "出差补助",
                "差旅补贴", "住宿补助", "交通补助", "职级标准", "差标",
            ),
            ontology_fields=(
                "location",
                "employee_grade",
                "standard_category",
                "expense_type",
            ),
            gate=GateRule.CHOICE,
            route=SceneRoute.HANDLER_ONLY,
            handler=None,  # 运行时从 steward_query_executors 取
            action_steps_builder=None,  # 运行时从 steward_query_executors 取
            can_resume=False,
            flow_id=None,
            side_effect_actions=("execute_travel_standard_query",),
            noop_actions=(),
            executor=None,  # 运行时从 steward_query_executors 取
            prompt_fragment=(
                "用户询问差旅住宿标准、交通标准、出差补助或差旅补贴标准时,"
                "必须识别为 query_travel_standard,而不是 expense_application 或 reimbursement。"
                "差旅标准查询不创建任何单据,只返回标准数值。"
            ),
            priority=50,  # 比 MODEL_ONLY 场景优先,确保查询类先被规则命中
        )
    )
