@google/gemini-cli 0.57.0-preview.1 → 0.58.0-preview.0

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/{chunk-3BVBON3V.js → chunk-2BLMLPHM.js} +1 -1
  2. package/bundle/{chunk-GK7NUJ35.js → chunk-2DH4DX65.js} +1 -1
  3. package/bundle/{chunk-ZMPGHLGO.js → chunk-2XOTT2FI.js} +2 -2
  4. package/bundle/{chunk-S5UX3QS5.js → chunk-4FKXMALD.js} +3 -3
  5. package/bundle/{chunk-O7SBKM7M.js → chunk-4KFMA4KD.js} +242 -106
  6. package/bundle/{chunk-UMQE7UC6.js → chunk-6EGII27G.js} +3 -3
  7. package/bundle/{chunk-VBK54QCZ.js → chunk-7HQEQECM.js} +1 -1
  8. package/bundle/{chunk-RLDNUS35.js → chunk-BOI2NL3I.js} +1 -1
  9. package/bundle/{chunk-EAK33LFP.js → chunk-CNAVMEMA.js} +1 -1
  10. package/bundle/{chunk-AKCYXG7C.js → chunk-E7K62ODO.js} +7 -7
  11. package/bundle/{chunk-ALVDOQNA.js → chunk-FJTXPUG2.js} +1 -1
  12. package/bundle/{chunk-4ALCU2HQ.js → chunk-FMLOQLUD.js} +5 -8
  13. package/bundle/{chunk-MBWROXYM.js → chunk-GNLIR4RW.js} +2 -2
  14. package/bundle/{chunk-GMQ6QNZB.js → chunk-JCGNL7TH.js} +1 -1
  15. package/bundle/{chunk-65C235NM.js → chunk-JO5YRKX4.js} +7 -7
  16. package/bundle/{chunk-3NPMAHLX.js → chunk-JPMNKIVX.js} +1 -1
  17. package/bundle/{chunk-NPOI4K6X.js → chunk-M33HH4UA.js} +14468 -7648
  18. package/bundle/{chunk-NQ4RH42O.js → chunk-OEY2TDVE.js} +8 -9
  19. package/bundle/{chunk-W23OOD2C.js → chunk-PGYTXBPD.js} +3 -3
  20. package/bundle/{chunk-SCBVGZXH.js → chunk-PXFYRLFH.js} +1 -1
  21. package/bundle/{chunk-Q73BPF7A.js → chunk-RBQHWQSS.js} +1 -1
  22. package/bundle/{chunk-G65GW52B.js → chunk-TYMOJXZO.js} +181 -45
  23. package/bundle/{chunk-FHDRG5U4.js → chunk-WE4JKUV6.js} +54 -67
  24. package/bundle/{chunk-NMMXRZ53.js → chunk-WHCFVERV.js} +2 -2
  25. package/bundle/{cleanup-2W5DPMY3.js → cleanup-KTXX3JEU.js} +2 -2
  26. package/bundle/{cleanup-OTHE7RNU.js → cleanup-NLNXSTS6.js} +2 -2
  27. package/bundle/{cleanup-SM67K64R.js → cleanup-RW3JYSTT.js} +2 -2
  28. package/bundle/{core-US34OW5M.js → core-SU4ABXSV.js} +3 -1
  29. package/bundle/{dist-5TYMQVIZ.js → core-WFITWJMX.js} +3 -1
  30. package/bundle/{devtoolsService-GU2GQSOF.js → devtoolsService-BUAVSMN6.js} +2 -2
  31. package/bundle/{devtoolsService-5J53UK6Z.js → devtoolsService-MNBGW66M.js} +2 -2
  32. package/bundle/{devtoolsService-JBFUXTCT.js → devtoolsService-P42LXPJX.js} +3 -4
  33. package/bundle/{dist-OWKHVWTR.js → dist-2CGQYGZC.js} +3 -1
  34. package/bundle/docs/changelogs/preview.md +78 -94
  35. package/bundle/{gemini-LSMTDETS.js → gemini-3PHRRMWS.js} +266 -20
  36. package/bundle/{gemini-W2B6CLJC.js → gemini-BUCCXM4N.js} +450 -220
  37. package/bundle/{gemini-3M22N2C3.js → gemini-VIRT6VT3.js} +266 -20
  38. package/bundle/gemini.js +7 -7
  39. package/bundle/{interactiveCli-LQJM6LRE.js → interactiveCli-BP2ZFGLX.js} +8 -9
  40. package/bundle/{interactiveCli-L3ZXOVEV.js → interactiveCli-GGARXT6P.js} +296 -316
  41. package/bundle/{interactiveCli-D6H37PJQ.js → interactiveCli-N6VXS5Z4.js} +8 -9
  42. package/bundle/{liteRtServerManager-3BY6TBHG.js → liteRtServerManager-L46MRFSW.js} +4 -4
  43. package/bundle/{liteRtServerManager-C5WZRQUF.js → liteRtServerManager-QUODN3RR.js} +4 -4
  44. package/bundle/{liteRtServerManager-IGKUGGP4.js → liteRtServerManager-YLOGF7RQ.js} +4 -4
  45. package/bundle/{oauth2-provider-KSRLPOK3.js → oauth2-provider-BKWSLZJ6.js} +1 -1
  46. package/bundle/{oauth2-provider-VHNLCU4Y.js → oauth2-provider-IIC2YPC5.js} +72 -38
  47. package/bundle/{oauth2-provider-RWKTMYJF.js → oauth2-provider-KVIL4ITH.js} +1 -1
  48. package/bundle/policies/write.toml +10 -2
  49. package/bundle/sandbox-macos-permissive-open.sb +50 -0
  50. package/bundle/sandbox-macos-permissive-proxied.sb +50 -0
  51. package/bundle/sandbox-macos-restrictive-open.sb +50 -1
  52. package/bundle/sandbox-macos-restrictive-proxied.sb +50 -0
  53. package/bundle/sandbox-macos-strict-open.sb +50 -0
  54. package/bundle/sandbox-macos-strict-proxied.sb +50 -0
  55. package/bundle/{start-EXAQFM4Y.js → start-2365H4YX.js} +6 -6
  56. package/bundle/{start-IPZF32E3.js → start-VPQOFEIR.js} +6 -6
  57. package/bundle/{start-SVNTSNHV.js → start-Y7LKFE47.js} +6 -6
  58. package/package.json +1 -1
  59. package/bundle/chunk-4SNEOO5E.js +0 -398
  60. package/bundle/chunk-LNXGFWGZ.js +0 -17332
  61. package/bundle/chunk-QJP6CMLN.js +0 -118
  62. package/bundle/chunk-SWQAIZEQ.js +0 -102506
  63. package/bundle/chunk-VGGWKRAC.js +0 -154
  64. package/bundle/chunk-WDFSF5L4.js +0 -397601
  65. package/bundle/chunk-XESAM7IL.js +0 -512
  66. package/bundle/chunk-Y3APL4PE.js +0 -1571
  67. package/bundle/cleanup-XAUT5CMD.js +0 -32
  68. package/bundle/devtoolsService-V46GUHRF.js +0 -4359
  69. package/bundle/dist-V5VJYW6J.js +0 -2180
  70. package/bundle/gemini-OZOYJF22.js +0 -17091
  71. package/bundle/interactiveCli-RGOYDSMH.js +0 -34984
  72. package/bundle/liteRtServerManager-IJ4I2PZA.js +0 -65
  73. package/bundle/oauth2-provider-ZT4OFVMK.js +0 -235
  74. package/bundle/start-ZXU5BFZY.js +0 -18
@@ -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-UMQE7UC6.js";
5
+ } from "./chunk-PGYTXBPD.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -45,11 +45,11 @@ import {
45
45
  updateAllUpdatableExtensions,
46
46
  updateExtension,
47
47
  validateAuthMethod
48
- } from "./chunk-SWQAIZEQ.js";
48
+ } from "./chunk-E7K62ODO.js";
49
49
  import {
50
50
  exitCli,
51
51
  require_source
52
- } from "./chunk-3BVBON3V.js";
52
+ } from "./chunk-2BLMLPHM.js";
53
53
  import {
54
54
  appEvents
55
55
  } from "./chunk-5PS3AYFU.js";
@@ -87,11 +87,11 @@ import {
87
87
  resolveGemmaConfig,
88
88
  saveModelChange,
89
89
  stripAnsi
90
- } from "./chunk-4ALCU2HQ.js";
90
+ } from "./chunk-FMLOQLUD.js";
91
91
  import {
92
92
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-ZMPGHLGO.js";
94
- import "./chunk-NQ4RH42O.js";
93
+ } from "./chunk-2XOTT2FI.js";
94
+ import "./chunk-7HQEQECM.js";
95
95
  import {
96
96
  cleanupCheckpoints,
97
97
  registerCleanup,
@@ -100,15 +100,12 @@ import {
100
100
  runExitCleanup,
101
101
  runSyncCleanup,
102
102
  setupSignalHandlers
103
- } from "./chunk-VGGWKRAC.js";
103
+ } from "./chunk-JPMNKIVX.js";
104
104
  import {
105
105
  ASK_USER_TOOL_NAME,
106
- ApprovalMode,
107
106
  AuthType,
108
107
  Client,
109
108
  Config,
110
- CoreEvent,
111
- CoreToolCallStatus,
112
109
  DEFAULT_CONTEXT_FILENAME,
113
110
  DEFAULT_FILE_FILTERING_OPTIONS,
114
111
  DEFAULT_GEMINI_EMBEDDING_MODEL,
@@ -130,27 +127,19 @@ import {
130
127
  FolderTrustDiscoveryService,
131
128
  GEMINI_DIR,
132
129
  GEMINI_MODEL_ALIAS_AUTO,
133
- GeminiEventType,
134
130
  IdeClient,
135
- IntegrityStatus,
136
131
  InvalidStreamError,
137
132
  JsonFormatter,
138
- JsonStreamEventType,
139
- Kind,
140
133
  LegacyAgentSession,
141
134
  Logger,
142
135
  MAX_TOKENS_EXCEEDED_SUGGESTION,
143
136
  MCPServerConfig,
144
- MCPServerStatus,
145
- MessageBusType,
146
137
  OTHER_BLOCKED_MESSAGE,
147
- OutputFormat,
148
138
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
149
139
  PREVIEW_GEMINI_3_1_MODEL,
150
140
  PREVIEW_GEMINI_FLASH_LITE_MODEL,
151
141
  PREVIEW_GEMINI_FLASH_MODEL,
152
142
  PREVIEW_GEMINI_MODEL,
153
- PolicyDecision,
154
143
  PolicyIntegrityManager,
155
144
  RECITATION_BLOCKED_MESSAGE,
156
145
  REFERENCE_CONTENT_START,
@@ -158,8 +147,6 @@ import {
158
147
  ReadManyFilesTool,
159
148
  SAFETY_BLOCKED_MESSAGE,
160
149
  Scheduler,
161
- SessionEndReason,
162
- SessionStartSource,
163
150
  ShellExecutionService,
164
151
  SimpleExtensionLoader,
165
152
  Storage,
@@ -168,13 +155,10 @@ import {
168
155
  TRUE_EMPTY_RESPONSE_MESSAGE,
169
156
  ToolCallEvent,
170
157
  ToolConfirmationOutcome,
171
- ToolErrorType,
172
- TrustLevel,
173
158
  UserAccountManager,
174
159
  UserPromptEvent,
175
160
  ValidationCancelledError,
176
161
  ValidationRequiredError,
177
- WarningPriority,
178
162
  applyAdminAllowlist,
179
163
  applyRequiredServers,
180
164
  clearCachedCredentialFile,
@@ -254,7 +238,7 @@ import {
254
238
  updatePolicy,
255
239
  writeToStderr,
256
240
  writeToStdout
257
- } from "./chunk-NPOI4K6X.js";
241
+ } from "./chunk-M33HH4UA.js";
258
242
  import "./chunk-664ZODQF.js";
259
243
  import "./chunk-IUUIT4SU.js";
260
244
  import "./chunk-TUDYL3X4.js";
@@ -5384,7 +5368,7 @@ var MCP_LIST_DEFAULT_TIMEOUT_MSEC = 5e3;
5384
5368
  async function testMCPConnection(serverName, config, isTrusted, activeSettings) {
5385
5369
  const isStdio = !!config.command;
5386
5370
  if (isStdio && !isTrusted) {
5387
- return MCPServerStatus.DISCONNECTED;
5371
+ return "disconnected" /* DISCONNECTED */;
5388
5372
  }
5389
5373
  const client = new Client({
5390
5374
  name: "mcp-test-client",
@@ -5420,7 +5404,7 @@ async function testMCPConnection(serverName, config, isTrusted, activeSettings)
5420
5404
  transport = await createTransport(serverName, config, false, mcpContext);
5421
5405
  } catch {
5422
5406
  await client.close();
5423
- return MCPServerStatus.DISCONNECTED;
5407
+ return "disconnected" /* DISCONNECTED */;
5424
5408
  }
5425
5409
  try {
5426
5410
  const timeout = config.timeout ?? MCP_LIST_DEFAULT_TIMEOUT_MSEC;
@@ -5434,10 +5418,10 @@ async function testMCPConnection(serverName, config, isTrusted, activeSettings)
5434
5418
  );
5435
5419
  }
5436
5420
  await client.close();
5437
- return MCPServerStatus.CONNECTED;
5421
+ return "connected" /* CONNECTED */;
5438
5422
  } catch {
5439
5423
  await transport.close();
5440
- return MCPServerStatus.DISCONNECTED;
5424
+ return "disconnected" /* DISCONNECTED */;
5441
5425
  }
5442
5426
  }
5443
5427
  async function getServerStatus(serverName, server, isTrusted, activeSettings, consolidatedExcluded, consolidatedAllowed) {
@@ -5450,12 +5434,12 @@ async function getServerStatus(serverName, server, isTrusted, activeSettings, co
5450
5434
  });
5451
5435
  if (!loadResult.allowed) {
5452
5436
  if (loadResult.blockType === "admin" || loadResult.blockType === "allowlist" || loadResult.blockType === "excludelist") {
5453
- return MCPServerStatus.BLOCKED;
5437
+ return "blocked" /* BLOCKED */;
5454
5438
  }
5455
- return MCPServerStatus.DISABLED;
5439
+ return "disabled" /* DISABLED */;
5456
5440
  }
5457
5441
  if (!isTrusted) {
5458
- return MCPServerStatus.DISABLED;
5442
+ return "disabled" /* DISABLED */;
5459
5443
  }
5460
5444
  return testMCPConnection(serverName, server, isTrusted, activeSettings);
5461
5445
  }
@@ -5501,23 +5485,23 @@ async function listMcpServers(loadedSettingsArg) {
5501
5485
  let statusIndicator = "";
5502
5486
  let statusText = "";
5503
5487
  switch (status) {
5504
- case MCPServerStatus.CONNECTED:
5488
+ case "connected" /* CONNECTED */:
5505
5489
  statusIndicator = import_chalk.default.green("\u2713");
5506
5490
  statusText = "Connected";
5507
5491
  break;
5508
- case MCPServerStatus.CONNECTING:
5492
+ case "connecting" /* CONNECTING */:
5509
5493
  statusIndicator = import_chalk.default.yellow("\u2026");
5510
5494
  statusText = "Connecting";
5511
5495
  break;
5512
- case MCPServerStatus.BLOCKED:
5496
+ case "blocked" /* BLOCKED */:
5513
5497
  statusIndicator = import_chalk.default.red("\u26D4");
5514
5498
  statusText = "Blocked";
5515
5499
  break;
5516
- case MCPServerStatus.DISABLED:
5500
+ case "disabled" /* DISABLED */:
5517
5501
  statusIndicator = import_chalk.default.gray("\u25CB");
5518
5502
  statusText = "Disabled";
5519
5503
  break;
5520
- case MCPServerStatus.DISCONNECTED:
5504
+ case "disconnected" /* DISCONNECTED */:
5521
5505
  default:
5522
5506
  statusIndicator = import_chalk.default.red("\u2717");
5523
5507
  statusText = "Disconnected";
@@ -5803,7 +5787,7 @@ async function handleInstall(args) {
5803
5787
  );
5804
5788
  if (confirmed) {
5805
5789
  const trustedFolders = loadTrustedFolders();
5806
- await trustedFolders.setValue(realPath, TrustLevel.TRUST_FOLDER);
5790
+ await trustedFolders.setValue(realPath, "TRUST_FOLDER" /* TRUST_FOLDER */);
5807
5791
  } else {
5808
5792
  throw new Error(
5809
5793
  `Installation aborted: Folder "${absolutePath}" is not trusted.`
@@ -7848,7 +7832,7 @@ async function loadSandboxConfig(settings, argv) {
7848
7832
  }
7849
7833
  const command2 = getSandboxCommand(sandboxValue);
7850
7834
  const packageJson = await getPackageJson(__dirname3);
7851
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.57.0-preview.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7835
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.56.0-nightly.20260806.g761f604c1" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7852
7836
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7853
7837
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7854
7838
  }
@@ -7907,9 +7891,9 @@ async function resolveWorkspacePolicyState(options) {
7907
7891
  cwd,
7908
7892
  potentialWorkspacePoliciesDir
7909
7893
  );
7910
- if (integrityResult.status === IntegrityStatus.MATCH) {
7894
+ if (integrityResult.status === "MATCH" /* MATCH */) {
7911
7895
  workspacePoliciesDir = potentialWorkspacePoliciesDir;
7912
- } else if (integrityResult.status === IntegrityStatus.NEW && integrityResult.fileCount === 0) {
7896
+ } else if (integrityResult.status === "NEW" /* NEW */ && integrityResult.fileCount === 0) {
7913
7897
  workspacePoliciesDir = void 0;
7914
7898
  } else if (interactive && !autoAcceptWorkspacePolicies) {
7915
7899
  policyUpdateConfirmationRequest = {
@@ -8337,23 +8321,23 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8337
8321
  if (rawApprovalMode) {
8338
8322
  switch (rawApprovalMode) {
8339
8323
  case "yolo":
8340
- approvalMode = ApprovalMode.YOLO;
8324
+ approvalMode = "yolo" /* YOLO */;
8341
8325
  break;
8342
8326
  case "auto_edit":
8343
- approvalMode = ApprovalMode.AUTO_EDIT;
8327
+ approvalMode = "autoEdit" /* AUTO_EDIT */;
8344
8328
  break;
8345
8329
  case "plan":
8346
8330
  if (!(settings.general?.plan?.enabled ?? true)) {
8347
8331
  debugLogger.warn(
8348
8332
  'Approval mode "plan" is disabled in your settings. Falling back to "default".'
8349
8333
  );
8350
- approvalMode = ApprovalMode.DEFAULT;
8334
+ approvalMode = "default" /* DEFAULT */;
8351
8335
  } else {
8352
- approvalMode = ApprovalMode.PLAN;
8336
+ approvalMode = "plan" /* PLAN */;
8353
8337
  }
8354
8338
  break;
8355
8339
  case "default":
8356
- approvalMode = ApprovalMode.DEFAULT;
8340
+ approvalMode = "default" /* DEFAULT */;
8357
8341
  break;
8358
8342
  default:
8359
8343
  throw new Error(
@@ -8361,10 +8345,10 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8361
8345
  );
8362
8346
  }
8363
8347
  } else {
8364
- approvalMode = ApprovalMode.DEFAULT;
8348
+ approvalMode = "default" /* DEFAULT */;
8365
8349
  }
8366
8350
  if (settings.security?.disableYoloMode || settings.admin?.secureModeEnabled) {
8367
- if (approvalMode === ApprovalMode.YOLO) {
8351
+ if (approvalMode === "yolo" /* YOLO */) {
8368
8352
  if (settings.admin?.secureModeEnabled) {
8369
8353
  debugLogger.error(
8370
8354
  'YOLO mode is disabled by "secureModeEnabled" setting.'
@@ -8382,16 +8366,16 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8382
8366
  )
8383
8367
  );
8384
8368
  }
8385
- } else if (approvalMode === ApprovalMode.YOLO) {
8369
+ } else if (approvalMode === "yolo" /* YOLO */) {
8386
8370
  debugLogger.warn(
8387
8371
  "YOLO mode is enabled. All tool calls will be automatically approved."
8388
8372
  );
8389
8373
  }
8390
- if (!trustedFolder && approvalMode !== ApprovalMode.DEFAULT) {
8374
+ if (!trustedFolder && approvalMode !== "default" /* DEFAULT */) {
8391
8375
  debugLogger.warn(
8392
8376
  `Approval mode overridden to "default" because the current folder is not trusted.`
8393
8377
  );
8394
- approvalMode = ApprovalMode.DEFAULT;
8378
+ approvalMode = "default" /* DEFAULT */;
8395
8379
  }
8396
8380
  let telemetrySettings;
8397
8381
  try {
@@ -9018,7 +9002,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9018
9002
  (allow file-ioctl (regex #"^/dev/tty.*"))
9019
9003
  (allow network-inbound (local ip "*:*"))
9020
9004
  (allow network-bind (local ip "*:*"))
9021
- (allow network-outbound)`,
9005
+ (allow network-outbound)
9006
+ (deny file-read* file-write*
9007
+ (literal "/var/run/docker.sock")
9008
+ (literal "/var/run/docker.sock.raw")
9009
+ (literal "/private/var/run/docker.sock")
9010
+ (literal "/private/var/run/docker.sock.raw")
9011
+ (subpath "/var/run/docker")
9012
+ (subpath "/private/var/run/docker")
9013
+ (subpath "/Users/Shared/.docker")
9014
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9015
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9016
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9017
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9018
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9019
+ )
9020
+ (deny process-exec
9021
+ (literal "/usr/local/bin/docker")
9022
+ (literal "/usr/local/bin/dockerd")
9023
+ (literal "/usr/local/bin/docker-compose")
9024
+ (literal "/usr/bin/docker")
9025
+ (literal "/opt/homebrew/bin/docker")
9026
+ (literal "/opt/homebrew/bin/dockerd")
9027
+ (literal "/opt/homebrew/bin/docker-compose")
9028
+ (literal "/opt/homebrew/bin/podman")
9029
+ (literal "/usr/local/bin/podman")
9030
+ (literal "/opt/homebrew/bin/colima")
9031
+ (literal "/usr/local/bin/colima")
9032
+ (literal "/opt/homebrew/bin/orb")
9033
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9034
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9035
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9036
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9037
+ )
9038
+ (deny mach-lookup
9039
+ (xpc-service-name-prefix "com.docker.")
9040
+ (global-name-prefix "com.docker.")
9041
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9042
+ )
9043
+ (deny ipc-posix-shm*
9044
+ (ipc-posix-name-prefix "docker")
9045
+ (ipc-posix-name-prefix "com.docker.")
9046
+ )`,
9022
9047
  "permissive-proxied": `(version 1)
9023
9048
  (deny default)
9024
9049
  (allow file-read*)
@@ -9113,7 +9138,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9113
9138
  (allow file-ioctl (regex #"^/dev/tty.*"))
9114
9139
  (allow network-inbound (local ip "localhost:9229"))
9115
9140
  (allow network-bind (local ip "*:*"))
9116
- (allow network-outbound (remote tcp "localhost:8877"))`,
9141
+ (allow network-outbound (remote tcp "localhost:8877"))
9142
+ (deny file-read* file-write*
9143
+ (literal "/var/run/docker.sock")
9144
+ (literal "/var/run/docker.sock.raw")
9145
+ (literal "/private/var/run/docker.sock")
9146
+ (literal "/private/var/run/docker.sock.raw")
9147
+ (subpath "/var/run/docker")
9148
+ (subpath "/private/var/run/docker")
9149
+ (subpath "/Users/Shared/.docker")
9150
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9151
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9152
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9153
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9154
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9155
+ )
9156
+ (deny process-exec
9157
+ (literal "/usr/local/bin/docker")
9158
+ (literal "/usr/local/bin/dockerd")
9159
+ (literal "/usr/local/bin/docker-compose")
9160
+ (literal "/usr/bin/docker")
9161
+ (literal "/opt/homebrew/bin/docker")
9162
+ (literal "/opt/homebrew/bin/dockerd")
9163
+ (literal "/opt/homebrew/bin/docker-compose")
9164
+ (literal "/opt/homebrew/bin/podman")
9165
+ (literal "/usr/local/bin/podman")
9166
+ (literal "/opt/homebrew/bin/colima")
9167
+ (literal "/usr/local/bin/colima")
9168
+ (literal "/opt/homebrew/bin/orb")
9169
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9170
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9171
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9172
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9173
+ )
9174
+ (deny mach-lookup
9175
+ (xpc-service-name-prefix "com.docker.")
9176
+ (global-name-prefix "com.docker.")
9177
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9178
+ )
9179
+ (deny ipc-posix-shm*
9180
+ (ipc-posix-name-prefix "docker")
9181
+ (ipc-posix-name-prefix "com.docker.")
9182
+ )`,
9117
9183
  "restrictive-open": `(version 1)
9118
9184
  (deny default)
9119
9185
  (allow file-read*)
@@ -9185,7 +9251,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9185
9251
  (allow mach-lookup (global-name "com.apple.sysmond"))
9186
9252
  (allow file-ioctl (regex #"^/dev/tty.*"))
9187
9253
  (allow network-inbound (local ip "localhost:9229"))
9188
- (allow network-outbound)`,
9254
+ (allow network-outbound)
9255
+ (deny file-read* file-write*
9256
+ (literal "/var/run/docker.sock")
9257
+ (literal "/var/run/docker.sock.raw")
9258
+ (literal "/private/var/run/docker.sock")
9259
+ (literal "/private/var/run/docker.sock.raw")
9260
+ (subpath "/var/run/docker")
9261
+ (subpath "/private/var/run/docker")
9262
+ (subpath "/Users/Shared/.docker")
9263
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9264
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9265
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9266
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9267
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9268
+ )
9269
+ (deny process-exec
9270
+ (literal "/usr/local/bin/docker")
9271
+ (literal "/usr/local/bin/dockerd")
9272
+ (literal "/usr/local/bin/docker-compose")
9273
+ (literal "/usr/bin/docker")
9274
+ (literal "/opt/homebrew/bin/docker")
9275
+ (literal "/opt/homebrew/bin/dockerd")
9276
+ (literal "/opt/homebrew/bin/docker-compose")
9277
+ (literal "/opt/homebrew/bin/podman")
9278
+ (literal "/usr/local/bin/podman")
9279
+ (literal "/opt/homebrew/bin/colima")
9280
+ (literal "/usr/local/bin/colima")
9281
+ (literal "/opt/homebrew/bin/orb")
9282
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9283
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9284
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9285
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9286
+ )
9287
+ (deny mach-lookup
9288
+ (xpc-service-name-prefix "com.docker.")
9289
+ (global-name-prefix "com.docker.")
9290
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9291
+ )
9292
+ (deny ipc-posix-shm*
9293
+ (ipc-posix-name-prefix "docker")
9294
+ (ipc-posix-name-prefix "com.docker.")
9295
+ )`,
9189
9296
  "restrictive-proxied": `(version 1)
9190
9297
  (deny default)
9191
9298
  (allow file-read*)
@@ -9257,7 +9364,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9257
9364
  (allow mach-lookup (global-name "com.apple.sysmond"))
9258
9365
  (allow file-ioctl (regex #"^/dev/tty.*"))
9259
9366
  (allow network-inbound (local ip "localhost:9229"))
9260
- (allow network-outbound (remote tcp "localhost:8877"))`,
9367
+ (allow network-outbound (remote tcp "localhost:8877"))
9368
+ (deny file-read* file-write*
9369
+ (literal "/var/run/docker.sock")
9370
+ (literal "/var/run/docker.sock.raw")
9371
+ (literal "/private/var/run/docker.sock")
9372
+ (literal "/private/var/run/docker.sock.raw")
9373
+ (subpath "/var/run/docker")
9374
+ (subpath "/private/var/run/docker")
9375
+ (subpath "/Users/Shared/.docker")
9376
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9377
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9378
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9379
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9380
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9381
+ )
9382
+ (deny process-exec
9383
+ (literal "/usr/local/bin/docker")
9384
+ (literal "/usr/local/bin/dockerd")
9385
+ (literal "/usr/local/bin/docker-compose")
9386
+ (literal "/usr/bin/docker")
9387
+ (literal "/opt/homebrew/bin/docker")
9388
+ (literal "/opt/homebrew/bin/dockerd")
9389
+ (literal "/opt/homebrew/bin/docker-compose")
9390
+ (literal "/opt/homebrew/bin/podman")
9391
+ (literal "/usr/local/bin/podman")
9392
+ (literal "/opt/homebrew/bin/colima")
9393
+ (literal "/usr/local/bin/colima")
9394
+ (literal "/opt/homebrew/bin/orb")
9395
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9396
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9397
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9398
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9399
+ )
9400
+ (deny mach-lookup
9401
+ (xpc-service-name-prefix "com.docker.")
9402
+ (global-name-prefix "com.docker.")
9403
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9404
+ )
9405
+ (deny ipc-posix-shm*
9406
+ (ipc-posix-name-prefix "docker")
9407
+ (ipc-posix-name-prefix "com.docker.")
9408
+ )`,
9261
9409
  "strict-open": `(version 1)
9262
9410
  (deny default)
9263
9411
  (allow file-read*
@@ -9358,7 +9506,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9358
9506
  (allow mach-lookup (global-name "com.apple.sysmond"))
9359
9507
  (allow file-ioctl (regex #"^/dev/tty.*"))
9360
9508
  (allow network-inbound (local ip "localhost:9229"))
9361
- (allow network-outbound)`,
9509
+ (allow network-outbound)
9510
+ (deny file-read* file-write*
9511
+ (literal "/var/run/docker.sock")
9512
+ (literal "/var/run/docker.sock.raw")
9513
+ (literal "/private/var/run/docker.sock")
9514
+ (literal "/private/var/run/docker.sock.raw")
9515
+ (subpath "/var/run/docker")
9516
+ (subpath "/private/var/run/docker")
9517
+ (subpath "/Users/Shared/.docker")
9518
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9519
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9520
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9521
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9522
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9523
+ )
9524
+ (deny process-exec
9525
+ (literal "/usr/local/bin/docker")
9526
+ (literal "/usr/local/bin/dockerd")
9527
+ (literal "/usr/local/bin/docker-compose")
9528
+ (literal "/usr/bin/docker")
9529
+ (literal "/opt/homebrew/bin/docker")
9530
+ (literal "/opt/homebrew/bin/dockerd")
9531
+ (literal "/opt/homebrew/bin/docker-compose")
9532
+ (literal "/opt/homebrew/bin/podman")
9533
+ (literal "/usr/local/bin/podman")
9534
+ (literal "/opt/homebrew/bin/colima")
9535
+ (literal "/usr/local/bin/colima")
9536
+ (literal "/opt/homebrew/bin/orb")
9537
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9538
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9539
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9540
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9541
+ )
9542
+ (deny mach-lookup
9543
+ (xpc-service-name-prefix "com.docker.")
9544
+ (global-name-prefix "com.docker.")
9545
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9546
+ )
9547
+ (deny ipc-posix-shm*
9548
+ (ipc-posix-name-prefix "docker")
9549
+ (ipc-posix-name-prefix "com.docker.")
9550
+ )`,
9362
9551
  "strict-proxied": `(version 1)
9363
9552
  (deny default)
9364
9553
  (allow file-read*
@@ -9459,7 +9648,48 @@ var BUILTIN_SEATBELT_PROFILE_CONTENTS = {
9459
9648
  (allow mach-lookup (global-name "com.apple.sysmond"))
9460
9649
  (allow file-ioctl (regex #"^/dev/tty.*"))
9461
9650
  (allow network-inbound (local ip "localhost:9229"))
9462
- (allow network-outbound (remote tcp "localhost:8877"))`
9651
+ (allow network-outbound (remote tcp "localhost:8877"))
9652
+ (deny file-read* file-write*
9653
+ (literal "/var/run/docker.sock")
9654
+ (literal "/var/run/docker.sock.raw")
9655
+ (literal "/private/var/run/docker.sock")
9656
+ (literal "/private/var/run/docker.sock.raw")
9657
+ (subpath "/var/run/docker")
9658
+ (subpath "/private/var/run/docker")
9659
+ (subpath "/Users/Shared/.docker")
9660
+ (subpath (string-append (param "HOME_DIR") "/.docker/run"))
9661
+ (subpath (string-append (param "HOME_DIR") "/.docker/desktop"))
9662
+ (subpath (string-append (param "HOME_DIR") "/.colima"))
9663
+ (subpath (string-append (param "HOME_DIR") "/.orbstack/run"))
9664
+ (subpath (string-append (param "HOME_DIR") "/.rd"))
9665
+ )
9666
+ (deny process-exec
9667
+ (literal "/usr/local/bin/docker")
9668
+ (literal "/usr/local/bin/dockerd")
9669
+ (literal "/usr/local/bin/docker-compose")
9670
+ (literal "/usr/bin/docker")
9671
+ (literal "/opt/homebrew/bin/docker")
9672
+ (literal "/opt/homebrew/bin/dockerd")
9673
+ (literal "/opt/homebrew/bin/docker-compose")
9674
+ (literal "/opt/homebrew/bin/podman")
9675
+ (literal "/usr/local/bin/podman")
9676
+ (literal "/opt/homebrew/bin/colima")
9677
+ (literal "/usr/local/bin/colima")
9678
+ (literal "/opt/homebrew/bin/orb")
9679
+ (literal "/Applications/Docker.app/Contents/Resources/bin/docker")
9680
+ (subpath "/Applications/Docker.app/Contents/MacOS/")
9681
+ (subpath "/Applications/OrbStack.app/Contents/MacOS/")
9682
+ (subpath "/Applications/Rancher Desktop.app/Contents/MacOS/")
9683
+ )
9684
+ (deny mach-lookup
9685
+ (xpc-service-name-prefix "com.docker.")
9686
+ (global-name-prefix "com.docker.")
9687
+ (global-name-prefix "dev.kdrag0n.OrbStack")
9688
+ )
9689
+ (deny ipc-posix-shm*
9690
+ (ipc-posix-name-prefix "docker")
9691
+ (ipc-posix-name-prefix "com.docker.")
9692
+ )`
9463
9693
  };
9464
9694
  BUILTIN_SEATBELT_PROFILE_CONTENTS["permissive-closed"] = BUILTIN_SEATBELT_PROFILE_CONTENTS["strict-open"];
9465
9695
  BUILTIN_SEATBELT_PROFILE_CONTENTS["restrictive-closed"] = BUILTIN_SEATBELT_PROFILE_CONTENTS["strict-proxied"];
@@ -10428,7 +10658,7 @@ import path9 from "node:path";
10428
10658
  import process4 from "node:process";
10429
10659
  var homeDirectoryCheck = {
10430
10660
  id: "home-directory",
10431
- priority: WarningPriority.Low,
10661
+ priority: "low" /* Low */,
10432
10662
  check: async (workspaceRoot, settings) => {
10433
10663
  if (settings.ui?.showHomeDirectoryWarning === false) {
10434
10664
  return null;
@@ -10452,7 +10682,7 @@ var homeDirectoryCheck = {
10452
10682
  };
10453
10683
  var rootDirectoryCheck = {
10454
10684
  id: "root-directory",
10455
- priority: WarningPriority.High,
10685
+ priority: "high" /* High */,
10456
10686
  check: async (workspaceRoot, _settings) => {
10457
10687
  try {
10458
10688
  const workspaceRealPath = await fs9.realpath(workspaceRoot);
@@ -10468,7 +10698,7 @@ var rootDirectoryCheck = {
10468
10698
  };
10469
10699
  var folderTrustCheck = {
10470
10700
  id: "folder-trust",
10471
- priority: WarningPriority.High,
10701
+ priority: "high" /* High */,
10472
10702
  check: async (workspaceRoot, settings) => {
10473
10703
  if (!isFolderTrustEnabled(settings)) {
10474
10704
  return null;
@@ -10658,12 +10888,12 @@ function handleError(error, config, customErrorCode) {
10658
10888
  error,
10659
10889
  config.getContentGeneratorConfig()?.authType
10660
10890
  );
10661
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
10891
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
10662
10892
  const streamFormatter = new StreamJsonFormatter();
10663
10893
  const errorCode = customErrorCode ?? extractErrorCode(error);
10664
10894
  const metrics = uiTelemetryService.getMetrics();
10665
10895
  streamFormatter.emitEvent({
10666
- type: JsonStreamEventType.RESULT,
10896
+ type: "result" /* RESULT */,
10667
10897
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10668
10898
  status: "error",
10669
10899
  error: {
@@ -10674,7 +10904,7 @@ function handleError(error, config, customErrorCode) {
10674
10904
  });
10675
10905
  runSyncCleanup();
10676
10906
  process.exit(getNumericExitCode(errorCode));
10677
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
10907
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
10678
10908
  const formatter = new JsonFormatter();
10679
10909
  const errorCode = customErrorCode ?? extractErrorCode(error);
10680
10910
  const formattedError = formatter.formatError(
@@ -10694,11 +10924,11 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
10694
10924
  const isFatal = isFatalToolError(errorType);
10695
10925
  if (isFatal) {
10696
10926
  const toolExecutionError = new FatalToolExecutionError(errorMessage);
10697
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
10927
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
10698
10928
  const streamFormatter = new StreamJsonFormatter();
10699
10929
  const metrics = uiTelemetryService.getMetrics();
10700
10930
  streamFormatter.emitEvent({
10701
- type: JsonStreamEventType.RESULT,
10931
+ type: "result" /* RESULT */,
10702
10932
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10703
10933
  status: "error",
10704
10934
  error: {
@@ -10707,7 +10937,7 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
10707
10937
  },
10708
10938
  stats: streamFormatter.convertToStreamStats(metrics, 0)
10709
10939
  });
10710
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
10940
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
10711
10941
  const formatter = new JsonFormatter();
10712
10942
  const formattedError = formatter.formatError(
10713
10943
  toolExecutionError,
@@ -10725,11 +10955,11 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
10725
10955
  }
10726
10956
  function handleCancellationError(config) {
10727
10957
  const cancellationError = new FatalCancellationError("Operation cancelled.");
10728
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
10958
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
10729
10959
  const streamFormatter = new StreamJsonFormatter();
10730
10960
  const metrics = uiTelemetryService.getMetrics();
10731
10961
  streamFormatter.emitEvent({
10732
- type: JsonStreamEventType.RESULT,
10962
+ type: "result" /* RESULT */,
10733
10963
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10734
10964
  status: "error",
10735
10965
  error: {
@@ -10740,7 +10970,7 @@ function handleCancellationError(config) {
10740
10970
  });
10741
10971
  runSyncCleanup();
10742
10972
  process.exit(cancellationError.exitCode);
10743
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
10973
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
10744
10974
  const formatter = new JsonFormatter();
10745
10975
  const formattedError = formatter.formatError(
10746
10976
  cancellationError,
@@ -10760,11 +10990,11 @@ function handleMaxTurnsExceededError(config) {
10760
10990
  const maxTurnsError = new FatalTurnLimitedError(
10761
10991
  "Reached max session turns for this session. Increase the number of turns by specifying maxSessionTurns in settings.json."
10762
10992
  );
10763
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
10993
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
10764
10994
  const streamFormatter = new StreamJsonFormatter();
10765
10995
  const metrics = uiTelemetryService.getMetrics();
10766
10996
  streamFormatter.emitEvent({
10767
- type: JsonStreamEventType.RESULT,
10997
+ type: "result" /* RESULT */,
10768
10998
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10769
10999
  status: "error",
10770
11000
  error: {
@@ -10775,7 +11005,7 @@ function handleMaxTurnsExceededError(config) {
10775
11005
  });
10776
11006
  runSyncCleanup();
10777
11007
  process.exit(maxTurnsError.exitCode);
10778
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11008
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
10779
11009
  const formatter = new JsonFormatter();
10780
11010
  const formattedError = formatter.formatError(
10781
11011
  maxTurnsError,
@@ -10855,7 +11085,7 @@ async function runNonInteractive({
10855
11085
  }
10856
11086
  });
10857
11087
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10858
- const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
11088
+ const { setupInitialActivityLogger } = await import("./devtoolsService-P42LXPJX.js");
10859
11089
  setupInitialActivityLogger(config);
10860
11090
  }
10861
11091
  const { stdout: workingStdout } = createWorkingStdio();
@@ -10871,7 +11101,7 @@ async function runNonInteractive({
10871
11101
  }
10872
11102
  };
10873
11103
  const startTime = Date.now();
10874
- const streamFormatter = config.getOutputFormat() === OutputFormat.STREAM_JSON ? new StreamJsonFormatter() : null;
11104
+ const streamFormatter = config.getOutputFormat() === "stream-json" /* STREAM_JSON */ ? new StreamJsonFormatter() : null;
10875
11105
  const abortController = new AbortController();
10876
11106
  let isAborting = false;
10877
11107
  let cancelMessageTimer = null;
@@ -10924,13 +11154,13 @@ async function runNonInteractive({
10924
11154
  };
10925
11155
  try {
10926
11156
  consolePatcher.patch();
10927
- if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === OutputFormat.TEXT) {
11157
+ if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === "text" /* TEXT */) {
10928
11158
  process.stderr.write(
10929
11159
  "[WARNING] --raw-output is enabled. Model output is not sanitized and may contain harmful ANSI sequences (e.g. for phishing or command injection). Use --accept-raw-output-risk to suppress this warning.\n"
10930
11160
  );
10931
11161
  }
10932
11162
  setupStdinCancellation();
10933
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
11163
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
10934
11164
  coreEvents.drainBacklogs();
10935
11165
  process.stdout.on("error", (err) => {
10936
11166
  if (err.code === "EPIPE") {
@@ -10956,7 +11186,7 @@ async function runNonInteractive({
10956
11186
  }
10957
11187
  if (streamFormatter) {
10958
11188
  streamFormatter.emitEvent({
10959
- type: JsonStreamEventType.INIT,
11189
+ type: "init" /* INIT */,
10960
11190
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10961
11191
  session_id: config.getSessionId(),
10962
11192
  model: config.getModel()
@@ -10994,7 +11224,7 @@ async function runNonInteractive({
10994
11224
  }
10995
11225
  if (streamFormatter) {
10996
11226
  streamFormatter.emitEvent({
10997
- type: JsonStreamEventType.MESSAGE,
11227
+ type: "message" /* MESSAGE */,
10998
11228
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10999
11229
  role: "user",
11000
11230
  content: input
@@ -11033,12 +11263,12 @@ async function runNonInteractive({
11033
11263
  const metrics = uiTelemetryService.getMetrics();
11034
11264
  const durationMs = Date.now() - startTime;
11035
11265
  streamFormatter.emitEvent({
11036
- type: JsonStreamEventType.RESULT,
11266
+ type: "result" /* RESULT */,
11037
11267
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11038
11268
  status: errorPayload ? "error" : "success",
11039
11269
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
11040
11270
  });
11041
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11271
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11042
11272
  const formatter = new JsonFormatter();
11043
11273
  const stats = uiTelemetryService.getMetrics();
11044
11274
  textOutput.write(
@@ -11131,13 +11361,13 @@ async function runNonInteractive({
11131
11361
  const output = isRaw ? part.text : stripAnsi(part.text);
11132
11362
  if (streamFormatter) {
11133
11363
  streamFormatter.emitEvent({
11134
- type: JsonStreamEventType.MESSAGE,
11364
+ type: "message" /* MESSAGE */,
11135
11365
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11136
11366
  role: "assistant",
11137
11367
  content: output,
11138
11368
  delta: true
11139
11369
  });
11140
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11370
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11141
11371
  responseText += output;
11142
11372
  } else {
11143
11373
  if (part.text) {
@@ -11150,13 +11380,13 @@ async function runNonInteractive({
11150
11380
  break;
11151
11381
  }
11152
11382
  case "tool_request": {
11153
- if (config.getOutputFormat() === OutputFormat.JSON) {
11383
+ if (config.getOutputFormat() === "json" /* JSON */) {
11154
11384
  preToolResponseText = responseText || preToolResponseText;
11155
11385
  responseText = "";
11156
11386
  }
11157
11387
  if (streamFormatter) {
11158
11388
  streamFormatter.emitEvent({
11159
- type: JsonStreamEventType.TOOL_USE,
11389
+ type: "tool_use" /* TOOL_USE */,
11160
11390
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11161
11391
  tool_name: event.name,
11162
11392
  tool_id: event.requestId,
@@ -11172,7 +11402,7 @@ async function runNonInteractive({
11172
11402
  const displayText = displayContentToString(display);
11173
11403
  const errorMsg = getTextContent(event.content) ?? "Tool error";
11174
11404
  streamFormatter.emitEvent({
11175
- type: JsonStreamEventType.TOOL_RESULT,
11405
+ type: "tool_result" /* TOOL_RESULT */,
11176
11406
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11177
11407
  tool_id: event.requestId,
11178
11408
  status: event.isError ? "error" : "success",
@@ -11187,17 +11417,17 @@ async function runNonInteractive({
11187
11417
  const display = event.display?.result;
11188
11418
  const displayText = displayContentToString(display);
11189
11419
  const errorMsg = getTextContent(event.content) ?? "Tool error";
11190
- if (event.data?.["errorType"] === ToolErrorType.STOP_EXECUTION) {
11191
- if (config.getOutputFormat() === OutputFormat.JSON && !responseText && preToolResponseText) {
11420
+ if (event.data?.["errorType"] === "stop_execution" /* STOP_EXECUTION */) {
11421
+ if (config.getOutputFormat() === "json" /* JSON */ && !responseText && preToolResponseText) {
11192
11422
  responseText = preToolResponseText;
11193
11423
  }
11194
11424
  const stopMessage = `Agent execution stopped: ${errorMsg}`;
11195
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11425
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11196
11426
  process.stderr.write(`${stopMessage}
11197
11427
  `);
11198
11428
  }
11199
11429
  }
11200
- if (event.data?.["errorType"] === ToolErrorType.NO_SPACE_LEFT) {
11430
+ if (event.data?.["errorType"] === "no_space_left" /* NO_SPACE_LEFT */) {
11201
11431
  throw new FatalToolExecutionError(
11202
11432
  "Error executing tool " + event.name + ": " + (displayText || errorMsg)
11203
11433
  );
@@ -11232,12 +11462,12 @@ async function runNonInteractive({
11232
11462
  }
11233
11463
  if (streamFormatter) {
11234
11464
  streamFormatter.emitEvent({
11235
- type: JsonStreamEventType.ERROR,
11465
+ type: "error" /* ERROR */,
11236
11466
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11237
11467
  severity: "error",
11238
11468
  message: errorMessage
11239
11469
  });
11240
- } else if (config.getOutputFormat() === OutputFormat.TEXT) {
11470
+ } else if (config.getOutputFormat() === "text" /* TEXT */) {
11241
11471
  process.stderr.write(`[ERROR] ${errorMessage}
11242
11472
  `);
11243
11473
  }
@@ -11258,12 +11488,12 @@ async function runNonInteractive({
11258
11488
  const errorCode = event._meta?.["code"];
11259
11489
  if (errorCode === "AGENT_EXECUTION_BLOCKED") {
11260
11490
  const blockMessage = `Agent execution blocked: ${event.message.trim()}`;
11261
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11491
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11262
11492
  process.stderr.write(`[WARNING] ${blockMessage}
11263
11493
  `);
11264
11494
  } else if (streamFormatter) {
11265
11495
  streamFormatter.emitEvent({
11266
- type: JsonStreamEventType.ERROR,
11496
+ type: "error" /* ERROR */,
11267
11497
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11268
11498
  severity: "warning",
11269
11499
  message: stripAnsi(blockMessage)
@@ -11273,13 +11503,13 @@ async function runNonInteractive({
11273
11503
  break;
11274
11504
  }
11275
11505
  const severity = event.status === "RESOURCE_EXHAUSTED" ? "error" : "warning";
11276
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11506
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11277
11507
  process.stderr.write(`[WARNING] ${event.message}
11278
11508
  `);
11279
11509
  }
11280
11510
  if (streamFormatter) {
11281
11511
  streamFormatter.emitEvent({
11282
- type: JsonStreamEventType.ERROR,
11512
+ type: "error" /* ERROR */,
11283
11513
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11284
11514
  severity,
11285
11515
  message: stripAnsi(event.message)
@@ -11299,7 +11529,7 @@ async function runNonInteractive({
11299
11529
  );
11300
11530
  } else if (streamFormatter) {
11301
11531
  streamFormatter.emitEvent({
11302
- type: JsonStreamEventType.ERROR,
11532
+ type: "error" /* ERROR */,
11303
11533
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11304
11534
  severity: "error",
11305
11535
  message: "Maximum session turns exceeded"
@@ -11307,7 +11537,7 @@ async function runNonInteractive({
11307
11537
  }
11308
11538
  }
11309
11539
  const stopMessage = typeof event.data?.["message"] === "string" ? event.data["message"] : "";
11310
- if (stopMessage && config.getOutputFormat() === OutputFormat.TEXT) {
11540
+ if (stopMessage && config.getOutputFormat() === "text" /* TEXT */) {
11311
11541
  process.stderr.write(`Agent execution stopped: ${stopMessage}
11312
11542
  `);
11313
11543
  }
@@ -11337,7 +11567,7 @@ async function runNonInteractive({
11337
11567
  abortController.signal.removeEventListener("abort", abortSession);
11338
11568
  scheduler?.dispose();
11339
11569
  consolePatcher.cleanup();
11340
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
11570
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
11341
11571
  }
11342
11572
  if (errorToHandle) {
11343
11573
  handleError(errorToHandle, config);
@@ -11365,7 +11595,7 @@ async function runNonInteractive2(params) {
11365
11595
  }
11366
11596
  });
11367
11597
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11368
- const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
11598
+ const { setupInitialActivityLogger } = await import("./devtoolsService-P42LXPJX.js");
11369
11599
  setupInitialActivityLogger(config);
11370
11600
  }
11371
11601
  const { stdout: workingStdout } = createWorkingStdio();
@@ -11381,7 +11611,7 @@ async function runNonInteractive2(params) {
11381
11611
  }
11382
11612
  };
11383
11613
  const startTime = Date.now();
11384
- const streamFormatter = config.getOutputFormat() === OutputFormat.STREAM_JSON ? new StreamJsonFormatter() : null;
11614
+ const streamFormatter = config.getOutputFormat() === "stream-json" /* STREAM_JSON */ ? new StreamJsonFormatter() : null;
11385
11615
  const abortController = new AbortController();
11386
11616
  let isAborting = false;
11387
11617
  let cancelMessageTimer = null;
@@ -11432,13 +11662,13 @@ async function runNonInteractive2(params) {
11432
11662
  let scheduler;
11433
11663
  try {
11434
11664
  consolePatcher.patch();
11435
- if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === OutputFormat.TEXT) {
11665
+ if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === "text" /* TEXT */) {
11436
11666
  process.stderr.write(
11437
11667
  "[WARNING] --raw-output is enabled. Model output is not sanitized and may contain harmful ANSI sequences (e.g. for phishing or command injection). Use --accept-raw-output-risk to suppress this warning.\n"
11438
11668
  );
11439
11669
  }
11440
11670
  setupStdinCancellation();
11441
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
11671
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
11442
11672
  coreEvents.drainBacklogs();
11443
11673
  process.stdout.on("error", (err) => {
11444
11674
  if (err.code === "EPIPE") {
@@ -11462,7 +11692,7 @@ async function runNonInteractive2(params) {
11462
11692
  }
11463
11693
  if (streamFormatter) {
11464
11694
  streamFormatter.emitEvent({
11465
- type: JsonStreamEventType.INIT,
11695
+ type: "init" /* INIT */,
11466
11696
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11467
11697
  session_id: config.getSessionId(),
11468
11698
  model: config.getModel()
@@ -11500,7 +11730,7 @@ async function runNonInteractive2(params) {
11500
11730
  }
11501
11731
  if (streamFormatter) {
11502
11732
  streamFormatter.emitEvent({
11503
- type: JsonStreamEventType.MESSAGE,
11733
+ type: "message" /* MESSAGE */,
11504
11734
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11505
11735
  role: "user",
11506
11736
  content: input
@@ -11528,28 +11758,28 @@ async function runNonInteractive2(params) {
11528
11758
  if (abortController.signal.aborted) {
11529
11759
  handleCancellationError(config);
11530
11760
  }
11531
- if (event.type === GeminiEventType.Content) {
11761
+ if (event.type === "content" /* Content */) {
11532
11762
  const isRaw = config.getRawOutput() || config.getAcceptRawOutputRisk();
11533
11763
  const output = isRaw ? event.value : stripAnsi(event.value);
11534
11764
  if (streamFormatter) {
11535
11765
  streamFormatter.emitEvent({
11536
- type: JsonStreamEventType.MESSAGE,
11766
+ type: "message" /* MESSAGE */,
11537
11767
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11538
11768
  role: "assistant",
11539
11769
  content: output,
11540
11770
  delta: true
11541
11771
  });
11542
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11772
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11543
11773
  responseText += output;
11544
11774
  } else {
11545
11775
  if (event.value) {
11546
11776
  textOutput.write(output);
11547
11777
  }
11548
11778
  }
11549
- } else if (event.type === GeminiEventType.ToolCallRequest) {
11779
+ } else if (event.type === "tool_call_request" /* ToolCallRequest */) {
11550
11780
  if (streamFormatter) {
11551
11781
  streamFormatter.emitEvent({
11552
- type: JsonStreamEventType.TOOL_USE,
11782
+ type: "tool_use" /* TOOL_USE */,
11553
11783
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11554
11784
  tool_name: event.value.name,
11555
11785
  tool_id: event.value.callId,
@@ -11557,33 +11787,33 @@ async function runNonInteractive2(params) {
11557
11787
  });
11558
11788
  }
11559
11789
  toolCallRequests.push(event.value);
11560
- } else if (event.type === GeminiEventType.LoopDetected) {
11790
+ } else if (event.type === "loop_detected" /* LoopDetected */) {
11561
11791
  const message = "Loop detected, stopping execution";
11562
11792
  if (streamFormatter) {
11563
11793
  streamFormatter.emitEvent({
11564
- type: JsonStreamEventType.ERROR,
11794
+ type: "error" /* ERROR */,
11565
11795
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11566
11796
  severity: "warning",
11567
11797
  message
11568
11798
  });
11569
11799
  }
11570
11800
  warnings.push(message);
11571
- } else if (event.type === GeminiEventType.MaxSessionTurns) {
11801
+ } else if (event.type === "max_session_turns" /* MaxSessionTurns */) {
11572
11802
  const message = "Maximum session turns exceeded";
11573
11803
  if (streamFormatter) {
11574
11804
  streamFormatter.emitEvent({
11575
- type: JsonStreamEventType.ERROR,
11805
+ type: "error" /* ERROR */,
11576
11806
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11577
11807
  severity: "error",
11578
11808
  message
11579
11809
  });
11580
11810
  }
11581
11811
  warnings.push(message);
11582
- } else if (event.type === GeminiEventType.Error) {
11812
+ } else if (event.type === "error" /* Error */) {
11583
11813
  throw event.value.error;
11584
- } else if (event.type === GeminiEventType.AgentExecutionStopped) {
11814
+ } else if (event.type === "agent_execution_stopped" /* AgentExecutionStopped */) {
11585
11815
  const stopMessage = `Agent execution stopped: ${event.value.systemMessage?.trim() || event.value.reason}`;
11586
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11816
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11587
11817
  process.stderr.write(`${stopMessage}
11588
11818
  `);
11589
11819
  }
@@ -11591,7 +11821,7 @@ async function runNonInteractive2(params) {
11591
11821
  const metrics = uiTelemetryService.getMetrics();
11592
11822
  const durationMs = Date.now() - startTime;
11593
11823
  streamFormatter.emitEvent({
11594
- type: JsonStreamEventType.RESULT,
11824
+ type: "result" /* RESULT */,
11595
11825
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11596
11826
  status: "success",
11597
11827
  stats: streamFormatter.convertToStreamStats(
@@ -11599,7 +11829,7 @@ async function runNonInteractive2(params) {
11599
11829
  durationMs
11600
11830
  )
11601
11831
  });
11602
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11832
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11603
11833
  const formatter = new JsonFormatter();
11604
11834
  const stats = uiTelemetryService.getMetrics();
11605
11835
  textOutput.write(
@@ -11615,21 +11845,21 @@ async function runNonInteractive2(params) {
11615
11845
  textOutput.ensureTrailingNewline();
11616
11846
  }
11617
11847
  return;
11618
- } else if (event.type === GeminiEventType.AgentExecutionBlocked) {
11848
+ } else if (event.type === "agent_execution_blocked" /* AgentExecutionBlocked */) {
11619
11849
  const blockMessage = `Agent execution blocked: ${event.value.systemMessage?.trim() || event.value.reason}`;
11620
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11850
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11621
11851
  process.stderr.write(`[WARNING] ${blockMessage}
11622
11852
  `);
11623
11853
  } else if (streamFormatter) {
11624
11854
  streamFormatter.emitEvent({
11625
- type: JsonStreamEventType.ERROR,
11855
+ type: "error" /* ERROR */,
11626
11856
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11627
11857
  severity: "warning",
11628
11858
  message: stripAnsi(blockMessage)
11629
11859
  });
11630
11860
  }
11631
11861
  warnings.push(blockMessage);
11632
- } else if (event.type === GeminiEventType.InvalidStream) {
11862
+ } else if (event.type === "invalid_stream" /* InvalidStream */) {
11633
11863
  const eventValue = event.value;
11634
11864
  if (eventValue?.type === "NO_RESPONSE_TEXT") {
11635
11865
  invalidStreamError = TRUE_EMPTY_RESPONSE_MESSAGE;
@@ -11652,12 +11882,12 @@ async function runNonInteractive2(params) {
11652
11882
  );
11653
11883
  if (streamFormatter) {
11654
11884
  streamFormatter.emitEvent({
11655
- type: JsonStreamEventType.ERROR,
11885
+ type: "error" /* ERROR */,
11656
11886
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11657
11887
  severity: "error",
11658
11888
  message: invalidStreamError
11659
11889
  });
11660
- } else if (config.getOutputFormat() === OutputFormat.TEXT) {
11890
+ } else if (config.getOutputFormat() === "text" /* TEXT */) {
11661
11891
  process.stderr.write(`[ERROR] ${invalidStreamError}
11662
11892
  `);
11663
11893
  }
@@ -11677,7 +11907,7 @@ async function runNonInteractive2(params) {
11677
11907
  const requestInfo = completedToolCall.request;
11678
11908
  if (streamFormatter) {
11679
11909
  streamFormatter.emitEvent({
11680
- type: JsonStreamEventType.TOOL_RESULT,
11910
+ type: "tool_result" /* TOOL_RESULT */,
11681
11911
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11682
11912
  tool_id: requestInfo.callId,
11683
11913
  status: completedToolCall.status === "error" ? "error" : "success",
@@ -11711,11 +11941,11 @@ async function runNonInteractive2(params) {
11711
11941
  );
11712
11942
  }
11713
11943
  const stopExecutionTool = completedToolCalls.find(
11714
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
11944
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
11715
11945
  );
11716
11946
  if (stopExecutionTool && stopExecutionTool.response.error) {
11717
11947
  const stopMessage = `Agent execution stopped: ${stopExecutionTool.response.error.message}`;
11718
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11948
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11719
11949
  process.stderr.write(`${stopMessage}
11720
11950
  `);
11721
11951
  }
@@ -11723,7 +11953,7 @@ async function runNonInteractive2(params) {
11723
11953
  const metrics = uiTelemetryService.getMetrics();
11724
11954
  const durationMs = Date.now() - startTime;
11725
11955
  streamFormatter.emitEvent({
11726
- type: JsonStreamEventType.RESULT,
11956
+ type: "result" /* RESULT */,
11727
11957
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11728
11958
  status: "success",
11729
11959
  stats: streamFormatter.convertToStreamStats(
@@ -11731,7 +11961,7 @@ async function runNonInteractive2(params) {
11731
11961
  durationMs
11732
11962
  )
11733
11963
  });
11734
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11964
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11735
11965
  const formatter = new JsonFormatter();
11736
11966
  const stats = uiTelemetryService.getMetrics();
11737
11967
  textOutput.write(
@@ -11754,12 +11984,12 @@ async function runNonInteractive2(params) {
11754
11984
  const metrics = uiTelemetryService.getMetrics();
11755
11985
  const durationMs = Date.now() - startTime;
11756
11986
  streamFormatter.emitEvent({
11757
- type: JsonStreamEventType.RESULT,
11987
+ type: "result" /* RESULT */,
11758
11988
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11759
11989
  status: invalidStreamError ? "error" : "success",
11760
11990
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
11761
11991
  });
11762
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11992
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11763
11993
  const formatter = new JsonFormatter();
11764
11994
  const stats = uiTelemetryService.getMetrics();
11765
11995
  textOutput.write(
@@ -11783,7 +12013,7 @@ async function runNonInteractive2(params) {
11783
12013
  cleanupStdinCancellation();
11784
12014
  scheduler?.dispose();
11785
12015
  consolePatcher.cleanup();
11786
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
12016
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
11787
12017
  }
11788
12018
  if (errorToHandle) {
11789
12019
  handleError(errorToHandle, config);
@@ -14174,12 +14404,12 @@ function toToolCallContent(toolResult) {
14174
14404
  }
14175
14405
  var basicPermissionOptions = [
14176
14406
  {
14177
- optionId: ToolConfirmationOutcome.ProceedOnce,
14407
+ optionId: "proceed_once" /* ProceedOnce */,
14178
14408
  name: "Allow",
14179
14409
  kind: "allow_once"
14180
14410
  },
14181
14411
  {
14182
- optionId: ToolConfirmationOutcome.Cancel,
14412
+ optionId: "cancel" /* Cancel */,
14183
14413
  name: "Reject",
14184
14414
  kind: "reject_once"
14185
14415
  }
@@ -14191,13 +14421,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14191
14421
  switch (confirmation.type) {
14192
14422
  case "edit":
14193
14423
  options.push({
14194
- optionId: ToolConfirmationOutcome.ProceedAlways,
14424
+ optionId: "proceed_always" /* ProceedAlways */,
14195
14425
  name: "Allow for this session",
14196
14426
  kind: "allow_always"
14197
14427
  });
14198
14428
  if (enablePermanentToolApproval) {
14199
14429
  options.push({
14200
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14430
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14201
14431
  name: "Allow for this file in all future sessions",
14202
14432
  kind: "allow_always"
14203
14433
  });
@@ -14205,13 +14435,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14205
14435
  break;
14206
14436
  case "exec":
14207
14437
  options.push({
14208
- optionId: ToolConfirmationOutcome.ProceedAlways,
14438
+ optionId: "proceed_always" /* ProceedAlways */,
14209
14439
  name: "Allow for this session",
14210
14440
  kind: "allow_always"
14211
14441
  });
14212
14442
  if (enablePermanentToolApproval) {
14213
14443
  options.push({
14214
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14444
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14215
14445
  name: "Allow this command for all future sessions",
14216
14446
  kind: "allow_always"
14217
14447
  });
@@ -14220,19 +14450,19 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14220
14450
  case "mcp":
14221
14451
  options.push(
14222
14452
  {
14223
- optionId: ToolConfirmationOutcome.ProceedAlwaysServer,
14453
+ optionId: "proceed_always_server" /* ProceedAlwaysServer */,
14224
14454
  name: "Allow all server tools for this session",
14225
14455
  kind: "allow_always"
14226
14456
  },
14227
14457
  {
14228
- optionId: ToolConfirmationOutcome.ProceedAlwaysTool,
14458
+ optionId: "proceed_always_tool" /* ProceedAlwaysTool */,
14229
14459
  name: "Allow tool for this session",
14230
14460
  kind: "allow_always"
14231
14461
  }
14232
14462
  );
14233
14463
  if (enablePermanentToolApproval) {
14234
14464
  options.push({
14235
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14465
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14236
14466
  name: "Allow tool for all future sessions",
14237
14467
  kind: "allow_always"
14238
14468
  });
@@ -14240,13 +14470,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14240
14470
  break;
14241
14471
  case "info":
14242
14472
  options.push({
14243
- optionId: ToolConfirmationOutcome.ProceedAlways,
14473
+ optionId: "proceed_always" /* ProceedAlways */,
14244
14474
  name: "Allow for this session",
14245
14475
  kind: "allow_always"
14246
14476
  });
14247
14477
  if (enablePermanentToolApproval) {
14248
14478
  options.push({
14249
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14479
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14250
14480
  name: "Allow for all future sessions",
14251
14481
  kind: "allow_always"
14252
14482
  });
@@ -14278,21 +14508,21 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14278
14508
  }
14279
14509
  function toAcpToolKind(kind) {
14280
14510
  switch (kind) {
14281
- case Kind.Read:
14282
- case Kind.Edit:
14283
- case Kind.Execute:
14284
- case Kind.Search:
14285
- case Kind.Delete:
14286
- case Kind.Move:
14287
- case Kind.Think:
14288
- case Kind.Fetch:
14289
- case Kind.SwitchMode:
14290
- case Kind.Other:
14511
+ case "read" /* Read */:
14512
+ case "edit" /* Edit */:
14513
+ case "execute" /* Execute */:
14514
+ case "search" /* Search */:
14515
+ case "delete" /* Delete */:
14516
+ case "move" /* Move */:
14517
+ case "think" /* Think */:
14518
+ case "fetch" /* Fetch */:
14519
+ case "switch_mode" /* SwitchMode */:
14520
+ case "other" /* Other */:
14291
14521
  return kind;
14292
- case Kind.Agent:
14522
+ case "agent" /* Agent */:
14293
14523
  return "think";
14294
- case Kind.Plan:
14295
- case Kind.Communicate:
14524
+ case "plan" /* Plan */:
14525
+ case "communicate" /* Communicate */:
14296
14526
  default:
14297
14527
  return "other";
14298
14528
  }
@@ -14300,24 +14530,24 @@ function toAcpToolKind(kind) {
14300
14530
  function buildAvailableModes(isPlanEnabled) {
14301
14531
  const modes = [
14302
14532
  {
14303
- id: ApprovalMode.DEFAULT,
14533
+ id: "default" /* DEFAULT */,
14304
14534
  name: "Default",
14305
14535
  description: "Prompts for approval"
14306
14536
  },
14307
14537
  {
14308
- id: ApprovalMode.AUTO_EDIT,
14538
+ id: "autoEdit" /* AUTO_EDIT */,
14309
14539
  name: "Auto Edit",
14310
14540
  description: "Auto-approves edit tools"
14311
14541
  },
14312
14542
  {
14313
- id: ApprovalMode.YOLO,
14543
+ id: "yolo" /* YOLO */,
14314
14544
  name: "YOLO",
14315
14545
  description: "Auto-approves all tools"
14316
14546
  }
14317
14547
  ];
14318
14548
  if (isPlanEnabled) {
14319
14549
  modes.push({
14320
- id: ApprovalMode.PLAN,
14550
+ id: "plan" /* PLAN */,
14321
14551
  name: "Plan",
14322
14552
  description: "Read-only mode"
14323
14553
  });
@@ -14330,7 +14560,7 @@ function buildAvailableModels(config, settings) {
14330
14560
  const useGemini31 = config.getGemini31LaunchedSync?.() ?? false;
14331
14561
  const useGemini3_5Flash = config.hasGemini35FlashGAAccess?.() ?? false;
14332
14562
  const selectedAuthType = settings.merged.security.auth.selectedType;
14333
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
14563
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
14334
14564
  if (config.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
14335
14565
  const options = config.getModelConfigService().getAvailableModelOptions({
14336
14566
  useGemini3_1: useGemini31,
@@ -14416,11 +14646,11 @@ var Session = class {
14416
14646
  this.connection = connection;
14417
14647
  this.settings = settings;
14418
14648
  coreEvents.on(
14419
- CoreEvent.ApprovalModeChanged,
14649
+ "approval-mode-changed" /* ApprovalModeChanged */,
14420
14650
  this.handleApprovalModeChanged
14421
14651
  );
14422
14652
  this.context.config.getMessageBus()?.subscribe(
14423
- MessageBusType.TOOL_CONFIRMATION_REQUEST,
14653
+ "tool-confirmation-request" /* TOOL_CONFIRMATION_REQUEST */,
14424
14654
  this.handleToolConfirmationRequest,
14425
14655
  { signal: this.disposeController.signal }
14426
14656
  );
@@ -14444,7 +14674,7 @@ var Session = class {
14444
14674
  "Policy engine missing. Denying tool confirmation request."
14445
14675
  );
14446
14676
  await messageBus.publish({
14447
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
14677
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
14448
14678
  correlationId: request.correlationId,
14449
14679
  confirmed: false,
14450
14680
  requiresUserConfirmation: false
@@ -14457,7 +14687,7 @@ var Session = class {
14457
14687
  "Tool confirmation request missing tool name. Denying."
14458
14688
  );
14459
14689
  await messageBus.publish({
14460
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
14690
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
14461
14691
  correlationId: request.correlationId,
14462
14692
  confirmed: false,
14463
14693
  requiresUserConfirmation: false
@@ -14470,7 +14700,7 @@ var Session = class {
14470
14700
  `Tool confirmation request for unknown tool: ${toolName}. Denying.`
14471
14701
  );
14472
14702
  await messageBus.publish({
14473
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
14703
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
14474
14704
  correlationId: request.correlationId,
14475
14705
  confirmed: false,
14476
14706
  requiresUserConfirmation: false
@@ -14486,15 +14716,15 @@ var Session = class {
14486
14716
  request.subagent
14487
14717
  );
14488
14718
  await messageBus.publish({
14489
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
14719
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
14490
14720
  correlationId: request.correlationId,
14491
- confirmed: result.decision === PolicyDecision.ALLOW,
14492
- requiresUserConfirmation: result.decision === PolicyDecision.ASK_USER
14721
+ confirmed: result.decision === "allow" /* ALLOW */,
14722
+ requiresUserConfirmation: result.decision === "ask_user" /* ASK_USER */
14493
14723
  });
14494
14724
  } catch (error) {
14495
14725
  debugLogger.error("Error handling tool confirmation request:", error);
14496
14726
  await this.context.config.getMessageBus()?.publish({
14497
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
14727
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
14498
14728
  correlationId: request.correlationId,
14499
14729
  confirmed: false,
14500
14730
  requiresUserConfirmation: false
@@ -14514,7 +14744,7 @@ var Session = class {
14514
14744
  };
14515
14745
  dispose() {
14516
14746
  coreEvents.off(
14517
- CoreEvent.ApprovalModeChanged,
14747
+ "approval-mode-changed" /* ApprovalModeChanged */,
14518
14748
  this.handleApprovalModeChanged
14519
14749
  );
14520
14750
  this.disposeController.abort();
@@ -14603,7 +14833,7 @@ ${thought.description}`;
14603
14833
  await this.sendUpdate({
14604
14834
  sessionUpdate: "tool_call",
14605
14835
  toolCallId: toolCall.id,
14606
- status: toolCall.status === CoreToolCallStatus.Success ? "completed" : "failed",
14836
+ status: toolCall.status === "success" /* Success */ ? "completed" : "failed",
14607
14837
  title: toolCall.displayName || toolCall.name,
14608
14838
  content: toolCallContent,
14609
14839
  kind: tool ? toAcpToolKind(tool.kind) : "other"
@@ -14695,7 +14925,7 @@ ${thought.description}`;
14695
14925
  return { stopReason: "cancelled" };
14696
14926
  }
14697
14927
  switch (event.type) {
14698
- case GeminiEventType.Content: {
14928
+ case "content" /* Content */: {
14699
14929
  const content = {
14700
14930
  type: "text",
14701
14931
  text: event.value
@@ -14706,7 +14936,7 @@ ${thought.description}`;
14706
14936
  });
14707
14937
  break;
14708
14938
  }
14709
- case GeminiEventType.Thought: {
14939
+ case "thought" /* Thought */: {
14710
14940
  const thoughtText = `**${event.value.subject}**
14711
14941
  ${event.value.description}`;
14712
14942
  await this.sendUpdate({
@@ -14715,10 +14945,10 @@ ${event.value.description}`;
14715
14945
  });
14716
14946
  break;
14717
14947
  }
14718
- case GeminiEventType.ToolCallRequest:
14948
+ case "tool_call_request" /* ToolCallRequest */:
14719
14949
  toolCallRequests.push(event.value);
14720
14950
  break;
14721
- case GeminiEventType.Finished: {
14951
+ case "finished" /* Finished */: {
14722
14952
  const usage2 = event.value.usageMetadata;
14723
14953
  if (usage2) {
14724
14954
  turnInputTokens = usage2.promptTokenCount ?? turnInputTokens;
@@ -14726,19 +14956,19 @@ ${event.value.description}`;
14726
14956
  }
14727
14957
  break;
14728
14958
  }
14729
- case GeminiEventType.ModelInfo:
14959
+ case "model_info" /* ModelInfo */:
14730
14960
  turnModelId = event.value;
14731
14961
  break;
14732
- case GeminiEventType.MaxSessionTurns:
14962
+ case "max_session_turns" /* MaxSessionTurns */:
14733
14963
  stopReason = "max_turn_requests";
14734
14964
  break;
14735
- case GeminiEventType.LoopDetected:
14965
+ case "loop_detected" /* LoopDetected */:
14736
14966
  stopReason = "max_turn_requests";
14737
14967
  break;
14738
- case GeminiEventType.ContextWindowWillOverflow:
14968
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
14739
14969
  stopReason = "max_tokens";
14740
14970
  break;
14741
- case GeminiEventType.Error: {
14971
+ case "error" /* Error */: {
14742
14972
  const parseResult = StructuredErrorSchema.safeParse(
14743
14973
  event.value.error
14744
14974
  );
@@ -14966,7 +15196,7 @@ ${event.value.description}`;
14966
15196
  const output = RequestPermissionResponseSchema.parse(
14967
15197
  await this.connection.requestPermission(params)
14968
15198
  );
14969
- const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15199
+ const outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
14970
15200
  await confirmationDetails.onConfirm(outcome);
14971
15201
  await updatePolicy(
14972
15202
  tool,
@@ -14977,16 +15207,16 @@ ${event.value.description}`;
14977
15207
  invocation
14978
15208
  );
14979
15209
  switch (outcome) {
14980
- case ToolConfirmationOutcome.Cancel:
15210
+ case "cancel" /* Cancel */:
14981
15211
  return errorResponse(
14982
15212
  new Error(`Tool "${fc.name}" was canceled by the user.`)
14983
15213
  );
14984
- case ToolConfirmationOutcome.ProceedOnce:
14985
- case ToolConfirmationOutcome.ProceedAlways:
14986
- case ToolConfirmationOutcome.ProceedAlwaysAndSave:
14987
- case ToolConfirmationOutcome.ProceedAlwaysServer:
14988
- case ToolConfirmationOutcome.ProceedAlwaysTool:
14989
- case ToolConfirmationOutcome.ModifyWithEditor:
15214
+ case "proceed_once" /* ProceedOnce */:
15215
+ case "proceed_always" /* ProceedAlways */:
15216
+ case "proceed_always_and_save" /* ProceedAlwaysAndSave */:
15217
+ case "proceed_always_server" /* ProceedAlwaysServer */:
15218
+ case "proceed_always_tool" /* ProceedAlwaysTool */:
15219
+ case "modify_with_editor" /* ModifyWithEditor */:
14990
15220
  break;
14991
15221
  default: {
14992
15222
  const resultOutcome = outcome;
@@ -15040,7 +15270,7 @@ ${event.value.description}`;
15040
15270
  );
15041
15271
  this.chat.recordCompletedToolCalls(this.context.config.getActiveModel(), [
15042
15272
  {
15043
- status: CoreToolCallStatus.Success,
15273
+ status: "success" /* Success */,
15044
15274
  request: {
15045
15275
  callId,
15046
15276
  name: fc.name,
@@ -15085,7 +15315,7 @@ ${event.value.description}`;
15085
15315
  });
15086
15316
  this.chat.recordCompletedToolCalls(this.context.config.getActiveModel(), [
15087
15317
  {
15088
- status: CoreToolCallStatus.Error,
15318
+ status: "error" /* Error */,
15089
15319
  request: {
15090
15320
  callId,
15091
15321
  name: fc.name,
@@ -15213,12 +15443,12 @@ ${event.value.description}`;
15213
15443
  sessionId: this.id,
15214
15444
  options: [
15215
15445
  {
15216
- optionId: ToolConfirmationOutcome.ProceedOnce,
15446
+ optionId: "proceed_once" /* ProceedOnce */,
15217
15447
  name: "Allow once",
15218
15448
  kind: "allow_once"
15219
15449
  },
15220
15450
  {
15221
- optionId: ToolConfirmationOutcome.Cancel,
15451
+ optionId: "cancel" /* Cancel */,
15222
15452
  name: "Deny",
15223
15453
  kind: "reject_once"
15224
15454
  }
@@ -15243,8 +15473,8 @@ ${event.value.description}`;
15243
15473
  const output = RequestPermissionResponseSchema.parse(
15244
15474
  await this.connection.requestPermission(params)
15245
15475
  );
15246
- const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15247
- if (outcome === ToolConfirmationOutcome.ProceedOnce) {
15476
+ const outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15477
+ if (outcome === "proceed_once" /* ProceedOnce */) {
15248
15478
  this.context.config.getWorkspaceContext().addReadOnlyPath(absolutePath);
15249
15479
  validationError = null;
15250
15480
  } else {
@@ -15681,7 +15911,7 @@ var AcpSessionManager = class {
15681
15911
  mcpServers,
15682
15912
  loadedSettings
15683
15913
  );
15684
- const authType = loadedSettings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? AuthType.GATEWAY : AuthType.USE_GEMINI);
15914
+ const authType = loadedSettings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? "gateway" /* GATEWAY */ : "gemini-api-key" /* USE_GEMINI */);
15685
15915
  let isAuthenticated = false;
15686
15916
  let authErrorMessage = "";
15687
15917
  try {
@@ -15693,7 +15923,7 @@ var AcpSessionManager = class {
15693
15923
  );
15694
15924
  isAuthenticated = true;
15695
15925
  const contentGeneratorConfig = config.getContentGeneratorConfig();
15696
- if (authType === AuthType.USE_GEMINI && (!contentGeneratorConfig || !contentGeneratorConfig.apiKey)) {
15926
+ if (authType === "gemini-api-key" /* USE_GEMINI */ && (!contentGeneratorConfig || !contentGeneratorConfig.apiKey)) {
15697
15927
  isAuthenticated = false;
15698
15928
  authErrorMessage = "Gemini API key is missing or not configured.";
15699
15929
  }
@@ -15802,7 +16032,7 @@ var AcpSessionManager = class {
15802
16032
  return response;
15803
16033
  }
15804
16034
  async initializeSessionConfig(sessionId, cwd, mcpServers, authDetails) {
15805
- const selectedAuthType = this.settings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? AuthType.GATEWAY : void 0);
16035
+ const selectedAuthType = this.settings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? "gateway" /* GATEWAY */ : void 0);
15806
16036
  if (!selectedAuthType) {
15807
16037
  throw RequestError.authRequired();
15808
16038
  }
@@ -15903,12 +16133,12 @@ var GeminiAgent = class {
15903
16133
  }
15904
16134
  const authMethods = [
15905
16135
  {
15906
- id: AuthType.LOGIN_WITH_GOOGLE,
16136
+ id: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
15907
16137
  name: "Log in with Google",
15908
16138
  description: "Log in with your Google account"
15909
16139
  },
15910
16140
  {
15911
- id: AuthType.USE_GEMINI,
16141
+ id: "gemini-api-key" /* USE_GEMINI */,
15912
16142
  name: "Gemini API key",
15913
16143
  description: "Use an API key with Gemini Developer API",
15914
16144
  _meta: {
@@ -15918,12 +16148,12 @@ var GeminiAgent = class {
15918
16148
  }
15919
16149
  },
15920
16150
  {
15921
- id: AuthType.USE_VERTEX_AI,
16151
+ id: "vertex-ai" /* USE_VERTEX_AI */,
15922
16152
  name: "Vertex AI",
15923
16153
  description: "Use an API key with Vertex AI GenAI API"
15924
16154
  },
15925
16155
  {
15926
- id: AuthType.GATEWAY,
16156
+ id: "gateway" /* GATEWAY */,
15927
16157
  name: "AI API Gateway",
15928
16158
  description: "Use a custom AI API Gateway",
15929
16159
  _meta: {
@@ -16096,7 +16326,7 @@ async function validateNonInteractiveAuth(configuredAuthType, useExternalAuth, n
16096
16326
  }
16097
16327
  return authType;
16098
16328
  } catch (error) {
16099
- if (nonInteractiveConfig.getOutputFormat() === OutputFormat.JSON) {
16329
+ if (nonInteractiveConfig.getOutputFormat() === "json" /* JSON */) {
16100
16330
  handleError(
16101
16331
  error instanceof Error ? error : new Error(String(error)),
16102
16332
  nonInteractiveConfig,
@@ -16291,10 +16521,10 @@ var SlashCommandConflictHandler = class {
16291
16521
  this.handleConflicts = this.handleConflicts.bind(this);
16292
16522
  }
16293
16523
  start() {
16294
- coreEvents.on(CoreEvent.SlashCommandConflicts, this.handleConflicts);
16524
+ coreEvents.on("slash-command-conflicts" /* SlashCommandConflicts */, this.handleConflicts);
16295
16525
  }
16296
16526
  stop() {
16297
- coreEvents.off(CoreEvent.SlashCommandConflicts, this.handleConflicts);
16527
+ coreEvents.off("slash-command-conflicts" /* SlashCommandConflicts */, this.handleConflicts);
16298
16528
  if (this.flushTimeout) {
16299
16529
  clearTimeout(this.flushTimeout);
16300
16530
  this.flushTimeout = null;
@@ -16575,7 +16805,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
16575
16805
  }
16576
16806
  }
16577
16807
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
16578
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-RGOYDSMH.js");
16808
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-GGARXT6P.js");
16579
16809
  await doStartUI(
16580
16810
  config,
16581
16811
  settings,
@@ -16678,12 +16908,12 @@ async function main() {
16678
16908
  dns.setDefaultResultOrder(
16679
16909
  validateDnsResolutionOrder(settings.merged.advanced.dnsResolutionOrder)
16680
16910
  );
16681
- if (!settings.merged.security.auth.selectedType || settings.merged.security.auth.selectedType === AuthType.LEGACY_CLOUD_SHELL) {
16911
+ if (!settings.merged.security.auth.selectedType || settings.merged.security.auth.selectedType === "cloud-shell" /* LEGACY_CLOUD_SHELL */) {
16682
16912
  if (process.env["CLOUD_SHELL"] === "true" || process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true") {
16683
16913
  settings.setValue(
16684
16914
  "User" /* User */,
16685
16915
  "security.auth.selectedType",
16686
- AuthType.COMPUTE_ADC
16916
+ "compute-default-credentials" /* COMPUTE_ADC */
16687
16917
  );
16688
16918
  }
16689
16919
  }
@@ -16784,7 +17014,7 @@ ${finalArgs[promptIndex + 1]}`;
16784
17014
  await config.storage.initialize();
16785
17015
  adminControlsListner.setConfig(config);
16786
17016
  if (config.isInteractive() && settings.merged.general.devtools) {
16787
- const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
17017
+ const { setupInitialActivityLogger } = await import("./devtoolsService-P42LXPJX.js");
16788
17018
  setupInitialActivityLogger(config);
16789
17019
  }
16790
17020
  registerTelemetryConfig(config);
@@ -16792,7 +17022,7 @@ ${finalArgs[promptIndex + 1]}`;
16792
17022
  const messageBus = config.getMessageBus();
16793
17023
  createPolicyUpdater2(policyEngine, messageBus, config.storage);
16794
17024
  registerCleanup(async () => {
16795
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
17025
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
16796
17026
  });
16797
17027
  if (!config.getAcpMode()) {
16798
17028
  registerCleanup(consolePatcher.cleanup);
@@ -16843,7 +17073,7 @@ ${finalArgs[promptIndex + 1]}`;
16843
17073
  const initAppHandle = startupProfiler.start("initialize_app");
16844
17074
  const initializationResult = await initializeApp(config, settings);
16845
17075
  initAppHandle?.end();
16846
- import("./liteRtServerManager-IJ4I2PZA.js").then(({ LiteRtServerManager }) => {
17076
+ import("./liteRtServerManager-YLOGF7RQ.js").then(({ LiteRtServerManager }) => {
16847
17077
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
16848
17078
  if (!mergedGemma) return;
16849
17079
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
@@ -16853,7 +17083,7 @@ ${finalArgs[promptIndex + 1]}`;
16853
17083
  autoStartServer: userGemma?.autoStartServer
16854
17084
  });
16855
17085
  }).catch((e) => debugLogger.warn("LiteRT auto-start import failed:", e));
16856
- if (settings.merged.security.auth.selectedType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
17086
+ if (settings.merged.security.auth.selectedType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
16857
17087
  await getOauthClient(settings.merged.security.auth.selectedType, config);
16858
17088
  }
16859
17089
  if (config.getAcpMode()) {
@@ -16869,7 +17099,7 @@ ${finalArgs[promptIndex + 1]}`;
16869
17099
  ...rawStartupWarnings.map((message) => ({
16870
17100
  id: `startup-${createHash2("sha256").update(message).digest("hex").substring(0, 16)}`,
16871
17101
  message,
16872
- priority: WarningPriority.High
17102
+ priority: "high" /* High */
16873
17103
  })),
16874
17104
  ...await getUserStartupWarnings(settings.merged, void 0, {
16875
17105
  isAlternateBuffer: useAlternateBuffer
@@ -16906,7 +17136,7 @@ ${finalArgs[promptIndex + 1]}`;
16906
17136
  ${input}` : stdinData;
16907
17137
  }
16908
17138
  }
16909
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
17139
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
16910
17140
  const hookSystem = config?.getHookSystem();
16911
17141
  if (hookSystem) {
16912
17142
  const result = await hookSystem.fireSessionStartEvent(sessionStartSource);
@@ -16963,8 +17193,8 @@ ${input}` : wrappedContext;
16963
17193
  }
16964
17194
  }
16965
17195
  function initializeOutputListenersAndFlush(config) {
16966
- if (coreEvents.listenerCount(CoreEvent.Output) === 0) {
16967
- coreEvents.on(CoreEvent.Output, (payload) => {
17196
+ if (coreEvents.listenerCount("output" /* Output */) === 0) {
17197
+ coreEvents.on("output" /* Output */, (payload) => {
16968
17198
  if (payload.isStderr) {
16969
17199
  writeToStderr(payload.chunk, payload.encoding);
16970
17200
  } else {
@@ -16972,8 +17202,8 @@ function initializeOutputListenersAndFlush(config) {
16972
17202
  }
16973
17203
  });
16974
17204
  }
16975
- if (coreEvents.listenerCount(CoreEvent.ConsoleLog) === 0) {
16976
- coreEvents.on(CoreEvent.ConsoleLog, (payload) => {
17205
+ if (coreEvents.listenerCount("console-log" /* ConsoleLog */) === 0) {
17206
+ coreEvents.on("console-log" /* ConsoleLog */, (payload) => {
16977
17207
  if (payload.type === "error" || payload.type === "warn") {
16978
17208
  writeToStderr(payload.content + "\n");
16979
17209
  } else {
@@ -16981,8 +17211,8 @@ function initializeOutputListenersAndFlush(config) {
16981
17211
  }
16982
17212
  });
16983
17213
  }
16984
- if (coreEvents.listenerCount(CoreEvent.UserFeedback) === 0) {
16985
- coreEvents.on(CoreEvent.UserFeedback, (payload) => {
17214
+ if (coreEvents.listenerCount("user-feedback" /* UserFeedback */) === 0) {
17215
+ coreEvents.on("user-feedback" /* UserFeedback */, (payload) => {
16986
17216
  writeToStderr(payload.message + "\n");
16987
17217
  });
16988
17218
  }
@@ -16990,7 +17220,7 @@ function initializeOutputListenersAndFlush(config) {
16990
17220
  const forceToStderr = outputFormat === "json";
16991
17221
  coreEvents.drainBacklogs(
16992
17222
  (event, args) => {
16993
- if (forceToStderr && event === CoreEvent.Output) {
17223
+ if (forceToStderr && event === "output" /* Output */) {
16994
17224
  const payload = args[0];
16995
17225
  if (!payload.isStderr) {
16996
17226
  return {