Skip to content

Commit 71f8931

Browse files
committed
Add new fields to event data types from upstream
1 parent 45b836e commit 71f8931

4 files changed

Lines changed: 121 additions & 0 deletions

File tree

src/main/java/com/github/copilot/sdk/events/AssistantMessageEvent.java

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ public static class AssistantMessageData {
8383
@JsonProperty("parentToolCallId")
8484
private String parentToolCallId;
8585

86+
@JsonProperty("reasoningOpaque")
87+
private String reasoningOpaque;
88+
89+
@JsonProperty("reasoningText")
90+
private String reasoningText;
91+
92+
@JsonProperty("encryptedContent")
93+
private String encryptedContent;
94+
8695
/**
8796
* Gets the unique message identifier.
8897
*
@@ -159,6 +168,63 @@ public void setParentToolCallId(String parentToolCallId) {
159168
this.parentToolCallId = parentToolCallId;
160169
}
161170

171+
/**
172+
* Gets the opaque reasoning content (encrypted/encoded).
173+
*
174+
* @return the opaque reasoning content, or {@code null}
175+
*/
176+
public String getReasoningOpaque() {
177+
return reasoningOpaque;
178+
}
179+
180+
/**
181+
* Sets the opaque reasoning content.
182+
*
183+
* @param reasoningOpaque
184+
* the opaque reasoning content
185+
*/
186+
public void setReasoningOpaque(String reasoningOpaque) {
187+
this.reasoningOpaque = reasoningOpaque;
188+
}
189+
190+
/**
191+
* Gets the human-readable reasoning text.
192+
*
193+
* @return the reasoning text, or {@code null}
194+
*/
195+
public String getReasoningText() {
196+
return reasoningText;
197+
}
198+
199+
/**
200+
* Sets the reasoning text.
201+
*
202+
* @param reasoningText
203+
* the reasoning text
204+
*/
205+
public void setReasoningText(String reasoningText) {
206+
this.reasoningText = reasoningText;
207+
}
208+
209+
/**
210+
* Gets the encrypted content.
211+
*
212+
* @return the encrypted content, or {@code null}
213+
*/
214+
public String getEncryptedContent() {
215+
return encryptedContent;
216+
}
217+
218+
/**
219+
* Sets the encrypted content.
220+
*
221+
* @param encryptedContent
222+
* the encrypted content
223+
*/
224+
public void setEncryptedContent(String encryptedContent) {
225+
this.encryptedContent = encryptedContent;
226+
}
227+
162228
/**
163229
* Represents a request from the assistant to invoke a tool.
164230
*/

src/main/java/com/github/copilot/sdk/events/AssistantUsageEvent.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public static class AssistantUsageData {
6666
@JsonProperty("providerCallId")
6767
private String providerCallId;
6868

69+
@JsonProperty("parentToolCallId")
70+
private String parentToolCallId;
71+
6972
@JsonProperty("quotaSnapshots")
7073
private Map<String, Object> quotaSnapshots;
7174

@@ -149,6 +152,14 @@ public void setProviderCallId(String providerCallId) {
149152
this.providerCallId = providerCallId;
150153
}
151154

155+
public String getParentToolCallId() {
156+
return parentToolCallId;
157+
}
158+
159+
public void setParentToolCallId(String parentToolCallId) {
160+
this.parentToolCallId = parentToolCallId;
161+
}
162+
152163
public Map<String, Object> getQuotaSnapshots() {
153164
return quotaSnapshots;
154165
}

src/main/java/com/github/copilot/sdk/events/SessionCompactionCompleteEvent.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ public static class SessionCompactionCompleteData {
5858
@JsonProperty("summaryContent")
5959
private String summaryContent;
6060

61+
@JsonProperty("checkpointNumber")
62+
private Double checkpointNumber;
63+
64+
@JsonProperty("checkpointPath")
65+
private String checkpointPath;
66+
6167
public boolean isSuccess() {
6268
return success;
6369
}
@@ -121,5 +127,21 @@ public String getSummaryContent() {
121127
public void setSummaryContent(String summaryContent) {
122128
this.summaryContent = summaryContent;
123129
}
130+
131+
public Double getCheckpointNumber() {
132+
return checkpointNumber;
133+
}
134+
135+
public void setCheckpointNumber(Double checkpointNumber) {
136+
this.checkpointNumber = checkpointNumber;
137+
}
138+
139+
public String getCheckpointPath() {
140+
return checkpointPath;
141+
}
142+
143+
public void setCheckpointPath(String checkpointPath) {
144+
this.checkpointPath = checkpointPath;
145+
}
124146
}
125147
}

src/main/java/com/github/copilot/sdk/events/SessionErrorEvent.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ public static class SessionErrorData {
4343
@JsonProperty("stack")
4444
private String stack;
4545

46+
@JsonProperty("statusCode")
47+
private Double statusCode;
48+
49+
@JsonProperty("providerCallId")
50+
private String providerCallId;
51+
4652
public String getErrorType() {
4753
return errorType;
4854
}
@@ -66,5 +72,21 @@ public String getStack() {
6672
public void setStack(String stack) {
6773
this.stack = stack;
6874
}
75+
76+
public Double getStatusCode() {
77+
return statusCode;
78+
}
79+
80+
public void setStatusCode(Double statusCode) {
81+
this.statusCode = statusCode;
82+
}
83+
84+
public String getProviderCallId() {
85+
return providerCallId;
86+
}
87+
88+
public void setProviderCallId(String providerCallId) {
89+
this.providerCallId = providerCallId;
90+
}
6991
}
7092
}

0 commit comments

Comments
 (0)