Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

989 B
Raw Blame
//! [`CompanyMetadataResolver`] adapter that never resolves.
//!
//! Used by binaries that construct a [`CrmService`] without carrying a
//! metadata provider — HTTP API servers, MCP, and agent tools. Wiring a
//! real resolver into each of them would add website-fetching dependencies
//! and network work to their request paths. Companies they create get a
//! pending `crm_domain_directory` entry, which the email pubsub workers'
//! enrichment worker resolves with the real resolver.
//!
//! [`CrmService`]: crate::domain::service::CrmService

use crate::domain::company_metadata_resolver::{CompanyMetadataResolver, DomainResolution};

/// A [`CompanyMetadataResolver`] that always returns
/// [`DomainResolution::Unavailable`].
#[derive(Debug, Default, Clone, Copy)]
pub struct NoOpCompanyMetadataResolver;

impl CompanyMetadataResolver for NoOpCompanyMetadataResolver {
    async fn resolve(&self, _domain: &str) -> DomainResolution {
        DomainResolution::Unavailable
    }
}