@@ -41,6 +41,7 @@ public class EventActions {
4141 private ConcurrentMap <String , ToolConfirmation > requestedToolConfirmations =
4242 new ConcurrentHashMap <>();
4343 private Optional <Boolean > endInvocation = Optional .empty ();
44+ private Optional <EventCompaction > compaction = Optional .empty ();
4445
4546 /** Default constructor for Jackson. */
4647 public EventActions () {}
@@ -139,6 +140,15 @@ public void setEndInvocation(boolean endInvocation) {
139140 this .endInvocation = Optional .of (endInvocation );
140141 }
141142
143+ @ JsonProperty ("compaction" )
144+ public Optional <EventCompaction > compaction () {
145+ return compaction ;
146+ }
147+
148+ public void setCompaction (Optional <EventCompaction > compaction ) {
149+ this .compaction = compaction ;
150+ }
151+
142152 public static Builder builder () {
143153 return new Builder ();
144154 }
@@ -162,7 +172,8 @@ public boolean equals(Object o) {
162172 && Objects .equals (escalate , that .escalate )
163173 && Objects .equals (requestedAuthConfigs , that .requestedAuthConfigs )
164174 && Objects .equals (requestedToolConfirmations , that .requestedToolConfirmations )
165- && Objects .equals (endInvocation , that .endInvocation );
175+ && Objects .equals (endInvocation , that .endInvocation )
176+ && Objects .equals (compaction , that .compaction );
166177 }
167178
168179 @ Override
@@ -175,7 +186,8 @@ public int hashCode() {
175186 escalate ,
176187 requestedAuthConfigs ,
177188 requestedToolConfirmations ,
178- endInvocation );
189+ endInvocation ,
190+ compaction );
179191 }
180192
181193 /** Builder for {@link EventActions}. */
@@ -190,6 +202,7 @@ public static class Builder {
190202 private ConcurrentMap <String , ToolConfirmation > requestedToolConfirmations =
191203 new ConcurrentHashMap <>();
192204 private Optional <Boolean > endInvocation = Optional .empty ();
205+ private Optional <EventCompaction > compaction = Optional .empty ();
193206
194207 public Builder () {}
195208
@@ -203,6 +216,7 @@ private Builder(EventActions eventActions) {
203216 this .requestedToolConfirmations =
204217 new ConcurrentHashMap <>(eventActions .requestedToolConfirmations ());
205218 this .endInvocation = eventActions .endInvocation ();
219+ this .compaction = eventActions .compaction ();
206220 }
207221
208222 @ CanIgnoreReturnValue
@@ -262,6 +276,13 @@ public Builder endInvocation(boolean endInvocation) {
262276 return this ;
263277 }
264278
279+ @ CanIgnoreReturnValue
280+ @ JsonProperty ("compaction" )
281+ public Builder compaction (EventCompaction value ) {
282+ this .compaction = Optional .ofNullable (value );
283+ return this ;
284+ }
285+
265286 @ CanIgnoreReturnValue
266287 public Builder merge (EventActions other ) {
267288 if (other .skipSummarization ().isPresent ()) {
@@ -288,6 +309,9 @@ public Builder merge(EventActions other) {
288309 if (other .endInvocation ().isPresent ()) {
289310 this .endInvocation = other .endInvocation ();
290311 }
312+ if (other .compaction ().isPresent ()) {
313+ this .compaction = other .compaction ();
314+ }
291315 return this ;
292316 }
293317
@@ -301,6 +325,7 @@ public EventActions build() {
301325 eventActions .setRequestedAuthConfigs (this .requestedAuthConfigs );
302326 eventActions .setRequestedToolConfirmations (this .requestedToolConfirmations );
303327 eventActions .setEndInvocation (this .endInvocation );
328+ eventActions .setCompaction (this .compaction );
304329 return eventActions ;
305330 }
306331 }
0 commit comments