UNPKG

@gacua/backend

Version:

GACUA Backend

54 lines (53 loc) 1.71 kB
/** * @license * Copyright 2025 MuleRun * SPDX-License-Identifier: Apache-2.0 */ import type { Part } from '@google/genai'; import { type GroundedToolCall, BaseGroundableTool } from './groundable-tool.js'; import { type Box, type Image } from '../screen.js'; export interface ComputerTypeArgs { text: string; image_id?: number; element_description?: string; overwrite?: boolean; enter?: boolean; } export declare class ComputerType extends BaseGroundableTool<ComputerTypeArgs> { readonly functionDeclaration: { name: string; parametersJsonSchema: { properties: { image_id: { description: string; type: string; minimum: number; }; element_description: { description: string; type: string; }; text: { description: string; type: string; }; overwrite: { description: string; type: string; default: boolean; }; enter: { description: string; type: string; default: boolean; }; }; required: string[]; type: string; }; }; validate(args: unknown): string | null; ground(args: ComputerTypeArgs, screenshot: Image, croppedScreenshotParts: { imagePart: Part; }[], detectElement: (imagePart: Part, elementDescription: string) => Promise<Box>): Promise<GroundedToolCall | string>; }