mirror of
https://github.com/openai/codex.git
synced 2026-05-16 17:23:57 +00:00
## Why We want the agent graph store to be passed down the stack as a real dependency, the same way we already treat the thread store. This will let us inject the agent graph store as a real dependency and support implementations other than the local SQLite-backed one. Right now most code instantiates a state DB and an agent graph store just-in-time. Ideally, we would not depend on the state DB directly but only read through the higher-level interfaces. This change makes the dependency boundaries explicit and moves state DB initialization to process bootstrap instead of hiding it inside local store implementations. ## What changed - `ThreadManager` now requires a `StateDbHandle` and an `AgentGraphStore` at construction time instead of treating them as optional internals. - The local store constructors no longer lazily initialize SQLite. Callers now initialize the state DB once per process and use that shared handle to build: - `LocalThreadStore` - `LocalAgentGraphStore` - App bootstraps (`app-server`, `mcp-server`, `prompt_debug`, and the thread-manager sample) now initialize the state DB up front and inject the resulting handle down the stack. - `app-server` now consistently uses its process-scoped state DB handle instead of reopening SQLite or trying to recover it from loaded threads. - Device-key storage now reuses the shared state DB handle instead of maintaining its own lazy opener. - The thread archive / descendant traversal paths now use the injected `AgentGraphStore` instead of reaching through local thread-store-specific state. ## Verification - `cargo check -p codex-core -p codex-thread-store -p codex-app-server -p codex-mcp-server -p codex-thread-manager-sample --tests` - `cargo test -p codex-thread-store` - `cargo test -p codex-core thread_manager_accepts_separate_agent_graph_store_and_thread_store -- --nocapture` - `cargo test -p codex-app-server thread_archive_archives_spawned_descendants -- --nocapture`
165 lines
5.4 KiB
TOML
165 lines
5.4 KiB
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-core"
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
name = "codex_core"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "codex-write-config-schema"
|
|
path = "src/bin/config_schema.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
arc-swap = { workspace = true }
|
|
async-channel = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
base64 = { workspace = true }
|
|
bm25 = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
clap = { workspace = true, features = ["derive"] }
|
|
codex-analytics = { workspace = true }
|
|
codex-agent-graph-store = { workspace = true }
|
|
codex-api = { workspace = true }
|
|
codex-app-server-protocol = { workspace = true }
|
|
codex-apply-patch = { workspace = true }
|
|
codex-async-utils = { workspace = true }
|
|
codex-code-mode = { workspace = true }
|
|
codex-connectors = { workspace = true }
|
|
codex-config = { workspace = true }
|
|
codex-core-plugins = { workspace = true }
|
|
codex-core-skills = { workspace = true }
|
|
codex-exec-server = { workspace = true }
|
|
codex-features = { workspace = true }
|
|
codex-feedback = { workspace = true }
|
|
codex-login = { workspace = true }
|
|
codex-memories-read = { workspace = true }
|
|
codex-mcp = { workspace = true }
|
|
codex-model-provider-info = { workspace = true }
|
|
codex-models-manager = { workspace = true }
|
|
codex-shell-command = { workspace = true }
|
|
codex-execpolicy = { workspace = true }
|
|
codex-git-utils = { workspace = true }
|
|
codex-hooks = { workspace = true }
|
|
codex-network-proxy = { workspace = true }
|
|
codex-otel = { workspace = true }
|
|
codex-plugin = { workspace = true }
|
|
codex-model-provider = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-response-debug-context = { workspace = true }
|
|
codex-rollout = { workspace = true }
|
|
codex-rollout-trace = { workspace = true }
|
|
codex-rmcp-client = { workspace = true }
|
|
codex-sandboxing = { workspace = true }
|
|
codex-state = { workspace = true }
|
|
codex-terminal-detection = { workspace = true }
|
|
codex-thread-store = { workspace = true }
|
|
codex-tools = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-cache = { workspace = true }
|
|
codex-utils-image = { workspace = true }
|
|
codex-utils-home-dir = { workspace = true }
|
|
codex-utils-output-truncation = { workspace = true }
|
|
codex-utils-path = { workspace = true }
|
|
codex-utils-plugins = { workspace = true }
|
|
codex-utils-pty = { workspace = true }
|
|
codex-utils-readiness = { workspace = true }
|
|
codex-utils-string = { workspace = true }
|
|
codex-utils-stream-parser = { workspace = true }
|
|
codex-utils-template = { workspace = true }
|
|
codex-windows-sandbox = { package = "codex-windows-sandbox", path = "../windows-sandbox-rs" }
|
|
csv = { workspace = true }
|
|
dirs = { workspace = true }
|
|
dunce = { workspace = true }
|
|
env-flags = { workspace = true }
|
|
eventsource-stream = { workspace = true }
|
|
futures = { workspace = true }
|
|
http = { workspace = true }
|
|
iana-time-zone = { workspace = true }
|
|
image = { workspace = true, features = ["jpeg", "png", "webp"] }
|
|
indexmap = { workspace = true }
|
|
libc = { workspace = true }
|
|
notify = { workspace = true }
|
|
once_cell = { workspace = true }
|
|
rand = { workspace = true }
|
|
regex-lite = { workspace = true }
|
|
reqwest = { workspace = true, features = ["json", "stream"] }
|
|
rmcp = { workspace = true, default-features = false, features = [
|
|
"base64",
|
|
"macros",
|
|
"schemars",
|
|
"server",
|
|
] }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
sha1 = { workspace = true }
|
|
shlex = { workspace = true }
|
|
similar = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, features = [
|
|
"io-std",
|
|
"macros",
|
|
"process",
|
|
"rt-multi-thread",
|
|
"signal",
|
|
] }
|
|
tokio-util = { workspace = true, features = ["rt"] }
|
|
tokio-tungstenite = { workspace = true }
|
|
toml = { workspace = true }
|
|
toml_edit = { workspace = true }
|
|
tracing = { workspace = true, features = ["log"] }
|
|
url = { workspace = true }
|
|
uuid = { workspace = true, features = ["serde", "v4", "v5"] }
|
|
which = { workspace = true }
|
|
whoami = { workspace = true }
|
|
|
|
# Build OpenSSL from source for musl builds.
|
|
[target.x86_64-unknown-linux-musl.dependencies]
|
|
openssl-sys = { workspace = true, features = ["vendored"] }
|
|
|
|
# Build OpenSSL from source for musl builds.
|
|
[target.aarch64-unknown-linux-musl.dependencies]
|
|
openssl-sys = { workspace = true, features = ["vendored"] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
codex-shell-escalation = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = { workspace = true }
|
|
assert_matches = { workspace = true }
|
|
codex-otel = { workspace = true }
|
|
codex-test-binary-support = { workspace = true }
|
|
codex-utils-cargo-bin = { workspace = true }
|
|
core_test_support = { workspace = true }
|
|
ctor = { workspace = true }
|
|
insta = { workspace = true }
|
|
maplit = { workspace = true }
|
|
opentelemetry = { workspace = true }
|
|
predicates = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
test-case = "3.3.1"
|
|
opentelemetry_sdk = { workspace = true, features = [
|
|
"experimental_metrics_custom_reader",
|
|
"metrics",
|
|
] }
|
|
serial_test = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
test-log = { workspace = true }
|
|
tracing-opentelemetry = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
tracing-test = { workspace = true, features = ["no-env-filter"] }
|
|
walkdir = { workspace = true }
|
|
wiremock = { workspace = true }
|
|
zstd = { workspace = true }
|
|
|
|
[package.metadata.cargo-shear]
|
|
ignored = ["openssl-sys"]
|