处理 AHP 握手请求
(self, params: Dict[str, Any])
| 169 | log(f"会话结束。最终统计: {self.stats}") |
| 170 | |
| 171 | def _handle_handshake(self, params: Dict[str, Any]) -> Dict[str, Any]: |
| 172 | """处理 AHP 握手请求""" |
| 173 | log(f"收到握手请求: {params}") |
| 174 | return { |
| 175 | "protocol_version": "2.3", |
| 176 | "harness_info": { |
| 177 | "name": "ahp-agent-monitors-agent", |
| 178 | "version": "1.0.0", |
| 179 | "capabilities": ["pre_action", "post_action"], |
| 180 | }, |
| 181 | } |
| 182 | |
| 183 | def _handle_request(self, event_type: str, payload: Dict[str, Any], depth: int) -> Dict[str, Any]: |
| 184 | """请求需要响应""" |