from typing import Dict, Any, List, Protocol from typing_extensions import runtime_checkable @runtime_checkable class BusinessExpert(Protocol): """业务领域专家接口""" @property def operation_ids(self) -> List[str]: """获取所有operationId的列表""" ... @property def extract_ids_and_descriptions(self) -> Dict[str, str]: """获取所有operationId及其描述的映射""" ... def extract_operation(self, operation_id: str) -> Dict[str, Any]: """提取指定operationId的操作信息和相关schemas Args: operation_id: 要提取的操作ID Returns: Dict包含两部分: - paths: 包含该操作的路径信息 - components: 包含该操作依赖的所有schemas """ ... def list_all_resources(self) -> Dict[str, Any]: """List all resources in the system""" ... # def cleanup(self) -> None: # """cleanup resources""" # ... @property def biz_system_prompt_preprocessor(self) -> str: """general biz logic for preprocess""" ... @property def biz_system_prompt_operation_selector(self) -> str: """general biz logic for operation_selector""" ... @property def biz_system_prompt_request_generator(self) -> str: """general biz logic for request_generator""" ... @property def biz_system_prompt_response_analyzer(self) -> str: """general biz logic for preprocess""" ... @property def biz_system_prompt_target_matcher(self) -> str: """general biz logic for preprocess""" ... # NOTE: maybe add more like: retrieve, learn, candidate_operations, minimum_path, get_resources_types etc.