{
"functions": {
"file": [
{"name": "fileExists(path)", "description": "Check if file exists", "return_type": "bool"},
{"name": "fileLength(path)", "description": "Count non-empty lines in file", "return_type": "int"},
{"name": "readFile(path)", "description": "Read entire file contents", "return_type": "string"},
{"name": "writeFile(path, content)", "description": "Write content to file", "return_type": "bool"},
{"name": "appendFile(path, content)", "description": "Append content to file", "return_type": "bool"},
{"name": "removeFile(path)", "description": "Delete a file", "return_type": "bool"},
{"name": "copyFile(src, dst)", "description": "Copy file to destination", "return_type": "bool"},
{"name": "mergeFiles(pattern, output)", "description": "Merge multiple files matching pattern", "return_type": "bool"}
],
"string": [
{"name": "trim(str)", "description": "Trim whitespace", "return_type": "string"},
{"name": "split(str, delim)", "description": "Split string by delimiter", "return_type": "[]string"},
{"name": "replace(str, old, new)", "description": "Replace all occurrences", "return_type": "string"},
{"name": "contains(str, substr)", "description": "Check if string contains substring", "return_type": "bool"},
{"name": "toLowerCase(str)", "description": "Convert string to lowercase", "return_type": "string"},
{"name": "toUpperCase(str)", "description": "Convert string to uppercase", "return_type": "string"},
{"name": "join(array, delim)", "description": "Join array elements with delimiter", "return_type": "string"}
],
"utility": [
{"name": "len(val)", "description": "Get length of string or array", "return_type": "int"},
{"name": "exec_cmd(command)", "description": "Execute bash command and return output", "return_type": "string"},
{"name": "isEmpty(val)", "description": "Check if value is empty/nil", "return_type": "bool"},
{"name": "commandExists(name)", "description": "Check if command is installed", "return_type": "bool"},
{"name": "sleep(seconds)", "description": "Sleep for specified seconds", "return_type": "void"}
],
"http": [
{"name": "http_get(url)", "description": "Make HTTP GET request", "return_type": "object"},
{"name": "http_post(url, body)", "description": "Make HTTP POST request with JSON body", "return_type": "object"},
{"name": "httpRequest(url, method, headers, body)", "description": "Make HTTP request with full control", "return_type": "object"}
],
"logging": [
{"name": "log_info(message)", "description": "Log info message with [INFO] prefix", "return_type": "void"},
{"name": "log_debug(message)", "description": "Log debug message with [DEBUG] prefix", "return_type": "void"},
{"name": "log_warn(message)", "description": "Log warning message with [WARN] prefix", "return_type": "void"},
{"name": "log_error(message)", "description": "Log error message with [ERROR] prefix", "return_type": "void"}
],
"generation": [
{"name": "randomString(length)", "description": "Generate random alphanumeric string", "return_type": "string"},
{"name": "uuid()", "description": "Generate UUID v4", "return_type": "string"},
{"name": "timestamp()", "description": "Get current Unix timestamp", "return_type": "int"}
],
"encoding": [
{"name": "base64Encode(str)", "description": "Encode string to base64", "return_type": "string"},
{"name": "base64Decode(str)", "description": "Decode base64 string", "return_type": "string"},
{"name": "urlEncode(str)", "description": "URL encode string", "return_type": "string"},
{"name": "urlDecode(str)", "description": "URL decode string", "return_type": "string"}
],
"unix_commands": [
{"name": "sortUnix(inputFile, outputFile)", "description": "Sort file and remove duplicates", "return_type": "bool"},
{"name": "diff_unix(file1, file2, outputFile)", "description": "Get difference between two files", "return_type": "bool"},
{"name": "gitClone(url, destPath)", "description": "Clone git repository", "return_type": "bool"},
{"name": "gitPull(repoPath)", "description": "Pull latest changes from git remote", "return_type": "bool"}
],
"database": [
{"name": "db_insert_asset(workspace, data)", "description": "Insert asset into database", "return_type": "bool"},
{"name": "db_query_assets(workspace, filter)", "description": "Query assets from database", "return_type": "[]object"},
{"name": "db_update_workspace_stats(workspace)", "description": "Update workspace statistics", "return_type": "bool"}
]
}
}