Module agentforge4j.llm.fake
Package com.agentforge4j.llm.fake
package com.agentforge4j.llm.fake
-
ClassDescriptionConfiguration for the fake provider.Identity a
FakeLlmClientpasses to aFakeResponseSourcefor one invocation.StatelessLlmClientthat replays pre-scripted responses instead of calling a model.LlmClientFactoryfor the fake provider, discovered viaServiceLoader.Outcome of a singleFakeResponseSource.nextResponse(FakeInvocation)call.A scripted response was found for the invocation's key.A script is registered for the run, but it has no entry for this key (the ordinal counter has already advanced past the miss — acceptable, since a miss is a fail-closed terminal).No script is registered for the invocation's run.A single scripted response: the raw model text the fake provider returns, and optional script-specified token usage.Thrown when the fake provider cannot resolve a scripted response: the request carried no invocation identity, no script is registered for the run, or the run's script has no entry for the resolved key.Supplies scripted responses to aFakeLlmClient.The single per-run store for the fake provider: each run id maps to one entry holding the run'sFakeScriptand its ordinal counters, so registering, deregistering, or evicting a run clears both in one place — there is no separate counter map to keep in sync, and theFakeLlmClientstays stateless.An immutable set of scripted responses for one run, keyed byFakeScriptKey.Intra-script lookup key for a single scripted response.Parses fake-provider script JSON into an immutableFakeScript.Script-specified token usage for one response, mirroringTokenUsageReportexactly: four nullable counts, no total.Counter key for the per-sequence ordinal, held inside the per-run store (never on the client).The read face of aFakeRunLifecycle: resolves responses against scripts explicitly registered per run.AFakeResponseSourcebacked by a single, run-agnosticFakeScript: every run is served the same script.