Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix: scope saved-result authorization (#4707)
Developers Digestaeb5da9b1df8
diff --git a/apps/api/src/services/alexandria/retrieve.ts b/apps/api/src/services/alexandria/retrieve.tsindex 0e911f391..f54970b5f 100644--- a/apps/api/src/services/alexandria/retrieve.ts+++ b/apps/api/src/services/alexandria/retrieve.ts@@ -105,17 +105,17 @@ export async function retrieveProviders(input: {if (Buffer.byteLength(JSON.stringify(input.calls)) > 256 * 1024)return notExecuted(refusal(400, "Provider options exceed 256 KB."));- const loadsBashResult = input.calls.some(+ const loadsSavedResult = input.calls.some(call =>call.provider === "firecrawl" &&- call.capability === "bash" &&+ (call.capability === "bash" || call.capability === "jev") &&typeof call.options?.requestId === "string",);- if (loadsBashResult && input.calls.length !== 1)+ if (loadsSavedResult && input.calls.length !== 1)return notExecuted(refusal(400,- "Bash source loading must be sent as a separate request; do not batch it with other calls.",+ "Saved-result loading must be sent as a separate request; do not batch it with other calls.",),);@@ -330,7 +330,7 @@ export async function retrieveProviders(input: {body: { requests: input.calls },timeoutMs: remaining(),requestId: id,- ...(loadsBashResult && input.resultAuthorization+ ...(loadsSavedResult && input.resultAuthorization? { resultAuthorization: input.resultAuthorization }: {}),maximumCredits,