Files
codex/codex-rs/external-agent-sessions/Cargo.toml
stefanstokic-oai 4c68bd728f External agent session support (#19895)
## Summary

This extends external agent detection/import beyond config artifacts so
Codex can detect recent sessions files from the external agent home and
import them into Codex rollout history.

## What changed

- Added a focused `external_agent_sessions` module for:
  - session discovery
  - source-record parsing
  - rollout construction
  - import ledger tracking
- Wired session detection/import into the app-server external agent
config API.
- Added compaction handling so large imported sessions can be resumed
safely before the first follow-up turn.

## Testing

Added coverage for:
- recent-session detection
- custom-title handling
- recency filtering
- dedupe and re-detect-after-source-change behavior
- visible imported turn construction
- backward-compatible import payload deserialization
- end-to-end RPC import flow
- rejection of undetected session paths
- repeat-import behavior
- large-session compaction before first follow-up

Ran:
- `cargo test -p codex-app-server external_agent_config_import_ --test
all`
2026-04-28 17:42:36 +00:00

26 lines
584 B
TOML

[package]
name = "codex-external-agent-sessions"
version.workspace = true
edition.workspace = true
license.workspace = true
[lib]
doctest = false
name = "codex_external_agent_sessions"
path = "src/lib.rs"
[lints]
workspace = true
[dependencies]
chrono = { workspace = true }
codex-protocol = { workspace = true }
codex-utils-output-truncation = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
[dev-dependencies]
codex-app-server-protocol = { workspace = true }
tempfile = { workspace = true }