ActionRegistry

Registry for actions that can be executed by AI clients.

Actions are registered via reflection by scanning instances for methods annotated with VoltAction. The registry provides thread-safe access to registered actions and handles parameter validation and type conversion when executing actions.

Types

Link copied to clipboard

Exception thrown when action parameter validation fails.

Link copied to clipboard
data class RegisteredAction(val descriptor: ActionDescriptor, val instance: Any, val function: KFunction<*>)

Represents a registered action with its metadata, owning instance, and function reference.

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun execute(actionId: String, params: Map<String, Any?>): Action?

Executes a registered action with the given parameters.

Link copied to clipboard
fun registerInstance(instance: Any)

Registers all VoltAction-annotated methods from the given instance.

Link copied to clipboard