refs #732: expose carrier federation portal scenarios
This commit is contained in:
@@ -5349,6 +5349,8 @@ def _prepare_hmm_hr_tool_query(
|
||||
team=selected_user_team.strip(),
|
||||
scope=selected_user_scope.strip(),
|
||||
)
|
||||
if tool.name == "search_carrier_performance":
|
||||
return contextual_question
|
||||
try:
|
||||
profile = resolve_model_profile(model_profile_key)
|
||||
client = build_oci_genai_completion_client(
|
||||
@@ -5363,7 +5365,9 @@ def _prepare_hmm_hr_tool_query(
|
||||
"or expose/request tokens. Preserve employee codes exactly. "
|
||||
"The HMM HR data tool can query organization, employees, leave balances, "
|
||||
"leave requests, attendance, and standardized HR terms. The policy tool searches "
|
||||
"HR policy PDF abstracts and chunks. A selected demo user only resolves pronouns "
|
||||
"HR policy PDF abstracts and chunks. The carrier federation tool joins ADB "
|
||||
"employee assignments with PostgreSQL carrier KPI data by CARRIER_CODE. "
|
||||
"A selected demo user only resolves pronouns "
|
||||
"such as 'my' or 'our team'; do not claim that it enforces database access control."
|
||||
),
|
||||
user_prompt=json.dumps(
|
||||
|
||||
@@ -36,6 +36,27 @@
|
||||
"category": "근태 현황",
|
||||
"title": "휴가 현황 조회",
|
||||
"question": "이번 달 팀원별 휴가 사용 현황을 보여줘"
|
||||
},
|
||||
{
|
||||
"id": "FED-01",
|
||||
"enabled": true,
|
||||
"category": "선사 실적 Federation",
|
||||
"title": "팀원별 담당 선사 최신 실적",
|
||||
"question": "E1001 팀장의 팀원별 담당 선사와 해당 선사의 최신 매출, 매출총이익, 정시 운항률, 위험 등급을 보여줘"
|
||||
},
|
||||
{
|
||||
"id": "FED-02",
|
||||
"enabled": true,
|
||||
"category": "선사 실적 Federation",
|
||||
"title": "위험 선사와 담당자",
|
||||
"question": "E1001 팀에서 최신 위험 등급이 RED인 선사를 담당하는 직원, 선사명, 매출, 정시 운항률과 클레임 발생률을 보여줘"
|
||||
},
|
||||
{
|
||||
"id": "FED-03",
|
||||
"enabled": true,
|
||||
"category": "선사 실적 Federation",
|
||||
"title": "담당 선사 월별 추이",
|
||||
"question": "E1006 직원이 담당하는 선사의 월별 매출, 운송 물동량, 매출총이익과 위험 등급을 기준월 순서로 보여줘"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
"tool_allowlist": [
|
||||
"search_hr_data",
|
||||
"resolve_hr_term",
|
||||
"search_hr_policy"
|
||||
"search_hr_policy",
|
||||
"search_carrier_performance"
|
||||
],
|
||||
"description": "HMM HR knowledge and data MCP server"
|
||||
"description": "HMM HR knowledge, ADB employee assignment, and RDS carrier performance MCP server"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -87,6 +87,28 @@ class DemoScenarioConfigTest(unittest.TestCase):
|
||||
self.assertGreaterEqual(len(scenarios), 3)
|
||||
self.assertEqual(len(scenarios), len({item.scenario_id for item in scenarios}))
|
||||
self.assertTrue(all(item.question.strip() for item in scenarios))
|
||||
by_id = {item.scenario_id: item for item in scenarios}
|
||||
self.assertEqual(
|
||||
{"FED-01", "FED-02", "FED-03"},
|
||||
{"FED-01", "FED-02", "FED-03"} & set(by_id),
|
||||
)
|
||||
self.assertTrue(
|
||||
all("선사" in by_id[scenario_id].question for scenario_id in (
|
||||
"FED-01", "FED-02", "FED-03"
|
||||
))
|
||||
)
|
||||
|
||||
def test_hmm_mcp_allows_carrier_federation_tool(self) -> None:
|
||||
path = Path(__file__).parents[1] / "config" / "mcp_servers.json"
|
||||
payload = json.loads(path.read_text(encoding="utf-8"))
|
||||
server = next(
|
||||
item for item in payload["servers"] if item["id"] == "hmm_hr_mcp"
|
||||
)
|
||||
|
||||
self.assertIn(
|
||||
"search_carrier_performance",
|
||||
server["tool_allowlist"],
|
||||
)
|
||||
|
||||
def test_hmm_demo_user_presets_reference_runtime_token_only(self) -> None:
|
||||
path = Path(__file__).parents[1] / "config" / "vpd_token_presets.json"
|
||||
|
||||
Reference in New Issue
Block a user