/** * [WHO]: WriteTool, writeTool, createWriteTool, WriteToolInput * [FROM]: Depends on agent-core, node:fs/promises, path-utils.ts * [TO]: Consumed by core/tools/index.ts * [HERE]: core/tools/write.ts - filesystem creation/overwrite; consumed by orchestrator */ import type { AgentTool } from "@catui/agent-core"; import { type Static } from "@sinclair/typebox"; declare const writeSchema: import("@sinclair/typebox").TObject<{ path: import("@sinclair/typebox").TString; content: import("@sinclair/typebox").TString; }>; export type WriteToolInput = Static; /** * Pluggable operations for the write tool. * Override these to delegate file writing to remote systems (e.g., 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; /** Optional guard called with the resolved absolute path before writing. */ beforeWrite?: (absolutePath: string) => void | Promise; } export declare function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool; /** Default write tool using process.cwd() - for backwards compatibility */ export declare const writeTool: AgentTool, any>; export {};