Skip to main content

Function: createElevatingFilesystemTools()

createElevatingFilesystemTools(workingDir, opts?): object

Defined in: elevating.ts:55

Build bash + filesystem tools rooted at workingDir, with approval-gated elevate.

Parameters

workingDir

string

opts?

ElevatingFilesystemToolsOptions

Returns

object

bash

bash: ZodToolDefinition<ZodObject<{ command: ZodString; timeout: ZodOptional<ZodNumber>; }, $strip>, BashResult>

edit_file

edit_file: ZodToolDefinition<ZodObject<{ new_string: ZodString; old_string: ZodString; outside_workspace: ZodOptional<ZodBoolean>; path: ZodString; replace_all: ZodOptional<ZodBoolean>; }, $strip>, { error: string; path?: undefined; replacements?: undefined; success: boolean; } | { error?: undefined; path: string; replacements: number; success: boolean; }>

elevateRoot

elevateRoot: string

file_info

file_info: ZodToolDefinition<ZodObject<{ outside_workspace: ZodOptional<ZodBoolean>; path: ZodString; }, $strip>, { created?: undefined; error: string; exists?: undefined; modified?: undefined; size?: undefined; success: boolean; type?: undefined; } | { created: string | undefined; error?: undefined; exists: boolean; modified: string | undefined; size: number | undefined; success: boolean; type: "unknown" | "file" | "directory" | "symlink" | undefined; }>

list_directory

list_directory: ZodToolDefinition<ZodObject<{ includeHidden: ZodOptional<ZodBoolean>; outside_workspace: ZodOptional<ZodBoolean>; path: ZodString; recursive: ZodOptional<ZodBoolean>; }, $strip>, { count?: undefined; entries?: undefined; error: string; path?: undefined; success: boolean; } | { count: number; entries: DirEntry[]; error?: undefined; path: string; success: boolean; }>

read_file

read_file: ZodToolDefinition<ZodObject<{ encoding: ZodOptional<ZodEnum<{ base64: "base64"; hex: "hex"; utf-8: "utf-8"; utf8: "utf8"; }>>; outside_workspace: ZodOptional<ZodBoolean>; path: ZodString; }, $strip>, { content?: undefined; error: string; size?: undefined; success: boolean; } | { content: string; error?: undefined; size: number; success: boolean; }>

workspaceRoot

workspaceRoot: string = workingDir

write_file

write_file: ZodToolDefinition<ZodObject<{ content: ZodString; createDirs: ZodOptional<ZodBoolean>; encoding: ZodOptional<ZodEnum<{ base64: "base64"; hex: "hex"; utf-8: "utf-8"; utf8: "utf8"; }>>; outside_workspace: ZodOptional<ZodBoolean>; path: ZodString; }, $strip>, { error: string; path?: undefined; size?: undefined; success: boolean; } | { error?: undefined; path: string; size: number; success: boolean; }>