Documentation
¶
Overview ¶
Package mock provides a deterministic in-memory agent bridge for tests and for running agent-bearing models in CI without an LLM.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge answers agent decisions from a static routing table. It records every invocation so a test can assert on what the graph asked.
type Option ¶
type Option func(*Bridge)
Option configures a Bridge.
func WithAnswer ¶
WithAnswer routes a decision (by ID or name) to a fixed value.
func WithFallback ¶
WithFallback answers any decision no other rule matched.
func WithHandler ¶
func WithHandler(match func(agent.Request) bool, fn func(agent.Request) (agent.Response, error)) Option
WithHandler registers a predicate-driven handler, consulted in registration order after the fixed answers.
func WithLatency ¶
WithLatency makes every invocation take at least d, so failure-policy tests can drive the engine's latency budget without a real network.