mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
Fix code mode host CI integration
This commit is contained in:
Generated
-4
@@ -2487,7 +2487,6 @@ dependencies = [
|
||||
"codex-protocol",
|
||||
"deno_core_icudata",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
@@ -2500,8 +2499,6 @@ name = "codex-code-mode-client"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"codex-code-mode-protocol",
|
||||
"pretty_assertions",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
@@ -2515,7 +2512,6 @@ dependencies = [
|
||||
"codex-code-mode-protocol",
|
||||
"codex-utils-cargo-bin",
|
||||
"pretty_assertions",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"v8",
|
||||
|
||||
@@ -16,6 +16,7 @@ codex_rust_crate(
|
||||
},
|
||||
extra_binaries = [
|
||||
"//codex-rs/bwrap:bwrap",
|
||||
"//codex-rs/code-mode-host:codex-code-mode-host",
|
||||
],
|
||||
test_tags = ["no-sandbox"],
|
||||
)
|
||||
|
||||
@@ -85,9 +85,19 @@ async fn standalone_image_generation_returns_saved_path_hint_to_model() -> Resul
|
||||
ChatGptAuthFixture::new("access-chatgpt"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)?;
|
||||
let code_mode_host = codex_utils_cargo_bin::cargo_bin("codex-code-mode-host")?;
|
||||
let code_mode_host = code_mode_host
|
||||
.to_str()
|
||||
.context("code-mode host path is not valid UTF-8")?;
|
||||
|
||||
let mut mcp =
|
||||
TestAppServer::new_with_env(codex_home.path(), &[("OPENAI_API_KEY", None)]).await?;
|
||||
let mut mcp = TestAppServer::new_with_env(
|
||||
codex_home.path(),
|
||||
&[
|
||||
("OPENAI_API_KEY", None),
|
||||
("CODEX_CODE_MODE_HOST_PATH", Some(code_mode_host)),
|
||||
],
|
||||
)
|
||||
.await?;
|
||||
timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??;
|
||||
start_image_generation_turn(&mut mcp).await?;
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ async fn run_command_under_windows_session(
|
||||
command,
|
||||
cwd.as_path(),
|
||||
env,
|
||||
None,
|
||||
/*timeout_ms*/ None,
|
||||
/*read_roots_override*/ None,
|
||||
/*read_roots_include_platform_defaults*/ false,
|
||||
/*write_roots_override*/ None,
|
||||
@@ -406,7 +406,7 @@ async fn run_command_under_windows_session(
|
||||
command,
|
||||
cwd.as_path(),
|
||||
env,
|
||||
None,
|
||||
/*timeout_ms*/ None,
|
||||
/*additional_deny_read_paths*/ &[],
|
||||
/*additional_deny_write_paths*/ &[],
|
||||
/*tty*/ false,
|
||||
|
||||
@@ -14,10 +14,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
codex-code-mode-protocol = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["io-std", "io-util", "process", "rt", "sync"] }
|
||||
tokio-util = { workspace = true, features = ["rt"] }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
@@ -14,7 +14,6 @@ workspace = true
|
||||
[dependencies]
|
||||
codex-code-mode = { workspace = true }
|
||||
codex-code-mode-protocol = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["io-std", "io-util", "macros", "rt-multi-thread", "sync"] }
|
||||
tokio-util = { workspace = true, features = ["rt"] }
|
||||
# The host owns V8 process configuration, so enable the sandbox without an
|
||||
@@ -24,3 +23,8 @@ v8 = { workspace = true, features = ["v8_enable_sandbox"] }
|
||||
[dev-dependencies]
|
||||
codex-utils-cargo-bin = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
[package.metadata.cargo-shear]
|
||||
# This direct dependency intentionally selects the V8 sandbox feature for the
|
||||
# host without activating an internal workspace-crate feature.
|
||||
ignored = ["v8"]
|
||||
|
||||
@@ -19,7 +19,6 @@ workspace = true
|
||||
codex-code-mode-protocol = { workspace = true }
|
||||
codex-protocol = { workspace = true }
|
||||
deno_core_icudata = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] }
|
||||
tokio-util = { workspace = true, features = ["rt"] }
|
||||
|
||||
@@ -107,7 +107,7 @@ impl CodeModeService {
|
||||
}
|
||||
|
||||
pub fn with_delegate(delegate: Arc<dyn CodeModeSessionDelegate>) -> Self {
|
||||
Self::with_inner(delegate, None)
|
||||
Self::with_inner(delegate, /*cell_id_prefix*/ None)
|
||||
}
|
||||
|
||||
pub fn with_delegate_and_cell_id_prefix(
|
||||
|
||||
@@ -934,7 +934,7 @@ impl UnifiedExecProcessManager {
|
||||
request.command.clone(),
|
||||
request.cwd.as_path(),
|
||||
request.env.clone(),
|
||||
None,
|
||||
/*timeout_ms*/ None,
|
||||
elevated_read_roots_override.as_deref(),
|
||||
elevated_read_roots_include_platform_defaults,
|
||||
elevated_write_roots_override.as_deref(),
|
||||
@@ -955,7 +955,7 @@ impl UnifiedExecProcessManager {
|
||||
request.command.clone(),
|
||||
request.cwd.as_path(),
|
||||
request.env.clone(),
|
||||
None,
|
||||
/*timeout_ms*/ None,
|
||||
&additional_deny_read_paths,
|
||||
&additional_deny_write_paths,
|
||||
tty,
|
||||
|
||||
Reference in New Issue
Block a user