UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

15 lines (14 loc) • 960 B
/** * The `TaskSpec.images` INLINE arm's admission: the same byte admission a file the Read tool serves passes * (image-admission.ts) — a claimed type the API accepts, within the raw cap, that type's signature, under * the provider's base64 limit. Without it a mis-declared image rode straight to the provider and 400'd the whole * request. Like the Read lane it checks the SIGNATURE, not decodability: a file cut short after its signature * passes (KL-1311a-c). No downsampling here: this arm only refuses what would not survive the wire, and a * valid image reaches the model unchanged. The block is built from the bytes that were checked. */ import type { ImageContent } from "../../internal/llm.js"; import type { ImageInput } from "../types.js"; /** Admit one inline entry (`{ data, mimeType }`) or throw `config.image_invalid`. */ export declare function admitInlineImage(img: Extract<ImageInput, { data: string; }>): Promise<ImageContent>;