From 68c26bd0058b167170b5904f7775f93868d8084e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 5 Mar 2026 09:04:21 +0000
Subject: [PATCH] Update @github/copilot to 0.0.421
- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code
---
dotnet/src/Generated/SessionEvents.cs | 164 ++++++++++++++++
go/generated_session_events.go | 86 +++++++-
nodejs/package-lock.json | 56 +++---
nodejs/package.json | 2 +-
nodejs/samples/package-lock.json | 2 +-
nodejs/src/generated/session-events.ts | 134 +++++++++++++
python/copilot/generated/session_events.py | 216 ++++++++++++++++++++-
7 files changed, 625 insertions(+), 35 deletions(-)
diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs
index 6de4d0ef3..73e8d67b6 100644
--- a/dotnet/src/Generated/SessionEvents.cs
+++ b/dotnet/src/Generated/SessionEvents.cs
@@ -29,9 +29,13 @@ namespace GitHub.Copilot.SDK;
[JsonDerivedType(typeof(AssistantTurnEndEvent), "assistant.turn_end")]
[JsonDerivedType(typeof(AssistantTurnStartEvent), "assistant.turn_start")]
[JsonDerivedType(typeof(AssistantUsageEvent), "assistant.usage")]
+[JsonDerivedType(typeof(ElicitationCompletedEvent), "elicitation.completed")]
+[JsonDerivedType(typeof(ElicitationRequestedEvent), "elicitation.requested")]
[JsonDerivedType(typeof(HookEndEvent), "hook.end")]
[JsonDerivedType(typeof(HookStartEvent), "hook.start")]
[JsonDerivedType(typeof(PendingMessagesModifiedEvent), "pending_messages.modified")]
+[JsonDerivedType(typeof(PermissionCompletedEvent), "permission.completed")]
+[JsonDerivedType(typeof(PermissionRequestedEvent), "permission.requested")]
[JsonDerivedType(typeof(SessionCompactionCompleteEvent), "session.compaction_complete")]
[JsonDerivedType(typeof(SessionCompactionStartEvent), "session.compaction_start")]
[JsonDerivedType(typeof(SessionContextChangedEvent), "session.context_changed")]
@@ -64,6 +68,8 @@ namespace GitHub.Copilot.SDK;
[JsonDerivedType(typeof(ToolExecutionProgressEvent), "tool.execution_progress")]
[JsonDerivedType(typeof(ToolExecutionStartEvent), "tool.execution_start")]
[JsonDerivedType(typeof(ToolUserRequestedEvent), "tool.user_requested")]
+[JsonDerivedType(typeof(UserInputCompletedEvent), "user_input.completed")]
+[JsonDerivedType(typeof(UserInputRequestedEvent), "user_input.requested")]
[JsonDerivedType(typeof(UserMessageEvent), "user.message")]
public abstract partial class SessionEvent
{
@@ -645,6 +651,78 @@ public partial class SystemMessageEvent : SessionEvent
public required SystemMessageData Data { get; set; }
}
+///
+/// Event: permission.requested
+///
+public partial class PermissionRequestedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "permission.requested";
+
+ [JsonPropertyName("data")]
+ public required PermissionRequestedData Data { get; set; }
+}
+
+///
+/// Event: permission.completed
+///
+public partial class PermissionCompletedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "permission.completed";
+
+ [JsonPropertyName("data")]
+ public required PermissionCompletedData Data { get; set; }
+}
+
+///
+/// Event: user_input.requested
+///
+public partial class UserInputRequestedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "user_input.requested";
+
+ [JsonPropertyName("data")]
+ public required UserInputRequestedData Data { get; set; }
+}
+
+///
+/// Event: user_input.completed
+///
+public partial class UserInputCompletedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "user_input.completed";
+
+ [JsonPropertyName("data")]
+ public required UserInputCompletedData Data { get; set; }
+}
+
+///
+/// Event: elicitation.requested
+///
+public partial class ElicitationRequestedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "elicitation.requested";
+
+ [JsonPropertyName("data")]
+ public required ElicitationRequestedData Data { get; set; }
+}
+
+///
+/// Event: elicitation.completed
+///
+public partial class ElicitationCompletedEvent : SessionEvent
+{
+ [JsonIgnore]
+ public override string Type => "elicitation.completed";
+
+ [JsonPropertyName("data")]
+ public required ElicitationCompletedData Data { get; set; }
+}
+
public partial class SessionStartData
{
[JsonPropertyName("sessionId")]
@@ -1359,6 +1437,66 @@ public partial class SystemMessageData
public SystemMessageDataMetadata? Metadata { get; set; }
}
+public partial class PermissionRequestedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+
+ [JsonPropertyName("permissionRequest")]
+ public required object PermissionRequest { get; set; }
+}
+
+public partial class PermissionCompletedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+}
+
+public partial class UserInputRequestedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+
+ [JsonPropertyName("question")]
+ public required string Question { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("choices")]
+ public string[]? Choices { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("allowFreeform")]
+ public bool? AllowFreeform { get; set; }
+}
+
+public partial class UserInputCompletedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+}
+
+public partial class ElicitationRequestedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("mode")]
+ public string? Mode { get; set; }
+
+ [JsonPropertyName("requestedSchema")]
+ public required ElicitationRequestedDataRequestedSchema RequestedSchema { get; set; }
+}
+
+public partial class ElicitationCompletedData
+{
+ [JsonPropertyName("requestId")]
+ public required string RequestId { get; set; }
+}
+
public partial class SessionStartDataContext
{
[JsonPropertyName("cwd")]
@@ -1773,6 +1911,19 @@ public partial class SystemMessageDataMetadata
public Dictionary? Variables { get; set; }
}
+public partial class ElicitationRequestedDataRequestedSchema
+{
+ [JsonPropertyName("type")]
+ public required string Type { get; set; }
+
+ [JsonPropertyName("properties")]
+ public required Dictionary Properties { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("required")]
+ public string[]? Required { get; set; }
+}
+
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum SessionPlanChangedDataOperation
{
@@ -1890,6 +2041,11 @@ public enum SystemMessageDataRole
[JsonSerializable(typeof(AssistantUsageDataCopilotUsage))]
[JsonSerializable(typeof(AssistantUsageDataCopilotUsageTokenDetailsItem))]
[JsonSerializable(typeof(AssistantUsageEvent))]
+[JsonSerializable(typeof(ElicitationCompletedData))]
+[JsonSerializable(typeof(ElicitationCompletedEvent))]
+[JsonSerializable(typeof(ElicitationRequestedData))]
+[JsonSerializable(typeof(ElicitationRequestedDataRequestedSchema))]
+[JsonSerializable(typeof(ElicitationRequestedEvent))]
[JsonSerializable(typeof(HookEndData))]
[JsonSerializable(typeof(HookEndDataError))]
[JsonSerializable(typeof(HookEndEvent))]
@@ -1897,6 +2053,10 @@ public enum SystemMessageDataRole
[JsonSerializable(typeof(HookStartEvent))]
[JsonSerializable(typeof(PendingMessagesModifiedData))]
[JsonSerializable(typeof(PendingMessagesModifiedEvent))]
+[JsonSerializable(typeof(PermissionCompletedData))]
+[JsonSerializable(typeof(PermissionCompletedEvent))]
+[JsonSerializable(typeof(PermissionRequestedData))]
+[JsonSerializable(typeof(PermissionRequestedEvent))]
[JsonSerializable(typeof(SessionCompactionCompleteData))]
[JsonSerializable(typeof(SessionCompactionCompleteDataCompactionTokensUsed))]
[JsonSerializable(typeof(SessionCompactionCompleteEvent))]
@@ -1978,6 +2138,10 @@ public enum SystemMessageDataRole
[JsonSerializable(typeof(ToolExecutionStartEvent))]
[JsonSerializable(typeof(ToolUserRequestedData))]
[JsonSerializable(typeof(ToolUserRequestedEvent))]
+[JsonSerializable(typeof(UserInputCompletedData))]
+[JsonSerializable(typeof(UserInputCompletedEvent))]
+[JsonSerializable(typeof(UserInputRequestedData))]
+[JsonSerializable(typeof(UserInputRequestedEvent))]
[JsonSerializable(typeof(UserMessageData))]
[JsonSerializable(typeof(UserMessageDataAttachmentsItem))]
[JsonSerializable(typeof(UserMessageDataAttachmentsItemDirectory))]
diff --git a/go/generated_session_events.go b/go/generated_session_events.go
index 920affcea..dba38d1ef 100644
--- a/go/generated_session_events.go
+++ b/go/generated_session_events.go
@@ -153,6 +153,12 @@ type Data struct {
Output interface{} `json:"output"`
Metadata *Metadata `json:"metadata,omitempty"`
Role *Role `json:"role,omitempty"`
+ PermissionRequest *PermissionRequest `json:"permissionRequest,omitempty"`
+ AllowFreeform *bool `json:"allowFreeform,omitempty"`
+ Choices []string `json:"choices,omitempty"`
+ Question *string `json:"question,omitempty"`
+ Mode *Mode `json:"mode,omitempty"`
+ RequestedSchema *RequestedSchema `json:"requestedSchema,omitempty"`
}
type Attachment struct {
@@ -249,6 +255,42 @@ type Usage struct {
OutputTokens float64 `json:"outputTokens"`
}
+type PermissionRequest struct {
+ CanOfferSessionApproval *bool `json:"canOfferSessionApproval,omitempty"`
+ Commands []Command `json:"commands,omitempty"`
+ FullCommandText *string `json:"fullCommandText,omitempty"`
+ HasWriteFileRedirection *bool `json:"hasWriteFileRedirection,omitempty"`
+ Intention *string `json:"intention,omitempty"`
+ Kind Kind `json:"kind"`
+ PossiblePaths []string `json:"possiblePaths,omitempty"`
+ PossibleUrls []PossibleURL `json:"possibleUrls,omitempty"`
+ ToolCallID *string `json:"toolCallId,omitempty"`
+ Warning *string `json:"warning,omitempty"`
+ Diff *string `json:"diff,omitempty"`
+ FileName *string `json:"fileName,omitempty"`
+ NewFileContents *string `json:"newFileContents,omitempty"`
+ Path *string `json:"path,omitempty"`
+ Args interface{} `json:"args"`
+ ReadOnly *bool `json:"readOnly,omitempty"`
+ ServerName *string `json:"serverName,omitempty"`
+ ToolName *string `json:"toolName,omitempty"`
+ ToolTitle *string `json:"toolTitle,omitempty"`
+ URL *string `json:"url,omitempty"`
+ Citations *string `json:"citations,omitempty"`
+ Fact *string `json:"fact,omitempty"`
+ Subject *string `json:"subject,omitempty"`
+ ToolDescription *string `json:"toolDescription,omitempty"`
+}
+
+type Command struct {
+ Identifier string `json:"identifier"`
+ ReadOnly bool `json:"readOnly"`
+}
+
+type PossibleURL struct {
+ URL string `json:"url"`
+}
+
type QuotaSnapshot struct {
EntitlementRequests float64 `json:"entitlementRequests"`
IsUnlimitedEntitlement bool `json:"isUnlimitedEntitlement"`
@@ -266,6 +308,12 @@ type RepositoryClass struct {
Owner string `json:"owner"`
}
+type RequestedSchema struct {
+ Properties map[string]interface{} `json:"properties"`
+ Required []string `json:"required,omitempty"`
+ Type RequestedSchemaType `json:"type"`
+}
+
type Result struct {
Content string `json:"content"`
Contents []Content `json:"contents,omitempty"`
@@ -312,10 +360,10 @@ type ToolRequest struct {
type AgentMode string
const (
- Autopilot AgentMode = "autopilot"
- Interactive AgentMode = "interactive"
- Plan AgentMode = "plan"
- Shell AgentMode = "shell"
+ AgentModeShell AgentMode = "shell"
+ Autopilot AgentMode = "autopilot"
+ Interactive AgentMode = "interactive"
+ Plan AgentMode = "plan"
)
type ReferenceType string
@@ -335,6 +383,12 @@ const (
Selection AttachmentType = "selection"
)
+type Mode string
+
+const (
+ Form Mode = "form"
+)
+
type Operation string
const (
@@ -343,6 +397,24 @@ const (
Update Operation = "update"
)
+type Kind string
+
+const (
+ CustomTool Kind = "custom-tool"
+ KindShell Kind = "shell"
+ MCP Kind = "mcp"
+ Memory Kind = "memory"
+ Read Kind = "read"
+ URL Kind = "url"
+ Write Kind = "write"
+)
+
+type RequestedSchemaType string
+
+const (
+ Object RequestedSchemaType = "object"
+)
+
type Theme string
const (
@@ -402,9 +474,13 @@ const (
AssistantTurnEnd SessionEventType = "assistant.turn_end"
AssistantTurnStart SessionEventType = "assistant.turn_start"
AssistantUsage SessionEventType = "assistant.usage"
+ ElicitationCompleted SessionEventType = "elicitation.completed"
+ ElicitationRequested SessionEventType = "elicitation.requested"
HookEnd SessionEventType = "hook.end"
HookStart SessionEventType = "hook.start"
PendingMessagesModified SessionEventType = "pending_messages.modified"
+ PermissionCompleted SessionEventType = "permission.completed"
+ PermissionRequested SessionEventType = "permission.requested"
SessionCompactionComplete SessionEventType = "session.compaction_complete"
SessionCompactionStart SessionEventType = "session.compaction_start"
SessionContextChanged SessionEventType = "session.context_changed"
@@ -437,6 +513,8 @@ const (
ToolExecutionProgress SessionEventType = "tool.execution_progress"
ToolExecutionStart SessionEventType = "tool.execution_start"
ToolUserRequested SessionEventType = "tool.user_requested"
+ UserInputCompleted SessionEventType = "user_input.completed"
+ UserInputRequested SessionEventType = "user_input.requested"
UserMessage SessionEventType = "user.message"
)
diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json
index 5e83d0cc0..fc3d4e3b4 100644
--- a/nodejs/package-lock.json
+++ b/nodejs/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.1.8",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^0.0.420",
+ "@github/copilot": "^0.0.421",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
@@ -662,26 +662,26 @@
}
},
"node_modules/@github/copilot": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.420.tgz",
- "integrity": "sha512-UpPuSjxUxQ+j02WjZEFffWf0scLb23LvuGHzMFtaSsweR+P/BdbtDUI5ZDIA6T0tVyyt6+X1/vgfsJiRqd6jig==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.421.tgz",
+ "integrity": "sha512-nDUt9f5al7IgBOTc7AwLpqvaX61VsRDYDQ9D5iR0QQzHo4pgDcyOXIjXUQUKsJwObXHfh6qR+Jm1vnlbw5cacg==",
"license": "SEE LICENSE IN LICENSE.md",
"bin": {
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "0.0.420",
- "@github/copilot-darwin-x64": "0.0.420",
- "@github/copilot-linux-arm64": "0.0.420",
- "@github/copilot-linux-x64": "0.0.420",
- "@github/copilot-win32-arm64": "0.0.420",
- "@github/copilot-win32-x64": "0.0.420"
+ "@github/copilot-darwin-arm64": "0.0.421",
+ "@github/copilot-darwin-x64": "0.0.421",
+ "@github/copilot-linux-arm64": "0.0.421",
+ "@github/copilot-linux-x64": "0.0.421",
+ "@github/copilot-win32-arm64": "0.0.421",
+ "@github/copilot-win32-x64": "0.0.421"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.420.tgz",
- "integrity": "sha512-sj8Oxcf3oKDbeUotm2gtq5YU1lwCt3QIzbMZioFD/PMLOeqSX/wrecI+c0DDYXKofFhALb0+DxxnWgbEs0mnkQ==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.421.tgz",
+ "integrity": "sha512-S4plFsxH7W8X1gEkGNcfyKykIji4mNv8BP/GpPs2Ad84qWoJpZzfZsjrjF0BQ8mvFObWp6Ft2SZOnJzFZW1Ftw==",
"cpu": [
"arm64"
],
@@ -695,9 +695,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.420.tgz",
- "integrity": "sha512-2acA93IqXz1uuz3TVUm0Y7BVrBr0MySh1kQa8LqMILhTsG0YHRMm8ybzTp2HA7Mi1tl5CjqMSk163kkS7OzfUA==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.421.tgz",
+ "integrity": "sha512-h+Dbfq8ByAielLYIeJbjkN/9Abs6AKHFi+XuuzEy4YA9jOA42uKMFsWYwaoYH8ZLK9Y+4wagYI9UewVPnyIWPA==",
"cpu": [
"x64"
],
@@ -711,9 +711,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.420.tgz",
- "integrity": "sha512-h/IvEryTOYm1HzR2GNq8s2aDtN4lvT4MxldfZuS42CtWJDOfVG2jLLsoHWU1T3QV8j1++PmDgE//HX0JLpLMww==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.421.tgz",
+ "integrity": "sha512-cxlqDRR/wKfbdzd456N2h7sZOZY069wU2ycSYSmo7cC75U5DyhMGYAZwyAhvQ7UKmS5gJC/wgSgye0njuK22Xg==",
"cpu": [
"arm64"
],
@@ -727,9 +727,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.420.tgz",
- "integrity": "sha512-iL2NpZvXIDZ+3lw7sO2fo5T0nKmP5dZbU2gdYcv+SFBm/ONhCxIY5VRX4yN/9VkFaa9ePv5JzCnsl3vZINiDxg==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.421.tgz",
+ "integrity": "sha512-7np5b6EEemJ3U3jnl92buJ88nlpqOAIrLaJxx3pJGrP9SVFMBD/6EAlfIQ5m5QTfs+/vIuTKWBrq1wpFVZZUcQ==",
"cpu": [
"x64"
],
@@ -743,9 +743,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.420.tgz",
- "integrity": "sha512-Njlc2j9vYSBAL+lC6FIEhQ3C+VxO3xavwKnw0ecVRiNLcGLyPrTdzPfPQOmEjC63gpVCqLabikoDGv8fuLPA2w==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.421.tgz",
+ "integrity": "sha512-T6qCqOnijD5pmC0ytVsahX3bpDnXtLTgo9xFGo/BGaPEvX02ePkzcRZkfkOclkzc8QlkVji6KqZYB+qMZTliwg==",
"cpu": [
"arm64"
],
@@ -759,9 +759,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "0.0.420",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.420.tgz",
- "integrity": "sha512-rZlH35oNehAP2DvQbu4vQFVNeCh/1p3rUjafBYaEY0Nkhx7RmdrYBileL5U3PtRPPRsBPaq3Qp+pVIrGoCDLzQ==",
+ "version": "0.0.421",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.421.tgz",
+ "integrity": "sha512-KDfy3wsRQFIcOQDdd5Mblvh+DWRq+UGbTQ34wyW36ws1BsdWkV++gk9bTkeJRsPbQ51wsJ0V/jRKEZv4uK5dTA==",
"cpu": [
"x64"
],
diff --git a/nodejs/package.json b/nodejs/package.json
index dddda66a3..ef89556ac 100644
--- a/nodejs/package.json
+++ b/nodejs/package.json
@@ -40,7 +40,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^0.0.420",
+ "@github/copilot": "^0.0.421",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json
index 7ea6eb8f9..36f8b7039 100644
--- a/nodejs/samples/package-lock.json
+++ b/nodejs/samples/package-lock.json
@@ -18,7 +18,7 @@
"version": "0.1.8",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^0.0.420",
+ "@github/copilot": "^0.0.421",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts
index 2f0f3cf39..4b0e4c0b6 100644
--- a/nodejs/src/generated/session-events.ts
+++ b/nodejs/src/generated/session-events.ts
@@ -751,4 +751,138 @@ export type SessionEvent =
};
};
};
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "permission.requested";
+ data: {
+ requestId: string;
+ permissionRequest:
+ | {
+ kind: "shell";
+ toolCallId?: string;
+ fullCommandText: string;
+ intention: string;
+ commands: {
+ identifier: string;
+ readOnly: boolean;
+ }[];
+ possiblePaths: string[];
+ possibleUrls: {
+ url: string;
+ }[];
+ hasWriteFileRedirection: boolean;
+ canOfferSessionApproval: boolean;
+ warning?: string;
+ }
+ | {
+ kind: "write";
+ toolCallId?: string;
+ intention: string;
+ fileName: string;
+ diff: string;
+ newFileContents?: string;
+ }
+ | {
+ kind: "read";
+ toolCallId?: string;
+ intention: string;
+ path: string;
+ }
+ | {
+ kind: "mcp";
+ toolCallId?: string;
+ serverName: string;
+ toolName: string;
+ toolTitle: string;
+ args?: unknown;
+ readOnly: boolean;
+ }
+ | {
+ kind: "url";
+ toolCallId?: string;
+ intention: string;
+ url: string;
+ }
+ | {
+ kind: "memory";
+ toolCallId?: string;
+ subject: string;
+ fact: string;
+ citations: string;
+ }
+ | {
+ kind: "custom-tool";
+ toolCallId?: string;
+ toolName: string;
+ toolDescription: string;
+ args?: unknown;
+ };
+ };
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "permission.completed";
+ data: {
+ requestId: string;
+ };
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "user_input.requested";
+ data: {
+ requestId: string;
+ question: string;
+ choices?: string[];
+ allowFreeform?: boolean;
+ };
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "user_input.completed";
+ data: {
+ requestId: string;
+ };
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "elicitation.requested";
+ data: {
+ requestId: string;
+ message: string;
+ mode?: "form";
+ requestedSchema: {
+ type: "object";
+ properties: {
+ [k: string]: unknown;
+ };
+ required?: string[];
+ };
+ [k: string]: unknown;
+ };
+ }
+ | {
+ id: string;
+ timestamp: string;
+ parentId: string | null;
+ ephemeral: true;
+ type: "elicitation.completed";
+ data: {
+ requestId: string;
+ };
};
diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py
index 2bb0bc009..74d3c64d6 100644
--- a/python/copilot/generated/session_events.py
+++ b/python/copilot/generated/session_events.py
@@ -396,6 +396,10 @@ def to_dict(self) -> dict:
return result
+class Mode(Enum):
+ FORM = "form"
+
+
@dataclass
class Requests:
cost: float
@@ -465,6 +469,159 @@ class Operation(Enum):
UPDATE = "update"
+@dataclass
+class Command:
+ identifier: str
+ read_only: bool
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'Command':
+ assert isinstance(obj, dict)
+ identifier = from_str(obj.get("identifier"))
+ read_only = from_bool(obj.get("readOnly"))
+ return Command(identifier, read_only)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["identifier"] = from_str(self.identifier)
+ result["readOnly"] = from_bool(self.read_only)
+ return result
+
+
+class Kind(Enum):
+ CUSTOM_TOOL = "custom-tool"
+ MCP = "mcp"
+ MEMORY = "memory"
+ READ = "read"
+ SHELL = "shell"
+ URL = "url"
+ WRITE = "write"
+
+
+@dataclass
+class PossibleURL:
+ url: str
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'PossibleURL':
+ assert isinstance(obj, dict)
+ url = from_str(obj.get("url"))
+ return PossibleURL(url)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["url"] = from_str(self.url)
+ return result
+
+
+@dataclass
+class PermissionRequest:
+ kind: Kind
+ can_offer_session_approval: bool | None = None
+ commands: list[Command] | None = None
+ full_command_text: str | None = None
+ has_write_file_redirection: bool | None = None
+ intention: str | None = None
+ possible_paths: list[str] | None = None
+ possible_urls: list[PossibleURL] | None = None
+ tool_call_id: str | None = None
+ warning: str | None = None
+ diff: str | None = None
+ file_name: str | None = None
+ new_file_contents: str | None = None
+ path: str | None = None
+ args: Any = None
+ read_only: bool | None = None
+ server_name: str | None = None
+ tool_name: str | None = None
+ tool_title: str | None = None
+ url: str | None = None
+ citations: str | None = None
+ fact: str | None = None
+ subject: str | None = None
+ tool_description: str | None = None
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'PermissionRequest':
+ assert isinstance(obj, dict)
+ kind = Kind(obj.get("kind"))
+ can_offer_session_approval = from_union([from_bool, from_none], obj.get("canOfferSessionApproval"))
+ commands = from_union([lambda x: from_list(Command.from_dict, x), from_none], obj.get("commands"))
+ full_command_text = from_union([from_str, from_none], obj.get("fullCommandText"))
+ has_write_file_redirection = from_union([from_bool, from_none], obj.get("hasWriteFileRedirection"))
+ intention = from_union([from_str, from_none], obj.get("intention"))
+ possible_paths = from_union([lambda x: from_list(from_str, x), from_none], obj.get("possiblePaths"))
+ possible_urls = from_union([lambda x: from_list(PossibleURL.from_dict, x), from_none], obj.get("possibleUrls"))
+ tool_call_id = from_union([from_str, from_none], obj.get("toolCallId"))
+ warning = from_union([from_str, from_none], obj.get("warning"))
+ diff = from_union([from_str, from_none], obj.get("diff"))
+ file_name = from_union([from_str, from_none], obj.get("fileName"))
+ new_file_contents = from_union([from_str, from_none], obj.get("newFileContents"))
+ path = from_union([from_str, from_none], obj.get("path"))
+ args = obj.get("args")
+ read_only = from_union([from_bool, from_none], obj.get("readOnly"))
+ server_name = from_union([from_str, from_none], obj.get("serverName"))
+ tool_name = from_union([from_str, from_none], obj.get("toolName"))
+ tool_title = from_union([from_str, from_none], obj.get("toolTitle"))
+ url = from_union([from_str, from_none], obj.get("url"))
+ citations = from_union([from_str, from_none], obj.get("citations"))
+ fact = from_union([from_str, from_none], obj.get("fact"))
+ subject = from_union([from_str, from_none], obj.get("subject"))
+ tool_description = from_union([from_str, from_none], obj.get("toolDescription"))
+ return PermissionRequest(kind, can_offer_session_approval, commands, full_command_text, has_write_file_redirection, intention, possible_paths, possible_urls, tool_call_id, warning, diff, file_name, new_file_contents, path, args, read_only, server_name, tool_name, tool_title, url, citations, fact, subject, tool_description)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["kind"] = to_enum(Kind, self.kind)
+ if self.can_offer_session_approval is not None:
+ result["canOfferSessionApproval"] = from_union([from_bool, from_none], self.can_offer_session_approval)
+ if self.commands is not None:
+ result["commands"] = from_union([lambda x: from_list(lambda x: to_class(Command, x), x), from_none], self.commands)
+ if self.full_command_text is not None:
+ result["fullCommandText"] = from_union([from_str, from_none], self.full_command_text)
+ if self.has_write_file_redirection is not None:
+ result["hasWriteFileRedirection"] = from_union([from_bool, from_none], self.has_write_file_redirection)
+ if self.intention is not None:
+ result["intention"] = from_union([from_str, from_none], self.intention)
+ if self.possible_paths is not None:
+ result["possiblePaths"] = from_union([lambda x: from_list(from_str, x), from_none], self.possible_paths)
+ if self.possible_urls is not None:
+ result["possibleUrls"] = from_union([lambda x: from_list(lambda x: to_class(PossibleURL, x), x), from_none], self.possible_urls)
+ if self.tool_call_id is not None:
+ result["toolCallId"] = from_union([from_str, from_none], self.tool_call_id)
+ if self.warning is not None:
+ result["warning"] = from_union([from_str, from_none], self.warning)
+ if self.diff is not None:
+ result["diff"] = from_union([from_str, from_none], self.diff)
+ if self.file_name is not None:
+ result["fileName"] = from_union([from_str, from_none], self.file_name)
+ if self.new_file_contents is not None:
+ result["newFileContents"] = from_union([from_str, from_none], self.new_file_contents)
+ if self.path is not None:
+ result["path"] = from_union([from_str, from_none], self.path)
+ if self.args is not None:
+ result["args"] = self.args
+ if self.read_only is not None:
+ result["readOnly"] = from_union([from_bool, from_none], self.read_only)
+ if self.server_name is not None:
+ result["serverName"] = from_union([from_str, from_none], self.server_name)
+ if self.tool_name is not None:
+ result["toolName"] = from_union([from_str, from_none], self.tool_name)
+ if self.tool_title is not None:
+ result["toolTitle"] = from_union([from_str, from_none], self.tool_title)
+ if self.url is not None:
+ result["url"] = from_union([from_str, from_none], self.url)
+ if self.citations is not None:
+ result["citations"] = from_union([from_str, from_none], self.citations)
+ if self.fact is not None:
+ result["fact"] = from_union([from_str, from_none], self.fact)
+ if self.subject is not None:
+ result["subject"] = from_union([from_str, from_none], self.subject)
+ if self.tool_description is not None:
+ result["toolDescription"] = from_union([from_str, from_none], self.tool_description)
+ return result
+
+
@dataclass
class QuotaSnapshot:
entitlement_requests: float
@@ -526,6 +683,33 @@ def to_dict(self) -> dict:
return result
+class RequestedSchemaType(Enum):
+ OBJECT = "object"
+
+
+@dataclass
+class RequestedSchema:
+ properties: dict[str, Any]
+ type: RequestedSchemaType
+ required: list[str] | None = None
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'RequestedSchema':
+ assert isinstance(obj, dict)
+ properties = from_dict(lambda x: x, obj.get("properties"))
+ type = RequestedSchemaType(obj.get("type"))
+ required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required"))
+ return RequestedSchema(properties, type, required)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["properties"] = from_dict(lambda x: x, self.properties)
+ result["type"] = to_enum(RequestedSchemaType, self.type)
+ if self.required is not None:
+ result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required)
+ return result
+
+
class Theme(Enum):
DARK = "dark"
LIGHT = "light"
@@ -852,6 +1036,12 @@ class Data:
output: Any = None
metadata: Metadata | None = None
role: Role | None = None
+ permission_request: PermissionRequest | None = None
+ allow_freeform: bool | None = None
+ choices: list[str] | None = None
+ question: str | None = None
+ mode: Mode | None = None
+ requested_schema: RequestedSchema | None = None
@staticmethod
def from_dict(obj: Any) -> 'Data':
@@ -973,7 +1163,13 @@ def from_dict(obj: Any) -> 'Data':
output = obj.get("output")
metadata = from_union([Metadata.from_dict, from_none], obj.get("metadata"))
role = from_union([Role, from_none], obj.get("role"))
- return Data(context, copilot_version, producer, selected_model, session_id, start_time, version, event_count, resume_time, error_type, message, provider_call_id, stack, status_code, title, info_type, warning_type, new_model, previous_model, new_mode, previous_mode, operation, path, handoff_time, remote_session_id, repository, source_type, summary, messages_removed_during_truncation, performed_by, post_truncation_messages_length, post_truncation_tokens_in_messages, pre_truncation_messages_length, pre_truncation_tokens_in_messages, token_limit, tokens_removed_during_truncation, events_removed, up_to_event_id, code_changes, current_model, error_reason, model_metrics, session_start_time, shutdown_type, total_api_duration_ms, total_premium_requests, branch, cwd, git_root, current_tokens, messages_length, checkpoint_number, checkpoint_path, compaction_tokens_used, error, messages_removed, post_compaction_tokens, pre_compaction_messages_length, pre_compaction_tokens, request_id, success, summary_content, tokens_removed, agent_mode, attachments, content, interaction_id, source, transformed_content, turn_id, intent, reasoning_id, delta_content, total_response_size_bytes, encrypted_content, message_id, parent_tool_call_id, phase, reasoning_opaque, reasoning_text, tool_requests, api_call_id, cache_read_tokens, cache_write_tokens, copilot_usage, cost, duration, initiator, input_tokens, model, output_tokens, quota_snapshots, reason, arguments, tool_call_id, tool_name, mcp_server_name, mcp_tool_name, partial_output, progress_message, is_user_requested, result, tool_telemetry, allowed_tools, name, plugin_name, plugin_version, agent_description, agent_display_name, agent_name, tools, hook_invocation_id, hook_type, input, output, metadata, role)
+ permission_request = from_union([PermissionRequest.from_dict, from_none], obj.get("permissionRequest"))
+ allow_freeform = from_union([from_bool, from_none], obj.get("allowFreeform"))
+ choices = from_union([lambda x: from_list(from_str, x), from_none], obj.get("choices"))
+ question = from_union([from_str, from_none], obj.get("question"))
+ mode = from_union([Mode, from_none], obj.get("mode"))
+ requested_schema = from_union([RequestedSchema.from_dict, from_none], obj.get("requestedSchema"))
+ return Data(context, copilot_version, producer, selected_model, session_id, start_time, version, event_count, resume_time, error_type, message, provider_call_id, stack, status_code, title, info_type, warning_type, new_model, previous_model, new_mode, previous_mode, operation, path, handoff_time, remote_session_id, repository, source_type, summary, messages_removed_during_truncation, performed_by, post_truncation_messages_length, post_truncation_tokens_in_messages, pre_truncation_messages_length, pre_truncation_tokens_in_messages, token_limit, tokens_removed_during_truncation, events_removed, up_to_event_id, code_changes, current_model, error_reason, model_metrics, session_start_time, shutdown_type, total_api_duration_ms, total_premium_requests, branch, cwd, git_root, current_tokens, messages_length, checkpoint_number, checkpoint_path, compaction_tokens_used, error, messages_removed, post_compaction_tokens, pre_compaction_messages_length, pre_compaction_tokens, request_id, success, summary_content, tokens_removed, agent_mode, attachments, content, interaction_id, source, transformed_content, turn_id, intent, reasoning_id, delta_content, total_response_size_bytes, encrypted_content, message_id, parent_tool_call_id, phase, reasoning_opaque, reasoning_text, tool_requests, api_call_id, cache_read_tokens, cache_write_tokens, copilot_usage, cost, duration, initiator, input_tokens, model, output_tokens, quota_snapshots, reason, arguments, tool_call_id, tool_name, mcp_server_name, mcp_tool_name, partial_output, progress_message, is_user_requested, result, tool_telemetry, allowed_tools, name, plugin_name, plugin_version, agent_description, agent_display_name, agent_name, tools, hook_invocation_id, hook_type, input, output, metadata, role, permission_request, allow_freeform, choices, question, mode, requested_schema)
def to_dict(self) -> dict:
result: dict = {}
@@ -1211,6 +1407,18 @@ def to_dict(self) -> dict:
result["metadata"] = from_union([lambda x: to_class(Metadata, x), from_none], self.metadata)
if self.role is not None:
result["role"] = from_union([lambda x: to_enum(Role, x), from_none], self.role)
+ if self.permission_request is not None:
+ result["permissionRequest"] = from_union([lambda x: to_class(PermissionRequest, x), from_none], self.permission_request)
+ if self.allow_freeform is not None:
+ result["allowFreeform"] = from_union([from_bool, from_none], self.allow_freeform)
+ if self.choices is not None:
+ result["choices"] = from_union([lambda x: from_list(from_str, x), from_none], self.choices)
+ if self.question is not None:
+ result["question"] = from_union([from_str, from_none], self.question)
+ if self.mode is not None:
+ result["mode"] = from_union([lambda x: to_enum(Mode, x), from_none], self.mode)
+ if self.requested_schema is not None:
+ result["requestedSchema"] = from_union([lambda x: to_class(RequestedSchema, x), from_none], self.requested_schema)
return result
@@ -1225,9 +1433,13 @@ class SessionEventType(Enum):
ASSISTANT_TURN_END = "assistant.turn_end"
ASSISTANT_TURN_START = "assistant.turn_start"
ASSISTANT_USAGE = "assistant.usage"
+ ELICITATION_COMPLETED = "elicitation.completed"
+ ELICITATION_REQUESTED = "elicitation.requested"
HOOK_END = "hook.end"
HOOK_START = "hook.start"
PENDING_MESSAGES_MODIFIED = "pending_messages.modified"
+ PERMISSION_COMPLETED = "permission.completed"
+ PERMISSION_REQUESTED = "permission.requested"
SESSION_COMPACTION_COMPLETE = "session.compaction_complete"
SESSION_COMPACTION_START = "session.compaction_start"
SESSION_CONTEXT_CHANGED = "session.context_changed"
@@ -1260,6 +1472,8 @@ class SessionEventType(Enum):
TOOL_EXECUTION_PROGRESS = "tool.execution_progress"
TOOL_EXECUTION_START = "tool.execution_start"
TOOL_USER_REQUESTED = "tool.user_requested"
+ USER_INPUT_COMPLETED = "user_input.completed"
+ USER_INPUT_REQUESTED = "user_input.requested"
USER_MESSAGE = "user.message"
# UNKNOWN is used for forward compatibility
UNKNOWN = "unknown"