import * as llmist from 'llmist'; /** * Exception thrown when a path validation fails due to sandbox constraints. * This ensures all file operations are restricted to the current working directory. */ declare class PathSandboxException extends Error { constructor(inputPath: string, reason: string); } /** * Validates that a given path is within the current working directory. * This prevents directory traversal attacks and ensures all file operations * are sandboxed to the CWD and its subdirectories. * * @param inputPath - Path to validate (can be relative or absolute) * @returns The validated absolute path * @throws PathSandboxException if the path is outside the CWD * @throws Error for other file system errors */ declare function validatePathIsWithinCwd(inputPath: string): string; /** * DeleteFile gadget - Deletes a file or directory. * All paths are validated to be within the current working directory. */ declare const deleteFile: llmist.AbstractGadget; declare const editFile: llmist.AbstractGadget; /** * ListDirectory gadget - Lists files and directories with full metadata. * All directory paths are validated to be within the current working directory. */ declare const listDirectory: llmist.AbstractGadget; /** * ReadFile gadget - Reads the entire content of a file and returns it as text. * All file paths are validated to be within the current working directory. */ declare const readFile: llmist.AbstractGadget; /** * WriteFile gadget - Writes content to a file. * Creates parent directories if needed. Overwrites existing files. * All file paths are validated to be within the current working directory. */ declare const writeFile: llmist.AbstractGadget; /** * RunCommand gadget - Executes a shell command and returns its output. * * Runs commands through `sh -c` so pipes, redirects, chaining, * and all shell features work naturally. LLMs write commands * exactly as they would type them in a terminal. * * Safety should be added externally via the hook system (see example 10). * * Output format follows the established pattern: `status=N\n\n` */ declare const runCommand: llmist.AbstractGadget; export { deleteFile as DeleteFile, listDirectory as ListDirectory, PathSandboxException, readFile as ReadFile, runCommand as RunCommand, writeFile as WriteFile, deleteFile, editFile, listDirectory, readFile, runCommand, validatePathIsWithinCwd, writeFile };