aKode fase 2b-2: rimosso login ChatGPT e tutti i sottosistemi solo-ChatGPT
- Login: resta solo chiave API (+ header, Bedrock). Rimossi OAuth/browser, device code, refresh/revoke su auth.openai.com, PAT, agent/workload identity, runtime agent instance, backend-client e openapi-models, workspace routing. - Rimossi: generazione immagini (ext + skill imagegen), history notes, plugin remoti (catalogo, sync, share), cyber access program, daybreak, cloud config e requirements (config_server ora fail-closed), attestation, frozen cloud skills, EMA MCP auth, Codex Apps/connettori, ricerca ospitata, header/zstd/ routing/cookie del backend Codex, fallback OPENAI_API_KEY del realtime. - Messaggi d'errore senza link a chatgpt.com. - Chiavi di config legacy accettate e ignorate; feature rimosse = Stage::Removed. - Test: cancellati solo quelli del codice rimosso; test di sicurezza (sandbox estensioni, permessi, redazione, auth storage, requirements) adattati. Restano solo fallimenti d'ambiente (code-mode-host/V8, ~/.agents). - Istruzioni di sistema invariate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,14 +138,12 @@ pub(super) async fn run_main_inner(
|
||||
}
|
||||
let embedded_network_policy =
|
||||
codex_app_server_client::EmbeddedNetworkPolicy::load(&launch_loader_overrides).await;
|
||||
let workload_identity_selected = is_workload_identity_selected();
|
||||
|
||||
if !std::io::stdin().is_terminal() || !std::io::stdout().is_terminal() {
|
||||
let validation_target = app_server_target_for_launch(
|
||||
explicit_remote_endpoint.clone(),
|
||||
explicit_local_daemon_socket.clone(),
|
||||
/*can_reuse_implicit_local_daemon*/ false,
|
||||
workload_identity_selected,
|
||||
std::env::var_os(codex_exec_server::CODEX_EXEC_SERVER_URL_ENV_VAR).as_deref(),
|
||||
)?;
|
||||
let validation_environment_manager =
|
||||
@@ -169,20 +167,8 @@ pub(super) async fn run_main_inner(
|
||||
cli_kv_overrides.clone(),
|
||||
validation_loader_overrides.clone(),
|
||||
strict_config,
|
||||
CloudConfigBundleLoader::default(),
|
||||
)
|
||||
.await;
|
||||
let validation_cloud_config_bundle = if workload_identity_selected {
|
||||
cloud_config_bundle_for_app_server_target(
|
||||
&validation_target,
|
||||
&validation_bootstrap,
|
||||
&codex_home,
|
||||
&embedded_network_policy,
|
||||
)
|
||||
.await?
|
||||
} else {
|
||||
CloudConfigBundleLoader::default()
|
||||
};
|
||||
load_config_or_exit(
|
||||
cli_kv_overrides.clone(),
|
||||
ConfigOverrides {
|
||||
@@ -204,7 +190,6 @@ pub(super) async fn run_main_inner(
|
||||
..Default::default()
|
||||
},
|
||||
validation_loader_overrides,
|
||||
validation_cloud_config_bundle,
|
||||
strict_config,
|
||||
)
|
||||
.await;
|
||||
@@ -214,12 +199,10 @@ pub(super) async fn run_main_inner(
|
||||
&cli,
|
||||
&cli_kv_overrides,
|
||||
&launch_loader_overrides,
|
||||
workload_identity_selected,
|
||||
std::env::var_os(codex_exec_server::CODEX_EXEC_SERVER_URL_ENV_VAR).as_deref(),
|
||||
);
|
||||
let reuse_implicit_local_daemon = daemon_exclusion.is_none();
|
||||
let search_only_config_override = !workload_identity_selected
|
||||
&& cli.web_search
|
||||
let search_only_config_override = cli.web_search
|
||||
&& startup_preflight::has_only_search_config_override(&cli_kv_overrides)
|
||||
&& loader_overrides_are_default(&launch_loader_overrides)
|
||||
&& !strict_config
|
||||
@@ -234,7 +217,6 @@ pub(super) async fn run_main_inner(
|
||||
&codex_home,
|
||||
codex_config::loader::system_config_toml_file(),
|
||||
|| codex_config::loader::has_local_managed_configuration(&codex_home),
|
||||
|name| std::env::var_os(name),
|
||||
)
|
||||
{
|
||||
startup_draft::StartupDraftInitialScreen::Onboarding
|
||||
@@ -254,7 +236,6 @@ pub(super) async fn run_main_inner(
|
||||
explicit_remote_endpoint.clone(),
|
||||
explicit_local_daemon_socket.clone(),
|
||||
reuse_implicit_local_daemon,
|
||||
workload_identity_selected,
|
||||
std::env::var_os(codex_exec_server::CODEX_EXEC_SERVER_URL_ENV_VAR).as_deref(),
|
||||
)?;
|
||||
let prepared_environment_manager =
|
||||
@@ -311,7 +292,6 @@ pub(super) async fn run_main_inner(
|
||||
.map_err(std::io::Error::other)??;
|
||||
let startup_presentation::StartupPresentation {
|
||||
bootstrap_config,
|
||||
config_cwd,
|
||||
mut screen,
|
||||
local_settings,
|
||||
} = presentation;
|
||||
@@ -344,7 +324,6 @@ pub(super) async fn run_main_inner(
|
||||
explicit_remote_endpoint,
|
||||
default_daemon,
|
||||
reuse_implicit_local_daemon,
|
||||
workload_identity_selected,
|
||||
std::env::var_os(codex_exec_server::CODEX_EXEC_SERVER_URL_ENV_VAR).as_deref(),
|
||||
)?;
|
||||
let remote_cwd_override = cli
|
||||
@@ -367,14 +346,6 @@ pub(super) async fn run_main_inner(
|
||||
} else {
|
||||
Ok(())
|
||||
};
|
||||
let mut cloud_config_bundle = startup_draft
|
||||
.run_until(cloud_config_bundle_for_app_server_target(
|
||||
&app_server_target,
|
||||
&bootstrap_config,
|
||||
&codex_home,
|
||||
&embedded_network_policy,
|
||||
))
|
||||
.await??;
|
||||
let bootstrap_config_toml = &bootstrap_config.config_toml;
|
||||
|
||||
let cwd_override = if app_server_target.uses_remote_workspace() {
|
||||
@@ -385,25 +356,7 @@ pub(super) async fn run_main_inner(
|
||||
|
||||
let mut manually_selected_oss_provider = None;
|
||||
let model_provider_override = if cli.oss {
|
||||
let bootstrap_config_with_cloud_config;
|
||||
let config_toml_for_oss = if cli.oss_provider.is_none() {
|
||||
// The first load intentionally skips cloud config so we can read
|
||||
// auth/base-url settings needed to fetch the bundle. If OSS mode
|
||||
// needs a default provider from config, reload with the bundle.
|
||||
bootstrap_config_with_cloud_config = startup_draft
|
||||
.run_until(load_bootstrap_config_or_exit(
|
||||
&codex_home,
|
||||
config_cwd.as_ref(),
|
||||
cli_kv_overrides.clone(),
|
||||
loader_overrides.clone(),
|
||||
strict_config,
|
||||
cloud_config_bundle.clone(),
|
||||
))
|
||||
.await?;
|
||||
&bootstrap_config_with_cloud_config.config_toml
|
||||
} else {
|
||||
bootstrap_config_toml
|
||||
};
|
||||
let config_toml_for_oss = bootstrap_config_toml;
|
||||
|
||||
let resolved = resolve_oss_provider(cli.oss_provider.as_deref(), config_toml_for_oss);
|
||||
|
||||
@@ -486,7 +439,6 @@ pub(super) async fn run_main_inner(
|
||||
cli_kv_overrides.clone(),
|
||||
overrides.clone(),
|
||||
loader_overrides.clone(),
|
||||
cloud_config_bundle.clone(),
|
||||
strict_config,
|
||||
))
|
||||
.await?;
|
||||
@@ -499,7 +451,7 @@ pub(super) async fn run_main_inner(
|
||||
);
|
||||
|
||||
let managed_worktree = if cli.shared.worktree {
|
||||
let (destination, bundle, worktree) = startup_draft
|
||||
let (destination, worktree) = startup_draft
|
||||
.run_until(worktree_startup::prepare(
|
||||
&mut cli,
|
||||
config.clone(),
|
||||
@@ -509,13 +461,11 @@ pub(super) async fn run_main_inner(
|
||||
strict_config,
|
||||
&app_server_target,
|
||||
&arg0_paths,
|
||||
cloud_config_bundle.clone(),
|
||||
&embedded_network_policy,
|
||||
))
|
||||
.await?
|
||||
.map_err(|err| std::io::Error::other(err.to_string()))?;
|
||||
config = destination;
|
||||
cloud_config_bundle = bundle;
|
||||
if app_server_target.uses_embedded_network_policy() {
|
||||
embedded_network_policy.activate(&mut config);
|
||||
}
|
||||
@@ -686,7 +636,7 @@ pub(super) async fn run_main_inner(
|
||||
}
|
||||
}
|
||||
|
||||
if !app_server_target.uses_remote_workspace() && !workload_identity_selected {
|
||||
if !app_server_target.uses_remote_workspace() {
|
||||
#[allow(clippy::print_stderr)]
|
||||
if let Err(err) = startup_draft
|
||||
.run_until(enforce_login_restrictions(&config.auth_config()))
|
||||
@@ -795,7 +745,6 @@ pub(super) async fn run_main_inner(
|
||||
manually_selected_oss_provider,
|
||||
overrides,
|
||||
cli_kv_overrides,
|
||||
cloud_config_bundle,
|
||||
feedback,
|
||||
log_db,
|
||||
state_db,
|
||||
|
||||
Reference in New Issue
Block a user