/** * The following code is modified based on * https://github.com/nanobrowser/nanobrowser/blob/master/chrome-extension/src/background/agent/actions/schemas.ts * * Apache-2.0 License * Copyright (c) 2024 alexchenzl * https://github.com/nanobrowser/nanobrowser/blob/master/LICENSE */ import { z } from 'zod'; export interface ActionSchema { name: string; description: string; schema: T; } export declare const doneActionSchema: { readonly name: "done"; readonly description: "Complete task"; readonly schema: z.ZodObject<{ text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; }, { text: string; }>; }; export declare const searchGoogleActionSchema: { readonly name: "search_google"; readonly description: "Search Google in the current tab"; readonly schema: z.ZodObject<{ query: z.ZodString; }, "strip", z.ZodTypeAny, { query: string; }, { query: string; }>; }; export declare const goToUrlActionSchema: { readonly name: "go_to_url"; readonly description: "Navigate to URL in the current tab"; readonly schema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; }; export declare const goBackActionSchema: { readonly name: "go_back"; readonly description: "Go back to the previous page"; readonly schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; }; export declare const clickElementActionSchema: { readonly name: "click_element"; readonly description: "Click element"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; index: z.ZodNumber; xpath: z.ZodOptional; }, "strip", z.ZodTypeAny, { index: number; desc?: string | undefined; xpath?: string | undefined; }, { index: number; desc?: string | undefined; xpath?: string | undefined; }>; }; export declare const inputTextActionSchema: { readonly name: "input_text"; readonly description: "Input text into an interactive input element"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; index: z.ZodNumber; text: z.ZodString; xpath: z.ZodOptional; }, "strip", z.ZodTypeAny, { text: string; index: number; desc?: string | undefined; xpath?: string | undefined; }, { text: string; index: number; desc?: string | undefined; xpath?: string | undefined; }>; }; export declare const switchTabActionSchema: { readonly name: "switch_tab"; readonly description: "Switch to tab by id"; readonly schema: z.ZodObject<{ tab_id: z.ZodString; }, "strip", z.ZodTypeAny, { tab_id: string; }, { tab_id: string; }>; }; export declare const openTabActionSchema: { readonly name: "open_tab"; readonly description: "Open URL in new tab"; readonly schema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; }; export declare const extractContentActionSchema: { readonly name: "extract_content"; readonly description: "Extract page content to retrieve specific information from the page, e.g. all company names, a specifc description, all information about, links with companies in structured format or simply links"; readonly schema: z.ZodObject<{ goal: z.ZodString; }, "strip", z.ZodTypeAny, { goal: string; }, { goal: string; }>; }; export declare const cacheContentActionSchema: { readonly name: "cache_content"; readonly description: "Cache the extracted content of the page"; readonly schema: z.ZodObject<{ content: z.ZodString; }, "strip", z.ZodTypeAny, { content: string; }, { content: string; }>; }; export declare const scrollDownActionSchema: { readonly name: "scroll_down"; readonly description: "Scroll down the page by pixel amount - if no amount is specified, scroll down one page"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; amount: z.ZodOptional; }, "strip", z.ZodTypeAny, { desc?: string | undefined; amount?: number | undefined; }, { desc?: string | undefined; amount?: number | undefined; }>; }; export declare const scrollUpActionSchema: { readonly name: "scroll_up"; readonly description: "Scroll up the page by pixel amount - if no amount is specified, scroll up one page"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; amount: z.ZodOptional; }, "strip", z.ZodTypeAny, { desc?: string | undefined; amount?: number | undefined; }, { desc?: string | undefined; amount?: number | undefined; }>; }; export declare const sendKeysActionSchema: { readonly name: "send_keys"; readonly description: "Send strings of special keys like Backspace, Insert, PageDown, Delete, Enter. Shortcuts such as `Control+o`, `Control+Shift+T` are supported as well. This gets used in keyboard press. Be aware of different operating systems and their shortcuts"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; keys: z.ZodString; }, "strip", z.ZodTypeAny, { keys: string; desc?: string | undefined; }, { keys: string; desc?: string | undefined; }>; }; export declare const scrollToTextActionSchema: { readonly name: "scroll_to_text"; readonly description: "If you dont find something which you want to interact with, scroll to it"; readonly schema: z.ZodObject<{ desc: z.ZodOptional; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; desc?: string | undefined; }, { text: string; desc?: string | undefined; }>; }; export declare const getDropdownOptionsActionSchema: { readonly name: "get_dropdown_options"; readonly description: "Get all options from a native dropdown"; readonly schema: z.ZodObject<{ index: z.ZodNumber; }, "strip", z.ZodTypeAny, { index: number; }, { index: number; }>; }; export declare const selectDropdownOptionActionSchema: { readonly name: "select_dropdown_option"; readonly description: "Select dropdown option for interactive element index by the text of the option you want to select"; readonly schema: z.ZodObject<{ index: z.ZodNumber; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; index: number; }, { text: string; index: number; }>; }; //# sourceMappingURL=schemas.d.ts.map