Files
X-Financial/server/src/app/services/scenes/scene_expense_application.py

39 lines
1.7 KiB
Python
Raw Normal View History

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="expense_application",
label="费用申请",
assigned_agent="application_assistant",
signal_keywords=(
"申请", "出差", "差旅", "费用", "交通", "住宿", "采购", "会务", "会议",
"客户现场", "项目", "拜访", "调研", "驻场", "上线", "验收",
),
ontology_fields=(), # 沿用全局 BUSINESS_CANONICAL_FIELDS,运行时 fallback
gate=GateRule.MODEL_ONLY,
route=SceneRoute.MODEL_INTENT,
handler=None,
action_steps_builder=None, # 运行时从 StewardActionPlanBuilder 取
can_resume=True,
flow_id="travel_application",
side_effect_actions=("save_application_draft", "submit_application", "run_duplicate_precheck"),
noop_actions=(
"fill_application_fields",
"build_application_preview",
"validate_required_fields",
),
executor=None, # 运行时从 StewardActionExecutor 取
prompt_fragment=(
"用户描述未来出差、差旅计划、去某地几天、部署、支撑、拜访或会议安排时,"
"即使没有出现“申请”两个字,也必须优先识别为 expense_application。"
),
priority=100,
)
)