Skip to content

Commit b79108f

Browse files
Annhiluccopybara-github
authored andcommitted
feat: Support signature for all Interaction tool types
PiperOrigin-RevId: 876415024
1 parent 249b086 commit b79108f

File tree

1 file changed

+96
-2
lines changed

1 file changed

+96
-2
lines changed

src/interactions/resources/interactions.ts

Lines changed: 96 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ export interface CodeExecutionCallContent {
233233
arguments: CodeExecutionCallArguments;
234234

235235
type: 'code_execution_call';
236+
237+
/**
238+
* A signature hash for backend validation.
239+
*/
240+
signature?: string;
236241
}
237242

238243
/**
@@ -417,6 +422,11 @@ export namespace ContentDelta {
417422
name: string;
418423

419424
type: 'function_call';
425+
426+
/**
427+
* A signature hash for backend validation.
428+
*/
429+
signature?: string;
420430
}
421431

422432
export interface FunctionResultDelta {
@@ -435,6 +445,11 @@ export namespace ContentDelta {
435445
is_error?: boolean;
436446

437447
name?: string;
448+
449+
/**
450+
* A signature hash for backend validation.
451+
*/
452+
signature?: string;
438453
}
439454

440455
export namespace FunctionResultDelta {
@@ -455,6 +470,11 @@ export namespace ContentDelta {
455470
arguments: InteractionsAPI.CodeExecutionCallArguments;
456471

457472
type: 'code_execution_call';
473+
474+
/**
475+
* A signature hash for backend validation.
476+
*/
477+
signature?: string;
458478
}
459479

460480
export interface CodeExecutionResultDelta {
@@ -469,6 +489,9 @@ export namespace ContentDelta {
469489

470490
is_error?: boolean;
471491

492+
/**
493+
* A signature hash for backend validation.
494+
*/
472495
signature?: string;
473496
}
474497

@@ -484,6 +507,11 @@ export namespace ContentDelta {
484507
arguments: InteractionsAPI.URLContextCallArguments;
485508

486509
type: 'url_context_call';
510+
511+
/**
512+
* A signature hash for backend validation.
513+
*/
514+
signature?: string;
487515
}
488516

489517
export interface URLContextResultDelta {
@@ -498,6 +526,9 @@ export namespace ContentDelta {
498526

499527
is_error?: boolean;
500528

529+
/**
530+
* A signature hash for backend validation.
531+
*/
501532
signature?: string;
502533
}
503534

@@ -513,6 +544,11 @@ export namespace ContentDelta {
513544
arguments: InteractionsAPI.GoogleSearchCallArguments;
514545

515546
type: 'google_search_call';
547+
548+
/**
549+
* A signature hash for backend validation.
550+
*/
551+
signature?: string;
516552
}
517553

518554
export interface GoogleSearchResultDelta {
@@ -527,6 +563,9 @@ export namespace ContentDelta {
527563

528564
is_error?: boolean;
529565

566+
/**
567+
* A signature hash for backend validation.
568+
*/
530569
signature?: string;
531570
}
532571

@@ -543,6 +582,11 @@ export namespace ContentDelta {
543582
server_name: string;
544583

545584
type: 'mcp_server_tool_call';
585+
586+
/**
587+
* A signature hash for backend validation.
588+
*/
589+
signature?: string;
546590
}
547591

548592
export interface MCPServerToolResultDelta {
@@ -561,6 +605,11 @@ export namespace ContentDelta {
561605
name?: string;
562606

563607
server_name?: string;
608+
609+
/**
610+
* A signature hash for backend validation.
611+
*/
612+
signature?: string;
564613
}
565614

566615
export namespace MCPServerToolResultDelta {
@@ -576,6 +625,11 @@ export namespace ContentDelta {
576625
id: string;
577626

578627
type: 'file_search_call';
628+
629+
/**
630+
* A signature hash for backend validation.
631+
*/
632+
signature?: string;
579633
}
580634

581635
export interface FileSearchResultDelta {
@@ -718,6 +772,11 @@ export interface FileSearchCallContent {
718772
id: string;
719773

720774
type: 'file_search_call';
775+
776+
/**
777+
* A signature hash for backend validation.
778+
*/
779+
signature?: string;
721780
}
722781

723782
/**
@@ -735,6 +794,11 @@ export interface FileSearchResultContent {
735794
* The results of the File Search.
736795
*/
737796
result?: Array<FileSearchResultContent.Result>;
797+
798+
/**
799+
* A signature hash for backend validation.
800+
*/
801+
signature?: string;
738802
}
739803

740804
export namespace FileSearchResultContent {
@@ -801,6 +865,11 @@ export interface FunctionCallContent {
801865
name: string;
802866

803867
type: 'function_call';
868+
869+
/**
870+
* A signature hash for backend validation.
871+
*/
872+
signature?: string;
804873
}
805874

806875
/**
@@ -828,6 +897,11 @@ export interface FunctionResultContent {
828897
* The name of the tool that was called.
829898
*/
830899
name?: string;
900+
901+
/**
902+
* A signature hash for backend validation.
903+
*/
904+
signature?: string;
831905
}
832906

833907
export namespace FunctionResultContent {
@@ -921,6 +995,11 @@ export interface GoogleSearchCallContent {
921995
* The type of search grounding enabled.
922996
*/
923997
search_type?: 'web_search' | 'image_search';
998+
999+
/**
1000+
* A signature hash for backend validation.
1001+
*/
1002+
signature?: string;
9241003
}
9251004

9261005
/**
@@ -965,7 +1044,7 @@ export interface GoogleSearchResultContent {
9651044
is_error?: boolean;
9661045

9671046
/**
968-
* The signature of the Google Search result.
1047+
* A signature hash for backend validation.
9691048
*/
9701049
signature?: string;
9711050
}
@@ -1210,6 +1289,11 @@ export interface MCPServerToolCallContent {
12101289
server_name: string;
12111290

12121291
type: 'mcp_server_tool_call';
1292+
1293+
/**
1294+
* A signature hash for backend validation.
1295+
*/
1296+
signature?: string;
12131297
}
12141298

12151299
/**
@@ -1237,6 +1321,11 @@ export interface MCPServerToolResultContent {
12371321
* The name of the used MCP server.
12381322
*/
12391323
server_name?: string;
1324+
1325+
/**
1326+
* A signature hash for backend validation.
1327+
*/
1328+
signature?: string;
12401329
}
12411330

12421331
export namespace MCPServerToolResultContent {
@@ -1478,6 +1567,11 @@ export interface URLContextCallContent {
14781567
arguments: URLContextCallArguments;
14791568

14801569
type: 'url_context_call';
1570+
1571+
/**
1572+
* A signature hash for backend validation.
1573+
*/
1574+
signature?: string;
14811575
}
14821576

14831577
/**
@@ -1517,7 +1611,7 @@ export interface URLContextResultContent {
15171611
is_error?: boolean;
15181612

15191613
/**
1520-
* The signature of the URL context result.
1614+
* A signature hash for backend validation.
15211615
*/
15221616
signature?: string;
15231617
}

0 commit comments

Comments
 (0)