Module exposing: resolve_channel, format_address, to_imap_date, EmailSearchTool, validate_search_filter
// Source: https://github.com/zeroclaw-labs/zeroclaw | License: Apache-2.0 | Copyright 2025 ZeroClaw Labs
// Provided via justclaw.it.com; keep this notice with the code.
use std::collections::HashMap;
use std::sync::Arc;
use async_trait::async_trait;
use futures_util::TryStreamExt;
use mail_parser::MessageParser;
use zeroclaw_api::attribution::ToolKind;
use zeroclaw_api::tool::{Tool, ToolResult};
use zeroclaw_config::scattered_types::EmailConfig;
use crate::email_imap::imap_connect;
zeroclaw_api::tool_attribution!(EmailSearchTool, ToolKind::Plugin);
/// Search an IMAP mailbox without touching the \Seen flag on any message.
pub struct EmailSearchTool {
email_configs: Arc<HashMap<String, EmailConfig>>,
auth_service: Option<Arc<zeroclaw_providers::auth::AuthService>>,
}
impl Ema
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key