Wires Claude Code to a didbot personal data server: hooks, a plugin, and the harness contract they rest on.

feat(plugin): open the daemon's sign-in link in the agent's browser #98

Merged permadeath.com
targeting main
Merged opened by and assigned to permadeath.com
targeting main

When chrome-devtools-mcp's new_page or navigate_page is about to open a server's browser sign-in page (https://<host>/oauth/browser, nothing after the path), the hook reports it in the report's browser_sign_in. When the daemon answers with a one-time link on that same page, the hook writes it into the tool's input with updatedInput, so the model's own tool call never holds it. The answer naming the agent's identity also names the sign-in page, and the hook tells the model to open it; a link is never put in additionalContext. This is the plugin half of browser binding (https://tangled.org/did:plc:swttlkbjvcoln67iievud7b3/issues/166), on the server side merged as https://tangled.org/did:plc:swttlkbjvcoln67iievud7b3/pulls/1096 through https://tangled.org/did:plc:swttlkbjvcoln67iievud7b3/pulls/1100.

navigate_page echoes the URL it was given, so on every chrome-devtools tool's PostToolUse the hook removes the link's ticket and any __Host-didbot_browser cookie value from the output with updatedToolOutput, keeping its shape. The protocol fixtures are refreshed from didbot cc6328a9, and plan/harnesses.md records the measurement on Claude Code 2.1.241. Claude Code's session transcript still keeps the rewritten URL, whose ticket the browser spends as it opens it.

tools/test_hook.py covers the rewrite (each navigating tool, only the exact page, only a ticketed link on that page, the identity naming the page and never a link) and the scrub (an echoed link, a bare ticket, a session cookie in request and response headers, and output with nothing to remove), plus a check for every new fixture.

🤖 Generated with Claude Code

This pull request has no versions submitted yet.