Skip to content

Fetch package docs from JSR, NuGet, and Docker Hub APIs#9

Merged
christian-andersson merged 1 commit intomainfrom
feature/fetch-docs-from-jsr-nuget-docker-apis
Apr 17, 2026
Merged

Fetch package docs from JSR, NuGet, and Docker Hub APIs#9
christian-andersson merged 1 commit intomainfrom
feature/fetch-docs-from-jsr-nuget-docker-apis

Conversation

@christian-andersson
Copy link
Copy Markdown
Member

Summary

  • get_package_docs now fetches documentation directly from JSR, NuGet, and Docker Hub APIs instead of skipping them and going straight to the GitHub README fallback.
  • All three registries expose description/README content in their public APIs — we just weren't using it.
  • Registries covered by native API docs goes from 6 to 9 (out of 13).

Implementation notes

  • JSRdescription from /scopes/{scope}/packages/{name}
  • NuGetdescription from the latest catalog entry in registration5-gz-semver2
  • Docker Hubfull_description (falls back to short description) from /v2/repositories/{name}
  • GitHub README fallback still applies when the registry returns no content.
  • Maven, Go, Swift, and GitHub Actions continue to fall back to GitHub since their APIs don't expose descriptions.

Test plan

  • deno fmt --check && deno lint && deno check main.ts && deno test --allow-net all pass (verified locally)
  • Call get_package_docs for jsr:@std/path and confirm source: "registry" with JSR description
  • Call get_package_docs for nuget:Newtonsoft.Json and confirm source: "registry" with NuGet description
  • Call get_package_docs for docker:nginx and confirm source: "registry" with Docker Hub full description
  • Call get_package_docs for a package with no API description (e.g. docker: of a repo without full_description) and confirm GitHub fallback still runs

🤖 Generated with Claude Code

These three registries expose description/README fields in their public
APIs but get_package_docs was skipping them and falling back to a GitHub
README fetch. Use the native API responses instead:

- JSR: description from /scopes/{scope}/packages/{name}
- NuGet: description from the latest catalog entry in registration5
- Docker Hub: full_description (or description) from /v2/repositories

GitHub fallback still applies when the registry returns no content.
@christian-andersson christian-andersson merged commit 9353bdf into main Apr 17, 2026
1 check passed
@christian-andersson christian-andersson deleted the feature/fetch-docs-from-jsr-nuget-docker-apis branch April 17, 2026 05:09
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