import type { AgentTool } from "../types.js";
import { type TruncationResult } from "./truncate.js";
declare const lsSchema: import("@sinclair/typebox").TObject<{
    path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>;
type LsSortOrder = "asc" | "desc";
export interface LsToolDetails {
    truncation?: TruncationResult;
    entryLimitReached?: number;
}
/**
 * Pluggable I/O backend for the ls tool. Provide a custom implementation to
 * enumerate directories that live off the local disk, for example on a host
 * reached over a remote transport.
 */
export interface LsOperations {
    /** Return whether something exists at the path. */
    exists: (absolutePath: string) => Promise<boolean> | boolean;
    /** Retrieve metadata for the path. Throws if nothing is present there. */
    stat: (absolutePath: string) => Promise<{
        isDirectory: () => boolean;
    }> | {
        isDirectory: () => boolean;
    };
    /** List the names found immediately within a directory. */
    readdir: (absolutePath: string) => Promise<string[]> | string[];
}
export interface LsToolOptions {
    /** Backend hooks to use. When omitted, the local filesystem is read. */
    operations?: LsOperations;
    hideDotfiles?: boolean;
    sort?: LsSortOrder;
}
export declare function createLsTool(cwd: string, options?: LsToolOptions): AgentTool<typeof lsSchema>;
/** Ready-made ls tool bound to the process working directory. */
export declare const lsTool: AgentTool<import("@sinclair/typebox").TObject<{
    path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>, any>;
export {};
