executor

package
v0.0.0-...-f719e43 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 2 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

Overview

Package executor defines the interfaces for step executors in Axiom skills. Skills implement StepExecutor to provide custom node types.

Index

Constants

View Source
const FileType = "file"

FileType is the input schema type of an action input that takes a file from the chat the action runs in, written {"type": "file"} on a top-level input property. The model passes the file's path; the host hands the skill a File in its place.

View Source
const MaxFileBytes = 100 << 20

MaxFileBytes is the largest file a host hands a skill.

Variables

View Source
var FileClient = &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}

FileClient fetches handed-over files. It never follows redirects; the caller's context bounds how long a transfer may take.

Functions

This section is empty.

Types

type BindingResolver

type BindingResolver interface {
	GetBinding(name string) interface{}
	GetBindings() map[string]interface{}
}

BindingResolver is an optional interface for accessing bindings directly Skills can use this to get connection strings, API keys, etc.

type ContextProvider

type ContextProvider interface {
	GetContextData() map[string]interface{}
}

ContextProvider provides access to execution context data for code execution Executors that need raw context (like code executor) should check if the resolver implements this

type ExecutionGraph

type ExecutionGraph struct {
	Nodes     map[string]*GraphNode
	Edges     []*GraphEdge
	StartNode string
}

ExecutionGraph represents the agent execution graph

func (*ExecutionGraph) GetConnectedTools

func (g *ExecutionGraph) GetConnectedTools(nodeID string) []*GraphNode

GetConnectedTools returns tool nodes connected to a specific node This is used by AI and code executors to discover available tools

type File

type File struct {
	Name      string `json:"name"`
	Path      string `json:"path"`
	MediaType string `json:"mediaType"`
	SizeBytes int64  `json:"sizeBytes"`
	URL       string `json:"url"`
}

File is a chat file a host handed this skill for a file input. Only its description travels in the call; Open streams the bytes from URL, which serves this one file for a short while.

func FileInput

func FileInput(config map[string]interface{}, key string) (File, error)

FileInput is the file a host handed the skill for the file input key.

func (File) Open

func (f File) Open(ctx context.Context) (io.ReadCloser, error)

Open streams the file's bytes. The reader fails rather than return more or fewer than SizeBytes.

type GraphEdge

type GraphEdge struct {
	Id           string
	Source       string
	Target       string
	SourceHandle string
	TargetHandle string
	Label        string
}

GraphEdge represents a connection between nodes

type GraphNode

type GraphNode struct {
	Id        string
	Name      string
	Type      string
	PositionX float64
	PositionY float64
	Config    map[string]interface{}
}

GraphNode represents a node in the execution graph

type GraphProvider

type GraphProvider interface {
	GetGraph() *ExecutionGraph
}

GraphProvider provides access to the execution graph for executors that need it Executors like AI can use this to discover connected tool nodes

type NodePosition

type NodePosition struct {
	X float64
	Y float64
}

NodePosition represents the visual position of a node

type StepDefinition

type StepDefinition struct {
	Id     string                 `json:"id"` // Node ID for graph-aware executors
	Name   string                 `json:"name"`
	Type   string                 `json:"type"`
	Config map[string]interface{} `json:"config"`
}

StepDefinition defines a single step in an agent pipeline

type StepExecutor

type StepExecutor interface {
	// Execute runs the step with the given config and returns the result
	Execute(ctx context.Context, step *StepDefinition, resolver TemplateResolver) (*StepResult, error)

	// Type returns the step type this executor handles
	Type() string
}

StepExecutor defines the interface for executing a single step type Skills must implement this interface for each node type they provide.

type StepResult

type StepResult struct {
	Output   map[string]interface{}
	NextStep string // For branching steps (if, switch) - empty means continue to next
	Error    error
}

StepResult represents the output of a step execution

type StreamCallback

type StreamCallback func(update *StreamUpdate)

StreamCallback is called by streaming executors to emit partial outputs

type StreamUpdate

type StreamUpdate struct {
	Partial  interface{} // The incremental chunk of data
	Progress float64     // 0.0-1.0 progress indicator
}

StreamUpdate represents a partial output from a streaming executor

type StreamingExecutor

type StreamingExecutor interface {
	StepExecutor

	// ExecuteStreaming runs the step and calls the callback for each partial output
	// The final result is still returned via StepResult
	ExecuteStreaming(ctx context.Context, step *StepDefinition, resolver TemplateResolver, onStream StreamCallback) (*StepResult, error)

	// SupportsStreaming returns true if this executor can stream with the given config
	SupportsStreaming(config map[string]interface{}) bool
}

StreamingExecutor is an optional interface for executors that support streaming partial outputs

type TemplateResolver

type TemplateResolver interface {
	ResolveString(template string) string
	ResolveMap(input map[string]interface{}) map[string]interface{}
	EvaluateCondition(condition string) bool
	SetVariable(name string, value interface{})
	GetStepOutput(stepName string) interface{}
	SetStepOutput(stepName string, output interface{})
}

TemplateResolver interface for resolving {{}} templates Provided by Axiom at runtime to skills. See github.com/axiom-studio/skills.sdk/resolver for a standard implementation.

Jump to

Keyboard shortcuts

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