@google/gemini-cli 0.63.0-nightly.20260929.gfe6350238 → 0.63.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 (66) hide show
  1. package/bundle/{chunk-D5PWWG7J.js → chunk-2V7FO5QV.js} +17 -14
  2. package/bundle/{chunk-MZZCBSEG.js → chunk-4M3FMNYW.js} +1 -1
  3. package/bundle/{chunk-ZZX34ZSC.js → chunk-63XA5K4A.js} +2 -2
  4. package/bundle/{chunk-2CWWUJ6L.js → chunk-6NM3GGUQ.js} +3 -3
  5. package/bundle/{chunk-3DZUGKXM.js → chunk-AM7DMDAW.js} +2 -2
  6. package/bundle/{chunk-XQAX2S72.js → chunk-ED56GFWH.js} +7 -7
  7. package/bundle/{chunk-FKRRUV32.js → chunk-ER445ATE.js} +1 -1
  8. package/bundle/{chunk-IAERXNI3.js → chunk-G4LSSABK.js} +1 -1
  9. package/bundle/{chunk-JWDJCBM5.js → chunk-HFRGWL72.js} +1 -1
  10. package/bundle/{chunk-VXHX5F3S.js → chunk-IVQKNOQE.js} +14809 -7826
  11. package/bundle/{chunk-KNHHXARR.js → chunk-JEJU2SSS.js} +1 -1
  12. package/bundle/{chunk-HRWA24MZ.js → chunk-OT76K4ZH.js} +3 -3
  13. package/bundle/{chunk-LD6UITWV.js → chunk-PBTA3JQ7.js} +1 -1
  14. package/bundle/{chunk-LHLQX2PG.js → chunk-POA4QAXA.js} +1 -1
  15. package/bundle/{chunk-3HRSVYTB.js → chunk-QFT2HRLF.js} +8 -9
  16. package/bundle/{chunk-SWV7ZVKH.js → chunk-RWBXO4OP.js} +17 -14
  17. package/bundle/{chunk-LKUDEIDP.js → chunk-SXGHDMQJ.js} +3 -3
  18. package/bundle/{chunk-VNZAVVNG.js → chunk-T6JVRMWQ.js} +5 -7
  19. package/bundle/{chunk-VD7SEMKX.js → chunk-U7XUX2JM.js} +1 -1
  20. package/bundle/{chunk-JECE262D.js → chunk-WDXWXGEI.js} +1 -1
  21. package/bundle/{chunk-C6UCL757.js → chunk-WFNHZELD.js} +58 -71
  22. package/bundle/{chunk-OR7RMH2H.js → chunk-WVIEQIJL.js} +1 -1
  23. package/bundle/{chunk-N2UNFTPP.js → chunk-XVUCVIMX.js} +2 -2
  24. package/bundle/{chunk-BFGTH5UC.js → chunk-Z6ZYLUTY.js} +7 -7
  25. package/bundle/{cleanup-6BMNXRVK.js → cleanup-3X3LXGSD.js} +2 -2
  26. package/bundle/{cleanup-EGCQDHCG.js → cleanup-5SERLJ6F.js} +2 -2
  27. package/bundle/{cleanup-WWBXF54B.js → cleanup-I3EZCS7H.js} +2 -2
  28. package/bundle/{core-TO2WCWVS.js → core-AELQHLEH.js} +1 -1
  29. package/bundle/{dist-EVVKUMWU.js → core-DQ33KNDF.js} +1 -1
  30. package/bundle/{devtoolsService-CD4BXQCU.js → devtoolsService-J7U7KJF3.js} +2 -2
  31. package/bundle/{devtoolsService-HLTYHXUC.js → devtoolsService-K5JNOPRE.js} +2 -2
  32. package/bundle/{devtoolsService-KKKGHFGU.js → devtoolsService-ZWL6J2QQ.js} +3 -4
  33. package/bundle/{dist-FPQFVRXW.js → dist-TZPQ7QYY.js} +1 -1
  34. package/bundle/{gemini-G4M56PGH.js → gemini-6YZTUGIX.js} +14 -14
  35. package/bundle/{gemini-D67CLDN3.js → gemini-O7LOMBXL.js} +14 -14
  36. package/bundle/{gemini-XYSZEME4.js → gemini-TIPFO7CW.js} +198 -214
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-LQ34I3IK.js → interactiveCli-I2CP4PIR.js} +8 -8
  39. package/bundle/{interactiveCli-5NAM6QNF.js → interactiveCli-I5OVF5KN.js} +8 -8
  40. package/bundle/{interactiveCli-DFBCP7YU.js → interactiveCli-MDJW5F3B.js} +292 -311
  41. package/bundle/{liteRtServerManager-DJ5BH4NI.js → liteRtServerManager-IDOOSG4Q.js} +4 -4
  42. package/bundle/{liteRtServerManager-DPX4VZQK.js → liteRtServerManager-LCAVI6PR.js} +4 -4
  43. package/bundle/{liteRtServerManager-FZHISVS5.js → liteRtServerManager-VF5GHIIE.js} +4 -4
  44. package/bundle/{oauth2-provider-XJKOJRHQ.js → oauth2-provider-CSFBMKNT.js} +1 -1
  45. package/bundle/{oauth2-provider-M3NSZVV6.js → oauth2-provider-LVULCANS.js} +1 -1
  46. package/bundle/{oauth2-provider-YGR7H7R6.js → oauth2-provider-X4VQX6TA.js} +72 -38
  47. package/bundle/{start-C5JP5VOP.js → start-P3SVMDEG.js} +6 -6
  48. package/bundle/{start-DW7QL3JX.js → start-QCD2SBKP.js} +6 -6
  49. package/bundle/{start-L7BD6NSX.js → start-TCWFLMYQ.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-4CCACYHM.js +0 -17446
  52. package/bundle/chunk-JEV44LLO.js +0 -154
  53. package/bundle/chunk-KQGP4BDM.js +0 -512
  54. package/bundle/chunk-MQKYUKCB.js +0 -118
  55. package/bundle/chunk-PPMXIVFB.js +0 -102951
  56. package/bundle/chunk-T44PFUON.js +0 -425
  57. package/bundle/chunk-WW6NERPJ.js +0 -400532
  58. package/bundle/chunk-YZ4YJMJW.js +0 -1571
  59. package/bundle/cleanup-XVPMDKAM.js +0 -32
  60. package/bundle/devtoolsService-O2VAV2XX.js +0 -4359
  61. package/bundle/dist-LKEXVAFT.js +0 -2250
  62. package/bundle/gemini-MZC4D7WM.js +0 -17863
  63. package/bundle/interactiveCli-UWZ7QXHW.js +0 -34915
  64. package/bundle/liteRtServerManager-QB4LEL42.js +0 -65
  65. package/bundle/oauth2-provider-Z5IRKTFU.js +0 -235
  66. package/bundle/start-ZH2DHESZ.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-LKUDEIDP.js";
5
+ } from "./chunk-6NM3GGUQ.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -46,11 +46,11 @@ import {
46
46
  updateExtension,
47
47
  validateAuthMethod,
48
48
  validateContextFilePath
49
- } from "./chunk-BFGTH5UC.js";
49
+ } from "./chunk-WFNHZELD.js";
50
50
  import {
51
51
  exitCli,
52
52
  require_source
53
- } from "./chunk-KNHHXARR.js";
53
+ } from "./chunk-JEJU2SSS.js";
54
54
  import {
55
55
  appEvents
56
56
  } from "./chunk-5PS3AYFU.js";
@@ -88,11 +88,11 @@ import {
88
88
  resolveGemmaConfig,
89
89
  saveModelChange,
90
90
  stripAnsi
91
- } from "./chunk-JWDJCBM5.js";
91
+ } from "./chunk-T6JVRMWQ.js";
92
92
  import {
93
93
  RELAUNCH_EXIT_CODE
94
- } from "./chunk-ZZX34ZSC.js";
95
- import "./chunk-3HRSVYTB.js";
94
+ } from "./chunk-XVUCVIMX.js";
95
+ import "./chunk-QFT2HRLF.js";
96
96
  import {
97
97
  cleanupCheckpoints,
98
98
  registerCleanup,
@@ -101,15 +101,12 @@ import {
101
101
  runExitCleanup,
102
102
  runSyncCleanup,
103
103
  setupSignalHandlers
104
- } from "./chunk-VD7SEMKX.js";
104
+ } from "./chunk-POA4QAXA.js";
105
105
  import {
106
106
  ASK_USER_TOOL_NAME,
107
- ApprovalMode,
108
107
  AuthType,
109
108
  Client,
110
109
  Config,
111
- CoreEvent,
112
- CoreToolCallStatus,
113
110
  DEFAULT_CONTEXT_FILENAME,
114
111
  DEFAULT_FILE_FILTERING_OPTIONS,
115
112
  DEFAULT_GEMINI_EMBEDDING_MODEL,
@@ -131,27 +128,19 @@ import {
131
128
  FolderTrustDiscoveryService,
132
129
  GEMINI_DIR,
133
130
  GEMINI_MODEL_ALIAS_AUTO,
134
- GeminiEventType,
135
131
  IdeClient,
136
- IntegrityStatus,
137
132
  InvalidStreamError,
138
133
  JsonFormatter,
139
- JsonStreamEventType,
140
- Kind,
141
134
  LegacyAgentSession,
142
135
  Logger,
143
136
  MAX_TOKENS_EXCEEDED_SUGGESTION,
144
137
  MCPServerConfig,
145
- MCPServerStatus,
146
- MessageBusType,
147
138
  OTHER_BLOCKED_MESSAGE,
148
- OutputFormat,
149
139
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
150
140
  PREVIEW_GEMINI_3_1_MODEL,
151
141
  PREVIEW_GEMINI_FLASH_LITE_MODEL,
152
142
  PREVIEW_GEMINI_FLASH_MODEL,
153
143
  PREVIEW_GEMINI_MODEL,
154
- PolicyDecision,
155
144
  PolicyIntegrityManager,
156
145
  RECITATION_BLOCKED_MESSAGE,
157
146
  REFERENCE_CONTENT_START,
@@ -159,8 +148,6 @@ import {
159
148
  ReadManyFilesTool,
160
149
  SAFETY_BLOCKED_MESSAGE,
161
150
  Scheduler,
162
- SessionEndReason,
163
- SessionStartSource,
164
151
  ShellExecutionService,
165
152
  SimpleExtensionLoader,
166
153
  Storage,
@@ -169,13 +156,10 @@ import {
169
156
  TRUE_EMPTY_RESPONSE_MESSAGE,
170
157
  ToolCallEvent,
171
158
  ToolConfirmationOutcome,
172
- ToolErrorType,
173
- TrustLevel,
174
159
  UserAccountManager,
175
160
  UserPromptEvent,
176
161
  ValidationCancelledError,
177
162
  ValidationRequiredError,
178
- WarningPriority,
179
163
  applyAdminAllowlist,
180
164
  applyRequiredServers,
181
165
  clearCachedCredentialFile,
@@ -255,7 +239,7 @@ import {
255
239
  updatePolicy,
256
240
  writeToStderr,
257
241
  writeToStdout
258
- } from "./chunk-SWV7ZVKH.js";
242
+ } from "./chunk-2V7FO5QV.js";
259
243
  import "./chunk-664ZODQF.js";
260
244
  import "./chunk-IUUIT4SU.js";
261
245
  import "./chunk-L6PII3GR.js";
@@ -5385,7 +5369,7 @@ var MCP_LIST_DEFAULT_TIMEOUT_MSEC = 5e3;
5385
5369
  async function testMCPConnection(serverName, config, isTrusted, activeSettings) {
5386
5370
  const isStdio = !!config.command;
5387
5371
  if (isStdio && !isTrusted) {
5388
- return MCPServerStatus.DISCONNECTED;
5372
+ return "disconnected" /* DISCONNECTED */;
5389
5373
  }
5390
5374
  const client = new Client({
5391
5375
  name: "mcp-test-client",
@@ -5421,7 +5405,7 @@ async function testMCPConnection(serverName, config, isTrusted, activeSettings)
5421
5405
  transport = await createTransport(serverName, config, false, mcpContext);
5422
5406
  } catch {
5423
5407
  await client.close();
5424
- return MCPServerStatus.DISCONNECTED;
5408
+ return "disconnected" /* DISCONNECTED */;
5425
5409
  }
5426
5410
  try {
5427
5411
  const timeout = config.timeout ?? MCP_LIST_DEFAULT_TIMEOUT_MSEC;
@@ -5435,10 +5419,10 @@ async function testMCPConnection(serverName, config, isTrusted, activeSettings)
5435
5419
  );
5436
5420
  }
5437
5421
  await client.close();
5438
- return MCPServerStatus.CONNECTED;
5422
+ return "connected" /* CONNECTED */;
5439
5423
  } catch {
5440
5424
  await transport.close();
5441
- return MCPServerStatus.DISCONNECTED;
5425
+ return "disconnected" /* DISCONNECTED */;
5442
5426
  }
5443
5427
  }
5444
5428
  async function getServerStatus(serverName, server, isTrusted, activeSettings, consolidatedExcluded, consolidatedAllowed) {
@@ -5451,12 +5435,12 @@ async function getServerStatus(serverName, server, isTrusted, activeSettings, co
5451
5435
  });
5452
5436
  if (!loadResult.allowed) {
5453
5437
  if (loadResult.blockType === "admin" || loadResult.blockType === "allowlist" || loadResult.blockType === "excludelist") {
5454
- return MCPServerStatus.BLOCKED;
5438
+ return "blocked" /* BLOCKED */;
5455
5439
  }
5456
- return MCPServerStatus.DISABLED;
5440
+ return "disabled" /* DISABLED */;
5457
5441
  }
5458
5442
  if (!isTrusted) {
5459
- return MCPServerStatus.DISABLED;
5443
+ return "disabled" /* DISABLED */;
5460
5444
  }
5461
5445
  return testMCPConnection(serverName, server, isTrusted, activeSettings);
5462
5446
  }
@@ -5502,23 +5486,23 @@ async function listMcpServers(loadedSettingsArg) {
5502
5486
  let statusIndicator = "";
5503
5487
  let statusText = "";
5504
5488
  switch (status) {
5505
- case MCPServerStatus.CONNECTED:
5489
+ case "connected" /* CONNECTED */:
5506
5490
  statusIndicator = import_chalk.default.green("\u2713");
5507
5491
  statusText = "Connected";
5508
5492
  break;
5509
- case MCPServerStatus.CONNECTING:
5493
+ case "connecting" /* CONNECTING */:
5510
5494
  statusIndicator = import_chalk.default.yellow("\u2026");
5511
5495
  statusText = "Connecting";
5512
5496
  break;
5513
- case MCPServerStatus.BLOCKED:
5497
+ case "blocked" /* BLOCKED */:
5514
5498
  statusIndicator = import_chalk.default.red("\u26D4");
5515
5499
  statusText = "Blocked";
5516
5500
  break;
5517
- case MCPServerStatus.DISABLED:
5501
+ case "disabled" /* DISABLED */:
5518
5502
  statusIndicator = import_chalk.default.gray("\u25CB");
5519
5503
  statusText = "Disabled";
5520
5504
  break;
5521
- case MCPServerStatus.DISCONNECTED:
5505
+ case "disconnected" /* DISCONNECTED */:
5522
5506
  default:
5523
5507
  statusIndicator = import_chalk.default.red("\u2717");
5524
5508
  statusText = "Disconnected";
@@ -5804,7 +5788,7 @@ async function handleInstall(args) {
5804
5788
  );
5805
5789
  if (confirmed) {
5806
5790
  const trustedFolders = loadTrustedFolders();
5807
- await trustedFolders.setValue(realPath, TrustLevel.TRUST_FOLDER);
5791
+ await trustedFolders.setValue(realPath, "TRUST_FOLDER" /* TRUST_FOLDER */);
5808
5792
  } else {
5809
5793
  throw new Error(
5810
5794
  `Installation aborted: Folder "${absolutePath}" is not trusted.`
@@ -7855,7 +7839,7 @@ async function loadSandboxConfig(settings, argv) {
7855
7839
  }
7856
7840
  const command2 = getSandboxCommand(sandboxValue);
7857
7841
  const packageJson = await getPackageJson(__dirname3);
7858
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.63.0-nightly.20260929.gfe6350238" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7842
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.63.0-preview.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7859
7843
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7860
7844
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7861
7845
  }
@@ -7914,9 +7898,9 @@ async function resolveWorkspacePolicyState(options) {
7914
7898
  cwd,
7915
7899
  potentialWorkspacePoliciesDir
7916
7900
  );
7917
- if (integrityResult.status === IntegrityStatus.MATCH) {
7901
+ if (integrityResult.status === "MATCH" /* MATCH */) {
7918
7902
  workspacePoliciesDir = potentialWorkspacePoliciesDir;
7919
- } else if (integrityResult.status === IntegrityStatus.NEW && integrityResult.fileCount === 0) {
7903
+ } else if (integrityResult.status === "NEW" /* NEW */ && integrityResult.fileCount === 0) {
7920
7904
  workspacePoliciesDir = void 0;
7921
7905
  } else if (interactive && !autoAcceptWorkspacePolicies) {
7922
7906
  policyUpdateConfirmationRequest = {
@@ -8344,23 +8328,23 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8344
8328
  if (rawApprovalMode) {
8345
8329
  switch (rawApprovalMode) {
8346
8330
  case "yolo":
8347
- approvalMode = ApprovalMode.YOLO;
8331
+ approvalMode = "yolo" /* YOLO */;
8348
8332
  break;
8349
8333
  case "auto_edit":
8350
- approvalMode = ApprovalMode.AUTO_EDIT;
8334
+ approvalMode = "autoEdit" /* AUTO_EDIT */;
8351
8335
  break;
8352
8336
  case "plan":
8353
8337
  if (!(settings.general?.plan?.enabled ?? true)) {
8354
8338
  debugLogger.warn(
8355
8339
  'Approval mode "plan" is disabled in your settings. Falling back to "default".'
8356
8340
  );
8357
- approvalMode = ApprovalMode.DEFAULT;
8341
+ approvalMode = "default" /* DEFAULT */;
8358
8342
  } else {
8359
- approvalMode = ApprovalMode.PLAN;
8343
+ approvalMode = "plan" /* PLAN */;
8360
8344
  }
8361
8345
  break;
8362
8346
  case "default":
8363
- approvalMode = ApprovalMode.DEFAULT;
8347
+ approvalMode = "default" /* DEFAULT */;
8364
8348
  break;
8365
8349
  default:
8366
8350
  throw new Error(
@@ -8368,10 +8352,10 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8368
8352
  );
8369
8353
  }
8370
8354
  } else {
8371
- approvalMode = ApprovalMode.DEFAULT;
8355
+ approvalMode = "default" /* DEFAULT */;
8372
8356
  }
8373
8357
  if (settings.security?.disableYoloMode || settings.admin?.secureModeEnabled) {
8374
- if (approvalMode === ApprovalMode.YOLO) {
8358
+ if (approvalMode === "yolo" /* YOLO */) {
8375
8359
  if (settings.admin?.secureModeEnabled) {
8376
8360
  debugLogger.error(
8377
8361
  'YOLO mode is disabled by "secureModeEnabled" setting.'
@@ -8389,16 +8373,16 @@ async function loadCliConfig(settings, sessionId, argv, options = {}) {
8389
8373
  )
8390
8374
  );
8391
8375
  }
8392
- } else if (approvalMode === ApprovalMode.YOLO) {
8376
+ } else if (approvalMode === "yolo" /* YOLO */) {
8393
8377
  debugLogger.warn(
8394
8378
  "YOLO mode is enabled. All tool calls will be automatically approved."
8395
8379
  );
8396
8380
  }
8397
- if (!trustedFolder && approvalMode !== ApprovalMode.DEFAULT) {
8381
+ if (!trustedFolder && approvalMode !== "default" /* DEFAULT */) {
8398
8382
  debugLogger.warn(
8399
8383
  `Approval mode overridden to "default" because the current folder is not trusted.`
8400
8384
  );
8401
- approvalMode = ApprovalMode.DEFAULT;
8385
+ approvalMode = "default" /* DEFAULT */;
8402
8386
  }
8403
8387
  let telemetrySettings;
8404
8388
  try {
@@ -11099,7 +11083,7 @@ import path10 from "node:path";
11099
11083
  import process4 from "node:process";
11100
11084
  var homeDirectoryCheck = {
11101
11085
  id: "home-directory",
11102
- priority: WarningPriority.Low,
11086
+ priority: "low" /* Low */,
11103
11087
  check: async (workspaceRoot, settings) => {
11104
11088
  if (settings.ui?.showHomeDirectoryWarning === false) {
11105
11089
  return null;
@@ -11123,7 +11107,7 @@ var homeDirectoryCheck = {
11123
11107
  };
11124
11108
  var rootDirectoryCheck = {
11125
11109
  id: "root-directory",
11126
- priority: WarningPriority.High,
11110
+ priority: "high" /* High */,
11127
11111
  check: async (workspaceRoot, _settings) => {
11128
11112
  try {
11129
11113
  const workspaceRealPath = await fs9.realpath(workspaceRoot);
@@ -11139,7 +11123,7 @@ var rootDirectoryCheck = {
11139
11123
  };
11140
11124
  var folderTrustCheck = {
11141
11125
  id: "folder-trust",
11142
- priority: WarningPriority.High,
11126
+ priority: "high" /* High */,
11143
11127
  check: async (workspaceRoot, settings) => {
11144
11128
  if (!isFolderTrustEnabled(settings)) {
11145
11129
  return null;
@@ -11329,12 +11313,12 @@ function handleError(error, config, customErrorCode) {
11329
11313
  error,
11330
11314
  config.getContentGeneratorConfig()?.authType
11331
11315
  );
11332
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
11316
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
11333
11317
  const streamFormatter = new StreamJsonFormatter();
11334
11318
  const errorCode = customErrorCode ?? extractErrorCode(error);
11335
11319
  const metrics = uiTelemetryService.getMetrics();
11336
11320
  streamFormatter.emitEvent({
11337
- type: JsonStreamEventType.RESULT,
11321
+ type: "result" /* RESULT */,
11338
11322
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11339
11323
  status: "error",
11340
11324
  error: {
@@ -11345,7 +11329,7 @@ function handleError(error, config, customErrorCode) {
11345
11329
  });
11346
11330
  runSyncCleanup();
11347
11331
  process.exit(getNumericExitCode(errorCode));
11348
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11332
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11349
11333
  const formatter = new JsonFormatter();
11350
11334
  const errorCode = customErrorCode ?? extractErrorCode(error);
11351
11335
  const formattedError = formatter.formatError(
@@ -11365,11 +11349,11 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
11365
11349
  const isFatal = isFatalToolError(errorType);
11366
11350
  if (isFatal) {
11367
11351
  const toolExecutionError = new FatalToolExecutionError(errorMessage);
11368
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
11352
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
11369
11353
  const streamFormatter = new StreamJsonFormatter();
11370
11354
  const metrics = uiTelemetryService.getMetrics();
11371
11355
  streamFormatter.emitEvent({
11372
- type: JsonStreamEventType.RESULT,
11356
+ type: "result" /* RESULT */,
11373
11357
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11374
11358
  status: "error",
11375
11359
  error: {
@@ -11378,7 +11362,7 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
11378
11362
  },
11379
11363
  stats: streamFormatter.convertToStreamStats(metrics, 0)
11380
11364
  });
11381
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11365
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11382
11366
  const formatter = new JsonFormatter();
11383
11367
  const formattedError = formatter.formatError(
11384
11368
  toolExecutionError,
@@ -11396,11 +11380,11 @@ function handleToolError(toolName, toolError, config, errorType, resultDisplay)
11396
11380
  }
11397
11381
  function handleCancellationError(config) {
11398
11382
  const cancellationError = new FatalCancellationError("Operation cancelled.");
11399
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
11383
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
11400
11384
  const streamFormatter = new StreamJsonFormatter();
11401
11385
  const metrics = uiTelemetryService.getMetrics();
11402
11386
  streamFormatter.emitEvent({
11403
- type: JsonStreamEventType.RESULT,
11387
+ type: "result" /* RESULT */,
11404
11388
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11405
11389
  status: "error",
11406
11390
  error: {
@@ -11411,7 +11395,7 @@ function handleCancellationError(config) {
11411
11395
  });
11412
11396
  runSyncCleanup();
11413
11397
  process.exit(cancellationError.exitCode);
11414
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11398
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11415
11399
  const formatter = new JsonFormatter();
11416
11400
  const formattedError = formatter.formatError(
11417
11401
  cancellationError,
@@ -11431,11 +11415,11 @@ function handleMaxTurnsExceededError(config) {
11431
11415
  const maxTurnsError = new FatalTurnLimitedError(
11432
11416
  "Reached max session turns for this session. Increase the number of turns by specifying maxSessionTurns in settings.json."
11433
11417
  );
11434
- if (config.getOutputFormat() === OutputFormat.STREAM_JSON) {
11418
+ if (config.getOutputFormat() === "stream-json" /* STREAM_JSON */) {
11435
11419
  const streamFormatter = new StreamJsonFormatter();
11436
11420
  const metrics = uiTelemetryService.getMetrics();
11437
11421
  streamFormatter.emitEvent({
11438
- type: JsonStreamEventType.RESULT,
11422
+ type: "result" /* RESULT */,
11439
11423
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11440
11424
  status: "error",
11441
11425
  error: {
@@ -11446,7 +11430,7 @@ function handleMaxTurnsExceededError(config) {
11446
11430
  });
11447
11431
  runSyncCleanup();
11448
11432
  process.exit(maxTurnsError.exitCode);
11449
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11433
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11450
11434
  const formatter = new JsonFormatter();
11451
11435
  const formattedError = formatter.formatError(
11452
11436
  maxTurnsError,
@@ -11526,7 +11510,7 @@ async function runNonInteractive({
11526
11510
  }
11527
11511
  });
11528
11512
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11529
- const { setupInitialActivityLogger } = await import("./devtoolsService-HLTYHXUC.js");
11513
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ZWL6J2QQ.js");
11530
11514
  setupInitialActivityLogger(config);
11531
11515
  }
11532
11516
  const { stdout: workingStdout } = createWorkingStdio();
@@ -11542,7 +11526,7 @@ async function runNonInteractive({
11542
11526
  }
11543
11527
  };
11544
11528
  const startTime = Date.now();
11545
- const streamFormatter = config.getOutputFormat() === OutputFormat.STREAM_JSON ? new StreamJsonFormatter() : null;
11529
+ const streamFormatter = config.getOutputFormat() === "stream-json" /* STREAM_JSON */ ? new StreamJsonFormatter() : null;
11546
11530
  const abortController = new AbortController();
11547
11531
  let isAborting = false;
11548
11532
  let cancelMessageTimer = null;
@@ -11595,13 +11579,13 @@ async function runNonInteractive({
11595
11579
  };
11596
11580
  try {
11597
11581
  consolePatcher.patch();
11598
- if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === OutputFormat.TEXT) {
11582
+ if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === "text" /* TEXT */) {
11599
11583
  process.stderr.write(
11600
11584
  "[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"
11601
11585
  );
11602
11586
  }
11603
11587
  setupStdinCancellation();
11604
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
11588
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
11605
11589
  coreEvents.drainBacklogs();
11606
11590
  process.stdout.on("error", (err) => {
11607
11591
  if (err.code === "EPIPE") {
@@ -11627,7 +11611,7 @@ async function runNonInteractive({
11627
11611
  }
11628
11612
  if (streamFormatter) {
11629
11613
  streamFormatter.emitEvent({
11630
- type: JsonStreamEventType.INIT,
11614
+ type: "init" /* INIT */,
11631
11615
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11632
11616
  session_id: config.getSessionId(),
11633
11617
  model: config.getModel()
@@ -11665,7 +11649,7 @@ async function runNonInteractive({
11665
11649
  }
11666
11650
  if (streamFormatter) {
11667
11651
  streamFormatter.emitEvent({
11668
- type: JsonStreamEventType.MESSAGE,
11652
+ type: "message" /* MESSAGE */,
11669
11653
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11670
11654
  role: "user",
11671
11655
  content: input
@@ -11704,12 +11688,12 @@ async function runNonInteractive({
11704
11688
  const metrics = uiTelemetryService.getMetrics();
11705
11689
  const durationMs = Date.now() - startTime;
11706
11690
  streamFormatter.emitEvent({
11707
- type: JsonStreamEventType.RESULT,
11691
+ type: "result" /* RESULT */,
11708
11692
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11709
11693
  status: errorPayload ? "error" : "success",
11710
11694
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
11711
11695
  });
11712
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11696
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11713
11697
  const formatter = new JsonFormatter();
11714
11698
  const stats = uiTelemetryService.getMetrics();
11715
11699
  textOutput.write(
@@ -11802,13 +11786,13 @@ async function runNonInteractive({
11802
11786
  const output = isRaw ? part.text : stripAnsi(part.text);
11803
11787
  if (streamFormatter) {
11804
11788
  streamFormatter.emitEvent({
11805
- type: JsonStreamEventType.MESSAGE,
11789
+ type: "message" /* MESSAGE */,
11806
11790
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11807
11791
  role: "assistant",
11808
11792
  content: output,
11809
11793
  delta: true
11810
11794
  });
11811
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
11795
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
11812
11796
  responseText += output;
11813
11797
  } else {
11814
11798
  if (part.text) {
@@ -11821,13 +11805,13 @@ async function runNonInteractive({
11821
11805
  break;
11822
11806
  }
11823
11807
  case "tool_request": {
11824
- if (config.getOutputFormat() === OutputFormat.JSON) {
11808
+ if (config.getOutputFormat() === "json" /* JSON */) {
11825
11809
  preToolResponseText = responseText || preToolResponseText;
11826
11810
  responseText = "";
11827
11811
  }
11828
11812
  if (streamFormatter) {
11829
11813
  streamFormatter.emitEvent({
11830
- type: JsonStreamEventType.TOOL_USE,
11814
+ type: "tool_use" /* TOOL_USE */,
11831
11815
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11832
11816
  tool_name: event.name,
11833
11817
  tool_id: event.requestId,
@@ -11843,7 +11827,7 @@ async function runNonInteractive({
11843
11827
  const displayText = displayContentToString(display);
11844
11828
  const errorMsg = getTextContent(event.content) ?? "Tool error";
11845
11829
  streamFormatter.emitEvent({
11846
- type: JsonStreamEventType.TOOL_RESULT,
11830
+ type: "tool_result" /* TOOL_RESULT */,
11847
11831
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11848
11832
  tool_id: event.requestId,
11849
11833
  status: event.isError ? "error" : "success",
@@ -11858,17 +11842,17 @@ async function runNonInteractive({
11858
11842
  const display = event.display?.result;
11859
11843
  const displayText = displayContentToString(display);
11860
11844
  const errorMsg = getTextContent(event.content) ?? "Tool error";
11861
- if (event.data?.["errorType"] === ToolErrorType.STOP_EXECUTION) {
11862
- if (config.getOutputFormat() === OutputFormat.JSON && !responseText && preToolResponseText) {
11845
+ if (event.data?.["errorType"] === "stop_execution" /* STOP_EXECUTION */) {
11846
+ if (config.getOutputFormat() === "json" /* JSON */ && !responseText && preToolResponseText) {
11863
11847
  responseText = preToolResponseText;
11864
11848
  }
11865
11849
  const stopMessage = `Agent execution stopped: ${errorMsg}`;
11866
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11850
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11867
11851
  process.stderr.write(`${stopMessage}
11868
11852
  `);
11869
11853
  }
11870
11854
  }
11871
- if (event.data?.["errorType"] === ToolErrorType.NO_SPACE_LEFT) {
11855
+ if (event.data?.["errorType"] === "no_space_left" /* NO_SPACE_LEFT */) {
11872
11856
  throw new FatalToolExecutionError(
11873
11857
  "Error executing tool " + event.name + ": " + (displayText || errorMsg)
11874
11858
  );
@@ -11903,12 +11887,12 @@ async function runNonInteractive({
11903
11887
  }
11904
11888
  if (streamFormatter) {
11905
11889
  streamFormatter.emitEvent({
11906
- type: JsonStreamEventType.ERROR,
11890
+ type: "error" /* ERROR */,
11907
11891
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11908
11892
  severity: "error",
11909
11893
  message: errorMessage
11910
11894
  });
11911
- } else if (config.getOutputFormat() === OutputFormat.TEXT) {
11895
+ } else if (config.getOutputFormat() === "text" /* TEXT */) {
11912
11896
  process.stderr.write(`[ERROR] ${errorMessage}
11913
11897
  `);
11914
11898
  }
@@ -11929,12 +11913,12 @@ async function runNonInteractive({
11929
11913
  const errorCode = event._meta?.["code"];
11930
11914
  if (errorCode === "AGENT_EXECUTION_BLOCKED") {
11931
11915
  const blockMessage = `Agent execution blocked: ${event.message.trim()}`;
11932
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11916
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11933
11917
  process.stderr.write(`[WARNING] ${blockMessage}
11934
11918
  `);
11935
11919
  } else if (streamFormatter) {
11936
11920
  streamFormatter.emitEvent({
11937
- type: JsonStreamEventType.ERROR,
11921
+ type: "error" /* ERROR */,
11938
11922
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11939
11923
  severity: "warning",
11940
11924
  message: stripAnsi(blockMessage)
@@ -11944,13 +11928,13 @@ async function runNonInteractive({
11944
11928
  break;
11945
11929
  }
11946
11930
  const severity = event.status === "RESOURCE_EXHAUSTED" ? "error" : "warning";
11947
- if (config.getOutputFormat() === OutputFormat.TEXT) {
11931
+ if (config.getOutputFormat() === "text" /* TEXT */) {
11948
11932
  process.stderr.write(`[WARNING] ${event.message}
11949
11933
  `);
11950
11934
  }
11951
11935
  if (streamFormatter) {
11952
11936
  streamFormatter.emitEvent({
11953
- type: JsonStreamEventType.ERROR,
11937
+ type: "error" /* ERROR */,
11954
11938
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11955
11939
  severity,
11956
11940
  message: stripAnsi(event.message)
@@ -11970,7 +11954,7 @@ async function runNonInteractive({
11970
11954
  );
11971
11955
  } else if (streamFormatter) {
11972
11956
  streamFormatter.emitEvent({
11973
- type: JsonStreamEventType.ERROR,
11957
+ type: "error" /* ERROR */,
11974
11958
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
11975
11959
  severity: "error",
11976
11960
  message: "Maximum session turns exceeded"
@@ -11978,7 +11962,7 @@ async function runNonInteractive({
11978
11962
  }
11979
11963
  }
11980
11964
  const stopMessage = typeof event.data?.["message"] === "string" ? event.data["message"] : "";
11981
- if (stopMessage && config.getOutputFormat() === OutputFormat.TEXT) {
11965
+ if (stopMessage && config.getOutputFormat() === "text" /* TEXT */) {
11982
11966
  process.stderr.write(`Agent execution stopped: ${stopMessage}
11983
11967
  `);
11984
11968
  }
@@ -12008,7 +11992,7 @@ async function runNonInteractive({
12008
11992
  abortController.signal.removeEventListener("abort", abortSession);
12009
11993
  scheduler?.dispose();
12010
11994
  consolePatcher.cleanup();
12011
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
11995
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
12012
11996
  }
12013
11997
  if (errorToHandle) {
12014
11998
  handleError(errorToHandle, config);
@@ -12036,7 +12020,7 @@ async function runNonInteractive2(params) {
12036
12020
  }
12037
12021
  });
12038
12022
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
12039
- const { setupInitialActivityLogger } = await import("./devtoolsService-HLTYHXUC.js");
12023
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ZWL6J2QQ.js");
12040
12024
  setupInitialActivityLogger(config);
12041
12025
  }
12042
12026
  const { stdout: workingStdout } = createWorkingStdio();
@@ -12052,7 +12036,7 @@ async function runNonInteractive2(params) {
12052
12036
  }
12053
12037
  };
12054
12038
  const startTime = Date.now();
12055
- const streamFormatter = config.getOutputFormat() === OutputFormat.STREAM_JSON ? new StreamJsonFormatter() : null;
12039
+ const streamFormatter = config.getOutputFormat() === "stream-json" /* STREAM_JSON */ ? new StreamJsonFormatter() : null;
12056
12040
  const abortController = new AbortController();
12057
12041
  let isAborting = false;
12058
12042
  let cancelMessageTimer = null;
@@ -12103,13 +12087,13 @@ async function runNonInteractive2(params) {
12103
12087
  let scheduler;
12104
12088
  try {
12105
12089
  consolePatcher.patch();
12106
- if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === OutputFormat.TEXT) {
12090
+ if (config.getRawOutput() && !config.getAcceptRawOutputRisk() && config.getOutputFormat() === "text" /* TEXT */) {
12107
12091
  process.stderr.write(
12108
12092
  "[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"
12109
12093
  );
12110
12094
  }
12111
12095
  setupStdinCancellation();
12112
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
12096
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
12113
12097
  coreEvents.drainBacklogs();
12114
12098
  process.stdout.on("error", (err) => {
12115
12099
  if (err.code === "EPIPE") {
@@ -12133,7 +12117,7 @@ async function runNonInteractive2(params) {
12133
12117
  }
12134
12118
  if (streamFormatter) {
12135
12119
  streamFormatter.emitEvent({
12136
- type: JsonStreamEventType.INIT,
12120
+ type: "init" /* INIT */,
12137
12121
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12138
12122
  session_id: config.getSessionId(),
12139
12123
  model: config.getModel()
@@ -12171,7 +12155,7 @@ async function runNonInteractive2(params) {
12171
12155
  }
12172
12156
  if (streamFormatter) {
12173
12157
  streamFormatter.emitEvent({
12174
- type: JsonStreamEventType.MESSAGE,
12158
+ type: "message" /* MESSAGE */,
12175
12159
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12176
12160
  role: "user",
12177
12161
  content: input
@@ -12199,28 +12183,28 @@ async function runNonInteractive2(params) {
12199
12183
  if (abortController.signal.aborted) {
12200
12184
  handleCancellationError(config);
12201
12185
  }
12202
- if (event.type === GeminiEventType.Content) {
12186
+ if (event.type === "content" /* Content */) {
12203
12187
  const isRaw = config.getRawOutput() || config.getAcceptRawOutputRisk();
12204
12188
  const output = isRaw ? event.value : stripAnsi(event.value);
12205
12189
  if (streamFormatter) {
12206
12190
  streamFormatter.emitEvent({
12207
- type: JsonStreamEventType.MESSAGE,
12191
+ type: "message" /* MESSAGE */,
12208
12192
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12209
12193
  role: "assistant",
12210
12194
  content: output,
12211
12195
  delta: true
12212
12196
  });
12213
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
12197
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
12214
12198
  responseText += output;
12215
12199
  } else {
12216
12200
  if (event.value) {
12217
12201
  textOutput.write(output);
12218
12202
  }
12219
12203
  }
12220
- } else if (event.type === GeminiEventType.ToolCallRequest) {
12204
+ } else if (event.type === "tool_call_request" /* ToolCallRequest */) {
12221
12205
  if (streamFormatter) {
12222
12206
  streamFormatter.emitEvent({
12223
- type: JsonStreamEventType.TOOL_USE,
12207
+ type: "tool_use" /* TOOL_USE */,
12224
12208
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12225
12209
  tool_name: event.value.name,
12226
12210
  tool_id: event.value.callId,
@@ -12228,33 +12212,33 @@ async function runNonInteractive2(params) {
12228
12212
  });
12229
12213
  }
12230
12214
  toolCallRequests.push(event.value);
12231
- } else if (event.type === GeminiEventType.LoopDetected) {
12215
+ } else if (event.type === "loop_detected" /* LoopDetected */) {
12232
12216
  const message = "Loop detected, stopping execution";
12233
12217
  if (streamFormatter) {
12234
12218
  streamFormatter.emitEvent({
12235
- type: JsonStreamEventType.ERROR,
12219
+ type: "error" /* ERROR */,
12236
12220
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12237
12221
  severity: "warning",
12238
12222
  message
12239
12223
  });
12240
12224
  }
12241
12225
  warnings.push(message);
12242
- } else if (event.type === GeminiEventType.MaxSessionTurns) {
12226
+ } else if (event.type === "max_session_turns" /* MaxSessionTurns */) {
12243
12227
  const message = "Maximum session turns exceeded";
12244
12228
  if (streamFormatter) {
12245
12229
  streamFormatter.emitEvent({
12246
- type: JsonStreamEventType.ERROR,
12230
+ type: "error" /* ERROR */,
12247
12231
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12248
12232
  severity: "error",
12249
12233
  message
12250
12234
  });
12251
12235
  }
12252
12236
  warnings.push(message);
12253
- } else if (event.type === GeminiEventType.Error) {
12237
+ } else if (event.type === "error" /* Error */) {
12254
12238
  throw event.value.error;
12255
- } else if (event.type === GeminiEventType.AgentExecutionStopped) {
12239
+ } else if (event.type === "agent_execution_stopped" /* AgentExecutionStopped */) {
12256
12240
  const stopMessage = `Agent execution stopped: ${event.value.systemMessage?.trim() || event.value.reason}`;
12257
- if (config.getOutputFormat() === OutputFormat.TEXT) {
12241
+ if (config.getOutputFormat() === "text" /* TEXT */) {
12258
12242
  process.stderr.write(`${stopMessage}
12259
12243
  `);
12260
12244
  }
@@ -12262,7 +12246,7 @@ async function runNonInteractive2(params) {
12262
12246
  const metrics = uiTelemetryService.getMetrics();
12263
12247
  const durationMs = Date.now() - startTime;
12264
12248
  streamFormatter.emitEvent({
12265
- type: JsonStreamEventType.RESULT,
12249
+ type: "result" /* RESULT */,
12266
12250
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12267
12251
  status: "success",
12268
12252
  stats: streamFormatter.convertToStreamStats(
@@ -12270,7 +12254,7 @@ async function runNonInteractive2(params) {
12270
12254
  durationMs
12271
12255
  )
12272
12256
  });
12273
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
12257
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
12274
12258
  const formatter = new JsonFormatter();
12275
12259
  const stats = uiTelemetryService.getMetrics();
12276
12260
  textOutput.write(
@@ -12286,21 +12270,21 @@ async function runNonInteractive2(params) {
12286
12270
  textOutput.ensureTrailingNewline();
12287
12271
  }
12288
12272
  return;
12289
- } else if (event.type === GeminiEventType.AgentExecutionBlocked) {
12273
+ } else if (event.type === "agent_execution_blocked" /* AgentExecutionBlocked */) {
12290
12274
  const blockMessage = `Agent execution blocked: ${event.value.systemMessage?.trim() || event.value.reason}`;
12291
- if (config.getOutputFormat() === OutputFormat.TEXT) {
12275
+ if (config.getOutputFormat() === "text" /* TEXT */) {
12292
12276
  process.stderr.write(`[WARNING] ${blockMessage}
12293
12277
  `);
12294
12278
  } else if (streamFormatter) {
12295
12279
  streamFormatter.emitEvent({
12296
- type: JsonStreamEventType.ERROR,
12280
+ type: "error" /* ERROR */,
12297
12281
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12298
12282
  severity: "warning",
12299
12283
  message: stripAnsi(blockMessage)
12300
12284
  });
12301
12285
  }
12302
12286
  warnings.push(blockMessage);
12303
- } else if (event.type === GeminiEventType.InvalidStream) {
12287
+ } else if (event.type === "invalid_stream" /* InvalidStream */) {
12304
12288
  const eventValue = event.value;
12305
12289
  if (eventValue?.type === "NO_RESPONSE_TEXT") {
12306
12290
  invalidStreamError = TRUE_EMPTY_RESPONSE_MESSAGE;
@@ -12323,12 +12307,12 @@ async function runNonInteractive2(params) {
12323
12307
  );
12324
12308
  if (streamFormatter) {
12325
12309
  streamFormatter.emitEvent({
12326
- type: JsonStreamEventType.ERROR,
12310
+ type: "error" /* ERROR */,
12327
12311
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12328
12312
  severity: "error",
12329
12313
  message: invalidStreamError
12330
12314
  });
12331
- } else if (config.getOutputFormat() === OutputFormat.TEXT) {
12315
+ } else if (config.getOutputFormat() === "text" /* TEXT */) {
12332
12316
  process.stderr.write(`[ERROR] ${invalidStreamError}
12333
12317
  `);
12334
12318
  }
@@ -12348,7 +12332,7 @@ async function runNonInteractive2(params) {
12348
12332
  const requestInfo = completedToolCall.request;
12349
12333
  if (streamFormatter) {
12350
12334
  streamFormatter.emitEvent({
12351
- type: JsonStreamEventType.TOOL_RESULT,
12335
+ type: "tool_result" /* TOOL_RESULT */,
12352
12336
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12353
12337
  tool_id: requestInfo.callId,
12354
12338
  status: completedToolCall.status === "error" ? "error" : "success",
@@ -12382,11 +12366,11 @@ async function runNonInteractive2(params) {
12382
12366
  );
12383
12367
  }
12384
12368
  const stopExecutionTool = completedToolCalls.find(
12385
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
12369
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
12386
12370
  );
12387
12371
  if (stopExecutionTool && stopExecutionTool.response.error) {
12388
12372
  const stopMessage = `Agent execution stopped: ${stopExecutionTool.response.error.message}`;
12389
- if (config.getOutputFormat() === OutputFormat.TEXT) {
12373
+ if (config.getOutputFormat() === "text" /* TEXT */) {
12390
12374
  process.stderr.write(`${stopMessage}
12391
12375
  `);
12392
12376
  }
@@ -12394,7 +12378,7 @@ async function runNonInteractive2(params) {
12394
12378
  const metrics = uiTelemetryService.getMetrics();
12395
12379
  const durationMs = Date.now() - startTime;
12396
12380
  streamFormatter.emitEvent({
12397
- type: JsonStreamEventType.RESULT,
12381
+ type: "result" /* RESULT */,
12398
12382
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12399
12383
  status: "success",
12400
12384
  stats: streamFormatter.convertToStreamStats(
@@ -12402,7 +12386,7 @@ async function runNonInteractive2(params) {
12402
12386
  durationMs
12403
12387
  )
12404
12388
  });
12405
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
12389
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
12406
12390
  const formatter = new JsonFormatter();
12407
12391
  const stats = uiTelemetryService.getMetrics();
12408
12392
  textOutput.write(
@@ -12425,12 +12409,12 @@ async function runNonInteractive2(params) {
12425
12409
  const metrics = uiTelemetryService.getMetrics();
12426
12410
  const durationMs = Date.now() - startTime;
12427
12411
  streamFormatter.emitEvent({
12428
- type: JsonStreamEventType.RESULT,
12412
+ type: "result" /* RESULT */,
12429
12413
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
12430
12414
  status: invalidStreamError ? "error" : "success",
12431
12415
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
12432
12416
  });
12433
- } else if (config.getOutputFormat() === OutputFormat.JSON) {
12417
+ } else if (config.getOutputFormat() === "json" /* JSON */) {
12434
12418
  const formatter = new JsonFormatter();
12435
12419
  const stats = uiTelemetryService.getMetrics();
12436
12420
  textOutput.write(
@@ -12454,7 +12438,7 @@ async function runNonInteractive2(params) {
12454
12438
  cleanupStdinCancellation();
12455
12439
  scheduler?.dispose();
12456
12440
  consolePatcher.cleanup();
12457
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
12441
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
12458
12442
  }
12459
12443
  if (errorToHandle) {
12460
12444
  handleError(errorToHandle, config);
@@ -14845,12 +14829,12 @@ function toToolCallContent(toolResult) {
14845
14829
  }
14846
14830
  var basicPermissionOptions = [
14847
14831
  {
14848
- optionId: ToolConfirmationOutcome.ProceedOnce,
14832
+ optionId: "proceed_once" /* ProceedOnce */,
14849
14833
  name: "Allow",
14850
14834
  kind: "allow_once"
14851
14835
  },
14852
14836
  {
14853
- optionId: ToolConfirmationOutcome.Cancel,
14837
+ optionId: "cancel" /* Cancel */,
14854
14838
  name: "Reject",
14855
14839
  kind: "reject_once"
14856
14840
  }
@@ -14862,13 +14846,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14862
14846
  switch (confirmation.type) {
14863
14847
  case "edit":
14864
14848
  options.push({
14865
- optionId: ToolConfirmationOutcome.ProceedAlways,
14849
+ optionId: "proceed_always" /* ProceedAlways */,
14866
14850
  name: "Allow for this session",
14867
14851
  kind: "allow_always"
14868
14852
  });
14869
14853
  if (enablePermanentToolApproval) {
14870
14854
  options.push({
14871
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14855
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14872
14856
  name: "Allow for this file in all future sessions",
14873
14857
  kind: "allow_always"
14874
14858
  });
@@ -14876,13 +14860,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14876
14860
  break;
14877
14861
  case "exec":
14878
14862
  options.push({
14879
- optionId: ToolConfirmationOutcome.ProceedAlways,
14863
+ optionId: "proceed_always" /* ProceedAlways */,
14880
14864
  name: "Allow for this session",
14881
14865
  kind: "allow_always"
14882
14866
  });
14883
14867
  if (enablePermanentToolApproval) {
14884
14868
  options.push({
14885
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14869
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14886
14870
  name: "Allow this command for all future sessions",
14887
14871
  kind: "allow_always"
14888
14872
  });
@@ -14891,19 +14875,19 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14891
14875
  case "mcp":
14892
14876
  options.push(
14893
14877
  {
14894
- optionId: ToolConfirmationOutcome.ProceedAlwaysServer,
14878
+ optionId: "proceed_always_server" /* ProceedAlwaysServer */,
14895
14879
  name: "Allow all server tools for this session",
14896
14880
  kind: "allow_always"
14897
14881
  },
14898
14882
  {
14899
- optionId: ToolConfirmationOutcome.ProceedAlwaysTool,
14883
+ optionId: "proceed_always_tool" /* ProceedAlwaysTool */,
14900
14884
  name: "Allow tool for this session",
14901
14885
  kind: "allow_always"
14902
14886
  }
14903
14887
  );
14904
14888
  if (enablePermanentToolApproval) {
14905
14889
  options.push({
14906
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14890
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14907
14891
  name: "Allow tool for all future sessions",
14908
14892
  kind: "allow_always"
14909
14893
  });
@@ -14911,13 +14895,13 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14911
14895
  break;
14912
14896
  case "info":
14913
14897
  options.push({
14914
- optionId: ToolConfirmationOutcome.ProceedAlways,
14898
+ optionId: "proceed_always" /* ProceedAlways */,
14915
14899
  name: "Allow for this session",
14916
14900
  kind: "allow_always"
14917
14901
  });
14918
14902
  if (enablePermanentToolApproval) {
14919
14903
  options.push({
14920
- optionId: ToolConfirmationOutcome.ProceedAlwaysAndSave,
14904
+ optionId: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
14921
14905
  name: "Allow for all future sessions",
14922
14906
  kind: "allow_always"
14923
14907
  });
@@ -14949,21 +14933,21 @@ function toPermissionOptions(confirmation, config, enablePermanentToolApproval =
14949
14933
  }
14950
14934
  function toAcpToolKind(kind) {
14951
14935
  switch (kind) {
14952
- case Kind.Read:
14953
- case Kind.Edit:
14954
- case Kind.Execute:
14955
- case Kind.Search:
14956
- case Kind.Delete:
14957
- case Kind.Move:
14958
- case Kind.Think:
14959
- case Kind.Fetch:
14960
- case Kind.SwitchMode:
14961
- case Kind.Other:
14936
+ case "read" /* Read */:
14937
+ case "edit" /* Edit */:
14938
+ case "execute" /* Execute */:
14939
+ case "search" /* Search */:
14940
+ case "delete" /* Delete */:
14941
+ case "move" /* Move */:
14942
+ case "think" /* Think */:
14943
+ case "fetch" /* Fetch */:
14944
+ case "switch_mode" /* SwitchMode */:
14945
+ case "other" /* Other */:
14962
14946
  return kind;
14963
- case Kind.Agent:
14947
+ case "agent" /* Agent */:
14964
14948
  return "think";
14965
- case Kind.Plan:
14966
- case Kind.Communicate:
14949
+ case "plan" /* Plan */:
14950
+ case "communicate" /* Communicate */:
14967
14951
  default:
14968
14952
  return "other";
14969
14953
  }
@@ -14971,24 +14955,24 @@ function toAcpToolKind(kind) {
14971
14955
  function buildAvailableModes(isPlanEnabled) {
14972
14956
  const modes = [
14973
14957
  {
14974
- id: ApprovalMode.DEFAULT,
14958
+ id: "default" /* DEFAULT */,
14975
14959
  name: "Default",
14976
14960
  description: "Prompts for approval"
14977
14961
  },
14978
14962
  {
14979
- id: ApprovalMode.AUTO_EDIT,
14963
+ id: "autoEdit" /* AUTO_EDIT */,
14980
14964
  name: "Auto Edit",
14981
14965
  description: "Auto-approves edit tools"
14982
14966
  },
14983
14967
  {
14984
- id: ApprovalMode.YOLO,
14968
+ id: "yolo" /* YOLO */,
14985
14969
  name: "YOLO",
14986
14970
  description: "Auto-approves all tools"
14987
14971
  }
14988
14972
  ];
14989
14973
  if (isPlanEnabled) {
14990
14974
  modes.push({
14991
- id: ApprovalMode.PLAN,
14975
+ id: "plan" /* PLAN */,
14992
14976
  name: "Plan",
14993
14977
  description: "Read-only mode"
14994
14978
  });
@@ -15002,7 +14986,7 @@ function buildAvailableModels(config, settings) {
15002
14986
  const useLatestFlash = config.hasLatestFlashGAAccess?.() ?? false;
15003
14987
  const useLatestFlashLite = config.hasLatestFlashLiteGAAccess?.() ?? false;
15004
14988
  const selectedAuthType = settings.merged.security.auth.selectedType;
15005
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
14989
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
15006
14990
  if (config.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
15007
14991
  const options = config.getModelConfigService().getAvailableModelOptions({
15008
14992
  useGemini3_1: useGemini31,
@@ -15089,11 +15073,11 @@ var Session = class {
15089
15073
  this.connection = connection;
15090
15074
  this.settings = settings;
15091
15075
  coreEvents.on(
15092
- CoreEvent.ApprovalModeChanged,
15076
+ "approval-mode-changed" /* ApprovalModeChanged */,
15093
15077
  this.handleApprovalModeChanged
15094
15078
  );
15095
15079
  this.context.config.getMessageBus()?.subscribe(
15096
- MessageBusType.TOOL_CONFIRMATION_REQUEST,
15080
+ "tool-confirmation-request" /* TOOL_CONFIRMATION_REQUEST */,
15097
15081
  this.handleToolConfirmationRequest,
15098
15082
  { signal: this.disposeController.signal }
15099
15083
  );
@@ -15117,7 +15101,7 @@ var Session = class {
15117
15101
  "Policy engine missing. Denying tool confirmation request."
15118
15102
  );
15119
15103
  await messageBus.publish({
15120
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
15104
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
15121
15105
  correlationId: request.correlationId,
15122
15106
  confirmed: false,
15123
15107
  requiresUserConfirmation: false
@@ -15130,7 +15114,7 @@ var Session = class {
15130
15114
  "Tool confirmation request missing tool name. Denying."
15131
15115
  );
15132
15116
  await messageBus.publish({
15133
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
15117
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
15134
15118
  correlationId: request.correlationId,
15135
15119
  confirmed: false,
15136
15120
  requiresUserConfirmation: false
@@ -15143,7 +15127,7 @@ var Session = class {
15143
15127
  `Tool confirmation request for unknown tool: ${toolName}. Denying.`
15144
15128
  );
15145
15129
  await messageBus.publish({
15146
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
15130
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
15147
15131
  correlationId: request.correlationId,
15148
15132
  confirmed: false,
15149
15133
  requiresUserConfirmation: false
@@ -15159,15 +15143,15 @@ var Session = class {
15159
15143
  request.subagent
15160
15144
  );
15161
15145
  await messageBus.publish({
15162
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
15146
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
15163
15147
  correlationId: request.correlationId,
15164
- confirmed: result.decision === PolicyDecision.ALLOW,
15165
- requiresUserConfirmation: result.decision === PolicyDecision.ASK_USER
15148
+ confirmed: result.decision === "allow" /* ALLOW */,
15149
+ requiresUserConfirmation: result.decision === "ask_user" /* ASK_USER */
15166
15150
  });
15167
15151
  } catch (error) {
15168
15152
  debugLogger.error("Error handling tool confirmation request:", error);
15169
15153
  await this.context.config.getMessageBus()?.publish({
15170
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
15154
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
15171
15155
  correlationId: request.correlationId,
15172
15156
  confirmed: false,
15173
15157
  requiresUserConfirmation: false
@@ -15187,7 +15171,7 @@ var Session = class {
15187
15171
  };
15188
15172
  dispose() {
15189
15173
  coreEvents.off(
15190
- CoreEvent.ApprovalModeChanged,
15174
+ "approval-mode-changed" /* ApprovalModeChanged */,
15191
15175
  this.handleApprovalModeChanged
15192
15176
  );
15193
15177
  this.disposeController.abort();
@@ -15276,7 +15260,7 @@ ${thought.description}`;
15276
15260
  await this.sendUpdate({
15277
15261
  sessionUpdate: "tool_call",
15278
15262
  toolCallId: toolCall.id,
15279
- status: toolCall.status === CoreToolCallStatus.Success ? "completed" : "failed",
15263
+ status: toolCall.status === "success" /* Success */ ? "completed" : "failed",
15280
15264
  title: toolCall.displayName || toolCall.name,
15281
15265
  content: toolCallContent,
15282
15266
  kind: tool ? toAcpToolKind(tool.kind) : "other"
@@ -15368,7 +15352,7 @@ ${thought.description}`;
15368
15352
  return { stopReason: "cancelled" };
15369
15353
  }
15370
15354
  switch (event.type) {
15371
- case GeminiEventType.Content: {
15355
+ case "content" /* Content */: {
15372
15356
  const content = {
15373
15357
  type: "text",
15374
15358
  text: event.value
@@ -15379,7 +15363,7 @@ ${thought.description}`;
15379
15363
  });
15380
15364
  break;
15381
15365
  }
15382
- case GeminiEventType.Thought: {
15366
+ case "thought" /* Thought */: {
15383
15367
  const thoughtText = `**${event.value.subject}**
15384
15368
  ${event.value.description}`;
15385
15369
  await this.sendUpdate({
@@ -15388,10 +15372,10 @@ ${event.value.description}`;
15388
15372
  });
15389
15373
  break;
15390
15374
  }
15391
- case GeminiEventType.ToolCallRequest:
15375
+ case "tool_call_request" /* ToolCallRequest */:
15392
15376
  toolCallRequests.push(event.value);
15393
15377
  break;
15394
- case GeminiEventType.Finished: {
15378
+ case "finished" /* Finished */: {
15395
15379
  const usage2 = event.value.usageMetadata;
15396
15380
  if (usage2) {
15397
15381
  turnInputTokens = usage2.promptTokenCount ?? turnInputTokens;
@@ -15399,19 +15383,19 @@ ${event.value.description}`;
15399
15383
  }
15400
15384
  break;
15401
15385
  }
15402
- case GeminiEventType.ModelInfo:
15386
+ case "model_info" /* ModelInfo */:
15403
15387
  turnModelId = event.value;
15404
15388
  break;
15405
- case GeminiEventType.MaxSessionTurns:
15389
+ case "max_session_turns" /* MaxSessionTurns */:
15406
15390
  stopReason = "max_turn_requests";
15407
15391
  break;
15408
- case GeminiEventType.LoopDetected:
15392
+ case "loop_detected" /* LoopDetected */:
15409
15393
  stopReason = "max_turn_requests";
15410
15394
  break;
15411
- case GeminiEventType.ContextWindowWillOverflow:
15395
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
15412
15396
  stopReason = "max_tokens";
15413
15397
  break;
15414
- case GeminiEventType.Error: {
15398
+ case "error" /* Error */: {
15415
15399
  const parseResult = StructuredErrorSchema.safeParse(
15416
15400
  event.value.error
15417
15401
  );
@@ -15648,7 +15632,7 @@ ${event.value.description}`;
15648
15632
  const output = RequestPermissionResponseSchema.parse(
15649
15633
  await this.connection.requestPermission(params)
15650
15634
  );
15651
- const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15635
+ const outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15652
15636
  await confirmationDetails.onConfirm(outcome);
15653
15637
  await updatePolicy(
15654
15638
  tool,
@@ -15659,7 +15643,7 @@ ${event.value.description}`;
15659
15643
  invocation
15660
15644
  );
15661
15645
  switch (outcome) {
15662
- case ToolConfirmationOutcome.Cancel: {
15646
+ case "cancel" /* Cancel */: {
15663
15647
  const cancelError = new Error(
15664
15648
  `Tool "${fc.name}" was canceled by the user.`
15665
15649
  );
@@ -15677,12 +15661,12 @@ ${event.value.description}`;
15677
15661
  });
15678
15662
  return errorResponse(cancelError);
15679
15663
  }
15680
- case ToolConfirmationOutcome.ProceedOnce:
15681
- case ToolConfirmationOutcome.ProceedAlways:
15682
- case ToolConfirmationOutcome.ProceedAlwaysAndSave:
15683
- case ToolConfirmationOutcome.ProceedAlwaysServer:
15684
- case ToolConfirmationOutcome.ProceedAlwaysTool:
15685
- case ToolConfirmationOutcome.ModifyWithEditor:
15664
+ case "proceed_once" /* ProceedOnce */:
15665
+ case "proceed_always" /* ProceedAlways */:
15666
+ case "proceed_always_and_save" /* ProceedAlwaysAndSave */:
15667
+ case "proceed_always_server" /* ProceedAlwaysServer */:
15668
+ case "proceed_always_tool" /* ProceedAlwaysTool */:
15669
+ case "modify_with_editor" /* ModifyWithEditor */:
15686
15670
  break;
15687
15671
  default: {
15688
15672
  const resultOutcome = outcome;
@@ -15736,7 +15720,7 @@ ${event.value.description}`;
15736
15720
  );
15737
15721
  this.chat.recordCompletedToolCalls(this.context.config.getActiveModel(), [
15738
15722
  {
15739
- status: CoreToolCallStatus.Success,
15723
+ status: "success" /* Success */,
15740
15724
  request: {
15741
15725
  callId,
15742
15726
  name: fc.name,
@@ -15781,7 +15765,7 @@ ${event.value.description}`;
15781
15765
  });
15782
15766
  this.chat.recordCompletedToolCalls(this.context.config.getActiveModel(), [
15783
15767
  {
15784
- status: CoreToolCallStatus.Error,
15768
+ status: "error" /* Error */,
15785
15769
  request: {
15786
15770
  callId,
15787
15771
  name: fc.name,
@@ -15909,12 +15893,12 @@ ${event.value.description}`;
15909
15893
  sessionId: this.id,
15910
15894
  options: [
15911
15895
  {
15912
- optionId: ToolConfirmationOutcome.ProceedOnce,
15896
+ optionId: "proceed_once" /* ProceedOnce */,
15913
15897
  name: "Allow once",
15914
15898
  kind: "allow_once"
15915
15899
  },
15916
15900
  {
15917
- optionId: ToolConfirmationOutcome.Cancel,
15901
+ optionId: "cancel" /* Cancel */,
15918
15902
  name: "Deny",
15919
15903
  kind: "reject_once"
15920
15904
  }
@@ -15939,8 +15923,8 @@ ${event.value.description}`;
15939
15923
  const output = RequestPermissionResponseSchema.parse(
15940
15924
  await this.connection.requestPermission(params)
15941
15925
  );
15942
- const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15943
- if (outcome === ToolConfirmationOutcome.ProceedOnce) {
15926
+ const outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
15927
+ if (outcome === "proceed_once" /* ProceedOnce */) {
15944
15928
  this.context.config.getWorkspaceContext().addReadOnlyPath(absolutePath);
15945
15929
  validationError = null;
15946
15930
  } else {
@@ -16378,7 +16362,7 @@ var AcpSessionManager = class {
16378
16362
  mcpServers,
16379
16363
  loadedSettings
16380
16364
  );
16381
- const authType = loadedSettings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? AuthType.GATEWAY : AuthType.USE_GEMINI);
16365
+ const authType = loadedSettings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? "gateway" /* GATEWAY */ : "gemini-api-key" /* USE_GEMINI */);
16382
16366
  let isAuthenticated = false;
16383
16367
  let authErrorMessage = "";
16384
16368
  try {
@@ -16390,7 +16374,7 @@ var AcpSessionManager = class {
16390
16374
  );
16391
16375
  isAuthenticated = true;
16392
16376
  const contentGeneratorConfig = config.getContentGeneratorConfig();
16393
- if (authType === AuthType.USE_GEMINI && (!contentGeneratorConfig || !contentGeneratorConfig.apiKey)) {
16377
+ if (authType === "gemini-api-key" /* USE_GEMINI */ && (!contentGeneratorConfig || !contentGeneratorConfig.apiKey)) {
16394
16378
  isAuthenticated = false;
16395
16379
  authErrorMessage = "Gemini API key is missing or not configured.";
16396
16380
  }
@@ -16502,7 +16486,7 @@ var AcpSessionManager = class {
16502
16486
  return response;
16503
16487
  }
16504
16488
  async prepareSessionConfig(sessionId, cwd, mcpServers, authDetails) {
16505
- const selectedAuthType = this.settings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? AuthType.GATEWAY : void 0);
16489
+ const selectedAuthType = this.settings.merged.security.auth.selectedType || (authDetails.baseUrl || process.env["GOOGLE_GEMINI_BASE_URL"] ? "gateway" /* GATEWAY */ : void 0);
16506
16490
  if (!selectedAuthType) {
16507
16491
  throw RequestError.authRequired();
16508
16492
  }
@@ -16600,12 +16584,12 @@ var GeminiAgent = class {
16600
16584
  }
16601
16585
  const authMethods = [
16602
16586
  {
16603
- id: AuthType.LOGIN_WITH_GOOGLE,
16587
+ id: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
16604
16588
  name: "Log in with Google",
16605
16589
  description: "Log in with your Google account"
16606
16590
  },
16607
16591
  {
16608
- id: AuthType.USE_GEMINI,
16592
+ id: "gemini-api-key" /* USE_GEMINI */,
16609
16593
  name: "Gemini API key",
16610
16594
  description: "Use an API key with Gemini Developer API",
16611
16595
  _meta: {
@@ -16615,12 +16599,12 @@ var GeminiAgent = class {
16615
16599
  }
16616
16600
  },
16617
16601
  {
16618
- id: AuthType.USE_VERTEX_AI,
16602
+ id: "vertex-ai" /* USE_VERTEX_AI */,
16619
16603
  name: "Vertex AI",
16620
16604
  description: "Use an API key with Vertex AI GenAI API"
16621
16605
  },
16622
16606
  {
16623
- id: AuthType.GATEWAY,
16607
+ id: "gateway" /* GATEWAY */,
16624
16608
  name: "AI API Gateway",
16625
16609
  description: "Use a custom AI API Gateway",
16626
16610
  _meta: {
@@ -16793,7 +16777,7 @@ async function validateNonInteractiveAuth(configuredAuthType, useExternalAuth, n
16793
16777
  }
16794
16778
  return authType;
16795
16779
  } catch (error) {
16796
- if (nonInteractiveConfig.getOutputFormat() === OutputFormat.JSON) {
16780
+ if (nonInteractiveConfig.getOutputFormat() === "json" /* JSON */) {
16797
16781
  handleError(
16798
16782
  error instanceof Error ? error : new Error(String(error)),
16799
16783
  nonInteractiveConfig,
@@ -16988,10 +16972,10 @@ var SlashCommandConflictHandler = class {
16988
16972
  this.handleConflicts = this.handleConflicts.bind(this);
16989
16973
  }
16990
16974
  start() {
16991
- coreEvents.on(CoreEvent.SlashCommandConflicts, this.handleConflicts);
16975
+ coreEvents.on("slash-command-conflicts" /* SlashCommandConflicts */, this.handleConflicts);
16992
16976
  }
16993
16977
  stop() {
16994
- coreEvents.off(CoreEvent.SlashCommandConflicts, this.handleConflicts);
16978
+ coreEvents.off("slash-command-conflicts" /* SlashCommandConflicts */, this.handleConflicts);
16995
16979
  if (this.flushTimeout) {
16996
16980
  clearTimeout(this.flushTimeout);
16997
16981
  this.flushTimeout = null;
@@ -17347,7 +17331,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
17347
17331
  }
17348
17332
  }
17349
17333
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
17350
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-5NAM6QNF.js");
17334
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-MDJW5F3B.js");
17351
17335
  await doStartUI(
17352
17336
  config,
17353
17337
  settings,
@@ -17450,12 +17434,12 @@ async function main() {
17450
17434
  dns.setDefaultResultOrder(
17451
17435
  validateDnsResolutionOrder(settings.merged.advanced.dnsResolutionOrder)
17452
17436
  );
17453
- if (!settings.merged.security.auth.selectedType || settings.merged.security.auth.selectedType === AuthType.LEGACY_CLOUD_SHELL) {
17437
+ if (!settings.merged.security.auth.selectedType || settings.merged.security.auth.selectedType === "cloud-shell" /* LEGACY_CLOUD_SHELL */) {
17454
17438
  if (process.env["CLOUD_SHELL"] === "true" || process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true") {
17455
17439
  settings.setValue(
17456
17440
  "User" /* User */,
17457
17441
  "security.auth.selectedType",
17458
- AuthType.COMPUTE_ADC
17442
+ "compute-default-credentials" /* COMPUTE_ADC */
17459
17443
  );
17460
17444
  }
17461
17445
  }
@@ -17556,7 +17540,7 @@ ${finalArgs[promptIndex + 1]}`;
17556
17540
  await config.storage.initialize();
17557
17541
  adminControlsListner.setConfig(config);
17558
17542
  if (config.isInteractive() && settings.merged.general.devtools) {
17559
- const { setupInitialActivityLogger } = await import("./devtoolsService-HLTYHXUC.js");
17543
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ZWL6J2QQ.js");
17560
17544
  setupInitialActivityLogger(config);
17561
17545
  }
17562
17546
  registerTelemetryConfig(config);
@@ -17564,7 +17548,7 @@ ${finalArgs[promptIndex + 1]}`;
17564
17548
  const messageBus = config.getMessageBus();
17565
17549
  createPolicyUpdater2(policyEngine, messageBus, config.storage);
17566
17550
  registerCleanup(async () => {
17567
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
17551
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
17568
17552
  });
17569
17553
  if (!config.getAcpMode()) {
17570
17554
  registerCleanup(consolePatcher.cleanup);
@@ -17615,7 +17599,7 @@ ${finalArgs[promptIndex + 1]}`;
17615
17599
  const initAppHandle = startupProfiler.start("initialize_app");
17616
17600
  const initializationResult = await initializeApp(config, settings);
17617
17601
  initAppHandle?.end();
17618
- import("./liteRtServerManager-DJ5BH4NI.js").then(({ LiteRtServerManager }) => {
17602
+ import("./liteRtServerManager-VF5GHIIE.js").then(({ LiteRtServerManager }) => {
17619
17603
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
17620
17604
  if (!mergedGemma) return;
17621
17605
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
@@ -17625,7 +17609,7 @@ ${finalArgs[promptIndex + 1]}`;
17625
17609
  autoStartServer: userGemma?.autoStartServer
17626
17610
  });
17627
17611
  }).catch((e) => debugLogger.warn("LiteRT auto-start import failed:", e));
17628
- if (settings.merged.security.auth.selectedType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
17612
+ if (settings.merged.security.auth.selectedType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
17629
17613
  await getOauthClient(settings.merged.security.auth.selectedType, config);
17630
17614
  }
17631
17615
  if (config.getAcpMode()) {
@@ -17641,7 +17625,7 @@ ${finalArgs[promptIndex + 1]}`;
17641
17625
  ...rawStartupWarnings.map((message) => ({
17642
17626
  id: `startup-${createHash2("sha256").update(message).digest("hex").substring(0, 16)}`,
17643
17627
  message,
17644
- priority: WarningPriority.High
17628
+ priority: "high" /* High */
17645
17629
  })),
17646
17630
  ...await getUserStartupWarnings(settings.merged, void 0, {
17647
17631
  isAlternateBuffer: useAlternateBuffer
@@ -17678,7 +17662,7 @@ ${finalArgs[promptIndex + 1]}`;
17678
17662
  ${input}` : stdinData;
17679
17663
  }
17680
17664
  }
17681
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
17665
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
17682
17666
  const hookSystem = config?.getHookSystem();
17683
17667
  if (hookSystem) {
17684
17668
  const result = await hookSystem.fireSessionStartEvent(sessionStartSource);
@@ -17735,8 +17719,8 @@ ${input}` : wrappedContext;
17735
17719
  }
17736
17720
  }
17737
17721
  function initializeOutputListenersAndFlush(config) {
17738
- if (coreEvents.listenerCount(CoreEvent.Output) === 0) {
17739
- coreEvents.on(CoreEvent.Output, (payload) => {
17722
+ if (coreEvents.listenerCount("output" /* Output */) === 0) {
17723
+ coreEvents.on("output" /* Output */, (payload) => {
17740
17724
  if (payload.isStderr) {
17741
17725
  writeToStderr(payload.chunk, payload.encoding);
17742
17726
  } else {
@@ -17744,8 +17728,8 @@ function initializeOutputListenersAndFlush(config) {
17744
17728
  }
17745
17729
  });
17746
17730
  }
17747
- if (coreEvents.listenerCount(CoreEvent.ConsoleLog) === 0) {
17748
- coreEvents.on(CoreEvent.ConsoleLog, (payload) => {
17731
+ if (coreEvents.listenerCount("console-log" /* ConsoleLog */) === 0) {
17732
+ coreEvents.on("console-log" /* ConsoleLog */, (payload) => {
17749
17733
  if (payload.type === "error" || payload.type === "warn") {
17750
17734
  writeToStderr(payload.content + "\n");
17751
17735
  } else {
@@ -17753,8 +17737,8 @@ function initializeOutputListenersAndFlush(config) {
17753
17737
  }
17754
17738
  });
17755
17739
  }
17756
- if (coreEvents.listenerCount(CoreEvent.UserFeedback) === 0) {
17757
- coreEvents.on(CoreEvent.UserFeedback, (payload) => {
17740
+ if (coreEvents.listenerCount("user-feedback" /* UserFeedback */) === 0) {
17741
+ coreEvents.on("user-feedback" /* UserFeedback */, (payload) => {
17758
17742
  writeToStderr(payload.message + "\n");
17759
17743
  });
17760
17744
  }
@@ -17762,7 +17746,7 @@ function initializeOutputListenersAndFlush(config) {
17762
17746
  const forceToStderr = outputFormat === "json";
17763
17747
  coreEvents.drainBacklogs(
17764
17748
  (event, args) => {
17765
- if (forceToStderr && event === CoreEvent.Output) {
17749
+ if (forceToStderr && event === "output" /* Output */) {
17766
17750
  const payload = args[0];
17767
17751
  if (!payload.isStderr) {
17768
17752
  return {