Move Epiphany invalidation freshness adapter
This commit is contained in:
parent
f6f5a98a83
commit
d1f5f793d2
5 changed files with 25 additions and 21 deletions
|
|
@ -14,6 +14,8 @@ use tokio::sync::Mutex as AsyncMutex;
|
|||
use tokio::sync::oneshot;
|
||||
use tracing::warn;
|
||||
|
||||
use crate::reorient::EpiphanyFreshnessWatcherSnapshot;
|
||||
|
||||
const INVALIDATION_WATCH_DEBOUNCE: Duration = Duration::from_millis(200);
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
|
@ -24,6 +26,17 @@ pub struct EpiphanyInvalidationSnapshot {
|
|||
pub changed_paths: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
pub fn epiphany_freshness_watcher_snapshot(
|
||||
snapshot: &EpiphanyInvalidationSnapshot,
|
||||
) -> EpiphanyFreshnessWatcherSnapshot<'_> {
|
||||
EpiphanyFreshnessWatcherSnapshot {
|
||||
available: snapshot.available,
|
||||
workspace_root: snapshot.workspace_root.as_ref().map(|path| path.as_path()),
|
||||
observed_at_unix_seconds: snapshot.observed_at_unix_seconds,
|
||||
changed_paths: snapshot.changed_paths.as_slice(),
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct EpiphanyInvalidationManager {
|
||||
available: bool,
|
||||
|
|
|
|||
|
|
@ -767,7 +767,10 @@ The watcher invalidation adapter has left the vendored app-server root too.
|
|||
and its snapshots around Codex's file watcher; app-server keeps only the
|
||||
host-lifecycle calls that create, snapshot, and remove watches for loaded
|
||||
threads. There is no longer a root `epiphany_invalidation.rs` module under
|
||||
vendored app-server.
|
||||
vendored app-server. The small snapshot-to-freshness adapter also lives in the
|
||||
bridge now: app-server passes `EpiphanyInvalidationSnapshot` to
|
||||
`epiphany_freshness_watcher_snapshot` instead of defining that mapping beside
|
||||
`codex_message_processor.rs`.
|
||||
|
||||
The MCP config path is now product-quarantined. `Config::to_mcp_config` keeps
|
||||
user-declared MCP servers but no longer accepts a `PluginsManager`, folds
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -314,8 +314,7 @@ use codex_thread_store::UpdateThreadMetadataParams as StoreUpdateThreadMetadataP
|
|||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use codex_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use epiphany_codex_bridge::invalidation::EpiphanyInvalidationManager;
|
||||
use epiphany_codex_bridge::invalidation::EpiphanyInvalidationSnapshot;
|
||||
use epiphany_codex_bridge::reorient::EpiphanyFreshnessWatcherSnapshot;
|
||||
use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot;
|
||||
use epiphany_codex_bridge::state::live_thread_epiphany_state;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
|
|
@ -340,17 +339,6 @@ use tracing::info;
|
|||
use tracing::warn;
|
||||
use uuid::Uuid;
|
||||
|
||||
fn epiphany_freshness_watcher_snapshot(
|
||||
snapshot: &EpiphanyInvalidationSnapshot,
|
||||
) -> EpiphanyFreshnessWatcherSnapshot<'_> {
|
||||
EpiphanyFreshnessWatcherSnapshot {
|
||||
available: snapshot.available,
|
||||
workspace_root: snapshot.workspace_root.as_ref().map(|path| path.as_path()),
|
||||
observed_at_unix_seconds: snapshot.observed_at_unix_seconds,
|
||||
changed_paths: snapshot.changed_paths.as_slice(),
|
||||
}
|
||||
}
|
||||
|
||||
mod token_usage_replay;
|
||||
|
||||
use crate::filters::compute_source_filters;
|
||||
|
|
|
|||
Reference in a new issue