@blockrun/clawrouter 0.12.142 → 0.12.143
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/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79884,7 +79884,11 @@ function extractResults(payload) {
|
|
|
79884
79884
|
}
|
|
79885
79885
|
const direct = asObject(payload);
|
|
79886
79886
|
if (!direct) return [];
|
|
79887
|
-
const candidates = [
|
|
79887
|
+
const candidates = [
|
|
79888
|
+
direct.results,
|
|
79889
|
+
asObject(direct.data)?.results,
|
|
79890
|
+
asObject(direct.response)?.results
|
|
79891
|
+
];
|
|
79888
79892
|
for (const candidate of candidates) {
|
|
79889
79893
|
if (!Array.isArray(candidate)) continue;
|
|
79890
79894
|
return candidate.map(asObject).filter((entry) => Boolean(entry));
|
|
@@ -79945,10 +79949,7 @@ async function runBlockrunExaSearch(args) {
|
|
|
79945
79949
|
if (!query) {
|
|
79946
79950
|
return errorPayload("missing_query", "web_search (blockrun-exa) requires a non-empty query.");
|
|
79947
79951
|
}
|
|
79948
|
-
const count = Math.min(
|
|
79949
|
-
readPositiveInteger(args.count) ?? DEFAULT_RESULT_COUNT,
|
|
79950
|
-
MAX_RESULT_COUNT
|
|
79951
|
-
);
|
|
79952
|
+
const count = Math.min(readPositiveInteger(args.count) ?? DEFAULT_RESULT_COUNT, MAX_RESULT_COUNT);
|
|
79952
79953
|
const category = readString(args.category);
|
|
79953
79954
|
const includeDomains = readStringList(args.include_domains) ?? readStringList(args.includeDomains) ?? readStringList(args.domains);
|
|
79954
79955
|
const excludeDomains = readStringList(args.exclude_domains) ?? readStringList(args.excludeDomains);
|