Documentation
¶
Overview ¶
Package stub is the brain that needs no model: it answers every decision with the same canned proposal, so the harness runs and its specs pass with no inference provider, network or credential at all.
Index ¶
Constants ¶
const ProviderName = "stub"
ProviderName is the Provider every canned proposal carries.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CannedBrain ¶
CannedBrain proposes the same actions, in the same order, for every decision. It is deterministic and immutable after construction, so one value is safe to share between goroutines.
func NewCannedBrain ¶
func NewCannedBrain[Context any, Action any](actions ...Action) *CannedBrain[Context, Action]
NewCannedBrain returns a brain that proposes actions for every decision. With no actions it answers model.ErrNoProposal, which is how a spec drives a consumer's empty-proposal path.
func (*CannedBrain[Context, Action]) Propose ¶
func (brain *CannedBrain[Context, Action]) Propose(ctx context.Context, decision Context) (*model.Proposal[Action], error)
Propose returns a fresh copy of the canned actions. It ignores decision by design: the stub stands in for reasoning, it does not perform any.