pub fn dynamic_catalog(
source_id: impl Into<String>,
) -> (CatalogWriter, CatalogReader)Expand description
Constructs a fresh dynamic tool catalog as a writer/reader pair.
The writer mutates the catalog; the reader implements ToolSource and
is what gets handed to an Agent. Both sides share storage internally —
callers see only sized, owned values. Modeled on
tokio::sync::watch::channel.
source_id appears as the source field on every emitted
ToolCatalogEvent.
use agentkit_tools_core::dynamic_catalog;
let (writer, reader) = dynamic_catalog("plugins");
assert_eq!(writer.source_id(), "plugins");
assert_eq!(reader.source_id(), "plugins");