Versions in this module Expand all Collapse all v0 v0.16.2 Jul 16, 2026 v0.16.1 Jul 14, 2026 v0.16.0 Jul 13, 2026 v0.15.0 Jul 10, 2026 v0.14.1 Jul 7, 2026 Changes in this version type Command + MutatesGraph bool type Engine + Graphs Graphs + type Graphs interface + Current func() (*model.Graph, error) + Invalidate func() + type StaticGraphs struct + Graph *model.Graph + func (s StaticGraphs) Current() (*model.Graph, error) + func (s StaticGraphs) Invalidate() v0.14.0 Jul 6, 2026 Changes in this version + const EndAbandoned + const EndCompleted + const LogVersion + func ComposeInstructions(unitText string, diagnostics []string) string + func IsEndTarget(to string) bool + type BaseType string + const TypeAttachmentHandle + const TypeBool + const TypeConfidence + const TypeEntryID + const TypeEntryKind + const TypeIntent + const TypeLabel + const TypeLayer + const TypeParticipant + const TypePreflightFindings + const TypeRef + const TypeText + type ChooserKind string + const ChooserAgent + const ChooserGate + const ChooserUser + type ChooserOption struct + Choice string + Collect []CollectField + type ChooserServe struct + Chooser string + Kind ChooserKind + Options []ChooserOption + type CollectField struct + Name string + Optional bool + type Command struct + Doc FuncDoc + Fn CommandFunc + type CommandFunc func(ctx *Context) error + type Context struct + Graph *model.Graph + Reads map[string]ReadDepth + Step string + Store *Store + type Dispatch struct + Procedure string + Seed map[string]string + type Engine struct + Graph *model.Graph + Registry *Registry + func New(registry *Registry, graph *model.Graph) *Engine + func (e *Engine) NewSession(id, participant string, sink EventSink, opts ...SessionOption) *Session + func (e *Engine) ReplaySession(id, participant string, events []Event, resolve SpecResolver, sink EventSink, ...) (*Session, error) + type Event struct + Data map[string]any + Event EventType + Instance string + Seq int + Session string + TS time.Time + V int + func ReadEvents(r io.Reader) ([]Event, error) + type EventSink interface + Append func(Event) error + type EventType string + const EventAbandoned + const EventChooserAnswer + const EventCompleted + const EventLabeled + const EventOpResult + const EventParked + const EventRead + const EventReport + const EventServed + const EventSessionMeta + const EventStarted + const EventTransition + type ExportedValue struct + Provenance Provenance + Value any + type FailedPredicate struct + Message string + Name string + type FuncClass string + const ClassCommand + const ClassPredicate + const ClassQuery + type FuncDoc struct + Class FuncClass + Doc string + Name string + Reads []string + Writes []string + type GuardExpr struct + func ParseGuard(src string) (*GuardExpr, error) + func (g *GuardExpr) Eval(eval func(name string) (bool, error)) (bool, error) + func (g *GuardExpr) Predicates() []string + func (g *GuardExpr) String() string + type InjectCall struct + Args map[string]any + Fn string + type Instance struct + ID string + Outcome string + Parent string + Spec *Spec + Status InstanceStatus + Step string + Store *Store + type InstanceStatus string + const StatusAbandoned + const StatusCompleted + const StatusRunning + type Option struct + Call string + Choice string + Collect []CollectField + Dispatch *Dispatch + To string + type Predicate struct + Doc FuncDoc + FailDetail func(ctx *Context) string + FailMessage string + Fn PredicateFunc + type PredicateFunc func(ctx *Context) (bool, error) + type Provenance string + const ProvenanceEngine + const ProvenanceParam + const ProvenanceState + type Query struct + Doc FuncDoc + Fn QueryFunc + type QueryFunc func(ctx *Context, args map[string]any) (any, error) + type ReadDepth string + const ReadFull + const ReadSummary + type Ref struct + Desc string + ID string + Kind string + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Command(name string) (*Command, bool) + func (r *Registry) Docs(class FuncClass) []FuncDoc + func (r *Registry) Predicate(name string) (*Predicate, bool) + func (r *Registry) Query(name string) (*Query, bool) + func (r *Registry) RegisterCommand(c Command) error + func (r *Registry) RegisterPredicate(p Predicate) error + func (r *Registry) RegisterQuery(q Query) error + type Serve struct + Chooser *ChooserServe + Diagnostics []string + Failing []FailedPredicate + Goal string + Instance string + Instructions string + Missing []string + Outcome string + Procedure string + Produced map[string]any + ReportSchema map[string]any + Status InstanceStatus + Step string + Unit string + UnitText string + type Session struct + ID string + Label string + Participant string + func (s *Session) Abandon(instanceID, reason string) error + func (s *Session) Answer(instanceID, chooser, choice string, fields map[string]any, userWords string) (*Serve, error) + func (s *Session) Instance(id string) (*Instance, bool) + func (s *Session) Instances() []*Instance + func (s *Session) LogRead(tool string, full, summary []string) + func (s *Session) Park(instanceID, note string) error + func (s *Session) ReadDepthOf(id string) ReadDepth + func (s *Session) Report(instanceID string, fields map[string]any) (*Serve, error) + func (s *Session) Serve(instanceID string) (*Serve, error) + func (s *Session) SetLabel(label string) + func (s *Session) Start(spec *Spec, params map[string]any, parent string) (*Serve, error) + type SessionOption func(*Session) + func WithClock(now func() time.Time) SessionOption + type Spec struct + Canonical string + Class model.ProcedureClass + EntryID string + Params map[string]VarDecl + State map[string]VarDecl + StepByID map[string]*Step + Steps []*Step + Units map[string]string + func LoadSpec(entry *model.Entry, reg *Registry) (*Spec, error) + func ParseSpec(entry *model.Entry) (*Spec, error) + func (s *Spec) AnswerSchemaForStep(step *Step) map[string]any + func (s *Spec) ReportSchemaForStep(step *Step) map[string]any + func (s *Spec) Validate(reg *Registry) []string + type SpecResolver func(canonical string) (*Spec, error) + type Step struct + Chooser ChooserKind + Collect []CollectField + Goal string + Guard *GuardExpr + ID string + Inject []InjectCall + Op string + Options []Option + Render string + Transitions []Transition + type Store struct + func NewStore(spec *Spec) *Store + func (s *Store) Export() map[string]ExportedValue + func (s *Store) Get(name string) (any, bool) + func (s *Store) Has(name string) bool + func (s *Store) SetParams(params map[string]any) error + func (s *Store) SetStart(inputs map[string]any) error + func (s *Store) StateSnapshot() string + func (s *Store) TemplateContext() map[string]any + func (s *Store) WriteEngine(name string, v any) + func (s *Store) WriteState(fields map[string]any) ([]string, error) + type Transition struct + Otherwise bool + To string + When *GuardExpr + type VarDecl struct + Desc string + Optional bool + Type VarType + type VarType struct + Base BaseType + List bool + func ParseVarType(s string) (VarType, error) + func (t VarType) String() string + func (t VarType) ValidateValue(v any) (any, error) + type WriterSink struct + func NewWriterSink(w io.Writer) *WriterSink + func (s *WriterSink) Append(e Event) error