@framers/agentos-ext-stealth-browser 1.1.0 → 1.1.2
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.
- package/README.md +127 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/manifest.json +3 -3
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Stealth browser
|
|
2
|
+
|
|
3
|
+
This pack gives an agent browser navigation, scraping, clicking, typing, screenshot and DOM snapshot tools. It uses `puppeteer-extra`, `puppeteer-extra-plugin-stealth`, `puppeteer-core` and `cheerio` with a local Chrome executable.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-stealth-browser
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` with range `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-stealth-browser',
|
|
23
|
+
options: {
|
|
24
|
+
headless: true,
|
|
25
|
+
timeout: 30000,
|
|
26
|
+
viewport: { width: 1920, height: 1080 },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
37
|
+
| --- | --- | --- | --- | --- |
|
|
38
|
+
| `headless` | None | None | no | Unset through factory; launches headed |
|
|
39
|
+
| `timeout` | None | None | no | Unset through factory; passed to Puppeteer |
|
|
40
|
+
| `userAgent` | None | None | no | Random selection from the built-in pool |
|
|
41
|
+
| `viewport` (object with `width` and `height`) | None | None | no | Unset through factory; no viewport override |
|
|
42
|
+
| `executablePath` | None | None | no | OS-specific Chrome path |
|
|
43
|
+
| `enableEvasions` | None | None | no | Enabled unless `false` |
|
|
44
|
+
| `priority` | None | None | no | `50`; a falsy value also uses this default |
|
|
45
|
+
| Context `logger` | None | None | no | Unset |
|
|
46
|
+
| Context `onActivate` | None | None | no | Unset |
|
|
47
|
+
| Context `onDeactivate` | None | None | no | Unset |
|
|
48
|
+
|
|
49
|
+
Set `headless`, `timeout` and `viewport` explicitly to use the values in the example. The factory passes undefined properties that overwrite the service constructor's defaults. Use these flat option names rather than the manifest's dotted configuration names.
|
|
50
|
+
|
|
51
|
+
`logger.info` receives lifecycle messages. The context callbacks run on activation and deactivation; deactivation closes the browser before invoking the callback.
|
|
52
|
+
|
|
53
|
+
## Tools
|
|
54
|
+
|
|
55
|
+
| Tool | What it does |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `stealth_navigate` | Navigates with anti-detection enabled and returns page text, links and optional HTML. |
|
|
58
|
+
| `stealth_scrape` | Extracts content from the current page using a CSS selector. |
|
|
59
|
+
| `stealth_click` | Waits for an element to become visible and clicks it. |
|
|
60
|
+
| `stealth_type` | Types into an input field with a default keystroke delay. |
|
|
61
|
+
| `stealth_screenshot` | Captures the current page or a selected element. |
|
|
62
|
+
| `stealth_snapshot` | Returns a DOM snapshot of interactive elements, links and forms. |
|
|
63
|
+
|
|
64
|
+
### `stealth_navigate`
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Required | Description |
|
|
67
|
+
| --- | --- | --- | --- |
|
|
68
|
+
| `url` | string | yes | The URL to navigate to |
|
|
69
|
+
| `waitFor` | string, enum: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`; default: `networkidle2` | no | When to consider navigation complete |
|
|
70
|
+
| `returnHtml` | boolean, default `false` | no | Include full HTML in response |
|
|
71
|
+
| `returnText` | boolean, default `true` | no | Include extracted text in response |
|
|
72
|
+
| `returnLinks` | boolean, default `true` | no | Include all links found on the page (text + href) |
|
|
73
|
+
| `maxTextLength` | number, default `50000` | no | Maximum characters of page text to return (default `50000`) |
|
|
74
|
+
|
|
75
|
+
### `stealth_scrape`
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Required | Description |
|
|
78
|
+
| --- | --- | --- | --- |
|
|
79
|
+
| `selector` | string | yes | CSS selector to match elements |
|
|
80
|
+
| `limit` | number, minimum one | no | Maximum number of elements to return |
|
|
81
|
+
| `attributes` | array of strings | no | Specific attributes to extract |
|
|
82
|
+
|
|
83
|
+
### `stealth_click`
|
|
84
|
+
|
|
85
|
+
| Parameter | Type | Required | Description |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| `selector` | string | yes | CSS selector for the element to click |
|
|
88
|
+
| `waitForNavigation` | boolean, default `false` | no | Wait for page navigation after click |
|
|
89
|
+
|
|
90
|
+
### `stealth_type`
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Description |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| `selector` | string | yes | CSS selector for the input element |
|
|
95
|
+
| `text` | string | yes | Text to type |
|
|
96
|
+
| `delay` | number, default `50` | no | Delay between keystrokes (ms). Defaults to `50` for human-like typing. |
|
|
97
|
+
| `clear` | boolean, default `false` | no | Clear existing text before typing |
|
|
98
|
+
|
|
99
|
+
### `stealth_screenshot`
|
|
100
|
+
|
|
101
|
+
| Parameter | Type | Required | Description |
|
|
102
|
+
| --- | --- | --- | --- |
|
|
103
|
+
| `fullPage` | boolean, default `false` | no | Capture full scrollable page |
|
|
104
|
+
| `selector` | string | no | CSS selector for specific element to capture |
|
|
105
|
+
| `format` | string, enum: `png`, `jpeg`, `webp`; default: `png` | no | Image format |
|
|
106
|
+
| `quality` | number, minimum zero, maximum `100`, default `80` | no | Quality for jpeg/webp (`0` to `100`) |
|
|
107
|
+
|
|
108
|
+
### `stealth_snapshot`
|
|
109
|
+
|
|
110
|
+
| Parameter | Type | Required | Description |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| `includeLinks` | boolean, default `true` | no | Include links in snapshot |
|
|
113
|
+
| `includeForms` | boolean, default `true` | no | Include forms in snapshot |
|
|
114
|
+
|
|
115
|
+
## Notes
|
|
116
|
+
|
|
117
|
+
The browser launches lazily when a tool first uses it and remains shared across the pack's tools until deactivation. The default executable paths are `C:\Program Files\Google\Chrome\Application\chrome.exe` on Windows, `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome` on macOS and `/usr/bin/google-chrome` on Linux. Set `executablePath` for another location.
|
|
118
|
+
|
|
119
|
+
Clicking and typing change the page and can trigger its actions. Launch flags disable the browser sandbox and web security and allow insecure content. `enableEvasions: false` skips applying the stealth plugin for that service, but the service still applies launch flags, HTTP headers and page-level overrides.
|
|
120
|
+
|
|
121
|
+
Navigation failures return partial content with a zero status and an error console message; the navigation tool still returns `success: true` for that result. Scrape failures return an empty element list. Click and type failures return `success: false`.
|
|
122
|
+
|
|
123
|
+
Navigation text is truncated to `maxTextLength`, with truncation metadata. The service retains at most `100` console messages. Screenshots return base64 image data; reported dimensions come from the viewport. A zero screenshot `quality` falls back to `80`.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
Apache-2.0
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/manifest.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.research.stealth-browser",
|
|
4
4
|
"name": "Stealth Browser Extension",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.2",
|
|
6
6
|
"description": "Stealth browser automation with anti-detection — bypasses bot protection on sites like Amazon, eBay, LinkedIn using puppeteer-extra with stealth plugin",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Frame.dev",
|
|
9
9
|
"email": "support@frame.dev",
|
|
10
10
|
"url": "https://github.com/framerslab"
|
|
11
11
|
},
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
13
|
"keywords": ["browser", "stealth", "anti-detection", "scraping", "puppeteer-extra", "bot-bypass", "automation"],
|
|
14
|
-
"agentosVersion": "
|
|
14
|
+
"agentosVersion": ">=0.10.40",
|
|
15
15
|
"categories": ["productivity", "research", "automation"],
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-stealth-browser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Stealth browser extension — puppeteer-extra with anti-detection for bot-protected sites",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/jddunn"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
-
"license": "
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|
|
44
44
|
"url": "git+https://github.com/framerslab/agentos-extensions.git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"cheerio": "^1.0.0-rc.12"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@framers/agentos": "^0.
|
|
57
|
+
"@framers/agentos": "^0.13.47",
|
|
58
58
|
"@types/node": "^20.0.0",
|
|
59
59
|
"typescript": "^5.4.0",
|
|
60
60
|
"vitest": "^3.2.7"
|