mirror of
https://github.com/openai/codex.git
synced 2026-05-27 06:25:48 +00:00
## Why The package layout gives Codex a stable place for runtime helpers that should travel with the entrypoint. `shell_zsh_fork` still required users to configure `zsh_path` manually, even though we already publish prebuilt zsh fork artifacts. This PR builds on #24129 and uses the shared DotSlash artifact fetcher to include the zsh fork in Codex packages when a matching target artifact exists. Packaged Codex builds can then discover the bundled fork automatically; the user/profile `zsh_path` override is removed so the feature uses the package-managed artifact instead of a legacy path knob. ## What Changed - Added `scripts/codex_package/codex-zsh`, a checked-in DotSlash manifest for the current macOS arm64 and Linux zsh fork artifacts. - Taught `scripts/build_codex_package.py` to fetch the matching zsh fork artifact and install it at `codex-resources/zsh/bin/zsh` when available for the selected target. - Added package layout validation for the optional bundled zsh resource. - Added `InstallContext::bundled_zsh_path()` and `InstallContext::bundled_zsh_bin_dir()` for package-layout resource discovery. - Threaded the packaged zsh path through config loading as the runtime `zsh_path` for packaged installs, and removed the config/profile/CLI override path. - Kept the packaged default zsh override typed as `AbsolutePathBuf` until the existing runtime `Config::zsh_path` boundary. - Updated app-server zsh-fork integration tests to spawn `codex-app-server` from a temporary package layout with `codex-resources/zsh/bin/zsh`, matching the new packaged discovery path instead of setting `zsh_path` in config. - Switched package executable copying from metadata-preserving `copy2()` to `copyfile()` plus explicit executable bits, which avoids macOS file-flag failures when local smoke tests use system binaries as inputs. ## Testing To verify that the `zsh` executable from the Codex package is picked up correctly, first I ran: ```shell ./scripts/build_codex_package.py ``` which created: ``` /private/var/folders/vw/x2knqmks50sfhfpy27nftl900000gp/T/codex-package-pms94kdp/ ``` so then I ran: ``` /private/var/folders/vw/x2knqmks50sfhfpy27nftl900000gp/T/codex-package-pms94kdp/bin/codex exec --enable shell_zsh_fork 'run `echo $0`' ``` which reported the following, as expected: ``` /private/var/folders/vw/x2knqmks50sfhfpy27nftl900000gp/T/codex-package-pms94kdp/codex-resources/zsh/bin/zsh ``` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/23756). * #23768 * __->__ #23756
162 lines
5.3 KiB
TOML
162 lines
5.3 KiB
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-core"
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
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-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-extension-api = { 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-install-context = { 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-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 }
|
|
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 }
|
|
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"]
|