@agentium/browser 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,330 @@
1
+ import * as _agentium_core from '@agentium/core';
2
+ import { ModelProvider, UnifiedMemoryConfig, CostTracker, LogLevel, EventBus, MemoryManager, ToolDef } from '@agentium/core';
3
+
4
+ /**
5
+ * Secure credential store for BrowserAgent.
6
+ *
7
+ * Secrets are stored in memory and NEVER sent to the LLM.
8
+ * The model works with placeholders (e.g. `{{email}}`, `{{password}}`),
9
+ * and the agent resolves them to real values only at execution time.
10
+ */
11
+ declare class CredentialVault {
12
+ private secrets;
13
+ constructor(initial?: Record<string, string>);
14
+ /** Store a credential. Key names become the placeholder: `{{key}}`. */
15
+ set(key: string, value: string): this;
16
+ /** Retrieve a credential value. Returns undefined if not found. */
17
+ get(key: string): string | undefined;
18
+ has(key: string): boolean;
19
+ /** List available placeholder names (never exposes values). */
20
+ keys(): string[];
21
+ /**
22
+ * Load credentials from environment variables.
23
+ * Maps env var names to placeholder keys.
24
+ *
25
+ * @example
26
+ * vault.fromEnv({ email: "LOGIN_EMAIL", password: "LOGIN_PASS" });
27
+ */
28
+ fromEnv(mapping: Record<string, string>): this;
29
+ /**
30
+ * Replace `{{key}}` placeholders in text with actual credential values.
31
+ * Used internally by BrowserAgent right before executing a type action.
32
+ */
33
+ resolve(text: string): string;
34
+ /**
35
+ * Replace any occurrence of real credential values in text with
36
+ * their `{{key}}` placeholder. Used to sanitize logs and action history.
37
+ */
38
+ mask(text: string): string;
39
+ }
40
+
41
+ type BrowserAction = {
42
+ action: "click";
43
+ x: number;
44
+ y: number;
45
+ description: string;
46
+ } | {
47
+ action: "type";
48
+ text: string;
49
+ x?: number;
50
+ y?: number;
51
+ } | {
52
+ action: "scroll";
53
+ direction: "up" | "down";
54
+ amount?: number;
55
+ } | {
56
+ action: "navigate";
57
+ url: string;
58
+ } | {
59
+ action: "back";
60
+ } | {
61
+ action: "wait";
62
+ ms: number;
63
+ } | {
64
+ action: "screenshot";
65
+ } | {
66
+ action: "done";
67
+ result: string;
68
+ } | {
69
+ action: "fail";
70
+ reason: string;
71
+ };
72
+ interface BrowserAgentConfig {
73
+ name: string;
74
+ /** Vision-capable model (GPT-4o, Gemini, etc.) */
75
+ model: ModelProvider;
76
+ /** Extra instructions appended to the system prompt */
77
+ instructions?: string;
78
+ /** Max vision loop iterations. Default: 30 */
79
+ maxSteps?: number;
80
+ /** Run browser without visible window. Default: true */
81
+ headless?: boolean;
82
+ /** Browser viewport size. Default: 1280x720 */
83
+ viewport?: {
84
+ width: number;
85
+ height: number;
86
+ };
87
+ /** Initial URL to navigate to before starting the task */
88
+ startUrl?: string;
89
+ /** Milliseconds to wait after each action for the page to settle. Default: 1500 */
90
+ waitAfterAction?: number;
91
+ /** Max consecutive identical actions before the agent auto-fails. Default: 3 */
92
+ maxRepeats?: number;
93
+ /**
94
+ * Include a simplified DOM/accessibility tree alongside the screenshot.
95
+ * Helps the model target elements more accurately. Default: false
96
+ */
97
+ useDOM?: boolean;
98
+ /**
99
+ * Path to a Playwright storageState JSON file.
100
+ * Restores cookies, localStorage, and sessionStorage from a previous session.
101
+ */
102
+ storageState?: string;
103
+ /**
104
+ * Enable video recording of the browser session.
105
+ * Pass `true` for default dir (`./browser-videos`) or `{ dir: "/path" }`.
106
+ */
107
+ recordVideo?: boolean | {
108
+ dir: string;
109
+ };
110
+ /**
111
+ * Secure credential vault. The LLM never sees real values — only
112
+ * placeholders like `{{email}}`, `{{password}}`. Real values are
113
+ * injected at execution time and scrubbed from all logs.
114
+ */
115
+ credentials?: CredentialVault;
116
+ /**
117
+ * Enable stealth mode to avoid bot detection.
118
+ * Pass `true` for sensible defaults or a `StealthConfig` object for fine control.
119
+ * Patches navigator.webdriver, plugins, permissions, WebGL, and more.
120
+ */
121
+ stealth?: boolean | StealthConfig;
122
+ /**
123
+ * Simulate human-like behavior — jittered clicks, variable typing speed,
124
+ * mouse movement curves, random micro-pauses.
125
+ * Pass `true` for defaults or a `HumanizeConfig` for fine control.
126
+ */
127
+ humanize?: boolean | HumanizeConfig;
128
+ /**
129
+ * Unified memory config — persist browser sessions, decisions, and
130
+ * summaries of past runs. Same config as Agent and VoiceAgent.
131
+ */
132
+ memory?: UnifiedMemoryConfig;
133
+ /** Skills — pre-packaged or learned tool bundles. */
134
+ skills?: Array<_agentium_core.Skill | string>;
135
+ /** Cost tracker — track vision model token usage and enforce budgets across browser runs. */
136
+ costTracker?: CostTracker;
137
+ logLevel?: LogLevel;
138
+ eventBus?: EventBus;
139
+ }
140
+ interface BrowserRunOpts {
141
+ /** Override startUrl from config */
142
+ startUrl?: string;
143
+ /** Per-run model API key override */
144
+ apiKey?: string;
145
+ /** Session identifier for memory persistence and event tracking */
146
+ sessionId?: string;
147
+ /** User identifier for memory personalization */
148
+ userId?: string;
149
+ /** Path to save storageState (cookies/auth) after the run completes */
150
+ saveStorageState?: string;
151
+ }
152
+ interface BrowserRunOutput {
153
+ /** Final text result produced by the agent */
154
+ result: string;
155
+ /** Whether the task completed successfully (vs maxSteps exhausted or fail) */
156
+ success: boolean;
157
+ /** Full action history with screenshots */
158
+ steps: BrowserStep[];
159
+ /** URL at completion */
160
+ finalUrl: string;
161
+ /** Last screenshot captured */
162
+ finalScreenshot: Buffer;
163
+ /** Total time taken in milliseconds */
164
+ durationMs: number;
165
+ /** Video file path (if recordVideo was enabled) */
166
+ videoPath?: string;
167
+ }
168
+ interface BrowserStep {
169
+ index: number;
170
+ action: BrowserAction;
171
+ /** Screenshot taken before this action was executed */
172
+ screenshot: Buffer;
173
+ pageUrl: string;
174
+ pageTitle: string;
175
+ timestamp: Date;
176
+ /** Simplified DOM snapshot (if useDOM is enabled) */
177
+ dom?: string;
178
+ }
179
+ interface StealthConfig {
180
+ /**
181
+ * Remove `navigator.webdriver` flag and patch common detection vectors
182
+ * (plugins, languages, permissions, WebGL, etc.). Default when stealth=true.
183
+ */
184
+ patchFingerprint?: boolean;
185
+ /** Custom User-Agent string. A realistic one is used by default. */
186
+ userAgent?: string;
187
+ /** Browser locale. Default: "en-US" */
188
+ locale?: string;
189
+ /** Timezone ID (IANA). Default: "America/New_York" */
190
+ timezone?: string;
191
+ /** Fake geolocation */
192
+ geolocation?: {
193
+ latitude: number;
194
+ longitude: number;
195
+ accuracy?: number;
196
+ };
197
+ /** Ignore HTTPS certificate errors. Default: false (secure). Only enable for local testing. */
198
+ ignoreHTTPSErrors?: boolean;
199
+ /** HTTP/SOCKS proxy. Format: "http://user:pass@host:port" */
200
+ proxy?: {
201
+ server: string;
202
+ username?: string;
203
+ password?: string;
204
+ };
205
+ }
206
+ interface HumanizeConfig {
207
+ /** Per-character typing delay range in ms. Default: [40, 120] */
208
+ typingDelay?: [number, number];
209
+ /** Random pixel offset added to click coordinates. Default: 3 */
210
+ clickJitter?: number;
211
+ /** Extra random pause between actions in ms range. Default: [200, 800] */
212
+ actionDelay?: [number, number];
213
+ /** Simulate human-like mouse movement to target before clicking. Default: true */
214
+ mouseMovement?: boolean;
215
+ }
216
+ interface PageInfo {
217
+ url: string;
218
+ title: string;
219
+ viewportSize: {
220
+ width: number;
221
+ height: number;
222
+ };
223
+ }
224
+
225
+ declare class BrowserAgent {
226
+ readonly name: string;
227
+ readonly eventBus: EventBus;
228
+ private model;
229
+ private instructions?;
230
+ private maxSteps;
231
+ private headless;
232
+ private viewport;
233
+ private defaultStartUrl?;
234
+ private waitAfterAction;
235
+ private maxRepeats;
236
+ private useDOM;
237
+ private storageState?;
238
+ private recordVideo?;
239
+ private credentials?;
240
+ private stealth?;
241
+ private humanize?;
242
+ private costTracker;
243
+ private memoryManager;
244
+ private logger;
245
+ /** Access the MemoryManager (if memory is configured). */
246
+ get memory(): MemoryManager | null;
247
+ constructor(config: BrowserAgentConfig);
248
+ run(task: string, opts?: BrowserRunOpts): Promise<BrowserRunOutput>;
249
+ /**
250
+ * Returns a ToolDef that lets a regular Agent delegate browser tasks
251
+ * to this BrowserAgent.
252
+ */
253
+ asTool(config?: {
254
+ name?: string;
255
+ description?: string;
256
+ }): ToolDef;
257
+ private finalize;
258
+ private executeAction;
259
+ private sleep;
260
+ }
261
+
262
+ /**
263
+ * Playwright wrapper with stealth anti-detection and human-like behavior.
264
+ */
265
+ declare class BrowserProvider {
266
+ private browser;
267
+ private context;
268
+ private page;
269
+ private pages;
270
+ private activeTabId;
271
+ private tabCounter;
272
+ private _viewport;
273
+ private _videoDir?;
274
+ private _humanize?;
275
+ constructor();
276
+ launch(opts?: {
277
+ headless?: boolean;
278
+ viewport?: {
279
+ width: number;
280
+ height: number;
281
+ };
282
+ storageState?: string;
283
+ recordVideo?: boolean | {
284
+ dir: string;
285
+ };
286
+ stealth?: boolean | StealthConfig;
287
+ humanize?: boolean | HumanizeConfig;
288
+ }): Promise<void>;
289
+ saveStorageState(path: string): Promise<void>;
290
+ navigate(url: string): Promise<void>;
291
+ back(): Promise<void>;
292
+ screenshot(): Promise<Buffer>;
293
+ click(x: number, y: number): Promise<void>;
294
+ type(text: string): Promise<void>;
295
+ clickAndType(x: number, y: number, text: string): Promise<void>;
296
+ pressKey(key: string): Promise<void>;
297
+ scroll(direction: "up" | "down", amount?: number): Promise<void>;
298
+ extractDOM(opts?: {
299
+ maxElements?: number;
300
+ }): Promise<string>;
301
+ getPageInfo(): Promise<PageInfo>;
302
+ waitForStable(minWait?: number): Promise<void>;
303
+ newTab(url?: string): Promise<string>;
304
+ switchTab(tabId: string): Promise<void>;
305
+ closeTab(tabId: string): Promise<void>;
306
+ listTabs(): {
307
+ id: string;
308
+ url: string;
309
+ active: boolean;
310
+ }[];
311
+ get currentTabId(): string;
312
+ getVideoPath(tabId?: string): Promise<string | null>;
313
+ get videoDir(): string | undefined;
314
+ close(): Promise<void>;
315
+ /** Add small random offset to coordinates to avoid pixel-perfect bot patterns. */
316
+ private jitter;
317
+ /**
318
+ * Simulate human mouse movement using Bézier-like interpolation.
319
+ * Moves from the current mouse position to the target in small steps.
320
+ */
321
+ private humanMouseMove;
322
+ /** Small random pause after an interaction. */
323
+ private humanPause;
324
+ private randInt;
325
+ private ensurePage;
326
+ private ensureContext;
327
+ private sleep;
328
+ }
329
+
330
+ export { type BrowserAction, BrowserAgent, type BrowserAgentConfig, BrowserProvider, type BrowserRunOpts, type BrowserRunOutput, type BrowserStep, CredentialVault, type HumanizeConfig, type PageInfo, type StealthConfig };
@@ -0,0 +1,330 @@
1
+ import * as _agentium_core from '@agentium/core';
2
+ import { ModelProvider, UnifiedMemoryConfig, CostTracker, LogLevel, EventBus, MemoryManager, ToolDef } from '@agentium/core';
3
+
4
+ /**
5
+ * Secure credential store for BrowserAgent.
6
+ *
7
+ * Secrets are stored in memory and NEVER sent to the LLM.
8
+ * The model works with placeholders (e.g. `{{email}}`, `{{password}}`),
9
+ * and the agent resolves them to real values only at execution time.
10
+ */
11
+ declare class CredentialVault {
12
+ private secrets;
13
+ constructor(initial?: Record<string, string>);
14
+ /** Store a credential. Key names become the placeholder: `{{key}}`. */
15
+ set(key: string, value: string): this;
16
+ /** Retrieve a credential value. Returns undefined if not found. */
17
+ get(key: string): string | undefined;
18
+ has(key: string): boolean;
19
+ /** List available placeholder names (never exposes values). */
20
+ keys(): string[];
21
+ /**
22
+ * Load credentials from environment variables.
23
+ * Maps env var names to placeholder keys.
24
+ *
25
+ * @example
26
+ * vault.fromEnv({ email: "LOGIN_EMAIL", password: "LOGIN_PASS" });
27
+ */
28
+ fromEnv(mapping: Record<string, string>): this;
29
+ /**
30
+ * Replace `{{key}}` placeholders in text with actual credential values.
31
+ * Used internally by BrowserAgent right before executing a type action.
32
+ */
33
+ resolve(text: string): string;
34
+ /**
35
+ * Replace any occurrence of real credential values in text with
36
+ * their `{{key}}` placeholder. Used to sanitize logs and action history.
37
+ */
38
+ mask(text: string): string;
39
+ }
40
+
41
+ type BrowserAction = {
42
+ action: "click";
43
+ x: number;
44
+ y: number;
45
+ description: string;
46
+ } | {
47
+ action: "type";
48
+ text: string;
49
+ x?: number;
50
+ y?: number;
51
+ } | {
52
+ action: "scroll";
53
+ direction: "up" | "down";
54
+ amount?: number;
55
+ } | {
56
+ action: "navigate";
57
+ url: string;
58
+ } | {
59
+ action: "back";
60
+ } | {
61
+ action: "wait";
62
+ ms: number;
63
+ } | {
64
+ action: "screenshot";
65
+ } | {
66
+ action: "done";
67
+ result: string;
68
+ } | {
69
+ action: "fail";
70
+ reason: string;
71
+ };
72
+ interface BrowserAgentConfig {
73
+ name: string;
74
+ /** Vision-capable model (GPT-4o, Gemini, etc.) */
75
+ model: ModelProvider;
76
+ /** Extra instructions appended to the system prompt */
77
+ instructions?: string;
78
+ /** Max vision loop iterations. Default: 30 */
79
+ maxSteps?: number;
80
+ /** Run browser without visible window. Default: true */
81
+ headless?: boolean;
82
+ /** Browser viewport size. Default: 1280x720 */
83
+ viewport?: {
84
+ width: number;
85
+ height: number;
86
+ };
87
+ /** Initial URL to navigate to before starting the task */
88
+ startUrl?: string;
89
+ /** Milliseconds to wait after each action for the page to settle. Default: 1500 */
90
+ waitAfterAction?: number;
91
+ /** Max consecutive identical actions before the agent auto-fails. Default: 3 */
92
+ maxRepeats?: number;
93
+ /**
94
+ * Include a simplified DOM/accessibility tree alongside the screenshot.
95
+ * Helps the model target elements more accurately. Default: false
96
+ */
97
+ useDOM?: boolean;
98
+ /**
99
+ * Path to a Playwright storageState JSON file.
100
+ * Restores cookies, localStorage, and sessionStorage from a previous session.
101
+ */
102
+ storageState?: string;
103
+ /**
104
+ * Enable video recording of the browser session.
105
+ * Pass `true` for default dir (`./browser-videos`) or `{ dir: "/path" }`.
106
+ */
107
+ recordVideo?: boolean | {
108
+ dir: string;
109
+ };
110
+ /**
111
+ * Secure credential vault. The LLM never sees real values — only
112
+ * placeholders like `{{email}}`, `{{password}}`. Real values are
113
+ * injected at execution time and scrubbed from all logs.
114
+ */
115
+ credentials?: CredentialVault;
116
+ /**
117
+ * Enable stealth mode to avoid bot detection.
118
+ * Pass `true` for sensible defaults or a `StealthConfig` object for fine control.
119
+ * Patches navigator.webdriver, plugins, permissions, WebGL, and more.
120
+ */
121
+ stealth?: boolean | StealthConfig;
122
+ /**
123
+ * Simulate human-like behavior — jittered clicks, variable typing speed,
124
+ * mouse movement curves, random micro-pauses.
125
+ * Pass `true` for defaults or a `HumanizeConfig` for fine control.
126
+ */
127
+ humanize?: boolean | HumanizeConfig;
128
+ /**
129
+ * Unified memory config — persist browser sessions, decisions, and
130
+ * summaries of past runs. Same config as Agent and VoiceAgent.
131
+ */
132
+ memory?: UnifiedMemoryConfig;
133
+ /** Skills — pre-packaged or learned tool bundles. */
134
+ skills?: Array<_agentium_core.Skill | string>;
135
+ /** Cost tracker — track vision model token usage and enforce budgets across browser runs. */
136
+ costTracker?: CostTracker;
137
+ logLevel?: LogLevel;
138
+ eventBus?: EventBus;
139
+ }
140
+ interface BrowserRunOpts {
141
+ /** Override startUrl from config */
142
+ startUrl?: string;
143
+ /** Per-run model API key override */
144
+ apiKey?: string;
145
+ /** Session identifier for memory persistence and event tracking */
146
+ sessionId?: string;
147
+ /** User identifier for memory personalization */
148
+ userId?: string;
149
+ /** Path to save storageState (cookies/auth) after the run completes */
150
+ saveStorageState?: string;
151
+ }
152
+ interface BrowserRunOutput {
153
+ /** Final text result produced by the agent */
154
+ result: string;
155
+ /** Whether the task completed successfully (vs maxSteps exhausted or fail) */
156
+ success: boolean;
157
+ /** Full action history with screenshots */
158
+ steps: BrowserStep[];
159
+ /** URL at completion */
160
+ finalUrl: string;
161
+ /** Last screenshot captured */
162
+ finalScreenshot: Buffer;
163
+ /** Total time taken in milliseconds */
164
+ durationMs: number;
165
+ /** Video file path (if recordVideo was enabled) */
166
+ videoPath?: string;
167
+ }
168
+ interface BrowserStep {
169
+ index: number;
170
+ action: BrowserAction;
171
+ /** Screenshot taken before this action was executed */
172
+ screenshot: Buffer;
173
+ pageUrl: string;
174
+ pageTitle: string;
175
+ timestamp: Date;
176
+ /** Simplified DOM snapshot (if useDOM is enabled) */
177
+ dom?: string;
178
+ }
179
+ interface StealthConfig {
180
+ /**
181
+ * Remove `navigator.webdriver` flag and patch common detection vectors
182
+ * (plugins, languages, permissions, WebGL, etc.). Default when stealth=true.
183
+ */
184
+ patchFingerprint?: boolean;
185
+ /** Custom User-Agent string. A realistic one is used by default. */
186
+ userAgent?: string;
187
+ /** Browser locale. Default: "en-US" */
188
+ locale?: string;
189
+ /** Timezone ID (IANA). Default: "America/New_York" */
190
+ timezone?: string;
191
+ /** Fake geolocation */
192
+ geolocation?: {
193
+ latitude: number;
194
+ longitude: number;
195
+ accuracy?: number;
196
+ };
197
+ /** Ignore HTTPS certificate errors. Default: false (secure). Only enable for local testing. */
198
+ ignoreHTTPSErrors?: boolean;
199
+ /** HTTP/SOCKS proxy. Format: "http://user:pass@host:port" */
200
+ proxy?: {
201
+ server: string;
202
+ username?: string;
203
+ password?: string;
204
+ };
205
+ }
206
+ interface HumanizeConfig {
207
+ /** Per-character typing delay range in ms. Default: [40, 120] */
208
+ typingDelay?: [number, number];
209
+ /** Random pixel offset added to click coordinates. Default: 3 */
210
+ clickJitter?: number;
211
+ /** Extra random pause between actions in ms range. Default: [200, 800] */
212
+ actionDelay?: [number, number];
213
+ /** Simulate human-like mouse movement to target before clicking. Default: true */
214
+ mouseMovement?: boolean;
215
+ }
216
+ interface PageInfo {
217
+ url: string;
218
+ title: string;
219
+ viewportSize: {
220
+ width: number;
221
+ height: number;
222
+ };
223
+ }
224
+
225
+ declare class BrowserAgent {
226
+ readonly name: string;
227
+ readonly eventBus: EventBus;
228
+ private model;
229
+ private instructions?;
230
+ private maxSteps;
231
+ private headless;
232
+ private viewport;
233
+ private defaultStartUrl?;
234
+ private waitAfterAction;
235
+ private maxRepeats;
236
+ private useDOM;
237
+ private storageState?;
238
+ private recordVideo?;
239
+ private credentials?;
240
+ private stealth?;
241
+ private humanize?;
242
+ private costTracker;
243
+ private memoryManager;
244
+ private logger;
245
+ /** Access the MemoryManager (if memory is configured). */
246
+ get memory(): MemoryManager | null;
247
+ constructor(config: BrowserAgentConfig);
248
+ run(task: string, opts?: BrowserRunOpts): Promise<BrowserRunOutput>;
249
+ /**
250
+ * Returns a ToolDef that lets a regular Agent delegate browser tasks
251
+ * to this BrowserAgent.
252
+ */
253
+ asTool(config?: {
254
+ name?: string;
255
+ description?: string;
256
+ }): ToolDef;
257
+ private finalize;
258
+ private executeAction;
259
+ private sleep;
260
+ }
261
+
262
+ /**
263
+ * Playwright wrapper with stealth anti-detection and human-like behavior.
264
+ */
265
+ declare class BrowserProvider {
266
+ private browser;
267
+ private context;
268
+ private page;
269
+ private pages;
270
+ private activeTabId;
271
+ private tabCounter;
272
+ private _viewport;
273
+ private _videoDir?;
274
+ private _humanize?;
275
+ constructor();
276
+ launch(opts?: {
277
+ headless?: boolean;
278
+ viewport?: {
279
+ width: number;
280
+ height: number;
281
+ };
282
+ storageState?: string;
283
+ recordVideo?: boolean | {
284
+ dir: string;
285
+ };
286
+ stealth?: boolean | StealthConfig;
287
+ humanize?: boolean | HumanizeConfig;
288
+ }): Promise<void>;
289
+ saveStorageState(path: string): Promise<void>;
290
+ navigate(url: string): Promise<void>;
291
+ back(): Promise<void>;
292
+ screenshot(): Promise<Buffer>;
293
+ click(x: number, y: number): Promise<void>;
294
+ type(text: string): Promise<void>;
295
+ clickAndType(x: number, y: number, text: string): Promise<void>;
296
+ pressKey(key: string): Promise<void>;
297
+ scroll(direction: "up" | "down", amount?: number): Promise<void>;
298
+ extractDOM(opts?: {
299
+ maxElements?: number;
300
+ }): Promise<string>;
301
+ getPageInfo(): Promise<PageInfo>;
302
+ waitForStable(minWait?: number): Promise<void>;
303
+ newTab(url?: string): Promise<string>;
304
+ switchTab(tabId: string): Promise<void>;
305
+ closeTab(tabId: string): Promise<void>;
306
+ listTabs(): {
307
+ id: string;
308
+ url: string;
309
+ active: boolean;
310
+ }[];
311
+ get currentTabId(): string;
312
+ getVideoPath(tabId?: string): Promise<string | null>;
313
+ get videoDir(): string | undefined;
314
+ close(): Promise<void>;
315
+ /** Add small random offset to coordinates to avoid pixel-perfect bot patterns. */
316
+ private jitter;
317
+ /**
318
+ * Simulate human mouse movement using Bézier-like interpolation.
319
+ * Moves from the current mouse position to the target in small steps.
320
+ */
321
+ private humanMouseMove;
322
+ /** Small random pause after an interaction. */
323
+ private humanPause;
324
+ private randInt;
325
+ private ensurePage;
326
+ private ensureContext;
327
+ private sleep;
328
+ }
329
+
330
+ export { type BrowserAction, BrowserAgent, type BrowserAgentConfig, BrowserProvider, type BrowserRunOpts, type BrowserRunOutput, type BrowserStep, CredentialVault, type HumanizeConfig, type PageInfo, type StealthConfig };