/** * Tool Helpers * * Utilities for tool argument parsing and tool type checking. * * @module ai/agent/runtime/tool-helpers */ import type { RemoteToolSource, Tool, ToolDefinition, ToolExecutionContext } from "../../tool/index.js"; import type { RemoteIntegrationToolDiscoveryResult } from "../../integrations/remote-tools.js"; import { type SourceIntegrationPolicyManifest } from "../../integrations/source-policy.js"; /** * Result of parsing tool arguments. */ export interface ParsedToolArgs { args: Record; error?: string; } /** * Parse tool arguments from raw string or object. * Returns parsed args and optional error message. */ export declare function parseToolArgs(rawArgs: string | Record): ParsedToolArgs; /** * Check if a tool is dynamic (for SSE event formatting). */ export declare function isDynamicTool(name: string): boolean; /** * Tool configuration entry from agent config. * Can be a boolean (true to enable from registry) or a Tool instance. */ export type ToolConfigEntry = Tool | boolean; export declare function resolveConfiguredTool(toolsConfig: true | Record | undefined, toolName: string, context?: ToolExecutionContext, options?: { allowIntegrationStyleConcreteTools?: boolean; }): Tool | null; export declare function executeConfiguredTool(toolName: string, input: Record, toolsConfig: true | Record | undefined, context?: ToolExecutionContext, allowedRemoteToolNames?: string[], remoteToolSources?: RemoteToolSource[], sourceIntegrationPolicy?: SourceIntegrationPolicyManifest, options?: { strictConfiguredToolsOnly?: boolean; }): Promise; /** * Get available tools based on agent configuration. * When tools === true, loads all tools from registry. * Otherwise loads specific tools from config. * * @param toolsConfig - Agent tools configuration * @param options.includeSkillTools - When true, include skill tools for `tools: true` agents */ export declare function getAvailableTools(toolsConfig: true | Record | undefined, options?: { includeSkillTools?: boolean; includeIntegrationTools?: boolean; allowedRemoteToolNames?: string[]; forwardedRemoteToolDefinitions?: ToolDefinition[]; remoteToolSources?: RemoteToolSource[]; remoteToolContext?: ToolExecutionContext; onIntegrationToolDiscovery?: (result: RemoteIntegrationToolDiscoveryResult) => void; sourceIntegrationPolicy?: SourceIntegrationPolicyManifest; strictConfiguredToolsOnly?: boolean; /** Calling agent id for owner-aware tool visibility. */ callerAgentId?: string; }): Promise; //# sourceMappingURL=tool-helpers.d.ts.map