MCPcopy Create free account
hub / github.com/AI45Lab/Code / _handle_handshake

Method _handle_handshake

examples/ahp_agent_monitors_agent.py:171–181  ·  view source on GitHub ↗

处理 AHP 握手请求

(self, params: Dict[str, Any])

Source from the content-addressed store, hash-verified

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 """请求需要响应"""

Callers 1

dispatchMethod · 0.95

Calls 1

logFunction · 0.70

Tested by

no test coverage detected