/** * The following code is modified based on * https://github.com/nanobrowser/nanobrowser/blob/master/chrome-extension/src/background/agent/agents/navigator.ts * * Apache-2.0 License * Copyright (c) 2024 alexchenzl * https://github.com/nanobrowser/nanobrowser/blob/master/LICENSE */ import { z } from 'zod'; import { BaseAgent, type BaseAgentOptions, type ExtraAgentOptions } from './base'; import { type AgentOutput } from '../types'; import type { Action } from '../actions/builder'; import { type BaseMessage } from '@langchain/core/messages'; export declare class NavigatorActionRegistry { private actions; constructor(actions: Action[]); registerAction(action: Action): void; unregisterAction(name: string): void; getAction(name: string): Action | undefined; setupModelOutputSchema(): z.ZodType; } export interface NavigatorResult { done: boolean; } export declare class NavigatorAgent extends BaseAgent { private actionRegistry; constructor(actionRegistry: NavigatorActionRegistry, options: BaseAgentOptions, extraOptions?: Partial); invoke(inputMessages: BaseMessage[]): Promise; execute(): Promise>; /** * Add the state message to the memory */ addStateMessageToMemory(): Promise; /** * Remove the last state message from the memory */ protected removeLastStateMessageFromMemory(): Promise; private doMultiAction; } //# sourceMappingURL=navigator.d.ts.map