/** * Marks the durable messages the server writes for a turn it refused before * any run started. On the assistant notice it lets the AgentKit projection hide * it, because the same failure is a failed run the chat renders as a recovery * card. On the user message it tells the setup recovery which prompt was * refused, together with the run id in `submittedRunId`. */ export declare const RUN_NOT_STARTED_METADATA_KEY = "agentNativeRunNotStarted"; /** * What a retry of a refused turn needs besides its text and attachments: * the references and the model, engine, effort and request mode it was sent * with. Only these fields are read from the request; nothing else is kept. */ export interface RefusedTurnRetryContext { references?: RefusedTurnReference[]; model?: string; engine?: string; effort?: string; requestMode?: "act" | "plan"; } /** The bounded shape of a composer reference; anything else is not stored. */ export interface RefusedTurnReference { type: "file" | "skill" | "mention" | "agent" | "custom-agent"; path: string; name: string; source: string; refType?: string; refId?: string; slotKey?: string; slotLabel?: string; metadata?: Record; } /** * Keeps the references that fit the composer's reference shape and size * limits, in order, up to a total serialized budget. `dropped` counts what did * not fit, so the caller can report a request that sent more than it should. */ export declare function boundedRetryReferences(value: unknown): { references: RefusedTurnReference[]; dropped: number; }; export declare function retryContextFromRequest(body: { metadata?: unknown; model?: unknown; engine?: unknown; effort?: unknown; mode?: unknown; }, onDroppedReferences?: (dropped: number) => void): RefusedTurnRetryContext;