@bytesbrains/pi-textbrowser 1.1.0 → 1.1.1
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/LICENSE +1 -1
- package/README.md +9 -4
- package/package.json +5 -6
- package/src/index.ts +6 -6
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# TextBrowser for Pi
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/pi-textbrowser)
|
|
4
|
-
[](./LICENSE)
|
|
3
|
+
[](https://www.npmjs.com/package/@bytesbrains/pi-textbrowser)
|
|
4
|
+
[](./LICENSE)
|
|
5
5
|
|
|
6
6
|
> Headless browser extension for Pi — browse the web with **structured DOM + OCR text maps**. **10-50x cheaper** than screenshot-based browsing.
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ Need to see colors or layout? Flip to **visual mode** and get the PNG too.
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
pi install npm
|
|
30
|
+
pi install npm:@bytesbrains/pi-textbrowser
|
|
31
31
|
npx playwright install chromium
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ Or add to your `.pi/settings.json`:
|
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{
|
|
38
|
-
"packages": ["npm
|
|
38
|
+
"packages": ["npm:@bytesbrains/pi-textbrowser"]
|
|
39
39
|
}
|
|
40
40
|
```
|
|
41
41
|
|
|
@@ -125,3 +125,8 @@ MIT © [nandal](https://github.com/nandal)
|
|
|
125
125
|
---
|
|
126
126
|
|
|
127
127
|
*Built by Agent, for Agents 🤖*
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
Built and maintained by [BytesBrains](https://bytesbrains.com) — AI automation & agents, engineered to production standards.
|
|
132
|
+
*The model proposes, code guarantees.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytesbrains/pi-textbrowser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Headless browser for Pi — browse the web with DOM + OCR text maps. No image tokens, 10-50x cheaper than screenshot-based browsing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -12,15 +12,14 @@
|
|
|
12
12
|
"tesseract",
|
|
13
13
|
"web-scraping"
|
|
14
14
|
],
|
|
15
|
-
"author": "
|
|
15
|
+
"author": "BytesBrains Pte Ltd (https://bytesbrains.com)",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
19
|
-
"directory": "textbrowser"
|
|
18
|
+
"url": "git+https://github.com/bytesbrains/pi-textbrowser.git"
|
|
20
19
|
},
|
|
21
|
-
"homepage": "https://github.com/
|
|
20
|
+
"homepage": "https://github.com/bytesbrains/pi-textbrowser#readme",
|
|
22
21
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/
|
|
22
|
+
"url": "https://github.com/bytesbrains/pi-textbrowser/issues"
|
|
24
23
|
},
|
|
25
24
|
"license": "MIT",
|
|
26
25
|
"main": "./src/index.ts",
|
package/src/index.ts
CHANGED
|
@@ -220,7 +220,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
220
220
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
221
221
|
const content: any[] = [{ type: "text", text }];
|
|
222
222
|
if (image) {
|
|
223
|
-
content.push({ type: "image",
|
|
223
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
224
224
|
}
|
|
225
225
|
return { content, details: { url: p.url() } };
|
|
226
226
|
},
|
|
@@ -251,7 +251,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
251
251
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
252
252
|
const content: any[] = [{ type: "text", text }];
|
|
253
253
|
if (image) {
|
|
254
|
-
content.push({ type: "image",
|
|
254
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
255
255
|
}
|
|
256
256
|
return { content, details: {} };
|
|
257
257
|
},
|
|
@@ -278,7 +278,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
278
278
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
279
279
|
const content: any[] = [{ type: "text", text }];
|
|
280
280
|
if (image) {
|
|
281
|
-
content.push({ type: "image",
|
|
281
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
282
282
|
}
|
|
283
283
|
return { content, details: {} };
|
|
284
284
|
},
|
|
@@ -312,7 +312,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
312
312
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
313
313
|
const content: any[] = [{ type: "text", text }];
|
|
314
314
|
if (image) {
|
|
315
|
-
content.push({ type: "image",
|
|
315
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
316
316
|
}
|
|
317
317
|
return { content, details: {} };
|
|
318
318
|
},
|
|
@@ -331,7 +331,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
331
331
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
332
332
|
const content: any[] = [{ type: "text", text }];
|
|
333
333
|
if (image) {
|
|
334
|
-
content.push({ type: "image",
|
|
334
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
335
335
|
}
|
|
336
336
|
return { content, details: { fullPage: params.fullPage ?? false } };
|
|
337
337
|
},
|
|
@@ -349,7 +349,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
349
349
|
const { text, image } = await generatePageMap(p, params.visual);
|
|
350
350
|
const content: any[] = [{ type: "text", text }];
|
|
351
351
|
if (image) {
|
|
352
|
-
content.push({ type: "image",
|
|
352
|
+
content.push({ type: "image", mimeType: "image/png", data: image });
|
|
353
353
|
}
|
|
354
354
|
return { content, details: {} };
|
|
355
355
|
},
|