diff options
Diffstat (limited to 'libpanto/src/root.zig')
| -rw-r--r-- | libpanto/src/root.zig | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libpanto/src/root.zig b/libpanto/src/root.zig index a49a428..b5fab1a 100644 --- a/libpanto/src/root.zig +++ b/libpanto/src/root.zig @@ -2,6 +2,7 @@ const std = @import("std"); pub const conversation = @import("conversation.zig"); pub const provider = @import("provider.zig"); +pub const stream = @import("stream.zig"); pub const agent = @import("agent.zig"); pub const config = @import("config.zig"); pub const sse = @import("sse.zig"); @@ -32,12 +33,17 @@ pub const ToolRegistry = tool_registry.ToolRegistry; pub const Config = config.Config; pub const ProviderConfig = config.ProviderConfig; +// Re-export the pull-streaming surface for embedders. +pub const Event = stream.Event; +pub const Stream = agent.Stream; +pub const Agent = agent.Agent; + // Internal modules. Not part of the public API — callers drive turns via -// `provider.streamStep(allocator, io, &config, conv, receiver)` (or via the -// `Agent`, which holds a swappable `*const Config`). The process-global HTTP -// client is initialized with `config.initHttp` / torn down with -// `config.deinitHttp`. These impls are exposed here only so `refAllDecls` -// picks up their tests. +// the `Agent` (which holds a swappable `*const Config`): `agent.run()` +// returns a `*Stream` whose `next()` pulls one `Event` at a time. The +// process-global HTTP client is initialized with `config.initHttp` / torn +// down with `config.deinitHttp`. These impls are exposed here only so +// `refAllDecls` picks up their tests. const openai_chat_json = @import("openai_chat_json.zig"); const provider_openai_chat = @import("provider_openai_chat.zig"); const anthropic_messages_json = @import("anthropic_messages_json.zig"); |
