use async_trait::async_trait;
use uuid::Uuid;
use crate::agent::engine::{EngineConfig, EnginePreferenceStore};
use crate::agent::skills::EnabledSkillsStore;
use kyma_core::credentials::{Credential, CredentialStore};
use kyma_core::tenant::TenantId;
pub struct NullEnginePreferenceStore;
#[async_trait]
impl EnginePreferenceStore for NullEnginePreferenceStore {
async fn get(&self) -> anyhow::Result<EngineConfig> {
anyhow::bail!("no agent engine configured (local mode — set one to enable Ask AI)")
}
async fn put(&self, _cfg: &EngineConfig) -> anyhow::Result<()> {
Ok(())
}
}
pub struct NullEnabledSkillsStore;
#[async_trait]
impl EnabledSkillsStore for NullEnabledSkillsStore {
async fn get(&self) -> anyhow::Result<Vec<String>> {
Ok(Vec::new())
}
async fn put(&self, _skills: &[String]) -> anyhow::Result<()> {
Ok(())
}
}
pub struct NullCredentialStore;
#[async_trait]
impl CredentialStore for NullCredentialStore {
async fn get(&self, _tenant: TenantId, _id: Uuid) -> anyhow::Result<Credential> {
anyhow::bail!("no credential store in local mode")
}
}