Documentation
¶
Index ¶
- func ScanToolsFolder(toolsFolder string) (map[string]*toolmetadata.ToolMetadata, error)
- func SetupFactories(libdir string, allowedPaths []string, log logger.Logger)
- func SetupScriptling(p *scriptling.Scriptling, libdir string, registerInteract bool, ...)
- func ValidateTool(toolName string, meta *toolmetadata.ToolMetadata, scriptPath string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanToolsFolder ¶
func ScanToolsFolder(toolsFolder string) (map[string]*toolmetadata.ToolMetadata, error)
ScanToolsFolder scans the tools folder for .toml files and returns metadata
func SetupFactories ¶
SetupFactories configures the global sandbox and background factories. Call this once at startup, before any scripts execute. The factories create new Scriptling instances with the same library configuration.
func SetupScriptling ¶
func SetupScriptling(p *scriptling.Scriptling, libdir string, registerInteract bool, allowedPaths []string, log logger.Logger)
SetupScriptling configures a Scriptling instance with all libraries. libdir: Optional directory for on-demand library loading (empty = current directory) registerInteract: Whether to register the agent interact library allowedPaths: Filesystem path restrictions for os, pathlib, glob, sandbox (nil = no restrictions) log: Logger instance for the logging library
func ValidateTool ¶
func ValidateTool(toolName string, meta *toolmetadata.ToolMetadata, scriptPath string) []string
ValidateTool checks if a tool's metadata matches its script
Types ¶
This section is empty.