particle-academy/prism-harness
A testing harness for Laravel's Prism AI package. Fake model responses, record and replay AI interactions, and assert prompts, tool calls, and outputs in your test suite without hitting real APIs or burning tokens.
send, sendStructured, stream, and approve/deny/decide continuations on the capped path.reserving() and settled().RunContext::root(..., observer: $observer) or configuring prism-harness.cost_observer as a container-resolved class.budget_observer_uncapped); you expect the harness to meter observer behavior (the observer is trusted host code); or you need out-of-box persistence rather than host-owned ledger storage.CallCostObserver with reserving() and settled(); throwing from reserving() refuses the call before any provider request, and settled() provides exact charged amounts for completed, failed, and abandoned-stream calls. Inject through RunContext or config. Key caveats: capped runs only, host owns persistence and stale-reservation expiry, and the observer is trusted host code.How can I help you explore Laravel packages today?