UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

38 lines (37 loc) 1.68 kB
import type { Experimental_EvaluationModel as EvaluationModel } from "ai"; import type { ApprovalPolicy } from "#approval/definition.js"; export interface AutoApprovalOptions { /** Evaluation model instance or ID. Defaults to TypeSafe Jev. */ readonly model?: EvaluationModel; /** Instructions used to classify the exact tool call. */ readonly instructions?: string; /** Descriptions of the fixed approval outcomes. */ readonly criteria?: { readonly clear?: string; readonly caution?: string; }; } /** * Returns an `approval` callback that asks an AI SDK evaluation model whether * the exact tool call presents concrete security danger. Defaults to TypeSafe Jev. * Unavailable or invalid evaluations require user approval. */ export declare function auto<TInput = unknown>(options?: AutoApprovalOptions): ApprovalPolicy<TInput>; /** * Returns an `approval` callback that always requires user approval before * the tool executes. */ export declare function always<TInput = unknown>(): ApprovalPolicy<TInput>; /** * Returns an `approval` callback that never requires user approval before * the tool executes. */ export declare function never<TInput = unknown>(): ApprovalPolicy<TInput>; /** * Returns an `approval` callback that requires approval until the user * approves this tool once in the current session. A tool is recorded as * approved only on an explicit approval; a denial (or continuing without * responding) leaves it unrecorded, so the next call prompts again. Keys off * the bare tool name, so it ignores compound approval keys. */ export declare function once<TInput = unknown>(): ApprovalPolicy<TInput>;