pluginOptions()'s return shape — a plain additional export function, parallel to the
mandatory pluginInfo() (see this module's own top-level docs). Omitting pluginOptions()
entirely is valid, and is the expected shape for every non-download plugin, and for a download
plugin with nothing to configure — the host then shows no settings UI for that plugin at all
(spec FR-015). specs/005-download-plugin-progress/contracts/plugin-download-protocol.md is the
wire contract this mirrors field-for-field.
domain_rules: DomainRule[]
The plugin's own declared default DomainRules for the domain(s) it targets.
Absent/empty means the plugin declares no concurrency/rate-limit defaults of its own — that
domain is unmanaged (unlimited) unless a user override exists (spec FR-017: the system itself
imposes no default).
bundle_as_archive: { default: boolean; description: string; }
Only meaningful for a plugin whose execDownload can return more than one
DownloadResult.downloads element. Absent for a single-resource-only plugin (no
such setting shown at all).
overwrite_on_duplicate: { default: boolean; description: string; }
Whether starting a download for a URL this plugin handles should overwrite an existing
archive that collides by content hash or destination filename, rather than the default safe
behavior (reject the new file, keep the existing archive untouched). Omit if this plugin has
no opinion — the effective value then falls back to the global replacedupe setting.
relative_newer_policy: { default: RelativeNewerPolicy; description: string; }
How to handle a download the host determines (via DownloadResult.version_history)
is a NEWER revision of an already-catalogued archive.
Declaring this is entirely optional even for a plugin that does populate version_history:
the host detects version_history support by static analysis of the plugin's own source (a
plugin_introspect dispatcher call), so the settings UI offers both policies to the user
regardless, falling back to DEFAULT_RELATIVE_NEWER_POLICY when the plugin states no
preference. Declare it only to express a different default than that.
relative_older_policy: { default: RelativeOlderPolicy; description: string; }
How to handle a download the host determines is an OLDER revision of an already-catalogued
archive. Optional on exactly the same terms as
PluginOptionsResult.relative_newer_policy; defaults to
DEFAULT_RELATIVE_OLDER_POLICY.
check_interval: { suggested_secs: number; minimum_secs: number; description: string; }
How often a subscription against this source may check (issue #55). Only meaningful for a
plugin that also exports Discover.
Two numbers because two parties hold different knowledge: this plugin knows what its site
tolerates (rate limits, ban risk), while the user knows how closely they want to follow a given
creator. suggested_secs is a starting point the user may change; minimum_secs is a floor the
host enforces and the user cannot go under — being rate-limited or banned is not a consequence
the user should have to discover by trial.