aKode fase 2b-1 (WIP): rimossi cloud-config, apps MCP ChatGPT, upload file, connectors-extension, rate limits backend; plugin remoti in corso (test non ancora compilanti)
Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
This commit is contained in:
@@ -172,25 +172,16 @@ pub async fn login_with_chatgpt(
|
||||
server.block_until_done().await
|
||||
}
|
||||
|
||||
/// Signs into the config server if needed, then reloads configuration.
|
||||
/// Remote managed configuration (config server / cloud bundles) is not
|
||||
/// supported in aKode: requirements that demand it cannot be satisfied.
|
||||
async fn sign_in_to_config_server_and_reload_config(
|
||||
config: &mut Config,
|
||||
cli_config_overrides: &CliConfigOverrides,
|
||||
_config: &mut Config,
|
||||
_cli_config_overrides: &CliConfigOverrides,
|
||||
) -> std::io::Result<()> {
|
||||
let requirements = config.config_layer_stack.requirements_toml();
|
||||
let network = codex_app_server::in_process::EmbeddedNetworkPolicy::load(
|
||||
&codex_config::LoaderOverrides::default(),
|
||||
)
|
||||
.await;
|
||||
let bootstrap_auth = network.bind_bootstrap_auth(config.auth_config());
|
||||
let auth_route_config = bootstrap_auth.auth_route_config.clone();
|
||||
codex_cloud_config::ensure_config_server_login(bootstrap_auth, requirements).await?;
|
||||
*config = crate::cloud_config::load_config(cli_config_overrides, Default::default())
|
||||
.await
|
||||
.map_err(|error| std::io::Error::other(format!("{error:#}")))?;
|
||||
network.activate(config);
|
||||
config.application_auth_route_config = Some(auth_route_config);
|
||||
Ok(())
|
||||
Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Unsupported,
|
||||
"remote managed configuration is not supported in aKode",
|
||||
))
|
||||
}
|
||||
|
||||
fn finish_login(result: std::io::Result<()>) -> ! {
|
||||
@@ -553,29 +544,9 @@ pub async fn run_login_status(cli_config_overrides: CliConfigOverrides) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
async fn logout_config_server(config: &Config) -> std::io::Result<bool> {
|
||||
match codex_cloud_config::managed_config_auth_manager(
|
||||
config.auth_config(),
|
||||
config.config_layer_stack.requirements_toml(),
|
||||
)? {
|
||||
Some(manager) => manager.logout().await,
|
||||
None => Ok(false),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run_logout(cli_config_overrides: CliConfigOverrides) -> ! {
|
||||
let config = load_config_or_exit(cli_config_overrides).await;
|
||||
let auth_route_config = config.auth_route_config();
|
||||
let config_server_logout = if config
|
||||
.config_layer_stack
|
||||
.requirements_toml()
|
||||
.requires_remote_config()
|
||||
{
|
||||
logout_config_server(&config).await
|
||||
} else {
|
||||
Ok(false)
|
||||
};
|
||||
|
||||
// Cleanup is independent of the current feature gate. Retain the grant lock
|
||||
// through account removal so another process cannot commit a late login.
|
||||
let enterprise_guard = async {
|
||||
@@ -641,14 +612,7 @@ pub async fn run_logout(cli_config_overrides: CliConfigOverrides) -> ! {
|
||||
false
|
||||
};
|
||||
|
||||
let config_server_logged_out = match config_server_logout {
|
||||
Ok(removed) => removed,
|
||||
Err(error) => {
|
||||
eprintln!("Error logging out: {error}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
if logged_out || config_server_logged_out || cleared_bedrock_config {
|
||||
if logged_out || cleared_bedrock_config {
|
||||
eprintln!("Successfully logged out");
|
||||
} else {
|
||||
eprintln!("Not logged in");
|
||||
|
||||
Reference in New Issue
Block a user