Documentation
¶
Overview ¶
Package schema contains a stateful schema-v2 for Agent. Bootstrapped with am-gen. Edit manually or re-gen & merge.
Package schema contains a stateful schema-v2 for Tool. Bootstrapped with am-gen. Edit manually or re-gen & merge.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // AgentStates contains all the states for the Agent machine. AgentStates = ssA // AgentGroups contains all the state groups for the Agent machine. AgentGroups = sgA )
var ( // ToolStates contains all the states for the Tool machine. ToolStates = ssT // ToolGroups contains all the state groups for the Tool machine. ToolGroups = sgT )
var AgentSchema = SchemaMerge( ssam.BasicStruct, ssam.DisposedStruct, ssrpc.WorkerStruct, am.Schema{ ssA.Start: {Add: S{ssA.DBStarting}}, ssA.Ready: { Require: S{ssA.Start}, Add: S{ssA.Loop}, }, ssA.Loop: {Require: S{ssA.Ready}}, ssA.InputPending: {Remove: S{ssA.Prompt}}, ssA.Requesting: {}, ssA.RequestingTool: { Multi: true, Add: S{ssA.Requesting}, }, ssA.RequestingLLM: { Multi: true, Add: S{ssA.Requesting}, }, ssA.DBStarting: { Require: S{ssA.Start}, Remove: S{ssA.DBReady}, }, ssA.DBReady: { Require: S{ssA.Start}, Remove: S{ssA.DBStarting}, }, ssA.DBSaving: {Multi: true}, ssA.Prompt: { Require: S{ssA.Start}, Remove: S{ssA.InputPending}, }, ssA.Interrupt: { Add: S{ssA.InputPending}, Remove: S{ssA.Prompt}, }, ssA.UIMode: {}, ssA.UIReady: {Require: S{ssA.UIMode}}, ssA.UIButtonPress: {Require: S{ssA.UIMode}}, ssA.UISaveOutput: {Require: S{ssA.UIMode}}, ssA.UICleanOutput: {Require: S{ssA.UIMode}}, ssA.UIErr: {Require: S{ssA.UIMode}}, })
AgentSchema represents all relations and properties of AgentStates. TODO refac Struct -> Schema
var Exception = am.Exception
Exception is a type alias for the exception state.
var SAdd = am.SAdd
SAdd is a func alias for merging lists of states.
var SchemaMerge = am.SchemaMerge
StructMerge is a func alias for extending an existing state structure.
var StateAdd = am.StateAdd
StateAdd is a func alias for adding to an existing state definition.
var StateSet = am.StateSet
StateSet is a func alias for replacing parts of an existing state definition.
var ToolSchema = SchemaMerge( ssam.BasicStruct, ssam.DisposedStruct, ssrpc.WorkerStruct, am.Schema{ ssT.Working: { Require: S{ssT.Ready}, Remove: S{ssT.Idle}, }, ssT.Idle: { Auto: true, Require: S{ssT.Ready}, Remove: S{ssT.Working}, }, })
ToolSchema represents all relations and properties of ToolStates. TODO
Functions ¶
This section is empty.
Types ¶
type AgentGroupsDef ¶
type AgentGroupsDef struct{}
AgentGroupsDef contains all the state groups Agent state machine.
type AgentStatesDef ¶
type AgentStatesDef struct {
*am.StatesBase
InputPending string
// Agent is currently requesting >=1 tools
RequestingTool string
// Agent is currently requesting >=1 LLMs
RequestingLLM string
// Requesting implies either RequestingTool or RequestingLLM being active
Requesting string
DBStarting string
DBReady string
DBSaving string
// Loop is the main agent loop
Loop string
Prompt string
Interrupt string
UIMode string
UIReady string
UIButtonPress string
UISaveOutput string
UICleanOutput string
UIErr string
// inherit from BasicStatesDef
*ssam.BasicStatesDef
// inherit from DisposedStatesDef
*ssam.DisposedStatesDef
// inherit from WorkerStatesDef
*ssrpc.WorkerStatesDef
}
AgentStatesDef contains all the states of the Agent state machine.
type ToolGroupsDef ¶
type ToolGroupsDef struct {
}
ToolGroupsDef contains all the state groups Tool state machine.
type ToolStatesDef ¶
type ToolStatesDef struct {
*am.StatesBase
Working ToolState
Idle ToolState
// inherit from BasicStatesDef
*ssam.BasicStatesDef
// inherit from DisposedStatesDef
*ssam.DisposedStatesDef
// inherit from WorkerStatesDef
*ssrpc.WorkerStatesDef
}
ToolStatesDef contains all the states of the Tool state machine.