Versions in this module Expand all Collapse all v0 v0.1.3-rc.1 Jul 8, 2026 v0.1.2 Jul 7, 2026 v0.1.1 Jul 7, 2026 v0.1.0 Jul 7, 2026 Changes in this version + const EventEnd + const EventRejected + const EventStart + type Action struct + Goal string + Name string + Scope state.Scope + Trust sandbox.Trust + type Admitter interface + Admit func(ctx context.Context, a Action) error + type AllowAll struct + func (AllowAll) Admit(context.Context, Action) error + type DiscardSink struct + func (DiscardSink) Append(context.Context, Event) error + type Dispatcher struct + func New(opts ...Option) *Dispatcher + func (d *Dispatcher) Govern(ctx context.Context, a Action, work func(context.Context) (Metering, error)) error + type Event struct + Action string + At int64 + Call int64 + Err string + Goal string + Scope state.Scope + Trust string + Type string + type EventSink interface + Append func(ctx context.Context, e Event) error + type Hook interface + After func(ctx context.Context, a Action, m Metering, err error) + Before func(ctx context.Context, a Action) error + type MemorySink struct + func (s *MemorySink) Append(_ context.Context, e Event) error + func (s *MemorySink) Events() []Event + type Metering struct + Cost float64 + Tokens int + type Option func(*Dispatcher) + func WithAdmitter(a Admitter) Option + func WithClock(c clock.Clock) Option + func WithEventSink(s EventSink) Option + func WithHook(h Hook) Option + func WithObservability(o *observe.Observability) Option