@google/gemini-cli-a2a-server 0.41.0-nightly.20260428.gc17400b83 → 0.41.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.
@@ -115566,8 +115566,9 @@ var init_diffOptions = __esm({
115566
115566
 
115567
115567
  // packages/core/dist/src/config/models.js
115568
115568
  function resolveModel(requestedModel, useGemini3_1 = false, useGemini3_1FlashLite = false, useCustomToolModel = false, hasAccessToPreview = true, config3) {
115569
+ const normalizedModel = Array.isArray(requestedModel) ? String(requestedModel.at(-1) ?? "").trim() || "" : typeof requestedModel !== "string" ? String(requestedModel ?? "").trim() || "" : requestedModel.trim() || "";
115569
115570
  if (config3?.getExperimentalDynamicModelConfiguration?.() === true) {
115570
- const resolved2 = config3.modelConfigService.resolveModelId(requestedModel, {
115571
+ const resolved2 = config3.modelConfigService.resolveModelId(normalizedModel, {
115571
115572
  useGemini3_1,
115572
115573
  useGemini3_1FlashLite,
115573
115574
  useCustomTools: useCustomToolModel,
@@ -115585,7 +115586,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useGemini3_1FlashLit
115585
115586
  return resolved2;
115586
115587
  }
115587
115588
  let resolved;
115588
- switch (requestedModel) {
115589
+ switch (normalizedModel) {
115589
115590
  case PREVIEW_GEMINI_MODEL:
115590
115591
  case PREVIEW_GEMINI_MODEL_AUTO:
115591
115592
  case GEMINI_MODEL_ALIAS_AUTO:
@@ -115610,7 +115611,7 @@ function resolveModel(requestedModel, useGemini3_1 = false, useGemini3_1FlashLit
115610
115611
  break;
115611
115612
  }
115612
115613
  default: {
115613
- resolved = requestedModel;
115614
+ resolved = normalizedModel;
115614
115615
  break;
115615
115616
  }
115616
115617
  }
@@ -131409,7 +131410,7 @@ function makeChatCompressionEvent({ tokens_before, tokens_after }) {
131409
131410
  }
131410
131411
  };
131411
131412
  }
131412
- var EVENT_TOOL_CALL, ToolCallEvent, EVENT_API_REQUEST, ApiRequestEvent, EVENT_API_ERROR, ApiErrorEvent, EVENT_API_RESPONSE, EVENT_GEN_AI_OPERATION_DETAILS, ApiResponseEvent, EVENT_FLASH_FALLBACK, FlashFallbackEvent, EVENT_RIPGREP_FALLBACK, RipgrepFallbackEvent, LoopType, LoopDetectedEvent, LoopDetectionDisabledEvent, EVENT_NEXT_SPEAKER_CHECK, NextSpeakerCheckEvent, EVENT_CONSECA_POLICY_GENERATION, ConsecaPolicyGenerationEvent, EVENT_CONSECA_VERDICT, ConsecaVerdictEvent, SlashCommandStatus, EVENT_CHAT_COMPRESSION2, EVENT_MALFORMED_JSON_RESPONSE, MalformedJsonResponseEvent, IdeConnectionType, EVENT_FILE_OPERATION, FileOperationEvent, EVENT_INVALID_CHUNK, InvalidChunkEvent, EVENT_CONTENT_RETRY, ContentRetryEvent, EVENT_CONTENT_RETRY_FAILURE, EVENT_NETWORK_RETRY_ATTEMPT, NetworkRetryAttemptEvent, ContentRetryFailureEvent, EVENT_MODEL_ROUTING, ModelRoutingEvent, EVENT_TOOL_OUTPUT_TRUNCATED, ToolOutputTruncatedEvent, EVENT_TOOL_OUTPUT_MASKING, ToolOutputMaskingEvent, EVENT_LLM_LOOP_CHECK, LlmLoopCheckEvent, EVENT_EDIT_STRATEGY, EditStrategyEvent, EVENT_EDIT_CORRECTION, EditCorrectionEvent, EVENT_STARTUP_STATS, StartupStatsEvent, BaseAgentEvent, EVENT_AGENT_START, AgentStartEvent, EVENT_AGENT_FINISH, AgentFinishEvent, EVENT_AGENT_RECOVERY_ATTEMPT, RecoveryAttemptEvent, EVENT_WEB_FETCH_FALLBACK_ATTEMPT, WebFetchFallbackAttemptEvent, EVENT_HOOK_CALL, EVENT_APPROVAL_MODE_SWITCH, ApprovalModeSwitchEvent, EVENT_APPROVAL_MODE_DURATION, ApprovalModeDurationEvent, EVENT_PLAN_EXECUTION, PlanExecutionEvent, HookCallEvent, EVENT_KEYCHAIN_AVAILABILITY, KeychainAvailabilityEvent, EVENT_ONBOARDING_START2, OnboardingStartEvent, EVENT_ONBOARDING_SUCCESS2, OnboardingSuccessEvent, EVENT_TOKEN_STORAGE_INITIALIZATION, TokenStorageInitializationEvent;
131413
+ var EVENT_TOOL_CALL, TOOL_CALL_METADATA_SAFE_KEYS, ToolCallEvent, EVENT_API_REQUEST, ApiRequestEvent, EVENT_API_ERROR, ApiErrorEvent, EVENT_API_RESPONSE, EVENT_GEN_AI_OPERATION_DETAILS, ApiResponseEvent, EVENT_FLASH_FALLBACK, FlashFallbackEvent, EVENT_RIPGREP_FALLBACK, RipgrepFallbackEvent, LoopType, LoopDetectedEvent, LoopDetectionDisabledEvent, EVENT_NEXT_SPEAKER_CHECK, NextSpeakerCheckEvent, EVENT_CONSECA_POLICY_GENERATION, ConsecaPolicyGenerationEvent, EVENT_CONSECA_VERDICT, ConsecaVerdictEvent, SlashCommandStatus, EVENT_CHAT_COMPRESSION2, EVENT_MALFORMED_JSON_RESPONSE, MalformedJsonResponseEvent, IdeConnectionType, EVENT_FILE_OPERATION, FileOperationEvent, EVENT_INVALID_CHUNK, InvalidChunkEvent, EVENT_CONTENT_RETRY, ContentRetryEvent, EVENT_CONTENT_RETRY_FAILURE, EVENT_NETWORK_RETRY_ATTEMPT, NetworkRetryAttemptEvent, ContentRetryFailureEvent, EVENT_MODEL_ROUTING, ModelRoutingEvent, EVENT_TOOL_OUTPUT_TRUNCATED, ToolOutputTruncatedEvent, EVENT_TOOL_OUTPUT_MASKING, ToolOutputMaskingEvent, EVENT_LLM_LOOP_CHECK, LlmLoopCheckEvent, EVENT_EDIT_STRATEGY, EditStrategyEvent, EVENT_EDIT_CORRECTION, EditCorrectionEvent, EVENT_STARTUP_STATS, StartupStatsEvent, BaseAgentEvent, EVENT_AGENT_START, AgentStartEvent, EVENT_AGENT_FINISH, AgentFinishEvent, EVENT_AGENT_RECOVERY_ATTEMPT, RecoveryAttemptEvent, EVENT_WEB_FETCH_FALLBACK_ATTEMPT, WebFetchFallbackAttemptEvent, EVENT_HOOK_CALL, EVENT_APPROVAL_MODE_SWITCH, ApprovalModeSwitchEvent, EVENT_APPROVAL_MODE_DURATION, ApprovalModeDurationEvent, EVENT_PLAN_EXECUTION, PlanExecutionEvent, HookCallEvent, EVENT_KEYCHAIN_AVAILABILITY, KeychainAvailabilityEvent, EVENT_ONBOARDING_START2, OnboardingStartEvent, EVENT_ONBOARDING_SUCCESS2, OnboardingSuccessEvent, EVENT_TOKEN_STORAGE_INITIALIZATION, TokenStorageInitializationEvent;
131413
131414
  var init_types7 = __esm({
131414
131415
  "packages/core/dist/src/telemetry/types.js"() {
131415
131416
  "use strict";
@@ -131426,6 +131427,16 @@ var init_types7 = __esm({
131426
131427
  init_fileDiffUtils();
131427
131428
  init_llmRole();
131428
131429
  EVENT_TOOL_CALL = "gemini_cli.tool_call";
131430
+ TOOL_CALL_METADATA_SAFE_KEYS = [
131431
+ "model_added_lines",
131432
+ "model_removed_lines",
131433
+ "model_added_chars",
131434
+ "model_removed_chars",
131435
+ "user_added_lines",
131436
+ "user_removed_lines",
131437
+ "user_added_chars",
131438
+ "user_removed_chars"
131439
+ ];
131429
131440
  ToolCallEvent = class {
131430
131441
  "event.name";
131431
131442
  "event.timestamp";
@@ -131507,7 +131518,6 @@ var init_types7 = __esm({
131507
131518
  "event.name": EVENT_TOOL_CALL,
131508
131519
  "event.timestamp": this["event.timestamp"],
131509
131520
  function_name: this.function_name,
131510
- function_args: safeJsonStringify(this.function_args, 2),
131511
131521
  duration_ms: this.duration_ms,
131512
131522
  success: this.success,
131513
131523
  decision: this.decision,
@@ -131518,9 +131528,17 @@ var init_types7 = __esm({
131518
131528
  extension_name: this.extension_name,
131519
131529
  extension_id: this.extension_id,
131520
131530
  start_time: this.start_time,
131521
- end_time: this.end_time,
131522
- metadata: this.metadata
131531
+ end_time: this.end_time
131523
131532
  };
131533
+ if (config3.getTelemetryLogPromptsEnabled() && this.function_args) {
131534
+ attributes["function_args"] = safeJsonStringify(this.function_args, 2);
131535
+ }
131536
+ if (this.metadata) {
131537
+ const metadata2 = config3.getTelemetryLogPromptsEnabled() ? this.metadata : Object.fromEntries(Object.entries(this.metadata).filter(([k2]) => TOOL_CALL_METADATA_SAFE_KEYS.includes(k2)));
131538
+ if (Object.keys(metadata2).length > 0) {
131539
+ attributes["metadata"] = safeJsonStringify(metadata2, 2);
131540
+ }
131541
+ }
131524
131542
  if (this.error) {
131525
131543
  attributes[CoreToolCallStatus.Error] = this.error;
131526
131544
  attributes["error.message"] = this.error;
@@ -131557,9 +131575,11 @@ var init_types7 = __esm({
131557
131575
  "event.name": EVENT_API_REQUEST,
131558
131576
  "event.timestamp": this["event.timestamp"],
131559
131577
  model: this.model,
131560
- prompt_id: this.prompt.prompt_id,
131561
- request_text: this.request_text
131578
+ prompt_id: this.prompt.prompt_id
131562
131579
  };
131580
+ if (config3.getTelemetryLogPromptsEnabled() && this.request_text) {
131581
+ attributes["request_text"] = this.request_text;
131582
+ }
131563
131583
  if (this.role) {
131564
131584
  attributes["role"] = this.role;
131565
131585
  }
@@ -131724,7 +131744,7 @@ var init_types7 = __esm({
131724
131744
  if (this.role) {
131725
131745
  attributes["role"] = this.role;
131726
131746
  }
131727
- if (this.response_text) {
131747
+ if (config3.getTelemetryLogPromptsEnabled() && this.response_text) {
131728
131748
  attributes["response_text"] = this.response_text;
131729
131749
  }
131730
131750
  if (this.status_code) {
@@ -131933,11 +131953,19 @@ var init_types7 = __esm({
131933
131953
  const attributes = {
131934
131954
  ...getCommonAttributes(config3),
131935
131955
  "event.name": EVENT_CONSECA_POLICY_GENERATION,
131936
- "event.timestamp": this["event.timestamp"],
131937
- user_prompt: this.user_prompt,
131938
- trusted_content: this.trusted_content,
131939
- policy: this.policy
131956
+ "event.timestamp": this["event.timestamp"]
131940
131957
  };
131958
+ if (config3.getTelemetryLogPromptsEnabled()) {
131959
+ if (this.user_prompt) {
131960
+ attributes["user_prompt"] = this.user_prompt;
131961
+ }
131962
+ if (this.trusted_content) {
131963
+ attributes["trusted_content"] = this.trusted_content;
131964
+ }
131965
+ if (this.policy) {
131966
+ attributes["policy"] = this.policy;
131967
+ }
131968
+ }
131941
131969
  if (this.error) {
131942
131970
  attributes["error"] = this.error;
131943
131971
  }
@@ -131972,12 +132000,22 @@ var init_types7 = __esm({
131972
132000
  ...getCommonAttributes(config3),
131973
132001
  "event.name": EVENT_CONSECA_VERDICT,
131974
132002
  "event.timestamp": this["event.timestamp"],
131975
- user_prompt: this.user_prompt,
131976
- policy: this.policy,
131977
- tool_call: this.tool_call,
131978
- verdict: this.verdict,
131979
- verdict_rationale: this.verdict_rationale
132003
+ verdict: this.verdict
131980
132004
  };
132005
+ if (config3.getTelemetryLogPromptsEnabled()) {
132006
+ if (this.user_prompt) {
132007
+ attributes["user_prompt"] = this.user_prompt;
132008
+ }
132009
+ if (this.policy) {
132010
+ attributes["policy"] = this.policy;
132011
+ }
132012
+ if (this.tool_call) {
132013
+ attributes["tool_call"] = this.tool_call;
132014
+ }
132015
+ if (this.verdict_rationale) {
132016
+ attributes["verdict_rationale"] = this.verdict_rationale;
132017
+ }
132018
+ }
131981
132019
  if (this.error) {
131982
132020
  attributes["error"] = this.error;
131983
132021
  }
@@ -209384,8 +209422,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
209384
209422
  var init_git_commit = __esm({
209385
209423
  "packages/core/dist/src/generated/git-commit.js"() {
209386
209424
  "use strict";
209387
- GIT_COMMIT_INFO = "c17400b83";
209388
- CLI_VERSION = "0.41.0-nightly.20260428.gc17400b83";
209425
+ GIT_COMMIT_INFO = "7d233ddd5";
209426
+ CLI_VERSION = "0.41.0-preview.1";
209389
209427
  }
209390
209428
  });
209391
209429
 
@@ -279568,20 +279606,19 @@ function logConsecaPolicyGeneration(config3, event) {
279568
279606
  debugLogger.debug("Conseca Policy Generation Event:", event);
279569
279607
  const clearcutLogger = ClearcutLogger.getInstance(config3);
279570
279608
  if (clearcutLogger) {
279571
- const data = [
279572
- {
279609
+ const data = [];
279610
+ if (config3.getTelemetryLogPromptsEnabled()) {
279611
+ data.push({
279573
279612
  gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
279574
279613
  value: safeJsonStringify(event.user_prompt)
279575
- },
279576
- {
279614
+ }, {
279577
279615
  gemini_cli_key: EventMetadataKey.CONSECA_TRUSTED_CONTENT,
279578
279616
  value: safeJsonStringify(event.trusted_content)
279579
- },
279580
- {
279617
+ }, {
279581
279618
  gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
279582
279619
  value: safeJsonStringify(event.policy)
279583
- }
279584
- ];
279620
+ });
279621
+ }
279585
279622
  if (event.error) {
279586
279623
  data.push({
279587
279624
  gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
@@ -279605,26 +279642,25 @@ function logConsecaVerdict(config3, event) {
279605
279642
  if (clearcutLogger) {
279606
279643
  const data = [
279607
279644
  {
279645
+ gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
279646
+ value: safeJsonStringify(event.verdict)
279647
+ }
279648
+ ];
279649
+ if (config3.getTelemetryLogPromptsEnabled()) {
279650
+ data.push({
279608
279651
  gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
279609
279652
  value: safeJsonStringify(event.user_prompt)
279610
- },
279611
- {
279653
+ }, {
279612
279654
  gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
279613
279655
  value: safeJsonStringify(event.policy)
279614
- },
279615
- {
279656
+ }, {
279616
279657
  gemini_cli_key: EventMetadataKey.GEMINI_CLI_TOOL_CALL_NAME,
279617
279658
  value: safeJsonStringify(event.tool_call)
279618
- },
279619
- {
279620
- gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
279621
- value: safeJsonStringify(event.verdict)
279622
- },
279623
- {
279659
+ }, {
279624
279660
  gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RATIONALE,
279625
279661
  value: event.verdict_rationale
279626
- }
279627
- ];
279662
+ });
279663
+ }
279628
279664
  if (event.error) {
279629
279665
  data.push({
279630
279666
  gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
@@ -329348,7 +329384,7 @@ function getVersion() {
329348
329384
  }
329349
329385
  versionPromise = (async () => {
329350
329386
  const pkgJson = await getPackageJson(__dirname4);
329351
- return "0.41.0-nightly.20260428.gc17400b83";
329387
+ return "0.41.0-preview.1";
329352
329388
  })();
329353
329389
  return versionPromise;
329354
329390
  }
@@ -330240,7 +330276,7 @@ var init_policyCatalog = __esm({
330240
330276
  };
330241
330277
  DEFAULT_STATE = {
330242
330278
  terminal: "terminal",
330243
- transient: "terminal",
330279
+ transient: "sticky_retry",
330244
330280
  not_found: "terminal",
330245
330281
  unknown: "terminal"
330246
330282
  };
@@ -394560,7 +394596,7 @@ var init_defaultModelConfigs = __esm({
394560
394596
  },
394561
394597
  stateTransitions: {
394562
394598
  terminal: "terminal",
394563
- transient: "terminal",
394599
+ transient: "sticky_retry",
394564
394600
  not_found: "terminal",
394565
394601
  unknown: "terminal"
394566
394602
  }
@@ -394576,7 +394612,7 @@ var init_defaultModelConfigs = __esm({
394576
394612
  },
394577
394613
  stateTransitions: {
394578
394614
  terminal: "terminal",
394579
- transient: "terminal",
394615
+ transient: "sticky_retry",
394580
394616
  not_found: "terminal",
394581
394617
  unknown: "terminal"
394582
394618
  }
@@ -394593,7 +394629,7 @@ var init_defaultModelConfigs = __esm({
394593
394629
  },
394594
394630
  stateTransitions: {
394595
394631
  terminal: "terminal",
394596
- transient: "terminal",
394632
+ transient: "sticky_retry",
394597
394633
  not_found: "terminal",
394598
394634
  unknown: "terminal"
394599
394635
  }
@@ -394609,7 +394645,7 @@ var init_defaultModelConfigs = __esm({
394609
394645
  },
394610
394646
  stateTransitions: {
394611
394647
  terminal: "terminal",
394612
- transient: "terminal",
394648
+ transient: "sticky_retry",
394613
394649
  not_found: "terminal",
394614
394650
  unknown: "terminal"
394615
394651
  }
@@ -394626,7 +394662,7 @@ var init_defaultModelConfigs = __esm({
394626
394662
  },
394627
394663
  stateTransitions: {
394628
394664
  terminal: "terminal",
394629
- transient: "terminal",
394665
+ transient: "sticky_retry",
394630
394666
  not_found: "terminal",
394631
394667
  unknown: "terminal"
394632
394668
  }
@@ -394641,7 +394677,7 @@ var init_defaultModelConfigs = __esm({
394641
394677
  },
394642
394678
  stateTransitions: {
394643
394679
  terminal: "terminal",
394644
- transient: "terminal",
394680
+ transient: "sticky_retry",
394645
394681
  not_found: "terminal",
394646
394682
  unknown: "terminal"
394647
394683
  }
@@ -394657,7 +394693,7 @@ var init_defaultModelConfigs = __esm({
394657
394693
  },
394658
394694
  stateTransitions: {
394659
394695
  terminal: "terminal",
394660
- transient: "terminal",
394696
+ transient: "sticky_retry",
394661
394697
  not_found: "terminal",
394662
394698
  unknown: "terminal"
394663
394699
  }