/** * Z.AI Provider Media Module (DESIGN.md §9 — P3-02). * * Owns Z.AI-local media facts: accepted image and video extensions, size * limits, existence checks, and absolute-path resolution. Commands pass * raw path-or-URL strings; this module is the single owner of every * Provider-specific media decision for Z.AI. * * Boundary rules (ARCHITECTURE.md §2): * - May import normalized errors from `lib/errors.ts`. * - Must NOT read file content. The Z.AI MCP receives the validated * absolute path; it never receives a data URI or file bytes from * this module. Only `stat` (existence + size) is performed. * * Media rules (DESIGN.md §9 Z.AI): * - Local image: JPG, JPEG, PNG (case-insensitive), at most 5 MiB. * - Local video: preserve the Phase 0 extension set and 8 MiB limit. * - Local source becomes an absolute path after validation. * - HTTP(S) source passes through without local filesystem access. * - Missing local file rejects with `FILE_ERROR`. * - Non-HTTP URL-like strings and unsupported extensions reject with * `VALIDATION_ERROR` and Provider-specific supported-format help. */ /** * Resolve a Z.AI image source into the value the Z.AI MCP consumes. For a * local file, validates existence, size (≤ 5 MiB), and extension * (JPG/JPEG/PNG) and returns the absolute path. For an HTTP(S) URL, * returns the URL unchanged without touching the local filesystem. */ export declare function resolveImageSource(source: string): string; /** * Resolve a Z.AI video source into the value the Z.AI MCP consumes. For a * local file, validates existence, size (≤ 8 MiB), and extension (the * Phase 0 set) and returns the absolute path. For an HTTP(S) URL, returns * the URL unchanged. */ export declare function resolveVideoSource(source: string): string; /** * Fetch an HTTP(S) image URL to a validated temp file path (≤ 5 MiB, * JPG/JPEG/PNG). Used by the vision Adapter fallback when the Provider's * server-side fetcher rejects a URL. The caller owns unlinking the path. */ export declare function fetchImageSource(url: string): Promise; /** * Fetch an HTTP(S) video URL to a validated temp file path (≤ 8 MiB, * the Phase 0 extension set). Used by the vision Adapter fallback when * the Provider's server-side fetcher rejects a URL. The caller owns * unlinking the path. */ export declare function fetchVideoSource(url: string): Promise; //# sourceMappingURL=media.d.ts.map