import { tool } from '../../tools/tool-factory.js'; import { Sandbox } from '../../sandbox/base.js'; /** * File editor tool for viewing, creating, and editing files programmatically. * * Provides commands for viewing files/directories, creating files, string replacement, * and line insertion. All I/O routes through the agent's configured sandbox. * * @example * ```typescript * import { fileEditor } from '@strands-agents/sdk/vended-tools/file-editor' * import { Agent } from '@strands-agents/sdk' * * const agent = new Agent({ * model: new BedrockModel({ region: 'us-east-1' }), * tools: [fileEditor], * }) * * await agent.invoke('View the file /tmp/test.txt') * await agent.invoke('Create a file /tmp/notes.txt with content "Hello World"') * await agent.invoke('Replace "Hello" with "Hi" in /tmp/notes.txt') * ``` */ export declare const DEFAULT_FILE_EDITOR_DESCRIPTION = "Filesystem editor tool for viewing, creating, and editing files. Supports view (with line ranges), create, str_replace, and insert operations. Files must use absolute paths."; export interface MakeFileEditorOptions { name?: string; description?: string; } /** * Create a file editor tool. If a sandbox is passed, it's bound at creation time. * Otherwise, the tool reads from `context.agent.sandbox` at call time. * Used by sandbox implementations in `getTools()` and by users who want a customized file editor. */ export declare function makeFileEditor(options?: MakeFileEditorOptions): ReturnType; export declare function makeFileEditor(sandbox: Sandbox | undefined, options?: MakeFileEditorOptions): ReturnType; /** * Default file editor tool. Reads the sandbox from the agent's context at call time. */ export declare const fileEditor: import("../../index.js").InvokableTool; //# sourceMappingURL=file-editor.d.ts.map