mirror of
https://github.com/openai/codex.git
synced 2026-05-05 22:01:37 +03:00
feat: add graph representation of agent network (#15056)
Add a representation of the agent graph. This is now used for: * Cascade close agents (when I close a parent, it close the kids) * Cascade resume (oposite) Later, this will also be used for post-compaction stuffing of the context Direct fix for: https://github.com/openai/codex/issues/14458
This commit is contained in:
11
codex-rs/state/src/model/graph.rs
Normal file
11
codex-rs/state/src/model/graph.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use strum::AsRefStr;
|
||||
use strum::Display;
|
||||
use strum::EnumString;
|
||||
|
||||
/// Status attached to a directional thread-spawn edge.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, AsRefStr, Display, EnumString)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum DirectionalThreadSpawnEdgeStatus {
|
||||
Open,
|
||||
Closed,
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
mod agent_job;
|
||||
mod backfill_state;
|
||||
mod graph;
|
||||
mod log;
|
||||
mod memories;
|
||||
mod thread_metadata;
|
||||
@@ -13,6 +14,7 @@ pub use agent_job::AgentJobProgress;
|
||||
pub use agent_job::AgentJobStatus;
|
||||
pub use backfill_state::BackfillState;
|
||||
pub use backfill_state::BackfillStatus;
|
||||
pub use graph::DirectionalThreadSpawnEdgeStatus;
|
||||
pub use log::LogEntry;
|
||||
pub use log::LogQuery;
|
||||
pub use log::LogRow;
|
||||
|
||||
Reference in New Issue
Block a user