eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
20 lines (19 loc) • 860 B
TypeScript
import type { ContentPart, ModelMessage, ToolSet } from "ai";
import type { InputRequest } from "#shared/input.js";
/**
* Extracts tool approval input requests from AI SDK content parts that
* contain `tool-approval-request` entries.
*/
export declare function extractToolApprovalInputRequests(input: {
readonly content: readonly ContentPart<ToolSet>[];
readonly excludedCallIds?: ReadonlySet<string>;
}): InputRequest[];
/**
* Recovers approval request metadata for submitted input response IDs from
* model history. The newest occurrence wins so compacted or repeated history
* does not replace the request that is closest to the current turn.
*/
export declare function extractHistoricalInputRequests(input: {
readonly history: readonly ModelMessage[];
readonly requestIds: ReadonlySet<string>;
}): ReadonlyMap<string, InputRequest>;