Skip to main content

research_agent/ports/
paper_source.rs

1use async_trait::async_trait;
2
3use crate::domain::paper::Paper;
4use crate::error::Result;
5
6#[async_trait]
7pub trait PaperSource: Send + Sync {
8    /// Fetch papers matching a query from an external source.
9    async fn fetch_papers(&self, query: &str, limit: usize) -> Result<Vec<Paper>>;
10
11    /// Human-readable name of this source.
12    fn name(&self) -> &str;
13}