/** * Canonical agent-owned media-store URL recognition, shared by every caller * that fetches attachment bytes with the trusted runtime fetch instead of the * remote SSRF-guarded fetcher. Only exact content-addressed store handles * (`/api/media/.`, or the same path on the agent's own server * origin) qualify — credentials, query strings, fragments, and every other * path are rejected so a persisted attachment row can never induce an * authenticated internal request. Mirrors the boundary predicate used at the * local-inference vision input; keep the two in sync by importing * this module rather than re-deriving the pattern. */ /** Shared byte cap for vision image inputs across caller and handler paths. */ export declare const VISION_IMAGE_MAX_BYTES: number; /** Shared timeout for trusted-local vision image fetches. */ export declare const VISION_IMAGE_FETCH_TIMEOUT_MS = 15000; /** * Resolve a trusted local media-store URL. * * Returns the resolved local URL for a canonical store handle, `null` when * the URL is not local (callers route those through the SSRF-guarded remote * fetcher), and throws `MediaFetchError` for local-looking URLs that are not * canonical handles (non-store `/api/media/…` shapes, credentials, query, * fragment) so they can never be silently fetched with runtime authority. */ export declare function trustedLocalMediaUrl(rawUrl: string): URL | null; /** Resolve the local agent listener used by the content-addressed media store. */ export declare function getLocalServerUrl(path: string): string;