atomr_agents_deep_research_shell/lib.rs
1//! Two-tier outer shell for [`atomr-agents-deep-research-harness`].
2//!
3//! An [`IntentClassifier`] routes incoming [`ResearchRequest`]s to
4//! either a fast shallow path (one web-search call, no role loop) or
5//! the full deep harness. The shell implements
6//! [`atomr_agents_callable::Callable`] so it composes into agents,
7//! workflows, and tool registries exactly like the underlying harness.
8//!
9//! The crate is intentionally minimal: it depends on
10//! `atomr-agents-deep-research-core` for the contract types,
11//! `atomr-agents-deep-research-harness` for the
12//! [`DeepResearchHarnessRef`] handle, and
13//! `atomr-agents-web-search-core` for the shallow path's `WebSearch`
14//! provider. It does **not** depend on any web-search-provider crate;
15//! callers wire in their own provider (or [`MockWebSearch`] for tests).
16//!
17//! ```ignore
18//! use std::sync::Arc;
19//! use atomr_agents_deep_research_shell::{
20//! DeepResearchShell, DirectSearchShallow, HeuristicIntentClassifier,
21//! };
22//!
23//! let shell = DeepResearchShell::new(
24//! Arc::new(HeuristicIntentClassifier::new()),
25//! Arc::new(DirectSearchShallow::new(web_search.clone())),
26//! deep_ref,
27//! );
28//! let v = shell.call(serde_json::json!({"query": "rust"}), ctx).await?;
29//! ```
30//!
31//! [`ResearchRequest`]: atomr_agents_deep_research_core::ResearchRequest
32//! [`DeepResearchHarnessRef`]: atomr_agents_deep_research_harness::DeepResearchHarnessRef
33//! [`MockWebSearch`]: atomr_agents_web_search_core::MockWebSearch
34
35#![forbid(unsafe_code)]
36
37mod classifier;
38mod error;
39mod shallow;
40mod shell;
41
42pub use classifier::{HeuristicIntentClassifier, IntentClassifier, ResearchTier};
43pub use error::{Result, ShellError};
44pub use shallow::{DirectSearchShallow, ShallowResearcher};
45pub use shell::DeepResearchShell;
46
47/// The shell exposes [`Callable`] from `atomr-agents-callable`.
48pub use atomr_agents_callable::Callable;