Expand description
Cross-source orchestrators that compose multiple Source impls into
a single user-facing operation.
Slice 2 of the doiget roadmap promotes fetch_paper and
batch_fetch from doiget-cli into this module so the MCP server
(doiget-mcp) and the CLI share one source of truth for the per-ref
orchestration. The CLI’s commands::fetch::fetch_one is now a thin
wrapper that delegates here and adds the human-facing stderr print
line. Dry-run preview helpers live as fetch_paper_plan and
batch_fetch_plans.
Structs§
- Batch
Outcome - Outcome of a successful
batch_fetchcall. - Batch
Result Entry - Per-ref outcome carried inside
BatchOutcome::results. - Fetch
Options - How
fetch_paper_withtreats a request this session was already answered on (#507, ADR-0057). - Fetch
Paper Outcome - What
fetch_paperwrote to disk and how. - Metadata
Only Options - What a metadata-only resolve may spend beyond its single round-trip.
- Metadata
Only Outcome - Outcome of a successful
metadata_onlycall. - Source
Attempt - One row of the resolution trace.
Enums§
- Attempt
Outcome - Why a given optional source did or did not contribute.
- PdfLeg
Status - Outcome of a successful
fetch_papercall.
Functions§
- attempts_
to_ value - The trace as JSON, for the machine-readable surfaces (#459).
- batch_
fetch - Iterate over
refsthroughfetch_paper, collecting oneBatchResultEntryper ref. - batch_
fetch_ plans - Dry-run preview for a batch — one
FetchPlanper ref. Enforces the sameMAX_BATCH_REFScapbatch_fetchdoes. - batch_
fetch_ with batch_fetchwithFetchOptionsapplied to every entry (#507).- cite_
metadata - Build a doi2bib-quality
Metadatafordoiget citefrom a resolver outcome — WITHOUT any store write. - configured_
contact_ email - The polite-pool contact address the user configured, or
None. - contact_
email_ or_ placeholder configured_contact_emailwithdoiget@localhostas the last rung, for callers that always need some address.- fetch_
paper - Resolve a
Refto a PDF (or metadata-only fallback) and write it throughstore. - fetch_
paper_ plan - Build the dry-run preview (
FetchPlan) for a single ref without touching the network, store, or provenance log. Thin re-export ofcrate::dry_run::build_fetch_planunder the slice-2 naming the MCP tool surfaces use; kept here so the MCPdoiget_fetch_papertool method does not have to reach across two modules. - fetch_
paper_ with fetch_paper, with repeat suppression’s override exposed.- metadata_
only - Resolve a
Refto metadata WITHOUT triggering a publisher PDF fetch. - metadata_
only_ to_ store - Resolve a
Refto metadata and persist the metadata TOML to the store — thedocs/MCP_TOOLS.md§11doiget_metadata_onlySIDE EFFECT (#139). - metadata_
only_ to_ store_ with_ options metadata_only_to_store, with the caller choosing what it is willing to spend.- metadata_
only_ with_ options metadata_only, with the caller choosing what it is willing to spend.- nothing_
was_ consulted - True when no source in the trace was actually reached.
- render_
attempts - Render a whole trace as an
= note:-style block. - resolve_
only - Resolve a
Refto metadata with no local persistence. - resolve_
only_ with_ options resolve_only, with the caller choosing what it is willing to spend.- try_
fetch_ paper_ plan - Fallible sibling of
fetch_paper_plan— propagates an internal allowlist-contract drift as a typedFetchError::SourceSchemainstead of degrading to an emptycandidate_hostslist (issue #156 ②). Thin re-export ofcrate::dry_run::try_build_fetch_plan. Added alongside the infalliblefetch_paper_planrather than changing its signature, becausefetch_paper_planispuband called fromdoiget-mcp, which is out of scope for this batch. - widening_
env - Every environment variable the trace says would widen this search, in first-seen order and de-duplicated.