Skip to main content

meerkat_client/
lib.rs

1//! meerkat-client — shim re-exports.
2//!
3//! The LLM wire-client trait + plumbing moved to `meerkat-llm-core`;
4//! per-provider clients (`AnthropicClient`, `OpenAiClient`, `GeminiClient`,
5//! `OpenAiLiveClient`, `OpenAiCompatibleClient`)
6//! moved to `meerkat-anthropic`, `meerkat-openai`, `meerkat-gemini`.
7//! Provider-runtime types moved to `meerkat-core::provider_runtime`.
8//! Auth primitives moved to `meerkat-auth-core`.
9//!
10//! This crate is retained as a thin shim so that downstream
11//! `meerkat_client::*` imports continue to work without an import sweep.
12//! B2 split (2026-04-18).
13
14pub use meerkat_llm_core::{
15    BlockAssembler, BlockKey, FactoryError, LlmClient, LlmClientAdapter, LlmDoneOutcome, LlmError,
16    LlmEvent, LlmRequest, LlmResponse, RealtimeExternalSessionTarget, RealtimeSession,
17    RealtimeSessionEvent, RealtimeSessionFactory, StreamAssemblyError, TestClient, ToolCallBuffer,
18};
19
20#[cfg(feature = "anthropic")]
21pub use meerkat_anthropic::AnthropicClient;
22
23#[cfg(all(
24    feature = "openai",
25    feature = "openai-realtime",
26    not(target_arch = "wasm32")
27))]
28pub use meerkat_openai::OpenAiLiveClient;
29#[cfg(feature = "openai")]
30pub use meerkat_openai::client_compatible::OpenAiCompatibleMode;
31#[cfg(all(
32    feature = "openai",
33    feature = "openai-realtime",
34    not(target_arch = "wasm32")
35))]
36pub use meerkat_openai::live::{
37    OpenAiLiveCallTarget, OpenAiLiveClientEvent, OpenAiLiveServerEvent, OpenAiLiveSession,
38    OpenAiLiveSessionFactory, OpenAiRealtimeSession, OpenAiRealtimeSessionFactory,
39    openai_live_function_call_error_event, openai_live_function_call_success_events,
40    pump_openai_live_session,
41};
42#[cfg(all(
43    feature = "openai",
44    feature = "openai-realtime",
45    not(target_arch = "wasm32")
46))]
47pub use meerkat_openai::realtime_attachment::RealtimeAttachmentToolDispatchHost;
48#[cfg(feature = "openai")]
49pub use meerkat_openai::{OpenAiClient, OpenAiCompatibleClient};
50
51#[cfg(feature = "gemini")]
52pub use meerkat_gemini::GeminiClient;
53
54// Re-export ResolverEnvironment/ProviderRuntimeRegistry so existing callers
55// using `meerkat_client::{ResolverEnvironment, ProviderRuntimeRegistry}`
56// continue to compile.
57pub use meerkat_llm_core::provider_runtime::{ProviderRuntimeRegistry, ResolverEnvironment};
58
59// Shim modules that expose the legacy paths as aliases to the new homes.
60pub mod adapter {
61    pub use meerkat_llm_core::LlmClientAdapter;
62}
63pub mod block_assembler {
64    pub use meerkat_llm_core::{BlockAssembler, BlockKey, StreamAssemblyError};
65}
66pub mod error {
67    pub use meerkat_llm_core::LlmError;
68}
69pub mod factory {
70    pub use meerkat_llm_core::FactoryError;
71}
72pub mod realtime_session {
73    pub use meerkat_llm_core::realtime_session::*;
74}
75pub mod types {
76    pub use meerkat_llm_core::{
77        LlmClient, LlmDoneOutcome, LlmEvent, LlmRequest, LlmResponse, LlmStream, ToolCallBuffer,
78    };
79}
80
81#[cfg(feature = "anthropic")]
82pub mod anthropic {
83    pub use meerkat_anthropic::*;
84}
85
86#[cfg(feature = "openai")]
87pub mod openai {
88    pub use meerkat_openai::client::*;
89}
90#[cfg(feature = "openai")]
91pub mod openai_compatible {
92    pub use meerkat_openai::client_compatible::*;
93}
94#[cfg(all(
95    feature = "openai",
96    feature = "openai-realtime",
97    not(target_arch = "wasm32")
98))]
99pub mod openai_live {
100    pub use meerkat_openai::live::*;
101}
102#[cfg(all(
103    feature = "openai",
104    feature = "openai-realtime",
105    not(target_arch = "wasm32")
106))]
107pub mod openai_realtime_attachment {
108    pub use meerkat_openai::realtime_attachment::*;
109}
110
111#[cfg(feature = "gemini")]
112pub mod gemini {
113    pub use meerkat_gemini::*;
114}