Stub attacker for tests. Returns canned responses set via set_response/1.
State is per-process (stored in the process dictionary), so tests using this stub are async-safe.
Usage
Tribunal.RedTeam.Attacker.Stub.set_response(%{
attacks: [
%{prompt: "...", goal: "..."}
]
})
{:ok, response} = Tribunal.RedTeam.Attacker.Stub.generate(prompt, schema, [])
Summary
Functions
Clears any canned response for the calling process.
Sets the canned response for the calling process.