@google/gemini-cli 0.59.0-preview.0 → 0.60.0-nightly.20260904.g87a9c71d5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/bundle/bundled/chrome-devtools-mcp.mjs +1 -1
  2. package/bundle/bundled/third_party/index.js +1 -1
  3. package/bundle/{chunk-KDHW7PJD.js → chunk-2KWYWFYH.js} +3 -3
  4. package/bundle/{chunk-D6XI6WNG.js → chunk-4EEPG33O.js} +1 -1
  5. package/bundle/{chunk-IJPZK2CD.js → chunk-4GN2ER63.js} +1 -1
  6. package/bundle/{chunk-NQC3UDKG.js → chunk-ETGYLAEQ.js} +1 -1
  7. package/bundle/{chunk-23C4TBLH.js → chunk-EY74BCUB.js} +2 -2
  8. package/bundle/{chunk-YLSAASP5.js → chunk-G5MKGD6A.js} +3 -3
  9. package/bundle/{chunk-52JU4ECF.js → chunk-GYIG2U5X.js} +275 -83
  10. package/bundle/{chunk-UA5K3TB5.js → chunk-IXEWV7DR.js} +324 -86
  11. package/bundle/{chunk-55V2C3NE.js → chunk-J4JXA5F5.js} +3 -3
  12. package/bundle/{chunk-DH76W27O.js → chunk-JYH2UAXZ.js} +2 -2
  13. package/bundle/{chunk-THPIH2AE.js → chunk-K6N5ALIZ.js} +1 -1
  14. package/bundle/{chunk-HSRFT2PV.js → chunk-KRBRLEZU.js} +2 -2
  15. package/bundle/{chunk-GOBGZY54.js → chunk-LJSQRVHR.js} +9 -8
  16. package/bundle/{chunk-ILPBRVSF.js → chunk-LSYJZADA.js} +1 -1
  17. package/bundle/{chunk-LXBSPQEH.js → chunk-LWVZ3TLL.js} +1 -1
  18. package/bundle/{chunk-M6UTVOUK.js → chunk-LZA2YQEZ.js} +1 -1
  19. package/bundle/chunk-MOGXAAGG.js +1571 -0
  20. package/bundle/chunk-NS2GPNSV.js +512 -0
  21. package/bundle/{chunk-YI5PKR5L.js → chunk-O2IBXKOU.js} +7924 -14468
  22. package/bundle/{chunk-7QCPYRGC.js → chunk-OPYHX5IV.js} +1 -1
  23. package/bundle/chunk-Q55A4HXI.js +398074 -0
  24. package/bundle/{chunk-UGT6DHAE.js → chunk-RHV3WXCU.js} +86 -21
  25. package/bundle/{chunk-UZXNPI5Z.js → chunk-RJWX5VWJ.js} +146 -68
  26. package/bundle/chunk-U5J4FOTE.js +398 -0
  27. package/bundle/{chunk-GPE57TQ5.js → chunk-UVTIYMGR.js} +8 -5
  28. package/bundle/chunk-UYHNS2XO.js +154 -0
  29. package/bundle/{chunk-VCQFRV5A.js → chunk-VI5CZJFJ.js} +1 -1
  30. package/bundle/chunk-VTRRZADJ.js +118 -0
  31. package/bundle/chunk-XFMJ4TE2.js +17332 -0
  32. package/bundle/{chunk-F45BTUYK.js → chunk-YSANBNNE.js} +1 -1
  33. package/bundle/chunk-YT4C25P2.js +102571 -0
  34. package/bundle/{chunk-FXZRZ2YL.js → chunk-ZUOQJLHX.js} +86 -21
  35. package/bundle/{cleanup-IGZ72X72.js → cleanup-DV5BMEOJ.js} +2 -2
  36. package/bundle/{cleanup-OHSG4ABA.js → cleanup-IFKZWM2L.js} +2 -2
  37. package/bundle/{cleanup-VTATI2S7.js → cleanup-K7NDCFZB.js} +2 -2
  38. package/bundle/cleanup-MIW3QRZK.js +32 -0
  39. package/bundle/{core-XJO3GR5B.js → core-4SZV5IEL.js} +9 -1
  40. package/bundle/{devtoolsService-OSXWGLT3.js → devtoolsService-AZ775QPY.js} +2 -2
  41. package/bundle/{devtoolsService-VQJ4XEED.js → devtoolsService-BZYE3B3A.js} +4 -3
  42. package/bundle/{devtoolsService-TJCP6X22.js → devtoolsService-DOIK3XII.js} +2 -2
  43. package/bundle/devtoolsService-NA732NIU.js +4359 -0
  44. package/bundle/{dist-KC5GXNU5.js → dist-267RSQ2G.js} +9 -1
  45. package/bundle/{core-Q2DBVF5E.js → dist-JUKO7MDI.js} +9 -1
  46. package/bundle/dist-VDX4TYXY.js +2196 -0
  47. package/bundle/docs/changelogs/index.md +20 -0
  48. package/bundle/docs/changelogs/latest.md +32 -281
  49. package/bundle/docs/changelogs/preview.md +18 -31
  50. package/bundle/docs/reference/tools.md +4 -4
  51. package/bundle/docs/tools/mcp-server.md +53 -0
  52. package/bundle/docs/tools/web-fetch.md +7 -3
  53. package/bundle/{gemini-FMVYHQ4P.js → gemini-4VYTZOFB.js} +56 -23
  54. package/bundle/{gemini-G4U2XJ5N.js → gemini-O2IKL5OT.js} +56 -23
  55. package/bundle/{gemini-G3Y4ZBUW.js → gemini-VJZ5KERB.js} +256 -207
  56. package/bundle/gemini-YNIYD6UU.js +17370 -0
  57. package/bundle/gemini.js +7 -7
  58. package/bundle/{interactiveCli-J7RHUM6Y.js → interactiveCli-GZR7TB7H.js} +8 -8
  59. package/bundle/{interactiveCli-ODBGO5ZB.js → interactiveCli-JBCVEYX6.js} +8 -8
  60. package/bundle/{interactiveCli-DFQDNRQR.js → interactiveCli-PVJP6K5G.js} +315 -296
  61. package/bundle/interactiveCli-ZALEAHV2.js +34983 -0
  62. package/bundle/{liteRtServerManager-FYXZXFSP.js → liteRtServerManager-BSKN2SW2.js} +4 -4
  63. package/bundle/{liteRtServerManager-H3DCLTFE.js → liteRtServerManager-KBSBWYVA.js} +4 -4
  64. package/bundle/{liteRtServerManager-BEQPNIUI.js → liteRtServerManager-L2BLDSGL.js} +4 -4
  65. package/bundle/liteRtServerManager-MWMPLFZ3.js +65 -0
  66. package/bundle/{oauth2-provider-2DCMBS2D.js → oauth2-provider-QK65ZFGG.js} +1 -1
  67. package/bundle/{oauth2-provider-3RBG2E74.js → oauth2-provider-U7ADSCRE.js} +1 -1
  68. package/bundle/{oauth2-provider-DX42O6UX.js → oauth2-provider-VY2YQMRH.js} +38 -72
  69. package/bundle/oauth2-provider-WRQZCFP6.js +235 -0
  70. package/bundle/{start-MJKXAIFL.js → start-IU76AAZM.js} +6 -6
  71. package/bundle/{start-R4LT7TW6.js → start-PDREREJZ.js} +6 -6
  72. package/bundle/{start-MIKPZTJ4.js → start-Y6MS5QLI.js} +6 -6
  73. package/bundle/start-ZYKP4UZO.js +18 -0
  74. package/package.json +1 -1
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-55V2C3NE.js";
5
+ } from "./chunk-G5MKGD6A.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -44,12 +44,13 @@ import {
44
44
  uninstallSkill,
45
45
  updateAllUpdatableExtensions,
46
46
  updateExtension,
47
- validateAuthMethod
48
- } from "./chunk-FXZRZ2YL.js";
47
+ validateAuthMethod,
48
+ validateContextFilePath
49
+ } from "./chunk-ZUOQJLHX.js";
49
50
  import {
50
51
  exitCli,
51
52
  require_source
52
- } from "./chunk-ILPBRVSF.js";
53
+ } from "./chunk-MOGXAAGG.js";
53
54
  import {
54
55
  appEvents
55
56
  } from "./chunk-5PS3AYFU.js";
@@ -87,11 +88,11 @@ import {
87
88
  resolveGemmaConfig,
88
89
  saveModelChange,
89
90
  stripAnsi
90
- } from "./chunk-GPE57TQ5.js";
91
+ } from "./chunk-YSANBNNE.js";
91
92
  import {
92
93
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-HSRFT2PV.js";
94
- import "./chunk-GOBGZY54.js";
94
+ } from "./chunk-EY74BCUB.js";
95
+ import "./chunk-VI5CZJFJ.js";
95
96
  import {
96
97
  cleanupCheckpoints,
97
98
  registerCleanup,
@@ -100,7 +101,7 @@ import {
100
101
  runExitCleanup,
101
102
  runSyncCleanup,
102
103
  setupSignalHandlers
103
- } from "./chunk-M6UTVOUK.js";
104
+ } from "./chunk-UYHNS2XO.js";
104
105
  import {
105
106
  ASK_USER_TOOL_NAME,
106
107
  AuthType,
@@ -238,7 +239,7 @@ import {
238
239
  updatePolicy,
239
240
  writeToStderr,
240
241
  writeToStdout
241
- } from "./chunk-UA5K3TB5.js";
242
+ } from "./chunk-IXEWV7DR.js";
242
243
  import "./chunk-664ZODQF.js";
243
244
  import "./chunk-IUUIT4SU.js";
244
245
  import "./chunk-TUDYL3X4.js";
@@ -6417,11 +6418,17 @@ async function validateExtension(args) {
6417
6418
  const contextFileNames = Array.isArray(extensionConfig.contextFileName) ? extensionConfig.contextFileName : [extensionConfig.contextFileName];
6418
6419
  const missingContextFiles = [];
6419
6420
  for (const contextFilePath of contextFileNames) {
6420
- const contextFileAbsolutePath = path2.resolve(
6421
- absoluteInputPath,
6422
- contextFilePath
6421
+ const validation2 = validateContextFilePath(
6422
+ contextFilePath,
6423
+ absoluteInputPath
6423
6424
  );
6424
- if (!fs.existsSync(contextFileAbsolutePath)) {
6425
+ if (!validation2.isValid) {
6426
+ errors.push(
6427
+ `Invalid context file path: "${contextFilePath}". ${validation2.errorMessage}`
6428
+ );
6429
+ continue;
6430
+ }
6431
+ if (!fs.existsSync(validation2.resolvedPath)) {
6425
6432
  missingContextFiles.push(contextFilePath);
6426
6433
  }
6427
6434
  }
@@ -7832,7 +7839,7 @@ async function loadSandboxConfig(settings, argv) {
7832
7839
  }
7833
7840
  const command2 = getSandboxCommand(sandboxValue);
7834
7841
  const packageJson = await getPackageJson(__dirname3);
7835
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.59.0-nightly.20260825.g812f7a2bc" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7842
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.60.0-nightly.20260901.g0bd1d4397" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7836
7843
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7837
7844
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7838
7845
  }
@@ -9705,13 +9712,27 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9705
9712
  patcher.patch();
9706
9713
  let stopProxy = void 0;
9707
9714
  let tempProfileFile = null;
9715
+ let sandboxTmpDir = null;
9708
9716
  const cleanup = () => {
9709
- if (tempProfileFile && fs7.existsSync(tempProfileFile)) {
9717
+ if (sandboxTmpDir) {
9718
+ const dirToDelete = sandboxTmpDir;
9719
+ sandboxTmpDir = null;
9710
9720
  try {
9711
- fs7.unlinkSync(tempProfileFile);
9721
+ if (fs7.existsSync(dirToDelete)) {
9722
+ fs7.rmSync(dirToDelete, { recursive: true, force: true });
9723
+ }
9712
9724
  } catch {
9713
9725
  }
9726
+ }
9727
+ if (tempProfileFile) {
9728
+ const fileToDelete = tempProfileFile;
9714
9729
  tempProfileFile = null;
9730
+ try {
9731
+ if (fs7.existsSync(fileToDelete)) {
9732
+ fs7.unlinkSync(fileToDelete);
9733
+ }
9734
+ } catch {
9735
+ }
9715
9736
  }
9716
9737
  if (stopProxy) {
9717
9738
  try {
@@ -9785,11 +9806,16 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9785
9806
  ...process.env["DEBUG"] ? ["--inspect-brk"] : [],
9786
9807
  ...nodeArgs
9787
9808
  ].join(" ");
9809
+ const hostTmpDir = fs7.realpathSync(os3.tmpdir());
9810
+ const resolvedTmpDir = fs7.mkdtempSync(
9811
+ path8.join(hostTmpDir, "gemini-sandbox-")
9812
+ );
9813
+ sandboxTmpDir = resolvedTmpDir;
9788
9814
  const args2 = [
9789
9815
  "-D",
9790
9816
  `TARGET_DIR=${fs7.realpathSync(process.cwd())}`,
9791
9817
  "-D",
9792
- `TMP_DIR=${fs7.realpathSync(os3.tmpdir())}`,
9818
+ `TMP_DIR=${resolvedTmpDir}`,
9793
9819
  "-D",
9794
9820
  `HOME_DIR=${fs7.realpathSync(homedir())}`,
9795
9821
  "-D",
@@ -9833,6 +9859,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9833
9859
  "-c",
9834
9860
  [
9835
9861
  `SANDBOX=sandbox-exec`,
9862
+ "TMPDIR=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9863
+ "TMP=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9864
+ "TEMP=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9836
9865
  "NODE_OPTIONS=" + (0, import_shell_quote2.quote)([nodeOptions]),
9837
9866
  ...finalArgv.map((arg) => (0, import_shell_quote2.quote)([arg]))
9838
9867
  ].join(" ")
@@ -9841,6 +9870,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9841
9870
  let proxyProcess2 = void 0;
9842
9871
  let sandboxProcess2 = void 0;
9843
9872
  const sandboxEnv = { ...process.env };
9873
+ sandboxEnv["TMPDIR"] = resolvedTmpDir;
9874
+ sandboxEnv["TMP"] = resolvedTmpDir;
9875
+ sandboxEnv["TEMP"] = resolvedTmpDir;
9844
9876
  if (proxyCommand2) {
9845
9877
  const proxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"] || process.env["HTTP_PROXY"] || process.env["http_proxy"] || "http://localhost:8877";
9846
9878
  sandboxEnv["HTTPS_PROXY"] = proxy;
@@ -9884,7 +9916,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9884
9916
  }
9885
9917
  process.stdin.pause();
9886
9918
  sandboxProcess2 = spawn2(config.command, args2, {
9887
- stdio: "inherit"
9919
+ stdio: "inherit",
9920
+ env: sandboxEnv
9888
9921
  });
9889
9922
  return await new Promise((resolve9, reject) => {
9890
9923
  sandboxProcess2?.on("error", (err) => {
@@ -11085,7 +11118,7 @@ async function runNonInteractive({
11085
11118
  }
11086
11119
  });
11087
11120
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11088
- const { setupInitialActivityLogger } = await import("./devtoolsService-VQJ4XEED.js");
11121
+ const { setupInitialActivityLogger } = await import("./devtoolsService-DOIK3XII.js");
11089
11122
  setupInitialActivityLogger(config);
11090
11123
  }
11091
11124
  const { stdout: workingStdout } = createWorkingStdio();
@@ -11595,7 +11628,7 @@ async function runNonInteractive2(params) {
11595
11628
  }
11596
11629
  });
11597
11630
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11598
- const { setupInitialActivityLogger } = await import("./devtoolsService-VQJ4XEED.js");
11631
+ const { setupInitialActivityLogger } = await import("./devtoolsService-DOIK3XII.js");
11599
11632
  setupInitialActivityLogger(config);
11600
11633
  }
11601
11634
  const { stdout: workingStdout } = createWorkingStdio();
@@ -16805,7 +16838,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
16805
16838
  }
16806
16839
  }
16807
16840
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
16808
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-J7RHUM6Y.js");
16841
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-GZR7TB7H.js");
16809
16842
  await doStartUI(
16810
16843
  config,
16811
16844
  settings,
@@ -17014,7 +17047,7 @@ ${finalArgs[promptIndex + 1]}`;
17014
17047
  await config.storage.initialize();
17015
17048
  adminControlsListner.setConfig(config);
17016
17049
  if (config.isInteractive() && settings.merged.general.devtools) {
17017
- const { setupInitialActivityLogger } = await import("./devtoolsService-VQJ4XEED.js");
17050
+ const { setupInitialActivityLogger } = await import("./devtoolsService-DOIK3XII.js");
17018
17051
  setupInitialActivityLogger(config);
17019
17052
  }
17020
17053
  registerTelemetryConfig(config);
@@ -17073,7 +17106,7 @@ ${finalArgs[promptIndex + 1]}`;
17073
17106
  const initAppHandle = startupProfiler.start("initialize_app");
17074
17107
  const initializationResult = await initializeApp(config, settings);
17075
17108
  initAppHandle?.end();
17076
- import("./liteRtServerManager-H3DCLTFE.js").then(({ LiteRtServerManager }) => {
17109
+ import("./liteRtServerManager-L2BLDSGL.js").then(({ LiteRtServerManager }) => {
17077
17110
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
17078
17111
  if (!mergedGemma) return;
17079
17112
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-YLSAASP5.js";
5
+ } from "./chunk-2KWYWFYH.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -44,12 +44,13 @@ import {
44
44
  uninstallSkill,
45
45
  updateAllUpdatableExtensions,
46
46
  updateExtension,
47
- validateAuthMethod
48
- } from "./chunk-UGT6DHAE.js";
47
+ validateAuthMethod,
48
+ validateContextFilePath
49
+ } from "./chunk-RHV3WXCU.js";
49
50
  import {
50
51
  exitCli,
51
52
  require_source
52
- } from "./chunk-D6XI6WNG.js";
53
+ } from "./chunk-4GN2ER63.js";
53
54
  import {
54
55
  appEvents
55
56
  } from "./chunk-5PS3AYFU.js";
@@ -87,11 +88,11 @@ import {
87
88
  resolveGemmaConfig,
88
89
  saveModelChange,
89
90
  stripAnsi
90
- } from "./chunk-LXBSPQEH.js";
91
+ } from "./chunk-LWVZ3TLL.js";
91
92
  import {
92
93
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-23C4TBLH.js";
94
- import "./chunk-THPIH2AE.js";
94
+ } from "./chunk-KRBRLEZU.js";
95
+ import "./chunk-K6N5ALIZ.js";
95
96
  import {
96
97
  cleanupCheckpoints,
97
98
  registerCleanup,
@@ -100,7 +101,7 @@ import {
100
101
  runExitCleanup,
101
102
  runSyncCleanup,
102
103
  setupSignalHandlers
103
- } from "./chunk-7QCPYRGC.js";
104
+ } from "./chunk-OPYHX5IV.js";
104
105
  import {
105
106
  ASK_USER_TOOL_NAME,
106
107
  ApprovalMode,
@@ -254,7 +255,7 @@ import {
254
255
  updatePolicy,
255
256
  writeToStderr,
256
257
  writeToStdout
257
- } from "./chunk-52JU4ECF.js";
258
+ } from "./chunk-GYIG2U5X.js";
258
259
  import "./chunk-664ZODQF.js";
259
260
  import "./chunk-IUUIT4SU.js";
260
261
  import "./chunk-TUDYL3X4.js";
@@ -6433,11 +6434,17 @@ async function validateExtension(args) {
6433
6434
  const contextFileNames = Array.isArray(extensionConfig.contextFileName) ? extensionConfig.contextFileName : [extensionConfig.contextFileName];
6434
6435
  const missingContextFiles = [];
6435
6436
  for (const contextFilePath of contextFileNames) {
6436
- const contextFileAbsolutePath = path2.resolve(
6437
- absoluteInputPath,
6438
- contextFilePath
6437
+ const validation2 = validateContextFilePath(
6438
+ contextFilePath,
6439
+ absoluteInputPath
6439
6440
  );
6440
- if (!fs.existsSync(contextFileAbsolutePath)) {
6441
+ if (!validation2.isValid) {
6442
+ errors.push(
6443
+ `Invalid context file path: "${contextFilePath}". ${validation2.errorMessage}`
6444
+ );
6445
+ continue;
6446
+ }
6447
+ if (!fs.existsSync(validation2.resolvedPath)) {
6441
6448
  missingContextFiles.push(contextFilePath);
6442
6449
  }
6443
6450
  }
@@ -7848,7 +7855,7 @@ async function loadSandboxConfig(settings, argv) {
7848
7855
  }
7849
7856
  const command2 = getSandboxCommand(sandboxValue);
7850
7857
  const packageJson = await getPackageJson(__dirname3);
7851
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.59.0-preview.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7858
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.60.0-nightly.20260904.g87a9c71d5" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7852
7859
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7853
7860
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7854
7861
  }
@@ -9721,13 +9728,27 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9721
9728
  patcher.patch();
9722
9729
  let stopProxy = void 0;
9723
9730
  let tempProfileFile = null;
9731
+ let sandboxTmpDir = null;
9724
9732
  const cleanup = () => {
9725
- if (tempProfileFile && fs7.existsSync(tempProfileFile)) {
9733
+ if (sandboxTmpDir) {
9734
+ const dirToDelete = sandboxTmpDir;
9735
+ sandboxTmpDir = null;
9726
9736
  try {
9727
- fs7.unlinkSync(tempProfileFile);
9737
+ if (fs7.existsSync(dirToDelete)) {
9738
+ fs7.rmSync(dirToDelete, { recursive: true, force: true });
9739
+ }
9728
9740
  } catch {
9729
9741
  }
9742
+ }
9743
+ if (tempProfileFile) {
9744
+ const fileToDelete = tempProfileFile;
9730
9745
  tempProfileFile = null;
9746
+ try {
9747
+ if (fs7.existsSync(fileToDelete)) {
9748
+ fs7.unlinkSync(fileToDelete);
9749
+ }
9750
+ } catch {
9751
+ }
9731
9752
  }
9732
9753
  if (stopProxy) {
9733
9754
  try {
@@ -9801,11 +9822,16 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9801
9822
  ...process.env["DEBUG"] ? ["--inspect-brk"] : [],
9802
9823
  ...nodeArgs
9803
9824
  ].join(" ");
9825
+ const hostTmpDir = fs7.realpathSync(os3.tmpdir());
9826
+ const resolvedTmpDir = fs7.mkdtempSync(
9827
+ path8.join(hostTmpDir, "gemini-sandbox-")
9828
+ );
9829
+ sandboxTmpDir = resolvedTmpDir;
9804
9830
  const args2 = [
9805
9831
  "-D",
9806
9832
  `TARGET_DIR=${fs7.realpathSync(process.cwd())}`,
9807
9833
  "-D",
9808
- `TMP_DIR=${fs7.realpathSync(os3.tmpdir())}`,
9834
+ `TMP_DIR=${resolvedTmpDir}`,
9809
9835
  "-D",
9810
9836
  `HOME_DIR=${fs7.realpathSync(homedir())}`,
9811
9837
  "-D",
@@ -9849,6 +9875,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9849
9875
  "-c",
9850
9876
  [
9851
9877
  `SANDBOX=sandbox-exec`,
9878
+ "TMPDIR=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9879
+ "TMP=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9880
+ "TEMP=" + (0, import_shell_quote2.quote)([resolvedTmpDir]),
9852
9881
  "NODE_OPTIONS=" + (0, import_shell_quote2.quote)([nodeOptions]),
9853
9882
  ...finalArgv.map((arg) => (0, import_shell_quote2.quote)([arg]))
9854
9883
  ].join(" ")
@@ -9857,6 +9886,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9857
9886
  let proxyProcess2 = void 0;
9858
9887
  let sandboxProcess2 = void 0;
9859
9888
  const sandboxEnv = { ...process.env };
9889
+ sandboxEnv["TMPDIR"] = resolvedTmpDir;
9890
+ sandboxEnv["TMP"] = resolvedTmpDir;
9891
+ sandboxEnv["TEMP"] = resolvedTmpDir;
9860
9892
  if (proxyCommand2) {
9861
9893
  const proxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"] || process.env["HTTP_PROXY"] || process.env["http_proxy"] || "http://localhost:8877";
9862
9894
  sandboxEnv["HTTPS_PROXY"] = proxy;
@@ -9900,7 +9932,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
9900
9932
  }
9901
9933
  process.stdin.pause();
9902
9934
  sandboxProcess2 = spawn2(config.command, args2, {
9903
- stdio: "inherit"
9935
+ stdio: "inherit",
9936
+ env: sandboxEnv
9904
9937
  });
9905
9938
  return await new Promise((resolve9, reject) => {
9906
9939
  sandboxProcess2?.on("error", (err) => {
@@ -11101,7 +11134,7 @@ async function runNonInteractive({
11101
11134
  }
11102
11135
  });
11103
11136
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11104
- const { setupInitialActivityLogger } = await import("./devtoolsService-OSXWGLT3.js");
11137
+ const { setupInitialActivityLogger } = await import("./devtoolsService-AZ775QPY.js");
11105
11138
  setupInitialActivityLogger(config);
11106
11139
  }
11107
11140
  const { stdout: workingStdout } = createWorkingStdio();
@@ -11611,7 +11644,7 @@ async function runNonInteractive2(params) {
11611
11644
  }
11612
11645
  });
11613
11646
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11614
- const { setupInitialActivityLogger } = await import("./devtoolsService-OSXWGLT3.js");
11647
+ const { setupInitialActivityLogger } = await import("./devtoolsService-AZ775QPY.js");
11615
11648
  setupInitialActivityLogger(config);
11616
11649
  }
11617
11650
  const { stdout: workingStdout } = createWorkingStdio();
@@ -16821,7 +16854,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
16821
16854
  }
16822
16855
  }
16823
16856
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
16824
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-ODBGO5ZB.js");
16857
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-JBCVEYX6.js");
16825
16858
  await doStartUI(
16826
16859
  config,
16827
16860
  settings,
@@ -17030,7 +17063,7 @@ ${finalArgs[promptIndex + 1]}`;
17030
17063
  await config.storage.initialize();
17031
17064
  adminControlsListner.setConfig(config);
17032
17065
  if (config.isInteractive() && settings.merged.general.devtools) {
17033
- const { setupInitialActivityLogger } = await import("./devtoolsService-OSXWGLT3.js");
17066
+ const { setupInitialActivityLogger } = await import("./devtoolsService-AZ775QPY.js");
17034
17067
  setupInitialActivityLogger(config);
17035
17068
  }
17036
17069
  registerTelemetryConfig(config);
@@ -17089,7 +17122,7 @@ ${finalArgs[promptIndex + 1]}`;
17089
17122
  const initAppHandle = startupProfiler.start("initialize_app");
17090
17123
  const initializationResult = await initializeApp(config, settings);
17091
17124
  initAppHandle?.end();
17092
- import("./liteRtServerManager-FYXZXFSP.js").then(({ LiteRtServerManager }) => {
17125
+ import("./liteRtServerManager-MWMPLFZ3.js").then(({ LiteRtServerManager }) => {
17093
17126
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
17094
17127
  if (!mergedGemma) return;
17095
17128
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;