Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/.lastmerge
Original file line number Diff line number Diff line change
@@ -1 +1 @@
60104052cd914949ddf8c7a31e1856cd6db0a57c
753d4729738c0e1da3fbe767712c829bad0332cd
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
reference-impl-sync workflow and deal with the subsequent
PR.
-->
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.55-5</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.57</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>

</properties>

Expand Down
72 changes: 36 additions & 36 deletions java/scripts/codegen/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion java/scripts/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generate:java": "tsx java.ts"
},
"dependencies": {
"@github/copilot": "^1.0.55-5",
"@github/copilot": "^1.0.57",
"json-schema": "^0.4.0",
"tsx": "^4.20.6"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import javax.annotation.processing.Generated;

/**
* Allowed values for the `ContextTier` enumeration.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public enum ContextTier {
/** The {@code default} variant. */
DEFAULT("default"),
/** The {@code long_context} variant. */
LONG_CONTEXT("long_context");

private final String value;
ContextTier(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
public static ContextTier fromValue(String value) {
for (ContextTier v : values()) {
if (v.value.equals(value)) return v;
}
throw new IllegalArgumentException("Unknown ContextTier value: " + value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
@JsonSubTypes.Type(value = SessionExtensionsLoadedEvent.class, name = "session.extensions_loaded"),
@JsonSubTypes.Type(value = SessionCanvasOpenedEvent.class, name = "session.canvas.opened"),
@JsonSubTypes.Type(value = SessionCanvasRegistryChangedEvent.class, name = "session.canvas.registry_changed"),
@JsonSubTypes.Type(value = SessionExtensionsAttachmentsPushedEvent.class, name = "session.extensions.attachments_pushed"),
@JsonSubTypes.Type(value = McpAppToolCallCompleteEvent.class, name = "mcp_app.tool_call_complete")
})
@javax.annotation.processing.Generated("copilot-sdk-codegen")
Expand Down Expand Up @@ -201,6 +202,7 @@ public abstract sealed class SessionEvent permits
SessionExtensionsLoadedEvent,
SessionCanvasOpenedEvent,
SessionCanvasRegistryChangedEvent,
SessionExtensionsAttachmentsPushedEvent,
McpAppToolCallCompleteEvent,
UnknownSessionEvent {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: session-events.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.processing.Generated;

/**
* Session event "session.extensions.attachments_pushed".
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class SessionExtensionsAttachmentsPushedEvent extends SessionEvent {

@Override
public String getType() { return "session.extensions.attachments_pushed"; }

@JsonProperty("data")
private SessionExtensionsAttachmentsPushedEventData data;

public SessionExtensionsAttachmentsPushedEventData getData() { return data; }
public void setData(SessionExtensionsAttachmentsPushedEventData data) { this.data = data; }

/** Data payload for {@link SessionExtensionsAttachmentsPushedEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public record SessionExtensionsAttachmentsPushedEventData(
/** Attachments contributed by an extension; the host should surface these as composer pills and forward them via the next session.send call. */
@JsonProperty("attachments") List<Object> attachments
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,9 @@ public record SessionModelChangeEventData(
/** Reasoning summary mode after the model change, if applicable */
@JsonProperty("reasoningSummary") ReasoningSummary reasoningSummary,
/** Context tier after the model change; null explicitly clears a previously selected tier */
@JsonProperty("contextTier") SessionModelChangeEventDataContextTier contextTier,
@JsonProperty("contextTier") ContextTier contextTier,
/** Reason the change happened, when not user-initiated. Currently `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path. UI clients can use this to render contextual copy. */
@JsonProperty("cause") String cause
) {

public enum SessionModelChangeEventDataContextTier {
/** The {@code default} variant. */
DEFAULT("default"),
/** The {@code long_context} variant. */
LONG_CONTEXT("long_context");

private final String value;
SessionModelChangeEventDataContextTier(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
public static SessionModelChangeEventDataContextTier fromValue(String value) {
for (SessionModelChangeEventDataContextTier v : values()) {
if (v.value.equals(value)) return v;
}
throw new IllegalArgumentException("Unknown SessionModelChangeEventDataContextTier value: " + value);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public record SessionResumeEventData(
@JsonProperty("reasoningEffort") String reasoningEffort,
/** Reasoning summary mode used for model calls, if applicable (e.g. "none", "concise", "detailed") */
@JsonProperty("reasoningSummary") ReasoningSummary reasoningSummary,
/** Context tier currently selected at resume time; null when no tier is active */
@JsonProperty("contextTier") ContextTier contextTier,
/** Updated working directory and git context at resume time */
@JsonProperty("context") WorkingDirectoryContext context,
/** Whether the session was already in use by another client at resume time */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public record SessionStartEventData(
@JsonProperty("reasoningEffort") String reasoningEffort,
/** Reasoning summary mode used for model calls, if applicable (e.g. "none", "concise", "detailed") */
@JsonProperty("reasoningSummary") ReasoningSummary reasoningSummary,
/** Context tier selected at session creation time for models with tiered context pricing; null when no tier is selected (e.g., non-tiered model) */
@JsonProperty("contextTier") ContextTier contextTier,
/** Working directory and git context at session start */
@JsonProperty("context") WorkingDirectoryContext context,
/** Whether the session was already in use by another client at start time */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public record ToolExecutionStartEventData(
@JsonProperty("toolName") String toolName,
/** Arguments passed to the tool */
@JsonProperty("arguments") Object arguments,
/** Model identifier that generated this tool call */
@JsonProperty("model") String model,
/** Name of the MCP server hosting this tool, when the tool is an MCP tool */
@JsonProperty("mcpServerName") String mcpServerName,
/** Original tool name on the MCP server, when the tool is an MCP tool */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated.rpc;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Canvas action invocation parameters sent to the provider.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public record CanvasActionInvokeParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
/** Owning provider identifier */
@JsonProperty("extensionId") String extensionId,
/** Provider-local canvas identifier */
@JsonProperty("canvasId") String canvasId,
/** Canvas instance identifier */
@JsonProperty("instanceId") String instanceId,
/** Action name to invoke */
@JsonProperty("actionName") String actionName,
/** Action input */
@JsonProperty("input") Object input,
/** Host context supplied by the runtime. */
@JsonProperty("host") CanvasHostContext host,
/** Session context supplied by the runtime. */
@JsonProperty("session") CanvasSessionContext session
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated.rpc;

import javax.annotation.processing.Generated;

/**
* Context tier for models that support multiple context-window sizes.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public enum ContextTier {
/** The {@code default} variant. */
DEFAULT("default"),
/** The {@code long_context} variant. */
LONG_CONTEXT("long_context");

private final String value;
ContextTier(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
public static ContextTier fromValue(String value) {
for (ContextTier v : values()) {
if (v.value.equals(value)) return v;
}
throw new IllegalArgumentException("Unknown ContextTier value: " + value);
}
}
Loading
Loading