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
//! Event types for Core orchestration
//!
//! This module defines events that Core emits during conversation execution,
//! enabling flexible handling of streaming content, tool execution, and usage tracking.
//!
//! ## Events vs. Tool Approval
//!
//! Events are **observability** - fire-and-forget notifications about what's happening.
//! Tool approval is **control flow** - the system waits for a decision before proceeding.
//!
//! This is why `ToolApprovalCallback` is separate from `EventCallback`:
//! - Events return `()` and are non-blocking notifications
//! - Tool approval returns `ToolApproval` and blocks execution until resolved
//!
//! Both are async to allow I/O operations (e.g., updating shared state or prompting users).
use Future;
use Pin;
use Usage;
use ;
/// Type alias for async tool approval callback functions
pub type ToolApprovalCallback =
;
/// Events emitted by Core during conversation execution
///
/// These are one-way notifications for observability. Core does not wait for
/// or react to the callback's completion beyond awaiting it.
/// Async callback for receiving Core events
///
/// Returns `()` because events are notifications, not control flow decisions.
/// The callback is awaited to allow async I/O operations.
pub type EventCallback =
;