(self, verb, payload)
| 109 | return result |
| 110 | |
| 111 | def hook(self, verb, payload): |
| 112 | result = self.run("agent", "hooks", "claude-code", verb, "--foreground", |
| 113 | payload=encoded(payload)) |
| 114 | if result.stderr: |
| 115 | raise RuntimeError(result.stderr.decode(errors="replace")) |
| 116 | return result |
| 117 | |
| 118 | def rpc(self, request): |
| 119 | # Match the owner's versioned JSON frame and one connection per RPC. |