states

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// PageStates contains all the states for the Page state-machine.
	PageStates = ssP
	// PageGroups contains all the state groups for the Page state-machine.
	PageGroups = sgP
)
View Source
var (

	// AgentUIStates contains all the states for the AgentUI state-machine.
	AgentUIStates = ssA
	// AgentUIGroups contains all the state groups for the AgentUI state-machine.
	AgentUIGroups = sgA
)
View Source
var AgentUISchema = SchemaMerge(

	PageSchema,
	am.Schema{

		ssA.UIRenderStories: {
			Multi:   true,
			Require: S{ssA.RPCConnected},
		},
		ssA.UIMsg: {
			Multi:   true,
			Require: S{ssA.RPCConnected},
		},
		ssA.UIRenderClock: {
			Multi:   true,
			Require: S{ssA.RPCConnected},
		},
		ssA.UICleanOutput: {
			Multi:   true,
			Require: S{ssA.RPCConnected},
		},

		ssA.RPCConnected:  {},
		ssA.RPCConnecting: {},
	})

AgentUISchema represents all relations and properties of AgentUIStates.

View Source
var Exception = am.StateException

Exception is a type alias for the exception state.

View Source
var PageSchema = SchemaMerge(

	ssam.BasicSchema,

	ssrpc.StateSourceSchema,
	am.Schema{

		ssP.Data:   {Multi: true},
		ssP.Config: {},
		ssP.Ready: {
			Auto:    true,
			Require: S{ssP.RPCConnected, ssP.Config, ssP.Data},
		},

		ssP.RPCConnected:  {},
		ssP.RPCConnecting: {},
	})

PageSchema represents all relations and properties of PageStates.

View Source
var SAdd = am.SAdd

SAdd is a func alias for merging lists of states.

View Source
var SchemaMerge = am.SchemaMerge

SchemaMerge is a func alias for extending an existing state structure.

View Source
var StateAdd = am.StateAdd

StateAdd is a func alias for adding to an existing state definition.

View Source
var StateSet = am.StateSet

StateSet is a func alias for replacing parts of an existing state definition.

Functions

func NewAgentUI

func NewAgentUI(ctx context.Context) *am.Machine

NewAgentUI creates a new AgentUI state-machine in the most basic form.

func NewPage

func NewPage(ctx context.Context) *am.Machine

NewPage creates a new Page state-machine in the most basic form.

Types

type AgentUIGroupsDef

type AgentUIGroupsDef struct {
}

AgentUIGroupsDef contains all the state groups AgentUI state-machine.

type AgentUIStatesDef

type AgentUIStatesDef struct {
	*am.StatesBase

	UIRenderStories string
	UIMsg           string
	UIRenderClock   string
	UICleanOutput   string

	// inherit from PageStatesDef
	*PageStatesDef
}

AgentUIStatesDef contains all the states of the Page state-machine.

type PageGroupsDef

type PageGroupsDef struct {
}

PageGroupsDef contains all the state groups Page state-machine.

type PageStatesDef

type PageStatesDef struct {
	*am.StatesBase

	Data          string
	Config        string
	RPCConnected  string
	RPCConnecting string

	// inherit from BasicStatesDef
	*ssam.BasicStatesDef
	// inherit from rpc/StateSourceStatesDef
	*ssrpc.StateSourceStatesDef
}

PageStatesDef contains all the states of the Page state-machine.

type S

type S = am.S

S is a type alias for a list of state names.

type State

type State = am.State

State is a type alias for a state definition. See am.State.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL