@sema-agent/core
Version:
Stateless, task-oriented AI agent core
8 lines (7 loc) • 596 B
TypeScript
import type { Tool, ToolCall } from "./types.js";
/** Finds the target tool and validates/coerces a model-emitted tool call. */
export declare function validateToolCall(tools: Tool[], toolCall: ToolCall): unknown;
/** VENDORED EDIT (design/115 P0): resolve canonical tool names first, then legacy aliases. */
export declare function findToolByName<T extends Tool>(tools: readonly T[] | undefined, name: string): T | undefined;
/** Validates tool arguments against TypeBox or plain JSON-schema parameters. */
export declare function validateToolArguments(tool: Tool, toolCall: ToolCall): unknown;