OptionalbudgetBytes?: numberOptionalmaxSources?: numberCap on sources resolved through the source registry, LRU — the
request-driven half of the host's footprint. runAsync binds a
graph per distinct SourceRef, and a caller chooses the refs, so
without a cap an untrusted caller grows the host without bound.
Author-added datasets (add) are never evicted by this.
Unbounded when omitted — acceptable only when every SourceRef
the host will see comes from code the author controls.
Optionalsources?: SourceRegistryOptionalunits?: Readonly<Record<string, string>>Registers a dataset. The graph is built lazily on first use, so seeding many datasets is cheap.
Forgets a dataset: its source, its graph, and every cached node value with them. The explicit end of a binding's lifecycle — the counterpart to add for a host that cycles datasets, where "kept until the process dies" is not a policy.
Returns whether the dataset was known. A load in flight for the
same source id discards its result rather than resurrecting the
removed dataset — its runAsync callers get UnknownDatasetError,
which is what asking for a concurrently-removed dataset means.
Resolves either a preloaded dataset or an opaque asynchronous source.
Equal revisions preserve the graph untouched. A changed revision updates its source in place, retaining compiled nodes while normal invalidation propagates from the new value.
Cap on retained node values per bound graph, in bytes — see bind. Without one, a host accepting runtime plans retains every distinct spec ever asked of every dataset, so memory scales with questions asked rather than with anything bounded. A host whose plans arrive from callers it does not control should set this.
What bounds the number of graphs is a separate question with two answers. Datasets registered with add are the host author's own, bounded by what the author adds and released with remove. Sources resolved through a source registry by
runAsyncare request-driven — every distinctSourceRefa caller supplies binds another graph — so a host exposed to untrusted callers must also set maxSources. The retained total is then at mostbudgetBytes × (author datasets + maxSources).