char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
01818e495
char/aliceai-t5-moe
1export enum ToolSource { 2BROWSER = 'browser' , 3CUSTOM = 'custom' , 4MCP = 'mcp' , 5SERVER = 'server' 6} 7 8export enum ToolPermissionDecision { 9ALWAYS = 'always' , 10ALWAYS_SERVER = 'always_server' , 11DENY = 'deny' , 12ONCE = 'once' 13} 14 15export enum ToolResponseField { 16ERROR = 'error' , 17PLAIN_TEXT = 'plain_text_response' 18} 19 20/** 21* Entry types accepted by the `file_glob_search` tool's `type` parameter. 22* Mirrors the server-side validation in server-tools.cpp. 23*/ 24export enum GlobSearchType { 25ALL = 'all' , 26DIR = 'dir' , 27FILE = 'file' 28} 29 30/** 31* Wire-format identifiers for server and browser tools. The string 32* value matches what the model emits in tool call names, so comparing 33* against `BuiltInTool.SERVER_READ_FILE` is equivalent to comparing 34* against the raw `'read_file'` literal - the enum just keeps the two in 35* lock-step and gives TypeScript a single source of truth for autocomplete 36* / rename support. 37* 38* The `SERVER_` / `BROWSER_` prefixes mirror the tool's primary source 39* (llama-server vs llama-ui). `get_info` is the exception: it is served by 40* the server, but llama-ui falls back to a browser implementation when the 41* server does not provide it, so it can surface under both categories in 42* the UI while keeping a single wire name. 43*/ 44export enum BuiltInTool { 45BROWSER_GET_DATETIME = 'get_datetime' , 46BROWSER_READ_MEDIA = 'read_media' , 47BROWSER_RUN_JAVASCRIPT = 'run_javascript' , 48SERVER_EDIT_FILE = 'edit_file' , 49SERVER_EXEC_SHELL_COMMAND = 'exec_shell_command' , 50SERVER_FILE_GLOB_SEARCH = 'file_glob_search' , 51SERVER_GET_INFO = 'get_info' , 52SERVER_GREP_SEARCH = 'grep_search' , 53SERVER_READ_FILE = 'read_file' , 54SERVER_WRITE_FILE = 'write_file' 55}