Restrict API types visibility — types module is now private

Only Message, Role, MessageContent, ContentPart, ToolCall,
FunctionCall, Usage, ImageUrl are pub-exported from agent::api.

Internal types (ChatRequest, ChatCompletionChunk, ChunkChoice,
Delta, ReasoningConfig, ToolCallDelta, FunctionCallDelta) are
pub(crate) — invisible outside the crate.

All callers updated to import from agent::api:: instead of
agent::api::types::.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-07 13:39:20 -04:00
parent 25f4cfabbb
commit f33b1767da
10 changed files with 17 additions and 16 deletions

View file

@ -58,7 +58,7 @@ impl Tool {
}
// Re-export API wire types used by the agent turn loop
use super::api::types::ToolCall;
use super::api::ToolCall;
/// A tool call in flight — metadata for TUI + JoinHandle for
/// result collection and cancellation.