UNPKG

@promptbook/remote-client

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

47 lines (46 loc) 1.73 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions'; import type { string_javascript_name } from '../../types/string_person_fullname'; import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition'; /** * USE POPUP commitment definition * * The `USE POPUP` commitment indicates that the agent can open a popup window with a specific website. * This is useful, for example, when the agent writes a post on Facebook but wants the user to post it on Facebook. * * Example usage in agent source: * * ```book * USE POPUP Allow to open Facebook and Linkedin * ``` * * @private [🪔] Maybe export the commitments through some package */ export declare class UsePopupCommitmentDefinition extends BaseCommitmentDefinition<'USE POPUP'> { constructor(); /** * The `USE POPUP` commitment is standalone or with instructions. */ get requiresContent(): boolean; /** * Short one-line description of USE POPUP. */ get description(): string; /** * Icon for this commitment. */ get icon(): string; /** * Markdown documentation for USE POPUP commitment. */ get documentation(): string; applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements; /** * Gets human-readable titles for tool functions provided by this commitment. */ getToolTitles(): Record<string_javascript_name, string>; /** * Gets the `open_popup` tool function implementation. */ getToolFunctions(): Record<string_javascript_name, ToolFunction>; }