ToolContracts
Unpublished development API. This package is under development and is not available as a published release.
Derives each catalog tool's argument and awaited result types from its handler signature.
import type { ToolContracts } from '@threadplane/core/tools';Declaration
export type ToolContracts<T extends Record<string, FunctionToolDefinition>> = {
[K in keyof T]: {
args: Parameters<T[K]['handler']>[0];
result: Awaited<ReturnType<T[K]['handler']>>;
};
};Type parameters
TRecord<string, FunctionToolDefinition>