A scriptable Agentix.Provider for deterministic tests — no API key, no network.
Enqueue response specs with script/1; each stream/3 call pops the next one
(FIFO) and records the request. Build specs with Agentix.Test.completion/2.
Process-based and globally named, so drive it from a single test process and run
those tests async: false. Start it with start_supervised!(Agentix.Test.MockProvider)
(or Agentix.Test.install_mock_provider/0).
Summary
Functions
Returns a specification to start this module under a supervisor.
The requests received so far, oldest first.
Clear scripts and recorded requests.
Enqueue one response spec (a map from Agentix.Test.completion/2) or a list of
them, consumed FIFO by stream/3.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec requests() :: [map()]
The requests received so far, oldest first.
@spec reset() :: :ok
Clear scripts and recorded requests.
Enqueue one response spec (a map from Agentix.Test.completion/2) or a list of
them, consumed FIFO by stream/3.
@spec start_link(keyword()) :: Agent.on_start()