Skip to main content

Module orchestrator

Module orchestrator 

Source
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§

BatchOutcome
Outcome of a successful batch_fetch call.
BatchResultEntry
Per-ref outcome carried inside BatchOutcome::results.
FetchOptions
How fetch_paper_with treats a request this session was already answered on (#507, ADR-0057).
FetchPaperOutcome
What fetch_paper wrote to disk and how.
MetadataOnlyOptions
What a metadata-only resolve may spend beyond its single round-trip.
MetadataOnlyOutcome
Outcome of a successful metadata_only call.
SourceAttempt
One row of the resolution trace.

Enums§

AttemptOutcome
Why a given optional source did or did not contribute.
PdfLegStatus
Outcome of a successful fetch_paper call.

Functions§

attempts_to_value
The trace as JSON, for the machine-readable surfaces (#459).
batch_fetch
Iterate over refs through fetch_paper, collecting one BatchResultEntry per ref.
batch_fetch_plans
Dry-run preview for a batch — one FetchPlan per ref. Enforces the same MAX_BATCH_REFS cap batch_fetch does.
batch_fetch_with
batch_fetch with FetchOptions applied to every entry (#507).
cite_metadata
Build a doi2bib-quality Metadata for doiget cite from 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_email with doiget@localhost as the last rung, for callers that always need some address.
fetch_paper
Resolve a Ref to a PDF (or metadata-only fallback) and write it through store.
fetch_paper_plan
Build the dry-run preview (FetchPlan) for a single ref without touching the network, store, or provenance log. Thin re-export of crate::dry_run::build_fetch_plan under the slice-2 naming the MCP tool surfaces use; kept here so the MCP doiget_fetch_paper tool method does not have to reach across two modules.
fetch_paper_with
fetch_paper, with repeat suppression’s override exposed.
metadata_only
Resolve a Ref to metadata WITHOUT triggering a publisher PDF fetch.
metadata_only_to_store
Resolve a Ref to metadata and persist the metadata TOML to the store — the docs/MCP_TOOLS.md §11 doiget_metadata_only SIDE 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 Ref to 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 typed FetchError::SourceSchema instead of degrading to an empty candidate_hosts list (issue #156 ②). Thin re-export of crate::dry_run::try_build_fetch_plan. Added alongside the infallible fetch_paper_plan rather than changing its signature, because fetch_paper_plan is pub and called from doiget-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.