/** * `agent exec --attach FILE` (doc/agent-exec-protocol.md §3.1, rev 32, * capability `agent-exec-attachments`): files that go with the prompt. * * The command layer validates the flag (parseAttachFlags: usage error, exit * 2); the engine builds the turn's one user message (execPrompt), per runtime: * - claude: content blocks — an `image` block (base64) per PNG/JPEG/GIF/WebP * and a `document` block per PDF, then the prompt text. Any other file, or * one past the API's limits (bytes below, 8000 px a side, a size that * cannot be read), is listed by path in that text. * - codex: images go to `codex exec --image` (AgentRunArgs.images, the * turn's first exec only); other files are listed by path. * - every other runtime: an "Attached files:" block of absolute paths after * the prompt; the agent opens them with its own file tools. * The type comes from the file's first bytes, never its extension. Without * `--attach` the message is the prompt string, exactly as before. */ export declare const ATTACH_MAX_FILES = 10; export declare const ATTACH_MAX_BYTES: number; /** Parse repeatable `--attach` into absolute paths, or a usage error: each * must be an existing regular file of at most 20 MB, at most 10 files. */ export declare function parseAttachFlags(raw: unknown): { paths: string[]; } | { error: string; }; /** The media type a file's first bytes announce, for the types sent natively. */ export declare function sniffMediaType(head: Uint8Array): string | undefined; /** An image's pixel size from its header bytes (PNG IHDR, JPEG SOFn, GIF * logical screen, WebP VP8/VP8L/VP8X); undefined when it cannot be read. */ export declare function imageSize(d: Buffer): { width: number; height: number; } | undefined; /** The prompt followed by an "Attached files:" block (no paths: the prompt). */ export declare function withFileList(prompt: string, paths: string[]): string; /** Claude content blocks: images and PDFs as base64 blocks, then the text. */ export declare function claudeContent(prompt: string, paths: string[]): Record[]; /** * The turn's single-message prompt stream (the AgentRunArgs.prompt contract) * and, for codex, the images it passes natively. */ export declare function execPrompt(opts: { runtime: string; prompt: string; attachments?: string[]; }): { stream: AsyncIterable; images?: string[]; }; //# sourceMappingURL=agent-exec-attach.d.ts.map