anchorbrowser
Version:
The official TypeScript library for the Anchorbrowser API
28 lines • 1 kB
TypeScript
import type { Browser, Page } from 'playwright';
import { BrowserContext, Worker } from 'playwright';
export interface BrowserSetup {
session: {
data?: {
id?: string;
};
};
browser: Browser;
context: BrowserContext;
page: Page | undefined;
ai: Worker;
}
export type AgentTaskResult = string | {
result: Record<string, unknown>;
};
export interface TaskOptions {
url?: string;
outputSchema?: object;
model?: string;
provider?: string;
onAgentStep?: (step: string) => void;
}
export declare const getPlaywrightChromiumFromCdpUrl: (apiBaseURL: string, sessionId: string, apiKey: string) => Promise<Browser>;
export declare const getCdpUrl: (apiBaseURL: string, sessionId: string, apiKey: string) => string;
export declare const getAgentWsUrl: (apiBaseURL: string, sessionId: string) => string;
export declare const getAiServiceWorker: (browserContext: BrowserContext) => Worker | undefined;
//# sourceMappingURL=browser.d.ts.map