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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! Rig's classic agent runtime.
//!
//! This crate owns the mature builder, run state machine, typed hook system,
//! contextual tool registry, memory orchestration, extraction, and shared
//! blocking/streaming driver. Portable provider, message, tool, and storage
//! contracts remain in [`rig_core`] and are reachable here through the
//! explicit [`core`] namespace; this crate's root deliberately exports only
//! runtime-owned items. The comprehensive end-user facade is the root `rig`
//! crate.
//!
//! # Target support
//!
//! Native targets are fully supported. `wasm32-unknown-unknown` (browser) is
//! supported with no feature flags to set — the relaxed async bounds follow
//! from the target alone.
//!
//! The `rmcp` feature is unavailable on wasm: rmcp's `ClientHandler` requires
//! `Send + Sync` unconditionally, which this crate's wasm tool registry cannot
//! satisfy, so asking for it there raises a targeted `compile_error!`. WASI
//! (`wasm32-wasip1`/`wasip2`) is **not supported**: the dependency graph does
//! not build for it. See the crate README for the full matrix and the
//! reasoning.
extern crate self as rig;
/// Direct access to portable provider, data, memory, and tool contracts.
///
/// This explicit namespace is also the stable expansion root for portable
/// `#[rig_tool]` functions in crates that depend on `rig-agent` without a
/// separate direct `rig-core` dependency.
///
/// Portable `rig-core` root items are reachable here, but deliberately *not*
/// at the `rig_agent` crate root — adding a root export to `rig-core` must not
/// silently add one to `rig-agent`. A stable `rig-core` root export
/// ([`rig_core::OneOrMany`]) demonstrates both halves of that invariant (the
/// two doctests below enforce it):
///
/// ```
/// // Reachable through the explicit `core` namespace.
/// use rig_agent::core::OneOrMany;
/// let _reachable: Option<OneOrMany<u8>> = None;
/// ```
///
/// ```compile_fail
/// // NOT reachable at the `rig_agent` crate root.
/// use rig_agent::OneOrMany as _;
/// ```
// Shared JSON helpers live in rig-core; re-export so call sites stay
// `json_utils::merge` / `json_utils::serialize_json_value`.
pub use json_utils;
pub use ;
pub use ExtractionResponse;
pub use rig_tool;
pub use rig_tool as tool_macro;