builtin

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0 Imports: 75 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

Overview

Package builtin provides the standard set of built-in nodes for PiWorker.

Package builtin provides the standard set of built-in nodes for PiWorker.

Index

Constants

View Source
const (
	// MaxExprBytes caps an expression's length.
	MaxExprBytes = 16 << 10
	// MaxExprNesting caps how deeply brackets ( [ { nest in an expression.
	MaxExprNesting = 256
)

Bounds on an expression's source, checked by compileExpr before expr parses it (docs/design/mcp.md §10). expr's parser recurses once per bracket with no depth limit, and parentheses create no AST node, so MaxNodes never stops "((((…1…))))": a 510 KB expression (what fits in an agent's flow) grew a goroutine stack to 512 MiB and overflowed the 250 MB stack limit of 32-bit builds, a fatal error no recover catches.

View Source
const (
	// DefaultExprMaxNodes caps the compiled AST size to reject absurdly complex
	// expressions at compile time.
	DefaultExprMaxNodes uint = 100000
	// DefaultExprTimeout bounds how long a single evaluation may run.
	DefaultExprTimeout = 5 * time.Second
)

Limits for sandboxed expression evaluation.

View Source
const DefaultMaxResponseBytes int64 = 10 << 20 // 10 MiB

DefaultMaxResponseBytes caps how much of an HTTP response body is read, so a hostile or runaway endpoint can't OOM a memory-constrained device.

Variables

View Source
var ErrBlockedAddress = errors.New("blocked connection to non-public address")

ErrBlockedAddress is the guarded client's refusal of a non-public address (newGuardedHTTPClient): errors.Is finds it in a request's error, so a node can tell it from a network failure (it is never transient).

Functions

func AggregateProcessInfo

func AggregateProcessInfo() node.NodeTypeInfo

AggregateProcessInfo returns the node type info for registration.

func CommandActionInfo

func CommandActionInfo() node.NodeTypeInfo

CommandActionInfo returns the node type info for registration.

func CronTriggerInfo

func CronTriggerInfo() node.NodeTypeInfo

CronTriggerInfo returns the node type info for registration.

func DS18B20TriggerInfo

func DS18B20TriggerInfo() node.NodeTypeInfo

DS18B20TriggerInfo returns the node type info for registration.

func DatabaseActionInfo

func DatabaseActionInfo() node.NodeTypeInfo

DatabaseActionInfo returns the node type info for registration.

func DebugProcessInfo

func DebugProcessInfo() node.NodeTypeInfo

DebugProcessInfo returns the node type info for registration.

func DelayProcessInfo

func DelayProcessInfo() node.NodeTypeInfo

DelayProcessInfo returns the node type info for registration.

func EmailActionInfo

func EmailActionInfo() node.NodeTypeInfo

EmailActionInfo returns the node type info for registration.

func FileActionInfo

func FileActionInfo() node.NodeTypeInfo

FileActionInfo returns the node type info for registration.

func FilterProcessInfo

func FilterProcessInfo() node.NodeTypeInfo

FilterProcessInfo returns the node type info for registration.

func GPIOActionInfo

func GPIOActionInfo() node.NodeTypeInfo

GPIOActionInfo returns the node type info for registration.

func GPIOTriggerInfo

func GPIOTriggerInfo() node.NodeTypeInfo

GPIOTriggerInfo returns the node type info for registration.

func GetVarProcessInfo

func GetVarProcessInfo() node.NodeTypeInfo

GetVarProcessInfo returns the node type info for registration.

func HTTPActionInfo

func HTTPActionInfo() node.NodeTypeInfo

HTTPActionInfo returns the node type info for registration.

func I2CActionInfo

func I2CActionInfo() node.NodeTypeInfo

I2CActionInfo returns the node type info for registration.

func IntervalTriggerInfo

func IntervalTriggerInfo() node.NodeTypeInfo

IntervalTriggerInfo returns the node type info for registration.

func JoinProcessInfo

func JoinProcessInfo() node.NodeTypeInfo

JoinProcessInfo returns the node type info for registration.

func KnowledgeAddActionInfo

func KnowledgeAddActionInfo() node.NodeTypeInfo

KnowledgeAddActionInfo returns the node type info for registration.

func KnowledgeSearchProcessInfo

func KnowledgeSearchProcessInfo() node.NodeTypeInfo

KnowledgeSearchProcessInfo returns the node type info for registration.

func LLMAgentProcessInfo

func LLMAgentProcessInfo() node.NodeTypeInfo

LLMAgentProcessInfo returns the node type info for registration.

func LLMClassifyProcessInfo

func LLMClassifyProcessInfo() node.NodeTypeInfo

LLMClassifyProcessInfo returns the node type info for registration.

func LLMForgetActionInfo

func LLMForgetActionInfo() node.NodeTypeInfo

LLMForgetActionInfo returns the node type info for registration.

func LLMProcessInfo

func LLMProcessInfo() node.NodeTypeInfo

LLMProcessInfo returns the node type info for registration.

func LogActionInfo

func LogActionInfo() node.NodeTypeInfo

LogActionInfo returns the node type info for registration.

func ManualTriggerInfo

func ManualTriggerInfo() node.NodeTypeInfo

ManualTriggerInfo returns the node type info for registration.

func MqttActionInfo

func MqttActionInfo() node.NodeTypeInfo

MqttActionInfo returns the node type info for registration.

func MqttTriggerInfo

func MqttTriggerInfo() node.NodeTypeInfo

MqttTriggerInfo returns the node type info for registration.

func NewAggregateProcess

func NewAggregateProcess(config map[string]interface{}) (node.Node, error)

NewAggregateProcess creates an AggregateProcess from configuration.

func NewCommandAction

func NewCommandAction(config map[string]interface{}) (node.Node, error)

NewCommandAction creates a new CommandAction with the given configuration.

func NewCronTrigger

func NewCronTrigger(config map[string]interface{}) (node.Node, error)

NewCronTrigger creates a new CronTrigger with the given configuration.

func NewDS18B20Trigger

func NewDS18B20Trigger(config map[string]interface{}) (node.Node, error)

NewDS18B20Trigger creates a DS18B20Trigger from configuration.

func NewDatabaseAction

func NewDatabaseAction(config map[string]interface{}) (node.Node, error)

NewDatabaseAction creates a DatabaseAction from configuration.

func NewDebugProcess

func NewDebugProcess(config map[string]interface{}) (node.Node, error)

NewDebugProcess creates a new DebugProcess with the given configuration.

func NewDelayProcess

func NewDelayProcess(config map[string]interface{}) (node.Node, error)

NewDelayProcess creates a new DelayProcess with the given configuration.

func NewEmailAction

func NewEmailAction(config map[string]interface{}) (node.Node, error)

NewEmailAction creates a new EmailAction from configuration.

func NewFileAction

func NewFileAction(config map[string]interface{}) (node.Node, error)

NewFileAction creates a new FileAction from configuration.

func NewFilterProcess

func NewFilterProcess(config map[string]interface{}) (node.Node, error)

NewFilterProcess creates a new FilterProcess from configuration.

func NewGPIOAction

func NewGPIOAction(config map[string]interface{}) (node.Node, error)

NewGPIOAction creates a GPIOAction from configuration.

func NewGPIOTrigger

func NewGPIOTrigger(config map[string]interface{}) (node.Node, error)

NewGPIOTrigger creates a GPIOTrigger from configuration.

func NewGetVarProcess

func NewGetVarProcess(config map[string]interface{}) (node.Node, error)

NewGetVarProcess creates a new GetVarProcess from configuration.

func NewHTTPAction

func NewHTTPAction(config map[string]interface{}) (node.Node, error)

NewHTTPAction creates a new HTTPAction with the given configuration.

func NewI2CAction

func NewI2CAction(config map[string]interface{}) (node.Node, error)

NewI2CAction creates an I2CAction from configuration.

func NewIntervalTrigger

func NewIntervalTrigger(config map[string]interface{}) (node.Node, error)

NewIntervalTrigger creates a new IntervalTrigger with the given configuration.

func NewJoinProcess

func NewJoinProcess(config map[string]interface{}) (node.Node, error)

NewJoinProcess creates a JoinProcess from configuration.

func NewKnowledgeAddAction

func NewKnowledgeAddAction(config map[string]interface{}) (node.Node, error)

NewKnowledgeAddAction creates a KnowledgeAddAction from configuration.

func NewKnowledgeSearchProcess

func NewKnowledgeSearchProcess(config map[string]interface{}) (node.Node, error)

NewKnowledgeSearchProcess creates a KnowledgeSearchProcess from configuration.

func NewLLMAgentProcess

func NewLLMAgentProcess(config map[string]interface{}) (node.Node, error)

NewLLMAgentProcess creates an LLMAgentProcess from configuration.

func NewLLMClassifyProcess

func NewLLMClassifyProcess(config map[string]interface{}) (node.Node, error)

NewLLMClassifyProcess creates an LLMClassifyProcess from configuration.

func NewLLMForgetAction

func NewLLMForgetAction(config map[string]interface{}) (node.Node, error)

NewLLMForgetAction creates an LLMForgetAction from configuration.

func NewLLMProcess

func NewLLMProcess(config map[string]interface{}) (node.Node, error)

NewLLMProcess creates an LLMProcess from configuration.

func NewLogAction

func NewLogAction(config map[string]interface{}) (node.Node, error)

NewLogAction creates a new LogAction with the given configuration.

func NewManualTrigger

func NewManualTrigger(config map[string]interface{}) (node.Node, error)

NewManualTrigger creates a new ManualTrigger with the given configuration.

func NewMqttAction

func NewMqttAction(config map[string]interface{}) (node.Node, error)

NewMqttAction creates an MqttAction from configuration.

func NewMqttTrigger

func NewMqttTrigger(config map[string]interface{}) (node.Node, error)

NewMqttTrigger creates an MqttTrigger from configuration.

func NewNotifyAction

func NewNotifyAction(config map[string]interface{}) (node.Node, error)

NewNotifyAction creates a new NotifyAction from configuration.

func NewParseProcess

func NewParseProcess(config map[string]interface{}) (node.Node, error)

NewParseProcess creates a ParseProcess from configuration.

func NewRSSTrigger

func NewRSSTrigger(config map[string]interface{}) (node.Node, error)

NewRSSTrigger creates an RSSTrigger from configuration.

func NewRateLimitProcess

func NewRateLimitProcess(config map[string]interface{}) (node.Node, error)

NewRateLimitProcess creates a RateLimitProcess from configuration.

func NewReplyAction

func NewReplyAction(config map[string]interface{}) (node.Node, error)

NewReplyAction creates an action-reply node.

func NewSetVarProcess

func NewSetVarProcess(config map[string]interface{}) (node.Node, error)

NewSetVarProcess creates a new SetVarProcess from configuration.

func NewSunTrigger

func NewSunTrigger(config map[string]interface{}) (node.Node, error)

NewSunTrigger creates a SunTrigger from configuration.

func NewSwitchProcess

func NewSwitchProcess(config map[string]interface{}) (node.Node, error)

NewSwitchProcess creates a new SwitchProcess from configuration.

func NewSysMetricTrigger

func NewSysMetricTrigger(config map[string]interface{}) (node.Node, error)

NewSysMetricTrigger creates a new SysMetricTrigger from configuration.

func NewTelegramAction

func NewTelegramAction(config map[string]interface{}) (node.Node, error)

NewTelegramAction creates a new TelegramAction from configuration.

func NewTemplateProcess

func NewTemplateProcess(config map[string]interface{}) (node.Node, error)

NewTemplateProcess creates a new TemplateProcess from configuration.

func NewTimerNode

func NewTimerNode(config map[string]interface{}) (node.Node, error)

NewTimerNode creates a TimerNode from configuration.

func NewToolTrigger

func NewToolTrigger(config map[string]interface{}) (node.Node, error)

NewToolTrigger creates a trigger-tool from its configuration, refusing an invalid one with every problem listed.

func NewTranscribeProcess

func NewTranscribeProcess(config map[string]interface{}) (node.Node, error)

NewTranscribeProcess creates a TranscribeProcess from configuration.

func NewTransformProcess

func NewTransformProcess(config map[string]interface{}) (node.Node, error)

NewTransformProcess creates a new TransformProcess with the given configuration.

func NewWebhookTrigger

func NewWebhookTrigger(config map[string]interface{}) (node.Node, error)

NewWebhookTrigger creates a new WebhookTrigger from configuration.

func NewZigbeeAction

func NewZigbeeAction(config map[string]interface{}) (node.Node, error)

NewZigbeeAction creates a ZigbeeAction from configuration.

func NewZigbeeGet

func NewZigbeeGet(config map[string]interface{}) (node.Node, error)

NewZigbeeGet creates a ZigbeeGet from configuration.

func NewZigbeeTrigger

func NewZigbeeTrigger(config map[string]interface{}) (node.Node, error)

NewZigbeeTrigger creates a ZigbeeTrigger from configuration.

func NotifyActionInfo

func NotifyActionInfo() node.NodeTypeInfo

NotifyActionInfo returns the node type info for registration.

func ParseProcessInfo

func ParseProcessInfo() node.NodeTypeInfo

ParseProcessInfo returns the node type info for registration.

func RSSTriggerInfo

func RSSTriggerInfo() node.NodeTypeInfo

RSSTriggerInfo returns the node type info for registration.

func RateLimitProcessInfo

func RateLimitProcessInfo() node.NodeTypeInfo

RateLimitProcessInfo returns the node type info for registration.

func ReplyActionInfo

func ReplyActionInfo() node.NodeTypeInfo

ReplyActionInfo returns the node type info for registration.

func SetVarProcessInfo

func SetVarProcessInfo() node.NodeTypeInfo

SetVarProcessInfo returns the node type info for registration.

func SunTriggerInfo

func SunTriggerInfo() node.NodeTypeInfo

SunTriggerInfo returns the node type info for registration.

func SwitchProcessInfo

func SwitchProcessInfo() node.NodeTypeInfo

SwitchProcessInfo returns the node type info for registration.

func SysMetricTriggerInfo

func SysMetricTriggerInfo() node.NodeTypeInfo

SysMetricTriggerInfo returns the node type info for registration.

func TelegramActionInfo

func TelegramActionInfo() node.NodeTypeInfo

TelegramActionInfo returns the node type info for registration.

func TemplateProcessInfo

func TemplateProcessInfo() node.NodeTypeInfo

TemplateProcessInfo returns the node type info for registration.

func TimerNodeInfo

func TimerNodeInfo() node.NodeTypeInfo

TimerNodeInfo returns the node type info for registration.

func ToolTriggerInfo

func ToolTriggerInfo() node.NodeTypeInfo

ToolTriggerInfo returns the node type info for registration.

func TranscribeProcessInfo

func TranscribeProcessInfo() node.NodeTypeInfo

TranscribeProcessInfo returns the node type info for registration.

func TransformProcessInfo

func TransformProcessInfo() node.NodeTypeInfo

TransformProcessInfo returns the node type info for registration.

func WebhookTriggerInfo

func WebhookTriggerInfo() node.NodeTypeInfo

WebhookTriggerInfo returns the node type info for registration.

func ZigbeeActionInfo

func ZigbeeActionInfo() node.NodeTypeInfo

ZigbeeActionInfo returns the node type info for registration.

func ZigbeeGetInfo

func ZigbeeGetInfo() node.NodeTypeInfo

ZigbeeGetInfo returns the node type info for registration.

func ZigbeeTriggerInfo

func ZigbeeTriggerInfo() node.NodeTypeInfo

ZigbeeTriggerInfo returns the node type info for registration.

Types

type AggregateProcess

type AggregateProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

AggregateProcess batches input payloads and emits them as a single array message once `count` have accumulated. Because a processing node can only emit by returning from Process, batching is count-based (not time-windowed).

func (*AggregateProcess) GetConfigSchema

func (p *AggregateProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*AggregateProcess) Ports

func (p *AggregateProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*AggregateProcess) Process

func (p *AggregateProcess) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process buffers the payload and emits the batch once it is full.

func (*AggregateProcess) Validate

func (p *AggregateProcess) Validate() error

Validate checks the configuration.

type BlockedAddressError

type BlockedAddressError struct {
	IP net.IP
}

BlockedAddressError is the guarded client's refusal to connect to IP, a non-public address; it is ErrBlockedAddress. Its message names the allowPrivate setting of the HTTP Request node; a node without that setting words its own (with IP).

func (*BlockedAddressError) Error

func (e *BlockedAddressError) Error() string

func (*BlockedAddressError) Is

func (e *BlockedAddressError) Is(target error) bool

Is makes errors.Is(err, ErrBlockedAddress) true.

type CommandAction

type CommandAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

CommandAction executes shell commands.

func (*CommandAction) GetConfigSchema

func (a *CommandAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*CommandAction) Ports

func (a *CommandAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*CommandAction) Process

func (a *CommandAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process executes the command and returns the output.

func (*CommandAction) Validate

func (a *CommandAction) Validate() error

Validate checks if the configuration is valid.

type CronTrigger

type CronTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

CronTrigger fires messages based on a cron schedule.

func (*CronTrigger) GetConfigSchema

func (t *CronTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*CronTrigger) Ports

func (t *CronTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*CronTrigger) Process

func (t *CronTrigger) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process is not used for trigger nodes but must be implemented.

func (*CronTrigger) Start

func (t *CronTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start begins the cron trigger.

func (*CronTrigger) Stop

func (t *CronTrigger) Stop() error

Stop stops the cron trigger.

func (*CronTrigger) Validate

func (t *CronTrigger) Validate() error

Validate checks if the cron expression is valid.

type DS18B20Trigger

type DS18B20Trigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

DS18B20Trigger polls a 1-Wire DS18B20 temperature sensor and emits readings. It reads /sys/bus/w1/devices/<id>/w1_slave directly (no extra dependency), the same sysfs approach as trigger-sysmetric.

func (*DS18B20Trigger) GetConfigSchema

func (t *DS18B20Trigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*DS18B20Trigger) Ports

func (t *DS18B20Trigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*DS18B20Trigger) Process

Process is unused for trigger nodes.

func (*DS18B20Trigger) Start

func (t *DS18B20Trigger) Start(ctx context.Context, out chan<- *types.Message) error

Start begins polling the sensor. A missing sensor or 1-Wire bus does not fail Start: at boot the w1 driver may not have enumerated the device yet, so with auto-discovery the device is looked for again on every poll.

func (*DS18B20Trigger) Stop

func (t *DS18B20Trigger) Stop() error

Stop stops polling.

func (*DS18B20Trigger) Validate

func (t *DS18B20Trigger) Validate() error

Validate checks the configuration.

type DatabaseAction

type DatabaseAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

DatabaseAction runs a SQL query (returning rows) or statement (returning affected-row counts) against SQLite, Postgres or MySQL.

func (*DatabaseAction) Close

func (a *DatabaseAction) Close() error

Close releases this node's reference to the shared pool. It is idempotent.

func (*DatabaseAction) GetConfigSchema

func (a *DatabaseAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*DatabaseAction) Ports

func (a *DatabaseAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*DatabaseAction) Process

func (a *DatabaseAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process executes the query/statement and returns rows or affected counts.

func (*DatabaseAction) RequiredSecrets

func (a *DatabaseAction) RequiredSecrets() map[string][]string

RequiredSecrets: the DSN's secrets.

func (*DatabaseAction) Validate

func (a *DatabaseAction) Validate() error

Validate checks the configuration.

type DebugProcess

type DebugProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

DebugProcess inspects and logs messages passing through the flow. It's useful for debugging and understanding message content.

func (*DebugProcess) GetConfigSchema

func (p *DebugProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*DebugProcess) Ports

func (p *DebugProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*DebugProcess) Process

func (p *DebugProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process inspects and logs the message, optionally passing it through. In a sandbox (a dry-run or node test, node.InSandbox) nothing is logged: what a sandboxed flow carries never reaches the process log.

func (*DebugProcess) Validate

func (p *DebugProcess) Validate() error

Validate checks if the configuration is valid.

type DelayProcess

type DelayProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

DelayProcess delays messages by a configured amount of time.

func (*DelayProcess) GetConfigSchema

func (p *DelayProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*DelayProcess) Ports

func (p *DelayProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*DelayProcess) Process

func (p *DelayProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process delays the message before passing it through.

func (*DelayProcess) Validate

func (p *DelayProcess) Validate() error

Validate checks if the configuration is valid.

type EmailAction

type EmailAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

EmailAction sends an email via SMTP (implicit TLS on 465, STARTTLS otherwise).

func (*EmailAction) GetConfigSchema

func (a *EmailAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*EmailAction) Ports

func (a *EmailAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*EmailAction) Process

func (a *EmailAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the subject/body and sends the email.

func (*EmailAction) SecretReferences

func (a *EmailAction) SecretReferences() map[string][]string

SecretReferences: the SMTP username's and password's secrets.

func (*EmailAction) Validate

func (a *EmailAction) Validate() error

Validate checks the configuration.

type FileAction

type FileAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

FileAction writes the (templated) message content to a file.

func (*FileAction) GetConfigSchema

func (a *FileAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*FileAction) Ports

func (a *FileAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*FileAction) Process

func (a *FileAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the content template and writes it to the file.

func (*FileAction) Validate

func (a *FileAction) Validate() error

Validate checks the configuration.

type FilterProcess

type FilterProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

FilterProcess passes a message through only when its condition is truthy, dropping it otherwise.

func (*FilterProcess) GetConfigSchema

func (p *FilterProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*FilterProcess) Ports

func (p *FilterProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*FilterProcess) Process

func (p *FilterProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process evaluates the condition and forwards the message only if it is true.

func (*FilterProcess) Validate

func (p *FilterProcess) Validate() error

Validate checks the configuration.

type GPIOAction

type GPIOAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

GPIOAction drives a GPIO output pin high or low, either to a fixed level or from the message payload's truthiness.

func (*GPIOAction) GetConfigSchema

func (a *GPIOAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*GPIOAction) Ports

func (a *GPIOAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*GPIOAction) Process

func (a *GPIOAction) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process sets the pin level.

func (*GPIOAction) Validate

func (a *GPIOAction) Validate() error

Validate checks the configuration.

type GPIOTrigger

type GPIOTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

GPIOTrigger emits a message when an input pin changes level (edge).

func (*GPIOTrigger) GetConfigSchema

func (t *GPIOTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*GPIOTrigger) Ports

func (t *GPIOTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*GPIOTrigger) Process

func (t *GPIOTrigger) Process(context.Context, *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes.

func (*GPIOTrigger) Start

func (t *GPIOTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start configures the pin as an input and watches for edges.

func (*GPIOTrigger) Stop

func (t *GPIOTrigger) Stop() error

Stop stops watching the pin.

func (*GPIOTrigger) Validate

func (t *GPIOTrigger) Validate() error

Validate checks the configuration.

type GetVarProcess

type GetVarProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

GetVarProcess reads a value from the shared variable store into the payload.

func (*GetVarProcess) GetConfigSchema

func (p *GetVarProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*GetVarProcess) Ports

func (p *GetVarProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*GetVarProcess) Process

func (p *GetVarProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process reads the variable and sets it as the message payload.

func (*GetVarProcess) Validate

func (p *GetVarProcess) Validate() error

Validate checks the configuration.

type HTTPAction

type HTTPAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

HTTPAction makes HTTP requests to external APIs.

func (*HTTPAction) GetConfigSchema

func (a *HTTPAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*HTTPAction) Ports

func (a *HTTPAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*HTTPAction) Process

func (a *HTTPAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process makes the HTTP request and returns the response.

func (*HTTPAction) SecretReferences

func (a *HTTPAction) SecretReferences() map[string][]string

SecretReferences: the secrets of the URL and of the header values (in header name order), which fail the request when undefined.

func (*HTTPAction) Validate

func (a *HTTPAction) Validate() error

Validate checks if the configuration is valid.

type I2CAction

type I2CAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

I2CAction reads bytes from an I2C device, optionally after writing a register address. Works on a Raspberry Pi (or any host periph.io supports).

func (*I2CAction) GetConfigSchema

func (a *I2CAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*I2CAction) Ports

func (a *I2CAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*I2CAction) Process

func (a *I2CAction) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process reads from the device and returns the bytes.

func (*I2CAction) Validate

func (a *I2CAction) Validate() error

Validate checks the configuration.

type IntervalTrigger

type IntervalTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

IntervalTrigger fires messages at regular intervals.

func (*IntervalTrigger) GetConfigSchema

func (t *IntervalTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*IntervalTrigger) Ports

func (t *IntervalTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*IntervalTrigger) Process

func (t *IntervalTrigger) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process is not used for trigger nodes but must be implemented.

func (*IntervalTrigger) Start

func (t *IntervalTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start begins the interval trigger.

func (*IntervalTrigger) Stop

func (t *IntervalTrigger) Stop() error

Stop stops the interval trigger.

func (*IntervalTrigger) Validate

func (t *IntervalTrigger) Validate() error

Validate checks if the configuration is valid.

type JoinProcess

type JoinProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

JoinProcess correlates messages arriving on its single input and emits a merged message. Because a node can't tell which input port a message arrived on, it correlates by a key (an expression over payload/meta) and either:

  • mode "key": buffers payloads sharing a key, emits an array at `count`.
  • mode "source": buffers one payload per configured source node, emits an object {sourceNode: payload} once all sources have arrived for a key.

Stateful; the runtime's serial per-node executor lets the mutex stay simple. Pending groups are bounded: a group not completed within `timeout` is dropped, and at most `maxKeys` groups are kept (oldest evicted first), so keys that never complete can't grow memory without limit.

func (*JoinProcess) GetConfigSchema

func (j *JoinProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*JoinProcess) Ports

func (j *JoinProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*JoinProcess) Process

func (j *JoinProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process buffers the message by its correlation key and emits when complete.

func (*JoinProcess) Validate

func (j *JoinProcess) Validate() error

Validate checks the configuration.

type KnowledgeAddAction

type KnowledgeAddAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

KnowledgeAddAction stores text from the message in a collection of the local knowledge base (docs/design/llm.md §3): it embeds the text (or its chunks) with the connection's embedding model and keeps the embeddings in PiWorker's database, where Search Knowledge Base finds them.

func (*KnowledgeAddAction) GetConfigSchema

func (a *KnowledgeAddAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*KnowledgeAddAction) Ports

func (a *KnowledgeAddAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*KnowledgeAddAction) Process

func (a *KnowledgeAddAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process stores the message's text in the collection and passes the message on.

func (KnowledgeAddAction) RequiredLLMConnections

func (s KnowledgeAddAction) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*KnowledgeAddAction) Validate

func (a *KnowledgeAddAction) Validate() error

Validate checks the configuration (the constructor already did).

type KnowledgeSearchProcess

type KnowledgeSearchProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

KnowledgeSearchProcess finds the documents of a knowledge collection closest in meaning to a query built from the message (docs/design/llm.md §3) and passes them on with a context text ready for a prompt.

func (*KnowledgeSearchProcess) GetConfigSchema

func (p *KnowledgeSearchProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*KnowledgeSearchProcess) Ports

func (p *KnowledgeSearchProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*KnowledgeSearchProcess) Process

func (p *KnowledgeSearchProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process searches the collection and passes the message on with what it found.

func (KnowledgeSearchProcess) RequiredLLMConnections

func (s KnowledgeSearchProcess) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*KnowledgeSearchProcess) Validate

func (p *KnowledgeSearchProcess) Validate() error

Validate checks the configuration (the constructor already did).

type LLMAgentProcess

type LLMAgentProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

LLMAgentProcess is an AI agent: a model that may call the admin's flow tools (trigger-tool flows) in a loop until it answers (ADR-0039, docs/design/llm.md §3-4). It calls them through the node.ToolCaller of its context, which applies the rules of every tool call (only the tools the node lists, never its own flow's, privileged ones only with allowPrivileged, only those that need no confirmation; the tools' own limits) and redacts the results as an MCP agent's.

func (*LLMAgentProcess) GetConfigSchema

func (a *LLMAgentProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*LLMAgentProcess) Ports

func (a *LLMAgentProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*LLMAgentProcess) Process

func (a *LLMAgentProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process runs the agent: it asks the model, runs the tool calls the answer asks for and sends their results back, until an answer asks for no tool (its text is the result) or maxSteps requests were sent. Once a tool was called, a failure is permanent (afterToolsError): a retry would run the loop again, and the tools with it.

func (LLMAgentProcess) RequiredLLMConnections

func (s LLMAgentProcess) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*LLMAgentProcess) Validate

func (a *LLMAgentProcess) Validate() error

Validate checks the tool names (the constructor checked everything).

type LLMClassifyProcess

type LLMClassifyProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

LLMClassifyProcess asks a model which of the admin's categories a message belongs to and sends the message, unchanged, out of that category's port (docs/design/llm.md §3). Its output ports come from its categories setting (NodeTypeInfo.OutputsFrom, ADR-0040), after the static "other".

func (*LLMClassifyProcess) GetConfigSchema

func (p *LLMClassifyProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*LLMClassifyProcess) Ports

func (p *LLMClassifyProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the input and the outputs: "other", then one per category.

func (*LLMClassifyProcess) Process

func (p *LLMClassifyProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process classifies the message and routes it to its category's port.

func (LLMClassifyProcess) RequiredLLMConnections

func (s LLMClassifyProcess) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*LLMClassifyProcess) Validate

func (p *LLMClassifyProcess) Validate() error

Validate checks the categories (the constructor checked everything).

type LLMForgetAction

type LLMForgetAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

LLMForgetAction clears a conversation the LLM nodes remember (their memoryKey) and passes the message on (docs/design/llm.md §3), e.g. on a chat's /reset command.

func (*LLMForgetAction) GetConfigSchema

func (f *LLMForgetAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*LLMForgetAction) Ports

func (f *LLMForgetAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*LLMForgetAction) Process

func (f *LLMForgetAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process clears the conversation from the memory of its context (llm.MemoryFromContext) and passes the message on. A sandboxed run (a dry-run or a node test) has an empty memory of its own there, so it never changes the process-wide one.

func (*LLMForgetAction) Validate

func (f *LLMForgetAction) Validate() error

Validate checks the configuration (the constructor already did).

type LLMProcess

type LLMProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

LLMProcess sends a prompt built from the message to a model and passes on its answer: text, or JSON (optionally matching a schema). It can send images from the message and remember a conversation per key (docs/design/llm.md §3).

func (*LLMProcess) GetConfigSchema

func (p *LLMProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*LLMProcess) Ports

func (p *LLMProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*LLMProcess) Process

func (p *LLMProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process asks the model and passes the message on with its answer.

func (LLMProcess) RequiredLLMConnections

func (s LLMProcess) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*LLMProcess) Validate

func (p *LLMProcess) Validate() error

Validate checks the configuration (the constructor already did).

type LogAction

type LogAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

LogAction logs incoming messages.

func (*LogAction) GetConfigSchema

func (a *LogAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*LogAction) Ports

func (a *LogAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*LogAction) Process

func (a *LogAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process logs the incoming message and passes it through. In a sandbox (a dry-run or node test, node.InSandbox) it only passes it through: what a sandboxed flow carries never reaches the process log.

func (*LogAction) Validate

func (a *LogAction) Validate() error

Validate checks if the configuration is valid.

type ManualTrigger

type ManualTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ManualTrigger is a trigger that fires when explicitly triggered via API. It's useful for testing flows and for manual automation triggers.

func (*ManualTrigger) GetConfigSchema

func (t *ManualTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*ManualTrigger) Inject

func (t *ManualTrigger) Inject(customPayload interface{}) error

Inject triggers the node, sending a message with the configured payload. This method is called by the API handler when a user clicks "Inject". It can optionally receive a custom payload to override the configured one.

func (*ManualTrigger) IsRunning

func (t *ManualTrigger) IsRunning() bool

IsRunning returns whether the trigger is currently running.

func (*ManualTrigger) Ports

func (t *ManualTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*ManualTrigger) Process

func (t *ManualTrigger) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process is not used for trigger nodes but must be implemented.

func (*ManualTrigger) Start

func (t *ManualTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start prepares the manual trigger to receive inject signals.

func (*ManualTrigger) Stop

func (t *ManualTrigger) Stop() error

Stop stops the manual trigger.

func (*ManualTrigger) Validate

func (t *ManualTrigger) Validate() error

Validate checks if the configuration is valid.

type MqttAction

type MqttAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

MqttAction publishes a message to an MQTT topic. It takes a shared connection (ADR-0025) on first use and holds it until Close.

func (*MqttAction) Close

func (a *MqttAction) Close() error

Close releases the node's connection, which closes once no node uses it. The runtime calls it when the flow stops; without it every redeploy leaked a connection to the broker.

func (*MqttAction) GetConfigSchema

func (a *MqttAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*MqttAction) Ports

func (a *MqttAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*MqttAction) Process

func (a *MqttAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the topic/payload and publishes the message.

func (*MqttAction) RequiredConnections

func (a *MqttAction) RequiredConnections() map[string]string

RequiredConnections: the named connection, if any.

func (*MqttAction) SecretReferences

func (a *MqttAction) SecretReferences() map[string][]string

SecretReferences: the own broker username's and password's secrets (a named connection's credentials are the connection's).

func (*MqttAction) Validate

func (a *MqttAction) Validate() error

Validate checks the configuration.

type MqttTrigger

type MqttTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

MqttTrigger subscribes to an MQTT topic and emits a message per received publication.

func (*MqttTrigger) GetConfigSchema

func (t *MqttTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*MqttTrigger) Ports

func (t *MqttTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*MqttTrigger) Process

func (t *MqttTrigger) Process(context.Context, *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes.

func (*MqttTrigger) RequiredConnections

func (t *MqttTrigger) RequiredConnections() map[string]string

RequiredConnections: the named connection, if any.

func (*MqttTrigger) SecretReferences

func (t *MqttTrigger) SecretReferences() map[string][]string

SecretReferences: the own broker username's and password's secrets.

func (*MqttTrigger) Start

func (t *MqttTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start subscribes to the topic on a shared connection to the broker (ADR-0025), which subscribes again on every reconnect: with a clean session the broker forgets subscriptions whenever the connection drops. If the broker is not reachable yet (e.g. the Pi booted before the network came up) Start still succeeds and the connection keeps retrying in the background.

func (*MqttTrigger) Stop

func (t *MqttTrigger) Stop() error

Stop ends the subscription; the shared connection closes (aborting a pending connect retry) once no node uses it.

func (*MqttTrigger) Validate

func (t *MqttTrigger) Validate() error

Validate checks the configuration.

type NotifyAction

type NotifyAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

NotifyAction sends a notification message to a webhook (Discord, Slack, ntfy).

func (*NotifyAction) GetConfigSchema

func (a *NotifyAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*NotifyAction) Ports

func (a *NotifyAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*NotifyAction) Process

func (a *NotifyAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the message and posts it to the configured webhook.

func (*NotifyAction) RequiredSecrets

func (a *NotifyAction) RequiredSecrets() map[string][]string

RequiredSecrets: the webhook URL's secrets.

func (*NotifyAction) Validate

func (a *NotifyAction) Validate() error

Validate checks the configuration.

type ParseProcess

type ParseProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ParseProcess parses a string payload from a structured text format (JSON or CSV) into a native value, so downstream nodes can work with fields instead of raw text.

func (*ParseProcess) GetConfigSchema

func (p *ParseProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*ParseProcess) Ports

func (p *ParseProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*ParseProcess) Process

func (p *ParseProcess) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process parses the (string) payload according to the configured format.

func (*ParseProcess) Validate

func (p *ParseProcess) Validate() error

Validate checks the configuration.

type RSSTrigger

type RSSTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

RSSTrigger polls an RSS/Atom feed and emits a message per newly-seen item.

func (*RSSTrigger) GetConfigSchema

func (t *RSSTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*RSSTrigger) Ports

func (t *RSSTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*RSSTrigger) Process

func (t *RSSTrigger) Process(context.Context, *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes.

func (*RSSTrigger) Start

func (t *RSSTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start begins polling the feed.

func (*RSSTrigger) Stop

func (t *RSSTrigger) Stop() error

Stop stops polling.

func (*RSSTrigger) Validate

func (t *RSSTrigger) Validate() error

Validate checks the configuration.

type RateLimitProcess

type RateLimitProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

RateLimitProcess passes at most `limit` messages per sliding time window, dropping the rest. State is guarded by a mutex; although the runtime drains a node's messages serially, the lock keeps the node correct on its own.

func (*RateLimitProcess) GetConfigSchema

func (p *RateLimitProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*RateLimitProcess) Ports

func (p *RateLimitProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*RateLimitProcess) Process

func (p *RateLimitProcess) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process forwards the message if the rate is under the limit, else drops it.

func (*RateLimitProcess) Validate

func (p *RateLimitProcess) Validate() error

Validate checks the configuration.

type ReplyAction

type ReplyAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ReplyAction answers the call that started its run (action-reply): the message payload becomes the call's result, or its error in error mode. The first reply of a run wins; outside a called run it does nothing.

func (*ReplyAction) GetConfigSchema

func (a *ReplyAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the editor.

func (*ReplyAction) Ports

func (a *ReplyAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports: one input, no outputs (the reply ends the call).

func (*ReplyAction) Process

func (a *ReplyAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process delivers the payload to the waiting caller and emits nothing.

func (*ReplyAction) Validate

func (a *ReplyAction) Validate() error

Validate re-checks the mode.

type SetVarProcess

type SetVarProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

SetVarProcess stores a computed value into the shared variable store and passes the message through unchanged.

func (*SetVarProcess) GetConfigSchema

func (p *SetVarProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*SetVarProcess) Ports

func (p *SetVarProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*SetVarProcess) Process

func (p *SetVarProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process evaluates the value expression and stores it under the key.

func (*SetVarProcess) Validate

func (p *SetVarProcess) Validate() error

Validate checks the configuration.

type SunTrigger

type SunTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

SunTrigger fires at sunrise, sunset, dawn or dusk (± an offset) at a place, computed locally (no network).

func (*SunTrigger) GetConfigSchema

func (t *SunTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*SunTrigger) Ports

func (t *SunTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*SunTrigger) Process

func (t *SunTrigger) Process(context.Context, *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes.

func (*SunTrigger) Start

func (t *SunTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start waits for each event in turn.

func (*SunTrigger) Stop

func (t *SunTrigger) Stop() error

Stop stops waiting.

func (*SunTrigger) Validate

func (t *SunTrigger) Validate() error

Validate checks the configuration (the constructor already did).

type SwitchProcess

type SwitchProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

SwitchProcess routes a message to its "true" or "false" output port based on a boolean condition (an if/else branch).

func (*SwitchProcess) GetConfigSchema

func (p *SwitchProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*SwitchProcess) Ports

func (p *SwitchProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions: one input, two outputs (true/false).

func (*SwitchProcess) Process

func (p *SwitchProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process evaluates the condition and routes the message to the matching port.

func (*SwitchProcess) Validate

func (p *SwitchProcess) Validate() error

Validate checks the configuration.

type SysMetricTrigger

type SysMetricTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

SysMetricTrigger fires when a system metric (CPU load, memory %, temperature) crosses a threshold. It edge-triggers: it fires once when the metric enters the exceeding state, not on every poll.

func (*SysMetricTrigger) GetConfigSchema

func (t *SysMetricTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*SysMetricTrigger) Ports

func (t *SysMetricTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*SysMetricTrigger) Process

func (t *SysMetricTrigger) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes but must be implemented.

func (*SysMetricTrigger) Start

func (t *SysMetricTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start begins polling the metric.

func (*SysMetricTrigger) Stop

func (t *SysMetricTrigger) Stop() error

Stop stops polling.

func (*SysMetricTrigger) Validate

func (t *SysMetricTrigger) Validate() error

Validate checks the configuration.

type TelegramAction

type TelegramAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

TelegramAction sends a message via a Telegram bot.

func (*TelegramAction) GetConfigSchema

func (a *TelegramAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*TelegramAction) Ports

func (a *TelegramAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*TelegramAction) Process

func (a *TelegramAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the message and sends it via the Telegram Bot API.

func (*TelegramAction) RequiredSecrets

func (a *TelegramAction) RequiredSecrets() map[string][]string

RequiredSecrets: the bot token's secrets.

func (*TelegramAction) Validate

func (a *TelegramAction) Validate() error

Validate checks the configuration.

type TemplateProcess

type TemplateProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

TemplateProcess renders a text template from the message, producing a string payload. Useful for building notification/log messages.

func (*TemplateProcess) GetConfigSchema

func (p *TemplateProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*TemplateProcess) Ports

func (p *TemplateProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*TemplateProcess) Process

func (p *TemplateProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the template and sets the result as the message payload.

func (*TemplateProcess) Validate

func (p *TemplateProcess) Validate() error

Validate checks the configuration.

type TimerNode

type TimerNode struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

TimerNode is a retriggerable timer: each message starts it (or restarts it), and when the duration passes without a new message it emits the last message. "Turn the light off three minutes after the last motion."

It emits after its input's run has ended, so it is also a trigger (node.TriggerNode): the runtime gives it an output channel at Start and each emission starts a new run. Process itself returns nothing.

func (*TimerNode) Close

func (n *TimerNode) Close() error

Close cancels a timer set outside a running flow (a node test).

func (*TimerNode) GetConfigSchema

func (n *TimerNode) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*TimerNode) Ports

func (n *TimerNode) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*TimerNode) Process

func (n *TimerNode) Process(_ context.Context, msg *types.Message) ([]*types.Message, error)

Process starts, restarts or stops the timer. It returns no message: the timer emits later, as a new run.

func (*TimerNode) Start

func (n *TimerNode) Start(ctx context.Context, out chan<- *types.Message) error

Start receives the channel the timer emits into; a message that came before is scheduled for its remaining time.

func (*TimerNode) Stop

func (n *TimerNode) Stop() error

Stop cancels the timer.

func (*TimerNode) Validate

func (n *TimerNode) Validate() error

Validate checks the configuration (the constructor already did).

type ToolTrigger

type ToolTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ToolTrigger publishes its flow as an MCP tool (trigger-tool). A call validates the arguments against the input schema and starts a run whose payload is the arguments; an action-reply node answers the call.

func (*ToolTrigger) Emit

func (t *ToolTrigger) Emit(ctx context.Context, msg *types.Message) error

Emit starts a run with msg (node.Emitter). The payload must be arguments that satisfy the input schema: they were validated by the caller and are checked again here, so the flow never sees anything else. Emit adds the toolName meta, routes the message to the output port, and blocks until the runtime takes it, the caller's ctx ends or the trigger stops.

func (*ToolTrigger) GetConfigSchema

func (t *ToolTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the editor.

func (*ToolTrigger) Ports

func (t *ToolTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the single output carrying the call arguments.

func (*ToolTrigger) Process

func (t *ToolTrigger) Process(context.Context, *types.Message) ([]*types.Message, error)

Process is not used: calls arrive through Emit.

func (*ToolTrigger) Start

func (t *ToolTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start claims the tool name; it fails with node.ErrResourceConflict when another running flow publishes the same name.

func (*ToolTrigger) Stop

func (t *ToolTrigger) Stop() error

Stop releases the tool name.

func (*ToolTrigger) ToolSpec

func (t *ToolTrigger) ToolSpec() node.ToolSpec

ToolSpec implements node.ToolProvider.

func (*ToolTrigger) Validate

func (t *ToolTrigger) Validate() error

Validate re-checks the current configuration.

type TranscribeProcess

type TranscribeProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

TranscribeProcess turns the audio of a message (a voice note, a recording) into text through an OpenAI-compatible transcription API (docs/design/llm.md §3): OpenAI's Whisper, or a local server offering /audio/transcriptions.

func (*TranscribeProcess) GetConfigSchema

func (p *TranscribeProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*TranscribeProcess) Ports

func (p *TranscribeProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*TranscribeProcess) Process

func (p *TranscribeProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process transcribes the message's audio and passes the message on with the text.

func (TranscribeProcess) RequiredLLMConnections

func (s TranscribeProcess) RequiredLLMConnections() map[string]string

RequiredLLMConnections implements node.LLMConnectionRequirer: deploy refuses the flow while the connection is not defined.

func (*TranscribeProcess) Validate

func (p *TranscribeProcess) Validate() error

Validate checks the configuration (the constructor already did).

type TransformProcess

type TransformProcess struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

TransformProcess transforms message payloads using expressions. It uses the expr-lang library for safe, sandboxed expression evaluation.

func (*TransformProcess) GetConfigSchema

func (p *TransformProcess) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*TransformProcess) Ports

func (p *TransformProcess) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*TransformProcess) Process

func (p *TransformProcess) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process evaluates the expression against the message and returns the result.

func (*TransformProcess) Validate

func (p *TransformProcess) Validate() error

Validate checks if the configuration is valid.

type WebhookTrigger

type WebhookTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

WebhookTrigger fires a message when an HTTP request hits its webhook path. It registers itself on the shared webhook hub when started.

func (*WebhookTrigger) GetConfigSchema

func (t *WebhookTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for UI.

func (*WebhookTrigger) Ports

func (t *WebhookTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions for this node.

func (*WebhookTrigger) Process

func (t *WebhookTrigger) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process is unused for trigger nodes but must be implemented.

func (*WebhookTrigger) Start

func (t *WebhookTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start registers the webhook path on the hub. A token referencing an undefined secret fails the start (and so the deploy).

func (*WebhookTrigger) Stop

func (t *WebhookTrigger) Stop() error

Stop unregisters the webhook path.

func (*WebhookTrigger) Validate

func (t *WebhookTrigger) Validate() error

Validate checks the configuration.

type ZigbeeAction

type ZigbeeAction struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ZigbeeAction sends a command to a Zigbee device or group through Zigbee2MQTT (<base>/<device>/set).

func (*ZigbeeAction) Close

func (a *ZigbeeAction) Close() error

Close releases the node's connection.

func (*ZigbeeAction) GetConfigSchema

func (a *ZigbeeAction) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*ZigbeeAction) Ports

func (a *ZigbeeAction) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*ZigbeeAction) Process

func (a *ZigbeeAction) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process renders the device and command and publishes the command.

func (*ZigbeeAction) RequiredConnections

func (a *ZigbeeAction) RequiredConnections() map[string]string

RequiredConnections: the node's broker connection (ADR-0026).

func (*ZigbeeAction) Validate

func (a *ZigbeeAction) Validate() error

Validate checks the configuration (the constructor already did).

type ZigbeeGet

type ZigbeeGet struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ZigbeeGet asks a device for a fresh reading (<base>/<device>/get) and passes on the state it reports next.

func (*ZigbeeGet) Close

func (g *ZigbeeGet) Close() error

Close ends the subscription.

func (*ZigbeeGet) GetConfigSchema

func (g *ZigbeeGet) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*ZigbeeGet) Ports

func (g *ZigbeeGet) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*ZigbeeGet) Process

func (g *ZigbeeGet) Process(ctx context.Context, msg *types.Message) ([]*types.Message, error)

Process publishes the request and waits for the next report.

func (*ZigbeeGet) RequiredConnections

func (g *ZigbeeGet) RequiredConnections() map[string]string

RequiredConnections: the node's broker connection (ADR-0026).

func (*ZigbeeGet) Validate

func (g *ZigbeeGet) Validate() error

Validate checks the configuration (the constructor already did).

type ZigbeeTrigger

type ZigbeeTrigger struct {
	*node.BaseNode
	// contains filtered or unexported fields
}

ZigbeeTrigger fires when a Zigbee device reports through Zigbee2MQTT: on its "output" port when its state (or one property) changes, on its "availability" port when it goes offline or comes back.

func (*ZigbeeTrigger) GetConfigSchema

func (t *ZigbeeTrigger) GetConfigSchema() node.ConfigSchema

GetConfigSchema returns the configuration schema for the UI.

func (*ZigbeeTrigger) Ports

func (t *ZigbeeTrigger) Ports() (inputs []types.Port, outputs []types.Port)

Ports returns the port definitions.

func (*ZigbeeTrigger) Process

Process is unused for trigger nodes.

func (*ZigbeeTrigger) RequiredConnections

func (t *ZigbeeTrigger) RequiredConnections() map[string]string

RequiredConnections: the node's broker connection (ADR-0026).

func (*ZigbeeTrigger) Start

func (t *ZigbeeTrigger) Start(ctx context.Context, out chan<- *types.Message) error

Start subscribes to the device's state and availability on the shared connection. An unreachable broker does not fail it (ADR-0006).

func (*ZigbeeTrigger) Stop

func (t *ZigbeeTrigger) Stop() error

Stop ends the subscriptions; the shared connection closes once unused.

func (*ZigbeeTrigger) Validate

func (t *ZigbeeTrigger) Validate() error

Validate checks the configuration (the constructor already did).

Jump to

Keyboard shortcuts

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