@promptbook/google
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
61 lines (60 loc) • 2.27 kB
TypeScript
import { string_javascript_name } from '../../_packages/types.index';
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
import { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
/**
* USE BROWSER commitment definition
*
* The `USE BROWSER` commitment indicates that the agent should utilize browser tools
* to access and retrieve up-to-date information from the internet when necessary.
*
* This commitment provides two levels of browser access:
* 1. One-shot URL fetching: Simple function to fetch and scrape URL content
* 2. Running browser: For complex tasks like scrolling, clicking, etc. (prepared but not active yet)
*
* The content following `USE BROWSER` is ignored (similar to NOTE).
*
* Example usage in agent source:
*
* ```book
* USE BROWSER
* USE BROWSER This will be ignored
* ```
*
* @private [🪔] Maybe export the commitments through some package
*/
export declare class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition<'USE BROWSER'> {
constructor();
/**
* The `USE BROWSER` commitment is standalone.
*/
get requiresContent(): boolean;
/**
* Short one-line description of USE BROWSER.
*/
get description(): string;
/**
* Icon for this commitment.
*/
get icon(): string;
/**
* Markdown documentation for USE BROWSER commitment.
*/
get documentation(): string;
/**
* Gets human-readable titles for tool functions provided by this commitment.
*/
getToolTitles(): Record<string_javascript_name, string>;
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
/**
* Gets the browser tool function implementations.
*
* This method automatically detects the environment and uses:
* - Server-side: Direct scraping via fetchUrlContent (Node.js)
* - Browser: Proxy through Agents Server API via fetchUrlContentViaBrowser
*/
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
}
/**
* Note: [💞] Ignore a discrepancy between file name and entity name
*/