import type { Context, Model } from "@oh-my-pi/pi-ai"; /** * Drops oldest transient image blocks so outgoing vision requests fit the active provider's image cap. * * {@link countImages} counts exactly the roles {@link clampImages} can drop, so the * budget is always fully spendable and the clamp never evicts an input image * on behalf of a model output. */ export declare function clampProviderContextImages(context: Context, model: Model): Context; /** * Drops oldest inline image blocks so their base64 fits the deployment's request-body budget: its inline-image byte * budget and, where the host sets a `request-body-byte-limit`, what the request's other bytes leave of that limit. * Runs after URL/provider-file decoration: blocks the provider receives as references carry no inline bytes. */ export declare function clampProviderContextImageBytes(context: Context, model: Model): Context; /** * Caps snapcompact archive frames at `model`'s frame payload budget. * * The archive is sized when the agent context is built, for the model active then. A later switch to a host with a * smaller budget (`/model`, cycling, retry and role fallbacks, prewalk hand-offs, context promotion, an advisor on * another host) would otherwise resend the larger archive, and hosts without an inline byte budget have no other clamp. * Archive frames are the images of summary (rewritten-history) user messages. */ export declare function capArchiveFrameBytes(context: Context, model: Model): Context; /** * Last line of defence before the wire: an undecodable image makes the provider * reject the entire request rather than the offending block, so one bad payload * anywhere in history leaves the session permanently unable to send. Degrades * those blocks to text and leaves everything else — including the `context` * object itself — untouched. * * Covers all three places outbound image bytes can hide: generic `content`, the * native `providerPayload` items that get replayed in place of that content, and * a computer result's `providerMetadata.screenshot`. Only bytes that actually * travel are checked — see {@link sendsInlineImageBytes}. */ export declare function dropUnreadableContextImages(context: Context, model: Model): Promise;