1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Foundation crate for the `ailoop` workspace: shared vocabulary used
//! by the `ailoop` façade and by every adapter / middleware crate.
//!
//! Most application code does not depend on `ailoop-core` directly —
//! it depends on `ailoop`, which re-exports the types you need to
//! build a `Conversation` and write a [`ChatMiddleware`]. Reach for
//! `ailoop-core` when:
//!
//! - implementing a new [`CompletionModel`] / [`CompletionClient`]
//! adapter for a provider HTTP API;
//! - writing a generic middleware that should be reusable across
//! façades, examples, or test harnesses;
//! - building reliability or observability infrastructure on top of
//! the shared event vocabulary.
//!
//! ## Layout
//!
//! - [`Message`], [`UserBlock`], [`AssistantBlock`],
//! [`ToolResultContent`], [`SystemPrompt`] — the wire model
//! exchanged between the engine and the provider.
//! - [`ChatRequest`], [`ToolDefinition`], [`ToolChoice`], [`ToolTag`]
//! — the per-turn request shape adapters lower to the provider.
//! - [`StreamChunk`], [`FinishReason`], [`Usage`] — the event stream
//! the engine emits for every run.
//! - [`ChatMiddleware`], [`HookAction`], [`ToolDecision`] — the
//! extension point for transforms, gating, and observation.
//! - [`CompletionClient`], [`CompletionModel`] — the contract every
//! provider adapter implements.
//! - [`RetryingModel`], [`Retryable`], [`RetryConfig`] — backoff
//! decorator that wraps any [`CompletionModel`].
pub use RunConfig;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use CancellationToken;