Menu

#95 adapter: guard another agent harness (Aider / OpenAI Codex CLI / Cursor / generic MCP)

closed
nobody
2026-08-18
2026-07-11
Anonymous
No

Originally created by: fu351

Why

Doberman mediates a coding agent's tool calls into allow / authenticate / block decisions — but today only Claude Code has a host adapter (src/doberman/hosthooks/claude_code.py). Every additional harness we support multiplies the project's reach, and the decision engine underneath is already harness-agnostic.

What to do

Pick one harness and add a src/doberman/hosthooks/<harness>.py adapter for it. Good candidates (comment on the issue to claim one so we don't double up):

  • Aider
  • OpenAI Codex CLI
  • Cursor
  • Continue
  • A generic MCP / stdio bridge (guards anything speaking that protocol)

The adapter's job: normalize that harness's tool-call events into a SecurityObject and route them through the existing decision engine — reusing the shared rules, not re-implementing them. Two hard invariants:

  • No path around the engine. Every mediated tool call goes through the chokepoint; there is no bypass.
  • Fail closed. If an event can't be parsed into a SecurityObject, deny/BLOCK — never pass it through unchecked.

hosthooks/claude_code.py is the reference template — it shows the pre/post-tool hook shape, how a decision maps back to allow/deny for the host, and the taint-floor application.

Tests (tests/integration)

  • A representative tool call from the new harness produces the same verdict the engine gives for the equivalent SecurityObject.
  • A BLOCK means the downstream tool never ran (assert the fake tool recorded nothing).

Done when

  • The adapter guards a real round trip for that harness; a BLOCK is provably enforced; tests are green; docs note the newly supported host.

Great for…

…anyone who uses one of these tools daily — you'll be able to run your own agent behind Doberman when you're done.

Related

Tickets: #202

Discussion

  • Anonymous

    Anonymous - 2026-07-30

    Originally posted by: fu351

    Closing this one in favor of [#202] — not a rejection, just a freshness refresh. The scope and intent are unchanged (pick a harness, add a hosthooks-style adapter, route it through the existing decision engine), but the reference material had drifted since this was opened: we're on v0.16.0 now, and there are two existing host adapters to study instead of one (src/doberman/hosthooks/claude_code.py and adapters/openclaw/), so I rewrote the description against current reality rather than editing this thread in place. This discussion stays right here for context — please continue on [#202], where whichever harness you were eyeing is still up for grabs.

     

    Related

    Tickets: #202

  • Anonymous

    Anonymous - 2026-07-30

    Ticket changed by: fu351

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-08-18

    Originally posted by: fu351

    @ofekron Thanks again for weighing in here.

    Quick community roll-call: are you in the Doberman Discord? If yes, drop your handle here (or DM me there) so I can match the GitHub side of your work to your Discord name. If not, you're warmly invited: https://discord.gg/Sfy5XGNqty

     

Log in to post a comment.