Skip to content

fix: use maintained DuckDuckGo compatibility client - #132

Open
lennney wants to merge 1 commit into
jina-ai:mainfrom
lennney:agent/use-ddg-kit-alias
Open

lennney wants to merge 1 commit into
jina-ai:mainfrom
lennney:agent/use-ddg-kit-alias

Conversation

@lennney

@lennney lennney commented Aug 2, 2026

Copy link
Copy Markdown

Why

This project imports search and SafeSearchType from duck-duck-scrape. ddg-kit maintains those exports in its frozen Web compatibility surface.

The npm alias keeps the current source import unchanged. Version 0.1.1 adds the CommonJS declarations required by this project's Node16 TypeScript configuration.

I maintain ddg-kit and disclose that relationship here. The package is an unofficial greenfield compatibility implementation. It has no affiliation with DuckDuckGo or the original duck-duck-scrape maintainers.

Maintenance and adoption evidence

  • OpenCandle PR #145 merged the migration after maintainer review. Its current package manifest still lists ddg-kit.
  • intercept-mcp PR #6 records a second maintainer merge of the Web compatibility client.
  • v0.1.1 fixed the Node16 CommonJS declaration gap found during this downstream test. The release adds a packed regression fixture for the exact failure.
  • ddg-kit runs packed consumer checks on Node 18.17, 20.20, and 22.23. The release uses npm provenance and passes package-shape checks for CommonJS, ESM, and bundler consumers.

These checks support the frozen Web and News package contract. They do not provide a DuckDuckGo service-level guarantee.

Changes

  • alias duck-duck-scrape to ddg-kit@0.1.1
  • keep the agent source and legacy import unchanged
  • add a focused test for the exports used by the agent

Validation

  • npm ci --ignore-scripts --no-audit --no-fund
  • npm ls duck-duck-scrape --depth=0
  • npx jest src/__tests__/duck-search-compat.test.ts --runInBand
  • npx eslint src/__tests__/duck-search-compat.test.ts
  • npm run build

The commands above pass with the published package. Full lint reports 46 errors in unchanged files. Full Jest also has existing failures in server, tool, agent, and Docker suites. The new test and production TypeScript build pass.

Rollback

This change has no data migration. A rollback only needs the previous dependency specifier and lockfile entries.

@lennney
lennney marked this pull request as ready for review August 2, 2026 10:01
Copilot AI review requested due to automatic review settings August 2, 2026 10:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants