UNPKG

@earendil-works/pi-agent-core

Version:

General-purpose agent with transport abstraction, state management, and attachment support

17 lines • 631 B
let defaultStreamFn; /** * Configure the fallback used by Agent and low-level loops when callers omit streamFn. * * Hosts that provide a default model runtime can install its stream function here * without making pi-agent-core depend on a provider catalog or compatibility layer. */ export function setDefaultStreamFn(streamFn) { defaultStreamFn = streamFn; } export function getDefaultStreamFn() { if (!defaultStreamFn) { throw new Error("No default stream function configured. Pass streamFn explicitly or call setDefaultStreamFn()."); } return defaultStreamFn; } //# sourceMappingURL=stream-fn.js.map