import type { AgentTool } from "phi-code-agent"; import { type Static, Type } from "typebox"; import type { ToolDefinition } from "../extensions/types.ts"; declare const writeSchema: Type.TObject<{ path: Type.TString; content: Type.TString; }>; export declare const writeToolSystemPromptContribution: { readonly snippet: "Create or overwrite files"; readonly guidelines: readonly ["Use write only for new files or complete rewrites.", "Before overwriting an existing file, read it first. write replaces the entire file, so omitted content is lost.", "For partial changes to an existing file, use the edit tool instead of rewriting the whole file."]; }; export type WriteToolInput = Static; /** * Pluggable operations for the write tool. * Override these to delegate file writing to remote systems (for example SSH). */ export interface WriteOperations { /** Write content to a file */ writeFile: (absolutePath: string, content: string) => Promise; /** Create directory recursively */ mkdir: (dir: string) => Promise; } export interface WriteToolOptions { /** Custom operations for file writing. Default: local filesystem */ operations?: WriteOperations; } export declare function createWriteToolDefinition(cwd: string, options?: WriteToolOptions): ToolDefinition; export declare function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool; export {}; //# sourceMappingURL=write.d.ts.map