export type OpenPathErrorCode = "PATH_NOT_FOUND" | "UNSUPPORTED_TARGET" | "UNSUPPORTED_PLATFORM" | "LAUNCH_FAILED"; export interface OpenPathSpawnOptions { detached: true; stdio: "ignore"; shell: false; windowsHide?: boolean; env?: NodeJS.ProcessEnv; } export interface OpenPathSpawnedProcess { once(event: "spawn", listener: () => void): this; once(event: "error", listener: (error: Error) => void): this; unref(): void; } export type OpenPathSpawn = (command: string, args: readonly string[], options: OpenPathSpawnOptions) => OpenPathSpawnedProcess; export interface OpenPathOptions { platform?: NodeJS.Platform; environment?: NodeJS.ProcessEnv; spawn?: OpenPathSpawn; } export interface OpenPathResult { resolvedPath: string; platform: NodeJS.Platform; targetType: "file" | "directory"; launcher: "powershell.exe" | "open" | "xdg-open"; launcherAccepted: true; userVisible: "unknown"; fallback: OpenPathFallback; } export type OpenPathFallback = { tool: "fc_preview_file"; arguments: { path: string; include_content: false; }; } | { tool: "fc_list_directory"; arguments: { path: string; depth: 1; }; }; export interface OpenPathStructuredContent { [key: string]: unknown; launcher_accepted: boolean; user_visible: "unknown"; path: string | null; platform: string | null; target_type: "file" | "directory" | null; launcher: OpenPathResult["launcher"] | null; fallback: OpenPathFallback | null; error_code: OpenPathErrorCode | null; } export declare class OpenPathError extends Error { readonly code: OpenPathErrorCode; readonly targetPath?: string | undefined; readonly platform?: NodeJS.Platform | undefined; readonly targetType?: OpenPathResult["targetType"] | undefined; readonly fallback?: OpenPathFallback | undefined; readonly launcher?: OpenPathResult["launcher"] | undefined; constructor(code: OpenPathErrorCode, message: string, targetPath?: string | undefined, platform?: NodeJS.Platform | undefined, targetType?: OpenPathResult["targetType"] | undefined, fallback?: OpenPathFallback | undefined, launcher?: OpenPathResult["launcher"] | undefined); } export declare function createOpenPathStructuredContent(result: OpenPathResult): OpenPathStructuredContent; export declare function createOpenPathErrorStructuredContent(error: OpenPathError, requestedPath: string): OpenPathStructuredContent; export declare function openPath(targetPath: string, options?: OpenPathOptions): Promise; //# sourceMappingURL=open-path.d.ts.map