@@ -64,6 +64,7 @@ public class Event extends JsonBaseModel {
6464 private @ Nullable Double avgLogprobs ;
6565 private @ Nullable Boolean interrupted ;
6666 private @ Nullable String branch ;
67+ private @ Nullable String isolationScope ;
6768 private @ Nullable GroundingMetadata groundingMetadata ;
6869 private @ Nullable List <CustomMetadata > customMetadata ;
6970 private @ Nullable String modelVersion ;
@@ -256,6 +257,22 @@ public void branch(@Nullable String branch) {
256257 this .branch = branch ;
257258 }
258259
260+ /**
261+ * Returns the isolated conversation this event belongs to, such as a delegated task, so an
262+ * agent's model history can keep only events from its own scope. Returns empty when the event is
263+ * not scoped. This field is internal to the framework and may change without notice.
264+ */
265+ @ Experimental
266+ @ JsonProperty ("isolationScope" )
267+ public Optional <String > isolationScope () {
268+ return Optional .ofNullable (isolationScope );
269+ }
270+
271+ @ Experimental
272+ public void setIsolationScope (@ Nullable String isolationScope ) {
273+ this .isolationScope = isolationScope ;
274+ }
275+
259276 /** The grounding metadata of the event. */
260277 @ JsonProperty ("groundingMetadata" )
261278 public Optional <GroundingMetadata > groundingMetadata () {
@@ -480,6 +497,7 @@ public static class Builder {
480497 private @ Nullable Double avgLogprobs ;
481498 private @ Nullable Boolean interrupted ;
482499 private @ Nullable String branch ;
500+ private @ Nullable String isolationScope ;
483501 private @ Nullable GroundingMetadata groundingMetadata ;
484502 private @ Nullable List <CustomMetadata > customMetadata ;
485503 private @ Nullable String modelVersion ;
@@ -626,6 +644,14 @@ Optional<String> branch() {
626644 return Optional .ofNullable (branch );
627645 }
628646
647+ @ Experimental
648+ @ CanIgnoreReturnValue
649+ @ JsonProperty ("isolationScope" )
650+ public Builder isolationScope (@ Nullable String value ) {
651+ this .isolationScope = value ;
652+ return this ;
653+ }
654+
629655 @ CanIgnoreReturnValue
630656 @ JsonProperty ("groundingMetadata" )
631657 public Builder groundingMetadata (@ Nullable GroundingMetadata value ) {
@@ -704,6 +730,7 @@ public Event build() {
704730 event .setAvgLogprobs (avgLogprobs );
705731 event .setInterrupted (interrupted );
706732 event .branch (branch );
733+ event .setIsolationScope (isolationScope );
707734 event .setGroundingMetadata (groundingMetadata );
708735 event .setCustomMetadata (customMetadata );
709736 event .setModelVersion (modelVersion );
@@ -746,6 +773,7 @@ public Builder toBuilder() {
746773 .avgLogprobs (this .avgLogprobs )
747774 .interrupted (this .interrupted )
748775 .branch (this .branch )
776+ .isolationScope (this .isolationScope )
749777 .groundingMetadata (this .groundingMetadata )
750778 .customMetadata (this .customMetadata )
751779 .modelVersion (this .modelVersion )
@@ -781,6 +809,7 @@ public boolean equals(Object obj) {
781809 && Objects .equals (avgLogprobs , other .avgLogprobs )
782810 && Objects .equals (interrupted , other .interrupted )
783811 && Objects .equals (branch , other .branch )
812+ && Objects .equals (isolationScope , other .isolationScope )
784813 && Objects .equals (groundingMetadata , other .groundingMetadata )
785814 && Objects .equals (customMetadata , other .customMetadata )
786815 && Objects .equals (modelVersion , other .modelVersion )
@@ -814,6 +843,7 @@ public int hashCode() {
814843 avgLogprobs ,
815844 interrupted ,
816845 branch ,
846+ isolationScope ,
817847 groundingMetadata ,
818848 customMetadata ,
819849 modelVersion ,
0 commit comments