import { type ProviderOptions, type Tool } from "@ai-sdk/provider-utils"; import { type LanguageModel, type StopCondition, type ToolSet } from "ai"; import type * as z4 from "zod/v4"; export type ToolChoiceLimited = "auto" | "none" | "required"; export interface ToolDecoratorSchema { // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- zod type의 타입 추론에 필요 input: z4.core.$ZodType; // oxlint-disable-next-line @typescript-eslint/no-explicit-any -- zod type의 타입 추론에 필요 output?: z4.core.$ZodType; } export interface ToolDecoratorOptions { name?: string; description?: string; schema: ToolDecoratorSchema; needsApproval?: Tool["needsApproval"]; toModelOutput?: Tool["toModelOutput"]; providerOptions?: ProviderOptions; } export type RegisteredToolDefinition = { name: string; description?: string; schema: ToolDecoratorSchema; needsApproval?: Tool["needsApproval"]; toModelOutput?: Tool["toModelOutput"]; providerOptions?: ProviderOptions; method: (...args: unknown[]) => unknown; from: string; }; export interface AgentConfig { model: LanguageModel; instructions?: string; toolChoice?: ToolChoiceLimited; providerOptions?: ProviderOptions; stopWhen?: StopCondition | Array>; activeTools?: Array; maxOutputTokens?: number; temperature?: number; topP?: number; topK?: number; presencePenalty?: number; frequencyPenalty?: number; stopSequences?: string[]; seed?: number; headers?: Record; }