Repository navigation
feat(agent): send Alexandria exchange settings and answer approvals - #305
Merged
Merged
Conversation
Add --alexandria/--no-alexandria, --toolkits, --max-calls, --require-approval, --approve (with --call-ids, --always), --decline and --on-terms-required to `firecrawl agent`. They build the request's `exchange` object, sent only when one of them is given. Fail fast on --approve/--decline without --thread, both together, and --require-approval without --mode chat. Human-readable status output now shows a pending approval with the exact follow-up commands, and the run's Alexandria summary (paid calls, credits, skipped providers). Bump the firecrawl SDK to 4.44.0 for the onTermsRequired and terms approval types, and release 1.26.2.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Shadow auto-approve: would not auto-approve because issues were found.
Tip: instead of fixing issues one by one fix them all with cubic
Turn on auto-fix | Re-trigger cubic
mogery
added a commit
that referenced
this pull request
Oct 6, 2026
…cs (#307) * fix(agent): validate Alexandria flags locally and fix the exchange docs Follow-up to #305's review: - Reject --max-calls values that are not whole numbers from 1 to 30, --toolkits with more than 5 slugs, and --call-ids/--always without --approve, before calling the API. - Terms approvals: name the provider and point at `firecrawl alexandria terms accept` as well as the dashboard. - README: document --thread and --mode in the agent options table. - SKILL.md: include the prompt in the follow-up command and describe both ways to accept terms. Release 1.26.3. * fix(agent): catch empty --call-ids, test --always, and spell out terms acceptance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POST /v2/agentonly uses Alexandria providers when the request carries anexchangeobject, andfirecrawl agenthad no way to send one. So CLI agent runs never used connected providers, and a turn that stopped for approval couldn't be answered from the CLI.What shipped
New
firecrawl agentflags, each mapping onto oneexchangefield:exchangefield--alexandria/--no-alexandriaenabled(unset unless given)--toolkits <slugs>toolkits(comma-separated)--max-calls <n>maxCalls--require-approvalrequireApproval--approve <approvalId>+--call-ids <ids>,--alwaysapprove: { approvalId, callIds, always }--decline <approvalId>decline: { approvalId }--on-terms-required <skip|ask>onTermsRequiredexchangeis built only when at least one of these flags is given, and it goes out with the start request on both the--waitpath and the plain start path. Without a flag, the request is unchanged, so a follow-up turn still inherits the previous turn's settings.--approve/--declinewithout--thread, both flags together, and--require-approvalwithout--mode chat. Without that last check the API returns an opaque 500. All other limits (toolkit count, maxCalls range, ID format) are left to the server.pendingApproval, the output prints its ID and reason, the calls waiting for approval (or, for atermsapproval, the providers whose terms must be accepted in the dashboard first), and the exact follow-up commands:--jsonoutput carriespendingApprovalandexchangeas-is.firecrawlSDK goes from 4.40.0 to 4.44.0. 4.40.0 already forwardedexchange, but its types lackedonTermsRequired,termsapprovals andskippedProviders.skills/firecrawl-agent/SKILL.md.Tests
The new cases are in
src/__tests__/alexandria-beta.test.tsand run against the existing mock API server:exchangebody, including--declinewith--no-alexandria.exchangeis sent when no flag is given.--wait. This also checks thatexchangeis sent on the wait path.Local runs:
format:check,type-checkandbuildpass, andpnpm testpasses 683/683. Abun build --compilebinary also builds and prints the new help text.Release
This bumps
package.jsonto 1.26.2, so merging publishesfirecrawl-cli@1.26.2to npm and cuts the v1.26.2 binary release.Summary by cubic
Lets
firecrawl agentsend Alexandria provider settings and answer pending approvals, so CLI runs can use connected providers and users can approve or decline turns that stopped for approval.--alexandria/--no-alexandria,--toolkits,--max-calls,--require-approval,--approve(with--call-ids,--always),--decline, and--on-terms-requiredflags, each mapping onto a field of theexchangerequest body.exchangeonly when at least one Alexandria flag is given, keeping the request unchanged otherwise so follow-up turns inherit the previous turn's settings.--approve/--declinewithout--thread, both together, and--require-approvalwithout--mode chat.--approve/--declinefollow-up commands;--jsoncarriespendingApprovalandexchangeas-is.firecrawlfrom 4.40.0 to 4.44.0 foronTermsRequired, terms approvals, and skipped-provider types, and releases 1.26.2.Written for commit 0605868. Summary will update on new commits.