UNPKG

@tanstack/ai

Version:

Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.

29 lines (28 loc) • 899 B
import { Tool } from '../types.js'; /** * Metadata that marks a tool as a portable computer-use tool. Adapters read * it to map the tool to their native computer-use format. */ export interface ComputerUseToolMetadata { __kind: 'computer_use'; display: { width: number; height: number; }; environment: 'browser' | 'linux' | 'mac' | 'windows'; capabilities: { zoom: boolean; cursorPosition: boolean; }; } /** * Read the portable computer-use metadata from a tool. * * Native provider tools use namespaced kinds (for example * `anthropic.computer_use`), so they return `undefined`. * * @param tool - Any tool from the chat tool list. * @returns The metadata, or `undefined` when the tool is not a portable * computer-use tool. */ export declare function getComputerUseToolMetadata(tool: Tool): ComputerUseToolMetadata | undefined;