

























@@ -312,6 +312,8 @@ const CLI_ENV_AUTH_LOG_KEYS = [
312312"OPENROUTER_API_KEY",
313313] as const;
314314315+const CLI_ENV_RUNTIME_LOG_KEYS = ["GEMINI_CLI_HOME", "GEMINI_CLI_SYSTEM_SETTINGS_PATH"] as const;
316+315317const CLI_BACKEND_PRESERVE_ENV = "OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV";
316318317319function parseCliBackendPreserveEnv(raw: string | undefined): Set<string> {
@@ -346,6 +348,13 @@ function listPresentCliAuthEnvKeys(env: Record<string, string | undefined>): str
346348});
347349}
348350351+function listPresentCliRuntimeEnvKeys(env: Record<string, string | undefined>): string[] {
352+return CLI_ENV_RUNTIME_LOG_KEYS.filter((key) => {
353+const value = env[key];
354+return typeof value === "string" && value.length > 0;
355+});
356+}
357+349358function formatCliEnvKeyList(keys: readonly string[]): string {
350359return keys.length > 0 ? keys.join(",") : "none";
351360}
@@ -405,10 +414,17 @@ export function buildCliEnvAuthLog(childEnv: Record<string, string>): string {
405414const childKeys = listPresentCliAuthEnvKeys(childEnv);
406415const childKeySet = new Set(childKeys);
407416const clearedKeys = hostKeys.filter((key) => !childKeySet.has(key));
417+const runtimeHostKeys = listPresentCliRuntimeEnvKeys(process.env);
418+const runtimeChildKeys = listPresentCliRuntimeEnvKeys(childEnv);
419+const runtimeChildKeySet = new Set(runtimeChildKeys);
420+const runtimeClearedKeys = runtimeHostKeys.filter((key) => !runtimeChildKeySet.has(key));
408421return [
409422`host=${formatCliEnvKeyList(hostKeys)}`,
410423`child=${formatCliEnvKeyList(childKeys)}`,
411424`cleared=${formatCliEnvKeyList(clearedKeys)}`,
425+`runtimeHost=${formatCliEnvKeyList(runtimeHostKeys)}`,
426+`runtimeChild=${formatCliEnvKeyList(runtimeChildKeys)}`,
427+`runtimeCleared=${formatCliEnvKeyList(runtimeClearedKeys)}`,
412428].join(" ");
413429}
414430此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。