action

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelContactStore

type ChannelContactStore interface {
	GetByID(ctx context.Context, id string) (*models.ChannelContact, error)
}

type ChannelEditAction

type ChannelEditAction struct {
	Channels ChannelStore
	Contacts ChannelContactStore
	Sender   ChannelMessageSender
}

func (*ChannelEditAction) Execute

func (e *ChannelEditAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ChannelEditAction) Validate

func (e *ChannelEditAction) Validate(config json.RawMessage) error

type ChannelMessageSender

type ChannelMessageSender interface {
	SendMessage(ctx context.Context, channel *models.Channel, chatID string, text string) (map[string]any, error)
	ReplyMessage(ctx context.Context, channel *models.Channel, chatID string, replyToMessageID string, text string) (map[string]any, error)
	EditMessage(ctx context.Context, channel *models.Channel, chatID string, messageID string, text string) (map[string]any, error)
}

type ChannelReplyAction

type ChannelReplyAction struct {
	Channels ChannelStore
	Contacts ChannelContactStore
	Sender   ChannelMessageSender
}

func (*ChannelReplyAction) Execute

func (e *ChannelReplyAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ChannelReplyAction) Validate

func (e *ChannelReplyAction) Validate(config json.RawMessage) error

type ChannelReplyWaiter

type ChannelReplyWaiter interface {
	WaitForReply(ctx context.Context, channelID string, contactID string, chatID string, sentMessageID string, timeout time.Duration) (map[string]any, error)
}

type ChannelSendAction

type ChannelSendAction struct {
	Channels ChannelStore
	Contacts ChannelContactStore
	Sender   ChannelMessageSender
}

func (*ChannelSendAction) Execute

func (e *ChannelSendAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ChannelSendAction) Validate

func (e *ChannelSendAction) Validate(config json.RawMessage) error

type ChannelSendAndWaitAction

type ChannelSendAndWaitAction struct {
	Channels ChannelStore
	Contacts ChannelContactStore
	Sender   ChannelMessageSender
	Waiter   ChannelReplyWaiter
}

func (*ChannelSendAndWaitAction) Execute

func (e *ChannelSendAndWaitAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ChannelSendAndWaitAction) Validate

func (e *ChannelSendAndWaitAction) Validate(config json.RawMessage) error

type ChannelSendAndWaitToolNode

type ChannelSendAndWaitToolNode struct {
	Channels ChannelStore
	Contacts ChannelContactStore
	Sender   ChannelMessageSender
	Waiter   ChannelReplyWaiter
}

func (*ChannelSendAndWaitToolNode) Execute

func (e *ChannelSendAndWaitToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ChannelSendAndWaitToolNode) ExecuteTool

func (e *ChannelSendAndWaitToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*ChannelSendAndWaitToolNode) ToolDefinition

func (*ChannelSendAndWaitToolNode) Validate

func (e *ChannelSendAndWaitToolNode) Validate(config json.RawMessage) error

type ChannelStore

type ChannelStore interface {
	GetByID(ctx context.Context, id string) (*models.Channel, error)
}

type ClusterStore

type ClusterStore interface {
	GetByID(ctx context.Context, id string) (*models.Cluster, error)
}

type GetPipelineAction

type GetPipelineAction struct {
	Pipelines PipelineCatalog
}

func (*GetPipelineAction) Execute

func (e *GetPipelineAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*GetPipelineAction) Validate

func (e *GetPipelineAction) Validate(config json.RawMessage) error

type HTTPAction

type HTTPAction struct{}

func (*HTTPAction) Execute

func (e *HTTPAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*HTTPAction) Validate

func (e *HTTPAction) Validate(config json.RawMessage) error

type HTTPToolNode

type HTTPToolNode struct{}

func (*HTTPToolNode) Execute

func (e *HTTPToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*HTTPToolNode) ExecuteTool

func (e *HTTPToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*HTTPToolNode) ToolDefinition

func (e *HTTPToolNode) ToolDefinition(_ context.Context, meta node.ToolNodeMetadata, config json.RawMessage) (*llm.ToolDefinition, error)

func (*HTTPToolNode) Validate

func (e *HTTPToolNode) Validate(config json.RawMessage) error

type KubernetesActionNode

type KubernetesActionNode struct {
	// contains filtered or unexported fields
}

func NewKubernetesActionNode

func NewKubernetesActionNode(clusters KubernetesClusterStore, operation KubernetesOperation) *KubernetesActionNode

func (*KubernetesActionNode) Execute

func (e *KubernetesActionNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*KubernetesActionNode) Validate

func (e *KubernetesActionNode) Validate(config json.RawMessage) error

type KubernetesClusterStore

type KubernetesClusterStore interface {
	GetByID(ctx context.Context, id string) (*models.KubernetesCluster, error)
}

type KubernetesOperation

type KubernetesOperation string
const (
	KubernetesOperationAPIResources   KubernetesOperation = "api_resources"
	KubernetesOperationListResources  KubernetesOperation = "list_resources"
	KubernetesOperationGetResource    KubernetesOperation = "get_resource"
	KubernetesOperationApplyManifest  KubernetesOperation = "apply_manifest"
	KubernetesOperationPatchResource  KubernetesOperation = "patch_resource"
	KubernetesOperationDeleteResource KubernetesOperation = "delete_resource"
	KubernetesOperationScaleResource  KubernetesOperation = "scale_resource"
	KubernetesOperationRolloutRestart KubernetesOperation = "rollout_restart"
	KubernetesOperationRolloutStatus  KubernetesOperation = "rollout_status"
	KubernetesOperationPodLogs        KubernetesOperation = "pod_logs"
	KubernetesOperationPodExec        KubernetesOperation = "pod_exec"
	KubernetesOperationEvents         KubernetesOperation = "events"
)

type KubernetesToolNode

type KubernetesToolNode struct {
	// contains filtered or unexported fields
}

func NewKubernetesToolNode

func NewKubernetesToolNode(clusters KubernetesClusterStore, operation KubernetesOperation) *KubernetesToolNode

func (*KubernetesToolNode) Execute

func (e *KubernetesToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*KubernetesToolNode) ExecuteTool

func (e *KubernetesToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*KubernetesToolNode) ToolDefinition

func (e *KubernetesToolNode) ToolDefinition(ctx context.Context, meta node.ToolNodeMetadata, config json.RawMessage) (*llm.ToolDefinition, error)

func (*KubernetesToolNode) Validate

func (e *KubernetesToolNode) Validate(config json.RawMessage) error

type ListNodesAction

type ListNodesAction struct {
	Clusters ClusterStore
}

func (*ListNodesAction) Execute

func (e *ListNodesAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ListNodesAction) Validate

func (e *ListNodesAction) Validate(config json.RawMessage) error

type ListNodesToolNode

type ListNodesToolNode struct {
	Clusters ClusterStore
}

func (*ListNodesToolNode) Execute

func (e *ListNodesToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ListNodesToolNode) ExecuteTool

func (e *ListNodesToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, _ json.RawMessage, input map[string]any) (any, error)

func (*ListNodesToolNode) ToolDefinition

func (*ListNodesToolNode) Validate

func (e *ListNodesToolNode) Validate(config json.RawMessage) error

type ListVMsCTsAction

type ListVMsCTsAction struct {
	Clusters ClusterStore
}

func (*ListVMsCTsAction) Execute

func (e *ListVMsCTsAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ListVMsCTsAction) Validate

func (e *ListVMsCTsAction) Validate(config json.RawMessage) error

type ListVMsCTsToolNode

type ListVMsCTsToolNode struct {
	Clusters ClusterStore
}

func (*ListVMsCTsToolNode) Execute

func (e *ListVMsCTsToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ListVMsCTsToolNode) ExecuteTool

func (e *ListVMsCTsToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*ListVMsCTsToolNode) ToolDefinition

func (*ListVMsCTsToolNode) Validate

func (e *ListVMsCTsToolNode) Validate(config json.RawMessage) error

type PipelineCatalog

type PipelineCatalog interface {
	List(ctx context.Context) ([]models.Pipeline, error)
	GetByID(ctx context.Context, id string) (*models.Pipeline, error)
}

type PipelineCreateToolNode

type PipelineCreateToolNode struct {
	Manager PipelineMutationManager
}

func (*PipelineCreateToolNode) Execute

func (e *PipelineCreateToolNode) Execute(ctx context.Context, config json.RawMessage, _ map[string]any) (*node.NodeResult, error)

func (*PipelineCreateToolNode) ExecuteTool

func (e *PipelineCreateToolNode) ExecuteTool(ctx context.Context, _ json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineCreateToolNode) ToolDefinition

func (*PipelineCreateToolNode) Validate

func (e *PipelineCreateToolNode) Validate(config json.RawMessage) error

type PipelineDeleteToolNode

type PipelineDeleteToolNode struct {
	Manager PipelineMutationManager
}

func (*PipelineDeleteToolNode) Execute

func (e *PipelineDeleteToolNode) Execute(ctx context.Context, config json.RawMessage, _ map[string]any) (*node.NodeResult, error)

func (*PipelineDeleteToolNode) ExecuteTool

func (e *PipelineDeleteToolNode) ExecuteTool(ctx context.Context, _ json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineDeleteToolNode) ToolDefinition

func (*PipelineDeleteToolNode) Validate

func (e *PipelineDeleteToolNode) Validate(config json.RawMessage) error

type PipelineGetToolNode

type PipelineGetToolNode struct {
	Pipelines PipelineCatalog
}

func (*PipelineGetToolNode) Execute

func (e *PipelineGetToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*PipelineGetToolNode) ExecuteTool

func (e *PipelineGetToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineGetToolNode) ToolDefinition

func (*PipelineGetToolNode) Validate

func (e *PipelineGetToolNode) Validate(config json.RawMessage) error

type PipelineListToolNode

type PipelineListToolNode struct {
	Pipelines PipelineCatalog
}

func (*PipelineListToolNode) Execute

func (*PipelineListToolNode) ExecuteTool

func (e *PipelineListToolNode) ExecuteTool(ctx context.Context, _ json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineListToolNode) ToolDefinition

func (*PipelineListToolNode) Validate

func (e *PipelineListToolNode) Validate(config json.RawMessage) error

type PipelineMutationManager

type PipelineMutationManager interface {
	Create(ctx context.Context, pipeline *models.Pipeline) error
	Update(ctx context.Context, pipeline *models.Pipeline) error
	Delete(ctx context.Context, ref pipelineops.Reference) (*models.Pipeline, error)
	Resolve(ctx context.Context, ref pipelineops.Reference) (*models.Pipeline, error)
}

type PipelineRunToolNode

type PipelineRunToolNode struct {
	Pipelines PipelineCatalog
	Runner    PipelineRunner
}

func (*PipelineRunToolNode) Execute

func (e *PipelineRunToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*PipelineRunToolNode) ExecuteTool

func (e *PipelineRunToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineRunToolNode) ToolDefinition

func (*PipelineRunToolNode) Validate

func (e *PipelineRunToolNode) Validate(config json.RawMessage) error

type PipelineRunner

type PipelineRunner interface {
	Run(ctx context.Context, pipelineID string, input map[string]any) (*pipeline.RunResult, error)
}

type PipelineUpdateToolNode

type PipelineUpdateToolNode struct {
	Manager PipelineMutationManager
}

func (*PipelineUpdateToolNode) Execute

func (e *PipelineUpdateToolNode) Execute(ctx context.Context, config json.RawMessage, _ map[string]any) (*node.NodeResult, error)

func (*PipelineUpdateToolNode) ExecuteTool

func (e *PipelineUpdateToolNode) ExecuteTool(ctx context.Context, _ json.RawMessage, args json.RawMessage, _ map[string]any) (any, error)

func (*PipelineUpdateToolNode) ToolDefinition

func (*PipelineUpdateToolNode) Validate

func (e *PipelineUpdateToolNode) Validate(config json.RawMessage) error

type RunPipelineAction

type RunPipelineAction struct {
	Runner PipelineRunner
}

func (*RunPipelineAction) Execute

func (e *RunPipelineAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*RunPipelineAction) Validate

func (e *RunPipelineAction) Validate(config json.RawMessage) error

type ShellCommandAction

type ShellCommandAction struct {
	Runner shellcmd.Runner
}

func (*ShellCommandAction) Execute

func (e *ShellCommandAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ShellCommandAction) Validate

func (e *ShellCommandAction) Validate(config json.RawMessage) error

type ShellCommandToolNode

type ShellCommandToolNode struct {
	Runner shellcmd.Runner
}

func (*ShellCommandToolNode) Execute

func (e *ShellCommandToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*ShellCommandToolNode) ExecuteTool

func (e *ShellCommandToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*ShellCommandToolNode) ToolDefinition

func (*ShellCommandToolNode) Validate

func (e *ShellCommandToolNode) Validate(config json.RawMessage) error

type VMCloneAction

type VMCloneAction struct {
	Clusters ClusterStore
}

func (*VMCloneAction) Execute

func (e *VMCloneAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMCloneAction) Validate

func (e *VMCloneAction) Validate(config json.RawMessage) error

type VMCloneToolNode

type VMCloneToolNode struct {
	Clusters ClusterStore
}

func (*VMCloneToolNode) Execute

func (e *VMCloneToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMCloneToolNode) ExecuteTool

func (e *VMCloneToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*VMCloneToolNode) ToolDefinition

func (e *VMCloneToolNode) ToolDefinition(_ context.Context, meta node.ToolNodeMetadata, config json.RawMessage) (*llm.ToolDefinition, error)

func (*VMCloneToolNode) Validate

func (e *VMCloneToolNode) Validate(config json.RawMessage) error

type VMStartAction

type VMStartAction struct {
	Clusters ClusterStore
}

func (*VMStartAction) Execute

func (e *VMStartAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMStartAction) Validate

func (e *VMStartAction) Validate(config json.RawMessage) error

type VMStartToolNode

type VMStartToolNode struct {
	Clusters ClusterStore
}

func (*VMStartToolNode) Execute

func (e *VMStartToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMStartToolNode) ExecuteTool

func (e *VMStartToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*VMStartToolNode) ToolDefinition

func (e *VMStartToolNode) ToolDefinition(_ context.Context, meta node.ToolNodeMetadata, config json.RawMessage) (*llm.ToolDefinition, error)

func (*VMStartToolNode) Validate

func (e *VMStartToolNode) Validate(config json.RawMessage) error

type VMStopAction

type VMStopAction struct {
	Clusters ClusterStore
}

func (*VMStopAction) Execute

func (e *VMStopAction) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMStopAction) Validate

func (e *VMStopAction) Validate(config json.RawMessage) error

type VMStopToolNode

type VMStopToolNode struct {
	Clusters ClusterStore
}

func (*VMStopToolNode) Execute

func (e *VMStopToolNode) Execute(ctx context.Context, config json.RawMessage, input map[string]any) (*node.NodeResult, error)

func (*VMStopToolNode) ExecuteTool

func (e *VMStopToolNode) ExecuteTool(ctx context.Context, config json.RawMessage, args json.RawMessage, input map[string]any) (any, error)

func (*VMStopToolNode) ToolDefinition

func (e *VMStopToolNode) ToolDefinition(_ context.Context, meta node.ToolNodeMetadata, config json.RawMessage) (*llm.ToolDefinition, error)

func (*VMStopToolNode) Validate

func (e *VMStopToolNode) Validate(config json.RawMessage) error

Jump to

Keyboard shortcuts

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