/** * [WHO]: LsTool, lsTool, createLsTool, LsToolInput * [FROM]: Depends on agent-core, node:fs, path-utils.ts, truncate.ts * [TO]: Consumed by core/tools/index.ts * [HERE]: core/tools/ls.ts - directory listing with metadata; consumed by orchestrator */ import type { AgentTool } from "@catui/agent-core"; import { type Static } from "@sinclair/typebox"; import { type TruncationResult } from "./truncate.js"; declare const lsSchema: import("@sinclair/typebox").TObject<{ path: import("@sinclair/typebox").TOptional; limit: import("@sinclair/typebox").TOptional; }>; export type LsToolInput = Static; export interface LsToolDetails { truncation?: TruncationResult; entryLimitReached?: number; } /** * Pluggable operations for the ls tool. * Override these to delegate directory listing to remote systems (e.g., SSH). */ export interface LsOperations { /** Check if path exists */ exists: (absolutePath: string) => Promise | boolean; /** Get file/directory stats. Throws if not found. */ stat: (absolutePath: string) => Promise<{ isDirectory: () => boolean; }> | { isDirectory: () => boolean; }; /** Read directory entries */ readdir: (absolutePath: string) => Promise | string[]; } export interface LsToolOptions { /** Custom operations for directory listing. Default: local filesystem */ operations?: LsOperations; } export declare function createLsTool(cwd: string, options?: LsToolOptions): AgentTool; /** Default ls tool using process.cwd() - for backwards compatibility */ export declare const lsTool: AgentTool; limit: import("@sinclair/typebox").TOptional; }>, any>; export {};