import type { InternalResource, InternalUrl, ProtocolHandler } from "./types"; export interface LocalProtocolOptions { getArtifactsDir?: () => string | null; getSessionId?: () => string | null; } export declare function resolveLocalRoot(options: LocalProtocolOptions): string; export declare function resolveLocalUrlToPath(input: string | InternalUrl, options: LocalProtocolOptions): string; /** * Protocol handler for local:// URLs. * * URL forms: * - local:// - Lists files at the session local root * - local:// - Reads a file under the session local root */ export declare class LocalProtocolHandler implements ProtocolHandler { #private; readonly scheme = "local"; readonly immutable = false; /** * Install a process-global override that wins over the AgentRegistry-based * derivation. Used by SDK consumers that wire `localProtocolOptions` on * `createAgentSession` and by subagents that share their parent's root. */ static setOverride(value: LocalProtocolOptions | undefined): void; /** Reset the process-global override. Test-only. */ static resetOverrideForTests(): void; /** * Returns the active local-protocol options. * * Resolution order: * 1. Explicit override installed via {@link setOverride} (used by subagents * that share their parent's root and by SDK consumers with a custom * artifacts/session id mapping). * 2. The main session in `AgentRegistry.global()`. Its `SessionManager` * supplies both `getArtifactsDir` and `getSessionId`. */ static resolveOptions(): LocalProtocolOptions | undefined; resolve(url: InternalUrl): Promise; }