Repository navigation
fix(agent): validate Alexandria flags locally and fix the exchange docs - #307
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
2 issues found across 6 files
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/index.ts">
<violation number="1" location="src/index.ts:1769">
P2: Check whether `--call-ids` was supplied rather than whether its value is truthy; `--call-ids=` can bypass this guard and let the request proceed. Use `options.callIds !== undefined` in the condition.</violation>
</file>
<file name="src/commands/agent.ts">
<violation number="1" location="src/commands/agent.ts:526">
P3: This advice is not actionable as printed: `firecrawl alexandria terms accept <provider>` fails unless `--terms-version`, `--digest` (64 lowercase hex), and `--confirm` are supplied. `requestTerms` in src/commands/terms.ts throws "Review the terms, then supply --terms-version, --digest (64 lowercase hex characters), and --confirm." when `accept` is true and any of those is missing. The pending-approval gates already carry the version/digest values, so either print the full command with the gate's values or point users to `firecrawl alexandria terms show <provider>` first (the flow SKILL.md and the guidance in src/commands/alexandria.ts line 245 both require showing terms and getting explicit user consent before accepting).</violation>
</file>
Contributor
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes invalid Alexandria flag handling with local pre-request validation and clarifies terms/approval docs; focused bug fix backed by tests, with no rollout, contract, or config changes.
Turn on auto-fix | Re-trigger cubic
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.
Follow-up to #305, which merged while its review findings were still open. This PR addresses all five.
What changed
Error:message before any request, the same way the existing approval checks work:--max-callsthat is not a whole number from 1 to 30. Before,parseInt('12o')producedNaN, which JSON turned intomaxCalls: null.--toolkitswith more than 5 slugs.--call-idsor--alwayswithout--approve. Before, the CLI dropped them silently, for example when they were passed with--decline.Name (slug): url. It also says terms can be accepted withfirecrawl alexandria terms accept <provider>or in the dashboard, where it previously named only the dashboard.--threadand--moderows that the Alexandria examples rely on.skills/firecrawl-agent/SKILL.md. The approval follow-up now includes the required prompt (firecrawl agent "<follow-up prompt>" --thread ...). The terms sentence now describes both ways to accept terms, and the CLI route still requires the user's explicit agreement.Tests
The new checks are added to
src/__tests__/alexandria-beta.test.ts:--max-callswith12o,0,31and2.5.--toolkitswith 6 slugs.--declinetogether with--call-ids.Each rejected case asserts that no request was made. Local runs:
format:check,type-checkandbuildpass, andpnpm testpasses 683/683.Release
This bumps
package.jsonto 1.26.3. #305 cut 1.26.2, so merging this publishesfirecrawl-cli@1.26.3and the v1.26.3 binaries.Summary by cubic
Follow-up to #305, fixing all five review findings from that merge.
--max-callsvalues that aren't whole numbers from 1 to 30,--toolkitswith more than 5 slugs, and--call-ids(including empty) or--alwayswithout--approve. These previously reached the API or were silently dropped, and now exit 1 with anError:message.Name: urlbeside afirecrawl alexandria terms show <provider>command, and points to accepting in the dashboard or viafirecrawl alexandria terms accept <provider> --terms-version <version> --digest <digest> --confirm.--threadand--moderows to the README agent options table.skills/firecrawl-agent/SKILL.mdto include the follow-up prompt in the approval command and describe both ways to accept terms.package.jsonto 1.26.3.Written for commit 448aa83. Summary will update on new commits.