Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2026 v1.0.0 Jul 6, 2026 Changes in this version + const SpecActor + const SpecRelationship + const SpecResolver + const SpecResourceOwner + const SpecRole + type Assignee struct + Kind ResolvedKind + Ref string + type AssigneeResolver func(ctx context.Context, in ResolveInput) ([]Assignee, error) + type AssigneeSpec struct + Actor string + Kind string + Rel string + Resolver string + Role string + Scope string + type AutoAction func(ctx context.Context, in AutoInput) (map[string]any, error) + type AutoInput struct + Context map[string]any + InstanceID string + Resource resource.Ref + Step string + type Branch struct + Next string + When *Condition + type Condition struct + Equals any + Key string + type Decision struct + Actor authz.Actor + Comment string + Type DecisionType + type DecisionType string + const DecisionAbstain + const DecisionApprove + const DecisionReject + type Definition struct + AppliesTo string + InitialStep string + Key string + Steps map[string]Step + Version int + func ParseDefinition(raw []byte) (Definition, error) + func (d Definition) Validate(autoActions, resolvers map[string]bool) error + type Electorate struct + Kind string + Of string + Rel string + type Fraction struct + Kind string + Value string + type Instance struct + Context map[string]any + CurrentStep string + DefinitionID uuid.UUID + ID uuid.UUID + Resource resource.Ref + Status string + Version int + type Policy struct + MinApprovals int + SelfApproval *bool + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Err() error + func (r *Registry) RegisterAssigneeResolver(key string, fn AssigneeResolver) + func (r *Registry) RegisterAutoAction(key string, fn AutoAction) + func (r *Registry) RegisterDefinition(def Definition) error + type ResolveInput struct + Context map[string]any + InstanceID string + Resource resource.Ref + Step string + type ResolvedKind string + const KindCapacity + const KindRelationship + const KindRole + const KindSystem + type Runtime struct + func NewRuntime(txm database.TxManager, reg *Registry, ev authz.Evaluator, ob outbox.Writer, ...) *Runtime + func (rt *Runtime) CompleteTask(ctx context.Context, taskID uuid.UUID, output map[string]any) error + func (rt *Runtime) Decide(ctx context.Context, taskID uuid.UUID, d Decision) error + func (rt *Runtime) Delegate(ctx context.Context, taskID, to uuid.UUID, until time.Time) error + func (rt *Runtime) Instance(ctx context.Context, id uuid.UUID) (Instance, error) + func (rt *Runtime) OpenTasksFor(ctx context.Context, a authz.Actor, cur pagination.Request) (pagination.CursorPage[Task], error) + func (rt *Runtime) Override(ctx context.Context, actor authz.Actor, instanceID uuid.UUID, to string, ...) error + func (rt *Runtime) StartIn(ctx context.Context, db database.TenantDB, defKey string, res resource.Ref, ...) (uuid.UUID, error) + func (rt *Runtime) SweepSLA(ctx context.Context, db database.TenantDB, now time.Time) (reminders, escalations int, err error) + type SLA struct + Due string + EscalateTo string + RemindAfter string + type Step struct + Action string + Assignees []AssigneeSpec + Branches []Branch + Electorate *Electorate + Next *Transition + OnApprove *Transition + OnError *Transition + OnReject *Transition + Outcome string + Pass *Fraction + Policy *Policy + Quorum *Fraction + SLA *SLA + Type StepType + Window string + type StepType string + const StepApproval + const StepAuto + const StepGateway + const StepTask + const StepTerminal + const StepVote + type Task struct + DecidedBy *uuid.UUID + DelegatedTo *uuid.UUID + DueAt *time.Time + ID uuid.UUID + InstanceID uuid.UUID + Output map[string]any + RemindAfter *time.Time + Status string + StepKey string + TaskType string + Version int + type Transition struct + Next string + RequireComment bool + Retry string + Then string