WIP fase 2b-2: rimosso login ChatGPT/OAuth/device code, agent/workload identity, backend-client; resta solo chiave API (test non tutti verdi)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 06:00:44 +01:00
parent 82347a58ed
commit 231e8cd136
661 changed files with 4924 additions and 64817 deletions

View File

@@ -81,14 +81,11 @@ impl ConnectorRuntimeContextKey {
}
/// Builds the connector runtime context key for the active Codex auth.
pub fn connector_runtime_context_key(auth: Option<&CodexAuth>) -> ConnectorRuntimeContextKey {
let account_id = auth.and_then(CodexAuth::get_account_id);
let chatgpt_user_id = auth.and_then(CodexAuth::get_chatgpt_user_id);
if auth.is_some_and(CodexAuth::is_workspace_account) {
ConnectorRuntimeContextKey::workspace(account_id, chatgpt_user_id)
} else {
ConnectorRuntimeContextKey::personal(account_id, chatgpt_user_id)
}
///
/// Stored credentials carry no account or workspace identity, so every auth
/// shares the personal, anonymous catalog key.
pub fn connector_runtime_context_key(_auth: Option<&CodexAuth>) -> ConnectorRuntimeContextKey {
ConnectorRuntimeContextKey::personal(/*account_id*/ None, /*chatgpt_user_id*/ None)
}
/// Returns the persisted connector runtime tools cache path for the active auth identity.