Skip to content

feat(gov): add Government Index search filters - #342

Merged
KrisOei merged 4 commits into
mainfrom
kris/gov-search-filters
Oct 22, 2026
Merged

KrisOei merged 4 commits into
mainfrom
kris/gov-search-filters

Conversation

@KrisOei

@KrisOei KrisOei commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

firecrawl gov gets --jurisdiction, --court, --court-type, --cites and --domain. Set filters go out as query parameters on GET /v2/search/gov; a search without filters sends the same URL as before.

  • Values are checked before the request: court types against the allowed list, the jurisdiction shape, and non-empty court, citation and domain values.
  • When the API refuses a request, for example an unknown court id, the CLI prints the API's message instead of the HTTP status.
  • The README, --help and the bundled skills document the flags and the coverage caveat.

Bumps the version to 1.26.20, skipping the 1.26.19 that #343 claims. Merge once the API filters in firecrawl/firecrawl#5338 are deployed; merging publishes 1.26.20.

Show me

$ firecrawl gov "qualified immunity excessive force" --court ca9
  -> GET /v2/search/gov?query=...&court=ca9&integration=cli

$ firecrawl gov "zoning" --court-type supreme
error: option '--court-type <type>' argument 'supreme' is invalid. Allowed choices are federal-supreme, ...   (no request sent)

$ firecrawl gov "zoning" --court zz9
Error: invalid 'court' parameter: pass a CourtListener court id such as scotus, ca9, nh or calctapp

Validation

  • pnpm run type-check, pnpm run format:check, pnpm run build and pnpm test pass.
  • Against a local API build: each flag reached the API with the expected parameters, invalid values sent no request, and an unknown court id printed the API's message.

Kris Oei added 3 commits October 21, 2026 21:32
Add --jurisdiction, --court, --court-type, --cites, --domain, --year-from
and --year-to to firecrawl gov. Set filters are sent as camelCase query
parameters on /v2/search/gov; unset filters are not sent.

The CLI checks values before calling the API: court types against the
allowed list, the jurisdiction shape, years as integers from 1000 to
9999, --year-from not after --year-to, and year filters only together
with --court or --court-type.

Document the flags and the coverage caveat in the README and skills.
Remove --year-from and --year-to from firecrawl gov, along with their
validation, the yearFrom and yearTo query parameters, and their mentions
in the help example, README, and skills.
@KrisOei
KrisOei marked this pull request as ready for review October 22, 2026 05:10

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/commands/gov.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (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 require human review. Adds optional gov search filters with client-side validation, docs, and API error-message passthrough. Requires human sign-off because the new query/error paths ship without unit tests and depend on API filter deployment that is not verifiable in this diff.

View guided diff | Turn on auto-fix | Re-trigger cubic

@KrisOei
KrisOei merged commit d32f009 into main Oct 22, 2026
8 checks passed
@KrisOei
KrisOei deleted the kris/gov-search-filters branch October 22, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant