@superagnt/web-scraping 2.0.3 → 2.0.5
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/index.js +8 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,7 +7,8 @@ import { homedir as _homedir } from 'node:os'
|
|
|
7
7
|
import { join as _join } from 'node:path'
|
|
8
8
|
import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// SUPERAGNT_API_URL overrides the API origin (QA/staging); customers never set it.
|
|
11
|
+
const BASE_URL = (process.env.SUPERAGNT_API_URL || 'https://api.superagnt.com') + '/v1/data/web'
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
// ── Auth Module (inlined) ────────────────────────────────────────────────────
|
|
@@ -95,7 +96,7 @@ export default function register(api) {
|
|
|
95
96
|
api.registerTool({
|
|
96
97
|
name: 'superagnt_web_scrape',
|
|
97
98
|
description: "Scrape a web page",
|
|
98
|
-
|
|
99
|
+
parameters: {
|
|
99
100
|
"type": "object",
|
|
100
101
|
"properties": {
|
|
101
102
|
"url": {
|
|
@@ -151,7 +152,7 @@ export default function register(api) {
|
|
|
151
152
|
"url"
|
|
152
153
|
]
|
|
153
154
|
},
|
|
154
|
-
execute: async (input) => {
|
|
155
|
+
execute: async (_toolCallId, input) => {
|
|
155
156
|
const key = ensureApiKey()
|
|
156
157
|
const params = parseToolInput(input)
|
|
157
158
|
return callSuperagnt(key, 'POST', '/scrape', undefined, params)
|
|
@@ -161,7 +162,7 @@ export default function register(api) {
|
|
|
161
162
|
api.registerTool({
|
|
162
163
|
name: 'superagnt_web_search',
|
|
163
164
|
description: "Search the web",
|
|
164
|
-
|
|
165
|
+
parameters: {
|
|
165
166
|
"type": "object",
|
|
166
167
|
"properties": {
|
|
167
168
|
"query": {
|
|
@@ -213,7 +214,7 @@ export default function register(api) {
|
|
|
213
214
|
"query"
|
|
214
215
|
]
|
|
215
216
|
},
|
|
216
|
-
execute: async (input) => {
|
|
217
|
+
execute: async (_toolCallId, input) => {
|
|
217
218
|
const key = ensureApiKey()
|
|
218
219
|
const params = parseToolInput(input)
|
|
219
220
|
return callSuperagnt(key, 'POST', '/search', undefined, params)
|
|
@@ -223,7 +224,7 @@ export default function register(api) {
|
|
|
223
224
|
api.registerTool({
|
|
224
225
|
name: 'superagnt_web_map',
|
|
225
226
|
description: "Map a website's URLs",
|
|
226
|
-
|
|
227
|
+
parameters: {
|
|
227
228
|
"type": "object",
|
|
228
229
|
"properties": {
|
|
229
230
|
"url": {
|
|
@@ -263,7 +264,7 @@ export default function register(api) {
|
|
|
263
264
|
"url"
|
|
264
265
|
]
|
|
265
266
|
},
|
|
266
|
-
execute: async (input) => {
|
|
267
|
+
execute: async (_toolCallId, input) => {
|
|
267
268
|
const key = ensureApiKey()
|
|
268
269
|
const params = parseToolInput(input)
|
|
269
270
|
return callSuperagnt(key, 'POST', '/map', undefined, params)
|
package/openclaw.plugin.json
CHANGED