feat(cli): preserve and display API agent hints - #229
Draft
ericciarla wants to merge 5 commits into
Draft
ericciarla wants to merge 5 commits into
ericciarla wants to merge 5 commits into
Conversation
# Conflicts: # src/commands/alexandria.ts
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.
Problem and result
CLI commands currently drop optional response guidance when rebuilding API envelopes or unwrapping SDK results. Preserve
agent_hintsacross Search, Scrape, Parse, Map, and Alexandria so an agent can see result-dependent next steps, including on empty results and failures.success:falseresponse remains a failure even when HTTP succeeds.--no-agent-hintssuppresses guidance locally, including JSON. It does not alter the server request or feedback preferences.API opt-in and rollout
The API leaves response hints disabled by default. CLI requests explicitly opt in with:
X-Firecrawl-Agent-Hints: trueThis is applied to authenticated SDK requests, keyless requests, and the raw Parse transport.
Companion API/SDK PR: firecrawl/firecrawl#4641.
Search and Parse read raw response envelopes; keyless Scrape also preserves outer metadata directly. Authenticated Scrape, Map, and Alexandria depend on a published SDK containing the metadata preservation in that PR. The current pinned
firecrawl@4.40.0drops those fields. Keep this draft until that release can be pinned and validated; this PR does not invent a future version or publish packages.Separate from skill-routing PR #226; no skills or release identity are changed here.
Validation
mainwith a normal merge commit and resolved the Alexandria failure-envelope conflict while preserving both receipts/retry metadata and error hints.git diff --checkpassed.