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
// Copyright (c) 2026 vectorless developers
// SPDX-License-Identifier: Apache-2.0
//! Retrieval agent — struct-based document intelligence.
//!
//! # Architecture
//!
//! The retrieval dispatcher always goes through the Orchestrator.
//! Based on [`Scope`]:
//!
//! - **User specified doc_ids** → Orchestrator skips analysis, spawns Workers directly.
//! - **Workspace / unspecified** → Orchestrator analyzes DocCards, selects docs, spawns Workers.
//!
//! Both paths produce the same [`Output`] type and share the same synthesis logic.
//!
//! ```text
//! dispatch(query, scope)
//! └── Orchestrator (always)
//! ├── Scope::Specified(docs) → skip analysis → N × Worker → synthesis
//! └── Scope::Workspace(ws) → analysis → N × Worker → fusion → synthesis
//! ```
//!
//! # Agent trait
//!
//! All retrieval agents implement [`Agent`] with `async fn run(self)` (Edition 2024).
//! The trait uses native async functions — no `async-trait` crate needed.
pub use ;
pub use ;
/// Agent trait — async, consuming-self execution.
///
/// Each agent struct holds its own configuration and context.
/// Calling `run(self)` consumes the agent and produces output.
///
/// Uses Edition 2024 native `async fn` in trait — no `async-trait` crate.