import type { ToolContext, ToolResult } from './types.js'; /** How the calling client exposes its roots. */ export interface ClientRoots { /** Whether the client declared the `roots` capability. */ declared: boolean; /** * Fetches `roots/list` on a 2025-era connection. Absent on 2026-07-28 * connections, which request roots through an input-required round. */ fetch?: () => Promise; } export type ProjectDirectoryDecision = { context: ToolContext; ok: true; } | { ok: false; result: ToolResult; }; /** * Local folders from a `roots/list` result. Accepts `file://` URIs and, since * some clients send them, bare absolute paths; ignores anything else. */ export declare function parseRoots(result: unknown): string[]; /** One per server instance; approvals last until the server stops. */ export declare class ProjectDirectoryGate { private readonly approved; private readonly configured?; private readonly pending; /** Roots received through an input-required round (2026-07-28 connections). */ private roots?; /** @param configured - `--project-directory` / `SFCC_PROJECT_DIRECTORY`, if set */ constructor(configured?: string); /** * Decides whether a call may use `directory`. On success, returns the tool * context to run the handler with, minus any input this gate consumed. */ check(directory: string, context: ToolContext, client: ClientRoots): Promise; private prompt; }