This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/epiphany-codex-bridge/src/pressure.rs
2026-05-28 21:02:26 +01:00

20 lines
748 B
Rust

use epiphany_core::EpiphanyPressure;
use epiphany_core::EpiphanyPressureStatus as CoreEpiphanyPressureStatus;
pub use epiphany_core::EpiphanyTokenUsageSnapshot;
use epiphany_core::derive_pressure_view;
pub fn derive_epiphany_pressure(snapshot: Option<&EpiphanyTokenUsageSnapshot>) -> EpiphanyPressure {
derive_pressure_view(snapshot)
}
pub fn should_run_epiphany_pre_compaction_checkpoint_intervention(
pressure: &EpiphanyPressure,
) -> bool {
pressure.status == CoreEpiphanyPressureStatus::Ready && pressure.should_prepare_compaction
}
pub fn render_epiphany_pre_compaction_checkpoint_intervention(
pressure: &EpiphanyPressure,
) -> String {
epiphany_core::render_epiphany_pre_compaction_checkpoint_intervention(pressure)
}