/**
 * Shared helper — resolve the FileSystemSurface (local or remote) for the
 * current session.
 *
 * Priority:
 * 1. If the session has a running RemoteFileSystemSurface (project lives on
 *    another device, e.g. a Windows desktop while the gateway runs on
 *    Linux), route file ops to it. We never resolve a foreign-platform path
 *    against the gateway's local filesystem — that produced broken paths
 *    like `/home/jakob/E:\Zinsrechner/E:\Zinsrechner`.
 * 2. If `targetPath` is absolute and outside the current project boundary,
 *    find or create a local surface scoped to contain that path.
 * 3. Look for an existing surface with the conventional ID `fs-{sessionId}`
 *    that is running (the auto-created surface for the session).
 * 4. Look for *any* running filesystem surface belonging to the session
 *    (e.g. one started via `surfaces.start` with a custom project root).
 * 5. If nothing exists, auto-start one with `context.projectRoot`.
 *
 * This ensures that when the user asks to read/edit files anywhere on their
 * local filesystem, the agent can access them without "escapes project
 * boundary" errors — while still maintaining PathGuard isolation per surface.
 */
import type { ToolContext } from "../contracts.js";
import type { SurfaceRegistry } from "../../surfaces/registry.js";
import { FileSystemSurface } from "../../surfaces/filesystem.js";
import { RemoteFileSystemSurface } from "../../surfaces/remote-filesystem.js";
/** Union of local + remote filesystem surfaces. */
export type AnyFsSurface = FileSystemSurface | RemoteFileSystemSurface;
export declare function getFs(registry: SurfaceRegistry, context: ToolContext, targetPath?: string): Promise<AnyFsSurface>;
/**
 * Resolve the effective project root for a session.
 *
 * Prefers the most specific (deepest) project root among all running
 * filesystem surfaces (local AND remote) for this session — avoids returning
 * a broad drive root when a more specific project surface exists.
 * Falls back to `process.cwd()`.
 */
export declare function resolveProjectRoot(registry: SurfaceRegistry, sessionId: string, 
/** Optional fallback from session record before falling back to process.cwd() */
sessionProjectPath?: string | null): string;
//# sourceMappingURL=get-fs.d.ts.map