@google/gemini-cli-a2a-server 0.40.0 → 0.40.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
|
@@ -131403,7 +131403,7 @@ function makeChatCompressionEvent({ tokens_before, tokens_after }) {
|
|
|
131403
131403
|
}
|
|
131404
131404
|
};
|
|
131405
131405
|
}
|
|
131406
|
-
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;
|
|
131406
|
+
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;
|
|
131407
131407
|
var init_types7 = __esm({
|
|
131408
131408
|
"packages/core/dist/src/telemetry/types.js"() {
|
|
131409
131409
|
"use strict";
|
|
@@ -131420,6 +131420,16 @@ var init_types7 = __esm({
|
|
|
131420
131420
|
init_fileDiffUtils();
|
|
131421
131421
|
init_llmRole();
|
|
131422
131422
|
EVENT_TOOL_CALL = "gemini_cli.tool_call";
|
|
131423
|
+
TOOL_CALL_METADATA_SAFE_KEYS = [
|
|
131424
|
+
"model_added_lines",
|
|
131425
|
+
"model_removed_lines",
|
|
131426
|
+
"model_added_chars",
|
|
131427
|
+
"model_removed_chars",
|
|
131428
|
+
"user_added_lines",
|
|
131429
|
+
"user_removed_lines",
|
|
131430
|
+
"user_added_chars",
|
|
131431
|
+
"user_removed_chars"
|
|
131432
|
+
];
|
|
131423
131433
|
ToolCallEvent = class {
|
|
131424
131434
|
"event.name";
|
|
131425
131435
|
"event.timestamp";
|
|
@@ -131501,7 +131511,6 @@ var init_types7 = __esm({
|
|
|
131501
131511
|
"event.name": EVENT_TOOL_CALL,
|
|
131502
131512
|
"event.timestamp": this["event.timestamp"],
|
|
131503
131513
|
function_name: this.function_name,
|
|
131504
|
-
function_args: safeJsonStringify(this.function_args, 2),
|
|
131505
131514
|
duration_ms: this.duration_ms,
|
|
131506
131515
|
success: this.success,
|
|
131507
131516
|
decision: this.decision,
|
|
@@ -131512,9 +131521,17 @@ var init_types7 = __esm({
|
|
|
131512
131521
|
extension_name: this.extension_name,
|
|
131513
131522
|
extension_id: this.extension_id,
|
|
131514
131523
|
start_time: this.start_time,
|
|
131515
|
-
end_time: this.end_time
|
|
131516
|
-
metadata: this.metadata
|
|
131524
|
+
end_time: this.end_time
|
|
131517
131525
|
};
|
|
131526
|
+
if (config3.getTelemetryLogPromptsEnabled() && this.function_args) {
|
|
131527
|
+
attributes["function_args"] = safeJsonStringify(this.function_args, 2);
|
|
131528
|
+
}
|
|
131529
|
+
if (this.metadata) {
|
|
131530
|
+
const metadata2 = config3.getTelemetryLogPromptsEnabled() ? this.metadata : Object.fromEntries(Object.entries(this.metadata).filter(([k2]) => TOOL_CALL_METADATA_SAFE_KEYS.includes(k2)));
|
|
131531
|
+
if (Object.keys(metadata2).length > 0) {
|
|
131532
|
+
attributes["metadata"] = safeJsonStringify(metadata2, 2);
|
|
131533
|
+
}
|
|
131534
|
+
}
|
|
131518
131535
|
if (this.error) {
|
|
131519
131536
|
attributes[CoreToolCallStatus.Error] = this.error;
|
|
131520
131537
|
attributes["error.message"] = this.error;
|
|
@@ -131551,9 +131568,11 @@ var init_types7 = __esm({
|
|
|
131551
131568
|
"event.name": EVENT_API_REQUEST,
|
|
131552
131569
|
"event.timestamp": this["event.timestamp"],
|
|
131553
131570
|
model: this.model,
|
|
131554
|
-
prompt_id: this.prompt.prompt_id
|
|
131555
|
-
request_text: this.request_text
|
|
131571
|
+
prompt_id: this.prompt.prompt_id
|
|
131556
131572
|
};
|
|
131573
|
+
if (config3.getTelemetryLogPromptsEnabled() && this.request_text) {
|
|
131574
|
+
attributes["request_text"] = this.request_text;
|
|
131575
|
+
}
|
|
131557
131576
|
if (this.role) {
|
|
131558
131577
|
attributes["role"] = this.role;
|
|
131559
131578
|
}
|
|
@@ -131718,7 +131737,7 @@ var init_types7 = __esm({
|
|
|
131718
131737
|
if (this.role) {
|
|
131719
131738
|
attributes["role"] = this.role;
|
|
131720
131739
|
}
|
|
131721
|
-
if (this.response_text) {
|
|
131740
|
+
if (config3.getTelemetryLogPromptsEnabled() && this.response_text) {
|
|
131722
131741
|
attributes["response_text"] = this.response_text;
|
|
131723
131742
|
}
|
|
131724
131743
|
if (this.status_code) {
|
|
@@ -131927,11 +131946,19 @@ var init_types7 = __esm({
|
|
|
131927
131946
|
const attributes = {
|
|
131928
131947
|
...getCommonAttributes(config3),
|
|
131929
131948
|
"event.name": EVENT_CONSECA_POLICY_GENERATION,
|
|
131930
|
-
"event.timestamp": this["event.timestamp"]
|
|
131931
|
-
user_prompt: this.user_prompt,
|
|
131932
|
-
trusted_content: this.trusted_content,
|
|
131933
|
-
policy: this.policy
|
|
131949
|
+
"event.timestamp": this["event.timestamp"]
|
|
131934
131950
|
};
|
|
131951
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
131952
|
+
if (this.user_prompt) {
|
|
131953
|
+
attributes["user_prompt"] = this.user_prompt;
|
|
131954
|
+
}
|
|
131955
|
+
if (this.trusted_content) {
|
|
131956
|
+
attributes["trusted_content"] = this.trusted_content;
|
|
131957
|
+
}
|
|
131958
|
+
if (this.policy) {
|
|
131959
|
+
attributes["policy"] = this.policy;
|
|
131960
|
+
}
|
|
131961
|
+
}
|
|
131935
131962
|
if (this.error) {
|
|
131936
131963
|
attributes["error"] = this.error;
|
|
131937
131964
|
}
|
|
@@ -131966,12 +131993,22 @@ var init_types7 = __esm({
|
|
|
131966
131993
|
...getCommonAttributes(config3),
|
|
131967
131994
|
"event.name": EVENT_CONSECA_VERDICT,
|
|
131968
131995
|
"event.timestamp": this["event.timestamp"],
|
|
131969
|
-
|
|
131970
|
-
policy: this.policy,
|
|
131971
|
-
tool_call: this.tool_call,
|
|
131972
|
-
verdict: this.verdict,
|
|
131973
|
-
verdict_rationale: this.verdict_rationale
|
|
131996
|
+
verdict: this.verdict
|
|
131974
131997
|
};
|
|
131998
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
131999
|
+
if (this.user_prompt) {
|
|
132000
|
+
attributes["user_prompt"] = this.user_prompt;
|
|
132001
|
+
}
|
|
132002
|
+
if (this.policy) {
|
|
132003
|
+
attributes["policy"] = this.policy;
|
|
132004
|
+
}
|
|
132005
|
+
if (this.tool_call) {
|
|
132006
|
+
attributes["tool_call"] = this.tool_call;
|
|
132007
|
+
}
|
|
132008
|
+
if (this.verdict_rationale) {
|
|
132009
|
+
attributes["verdict_rationale"] = this.verdict_rationale;
|
|
132010
|
+
}
|
|
132011
|
+
}
|
|
131975
132012
|
if (this.error) {
|
|
131976
132013
|
attributes["error"] = this.error;
|
|
131977
132014
|
}
|
|
@@ -209378,8 +209415,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
209378
209415
|
var init_git_commit = __esm({
|
|
209379
209416
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
209380
209417
|
"use strict";
|
|
209381
|
-
GIT_COMMIT_INFO = "
|
|
209382
|
-
CLI_VERSION = "0.40.
|
|
209418
|
+
GIT_COMMIT_INFO = "239ede120";
|
|
209419
|
+
CLI_VERSION = "0.40.1";
|
|
209383
209420
|
}
|
|
209384
209421
|
});
|
|
209385
209422
|
|
|
@@ -279562,20 +279599,19 @@ function logConsecaPolicyGeneration(config3, event) {
|
|
|
279562
279599
|
debugLogger.debug("Conseca Policy Generation Event:", event);
|
|
279563
279600
|
const clearcutLogger = ClearcutLogger.getInstance(config3);
|
|
279564
279601
|
if (clearcutLogger) {
|
|
279565
|
-
const data = [
|
|
279566
|
-
|
|
279602
|
+
const data = [];
|
|
279603
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
279604
|
+
data.push({
|
|
279567
279605
|
gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
|
|
279568
279606
|
value: safeJsonStringify(event.user_prompt)
|
|
279569
|
-
},
|
|
279570
|
-
{
|
|
279607
|
+
}, {
|
|
279571
279608
|
gemini_cli_key: EventMetadataKey.CONSECA_TRUSTED_CONTENT,
|
|
279572
279609
|
value: safeJsonStringify(event.trusted_content)
|
|
279573
|
-
},
|
|
279574
|
-
{
|
|
279610
|
+
}, {
|
|
279575
279611
|
gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
|
|
279576
279612
|
value: safeJsonStringify(event.policy)
|
|
279577
|
-
}
|
|
279578
|
-
|
|
279613
|
+
});
|
|
279614
|
+
}
|
|
279579
279615
|
if (event.error) {
|
|
279580
279616
|
data.push({
|
|
279581
279617
|
gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
|
|
@@ -279599,26 +279635,25 @@ function logConsecaVerdict(config3, event) {
|
|
|
279599
279635
|
if (clearcutLogger) {
|
|
279600
279636
|
const data = [
|
|
279601
279637
|
{
|
|
279638
|
+
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
|
|
279639
|
+
value: safeJsonStringify(event.verdict)
|
|
279640
|
+
}
|
|
279641
|
+
];
|
|
279642
|
+
if (config3.getTelemetryLogPromptsEnabled()) {
|
|
279643
|
+
data.push({
|
|
279602
279644
|
gemini_cli_key: EventMetadataKey.CONSECA_USER_PROMPT,
|
|
279603
279645
|
value: safeJsonStringify(event.user_prompt)
|
|
279604
|
-
},
|
|
279605
|
-
{
|
|
279646
|
+
}, {
|
|
279606
279647
|
gemini_cli_key: EventMetadataKey.CONSECA_GENERATED_POLICY,
|
|
279607
279648
|
value: safeJsonStringify(event.policy)
|
|
279608
|
-
},
|
|
279609
|
-
{
|
|
279649
|
+
}, {
|
|
279610
279650
|
gemini_cli_key: EventMetadataKey.GEMINI_CLI_TOOL_CALL_NAME,
|
|
279611
279651
|
value: safeJsonStringify(event.tool_call)
|
|
279612
|
-
},
|
|
279613
|
-
{
|
|
279614
|
-
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RESULT,
|
|
279615
|
-
value: safeJsonStringify(event.verdict)
|
|
279616
|
-
},
|
|
279617
|
-
{
|
|
279652
|
+
}, {
|
|
279618
279653
|
gemini_cli_key: EventMetadataKey.CONSECA_VERDICT_RATIONALE,
|
|
279619
279654
|
value: event.verdict_rationale
|
|
279620
|
-
}
|
|
279621
|
-
|
|
279655
|
+
});
|
|
279656
|
+
}
|
|
279622
279657
|
if (event.error) {
|
|
279623
279658
|
data.push({
|
|
279624
279659
|
gemini_cli_key: EventMetadataKey.CONSECA_ERROR,
|
|
@@ -329321,7 +329356,7 @@ function getVersion() {
|
|
|
329321
329356
|
}
|
|
329322
329357
|
versionPromise = (async () => {
|
|
329323
329358
|
const pkgJson = await getPackageJson(__dirname4);
|
|
329324
|
-
return "0.40.
|
|
329359
|
+
return "0.40.1";
|
|
329325
329360
|
})();
|
|
329326
329361
|
return versionPromise;
|
|
329327
329362
|
}
|