@google/gemini-cli-a2a-server 0.30.0-preview.0 → 0.30.0-preview.1

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.
@@ -122445,7 +122445,8 @@ var init_types8 = __esm({
122445
122445
  secureModeEnabled: external_exports.boolean().optional(),
122446
122446
  strictModeDisabled: external_exports.boolean().optional(),
122447
122447
  mcpSetting: McpSettingSchema.optional(),
122448
- cliFeatureSetting: CliFeatureSettingSchema.optional()
122448
+ cliFeatureSetting: CliFeatureSettingSchema.optional(),
122449
+ adminControlsApplicable: external_exports.boolean().optional()
122449
122450
  });
122450
122451
  }
122451
122452
  });
@@ -131101,7 +131102,7 @@ function getVersion() {
131101
131102
  }
131102
131103
  versionPromise = (async () => {
131103
131104
  const pkgJson = await getPackageJson(__dirname3);
131104
- return "0.30.0-preview.0";
131105
+ return "0.30.0-preview.1";
131105
131106
  })();
131106
131107
  return versionPromise;
131107
131108
  }
@@ -208501,8 +208502,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
208501
208502
  var init_git_commit = __esm({
208502
208503
  "packages/core/dist/src/generated/git-commit.js"() {
208503
208504
  "use strict";
208504
- GIT_COMMIT_INFO = "55c628e96";
208505
- CLI_VERSION = "0.30.0-preview.0";
208505
+ GIT_COMMIT_INFO = "0114b3e58";
208506
+ CLI_VERSION = "0.30.0-preview.1";
208506
208507
  }
208507
208508
  });
208508
208509
 
@@ -397286,16 +397287,13 @@ function sanitizeAdminSettings(settings) {
397286
397287
  }
397287
397288
  };
397288
397289
  }
397289
- function isGaxiosError(error2) {
397290
- return typeof error2 === "object" && error2 !== null && "status" in error2 && typeof error2.status === "number";
397291
- }
397292
397290
  async function fetchAdminControls(server, cachedSettings, adminControlsEnabled, onSettingsChanged) {
397293
397291
  if (!server || !server.projectId || !adminControlsEnabled) {
397294
397292
  stopAdminControlsPolling();
397295
397293
  currentSettings = void 0;
397296
397294
  return {};
397297
397295
  }
397298
- if (cachedSettings) {
397296
+ if (cachedSettings && Object.keys(cachedSettings).length !== 0) {
397299
397297
  currentSettings = cachedSettings;
397300
397298
  startAdminControlsPolling(server, server.projectId, onSettingsChanged);
397301
397299
  return cachedSettings;
@@ -397304,20 +397302,18 @@ async function fetchAdminControls(server, cachedSettings, adminControlsEnabled,
397304
397302
  const rawSettings = await server.fetchAdminControls({
397305
397303
  project: server.projectId
397306
397304
  });
397305
+ if (rawSettings.adminControlsApplicable !== true) {
397306
+ stopAdminControlsPolling();
397307
+ currentSettings = void 0;
397308
+ return {};
397309
+ }
397307
397310
  const sanitizedSettings = sanitizeAdminSettings(rawSettings);
397308
397311
  currentSettings = sanitizedSettings;
397309
397312
  startAdminControlsPolling(server, server.projectId, onSettingsChanged);
397310
397313
  return sanitizedSettings;
397311
397314
  } catch (e3) {
397312
- if (isGaxiosError(e3) && e3.status === 403) {
397313
- stopAdminControlsPolling();
397314
- currentSettings = void 0;
397315
- return {};
397316
- }
397317
397315
  debugLogger.error("Failed to fetch admin controls: ", e3);
397318
- currentSettings = {};
397319
- startAdminControlsPolling(server, server.projectId, onSettingsChanged);
397320
- return {};
397316
+ throw e3;
397321
397317
  }
397322
397318
  }
397323
397319
  async function fetchAdminControlsOnce(server, adminControlsEnabled) {
@@ -397328,13 +397324,13 @@ async function fetchAdminControlsOnce(server, adminControlsEnabled) {
397328
397324
  const rawSettings = await server.fetchAdminControls({
397329
397325
  project: server.projectId
397330
397326
  });
397331
- return sanitizeAdminSettings(rawSettings);
397332
- } catch (e3) {
397333
- if (isGaxiosError(e3) && e3.status === 403) {
397327
+ if (rawSettings.adminControlsApplicable !== true) {
397334
397328
  return {};
397335
397329
  }
397330
+ return sanitizeAdminSettings(rawSettings);
397331
+ } catch (e3) {
397336
397332
  debugLogger.error("Failed to fetch admin controls: ", e3 instanceof Error ? e3.message : e3);
397337
- return {};
397333
+ throw e3;
397338
397334
  }
397339
397335
  }
397340
397336
  function startAdminControlsPolling(server, project, onSettingsChanged) {
@@ -397344,17 +397340,17 @@ function startAdminControlsPolling(server, project, onSettingsChanged) {
397344
397340
  const rawSettings = await server.fetchAdminControls({
397345
397341
  project
397346
397342
  });
397343
+ if (rawSettings.adminControlsApplicable !== true) {
397344
+ stopAdminControlsPolling();
397345
+ currentSettings = void 0;
397346
+ return;
397347
+ }
397347
397348
  const newSettings = sanitizeAdminSettings(rawSettings);
397348
397349
  if (!isDeepStrictEqual(newSettings, currentSettings)) {
397349
397350
  currentSettings = newSettings;
397350
397351
  onSettingsChanged(newSettings);
397351
397352
  }
397352
397353
  } catch (e3) {
397353
- if (isGaxiosError(e3) && e3.status === 403) {
397354
- stopAdminControlsPolling();
397355
- currentSettings = void 0;
397356
- return;
397357
- }
397358
397354
  debugLogger.error("Failed to poll admin controls: ", e3);
397359
397355
  }
397360
397356
  }, 5 * 60 * 1e3);