Raised when a freshly-spawned MCP server fails to complete handshake. Carries the path of the per-repo stderr capture so the caller can point a human at it instead of swallowing the diagnosis.
| 47 | |
| 48 | |
| 49 | class McpInitError(RuntimeError): |
| 50 | """Raised when a freshly-spawned MCP server fails to complete handshake. |
| 51 | |
| 52 | Carries the path of the per-repo stderr capture so the caller can point |
| 53 | a human at it instead of swallowing the diagnosis.""" |
| 54 | |
| 55 | def __init__(self, repo: str, stderr_path: Path, hint: str): |
| 56 | super().__init__(f"MCP init failed for {repo}: {hint} (stderr: {stderr_path})") |
| 57 | self.repo = repo |
| 58 | self.stderr_path = stderr_path |
| 59 | self.hint = hint |
| 60 | |
| 61 | |
| 62 | class McpClient: |