Skip to main content

CodexAdapter

Struct CodexAdapter 

Source
pub struct CodexAdapter { /* private fields */ }
Expand description

The Codex adapter: a process is matched to the rollouts it holds open, and only where the platform cannot say to the cwd and activity heuristics. See DEC-006.

Trait Implementations§

Source§

impl Default for CodexAdapter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl HarnessAdapter for CodexAdapter

Source§

fn detect(&self, path: &Path) -> bool

Every rollout opens with a session_meta record.

Source§

fn harness(&self) -> Harness

Source§

fn rescan(&mut self, since: SystemTime)

Re-list the transcripts written since since. Called every fs_scan_interval, not every tick.
Source§

fn prepare(&mut self, roots: &[&ProcNode], by_pid: &HashMap<u32, &RawProc>)

Called once per pass with this harness’s root processes, before any of them is attributed. For work that must see every process at once: Codex reads which rollouts each process holds open here, so that no process’s fallback can claim a thread another is demonstrably writing.
Source§

fn attribute( &self, root: &ProcNode, _raw: Option<&RawProc>, ctx: &AttributeContext<'_>, ) -> (Vec<PathBuf>, Attribution)

The transcripts this process is writing, newest activity first, and how sure the adapter is. One per conversation: a Codex app-server hosts many, a CLI runs one, a process with none gets an empty list.
Source§

fn unowned(&self, attached: &HashSet<PathBuf>) -> Vec<PathBuf>

Recently written transcripts no process owns: the stopped list.
Source§

fn open(&self, path: &Path, spans: SpanRetention) -> Box<dyn SessionTracker>

A tracker for one transcript.
Source§

fn transcripts(&self) -> Vec<(String, PathBuf)>

Every transcript on disk, however old, with the id a user would type to name it. For agent-top trace --session <id>.
Source§

fn hints(&self, _pid: u32) -> Option<RegistryHints>

The harness’s own registry entry for a process, if it keeps one.
Source§

fn stamp(&self, path: &Path) -> Option<SourceStamp>

The size and modification time of everything open reads for this transcript, so the store can skip one that has not changed since it was synced. None when the transcript is not a file (a database row), which is always re-read.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.