- All Known Implementing Classes:
RegistryFakeResponseSource,StaticFakeResponseSource
public interface FakeResponseSource
Supplies scripted responses to a
FakeLlmClient. The implementation owns all per-run mutable state: it
atomically advances the ordinal counter for the invocation's (runId, workflowId, stepId, agentId) sequence,
looks up the resulting FakeScriptKey, and is responsible for per-run isolation and counter lifecycle
(eviction). The client is stateless and never computes ordinals.-
Method Summary
Modifier and TypeMethodDescriptionnextResponse(FakeInvocation invocation) Atomically advances the per-sequence ordinal for this invocation and resolves the response.
-
Method Details
-
nextResponse
Atomically advances the per-sequence ordinal for this invocation and resolves the response. Implementations must keep counters isolated perFakeInvocation.runId()so concurrent runs never interleave. When no script is available for the run, no counter is advanced andFakeResolution.RunNotScriptedis returned.- Parameters:
invocation- the invocation identity (run, workflow, step, agent); nevernull- Returns:
- the resolution: a found response, a missing key, or an unscripted run
-