Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/openhuman/config/schema/tools/integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ pub struct ComposioConfig {
/// the keychain-backed value over this field. Default `None`.
#[serde(default)]
pub api_key: Option<String>,

/// Gmail search query that scopes the background Gmail→memory sync to
/// matching messages only (full Gmail search syntax — `label:brain`,
/// `from:someone`, `newer_than:30d`; space-separated clauses AND).
/// Empty (the default) = the whole inbox window. On-demand agent access
/// to Gmail is unaffected — this gates only what auto-ingests into
/// memory.
#[serde(default)]
pub gmail_sync_query: String,
}

fn default_entity_id() -> String {
Expand All @@ -78,6 +87,7 @@ impl Default for ComposioConfig {
triage_disabled_toolkits: Vec::new(),
mode: default_composio_mode(),
api_key: None,
gmail_sync_query: String::new(),
}
}
}
Expand Down
11 changes: 3 additions & 8 deletions src/openhuman/memory/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,9 @@ impl MemoryHostConfig for Config {
entity_id: self.composio.entity_id.clone(),
api_key: self.composio.api_key.clone(),
triage_disabled: self.composio.triage_disabled,
// `None` = the whole inbox window, which is exactly what this host
// does today. The field is new on the contract (tinymemory#115-ish)
// and scopes the *background* Gmail sync to a search query;
// OpenHuman's `[integrations.composio]` has no such setting, so
// there is nothing to forward and inventing a default here would
// silently narrow what gets synced. Exposing it needs a config
// field, its schema and a migration — a follow-up, not this branch.
gmail_sync_query: None,
gmail_sync_query: Some(self.composio.gmail_sync_query.trim())
.filter(|q| !q.is_empty())
.map(str::to_string),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
}

Expand Down
Loading