import type { AnyTool } from '../../types/effectTool.js'; import { type FileSystem } from '../../types/filesystem.js'; export interface CreateFsToolOptions { fs: FileSystem; readOnly?: boolean; timeoutMs?: number; /** Model-facing mount/path guidance. Keep secrets and implementation details out. */ instructions?: string; } export interface GrepHit { path: string; line: number; text: string; } export interface FsSearchHit { slug: string; chunkIndex: number; text: string; } export interface FsWithSearch extends FileSystem { search?(pattern: string, opts?: { limit?: number; path?: string; }): Promise; } /** * One durable `workspace` tool over a {@link FileSystem} (ls/cat/grep/find/read/write/edit). * Lives in core (not `@kuralle-agents/fs`) because it needs only `defineTool` + the * `FileSystem` interface — both core-owned — so the runtime can auto-register it with a * static import and no core->fs dependency (RFC-02 §5.2). `@kuralle-agents/fs` re-exports it. */ export declare function createFsTool(opts: CreateFsToolOptions): AnyTool;