import { Mr as AgentToolResult, Nr as AgentToolUpdateCallback, jr as AgentToolProgress, kr as AgentTool } from "./proxy-B6W6GCLx.js"; import { TSchema } from "typebox"; //#region src/agents/image-sanitization.d.ts type ImageSanitizationLimits = { maxDimensionPx?: number; maxBytes?: number; }; //#endregion //#region src/agents/tools/common.d.ts type AgentToolWithMeta = AgentTool & { displaySummary?: string; prepareBeforeToolCallParams?: (params: unknown, ctx: { toolCallId?: string; hookContext?: unknown; signal?: AbortSignal; }) => unknown; finalizeBeforeToolCallParams?: (params: unknown, preparedParams: unknown) => unknown; }; type ErasedAgentToolExecute = { execute(this: void, toolCallId: string, params: unknown, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback): Promise>; }; type AnyAgentTool = Omit & ErasedAgentToolExecute & { displaySummary?: string; prepareBeforeToolCallParams?: AgentToolWithMeta["prepareBeforeToolCallParams"]; finalizeBeforeToolCallParams?: AgentToolWithMeta["finalizeBeforeToolCallParams"]; }; declare function asToolParamsRecord(params: unknown): Record; type StringParamOptions = { required?: boolean; trim?: boolean; label?: string; allowEmpty?: boolean; }; type ActionGate> = (key: keyof T, defaultValue?: boolean) => boolean; declare class ToolInputError extends Error { readonly status: number; constructor(message: string); } declare class ToolAuthorizationError extends ToolInputError { readonly status = 403; constructor(message: string); } declare function createActionGate>(actions: T | undefined): ActionGate; declare function readStringParam(params: Record, key: string, options: StringParamOptions & { required: true; }): string; declare function readStringParam(params: Record, key: string, options?: StringParamOptions): string | undefined; /** * Normalize tool model override input. * - empty/whitespace => undefined * - "default" (case-insensitive) => undefined (sentinel: reset/fallback) * - otherwise returns trimmed explicit model string */ declare function normalizeToolModelOverride(value: string | undefined): string | undefined; declare function readStringOrNumberParam(params: Record, key: string, options?: { required?: boolean; label?: string; }): string | undefined; declare function readNumberParam(params: Record, key: string, options?: { required?: boolean; label?: string; integer?: boolean; strict?: boolean; positiveInteger?: boolean; nonNegativeInteger?: boolean; }): number | undefined; declare function readPositiveIntegerParam(params: Record, key: string, options?: { message?: string; max?: number; }): number | undefined; declare function readNonNegativeIntegerParam(params: Record, key: string, options?: { message?: string; max?: number; }): number | undefined; declare function readFiniteNumberParam(params: Record, key: string, options?: { message?: string; min?: number; max?: number; minExclusive?: boolean; maxExclusive?: boolean; }): number | undefined; declare function readStringArrayParam(params: Record, key: string, options: StringParamOptions & { required: true; }): string[]; declare function readStringArrayParam(params: Record, key: string, options?: StringParamOptions): string[] | undefined; type ReactionParams = { emoji: string; remove: boolean; isEmpty: boolean; }; declare function readReactionParams(params: Record, options: { emojiKey?: string; removeKey?: string; removeErrorMessage: string; }): ReactionParams; declare function stringifyToolPayload(payload: unknown): string; declare function textResult(text: string, details: TDetails): AgentToolResult; declare function failedTextResult(text: string, details: TDetails): AgentToolResult; declare function payloadTextResult(payload: TDetails): AgentToolResult; declare function jsonResult(payload: unknown): AgentToolResult; type PublicToolProgress = Pick; declare function toolProgressResult(progress: PublicToolProgress): AgentToolResult; declare function emitToolProgress(onUpdate: AgentToolUpdateCallback | undefined, progress: PublicToolProgress): void; declare function scheduleToolProgress(onUpdate: AgentToolUpdateCallback | undefined, progress: PublicToolProgress, delayMs: number, options?: { signal?: AbortSignal; }): () => void; declare function imageResult(params: { label: string; path: string; base64: string; mimeType: string; extraText?: string; details?: Record; imageSanitization?: ImageSanitizationLimits; }): Promise>; declare function imageResultFromFile(params: { label: string; path: string; extraText?: string; details?: Record; imageSanitization?: ImageSanitizationLimits; }): Promise>; type AvailableTag = { id?: string; name: string; moderated?: boolean; emoji_id?: string | null; emoji_name?: string | null; }; /** * Validate and parse an `availableTags` parameter from untrusted input. * Returns `undefined` when the value is missing or not an array. * Entries that lack a string `name` are silently dropped. */ declare function parseAvailableTags(raw: unknown): AvailableTag[] | undefined; //#endregion export { textResult as A, readPositiveIntegerParam as C, readStringParam as D, readStringOrNumberParam as E, scheduleToolProgress as O, readNumberParam as S, readStringArrayParam as T, normalizeToolModelOverride as _, PublicToolProgress as a, readFiniteNumberParam as b, ToolAuthorizationError as c, createActionGate as d, emitToolProgress as f, jsonResult as g, imageResultFromFile as h, AvailableTag as i, toolProgressResult as j, stringifyToolPayload as k, ToolInputError as l, imageResult as m, AgentToolWithMeta as n, ReactionParams as o, failedTextResult as p, AnyAgentTool as r, StringParamOptions as s, ActionGate as t, asToolParamsRecord as u, parseAvailableTags as v, readReactionParams as w, readNonNegativeIntegerParam as x, payloadTextResult as y };