pub async fn microcompact_session(
db: &Database,
session_id: &str,
) -> Result<Option<MicrocompactResult>>Expand description
Run microcompact on a session — clear old compactable tool results.
Only fires when the gap since the last assistant message exceeds
GAP_THRESHOLD_SECS. Returns None if the trigger doesn’t fire
or nothing was cleared.