import { $i as NodeExecutionContext, $t as ConnectionInvocationId, Ao as CredentialRequirement, Et as Expr, Go as NodeConnectionName, Ko as NodeId, Or as NodeConfigBase, Rr as NodeOutputs, Tr as JsonValue, Un as TypeToken, Xr as RunnableNodeInputJson, Y as McpServerDeclaration, Ya as TelemetrySpanScope, Yr as RunnableNodeConfig, br as Items, vr as Item } from "./index-CRv3_pY3.js"; import { ZodType, input, output } from "zod"; //#region src/ai/NodeBackedToolConfig.d.ts declare class NodeBackedToolConfig, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig { readonly name: string; readonly node: TNodeConfig; readonly type: TypeToken; readonly toolKind: "nodeBacked"; readonly description?: string; readonly presentation?: AgentCanvasPresentation; readonly onRejected?: "halt" | "return"; private readonly inputSchemaValue; private readonly outputSchemaValue; private readonly mapInputValue?; private readonly mapOutputValue?; constructor(name: string, node: TNodeConfig, options: NodeBackedToolConfigOptions); getCredentialRequirements(): ReadonlyArray; getInputSchema(): TInputSchema; getOutputSchema(): TOutputSchema; toNodeItem(args: NodeBackedToolInputMapperArgs>): Item>; toToolOutput(args: NodeBackedToolOutputMapperArgs>): output; private readDefaultToolOutput; private isItem; } //#endregion //#region src/ai/CallableToolConfig.d.ts type CallableToolExecuteHandler = (args: ToolExecuteArgs, input>) => Promise> | output; type CallableToolConfigOptions = Readonly<{ name: string; description?: string; presentation?: AgentCanvasPresentation; inputSchema: TInputSchema; outputSchema: TOutputSchema; credentialRequirements?: ReadonlyArray; execute: CallableToolExecuteHandler; }>; declare class CallableToolConfig implements ToolConfig { readonly name: string; readonly type: TypeToken; readonly toolKind: "callable"; readonly description?: string; readonly presentation?: AgentCanvasPresentation; private readonly inputSchemaValue; private readonly outputSchemaValue; private readonly credentialRequirementsValue?; private readonly executeHandler; constructor(name: string, options: CallableToolConfigOptions); getCredentialRequirements(): ReadonlyArray; getInputSchema(): TInputSchema; getOutputSchema(): TOutputSchema; executeTool(args: ToolExecuteArgs, input>): Promise>; private parseInput; private parseOutput; private decorateValidationError; } //#endregion //#region src/ai/CallableToolFactory.d.ts declare class CallableToolFactoryImpl { callableTool(options: CallableToolConfigOptions): CallableToolConfig; } declare const CallableToolFactory: CallableToolFactoryImpl; //#endregion //#region src/ai/CallableToolKindToken.d.ts declare class CallableToolKindToken {} //#endregion //#region src/ai/AgentToolFactory.d.ts declare class AgentToolFactoryImpl { asTool, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(node: TNodeConfig, options: Readonly<{ name?: string; } & NodeBackedToolConfigOptions>): NodeBackedToolConfig; private withDefaultAgentInputMapper; private mergeAgentToolInputWithCurrentItem; private isMergeableRecord; } declare const AgentToolFactory: AgentToolFactoryImpl; //#endregion //#region src/ai/AgentMessageConfigNormalizerFactory.d.ts declare class AgentMessageConfigNormalizer { static resolveFromInputOrConfig(input: unknown, config: AgentNodeConfig, args: AgentMessageBuildArgs): ReadonlyArray; static normalize(config: AgentNodeConfig, args: AgentMessageBuildArgs): ReadonlyArray; private static tryMessagesFromStructuredInput; private static normalizeRichMessages; private static lineToDto; } //#endregion //#region src/ai/AgentConfigInspectorFactory.d.ts declare class AgentConfigInspector { static isAgentNodeConfig(config: NodeConfigBase | undefined): config is AgentNodeConfig; private static hasCompatibleMessageConfiguration; } //#endregion //#region src/ai/AiHost.d.ts interface AgentCanvasPresentation { readonly label?: string; readonly icon?: TIcon; } type ZodSchemaAny = ZodType; interface ToolConfig { readonly type: TypeToken; readonly name: string; readonly description?: string; readonly presentation?: AgentCanvasPresentation; getCredentialRequirements?(): ReadonlyArray; } type ToolExecuteArgs = Readonly<{ config: TConfig; input: TInput; ctx: NodeExecutionContext; item: Item; itemIndex: number; items: Items; hooks?: Readonly<{ parentSpan?: TelemetrySpanScope; parentInvocationId?: ConnectionInvocationId; }>; }>; interface Tool { readonly defaultDescription: string; readonly inputSchema: TInputSchema; readonly outputSchema: TOutputSchema; execute(args: ToolExecuteArgs>): Promise> | output; } type AgentTool = Tool; type AgentToolExecuteArgs = ToolExecuteArgs; type AgentToolToken = TypeToken>; type AgentMessageRole = "system" | "user" | "assistant"; type AgentMessageBuildArgs = Readonly<{ item: Item; itemIndex: number; items: Items; ctx: NodeExecutionContext; }>; interface AgentMessageDto { readonly role: AgentMessageRole; readonly content: string; } type AgentMessageTemplateContent = string | ((args: AgentMessageBuildArgs) => string); interface AgentMessageTemplate { readonly role: AgentMessageRole; readonly content: AgentMessageTemplateContent; } type AgentMessageLine = AgentMessageDto | AgentMessageTemplate; type AgentMessageConfig = Expr>, TInputJson> | ReadonlyArray> | { readonly prompt?: ReadonlyArray>; readonly buildMessages?: (args: AgentMessageBuildArgs) => ReadonlyArray; }; type AgentTurnLimitBehavior = "error" | "respondWithLastMessage"; interface AgentModelInvocationOptions { readonly maxTokens?: number; readonly providerOptions?: Readonly>; } interface AgentGuardrailConfig { readonly maxTurns?: number; readonly onTurnLimitReached?: AgentTurnLimitBehavior; readonly modelInvocationOptions?: AgentModelInvocationOptions; } declare const AgentGuardrailDefaults: { readonly maxTurns: 10; readonly onTurnLimitReached: AgentTurnLimitBehavior; }; interface AgentToolDefinition { readonly name: string; readonly description: string; readonly inputSchema: ZodSchemaAny; } type AgentToolCall = Readonly<{ id?: string; name: string; input: unknown; }>; type AgentToolCallPlanner<_TNodeConfig = unknown> = (item: Item, index: number, items: Items, ctx: NodeExecutionContext) => ReadonlyArray; interface ChatModelConfig { readonly type: TypeToken>; readonly name: string; readonly provider?: string; readonly modelName?: string; readonly presentation?: AgentCanvasPresentation; getCredentialRequirements?(): ReadonlyArray; } interface ChatLanguageModel { readonly languageModel: unknown; readonly modelName: string; readonly provider?: string; readonly defaultCallOptions?: ChatLanguageModelCallOptions; } interface ChatLanguageModelCallOptions { readonly maxOutputTokens?: number; readonly temperature?: number; readonly providerOptions?: Readonly>>>; } interface StructuredOutputOptions { readonly schemaName?: string; readonly strict?: boolean; } interface ChatModelFactory { create(args: Readonly<{ config: TConfig; ctx: NodeExecutionContext; }>): Promise | ChatLanguageModel; } type NodeBackedToolInputMapperArgs, TToolInput = unknown> = Readonly<{ input: TToolInput; item: Item; itemIndex: number; items: Items; ctx: NodeExecutionContext; node: TNodeConfig; }>; type NodeBackedToolOutputMapperArgs, TToolInput = unknown> = Readonly<{ input: TToolInput; item: Item; itemIndex: number; items: Items; ctx: NodeExecutionContext; node: TNodeConfig; outputs: NodeOutputs; }>; type NodeBackedToolInputMapper, TToolInput = unknown> = (args: NodeBackedToolInputMapperArgs) => Item> | RunnableNodeInputJson; type NodeBackedToolOutputMapper, TToolInput = unknown, TToolOutput = unknown> = (args: NodeBackedToolOutputMapperArgs) => TToolOutput; type NodeBackedToolConfigOptions, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> = Readonly<{ description?: string; presentation?: AgentCanvasPresentation; inputSchema: TInputSchema; outputSchema: TOutputSchema; mapInput?: NodeBackedToolInputMapper>; mapOutput?: NodeBackedToolOutputMapper, output>; onRejected?: "halt" | "return"; }>; interface AgentNodeConfig extends RunnableNodeConfig { readonly messages: AgentMessageConfig; readonly chatModel: ChatModelConfig; readonly tools?: ReadonlyArray; readonly guardrails?: AgentGuardrailConfig; readonly outputSchema?: ZodType; } type AgentAttachmentRole = "languageModel" | "tool" | "nestedAgent"; //#endregion //#region src/ai/AgentConnectionNodeCollector.d.ts type AgentConnectionNodeRole = "languageModel" | "tool" | "nestedAgent"; type AgentConnectionCredentialSource = Readonly<{ getCredentialRequirements?(): ReadonlyArray; }>; type AgentConnectionNodeDescriptor = Readonly<{ nodeId: NodeId; parentNodeId: NodeId; connectionName: NodeConnectionName; role: AgentConnectionNodeRole; name: string; typeName: string; icon?: string; credentialSource: AgentConnectionCredentialSource; }>; type McpServerResolver = (id: string) => McpServerDeclaration | undefined; type AgentConnectionNodeCollectorApi = Readonly<{ collect(parentNodeId: NodeId, agentConfig: AgentNodeConfig, mcpServerResolver?: McpServerResolver): ReadonlyArray; }>; declare const AgentConnectionNodeCollector: AgentConnectionNodeCollectorApi; //#endregion //#region src/serialization/ItemsInputNormalizer.d.ts declare class ItemsInputNormalizer { normalize(raw: unknown): Items; private normalizeItem; private isItem; } //#endregion export { ChatModelFactory as A, ZodSchemaAny as B, AgentToolDefinition as C, ChatLanguageModel as D, AgentTurnLimitBehavior as E, NodeBackedToolOutputMapperArgs as F, CallableToolFactory as G, AgentMessageConfigNormalizer as H, StructuredOutputOptions as I, CallableToolExecuteHandler as J, CallableToolConfig as K, Tool as L, NodeBackedToolInputMapper as M, NodeBackedToolInputMapperArgs as N, ChatLanguageModelCallOptions as O, NodeBackedToolOutputMapper as P, ToolConfig as R, AgentToolCallPlanner as S, AgentToolToken as T, AgentToolFactory as U, AgentConfigInspector as V, CallableToolKindToken as W, NodeBackedToolConfig as Y, AgentMessageTemplateContent as _, AgentConnectionNodeRole as a, AgentTool as b, AgentCanvasPresentation as c, AgentMessageBuildArgs as d, AgentMessageConfig as f, AgentMessageTemplate as g, AgentMessageRole as h, AgentConnectionNodeDescriptor as i, NodeBackedToolConfigOptions as j, ChatModelConfig as k, AgentGuardrailConfig as l, AgentMessageLine as m, AgentConnectionCredentialSource as n, McpServerResolver as o, AgentMessageDto as p, CallableToolConfigOptions as q, AgentConnectionNodeCollector as r, AgentAttachmentRole as s, ItemsInputNormalizer as t, AgentGuardrailDefaults as u, AgentModelInvocationOptions as v, AgentToolExecuteArgs as w, AgentToolCall as x, AgentNodeConfig as y, ToolExecuteArgs as z }; //# sourceMappingURL=ItemsInputNormalizer-D2vrMrX1.d.ts.map