Skip to main content

Module remote_observe

Module remote_observe 

Source
Expand description

Merge remote_events aggregates into summary / insights / metrics for non-local sources.

Functionsยง

apply_remote_to_metrics
Fold remote event-derived tool call / token stats into the tool ranking sections only (files stay local).
merge_guidance_sessions_in_window
Session count in guidance teaser: for mixed, add remote session cardinality; for provider, prefer the larger of local vs remote when remote is loaded.
merge_insights_stats
merge_summary_stats
Merge or replace headline stats for DataSource (see specs/observe-pipeline.qnt).
try_remote_event_agg
Load provider-side aggregates when team_id + workspace_hash (from config + workspace) are set. Returns Ok(None) if sync context is missing; Err on DB errors.