Skip to main content

Module builtin

Module builtin 

Source

StructsΒ§

BuiltinSpec
Static metadata for the 5 builtin ops. Used by main.rs to declare them against atlas at startup so pilot can discover them like any other provider.
CmdArgs πŸ”’
ListArgs πŸ”’
PatchArgs πŸ”’
ReadArgs πŸ”’
WriteArgs πŸ”’

ConstantsΒ§

BUILTINS
COMMAND_TIMEOUT πŸ”’
Command execution timeout.
MAX_COMMAND_LEN πŸ”’
Maximum command length to prevent abuse.

FunctionsΒ§

execute
One in-process builtin (no network, runs in executor’s own process). call.contract_id’s last segment names the operation β€” e.g. robonix/system/executor/builtin/read_file β†’ read_file.
list_dir πŸ”’
patch_file πŸ”’
read_file πŸ”’
run πŸ”’
run_command πŸ”’
safe_resolve πŸ”’
Resolve a user-supplied path and ensure it stays within the workspace root. Returns the canonical path on success, or an error if the path escapes the allowed directory (path traversal).
truncate πŸ”’
workspace_root πŸ”’
Workspace root for file operations. All file paths are resolved relative to this directory, and path traversal beyond it is rejected.
write_file πŸ”’