AnyFunctionToolDef
Bivariant union member used only for registry storage/iteration. The handler
param is any (NOT never): any is simultaneously a supertype any precise
FunctionToolDef<S,R> is assignable to under strictFunctionTypes, AND
callable by internal code that has narrowed by kind and parsed runtime args.
A never param would satisfy the former but break the latter.
import type { AnyFunctionToolDef } from '@threadplane/chat';Declaration
export interface AnyFunctionToolDef {
readonly description: string;
readonly followUp?: boolean;
readonly handler: (args: any, context: FunctionToolHandlerContext) => unknown | Promise<unknown>;
readonly idempotent?: boolean;
readonly kind: 'function';
readonly schema: StandardSchemaV1;
}Members
description
readonly description: string;followUp
readonly followUp?: boolean;handler
readonly handler: (args: any, context: FunctionToolHandlerContext) => unknown | Promise<unknown>;idempotent
readonly idempotent?: boolean;kind
readonly kind: 'function';schema
readonly schema: StandardSchemaV1;