@google/gemini-cli-a2a-server 0.41.0-preview.0 → 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.
- package/dist/a2a-server.mjs +74 -39
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -131410,7 +131410,7 @@ function makeChatCompressionEvent({ tokens_before, tokens_after }) {
|
|
|
131410
131410
|
}
|
|
131411
131411
|
};
|
|
131412
131412
|
}
|
|
131413
|
-
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;
|
|
131414
131414
|
var init_types7 = __esm({
|
|
131415
131415
|
"packages/core/dist/src/telemetry/types.js"() {
|
|
131416
131416
|
"use strict";
|
|
@@ -131427,6 +131427,16 @@ var init_types7 = __esm({
|
|
|
131427
131427
|
init_fileDiffUtils();
|
|
131428
131428
|
init_llmRole();
|
|
131429
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
|
+
];
|
|
131430
131440
|
ToolCallEvent = class {
|
|
131431
131441
|
"event.name";
|
|
131432
131442
|
"event.timestamp";
|
|
@@ -131508,7 +131518,6 @@ var init_types7 = __esm({
|
|
|
131508
131518
|
"event.name": EVENT_TOOL_CALL,
|
|
131509
131519
|
"event.timestamp": this["event.timestamp"],
|
|
131510
131520
|
function_name: this.function_name,
|
|
131511
|
-
function_args: safeJsonStringify(this.function_args, 2),
|
|
131512
131521
|
duration_ms: this.duration_ms,
|
|
131513
131522
|
success: this.success,
|
|
131514
131523
|
decision: this.decision,
|
|
@@ -131519,9 +131528,17 @@ var init_types7 = __esm({
|
|
|
131519
131528
|
extension_name: this.extension_name,
|
|
131520
131529
|
extension_id: this.extension_id,
|
|
131521
131530
|
start_time: this.start_time,
|
|
131522
|
-
end_time: this.end_time
|
|
131523
|
-
metadata: this.metadata
|
|
131531
|
+
end_time: this.end_time
|
|
131524
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
|
+
}
|
|
131525
131542
|
if (this.error) {
|
|
131526
131543
|
attributes[CoreToolCallStatus.Error] = this.error;
|
|
131527
131544
|
attributes["error.message"] = this.error;
|
|
@@ -131558,9 +131575,11 @@ var init_types7 = __esm({
|
|
|
131558
131575
|
"event.name": EVENT_API_REQUEST,
|
|
131559
131576
|
"event.timestamp": this["event.timestamp"],
|
|
131560
131577
|
model: this.model,
|
|
131561
|
-
prompt_id: this.prompt.prompt_id
|
|
131562
|
-
request_text: this.request_text
|
|
131578
|
+
prompt_id: this.prompt.prompt_id
|
|
131563
131579
|
};
|
|
131580
|
+
if (config3.getTelemetryLogPromptsEnabled() && this.request_text) {
|
|
131581
|
+
attributes["request_text"] = this.request_text;
|
|
131582
|
+
}
|
|
131564
131583
|
if (this.role) {
|
|
131565
131584
|
attributes["role"] = this.role;
|
|
131566
131585
|
}
|
|
@@ -131725,7 +131744,7 @@ var init_types7 = __esm({
|
|
|
131725
131744
|
if (this.role) {
|
|
131726
131745
|
attributes["role"] = this.role;
|
|
131727
131746
|
}
|
|
131728
|
-
if (this.response_text) {
|
|
131747
|
+
if (config3.getTelemetryLogPromptsEnabled() && this.response_text) {
|
|
131729
131748
|
attributes["response_text"] = this.response_text;
|
|
131730
131749
|
}
|
|
131731
131750
|
if (this.status_code) {
|
|
@@ -131934,11 +131953,19 @@ var init_types7 = __esm({
|
|
|
131934
131953
|
const attributes = {
|
|
131935
131954
|
...getCommonAttributes(config3),
|
|
131936
131955
|
"event.name": EVENT_CONSECA_POLICY_GENERATION,
|
|
131937
|
-
"event.timestamp": this["event.timestamp"]
|
|
131938
|
-
user_prompt: this.user_prompt,
|
|
131939
|
-
trusted_content: this.trusted_content,
|
|
131940
|
-
policy: this.policy
|
|
131956
|
+
"event.timestamp": this["event.timestamp"]
|
|
131941
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
|
+
}
|
|
131942
131969
|
if (this.error) {
|
|
131943
131970
|
attributes["error"] = this.error;
|
|
131944
131971
|
}
|
|
@@ -131973,12 +132000,22 @@ var init_types7 = __esm({
|
|
|
131973
132000
|
...getCommonAttributes(config3),
|
|
131974
132001
|
"event.name": EVENT_CONSECA_VERDICT,
|
|
131975
132002
|
"event.timestamp": this["event.timestamp"],
|
|
131976
|
-
|
|
131977
|
-
policy: this.policy,
|
|
131978
|
-
tool_call: this.tool_call,
|
|
131979
|
-
verdict: this.verdict,
|
|
131980
|
-
verdict_rationale: this.verdict_rationale
|
|
132003
|
+
verdict: this.verdict
|
|
131981
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
|
+
}
|
|
131982
132019
|
if (this.error) {
|
|
131983
132020
|
attributes["error"] = this.error;
|
|
131984
132021
|
}
|
|
@@ -209385,8 +209422,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
209385
209422
|
var init_git_commit = __esm({
|
|
209386
209423
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
209387
209424
|
"use strict";
|
|
209388
|
-
GIT_COMMIT_INFO = "
|
|
209389
|
-
CLI_VERSION = "0.41.0-preview.
|
|
209425
|
+
GIT_COMMIT_INFO = "7d233ddd5";
|
|
209426
|
+
CLI_VERSION = "0.41.0-preview.1";
|
|
209390
209427
|
}
|
|
209391
209428
|
});
|
|
209392
209429
|
|
|
@@ -279569,20 +279606,19 @@ function logConsecaPolicyGeneration(config3, event) {
|
|
|
279569
279606
|
debugLogger.debug("Conseca Policy Generation Event:", event);
|
|
279570
279607
|
const clearcutLogger = ClearcutLogger.getInstance(config3);
|
|
279571
279608
|
if (clearcutLogger) {
|
|
279572
|
-
const data = [
|
|
279573
|
-
|
|
279609
|
+
const data = [];
|
|
279610
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
279611
|
+
data.push({
|
|
279574
279612
|
gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
|
|
279575
279613
|
value: safeJsonStringify(event.user_prompt)
|
|
279576
|
-
},
|
|
279577
|
-
{
|
|
279614
|
+
}, {
|
|
279578
279615
|
gemini_cli_key: EventMetadataKey.CONSECA_TRUSTED_CONTENT,
|
|
279579
279616
|
value: safeJsonStringify(event.trusted_content)
|
|
279580
|
-
},
|
|
279581
|
-
{
|
|
279617
|
+
}, {
|
|
279582
279618
|
gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
|
|
279583
279619
|
value: safeJsonStringify(event.policy)
|
|
279584
|
-
}
|
|
279585
|
-
|
|
279620
|
+
});
|
|
279621
|
+
}
|
|
279586
279622
|
if (event.error) {
|
|
279587
279623
|
data.push({
|
|
279588
279624
|
gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
|
|
@@ -279606,26 +279642,25 @@ function logConsecaVerdict(config3, event) {
|
|
|
279606
279642
|
if (clearcutLogger) {
|
|
279607
279643
|
const data = [
|
|
279608
279644
|
{
|
|
279645
|
+
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
|
|
279646
|
+
value: safeJsonStringify(event.verdict)
|
|
279647
|
+
}
|
|
279648
|
+
];
|
|
279649
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
279650
|
+
data.push({
|
|
279609
279651
|
gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
|
|
279610
279652
|
value: safeJsonStringify(event.user_prompt)
|
|
279611
|
-
},
|
|
279612
|
-
{
|
|
279653
|
+
}, {
|
|
279613
279654
|
gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
|
|
279614
279655
|
value: safeJsonStringify(event.policy)
|
|
279615
|
-
},
|
|
279616
|
-
{
|
|
279656
|
+
}, {
|
|
279617
279657
|
gemini_cli_key: EventMetadataKey.GEMINI_CLI_TOOL_CALL_NAME,
|
|
279618
279658
|
value: safeJsonStringify(event.tool_call)
|
|
279619
|
-
},
|
|
279620
|
-
{
|
|
279621
|
-
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
|
|
279622
|
-
value: safeJsonStringify(event.verdict)
|
|
279623
|
-
},
|
|
279624
|
-
{
|
|
279659
|
+
}, {
|
|
279625
279660
|
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RATIONALE,
|
|
279626
279661
|
value: event.verdict_rationale
|
|
279627
|
-
}
|
|
279628
|
-
|
|
279662
|
+
});
|
|
279663
|
+
}
|
|
279629
279664
|
if (event.error) {
|
|
279630
279665
|
data.push({
|
|
279631
279666
|
gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
|
|
@@ -329349,7 +329384,7 @@ function getVersion() {
|
|
|
329349
329384
|
}
|
|
329350
329385
|
versionPromise = (async () => {
|
|
329351
329386
|
const pkgJson = await getPackageJson(__dirname4);
|
|
329352
|
-
return "0.41.0-preview.
|
|
329387
|
+
return "0.41.0-preview.1";
|
|
329353
329388
|
})();
|
|
329354
329389
|
return versionPromise;
|
|
329355
329390
|
}
|