Skip to content

Add compact metadata fetch input - #276

Merged
mbret merged 1 commit into
masterfrom
agent/compact-metadata-input
Aug 2, 2026
Merged

Add compact metadata fetch input#276
mbret merged 1 commit into
masterfrom
agent/compact-metadata-input

Conversation

@mbret

@mbret mbret commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the archive-reader-shaped metadata query with a fetcher-owned FetchMetadataInput
  • add metadataInputFromResolvedArchive as the explicit archive-reader adapter
  • update providers, search-term detection, scoring, tests, the HTTP API, playground, and documentation to use the compact input
  • keep provider candidates as rich ResolvedMetadata results and bump the fetched entity schema to version 4

Why

The previous input accepted ResolvedMetadata or anything carrying it, which made archive-reader's rich result entity double as the metadata-fetcher's query model. Providers only understood a small subset of those fields, while the public API implied that covers, descriptions, subjects, layout metadata, and format-specific values were meaningful lookup inputs.

This change makes the intended asymmetry explicit: a small lookup-and-matching input goes into providers, and rich catalog metadata comes back.

Breaking changes

This is a clean API break and requires a semver-major release:

  • fetchMetadata and MetadataProvider.search now accept only FetchMetadataInput
  • scoreMetadataCandidate accepts FetchMetadataInput plus a rich candidate
  • match signal fields use authors, publisher, and publishedYear
  • fetched entity version is now 4
  • projectGutenbergLookupFromMetadata is renamed to projectGutenbergLookupFromInput
  • the HTTP API accepts the compact POST body and flat publisher / publishedYear query parameters

Validation

  • npm run tsc — all 8 TypeScript projects passed
  • npm test --workspace @prose-reader/metadata-fetcher — 98 tests passed
  • npm test --workspace prose-reader-metadata-fetcher-api — 32 tests passed
  • npm run build --workspace @prose-reader/metadata-fetcher — production build passed

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
prose-reader-demo Ready Ready Preview Aug 2, 2026 11:14am
prose-reader-front Ready Ready Preview Aug 2, 2026 11:14am

@mbret
mbret marked this pull request as ready for review August 2, 2026 11:11
@mbret
mbret merged commit efbfb9a into master Aug 2, 2026
11 checks passed
@mbret
mbret deleted the agent/compact-metadata-input branch August 2, 2026 11:19
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