/** The contract's version. It is part of every look's memo key, so a changed contract never reuses an old answer. */ export declare const CONTRACT_VERSION = 1; /** The `read` arguments beyond the file tool's own (`path`, `offset`, `limit`): the question to answer about media, * the window of a video, the page of a document, and the character offset into a long line. */ export declare const READ_MEDIA_PARAMETERS: Readonly>>; /** What `read` says about media, appended to the file tool's own description. */ export declare const READ_MEDIA_DESCRIPTION: string; /** The `read` arguments this contract adds, in the order a host lists them. */ export declare const READ_MEDIA_ARGUMENTS: readonly string[]; /** A file tool's definition with the media arguments and description added: its own description, then the media * text; its own properties, then the media ones. Nothing else of the tool changes. */ export declare function withReadMedia; }; }>(tool: T): T; /** `vision.see`, a global of a host's code-mode sandbox (pi-codemode's `globals`): its name, the doc comment and the * signature the model reads in the sandbox's declarations. It adds no tool to the model's list. */ export declare const VISION_SEE: Readonly<{ readonly name: "vision.see"; readonly description: "Have a vision model answer `ask` about images your code made or holds: image files by path (rendered pages, video frames, crops) or image blocks, and video clips when the vision model takes video. Each image is fitted to the vision model's limits and they go in as few requests as fit. `fragments` names where each image came from (report.pdf#page=3, talk.mp4#t=62), in order: images, then paths; a path names itself by default. Several requests come back as one text, each part headed by its fragments and receipt. It returns the answer, the vision model, the price in dollars (null when unknown) and the receipts to cite, one a request in order; `kept` is true when every answer was one this call had already paid for. A look that cannot be made throws an Error whose message starts with its miss code."; readonly signature: "(request: { ask: string; paths?: string[]; images?: { type: \"image\"; data: string; mimeType: string }[]; fragments?: string[] }): Promise<{ text: string; model: string; costUsd: number | null; receipts: string[]; kept?: true }>"; }>; /** `vision.judge`, a global of a host's code-mode sandbox beside `vision.see`: Jev's typed answers about images. */ export declare const VISION_JUDGE: Readonly<{ readonly name: "vision.judge"; readonly description: "Have Jev, a fast and cheap judge, answer typed questions about images: choice (one of your labels, with a probability each), noul (yes or no, as the probability of yes), score (a level of your rubric) and box (where a thing is). One call is one request. The images (files by path or image blocks, each fitted to Jev's limits) are `state.images`, in order, as `{ source, image }`, `source` being the image's fragment: refer to one as `images[0].image`. `examples` are more images, such as examples that define a choice's labels: write a key of it (\"\") in a question's instructions or criteria where the image belongs. `state` adds fields of your own. With no image at all the call is a text judgment: put the text in `state`, write its field names in the instructions, and ask `choice`, `noul` or `score`; a `box` always needs an image. A box is always given, even when the thing is absent, so ask a noul whether it is there; its `fragment` is the region it found, as file#xywh=percent:x,y,w,h of the image `image` names (an index, default 0). Returns the answers, the model, the price in dollars and the receipts. A look that cannot be made throws an Error whose message starts with its miss code."; readonly signature: "(request: { questions: { [name: string]: { type: \"choice\" | \"noul\" | \"score\" | \"box\"; instructions?: unknown; criteria?: unknown; image?: number } }; paths?: string[]; images?: { type: \"image\"; data: string; mimeType: string }[]; fragments?: string[]; examples?: { [reference: string]: string | { type: \"image\"; data: string; mimeType: string } }; state?: { [field: string]: unknown } }): Promise<{ answers: { [name: string]: { type: string; choice?: string; noul?: number; score?: number; confidence?: number | null; probabilities?: { [label: string]: number }; box?: { top: number; bottom: number; left: number; right: number }; fragment?: string } }; model: string; costUsd: number | null; receipts: string[]; kept?: true }>"; }>; /** `vision.transcribe`, a global of a host's code-mode sandbox beside `vision.see`: what is said in a recording. */ export declare const VISION_TRANSCRIBE: Readonly<{ readonly name: "vision.transcribe"; readonly description: "Have the host's speech-to-text model write what is said in one audio or video file, as words with their start and end in seconds of that file. The host picks the model and pays for it. A file over the model's limit throws an over_budget miss that names the limit: cut it into pieces with ffmpeg, transcribe each, and add each piece's start to its words. Returns the words, the whole text, the provider and model, the price in dollars (null when unknown) and the receipt to cite; `kept` is true when this file was already transcribed, which costs nothing. A transcription that cannot be made throws an Error whose message starts with its miss code."; readonly signature: "(request: { path: string; fragment?: string; language?: string }): Promise<{ words: { text: string; start: number; end: number }[]; text: string; provider: string; model: string; costUsd: number | null; receipts: string[]; kept?: true }>"; }>; /** The static section a host renders once in the system prompt. Nothing live enters it. */ export declare const VISION_SECTION_HEADING = "LOOKING AT FILES"; /** The section's body: what `read` shows for each kind of file, and where the agent looks for many pages or a long video. */ export declare const VISION_SECTION_TEXT = "read shows you a file: text for documents and spreadsheets, the image itself for pictures and scans, frames for video. For many pages, a long video or many images, render them with bash (pdftoppm, ffmpeg) and call vision.see from code mode: a vision model answers about them and you get its words and what it cost; vision.judge has Jev give typed answers (a label, a yes or no, a score, where a thing is) for a fraction of a cent. Every look is filed under evidence/ and is citable: cite the receipt, and the place as file#page=N or file#t=seconds."; /** The section, with the host's addendum after it when there is one. */ export declare function visionSection(addendum?: string): string; /** Why a look or a read could not give the model what it asked for. The first three are the codes hosts already write * on their rows; a miss is text the model can act on, a refusal of arguments is an error. */ export declare const MISS_CODES: readonly ["no_vision_route", "look_failed", "video_unseeable", "over_budget", "needs", "unsupported", "unreadable", "not_ready", "refused"]; /** One of `MISS_CODES`: the code a miss is named by in a row, a receipt and the model's first line. */ export type MissCode = (typeof MISS_CODES)[number];