import { type DirectoryEntry } from "@stigmer/protos/ai/stigmer/agentic/runner/v1/io_pb";
/** A single segment of the breadcrumb path bar. */
export interface PathSegment {
    /** Display name (directory name, or "/" for root). */
    readonly name: string;
    /** Absolute path up to and including this segment. */
    readonly path: string;
}
/** Return value of {@link useRunnerFileBrowser}. */
export interface UseRunnerFileBrowserReturn {
    /** Current resolved absolute path. */
    readonly currentPath: string;
    /** Directory entries for the current path. */
    readonly entries: readonly DirectoryEntry[];
    /** Breadcrumb segments for the current path. */
    readonly segments: readonly PathSegment[];
    /** Runner's home directory (enables Home shortcut). */
    readonly homeDirectory: string;
    /** Runner process's current working directory (enables CWD shortcut). */
    readonly currentDirectory: string;
    /** Whether hidden files are shown. */
    readonly showHidden: boolean;
    /** Toggle hidden file visibility. */
    readonly toggleHidden: () => void;
    /** True while a directory listing is in flight. */
    readonly isLoading: boolean;
    /** Error from the last navigation attempt. */
    readonly error: Error | null;
    /** Navigate into a child directory by name. */
    readonly navigateTo: (name: string) => void;
    /** Navigate to an absolute path. */
    readonly navigateToPath: (path: string) => void;
    /** Navigate to the parent directory. */
    readonly navigateUp: () => void;
    /** Navigate to the runner's home directory. */
    readonly navigateHome: () => void;
    /** Navigate to the runner's current working directory. */
    readonly navigateCwd: () => void;
    /** Retry the last failed navigation. */
    readonly retry: () => void;
    /** True when at the filesystem root (no parent). */
    readonly isAtRoot: boolean;
}
/**
 * Behavior hook that drives a filesystem browser against a connected runner.
 *
 * Sends `ListDirectory` commands via the runner's bidi stream (through the
 * `sendCommand` unary RPC) and manages navigation state, breadcrumbs,
 * loading/error handling, and hidden file filtering.
 *
 * Designed for composition with {@link RunnerFileBrowser} but usable
 * standalone by platform builders who want custom rendering.
 *
 * @param runnerId - ID of the runner to browse. When `null`, the hook
 *   is inert (no requests are made, entries are empty).
 *
 * @example
 * ```tsx
 * function MyFilePicker({ runnerId }: { runnerId: string }) {
 *   const browser = useRunnerFileBrowser(runnerId);
 *
 *   return (
 *     <div>
 *       <p>Path: {browser.currentPath}</p>
 *       {browser.entries
 *         .filter(e => e.isDirectory)
 *         .map(e => (
 *           <button key={e.name} onClick={() => browser.navigateTo(e.name)}>
 *             {e.name}
 *           </button>
 *         ))}
 *     </div>
 *   );
 * }
 * ```
 */
export declare function useRunnerFileBrowser(runnerId: string | null): UseRunnerFileBrowserReturn;
//# sourceMappingURL=useRunnerFileBrowser.d.ts.map