{"version":3,"file":"stream-fn.d.ts","sourceRoot":"","sources":["../src/stream-fn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAEvE;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAK7C","sourcesContent":["import type { StreamFn } from \"./types.ts\";\n\nlet defaultStreamFn: StreamFn | undefined;\n\n/**\n * Configure the fallback used by Agent and low-level loops when callers omit streamFn.\n *\n * Hosts that provide a default model runtime can install its stream function here\n * without making pi-agent-core depend on a provider catalog or compatibility layer.\n */\nexport function setDefaultStreamFn(streamFn: StreamFn | undefined): void {\n\tdefaultStreamFn = streamFn;\n}\n\nexport function getDefaultStreamFn(): StreamFn {\n\tif (!defaultStreamFn) {\n\t\tthrow new Error(\"No default stream function configured. Pass streamFn explicitly or call setDefaultStreamFn().\");\n\t}\n\treturn defaultStreamFn;\n}\n"]}