From ccf1b8789e26a442558ab44bd8f41a1793c6bd80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 21:23:06 +0000 Subject: [PATCH 1/2] Update @github/copilot to 1.0.51-3 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code --- dotnet/src/Generated/Rpc.cs | 304 +++++++++------ dotnet/src/Generated/SessionEvents.cs | 178 +++++---- go/rpc/zrpc.go | 409 ++++++++++++++----- go/rpc/zrpc_encoding.go | 17 + go/rpc/zsession_events.go | 118 ++++-- nodejs/package-lock.json | 72 ++-- nodejs/package.json | 2 +- nodejs/samples/package-lock.json | 2 +- nodejs/src/generated/rpc.ts | 434 ++++++++++++++++++--- nodejs/src/generated/session-events.ts | 217 +++++++++-- python/copilot/generated/rpc.py | 106 ++++- python/copilot/generated/session_events.py | 94 ++++- rust/src/generated/api_types.rs | 192 +++++++++ rust/src/generated/session_events.rs | 81 +++- test/harness/package-lock.json | 72 ++-- test/harness/package.json | 2 +- 16 files changed, 1785 insertions(+), 515 deletions(-) diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 54ec6d48f..99ab26061 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -3918,6 +3918,7 @@ internal sealed class CommandsListRequestWithSession [JsonDerivedType(typeof(SlashCommandInvocationResultText), "text")] [JsonDerivedType(typeof(SlashCommandInvocationResultAgentPrompt), "agent-prompt")] [JsonDerivedType(typeof(SlashCommandInvocationResultCompleted), "completed")] +[JsonDerivedType(typeof(SlashCommandInvocationResultSelectSubcommand), "select-subcommand")] public partial class SlashCommandInvocationResult { /// The type discriminator. @@ -4000,6 +4001,48 @@ public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocat public bool? RuntimeSettingsChanged { get; set; } } +/// Schema for the `SlashCommandSelectSubcommandOption` type. +public sealed class SlashCommandSelectSubcommandOption +{ + /// Human-readable description of the subcommand. + [JsonPropertyName("description")] + public string Description { get; set; } = string.Empty; + + /// Optional group label for organizing options. + [JsonPropertyName("group")] + public string? Group { get; set; } + + /// Subcommand name to invoke. + [JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; +} + +/// Schema for the `SlashCommandSelectSubcommandResult` type. +/// The select-subcommand variant of . +public partial class SlashCommandInvocationResultSelectSubcommand : SlashCommandInvocationResult +{ + /// + [JsonIgnore] + public override string Kind => "select-subcommand"; + + /// Parent command name that requires subcommand selection. + [JsonPropertyName("command")] + public required string Command { get; set; } + + /// Available subcommand options for the client to present. + [JsonPropertyName("options")] + public required IList Options { get; set; } + + /// True when the invocation mutated user runtime settings; consumers caching settings should refresh. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("runtimeSettingsChanged")] + public bool? RuntimeSettingsChanged { get; set; } + + /// Human-readable title for the selection UI. + [JsonPropertyName("title")] + public required string Title { get; set; } +} + /// Slash command name and optional raw input string to invoke. internal sealed class CommandsInvokeRequest { @@ -6588,13 +6631,13 @@ public ModelPickerCategory(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the lightweight value. + /// Lightweight model category optimized for faster, lower-cost interactions. public static ModelPickerCategory Lightweight { get; } = new("lightweight"); - /// Gets the versatile value. + /// Versatile model category suitable for a broad range of tasks. public static ModelPickerCategory Versatile { get; } = new("versatile"); - /// Gets the powerful value. + /// Powerful model category optimized for complex tasks. public static ModelPickerCategory Powerful { get; } = new("powerful"); /// Returns a value indicating whether two instances are equivalent. @@ -6653,16 +6696,16 @@ public ModelPickerPriceCategory(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the low value. + /// Lowest relative token cost tier. public static ModelPickerPriceCategory Low { get; } = new("low"); - /// Gets the medium value. + /// Medium relative token cost tier. public static ModelPickerPriceCategory Medium { get; } = new("medium"); - /// Gets the high value. + /// High relative token cost tier. public static ModelPickerPriceCategory High { get; } = new("high"); - /// Gets the very_high value. + /// Highest relative token cost tier. public static ModelPickerPriceCategory VeryHigh { get; } = new("very_high"); /// Returns a value indicating whether two instances are equivalent. @@ -6721,13 +6764,13 @@ public ModelPolicyState(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the enabled value. + /// The model is enabled by policy. public static ModelPolicyState Enabled { get; } = new("enabled"); - /// Gets the disabled value. + /// The model is disabled by policy. public static ModelPolicyState Disabled { get; } = new("disabled"); - /// Gets the unconfigured value. + /// No explicit policy is configured for the model. public static ModelPolicyState Unconfigured { get; } = new("unconfigured"); /// Returns a value indicating whether two instances are equivalent. @@ -6786,16 +6829,16 @@ public DiscoveredMcpServerType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the stdio value. + /// Server communicates over stdio with a local child process. public static DiscoveredMcpServerType Stdio { get; } = new("stdio"); - /// Gets the http value. + /// Server communicates over streamable HTTP. public static DiscoveredMcpServerType Http { get; } = new("http"); - /// Gets the sse value. + /// Server communicates over Server-Sent Events. public static DiscoveredMcpServerType Sse { get; } = new("sse"); - /// Gets the memory value. + /// Server is backed by an in-memory runtime implementation. public static DiscoveredMcpServerType Memory { get; } = new("memory"); /// Returns a value indicating whether two instances are equivalent. @@ -6854,10 +6897,10 @@ public SessionFsSetProviderConventions(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the windows value. + /// Paths use Windows path conventions. public static SessionFsSetProviderConventions Windows { get; } = new("windows"); - /// Gets the posix value. + /// Paths use POSIX path conventions. public static SessionFsSetProviderConventions Posix { get; } = new("posix"); /// Returns a value indicating whether two instances are equivalent. @@ -6917,10 +6960,10 @@ public ConnectedRemoteSessionMetadataKind(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the remote-session value. + /// Remote CLI session. public static ConnectedRemoteSessionMetadataKind RemoteSession { get; } = new("remote-session"); - /// Gets the coding-agent value. + /// GitHub Copilot coding agent session. public static ConnectedRemoteSessionMetadataKind CodingAgent { get; } = new("coding-agent"); /// Returns a value indicating whether two instances are equivalent. @@ -6980,10 +7023,10 @@ public SessionContextHostType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the github value. + /// Session repository is hosted on GitHub. public static SessionContextHostType Github { get; } = new("github"); - /// Gets the ado value. + /// Session repository is hosted on Azure DevOps. public static SessionContextHostType Ado { get; } = new("ado"); /// Returns a value indicating whether two instances are equivalent. @@ -7042,16 +7085,16 @@ public SendAgentMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the interactive value. + /// The agent is responding interactively to the user. public static SendAgentMode Interactive { get; } = new("interactive"); - /// Gets the plan value. + /// The agent is preparing a plan before making changes. public static SendAgentMode Plan { get; } = new("plan"); - /// Gets the autopilot value. + /// The agent is working autonomously toward task completion. public static SendAgentMode Autopilot { get; } = new("autopilot"); - /// Gets the shell value. + /// The agent is in shell-focused UI mode. public static SendAgentMode Shell { get; } = new("shell"); /// Returns a value indicating whether two instances are equivalent. @@ -7110,13 +7153,13 @@ public SendAttachmentGithubReferenceType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the issue value. + /// GitHub issue reference. public static SendAttachmentGithubReferenceType Issue { get; } = new("issue"); - /// Gets the pr value. + /// GitHub pull request reference. public static SendAttachmentGithubReferenceType Pr { get; } = new("pr"); - /// Gets the discussion value. + /// GitHub discussion reference. public static SendAttachmentGithubReferenceType Discussion { get; } = new("discussion"); /// Returns a value indicating whether two instances are equivalent. @@ -7175,10 +7218,10 @@ public SendMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the enqueue value. + /// Append the message to the normal session queue. public static SendMode Enqueue { get; } = new("enqueue"); - /// Gets the immediate value. + /// Interject the message during the in-progress turn. public static SendMode Immediate { get; } = new("immediate"); /// Returns a value indicating whether two instances are equivalent. @@ -7237,13 +7280,13 @@ public SessionLogLevel(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the info value. + /// Informational message. public static SessionLogLevel Info { get; } = new("info"); - /// Gets the warning value. + /// Warning message that may require attention. public static SessionLogLevel Warning { get; } = new("warning"); - /// Gets the error value. + /// Error message describing a failure. public static SessionLogLevel Error { get; } = new("error"); /// Returns a value indicating whether two instances are equivalent. @@ -7302,25 +7345,25 @@ public AuthInfoType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the hmac value. + /// Authentication provided by a GitHub App HMAC credential. public static AuthInfoType Hmac { get; } = new("hmac"); - /// Gets the env value. + /// Authentication resolved from environment-provided credentials. public static AuthInfoType Env { get; } = new("env"); - /// Gets the user value. + /// Authentication from an interactive user sign-in. public static AuthInfoType User { get; } = new("user"); - /// Gets the gh-cli value. + /// Authentication delegated to the GitHub CLI. public static AuthInfoType GhCli { get; } = new("gh-cli"); - /// Gets the api-key value. + /// Authentication from an API key credential. public static AuthInfoType ApiKey { get; } = new("api-key"); - /// Gets the token value. + /// Authentication from a GitHub token. public static AuthInfoType Token { get; } = new("token"); - /// Gets the copilot-api-token value. + /// Authentication from a Copilot API token. public static AuthInfoType CopilotApiToken { get; } = new("copilot-api-token"); /// Returns a value indicating whether two instances are equivalent. @@ -7379,10 +7422,10 @@ public WorkspacesGetWorkspaceResultWorkspaceHostType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the github value. + /// Workspace repository is hosted on GitHub. public static WorkspacesGetWorkspaceResultWorkspaceHostType Github { get; } = new("github"); - /// Gets the ado value. + /// Workspace repository is hosted on Azure DevOps. public static WorkspacesGetWorkspaceResultWorkspaceHostType Ado { get; } = new("ado"); /// Returns a value indicating whether two instances are equivalent. @@ -7441,16 +7484,16 @@ public InstructionsSourcesLocation(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the user value. + /// Instructions live in user-level configuration. public static InstructionsSourcesLocation User { get; } = new("user"); - /// Gets the repository value. + /// Instructions live in repository-level configuration. public static InstructionsSourcesLocation Repository { get; } = new("repository"); - /// Gets the working-directory value. + /// Instructions live under the current working directory. public static InstructionsSourcesLocation WorkingDirectory { get; } = new("working-directory"); - /// Gets the plugin value. + /// Instructions live in plugin-provided configuration. public static InstructionsSourcesLocation Plugin { get; } = new("plugin"); /// Returns a value indicating whether two instances are equivalent. @@ -7509,25 +7552,25 @@ public InstructionsSourcesType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the home value. + /// Instructions loaded from the user's home configuration. public static InstructionsSourcesType Home { get; } = new("home"); - /// Gets the repo value. + /// Instructions loaded from repository-scoped files. public static InstructionsSourcesType Repo { get; } = new("repo"); - /// Gets the model value. + /// Instructions loaded from model-specific files. public static InstructionsSourcesType Model { get; } = new("model"); - /// Gets the vscode value. + /// Instructions loaded from VS Code instruction files. public static InstructionsSourcesType Vscode { get; } = new("vscode"); - /// Gets the nested-agents value. + /// Instructions discovered from nested agent files. public static InstructionsSourcesType NestedAgents { get; } = new("nested-agents"); - /// Gets the child-instructions value. + /// Instructions inherited from child instruction files. public static InstructionsSourcesType ChildInstructions { get; } = new("child-instructions"); - /// Gets the plugin value. + /// Instructions supplied by an installed plugin. public static InstructionsSourcesType Plugin { get; } = new("plugin"); /// Returns a value indicating whether two instances are equivalent. @@ -7587,22 +7630,22 @@ public AgentInfoSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the user value. + /// Agent loaded from the user's personal agent configuration. public static AgentInfoSource User { get; } = new("user"); - /// Gets the project value. + /// Agent loaded from the current project's repository configuration. public static AgentInfoSource Project { get; } = new("project"); - /// Gets the inherited value. + /// Agent inherited from a parent project or workspace. public static AgentInfoSource Inherited { get; } = new("inherited"); - /// Gets the remote value. + /// Agent provided by a remote runtime or service. public static AgentInfoSource Remote { get; } = new("remote"); - /// Gets the plugin value. + /// Agent contributed by an installed plugin. public static AgentInfoSource Plugin { get; } = new("plugin"); - /// Gets the builtin value. + /// Agent built into the Copilot runtime. public static AgentInfoSource Builtin { get; } = new("builtin"); /// Returns a value indicating whether two instances are equivalent. @@ -7662,10 +7705,10 @@ public TaskExecutionMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the sync value. + /// The task was started with synchronous waiting. public static TaskExecutionMode Sync { get; } = new("sync"); - /// Gets the background value. + /// The task is managed in the background. public static TaskExecutionMode Background { get; } = new("background"); /// Returns a value indicating whether two instances are equivalent. @@ -7725,19 +7768,19 @@ public TaskStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the running value. + /// The task is actively executing. public static TaskStatus Running { get; } = new("running"); - /// Gets the idle value. + /// The task is waiting for additional input. public static TaskStatus Idle { get; } = new("idle"); - /// Gets the completed value. + /// The task finished successfully. public static TaskStatus Completed { get; } = new("completed"); - /// Gets the failed value. + /// The task finished with an error. public static TaskStatus Failed { get; } = new("failed"); - /// Gets the cancelled value. + /// The task was cancelled before completion. public static TaskStatus Cancelled { get; } = new("cancelled"); /// Returns a value indicating whether two instances are equivalent. @@ -7797,10 +7840,10 @@ public TaskShellInfoAttachmentMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the attached value. + /// The shell runs in a managed PTY session. public static TaskShellInfoAttachmentMode Attached { get; } = new("attached"); - /// Gets the detached value. + /// The shell runs as an independent background process. public static TaskShellInfoAttachmentMode Detached { get; } = new("detached"); /// Returns a value indicating whether two instances are equivalent. @@ -7860,13 +7903,13 @@ public McpSamplingExecutionAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the success value. + /// The sampling inference completed and produced a result. public static McpSamplingExecutionAction Success { get; } = new("success"); - /// Gets the failure value. + /// The sampling inference failed or was rejected. public static McpSamplingExecutionAction Failure { get; } = new("failure"); - /// Gets the cancelled value. + /// The sampling inference was cancelled before completion. public static McpSamplingExecutionAction Cancelled { get; } = new("cancelled"); /// Returns a value indicating whether two instances are equivalent. @@ -7926,10 +7969,10 @@ public McpSetEnvValueModeDetails(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the direct value. + /// Treat MCP server environment values as literal strings. public static McpSetEnvValueModeDetails Direct { get; } = new("direct"); - /// Gets the indirect value. + /// Treat MCP server environment values as host-side references to resolve before launch. public static McpSetEnvValueModeDetails Indirect { get; } = new("indirect"); /// Returns a value indicating whether two instances are equivalent. @@ -7989,10 +8032,10 @@ public OptionsUpdateEnvValueMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the direct value. + /// Pass MCP server environment values as literal strings. public static OptionsUpdateEnvValueMode Direct { get; } = new("direct"); - /// Gets the indirect value. + /// Resolve MCP server environment values from host-side references. public static OptionsUpdateEnvValueMode Indirect { get; } = new("indirect"); /// Returns a value indicating whether two instances are equivalent. @@ -8052,10 +8095,10 @@ public ExtensionSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the project value. + /// Extension discovered from the current project's .github/extensions directory. public static ExtensionSource Project { get; } = new("project"); - /// Gets the user value. + /// Extension discovered from the user's ~/.copilot/extensions directory. public static ExtensionSource User { get; } = new("user"); /// Returns a value indicating whether two instances are equivalent. @@ -8115,16 +8158,16 @@ public ExtensionStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the running value. + /// The extension process is running. public static ExtensionStatus Running { get; } = new("running"); - /// Gets the disabled value. + /// The extension is installed but disabled. public static ExtensionStatus Disabled { get; } = new("disabled"); - /// Gets the failed value. + /// The extension failed to start or crashed. public static ExtensionStatus Failed { get; } = new("failed"); - /// Gets the starting value. + /// The extension process is starting. public static ExtensionStatus Starting { get; } = new("starting"); /// Returns a value indicating whether two instances are equivalent. @@ -8183,7 +8226,7 @@ public SlashCommandInputCompletion(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the directory value. + /// Input should complete filesystem directories. public static SlashCommandInputCompletion Directory { get; } = new("directory"); /// Returns a value indicating whether two instances are equivalent. @@ -8242,13 +8285,13 @@ public SlashCommandKind(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the builtin value. + /// Command implemented by the runtime. public static SlashCommandKind Builtin { get; } = new("builtin"); - /// Gets the skill value. + /// Command backed by a skill. public static SlashCommandKind Skill { get; } = new("skill"); - /// Gets the client value. + /// Command registered by an SDK client or extension. public static SlashCommandKind Client { get; } = new("client"); /// Returns a value indicating whether two instances are equivalent. @@ -8307,13 +8350,13 @@ public UIElicitationResponseAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the accept value. + /// The user submitted the requested form values. public static UIElicitationResponseAction Accept { get; } = new("accept"); - /// Gets the decline value. + /// The user explicitly declined to provide the requested input. public static UIElicitationResponseAction Decline { get; } = new("decline"); - /// Gets the cancel value. + /// The user dismissed the elicitation request. public static UIElicitationResponseAction Cancel { get; } = new("cancel"); /// Returns a value indicating whether two instances are equivalent. @@ -8372,13 +8415,13 @@ public UIAutoModeSwitchResponse(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the yes value. + /// Allow the automatic mode switch for this turn. public static UIAutoModeSwitchResponse Yes { get; } = new("yes"); - /// Gets the yes_always value. + /// Allow this mode switch and persist the preference. public static UIAutoModeSwitchResponse YesAlways { get; } = new("yes_always"); - /// Gets the no value. + /// Decline the automatic mode switch. public static UIAutoModeSwitchResponse No { get; } = new("no"); /// Returns a value indicating whether two instances are equivalent. @@ -8437,16 +8480,16 @@ public UIExitPlanModeAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the exit_only value. + /// Exit plan mode without starting implementation. public static UIExitPlanModeAction ExitOnly { get; } = new("exit_only"); - /// Gets the interactive value. + /// Exit plan mode and continue interactively. public static UIExitPlanModeAction Interactive { get; } = new("interactive"); - /// Gets the autopilot value. + /// Exit plan mode and continue in autopilot mode. public static UIExitPlanModeAction Autopilot { get; } = new("autopilot"); - /// Gets the autopilot_fleet value. + /// Exit plan mode and continue in autopilot mode with parallel subagent execution. public static UIExitPlanModeAction AutopilotFleet { get; } = new("autopilot_fleet"); /// Returns a value indicating whether two instances are equivalent. @@ -8505,10 +8548,10 @@ public PermissionsConfigureAdditionalContentExclusionPolicyScope(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the repo value. + /// The content exclusion policy applies to the current repository. public static PermissionsConfigureAdditionalContentExclusionPolicyScope Repo { get; } = new("repo"); - /// Gets the all value. + /// The content exclusion policy applies across all repositories. public static PermissionsConfigureAdditionalContentExclusionPolicyScope All { get; } = new("all"); /// Returns a value indicating whether two instances are equivalent. @@ -8567,16 +8610,16 @@ public PermissionsSetApproveAllSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the cli_flag value. + /// Allow-all was enabled from a CLI command-line flag. public static PermissionsSetApproveAllSource CliFlag { get; } = new("cli_flag"); - /// Gets the slash_command value. + /// Allow-all was enabled by a slash command. public static PermissionsSetApproveAllSource SlashCommand { get; } = new("slash_command"); - /// Gets the autopilot_confirmation value. + /// Allow-all was enabled by confirming autopilot behavior. public static PermissionsSetApproveAllSource AutopilotConfirmation { get; } = new("autopilot_confirmation"); - /// Gets the rpc value. + /// Allow-all was enabled through an RPC caller. public static PermissionsSetApproveAllSource Rpc { get; } = new("rpc"); /// Returns a value indicating whether two instances are equivalent. @@ -8635,10 +8678,10 @@ public PermissionsModifyRulesScope(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the session value. + /// Apply the rule change only to this session. public static PermissionsModifyRulesScope Session { get; } = new("session"); - /// Gets the location value. + /// Persist the rule change for this project location. public static PermissionsModifyRulesScope Location { get; } = new("location"); /// Returns a value indicating whether two instances are equivalent. @@ -8698,13 +8741,13 @@ public MetadataSnapshotCurrentMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the interactive value. + /// The agent is responding interactively to the user. public static MetadataSnapshotCurrentMode Interactive { get; } = new("interactive"); - /// Gets the plan value. + /// The agent is preparing a plan before making changes. public static MetadataSnapshotCurrentMode Plan { get; } = new("plan"); - /// Gets the autopilot value. + /// The agent is working autonomously toward task completion. public static MetadataSnapshotCurrentMode Autopilot { get; } = new("autopilot"); /// Returns a value indicating whether two instances are equivalent. @@ -8764,10 +8807,10 @@ public MetadataSnapshotRemoteMetadataTaskType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the cca value. + /// Remote task originated from Copilot Coding Agent. public static MetadataSnapshotRemoteMetadataTaskType Cca { get; } = new("cca"); - /// Gets the cli value. + /// Remote task originated from a CLI remote-session invocation. public static MetadataSnapshotRemoteMetadataTaskType Cli { get; } = new("cli"); /// Returns a value indicating whether two instances are equivalent. @@ -8826,10 +8869,10 @@ public SessionMetadataSnapshotWorkspaceHostType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the github value. + /// Workspace summary repository is hosted on GitHub. public static SessionMetadataSnapshotWorkspaceHostType Github { get; } = new("github"); - /// Gets the ado value. + /// Workspace summary repository is hosted on Azure DevOps. public static SessionMetadataSnapshotWorkspaceHostType Ado { get; } = new("ado"); /// Returns a value indicating whether two instances are equivalent. @@ -8889,10 +8932,10 @@ public SessionWorkingDirectoryContextHostType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the github value. + /// The working directory repository is hosted on GitHub. public static SessionWorkingDirectoryContextHostType Github { get; } = new("github"); - /// Gets the ado value. + /// The working directory repository is hosted on Azure DevOps. public static SessionWorkingDirectoryContextHostType Ado { get; } = new("ado"); /// Returns a value indicating whether two instances are equivalent. @@ -8951,13 +8994,13 @@ public ShellKillSignal(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the SIGTERM value. + /// Request graceful process termination. public static ShellKillSignal SIGTERM { get; } = new("SIGTERM"); - /// Gets the SIGKILL value. + /// Forcefully terminate the process. public static ShellKillSignal SIGKILL { get; } = new("SIGKILL"); - /// Gets the SIGINT value. + /// Send an interrupt signal to the process. public static ShellKillSignal SIGINT { get; } = new("SIGINT"); /// Returns a value indicating whether two instances are equivalent. @@ -9017,10 +9060,10 @@ public QueuePendingItemsKind(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the message value. + /// A queued user message. public static QueuePendingItemsKind Message { get; } = new("message"); - /// Gets the command value. + /// A queued slash command or model-change command. public static QueuePendingItemsKind Command { get; } = new("command"); /// Returns a value indicating whether two instances are equivalent. @@ -9080,10 +9123,10 @@ public EventsCursorStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the ok value. + /// The cursor was applied successfully. public static EventsCursorStatus Ok { get; } = new("ok"); - /// Gets the expired value. + /// The cursor referred to history that is no longer available. public static EventsCursorStatus Expired { get; } = new("expired"); /// Returns a value indicating whether two instances are equivalent. @@ -9143,10 +9186,10 @@ public EventsAgentScope(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the primary value. + /// Return main-agent events and typed subagent lifecycle events. public static EventsAgentScope Primary { get; } = new("primary"); - /// Gets the all value. + /// Return events from all agents. public static EventsAgentScope All { get; } = new("all"); /// Returns a value indicating whether two instances are equivalent. @@ -9206,13 +9249,13 @@ public RemoteSessionMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the off value. + /// Disable remote session export and steering. public static RemoteSessionMode Off { get; } = new("off"); - /// Gets the export value. + /// Export session events to GitHub without enabling remote steering. public static RemoteSessionMode Export { get; } = new("export"); - /// Gets the on value. + /// Enable both remote session export and remote steering. public static RemoteSessionMode On { get; } = new("on"); /// Returns a value indicating whether two instances are equivalent. @@ -9271,10 +9314,10 @@ public SessionFsErrorCode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the ENOENT value. + /// The requested path does not exist. public static SessionFsErrorCode ENOENT { get; } = new("ENOENT"); - /// Gets the UNKNOWN value. + /// The filesystem operation failed for an unspecified reason. public static SessionFsErrorCode UNKNOWN { get; } = new("UNKNOWN"); /// Returns a value indicating whether two instances are equivalent. @@ -9333,10 +9376,10 @@ public SessionFsReaddirWithTypesEntryType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the file value. + /// The entry is a file. public static SessionFsReaddirWithTypesEntryType File { get; } = new("file"); - /// Gets the directory value. + /// The entry is a directory. public static SessionFsReaddirWithTypesEntryType Directory { get; } = new("directory"); /// Returns a value indicating whether two instances are equivalent. @@ -9395,13 +9438,13 @@ public SessionFsSqliteQueryType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the exec value. + /// Execute DDL or multi-statement SQL without returning rows. public static SessionFsSqliteQueryType Exec { get; } = new("exec"); - /// Gets the query value. + /// Execute a SELECT-style query and return rows. public static SessionFsSqliteQueryType Query { get; } = new("query"); - /// Gets the run value. + /// Execute INSERT, UPDATE, or DELETE SQL and return affected-row metadata. public static SessionFsSqliteQueryType Run { get; } = new("run"); /// Returns a value indicating whether two instances are equivalent. @@ -12844,6 +12887,7 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, FuncTime to first token in milliseconds. Only available for streaming requests. [JsonConverter(typeof(MillisecondsTimeSpanConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("ttftMs")] - public TimeSpan? Ttft { get; set; } + [JsonPropertyName("timeToFirstTokenMs")] + public TimeSpan? TimeToFirstToken { get; set; } } /// Failed LLM API call metadata for telemetry. @@ -3781,6 +3781,8 @@ public sealed partial class ToolExecutionCompleteContentResourceLink : ToolExecu public string? Title { get; set; } /// URI identifying the resource. + [Url] + [StringSyntax(StringSyntaxAttribute.Uri)] [JsonPropertyName("uri")] public required string Uri { get; set; } } @@ -3799,6 +3801,8 @@ public sealed partial class EmbeddedTextResourceContents public required string Text { get; set; } /// URI identifying the resource. + [Url] + [StringSyntax(StringSyntaxAttribute.Uri)] [JsonPropertyName("uri")] public required string Uri { get; set; } } @@ -3818,6 +3822,8 @@ public sealed partial class EmbeddedBlobResourceContents public string? MimeType { get; set; } /// URI identifying the resource. + [Url] + [StringSyntax(StringSyntaxAttribute.Uri)] [JsonPropertyName("uri")] public required string Uri { get; set; } } @@ -5308,10 +5314,10 @@ public WorkingDirectoryContextHostType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the github value. + /// Repository is hosted on GitHub. public static WorkingDirectoryContextHostType Github { get; } = new("github"); - /// Gets the ado value. + /// Repository is hosted on Azure DevOps. public static WorkingDirectoryContextHostType Ado { get; } = new("ado"); /// Returns a value indicating whether two instances are equivalent. @@ -5369,13 +5375,13 @@ public ReasoningSummary(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the none value. + /// Do not request reasoning summaries from the model. public static ReasoningSummary None { get; } = new("none"); - /// Gets the concise value. + /// Request a concise summary of the model's reasoning. public static ReasoningSummary Concise { get; } = new("concise"); - /// Gets the detailed value. + /// Request a detailed summary of the model's reasoning. public static ReasoningSummary Detailed { get; } = new("detailed"); /// Returns a value indicating whether two instances are equivalent. @@ -5433,13 +5439,13 @@ public SessionMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the interactive value. + /// The agent is responding interactively to the user. public static SessionMode Interactive { get; } = new("interactive"); - /// Gets the plan value. + /// The agent is preparing a plan before making changes. public static SessionMode Plan { get; } = new("plan"); - /// Gets the autopilot value. + /// The agent is working autonomously toward task completion. public static SessionMode Autopilot { get; } = new("autopilot"); /// Returns a value indicating whether two instances are equivalent. @@ -5497,13 +5503,13 @@ public PlanChangedOperation(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the create value. + /// The plan file was created. public static PlanChangedOperation Create { get; } = new("create"); - /// Gets the update value. + /// The plan file was updated. public static PlanChangedOperation Update { get; } = new("update"); - /// Gets the delete value. + /// The plan file was deleted. public static PlanChangedOperation Delete { get; } = new("delete"); /// Returns a value indicating whether two instances are equivalent. @@ -5561,10 +5567,10 @@ public WorkspaceFileChangedOperation(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the create value. + /// The workspace file was created. public static WorkspaceFileChangedOperation Create { get; } = new("create"); - /// Gets the update value. + /// The workspace file was updated. public static WorkspaceFileChangedOperation Update { get; } = new("update"); /// Returns a value indicating whether two instances are equivalent. @@ -5622,10 +5628,10 @@ public HandoffSourceType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the remote value. + /// The handoff originated from a remote session. public static HandoffSourceType Remote { get; } = new("remote"); - /// Gets the local value. + /// The handoff originated from a local session. public static HandoffSourceType Local { get; } = new("local"); /// Returns a value indicating whether two instances are equivalent. @@ -5683,10 +5689,10 @@ public ShutdownType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the routine value. + /// The session ended normally. public static ShutdownType Routine { get; } = new("routine"); - /// Gets the error value. + /// The session ended because of a crash or fatal error. public static ShutdownType Error { get; } = new("error"); /// Returns a value indicating whether two instances are equivalent. @@ -5744,16 +5750,16 @@ public UserMessageAgentMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the interactive value. + /// The agent is responding interactively to the user. public static UserMessageAgentMode Interactive { get; } = new("interactive"); - /// Gets the plan value. + /// The agent is preparing a plan before making changes. public static UserMessageAgentMode Plan { get; } = new("plan"); - /// Gets the autopilot value. + /// The agent is working autonomously toward task completion. public static UserMessageAgentMode Autopilot { get; } = new("autopilot"); - /// Gets the shell value. + /// The agent is in shell-focused UI mode. public static UserMessageAgentMode Shell { get; } = new("shell"); /// Returns a value indicating whether two instances are equivalent. @@ -5811,13 +5817,13 @@ public UserMessageAttachmentGithubReferenceType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the issue value. + /// GitHub issue reference. public static UserMessageAttachmentGithubReferenceType Issue { get; } = new("issue"); - /// Gets the pr value. + /// GitHub pull request reference. public static UserMessageAttachmentGithubReferenceType Pr { get; } = new("pr"); - /// Gets the discussion value. + /// GitHub discussion reference. public static UserMessageAttachmentGithubReferenceType Discussion { get; } = new("discussion"); /// Returns a value indicating whether two instances are equivalent. @@ -5875,10 +5881,10 @@ public AssistantMessageToolRequestType(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the function value. + /// Standard function-style tool call. public static AssistantMessageToolRequestType Function { get; } = new("function"); - /// Gets the custom value. + /// Custom grammar-based tool call. public static AssistantMessageToolRequestType Custom { get; } = new("custom"); /// Returns a value indicating whether two instances are equivalent. @@ -5936,16 +5942,16 @@ public AssistantUsageApiEndpoint(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the /chat/completions value. + /// Chat Completions API endpoint. public static AssistantUsageApiEndpoint ChatCompletions { get; } = new("/chat/completions"); - /// Gets the /v1/messages value. + /// Anthropic Messages API endpoint. public static AssistantUsageApiEndpoint V1Messages { get; } = new("/v1/messages"); - /// Gets the /responses value. + /// Responses API endpoint. public static AssistantUsageApiEndpoint Responses { get; } = new("/responses"); - /// Gets the ws:/responses value. + /// WebSocket Responses API endpoint. public static AssistantUsageApiEndpoint WsResponses { get; } = new("ws:/responses"); /// Returns a value indicating whether two instances are equivalent. @@ -6003,13 +6009,13 @@ public ModelCallFailureSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the top_level value. + /// Model call from the top-level agent. public static ModelCallFailureSource TopLevel { get; } = new("top_level"); - /// Gets the subagent value. + /// Model call from a sub-agent. public static ModelCallFailureSource Subagent { get; } = new("subagent"); - /// Gets the mcp_sampling value. + /// Model call from MCP sampling. public static ModelCallFailureSource McpSampling { get; } = new("mcp_sampling"); /// Returns a value indicating whether two instances are equivalent. @@ -6067,13 +6073,13 @@ public AbortReason(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the user_initiated value. + /// The local user requested the abort, for example by pressing Ctrl+C in the CLI. public static AbortReason UserInitiated { get; } = new("user_initiated"); - /// Gets the remote_command value. + /// A remote command requested the abort. public static AbortReason RemoteCommand { get; } = new("remote_command"); - /// Gets the user_abort value. + /// An MCP server delivered a user.abort notification. public static AbortReason UserAbort { get; } = new("user_abort"); /// Returns a value indicating whether two instances are equivalent. @@ -6131,10 +6137,10 @@ public ToolExecutionCompleteContentResourceLinkIconTheme(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the light value. + /// Icon intended for light themes. public static ToolExecutionCompleteContentResourceLinkIconTheme Light { get; } = new("light"); - /// Gets the dark value. + /// Icon intended for dark themes. public static ToolExecutionCompleteContentResourceLinkIconTheme Dark { get; } = new("dark"); /// Returns a value indicating whether two instances are equivalent. @@ -6192,10 +6198,10 @@ public SystemMessageRole(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the system value. + /// System prompt message. public static SystemMessageRole System { get; } = new("system"); - /// Gets the developer value. + /// Developer instruction message. public static SystemMessageRole Developer { get; } = new("developer"); /// Returns a value indicating whether two instances are equivalent. @@ -6253,10 +6259,10 @@ public SystemNotificationAgentCompletedStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the completed value. + /// The agent completed successfully. public static SystemNotificationAgentCompletedStatus Completed { get; } = new("completed"); - /// Gets the failed value. + /// The agent failed. public static SystemNotificationAgentCompletedStatus Failed { get; } = new("failed"); /// Returns a value indicating whether two instances are equivalent. @@ -6314,10 +6320,10 @@ public PermissionRequestMemoryAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the store value. + /// Store a new memory. public static PermissionRequestMemoryAction Store { get; } = new("store"); - /// Gets the vote value. + /// Vote on an existing memory. public static PermissionRequestMemoryAction Vote { get; } = new("vote"); /// Returns a value indicating whether two instances are equivalent. @@ -6375,10 +6381,10 @@ public PermissionRequestMemoryDirection(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the upvote value. + /// Vote that the memory is useful or accurate. public static PermissionRequestMemoryDirection Upvote { get; } = new("upvote"); - /// Gets the downvote value. + /// Vote that the memory is incorrect or outdated. public static PermissionRequestMemoryDirection Downvote { get; } = new("downvote"); /// Returns a value indicating whether two instances are equivalent. @@ -6436,13 +6442,13 @@ public PermissionPromptRequestPathAccessKind(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the read value. + /// Read access to a filesystem path. public static PermissionPromptRequestPathAccessKind Read { get; } = new("read"); - /// Gets the shell value. + /// Shell command access involving a filesystem path. public static PermissionPromptRequestPathAccessKind Shell { get; } = new("shell"); - /// Gets the write value. + /// Write access to a filesystem path. public static PermissionPromptRequestPathAccessKind Write { get; } = new("write"); /// Returns a value indicating whether two instances are equivalent. @@ -6500,10 +6506,10 @@ public ElicitationRequestedMode(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the form value. + /// Structured form-based elicitation. public static ElicitationRequestedMode Form { get; } = new("form"); - /// Gets the url value. + /// Browser URL-based elicitation. public static ElicitationRequestedMode Url { get; } = new("url"); /// Returns a value indicating whether two instances are equivalent. @@ -6561,13 +6567,13 @@ public ElicitationCompletedAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the accept value. + /// The user submitted the requested form. public static ElicitationCompletedAction Accept { get; } = new("accept"); - /// Gets the decline value. + /// The user explicitly declined the request. public static ElicitationCompletedAction Decline { get; } = new("decline"); - /// Gets the cancel value. + /// The user dismissed the request. public static ElicitationCompletedAction Cancel { get; } = new("cancel"); /// Returns a value indicating whether two instances are equivalent. @@ -6625,13 +6631,13 @@ public AutoModeSwitchResponse(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the yes value. + /// Switch models for this request. public static AutoModeSwitchResponse Yes { get; } = new("yes"); - /// Gets the yes_always value. + /// Switch models now and keep using the replacement automatically. public static AutoModeSwitchResponse YesAlways { get; } = new("yes_always"); - /// Gets the no value. + /// Do not switch models. public static AutoModeSwitchResponse No { get; } = new("no"); /// Returns a value indicating whether two instances are equivalent. @@ -6689,16 +6695,16 @@ public ExitPlanModeAction(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the exit_only value. + /// Exit plan mode without starting implementation. public static ExitPlanModeAction ExitOnly { get; } = new("exit_only"); - /// Gets the interactive value. + /// Exit plan mode and continue in interactive mode. public static ExitPlanModeAction Interactive { get; } = new("interactive"); - /// Gets the autopilot value. + /// Exit plan mode and continue autonomously. public static ExitPlanModeAction Autopilot { get; } = new("autopilot"); - /// Gets the autopilot_fleet value. + /// Exit plan mode and continue with parallel autonomous workers. public static ExitPlanModeAction AutopilotFleet { get; } = new("autopilot_fleet"); /// Returns a value indicating whether two instances are equivalent. @@ -6756,25 +6762,25 @@ public SkillSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the project value. + /// Skill defined in the current project's skill directories. public static SkillSource Project { get; } = new("project"); - /// Gets the inherited value. + /// Skill discovered from a parent directory in the current workspace tree. public static SkillSource Inherited { get; } = new("inherited"); - /// Gets the personal-copilot value. + /// Skill defined in the user's Copilot skill directory. public static SkillSource PersonalCopilot { get; } = new("personal-copilot"); - /// Gets the personal-agents value. + /// Skill defined in the user's personal agents skill directory. public static SkillSource PersonalAgents { get; } = new("personal-agents"); - /// Gets the plugin value. + /// Skill provided by an installed plugin. public static SkillSource Plugin { get; } = new("plugin"); - /// Gets the custom value. + /// Skill loaded from a configured custom skill directory. public static SkillSource Custom { get; } = new("custom"); - /// Gets the builtin value. + /// Skill bundled with the runtime. public static SkillSource Builtin { get; } = new("builtin"); /// Returns a value indicating whether two instances are equivalent. @@ -6832,16 +6838,16 @@ public McpServerSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the user value. + /// Server configured in the user's global MCP configuration. public static McpServerSource User { get; } = new("user"); - /// Gets the workspace value. + /// Server configured by the current workspace. public static McpServerSource Workspace { get; } = new("workspace"); - /// Gets the plugin value. + /// Server contributed by an installed plugin. public static McpServerSource Plugin { get; } = new("plugin"); - /// Gets the builtin value. + /// Server bundled with the runtime. public static McpServerSource Builtin { get; } = new("builtin"); /// Returns a value indicating whether two instances are equivalent. @@ -6899,22 +6905,22 @@ public McpServerStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the connected value. + /// The server is connected and available. public static McpServerStatus Connected { get; } = new("connected"); - /// Gets the failed value. + /// The server failed to connect or initialize. public static McpServerStatus Failed { get; } = new("failed"); - /// Gets the needs-auth value. + /// The server requires authentication before it can connect. public static McpServerStatus NeedsAuth { get; } = new("needs-auth"); - /// Gets the pending value. + /// The server connection is still being established. public static McpServerStatus Pending { get; } = new("pending"); - /// Gets the disabled value. + /// The server is configured but disabled. public static McpServerStatus Disabled { get; } = new("disabled"); - /// Gets the not_configured value. + /// The server is not configured for this session. public static McpServerStatus NotConfigured { get; } = new("not_configured"); /// Returns a value indicating whether two instances are equivalent. @@ -6972,10 +6978,10 @@ public ExtensionsLoadedExtensionSource(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the project value. + /// Extension discovered from the current project. public static ExtensionsLoadedExtensionSource Project { get; } = new("project"); - /// Gets the user value. + /// Extension discovered from the user's extension directory. public static ExtensionsLoadedExtensionSource User { get; } = new("user"); /// Returns a value indicating whether two instances are equivalent. @@ -7033,16 +7039,16 @@ public ExtensionsLoadedExtensionStatus(string value) /// Gets the value associated with this . public string Value => _value ?? string.Empty; - /// Gets the running value. + /// The extension process is running. public static ExtensionsLoadedExtensionStatus Running { get; } = new("running"); - /// Gets the disabled value. + /// The extension is installed but disabled. public static ExtensionsLoadedExtensionStatus Disabled { get; } = new("disabled"); - /// Gets the failed value. + /// The extension failed to start or crashed. public static ExtensionsLoadedExtensionStatus Failed { get; } = new("failed"); - /// Gets the starting value. + /// The extension process is starting. public static ExtensionsLoadedExtensionStatus Starting { get; } = new("starting"); /// Returns a value indicating whether two instances are equivalent. diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 510a31246..9a968c6f4 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -4102,6 +4102,24 @@ func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } +// Schema for the `SlashCommandSelectSubcommandResult` type. +type SlashCommandSelectSubcommandResult struct { + // Parent command name that requires subcommand selection + Command string `json:"command"` + // Available subcommand options for the client to present + Options []SlashCommandSelectSubcommandOption `json:"options"` + // True when the invocation mutated user runtime settings; consumers caching settings should + // refresh + RuntimeSettingsChanged *bool `json:"runtimeSettingsChanged,omitempty"` + // Human-readable title for the selection UI + Title string `json:"title"` +} + +func (SlashCommandSelectSubcommandResult) slashCommandInvocationResult() {} +func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKind { + return SlashCommandInvocationResultKindSelectSubcommand +} + // Schema for the `SlashCommandTextResult` type. type SlashCommandTextResult struct { // Whether text contains Markdown @@ -4120,6 +4138,16 @@ func (SlashCommandTextResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindText } +// Schema for the `SlashCommandSelectSubcommandOption` type. +type SlashCommandSelectSubcommandOption struct { + // Human-readable description of the subcommand + Description string `json:"description"` + // Optional group label for organizing options + Group *string `json:"group,omitempty"` + // Subcommand name to invoke + Name string `json:"name"` +} + // Schema for the `TaskAgentProgress` type. // Experimental: TaskAgentProgress is part of an experimental API and may change or be // removed. @@ -5157,8 +5185,11 @@ type WorkspaceSummary struct { type AbortReason string const ( + // A remote command requested the abort. AbortReasonRemoteCommand AbortReason = "remote_command" - AbortReasonUserAbort AbortReason = "user_abort" + // An MCP server delivered a user.abort notification. + AbortReasonUserAbort AbortReason = "user_abort" + // The local user requested the abort, for example by pressing Ctrl+C in the CLI. AbortReasonUserInitiated AbortReason = "user_initiated" ) @@ -5167,12 +5198,18 @@ const ( type AgentInfoSource string const ( - AgentInfoSourceBuiltin AgentInfoSource = "builtin" + // Agent built into the Copilot runtime. + AgentInfoSourceBuiltin AgentInfoSource = "builtin" + // Agent inherited from a parent project or workspace. AgentInfoSourceInherited AgentInfoSource = "inherited" - AgentInfoSourcePlugin AgentInfoSource = "plugin" - AgentInfoSourceProject AgentInfoSource = "project" - AgentInfoSourceRemote AgentInfoSource = "remote" - AgentInfoSourceUser AgentInfoSource = "user" + // Agent contributed by an installed plugin. + AgentInfoSourcePlugin AgentInfoSource = "plugin" + // Agent loaded from the current project's repository configuration. + AgentInfoSourceProject AgentInfoSource = "project" + // Agent provided by a remote runtime or service. + AgentInfoSourceRemote AgentInfoSource = "remote" + // Agent loaded from the user's personal agent configuration. + AgentInfoSourceUser AgentInfoSource = "user" ) // Type discriminator for AuthInfo. @@ -5194,7 +5231,9 @@ const ( type ConnectedRemoteSessionMetadataKind string const ( - ConnectedRemoteSessionMetadataKindCodingAgent ConnectedRemoteSessionMetadataKind = "coding-agent" + // GitHub Copilot coding agent session. + ConnectedRemoteSessionMetadataKindCodingAgent ConnectedRemoteSessionMetadataKind = "coding-agent" + // Remote CLI session. ConnectedRemoteSessionMetadataKindRemoteSession ConnectedRemoteSessionMetadataKind = "remote-session" ) @@ -5204,9 +5243,12 @@ const ( type ContentFilterMode string const ( + // Remove characters that can hide directives. ContentFilterModeHiddenCharacters ContentFilterMode = "hidden_characters" - ContentFilterModeMarkdown ContentFilterMode = "markdown" - ContentFilterModeNone ContentFilterMode = "none" + // Sanitize HTML while preserving Markdown-friendly output. + ContentFilterModeMarkdown ContentFilterMode = "markdown" + // Leave MCP tool result content unchanged. + ContentFilterModeNone ContentFilterMode = "none" ) // Authentication host (always the public GitHub host). @@ -5220,10 +5262,14 @@ const ( type DiscoveredMcpServerType string const ( - DiscoveredMcpServerTypeHTTP DiscoveredMcpServerType = "http" + // Server communicates over streamable HTTP. + DiscoveredMcpServerTypeHTTP DiscoveredMcpServerType = "http" + // Server is backed by an in-memory runtime implementation. DiscoveredMcpServerTypeMemory DiscoveredMcpServerType = "memory" - DiscoveredMcpServerTypeSse DiscoveredMcpServerType = "sse" - DiscoveredMcpServerTypeStdio DiscoveredMcpServerType = "stdio" + // Server communicates over Server-Sent Events. + DiscoveredMcpServerTypeSse DiscoveredMcpServerType = "sse" + // Server communicates over stdio with a local child process. + DiscoveredMcpServerTypeStdio DiscoveredMcpServerType = "stdio" ) type EventLogTypesString string @@ -5241,7 +5287,9 @@ const ( type EventsAgentScope string const ( - EventsAgentScopeAll EventsAgentScope = "all" + // Return events from all agents. + EventsAgentScopeAll EventsAgentScope = "all" + // Return main-agent events and typed subagent lifecycle events. EventsAgentScopePrimary EventsAgentScope = "primary" ) @@ -5253,8 +5301,10 @@ const ( type EventsCursorStatus string const ( + // The cursor referred to history that is no longer available. EventsCursorStatusExpired EventsCursorStatus = "expired" - EventsCursorStatusOk EventsCursorStatus = "ok" + // The cursor was applied successfully. + EventsCursorStatusOk EventsCursorStatus = "ok" ) // Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) @@ -5262,8 +5312,10 @@ const ( type ExtensionSource string const ( + // Extension discovered from the current project's .github/extensions directory. ExtensionSourceProject ExtensionSource = "project" - ExtensionSourceUser ExtensionSource = "user" + // Extension discovered from the user's ~/.copilot/extensions directory. + ExtensionSourceUser ExtensionSource = "user" ) // Current status: running, disabled, failed, or starting @@ -5271,9 +5323,13 @@ const ( type ExtensionStatus string const ( + // The extension is installed but disabled. ExtensionStatusDisabled ExtensionStatus = "disabled" - ExtensionStatusFailed ExtensionStatus = "failed" - ExtensionStatusRunning ExtensionStatus = "running" + // The extension failed to start or crashed. + ExtensionStatusFailed ExtensionStatus = "failed" + // The extension process is running. + ExtensionStatusRunning ExtensionStatus = "running" + // The extension process is starting. ExtensionStatusStarting ExtensionStatus = "starting" ) @@ -5282,7 +5338,9 @@ const ( type ExternalToolTextResultForLlmBinaryResultsForLlmType string const ( - ExternalToolTextResultForLlmBinaryResultsForLlmTypeImage ExternalToolTextResultForLlmBinaryResultsForLlmType = "image" + // Binary image data. + ExternalToolTextResultForLlmBinaryResultsForLlmTypeImage ExternalToolTextResultForLlmBinaryResultsForLlmType = "image" + // Other binary resource data. ExternalToolTextResultForLlmBinaryResultsForLlmTypeResource ExternalToolTextResultForLlmBinaryResultsForLlmType = "resource" ) @@ -5290,7 +5348,9 @@ const ( type ExternalToolTextResultForLlmContentResourceLinkIconTheme string const ( - ExternalToolTextResultForLlmContentResourceLinkIconThemeDark ExternalToolTextResultForLlmContentResourceLinkIconTheme = "dark" + // Icon intended for dark themes. + ExternalToolTextResultForLlmContentResourceLinkIconThemeDark ExternalToolTextResultForLlmContentResourceLinkIconTheme = "dark" + // Icon intended for light themes. ExternalToolTextResultForLlmContentResourceLinkIconThemeLight ExternalToolTextResultForLlmContentResourceLinkIconTheme = "light" ) @@ -5338,9 +5398,13 @@ const ( type InstructionsSourcesLocation string const ( - InstructionsSourcesLocationPlugin InstructionsSourcesLocation = "plugin" - InstructionsSourcesLocationRepository InstructionsSourcesLocation = "repository" - InstructionsSourcesLocationUser InstructionsSourcesLocation = "user" + // Instructions live in plugin-provided configuration. + InstructionsSourcesLocationPlugin InstructionsSourcesLocation = "plugin" + // Instructions live in repository-level configuration. + InstructionsSourcesLocationRepository InstructionsSourcesLocation = "repository" + // Instructions live in user-level configuration. + InstructionsSourcesLocationUser InstructionsSourcesLocation = "user" + // Instructions live under the current working directory. InstructionsSourcesLocationWorkingDirectory InstructionsSourcesLocation = "working-directory" ) @@ -5348,13 +5412,20 @@ const ( type InstructionsSourcesType string const ( + // Instructions inherited from child instruction files. InstructionsSourcesTypeChildInstructions InstructionsSourcesType = "child-instructions" - InstructionsSourcesTypeHome InstructionsSourcesType = "home" - InstructionsSourcesTypeModel InstructionsSourcesType = "model" - InstructionsSourcesTypeNestedAgents InstructionsSourcesType = "nested-agents" - InstructionsSourcesTypePlugin InstructionsSourcesType = "plugin" - InstructionsSourcesTypeRepo InstructionsSourcesType = "repo" - InstructionsSourcesTypeVscode InstructionsSourcesType = "vscode" + // Instructions loaded from the user's home configuration. + InstructionsSourcesTypeHome InstructionsSourcesType = "home" + // Instructions loaded from model-specific files. + InstructionsSourcesTypeModel InstructionsSourcesType = "model" + // Instructions discovered from nested agent files. + InstructionsSourcesTypeNestedAgents InstructionsSourcesType = "nested-agents" + // Instructions supplied by an installed plugin. + InstructionsSourcesTypePlugin InstructionsSourcesType = "plugin" + // Instructions loaded from repository-scoped files. + InstructionsSourcesTypeRepo InstructionsSourcesType = "repo" + // Instructions loaded from VS Code instruction files. + InstructionsSourcesTypeVscode InstructionsSourcesType = "vscode" ) // Outcome of the sampling inference. 'success' produced a response; 'failure' encountered @@ -5365,16 +5436,21 @@ const ( type McpSamplingExecutionAction string const ( + // The sampling inference was cancelled before completion. McpSamplingExecutionActionCancelled McpSamplingExecutionAction = "cancelled" - McpSamplingExecutionActionFailure McpSamplingExecutionAction = "failure" - McpSamplingExecutionActionSuccess McpSamplingExecutionAction = "success" + // The sampling inference failed or was rejected. + McpSamplingExecutionActionFailure McpSamplingExecutionAction = "failure" + // The sampling inference completed and produced a result. + McpSamplingExecutionActionSuccess McpSamplingExecutionAction = "success" ) // OAuth grant type to use when authenticating to the remote MCP server. type McpServerConfigHTTPOauthGrantType string const ( + // Interactive browser-based authorization code flow with PKCE. McpServerConfigHTTPOauthGrantTypeAuthorizationCode McpServerConfigHTTPOauthGrantType = "authorization_code" + // Headless client credentials flow using the configured OAuth client. McpServerConfigHTTPOauthGrantTypeClientCredentials McpServerConfigHTTPOauthGrantType = "client_credentials" ) @@ -5382,17 +5458,23 @@ const ( type McpServerConfigHTTPType string const ( + // Streamable HTTP transport. McpServerConfigHTTPTypeHTTP McpServerConfigHTTPType = "http" - McpServerConfigHTTPTypeSse McpServerConfigHTTPType = "sse" + // Server-Sent Events transport. + McpServerConfigHTTPTypeSse McpServerConfigHTTPType = "sse" ) // Configuration source: user, workspace, plugin, or builtin type McpServerSource string const ( - McpServerSourceBuiltin McpServerSource = "builtin" - McpServerSourcePlugin McpServerSource = "plugin" - McpServerSourceUser McpServerSource = "user" + // Server bundled with the runtime. + McpServerSourceBuiltin McpServerSource = "builtin" + // Server contributed by an installed plugin. + McpServerSourcePlugin McpServerSource = "plugin" + // Server configured in the user's global MCP configuration. + McpServerSourceUser McpServerSource = "user" + // Server configured by the current workspace. McpServerSourceWorkspace McpServerSource = "workspace" ) @@ -5401,12 +5483,18 @@ const ( type McpServerStatus string const ( - McpServerStatusConnected McpServerStatus = "connected" - McpServerStatusDisabled McpServerStatus = "disabled" - McpServerStatusFailed McpServerStatus = "failed" - McpServerStatusNeedsAuth McpServerStatus = "needs-auth" + // The server is connected and available. + McpServerStatusConnected McpServerStatus = "connected" + // The server is configured but disabled. + McpServerStatusDisabled McpServerStatus = "disabled" + // The server failed to connect or initialize. + McpServerStatusFailed McpServerStatus = "failed" + // The server requires authentication before it can connect. + McpServerStatusNeedsAuth McpServerStatus = "needs-auth" + // The server is not configured for this session. McpServerStatusNotConfigured McpServerStatus = "not_configured" - McpServerStatusPending McpServerStatus = "pending" + // The server connection is still being established. + McpServerStatusPending McpServerStatus = "pending" ) // How environment-variable values supplied to MCP servers are resolved. "direct" passes @@ -5419,7 +5507,9 @@ const ( type McpSetEnvValueModeDetails string const ( - McpSetEnvValueModeDetailsDirect McpSetEnvValueModeDetails = "direct" + // Treat MCP server environment values as literal strings. + McpSetEnvValueModeDetailsDirect McpSetEnvValueModeDetails = "direct" + // Treat MCP server environment values as host-side references to resolve before launch. McpSetEnvValueModeDetailsIndirect McpSetEnvValueModeDetails = "indirect" ) @@ -5429,9 +5519,12 @@ const ( type MetadataSnapshotCurrentMode string const ( - MetadataSnapshotCurrentModeAutopilot MetadataSnapshotCurrentMode = "autopilot" + // The agent is working autonomously toward task completion. + MetadataSnapshotCurrentModeAutopilot MetadataSnapshotCurrentMode = "autopilot" + // The agent is responding interactively to the user. MetadataSnapshotCurrentModeInteractive MetadataSnapshotCurrentMode = "interactive" - MetadataSnapshotCurrentModePlan MetadataSnapshotCurrentMode = "plan" + // The agent is preparing a plan before making changes. + MetadataSnapshotCurrentModePlan MetadataSnapshotCurrentMode = "plan" ) // Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` @@ -5441,7 +5534,9 @@ const ( type MetadataSnapshotRemoteMetadataTaskType string const ( + // Remote task originated from Copilot Coding Agent. MetadataSnapshotRemoteMetadataTaskTypeCca MetadataSnapshotRemoteMetadataTaskType = "cca" + // Remote task originated from a CLI remote-session invocation. MetadataSnapshotRemoteMetadataTaskTypeCli MetadataSnapshotRemoteMetadataTaskType = "cli" ) @@ -5449,18 +5544,25 @@ const ( type ModelPickerCategory string const ( + // Lightweight model category optimized for faster, lower-cost interactions. ModelPickerCategoryLightweight ModelPickerCategory = "lightweight" - ModelPickerCategoryPowerful ModelPickerCategory = "powerful" - ModelPickerCategoryVersatile ModelPickerCategory = "versatile" + // Powerful model category optimized for complex tasks. + ModelPickerCategoryPowerful ModelPickerCategory = "powerful" + // Versatile model category suitable for a broad range of tasks. + ModelPickerCategoryVersatile ModelPickerCategory = "versatile" ) // Relative cost tier for token-based billing users type ModelPickerPriceCategory string const ( - ModelPickerPriceCategoryHigh ModelPickerPriceCategory = "high" - ModelPickerPriceCategoryLow ModelPickerPriceCategory = "low" - ModelPickerPriceCategoryMedium ModelPickerPriceCategory = "medium" + // High relative token cost tier. + ModelPickerPriceCategoryHigh ModelPickerPriceCategory = "high" + // Lowest relative token cost tier. + ModelPickerPriceCategoryLow ModelPickerPriceCategory = "low" + // Medium relative token cost tier. + ModelPickerPriceCategoryMedium ModelPickerPriceCategory = "medium" + // Highest relative token cost tier. ModelPickerPriceCategoryVeryHigh ModelPickerPriceCategory = "very_high" ) @@ -5468,8 +5570,11 @@ const ( type ModelPolicyState string const ( - ModelPolicyStateDisabled ModelPolicyState = "disabled" - ModelPolicyStateEnabled ModelPolicyState = "enabled" + // The model is disabled by policy. + ModelPolicyStateDisabled ModelPolicyState = "disabled" + // The model is enabled by policy. + ModelPolicyStateEnabled ModelPolicyState = "enabled" + // No explicit policy is configured for the model. ModelPolicyStateUnconfigured ModelPolicyState = "unconfigured" ) @@ -5480,7 +5585,9 @@ const ( type OptionsUpdateEnvValueMode string const ( - OptionsUpdateEnvValueModeDirect OptionsUpdateEnvValueMode = "direct" + // Pass MCP server environment values as literal strings. + OptionsUpdateEnvValueModeDirect OptionsUpdateEnvValueMode = "direct" + // Resolve MCP server environment values from host-side references. OptionsUpdateEnvValueModeIndirect OptionsUpdateEnvValueMode = "indirect" ) @@ -5540,7 +5647,9 @@ const ( type PermissionsConfigureAdditionalContentExclusionPolicyScope string const ( - PermissionsConfigureAdditionalContentExclusionPolicyScopeAll PermissionsConfigureAdditionalContentExclusionPolicyScope = "all" + // The content exclusion policy applies across all repositories. + PermissionsConfigureAdditionalContentExclusionPolicyScopeAll PermissionsConfigureAdditionalContentExclusionPolicyScope = "all" + // The content exclusion policy applies to the current repository. PermissionsConfigureAdditionalContentExclusionPolicyScopeRepo PermissionsConfigureAdditionalContentExclusionPolicyScope = "repo" ) @@ -5549,18 +5658,24 @@ const ( type PermissionsModifyRulesScope string const ( + // Persist the rule change for this project location. PermissionsModifyRulesScopeLocation PermissionsModifyRulesScope = "location" - PermissionsModifyRulesScopeSession PermissionsModifyRulesScope = "session" + // Apply the rule change only to this session. + PermissionsModifyRulesScopeSession PermissionsModifyRulesScope = "session" ) // Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. type PermissionsSetApproveAllSource string const ( + // Allow-all was enabled by confirming autopilot behavior. PermissionsSetApproveAllSourceAutopilotConfirmation PermissionsSetApproveAllSource = "autopilot_confirmation" - PermissionsSetApproveAllSourceCliFlag PermissionsSetApproveAllSource = "cli_flag" - PermissionsSetApproveAllSourceRPC PermissionsSetApproveAllSource = "rpc" - PermissionsSetApproveAllSourceSlashCommand PermissionsSetApproveAllSource = "slash_command" + // Allow-all was enabled from a CLI command-line flag. + PermissionsSetApproveAllSourceCliFlag PermissionsSetApproveAllSource = "cli_flag" + // Allow-all was enabled through an RPC caller. + PermissionsSetApproveAllSourceRPC PermissionsSetApproveAllSource = "rpc" + // Allow-all was enabled by a slash command. + PermissionsSetApproveAllSourceSlashCommand PermissionsSetApproveAllSource = "slash_command" ) // Whether this item is a queued user message or a queued slash command / model change @@ -5569,7 +5684,9 @@ const ( type QueuePendingItemsKind string const ( + // A queued slash command or model-change command. QueuePendingItemsKindCommand QueuePendingItemsKind = "command" + // A queued user message. QueuePendingItemsKindMessage QueuePendingItemsKind = "message" ) @@ -5577,9 +5694,12 @@ const ( type ReasoningSummary string const ( - ReasoningSummaryConcise ReasoningSummary = "concise" + // Request a concise summary of the model's reasoning. + ReasoningSummaryConcise ReasoningSummary = "concise" + // Request a detailed summary of the model's reasoning. ReasoningSummaryDetailed ReasoningSummary = "detailed" - ReasoningSummaryNone ReasoningSummary = "none" + // Do not request reasoning summaries from the model. + ReasoningSummaryNone ReasoningSummary = "none" ) // Per-session remote mode. "off" disables remote, "export" exports session events to GitHub @@ -5589,9 +5709,12 @@ const ( type RemoteSessionMode string const ( + // Export session events to GitHub without enabling remote steering. RemoteSessionModeExport RemoteSessionMode = "export" - RemoteSessionModeOff RemoteSessionMode = "off" - RemoteSessionModeOn RemoteSessionMode = "on" + // Disable remote session export and steering. + RemoteSessionModeOff RemoteSessionMode = "off" + // Enable both remote session export and remote steering. + RemoteSessionModeOn RemoteSessionMode = "on" ) // The UI mode the agent was in when this message was sent. Defaults to the session's @@ -5599,19 +5722,26 @@ const ( type SendAgentMode string const ( - SendAgentModeAutopilot SendAgentMode = "autopilot" + // The agent is working autonomously toward task completion. + SendAgentModeAutopilot SendAgentMode = "autopilot" + // The agent is responding interactively to the user. SendAgentModeInteractive SendAgentMode = "interactive" - SendAgentModePlan SendAgentMode = "plan" - SendAgentModeShell SendAgentMode = "shell" + // The agent is preparing a plan before making changes. + SendAgentModePlan SendAgentMode = "plan" + // The agent is in shell-focused UI mode. + SendAgentModeShell SendAgentMode = "shell" ) // Type of GitHub reference type SendAttachmentGithubReferenceType string const ( + // GitHub discussion reference. SendAttachmentGithubReferenceTypeDiscussion SendAttachmentGithubReferenceType = "discussion" - SendAttachmentGithubReferenceTypeIssue SendAttachmentGithubReferenceType = "issue" - SendAttachmentGithubReferenceTypePr SendAttachmentGithubReferenceType = "pr" + // GitHub issue reference. + SendAttachmentGithubReferenceTypeIssue SendAttachmentGithubReferenceType = "issue" + // GitHub pull request reference. + SendAttachmentGithubReferenceTypePr SendAttachmentGithubReferenceType = "pr" ) // Type discriminator for SendAttachment. @@ -5630,7 +5760,9 @@ const ( type SendMode string const ( - SendModeEnqueue SendMode = "enqueue" + // Append the message to the normal session queue. + SendModeEnqueue SendMode = "enqueue" + // Interject the message during the in-progress turn. SendModeImmediate SendMode = "immediate" ) @@ -5640,7 +5772,9 @@ const ( type SessionContextHostType string const ( - SessionContextHostTypeAdo SessionContextHostType = "ado" + // Session repository is hosted on Azure DevOps. + SessionContextHostTypeAdo SessionContextHostType = "ado" + // Session repository is hosted on GitHub. SessionContextHostTypeGithub SessionContextHostType = "github" ) @@ -5648,7 +5782,9 @@ const ( type SessionFsErrorCode string const ( - SessionFsErrorCodeENOENT SessionFsErrorCode = "ENOENT" + // The requested path does not exist. + SessionFsErrorCodeENOENT SessionFsErrorCode = "ENOENT" + // The filesystem operation failed for an unspecified reason. SessionFsErrorCodeUNKNOWN SessionFsErrorCode = "UNKNOWN" ) @@ -5656,15 +5792,19 @@ const ( type SessionFsReaddirWithTypesEntryType string const ( + // The entry is a directory. SessionFsReaddirWithTypesEntryTypeDirectory SessionFsReaddirWithTypesEntryType = "directory" - SessionFsReaddirWithTypesEntryTypeFile SessionFsReaddirWithTypesEntryType = "file" + // The entry is a file. + SessionFsReaddirWithTypesEntryTypeFile SessionFsReaddirWithTypesEntryType = "file" ) // Path conventions used by this filesystem type SessionFsSetProviderConventions string const ( - SessionFsSetProviderConventionsPosix SessionFsSetProviderConventions = "posix" + // Paths use POSIX path conventions. + SessionFsSetProviderConventionsPosix SessionFsSetProviderConventions = "posix" + // Paths use Windows path conventions. SessionFsSetProviderConventionsWindows SessionFsSetProviderConventions = "windows" ) @@ -5673,9 +5813,12 @@ const ( type SessionFsSqliteQueryType string const ( - SessionFsSqliteQueryTypeExec SessionFsSqliteQueryType = "exec" + // Execute DDL or multi-statement SQL without returning rows. + SessionFsSqliteQueryTypeExec SessionFsSqliteQueryType = "exec" + // Execute a SELECT-style query and return rows. SessionFsSqliteQueryTypeQuery SessionFsSqliteQueryType = "query" - SessionFsSqliteQueryTypeRun SessionFsSqliteQueryType = "run" + // Execute INSERT, UPDATE, or DELETE SQL and return affected-row metadata. + SessionFsSqliteQueryTypeRun SessionFsSqliteQueryType = "run" ) // Constant value. Always "github". @@ -5704,8 +5847,11 @@ const ( type SessionLogLevel string const ( - SessionLogLevelError SessionLogLevel = "error" - SessionLogLevelInfo SessionLogLevel = "info" + // Error message describing a failure. + SessionLogLevelError SessionLogLevel = "error" + // Informational message. + SessionLogLevelInfo SessionLogLevel = "info" + // Warning message that may require attention. SessionLogLevelWarning SessionLogLevel = "warning" ) @@ -5713,9 +5859,12 @@ const ( type SessionMode string const ( - SessionModeAutopilot SessionMode = "autopilot" + // The agent is working autonomously toward task completion. + SessionModeAutopilot SessionMode = "autopilot" + // The agent is responding interactively to the user. SessionModeInteractive SessionMode = "interactive" - SessionModePlan SessionMode = "plan" + // The agent is preparing a plan before making changes. + SessionModePlan SessionMode = "plan" ) // Hosting platform type of the repository @@ -5724,7 +5873,9 @@ const ( type SessionWorkingDirectoryContextHostType string const ( - SessionWorkingDirectoryContextHostTypeAdo SessionWorkingDirectoryContextHostType = "ado" + // The working directory repository is hosted on Azure DevOps. + SessionWorkingDirectoryContextHostTypeAdo SessionWorkingDirectoryContextHostType = "ado" + // The working directory repository is hosted on GitHub. SessionWorkingDirectoryContextHostTypeGithub SessionWorkingDirectoryContextHostType = "github" ) @@ -5732,8 +5883,11 @@ const ( type ShellKillSignal string const ( - ShellKillSignalSIGINT ShellKillSignal = "SIGINT" + // Send an interrupt signal to the process. + ShellKillSignalSIGINT ShellKillSignal = "SIGINT" + // Forcefully terminate the process. ShellKillSignalSIGKILL ShellKillSignal = "SIGKILL" + // Request graceful process termination. ShellKillSignalSIGTERM ShellKillSignal = "SIGTERM" ) @@ -5741,7 +5895,9 @@ const ( type ShutdownType string const ( - ShutdownTypeError ShutdownType = "error" + // The session is shutting down because of an error. + ShutdownTypeError ShutdownType = "error" + // The session is shutting down normally. ShutdownTypeRoutine ShutdownType = "routine" ) @@ -5749,19 +5905,27 @@ const ( type SkillSource string const ( - SkillSourceBuiltin SkillSource = "builtin" - SkillSourceCustom SkillSource = "custom" - SkillSourceInherited SkillSource = "inherited" - SkillSourcePersonalAgents SkillSource = "personal-agents" + // Skill bundled with the runtime. + SkillSourceBuiltin SkillSource = "builtin" + // Skill loaded from a configured custom skill directory. + SkillSourceCustom SkillSource = "custom" + // Skill discovered from a parent directory in the current workspace tree. + SkillSourceInherited SkillSource = "inherited" + // Skill defined in the user's personal agents skill directory. + SkillSourcePersonalAgents SkillSource = "personal-agents" + // Skill defined in the user's Copilot skill directory. SkillSourcePersonalCopilot SkillSource = "personal-copilot" - SkillSourcePlugin SkillSource = "plugin" - SkillSourceProject SkillSource = "project" + // Skill provided by an installed plugin. + SkillSourcePlugin SkillSource = "plugin" + // Skill defined in the current project's skill directories. + SkillSourceProject SkillSource = "project" ) // Optional completion hint for the input (e.g. 'directory' for filesystem path completion) type SlashCommandInputCompletion string const ( + // Input should complete filesystem directories. SlashCommandInputCompletionDirectory SlashCommandInputCompletion = "directory" ) @@ -5769,9 +5933,10 @@ const ( type SlashCommandInvocationResultKind string const ( - SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" - SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" - SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" + SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" + SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" + SlashCommandInvocationResultKindSelectSubcommand SlashCommandInvocationResultKind = "select-subcommand" + SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" ) // Coarse command category for grouping and behavior: runtime built-in, skill-backed @@ -5779,9 +5944,12 @@ const ( type SlashCommandKind string const ( + // Command implemented by the runtime. SlashCommandKindBuiltin SlashCommandKind = "builtin" - SlashCommandKindClient SlashCommandKind = "client" - SlashCommandKindSkill SlashCommandKind = "skill" + // Command registered by an SDK client or extension. + SlashCommandKindClient SlashCommandKind = "client" + // Command backed by a skill. + SlashCommandKindSkill SlashCommandKind = "skill" ) // Type discriminator for TaskAgentProgress. @@ -5798,8 +5966,10 @@ const ( type TaskExecutionMode string const ( + // The task is managed in the background. TaskExecutionModeBackground TaskExecutionMode = "background" - TaskExecutionModeSync TaskExecutionMode = "sync" + // The task was started with synchronous waiting. + TaskExecutionModeSync TaskExecutionMode = "sync" ) // Type discriminator for TaskInfo. @@ -5817,7 +5987,9 @@ const ( type TaskShellInfoAttachmentMode string const ( + // The shell runs in a managed PTY session. TaskShellInfoAttachmentModeAttached TaskShellInfoAttachmentMode = "attached" + // The shell runs as an independent background process. TaskShellInfoAttachmentModeDetached TaskShellInfoAttachmentMode = "detached" ) @@ -5826,11 +5998,16 @@ const ( type TaskStatus string const ( + // The task was cancelled before completion. TaskStatusCancelled TaskStatus = "cancelled" + // The task finished successfully. TaskStatusCompleted TaskStatus = "completed" - TaskStatusFailed TaskStatus = "failed" - TaskStatusIdle TaskStatus = "idle" - TaskStatusRunning TaskStatus = "running" + // The task finished with an error. + TaskStatusFailed TaskStatus = "failed" + // The task is waiting for additional input. + TaskStatusIdle TaskStatus = "idle" + // The task is actively executing. + TaskStatusRunning TaskStatus = "running" ) // User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist @@ -5838,8 +6015,11 @@ const ( type UIAutoModeSwitchResponse string const ( - UIAutoModeSwitchResponseNo UIAutoModeSwitchResponse = "no" - UIAutoModeSwitchResponseYes UIAutoModeSwitchResponse = "yes" + // Decline the automatic mode switch. + UIAutoModeSwitchResponseNo UIAutoModeSwitchResponse = "no" + // Allow the automatic mode switch for this turn. + UIAutoModeSwitchResponseYes UIAutoModeSwitchResponse = "yes" + // Allow this mode switch and persist the preference. UIAutoModeSwitchResponseYesAlways UIAutoModeSwitchResponse = "yes_always" ) @@ -5854,8 +6034,11 @@ const ( type UIElicitationResponseAction string const ( - UIElicitationResponseActionAccept UIElicitationResponseAction = "accept" - UIElicitationResponseActionCancel UIElicitationResponseAction = "cancel" + // The user submitted the requested form values. + UIElicitationResponseActionAccept UIElicitationResponseAction = "accept" + // The user dismissed the elicitation request. + UIElicitationResponseActionCancel UIElicitationResponseAction = "cancel" + // The user explicitly declined to provide the requested input. UIElicitationResponseActionDecline UIElicitationResponseAction = "decline" ) @@ -5863,18 +6046,24 @@ const ( type UIElicitationSchemaPropertyNumberType string const ( + // Integer JSON number. UIElicitationSchemaPropertyNumberTypeInteger UIElicitationSchemaPropertyNumberType = "integer" - UIElicitationSchemaPropertyNumberTypeNumber UIElicitationSchemaPropertyNumberType = "number" + // Any JSON number. + UIElicitationSchemaPropertyNumberTypeNumber UIElicitationSchemaPropertyNumberType = "number" ) // Optional format hint that constrains the accepted input. type UIElicitationSchemaPropertyStringFormat string const ( - UIElicitationSchemaPropertyStringFormatDate UIElicitationSchemaPropertyStringFormat = "date" + // Calendar date string format. + UIElicitationSchemaPropertyStringFormatDate UIElicitationSchemaPropertyStringFormat = "date" + // Date-time string format. UIElicitationSchemaPropertyStringFormatDateTime UIElicitationSchemaPropertyStringFormat = "date-time" - UIElicitationSchemaPropertyStringFormatEmail UIElicitationSchemaPropertyStringFormat = "email" - UIElicitationSchemaPropertyStringFormatURI UIElicitationSchemaPropertyStringFormat = "uri" + // Email address string format. + UIElicitationSchemaPropertyStringFormatEmail UIElicitationSchemaPropertyStringFormat = "email" + // URI string format. + UIElicitationSchemaPropertyStringFormatURI UIElicitationSchemaPropertyStringFormat = "uri" ) // Type discriminator for UIElicitationSchemaProperty. @@ -5900,10 +6089,14 @@ const ( type UIExitPlanModeAction string const ( - UIExitPlanModeActionAutopilot UIExitPlanModeAction = "autopilot" + // Exit plan mode and continue in autopilot mode. + UIExitPlanModeActionAutopilot UIExitPlanModeAction = "autopilot" + // Exit plan mode and continue in autopilot mode with parallel subagent execution. UIExitPlanModeActionAutopilotFleet UIExitPlanModeAction = "autopilot_fleet" - UIExitPlanModeActionExitOnly UIExitPlanModeAction = "exit_only" - UIExitPlanModeActionInteractive UIExitPlanModeAction = "interactive" + // Exit plan mode without starting implementation. + UIExitPlanModeActionExitOnly UIExitPlanModeAction = "exit_only" + // Exit plan mode and continue interactively. + UIExitPlanModeActionInteractive UIExitPlanModeAction = "interactive" ) // Kind discriminator for UserToolSessionApproval. @@ -5923,7 +6116,9 @@ const ( type WorkspacesGetWorkspaceResultWorkspaceHostType string const ( - WorkspacesGetWorkspaceResultWorkspaceHostTypeAdo WorkspacesGetWorkspaceResultWorkspaceHostType = "ado" + // Workspace repository is hosted on Azure DevOps. + WorkspacesGetWorkspaceResultWorkspaceHostTypeAdo WorkspacesGetWorkspaceResultWorkspaceHostType = "ado" + // Workspace repository is hosted on GitHub. WorkspacesGetWorkspaceResultWorkspaceHostTypeGithub WorkspacesGetWorkspaceResultWorkspaceHostType = "github" ) @@ -5931,7 +6126,9 @@ const ( type WorkspaceSummaryHostType string const ( - WorkspaceSummaryHostTypeAdo WorkspaceSummaryHostType = "ado" + // Workspace summary repository is hosted on Azure DevOps. + WorkspaceSummaryHostTypeAdo WorkspaceSummaryHostType = "ado" + // Workspace summary repository is hosted on GitHub. WorkspaceSummaryHostTypeGithub WorkspaceSummaryHostType = "github" ) diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index a0e0da3e0..87ea266a2 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -1964,6 +1964,12 @@ func unmarshalSlashCommandInvocationResult(data []byte) (SlashCommandInvocationR return nil, err } return &d, nil + case SlashCommandInvocationResultKindSelectSubcommand: + var d SlashCommandSelectSubcommandResult + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case SlashCommandInvocationResultKindText: var d SlashCommandTextResult if err := json.Unmarshal(data, &d); err != nil { @@ -2008,6 +2014,17 @@ func (r SlashCommandCompletedResult) MarshalJSON() ([]byte, error) { }) } +func (r SlashCommandSelectSubcommandResult) MarshalJSON() ([]byte, error) { + type alias SlashCommandSelectSubcommandResult + return json.Marshal(struct { + Kind SlashCommandInvocationResultKind `json:"kind"` + alias + }{ + Kind: r.Kind(), + alias: alias(r), + }) +} + func (r SlashCommandTextResult) MarshalJSON() ([]byte, error) { type alias SlashCommandTextResult return json.Marshal(struct { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 93ae9f476..568794119 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -557,7 +557,7 @@ type AssistantUsageData struct { // Number of output tokens used for reasoning (e.g., chain-of-thought) ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` // Time to first token in milliseconds. Only available for streaming requests - TtftMs *int64 `json:"ttftMs,omitempty"` + TimeToFirstTokenMs *int64 `json:"timeToFirstTokenMs,omitempty"` } func (*AssistantUsageData) sessionEventData() {} @@ -2689,7 +2689,9 @@ type WorkingDirectoryContext struct { type AssistantMessageToolRequestType string const ( - AssistantMessageToolRequestTypeCustom AssistantMessageToolRequestType = "custom" + // Custom grammar-based tool call. + AssistantMessageToolRequestTypeCustom AssistantMessageToolRequestType = "custom" + // Standard function-style tool call. AssistantMessageToolRequestTypeFunction AssistantMessageToolRequestType = "function" ) @@ -2697,18 +2699,25 @@ const ( type AssistantUsageAPIEndpoint string const ( + // Chat Completions API endpoint. AssistantUsageAPIEndpointChatCompletions AssistantUsageAPIEndpoint = "/chat/completions" - AssistantUsageAPIEndpointResponses AssistantUsageAPIEndpoint = "/responses" - AssistantUsageAPIEndpointV1Messages AssistantUsageAPIEndpoint = "/v1/messages" - AssistantUsageAPIEndpointWsResponses AssistantUsageAPIEndpoint = "ws:/responses" + // Responses API endpoint. + AssistantUsageAPIEndpointResponses AssistantUsageAPIEndpoint = "/responses" + // Anthropic Messages API endpoint. + AssistantUsageAPIEndpointV1Messages AssistantUsageAPIEndpoint = "/v1/messages" + // WebSocket Responses API endpoint. + AssistantUsageAPIEndpointWsResponses AssistantUsageAPIEndpoint = "ws:/responses" ) // The user's auto-mode-switch choice type AutoModeSwitchResponse string const ( - AutoModeSwitchResponseNo AutoModeSwitchResponse = "no" - AutoModeSwitchResponseYes AutoModeSwitchResponse = "yes" + // Do not switch models. + AutoModeSwitchResponseNo AutoModeSwitchResponse = "no" + // Switch models for this request. + AutoModeSwitchResponseYes AutoModeSwitchResponse = "yes" + // Switch models now and keep using the replacement automatically. AutoModeSwitchResponseYesAlways AutoModeSwitchResponse = "yes_always" ) @@ -2716,8 +2725,11 @@ const ( type ElicitationCompletedAction string const ( - ElicitationCompletedActionAccept ElicitationCompletedAction = "accept" - ElicitationCompletedActionCancel ElicitationCompletedAction = "cancel" + // The user submitted the requested form. + ElicitationCompletedActionAccept ElicitationCompletedAction = "accept" + // The user dismissed the request. + ElicitationCompletedActionCancel ElicitationCompletedAction = "cancel" + // The user explicitly declined the request. ElicitationCompletedActionDecline ElicitationCompletedAction = "decline" ) @@ -2725,8 +2737,10 @@ const ( type ElicitationRequestedMode string const ( + // Structured form-based elicitation. ElicitationRequestedModeForm ElicitationRequestedMode = "form" - ElicitationRequestedModeURL ElicitationRequestedMode = "url" + // Browser URL-based elicitation. + ElicitationRequestedModeURL ElicitationRequestedMode = "url" ) // Schema type indicator (always 'object') @@ -2740,27 +2754,37 @@ const ( type ExitPlanModeAction string const ( - ExitPlanModeActionAutopilot ExitPlanModeAction = "autopilot" + // Exit plan mode and continue autonomously. + ExitPlanModeActionAutopilot ExitPlanModeAction = "autopilot" + // Exit plan mode and continue with parallel autonomous workers. ExitPlanModeActionAutopilotFleet ExitPlanModeAction = "autopilot_fleet" - ExitPlanModeActionExitOnly ExitPlanModeAction = "exit_only" - ExitPlanModeActionInteractive ExitPlanModeAction = "interactive" + // Exit plan mode without starting implementation. + ExitPlanModeActionExitOnly ExitPlanModeAction = "exit_only" + // Exit plan mode and continue in interactive mode. + ExitPlanModeActionInteractive ExitPlanModeAction = "interactive" ) // Discovery source type ExtensionsLoadedExtensionSource string const ( + // Extension discovered from the current project. ExtensionsLoadedExtensionSourceProject ExtensionsLoadedExtensionSource = "project" - ExtensionsLoadedExtensionSourceUser ExtensionsLoadedExtensionSource = "user" + // Extension discovered from the user's extension directory. + ExtensionsLoadedExtensionSourceUser ExtensionsLoadedExtensionSource = "user" ) // Current status: running, disabled, failed, or starting type ExtensionsLoadedExtensionStatus string const ( + // The extension is installed but disabled. ExtensionsLoadedExtensionStatusDisabled ExtensionsLoadedExtensionStatus = "disabled" - ExtensionsLoadedExtensionStatusFailed ExtensionsLoadedExtensionStatus = "failed" - ExtensionsLoadedExtensionStatusRunning ExtensionsLoadedExtensionStatus = "running" + // The extension failed to start or crashed. + ExtensionsLoadedExtensionStatusFailed ExtensionsLoadedExtensionStatus = "failed" + // The extension process is running. + ExtensionsLoadedExtensionStatusRunning ExtensionsLoadedExtensionStatus = "running" + // The extension process is starting. ExtensionsLoadedExtensionStatusStarting ExtensionsLoadedExtensionStatus = "starting" ) @@ -2768,7 +2792,9 @@ const ( type HandoffSourceType string const ( - HandoffSourceTypeLocal HandoffSourceType = "local" + // The handoff originated from a local session. + HandoffSourceTypeLocal HandoffSourceType = "local" + // The handoff originated from a remote session. HandoffSourceTypeRemote HandoffSourceType = "remote" ) @@ -2783,9 +2809,12 @@ const ( type ModelCallFailureSource string const ( + // Model call from MCP sampling. ModelCallFailureSourceMcpSampling ModelCallFailureSource = "mcp_sampling" - ModelCallFailureSourceSubagent ModelCallFailureSource = "subagent" - ModelCallFailureSourceTopLevel ModelCallFailureSource = "top_level" + // Model call from a sub-agent. + ModelCallFailureSourceSubagent ModelCallFailureSource = "subagent" + // Model call from the top-level agent. + ModelCallFailureSourceTopLevel ModelCallFailureSource = "top_level" ) // Kind discriminator for PermissionPromptRequest. @@ -2809,8 +2838,11 @@ const ( type PermissionPromptRequestPathAccessKind string const ( - PermissionPromptRequestPathAccessKindRead PermissionPromptRequestPathAccessKind = "read" + // Read access to a filesystem path. + PermissionPromptRequestPathAccessKindRead PermissionPromptRequestPathAccessKind = "read" + // Shell command access involving a filesystem path. PermissionPromptRequestPathAccessKindShell PermissionPromptRequestPathAccessKind = "shell" + // Write access to a filesystem path. PermissionPromptRequestPathAccessKindWrite PermissionPromptRequestPathAccessKind = "write" ) @@ -2834,16 +2866,20 @@ const ( type PermissionRequestMemoryAction string const ( + // Store a new memory. PermissionRequestMemoryActionStore PermissionRequestMemoryAction = "store" - PermissionRequestMemoryActionVote PermissionRequestMemoryAction = "vote" + // Vote on an existing memory. + PermissionRequestMemoryActionVote PermissionRequestMemoryAction = "vote" ) // Vote direction (vote only) type PermissionRequestMemoryDirection string const ( + // Vote that the memory is incorrect or outdated. PermissionRequestMemoryDirectionDownvote PermissionRequestMemoryDirection = "downvote" - PermissionRequestMemoryDirectionUpvote PermissionRequestMemoryDirection = "upvote" + // Vote that the memory is useful or accurate. + PermissionRequestMemoryDirectionUpvote PermissionRequestMemoryDirection = "upvote" ) // Kind discriminator for PermissionResult. @@ -2865,8 +2901,11 @@ const ( type PlanChangedOperation string const ( + // The plan file was created. PlanChangedOperationCreate PlanChangedOperation = "create" + // The plan file was deleted. PlanChangedOperationDelete PlanChangedOperation = "delete" + // The plan file was updated. PlanChangedOperationUpdate PlanChangedOperation = "update" ) @@ -2874,16 +2913,20 @@ const ( type SystemMessageRole string const ( + // Developer instruction message. SystemMessageRoleDeveloper SystemMessageRole = "developer" - SystemMessageRoleSystem SystemMessageRole = "system" + // System prompt message. + SystemMessageRoleSystem SystemMessageRole = "system" ) // Whether the agent completed successfully or failed type SystemNotificationAgentCompletedStatus string const ( + // The agent completed successfully. SystemNotificationAgentCompletedStatusCompleted SystemNotificationAgentCompletedStatus = "completed" - SystemNotificationAgentCompletedStatusFailed SystemNotificationAgentCompletedStatus = "failed" + // The agent failed. + SystemNotificationAgentCompletedStatusFailed SystemNotificationAgentCompletedStatus = "failed" ) // Type discriminator for SystemNotification. @@ -2902,7 +2945,9 @@ const ( type ToolExecutionCompleteContentResourceLinkIconTheme string const ( - ToolExecutionCompleteContentResourceLinkIconThemeDark ToolExecutionCompleteContentResourceLinkIconTheme = "dark" + // Icon intended for dark themes. + ToolExecutionCompleteContentResourceLinkIconThemeDark ToolExecutionCompleteContentResourceLinkIconTheme = "dark" + // Icon intended for light themes. ToolExecutionCompleteContentResourceLinkIconThemeLight ToolExecutionCompleteContentResourceLinkIconTheme = "light" ) @@ -2922,19 +2967,26 @@ const ( type UserMessageAgentMode string const ( - UserMessageAgentModeAutopilot UserMessageAgentMode = "autopilot" + // The agent is working autonomously toward task completion. + UserMessageAgentModeAutopilot UserMessageAgentMode = "autopilot" + // The agent is responding interactively to the user. UserMessageAgentModeInteractive UserMessageAgentMode = "interactive" - UserMessageAgentModePlan UserMessageAgentMode = "plan" - UserMessageAgentModeShell UserMessageAgentMode = "shell" + // The agent is preparing a plan before making changes. + UserMessageAgentModePlan UserMessageAgentMode = "plan" + // The agent is in shell-focused UI mode. + UserMessageAgentModeShell UserMessageAgentMode = "shell" ) // Type of GitHub reference type UserMessageAttachmentGithubReferenceType string const ( + // GitHub discussion reference. UserMessageAttachmentGithubReferenceTypeDiscussion UserMessageAttachmentGithubReferenceType = "discussion" - UserMessageAttachmentGithubReferenceTypeIssue UserMessageAttachmentGithubReferenceType = "issue" - UserMessageAttachmentGithubReferenceTypePr UserMessageAttachmentGithubReferenceType = "pr" + // GitHub issue reference. + UserMessageAttachmentGithubReferenceTypeIssue UserMessageAttachmentGithubReferenceType = "issue" + // GitHub pull request reference. + UserMessageAttachmentGithubReferenceTypePr UserMessageAttachmentGithubReferenceType = "pr" ) // Type discriminator for UserMessageAttachment. @@ -2952,7 +3004,9 @@ const ( type WorkingDirectoryContextHostType string const ( - WorkingDirectoryContextHostTypeAdo WorkingDirectoryContextHostType = "ado" + // Repository is hosted on Azure DevOps. + WorkingDirectoryContextHostTypeAdo WorkingDirectoryContextHostType = "ado" + // Repository is hosted on GitHub. WorkingDirectoryContextHostTypeGithub WorkingDirectoryContextHostType = "github" ) @@ -2960,7 +3014,9 @@ const ( type WorkspaceFileChangedOperation string const ( + // The workspace file was created. WorkspaceFileChangedOperationCreate WorkspaceFileChangedOperation = "create" + // The workspace file was updated. WorkspaceFileChangedOperationUpdate WorkspaceFileChangedOperation = "update" ) diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 01f81eb7a..d08959584 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.8", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.51-2", + "@github/copilot": "^1.0.51-3", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, @@ -663,9 +663,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-2.tgz", - "integrity": "sha512-z9DFxVYIvY4MPEidWJxHdJoQNeDRt86egFyVek3zIVOCH5V6+NTF8ZuJAdMJJqbt+5EWxOgT4wBY4JvUfN7fCg==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-3.tgz", + "integrity": "sha512-wbulKqSHhqVXoA8ffqukq3AxMGw8VfVbZ5ysGW+WSHbWXydh9aEKo9/4PqxUxWB4W9oSPggoqrVhj0NgJJ4agw==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -674,20 +674,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.51-2", - "@github/copilot-darwin-x64": "1.0.51-2", - "@github/copilot-linux-arm64": "1.0.51-2", - "@github/copilot-linux-x64": "1.0.51-2", - "@github/copilot-linuxmusl-arm64": "1.0.51-2", - "@github/copilot-linuxmusl-x64": "1.0.51-2", - "@github/copilot-win32-arm64": "1.0.51-2", - "@github/copilot-win32-x64": "1.0.51-2" + "@github/copilot-darwin-arm64": "1.0.51-3", + "@github/copilot-darwin-x64": "1.0.51-3", + "@github/copilot-linux-arm64": "1.0.51-3", + "@github/copilot-linux-x64": "1.0.51-3", + "@github/copilot-linuxmusl-arm64": "1.0.51-3", + "@github/copilot-linuxmusl-x64": "1.0.51-3", + "@github/copilot-win32-arm64": "1.0.51-3", + "@github/copilot-win32-x64": "1.0.51-3" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-2.tgz", - "integrity": "sha512-iOIAIBbOKuOnUGhsVvmFdrdKu5olSZ1Ve5RkwWj9E/62g4dAuGrEkhisA6xcNt63qDfGfsPQcDKkR+Nhxrgp4g==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-3.tgz", + "integrity": "sha512-PXnMWuaUIbxkBzeDr4cKQy7qtFqldufzWvihI5QhJaF7/l0L/8XoTGtj73qbX7IpG4wpzQ1N8MIZFm/SmyKoqQ==", "cpu": [ "arm64" ], @@ -701,9 +701,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-2.tgz", - "integrity": "sha512-7AYiP1D8mZg0UOSx0hiMGS6ZOTKA4miiHpiS5Bvd5AgTchWFNBgM/aHs1D/VSk0dLucGGzSClwzL5u80hNiw/Q==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-3.tgz", + "integrity": "sha512-sIRQBZjYh7gGDd2wUjgmX5PTfFZfvzrQp8lNvoRsqKnihzPnGaRg+St3lh7St3qtHoOBAaAoYw/DHREEp/p9xg==", "cpu": [ "x64" ], @@ -717,9 +717,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-2.tgz", - "integrity": "sha512-X5QVYcaU1IDeawCDxC8NHf8s/8Tq9NX+2a/tKXDFBFLIisoXZCpU0Ap9KRSGyKe8heJbvuDoW4JaJRZj4faAqw==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-3.tgz", + "integrity": "sha512-LzFRV9EqSFdEiqu+VyoDY4XcO3tvd7VmVzkF02BP9MgwApCCLRzJS4ElMh/3FojqV+hL18vpFSyqPVmsgjLcug==", "cpu": [ "arm64" ], @@ -733,9 +733,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-2.tgz", - "integrity": "sha512-wn4W2K+kV3f5XZ8iG7ZplLuxkv9m3oFNcgdfFF5LSlU39k9l/WFahCKWWP6ec4DG9cvfR/Z0Sj4rmQPJoF/nkg==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-3.tgz", + "integrity": "sha512-bMEE8/nj9GWx3f/PWvoSGnk6IUHoeVtdDNJk7xUTMMK2eQBUQGKfCtOKTa/mSVpJB81bxiK8IVqZypJO2cYxqQ==", "cpu": [ "x64" ], @@ -749,9 +749,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-2.tgz", - "integrity": "sha512-cQ4cJ42pN4b3Up5fDpRvVP+yPYifgQD2vplvUavY6bffCCYwLqzK4oHFsABC8uvtqkIq/GbFOZ6XF2W+YdVFUQ==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-3.tgz", + "integrity": "sha512-ZEr7RmNv8/FyWdbC6xBPdb7HZO0QdlTGt1SOO+AHW1PuHYdYBdGObDB41SfHf+h0kiiljBsLq8ps1njP/1kIDw==", "cpu": [ "arm64" ], @@ -765,9 +765,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-2.tgz", - "integrity": "sha512-3wm34yzDeCW2U0im6qDK51iF6dJHhrPqv3VxPwfvTK+7u5iWB9oaGvFRCYtQfA5sV0hJqmD6Gup6MJwB4JgEEQ==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-3.tgz", + "integrity": "sha512-d4BH9FkXTTSuXfVElNAHe4djktueVQUTj9cOdmKeQKC80Magew1F+7RvCgIDFupmhYnra+1NJf5nM7+wpiaECg==", "cpu": [ "x64" ], @@ -781,9 +781,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-2.tgz", - "integrity": "sha512-uAj1YwA8n/qbI1JG8UjHGtuBrJL18FSRkXwB0SdM0aKUozhZs3vdxRROuT5MAbt72KWk+rLldnkVy6HL/tm8sA==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-3.tgz", + "integrity": "sha512-o/tQTD4VFKhEfoxHD5HMdoaqys5jFt8+pXkQKXSFlkGWzAQZt4iZasIC7L5f/AuGctoZ/kZFW2iMOWNpDHtj5w==", "cpu": [ "arm64" ], @@ -797,9 +797,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-2.tgz", - "integrity": "sha512-Wur8d0y6VsXGbsMhED3uoZylRoJyWLQPHzgf3TD2AEc48zVpuTb4jUKzH9wD1frheAxGTl/kWvLr+6rYRcPK7w==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-3.tgz", + "integrity": "sha512-CjpogQNnl0YrEfTCPSUtKPpieVEfWWP2map4OQNLSJXwQ3toG1h359m4QXXLuSz/vJM8aCrCm1VxgCg5KR1eKw==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index d3f4eee13..b99c91efa 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.51-2", + "@github/copilot": "^1.0.51-3", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index 95a1e1bb3..9c93d8dae 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": "^1.0.51-2", + "@github/copilot": "^1.0.51-3", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index 20a4d6afe..9386e7bc7 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -14,7 +14,19 @@ import type { AbortReason, EmbeddedBlobResourceContents, EmbeddedTextResourceCon * via the `definition` "AgentInfoSource". */ /** @experimental */ -export type AgentInfoSource = "user" | "project" | "inherited" | "remote" | "plugin" | "builtin"; +export type AgentInfoSource = + /** Agent loaded from the user's personal agent configuration. */ + | "user" + /** Agent loaded from the current project's repository configuration. */ + | "project" + /** Agent inherited from a parent project or workspace. */ + | "inherited" + /** Agent provided by a remote runtime or service. */ + | "remote" + /** Agent contributed by an installed plugin. */ + | "plugin" + /** Agent built into the Copilot runtime. */ + | "builtin"; /** * The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. * @@ -35,21 +47,41 @@ export type AuthInfo = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "AuthInfoType". */ -export type AuthInfoType = "hmac" | "env" | "user" | "gh-cli" | "api-key" | "token" | "copilot-api-token"; +export type AuthInfoType = + /** Authentication provided by a GitHub App HMAC credential. */ + | "hmac" + /** Authentication resolved from environment-provided credentials. */ + | "env" + /** Authentication from an interactive user sign-in. */ + | "user" + /** Authentication delegated to the GitHub CLI. */ + | "gh-cli" + /** Authentication from an API key credential. */ + | "api-key" + /** Authentication from a GitHub token. */ + | "token" + /** Authentication from a Copilot API token. */ + | "copilot-api-token"; /** * Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandKind". */ -export type SlashCommandKind = "builtin" | "skill" | "client"; +export type SlashCommandKind = + /** Command implemented by the runtime. */ + | "builtin" + /** Command backed by a skill. */ + | "skill" + /** Command registered by an SDK client or extension. */ + | "client"; /** * Optional completion hint for the input (e.g. 'directory' for filesystem path completion) * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SlashCommandInputCompletion". */ -export type SlashCommandInputCompletion = "directory"; +export type SlashCommandInputCompletion = /** Input should complete filesystem directories. */ "directory"; /** * Result of the queued command execution. * @@ -64,21 +96,39 @@ export type QueuedCommandResult = QueuedCommandHandled | QueuedCommandNotHandled * via the `definition` "ConnectedRemoteSessionMetadataKind". */ /** @experimental */ -export type ConnectedRemoteSessionMetadataKind = "remote-session" | "coding-agent"; +export type ConnectedRemoteSessionMetadataKind = + /** Remote CLI session. */ + | "remote-session" + /** GitHub Copilot coding agent session. */ + | "coding-agent"; /** * Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ContentFilterMode". */ -export type ContentFilterMode = "none" | "markdown" | "hidden_characters"; +export type ContentFilterMode = + /** Leave MCP tool result content unchanged. */ + | "none" + /** Sanitize HTML while preserving Markdown-friendly output. */ + | "markdown" + /** Remove characters that can hide directives. */ + | "hidden_characters"; /** * Server transport type: stdio, http, sse, or memory * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "DiscoveredMcpServerType". */ -export type DiscoveredMcpServerType = "stdio" | "http" | "sse" | "memory"; +export type DiscoveredMcpServerType = + /** Server communicates over stdio with a local child process. */ + | "stdio" + /** Server communicates over streamable HTTP. */ + | "http" + /** Server communicates over Server-Sent Events. */ + | "sse" + /** Server is backed by an in-memory runtime implementation. */ + | "memory"; /** * Either '*' to receive all event types, or a non-empty list of event types to receive * @@ -94,7 +144,11 @@ export type EventLogTypes = "*" | [string, ...string[]]; * via the `definition` "EventsAgentScope". */ /** @experimental */ -export type EventsAgentScope = "primary" | "all"; +export type EventsAgentScope = + /** Return main-agent events and typed subagent lifecycle events. */ + | "primary" + /** Return events from all agents. */ + | "all"; /** * Cursor status: 'ok' means the cursor was applied successfully; 'expired' means the cursor referred to an event that no longer exists in history (e.g. truncated or compacted away) and the read started from the beginning of the remaining history. * @@ -102,7 +156,11 @@ export type EventsAgentScope = "primary" | "all"; * via the `definition` "EventsCursorStatus". */ /** @experimental */ -export type EventsCursorStatus = "ok" | "expired"; +export type EventsCursorStatus = + /** The cursor was applied successfully. */ + | "ok" + /** The cursor referred to history that is no longer available. */ + | "expired"; /** * Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) * @@ -110,7 +168,11 @@ export type EventsCursorStatus = "ok" | "expired"; * via the `definition` "ExtensionSource". */ /** @experimental */ -export type ExtensionSource = "project" | "user"; +export type ExtensionSource = + /** Extension discovered from the current project's .github/extensions directory. */ + | "project" + /** Extension discovered from the user's ~/.copilot/extensions directory. */ + | "user"; /** * Current status: running, disabled, failed, or starting * @@ -118,7 +180,15 @@ export type ExtensionSource = "project" | "user"; * via the `definition` "ExtensionStatus". */ /** @experimental */ -export type ExtensionStatus = "running" | "disabled" | "failed" | "starting"; +export type ExtensionStatus = + /** The extension process is running. */ + | "running" + /** The extension is installed but disabled. */ + | "disabled" + /** The extension failed to start or crashed. */ + | "failed" + /** The extension process is starting. */ + | "starting"; /** * Tool call result (string or expanded result object) * @@ -132,7 +202,11 @@ export type ExternalToolResult = string | ExternalToolTextResultForLlm; * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ExternalToolTextResultForLlmBinaryResultsForLlmType". */ -export type ExternalToolTextResultForLlmBinaryResultsForLlmType = "image" | "resource"; +export type ExternalToolTextResultForLlmBinaryResultsForLlmType = + /** Binary image data. */ + | "image" + /** Other binary resource data. */ + | "resource"; /** * A content block within a tool result, which may be text, terminal output, image, audio, or a resource * @@ -152,7 +226,11 @@ export type ExternalToolTextResultForLlmContent = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ExternalToolTextResultForLlmContentResourceLinkIconTheme". */ -export type ExternalToolTextResultForLlmContentResourceLinkIconTheme = "light" | "dark"; +export type ExternalToolTextResultForLlmContentResourceLinkIconTheme = + /** Icon intended for light themes. */ + | "light" + /** Icon intended for dark themes. */ + | "dark"; /** * The embedded resource contents, either text or base64-encoded binary * @@ -192,12 +270,19 @@ export type InstalledPluginSource = * via the `definition` "InstructionsSourcesType". */ export type InstructionsSourcesType = + /** Instructions loaded from the user's home configuration. */ | "home" + /** Instructions loaded from repository-scoped files. */ | "repo" + /** Instructions loaded from model-specific files. */ | "model" + /** Instructions loaded from VS Code instruction files. */ | "vscode" + /** Instructions discovered from nested agent files. */ | "nested-agents" + /** Instructions inherited from child instruction files. */ | "child-instructions" + /** Instructions supplied by an installed plugin. */ | "plugin"; /** * Where this source lives — used for UI grouping @@ -205,14 +290,28 @@ export type InstructionsSourcesType = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "InstructionsSourcesLocation". */ -export type InstructionsSourcesLocation = "user" | "repository" | "working-directory" | "plugin"; +export type InstructionsSourcesLocation = + /** Instructions live in user-level configuration. */ + | "user" + /** Instructions live in repository-level configuration. */ + | "repository" + /** Instructions live under the current working directory. */ + | "working-directory" + /** Instructions live in plugin-provided configuration. */ + | "plugin"; /** * Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionLogLevel". */ -export type SessionLogLevel = "info" | "warning" | "error"; +export type SessionLogLevel = + /** Informational message. */ + | "info" + /** Warning message that may require attention. */ + | "warning" + /** Error message describing a failure. */ + | "error"; /** * MCP server configuration (stdio process or remote HTTP/SSE) * @@ -226,14 +325,22 @@ export type McpServerConfig = McpServerConfigStdio | McpServerConfigHttp; * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpServerConfigHttpType". */ -export type McpServerConfigHttpType = "http" | "sse"; +export type McpServerConfigHttpType = + /** Streamable HTTP transport. */ + | "http" + /** Server-Sent Events transport. */ + | "sse"; /** * OAuth grant type to use when authenticating to the remote MCP server. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "McpServerConfigHttpOauthGrantType". */ -export type McpServerConfigHttpOauthGrantType = "authorization_code" | "client_credentials"; +export type McpServerConfigHttpOauthGrantType = + /** Interactive browser-based authorization code flow with PKCE. */ + | "authorization_code" + /** Headless client credentials flow using the configured OAuth client. */ + | "client_credentials"; /** * Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution. * @@ -241,7 +348,13 @@ export type McpServerConfigHttpOauthGrantType = "authorization_code" | "client_c * via the `definition` "McpSamplingExecutionAction". */ /** @experimental */ -export type McpSamplingExecutionAction = "success" | "failure" | "cancelled"; +export type McpSamplingExecutionAction = + /** The sampling inference completed and produced a result. */ + | "success" + /** The sampling inference failed or was rejected. */ + | "failure" + /** The sampling inference was cancelled before completion. */ + | "cancelled"; /** * How environment-variable values supplied to MCP servers are resolved. "direct" passes literal string values; "indirect" treats values as references (e.g. names of environment variables on the host) that the runtime resolves before launch. Defaults to the runtime's startup mode; clients that intentionally launch MCP servers with literal values (e.g. CLI prompt mode and ACP) set this to "direct". * @@ -249,7 +362,11 @@ export type McpSamplingExecutionAction = "success" | "failure" | "cancelled"; * via the `definition` "McpSetEnvValueModeDetails". */ /** @experimental */ -export type McpSetEnvValueModeDetails = "direct" | "indirect"; +export type McpSetEnvValueModeDetails = + /** Treat MCP server environment values as literal strings. */ + | "direct" + /** Treat MCP server environment values as host-side references to resolve before launch. */ + | "indirect"; /** * Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). * @@ -302,7 +419,11 @@ export type SessionContextInfo = { * via the `definition` "SessionWorkingDirectoryContextHostType". */ /** @experimental */ -export type SessionWorkingDirectoryContextHostType = "github" | "ado"; +export type SessionWorkingDirectoryContextHostType = + /** The working directory repository is hosted on GitHub. */ + | "github" + /** The working directory repository is hosted on Azure DevOps. */ + | "ado"; /** * The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot') * @@ -310,7 +431,13 @@ export type SessionWorkingDirectoryContextHostType = "github" | "ado"; * via the `definition` "MetadataSnapshotCurrentMode". */ /** @experimental */ -export type MetadataSnapshotCurrentMode = "interactive" | "plan" | "autopilot"; +export type MetadataSnapshotCurrentMode = + /** The agent is responding interactively to the user. */ + | "interactive" + /** The agent is preparing a plan before making changes. */ + | "plan" + /** The agent is working autonomously toward task completion. */ + | "autopilot"; /** * Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` invocation. * @@ -318,28 +445,52 @@ export type MetadataSnapshotCurrentMode = "interactive" | "plan" | "autopilot"; * via the `definition` "MetadataSnapshotRemoteMetadataTaskType". */ /** @experimental */ -export type MetadataSnapshotRemoteMetadataTaskType = "cca" | "cli"; +export type MetadataSnapshotRemoteMetadataTaskType = + /** Remote task originated from Copilot Coding Agent. */ + | "cca" + /** Remote task originated from a CLI remote-session invocation. */ + | "cli"; /** * Current policy state for this model * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ModelPolicyState". */ -export type ModelPolicyState = "enabled" | "disabled" | "unconfigured"; +export type ModelPolicyState = + /** The model is enabled by policy. */ + | "enabled" + /** The model is disabled by policy. */ + | "disabled" + /** No explicit policy is configured for the model. */ + | "unconfigured"; /** * Model capability category for grouping in the model picker * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ModelPickerCategory". */ -export type ModelPickerCategory = "lightweight" | "versatile" | "powerful"; +export type ModelPickerCategory = + /** Lightweight model category optimized for faster, lower-cost interactions. */ + | "lightweight" + /** Versatile model category suitable for a broad range of tasks. */ + | "versatile" + /** Powerful model category optimized for complex tasks. */ + | "powerful"; /** * Relative cost tier for token-based billing users * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ModelPickerPriceCategory". */ -export type ModelPickerPriceCategory = "low" | "medium" | "high" | "very_high"; +export type ModelPickerPriceCategory = + /** Lowest relative token cost tier. */ + | "low" + /** Medium relative token cost tier. */ + | "medium" + /** High relative token cost tier. */ + | "high" + /** Highest relative token cost tier. */ + | "very_high"; /** * How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). * @@ -347,7 +498,11 @@ export type ModelPickerPriceCategory = "low" | "medium" | "high" | "very_high"; * via the `definition` "OptionsUpdateEnvValueMode". */ /** @experimental */ -export type OptionsUpdateEnvValueMode = "direct" | "indirect"; +export type OptionsUpdateEnvValueMode = + /** Pass MCP server environment values as literal strings. */ + | "direct" + /** Resolve MCP server environment values from host-side references. */ + | "indirect"; /** * The client's response to the pending permission prompt * @@ -408,21 +563,37 @@ export type PermissionDecisionApproveForLocationApproval = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsConfigureAdditionalContentExclusionPolicyScope". */ -export type PermissionsConfigureAdditionalContentExclusionPolicyScope = "repo" | "all"; +export type PermissionsConfigureAdditionalContentExclusionPolicyScope = + /** The content exclusion policy applies to the current repository. */ + | "repo" + /** The content exclusion policy applies across all repositories. */ + | "all"; /** * Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsModifyRulesScope". */ -export type PermissionsModifyRulesScope = "session" | "location"; +export type PermissionsModifyRulesScope = + /** Apply the rule change only to this session. */ + | "session" + /** Persist the rule change for this project location. */ + | "location"; /** * Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PermissionsSetApproveAllSource". */ -export type PermissionsSetApproveAllSource = "cli_flag" | "slash_command" | "autopilot_confirmation" | "rpc"; +export type PermissionsSetApproveAllSource = + /** Allow-all was enabled from a CLI command-line flag. */ + | "cli_flag" + /** Allow-all was enabled by a slash command. */ + | "slash_command" + /** Allow-all was enabled by confirming autopilot behavior. */ + | "autopilot_confirmation" + /** Allow-all was enabled through an RPC caller. */ + | "rpc"; /** * Whether this item is a queued user message or a queued slash command / model change * @@ -430,7 +601,11 @@ export type PermissionsSetApproveAllSource = "cli_flag" | "slash_command" | "aut * via the `definition` "QueuePendingItemsKind". */ /** @experimental */ -export type QueuePendingItemsKind = "message" | "command"; +export type QueuePendingItemsKind = + /** A queued user message. */ + | "message" + /** A queued slash command or model-change command. */ + | "command"; /** * Per-session remote mode. "off" disables remote, "export" exports session events to GitHub without enabling remote steering, "on" enables both export and remote steering. * @@ -438,14 +613,28 @@ export type QueuePendingItemsKind = "message" | "command"; * via the `definition` "RemoteSessionMode". */ /** @experimental */ -export type RemoteSessionMode = "off" | "export" | "on"; +export type RemoteSessionMode = + /** Disable remote session export and steering. */ + | "off" + /** Export session events to GitHub without enabling remote steering. */ + | "export" + /** Enable both remote session export and remote steering. */ + | "on"; /** * The UI mode the agent was in when this message was sent. Defaults to the session's current mode. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SendAgentMode". */ -export type SendAgentMode = "interactive" | "plan" | "autopilot" | "shell"; +export type SendAgentMode = + /** The agent is responding interactively to the user. */ + | "interactive" + /** The agent is preparing a plan before making changes. */ + | "plan" + /** The agent is working autonomously toward task completion. */ + | "autopilot" + /** The agent is in shell-focused UI mode. */ + | "shell"; /** * A user message attachment — a file, directory, code selection, blob, or GitHub reference * @@ -464,14 +653,24 @@ export type SendAttachment = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SendAttachmentGithubReferenceType". */ -export type SendAttachmentGithubReferenceType = "issue" | "pr" | "discussion"; +export type SendAttachmentGithubReferenceType = + /** GitHub issue reference. */ + | "issue" + /** GitHub pull request reference. */ + | "pr" + /** GitHub discussion reference. */ + | "discussion"; /** * How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SendMode". */ -export type SendMode = "enqueue" | "immediate"; +export type SendMode = + /** Append the message to the normal session queue. */ + | "enqueue" + /** Interject the message during the in-progress turn. */ + | "immediate"; /** * Repository host type * @@ -479,35 +678,57 @@ export type SendMode = "enqueue" | "immediate"; * via the `definition` "SessionContextHostType". */ /** @experimental */ -export type SessionContextHostType = "github" | "ado"; +export type SessionContextHostType = + /** Session repository is hosted on GitHub. */ + | "github" + /** Session repository is hosted on Azure DevOps. */ + | "ado"; /** * Error classification * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionFsErrorCode". */ -export type SessionFsErrorCode = "ENOENT" | "UNKNOWN"; +export type SessionFsErrorCode = + /** The requested path does not exist. */ + | "ENOENT" + /** The filesystem operation failed for an unspecified reason. */ + | "UNKNOWN"; /** * Entry type * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionFsReaddirWithTypesEntryType". */ -export type SessionFsReaddirWithTypesEntryType = "file" | "directory"; +export type SessionFsReaddirWithTypesEntryType = + /** The entry is a file. */ + | "file" + /** The entry is a directory. */ + | "directory"; /** * Path conventions used by this filesystem * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionFsSetProviderConventions". */ -export type SessionFsSetProviderConventions = "windows" | "posix"; +export type SessionFsSetProviderConventions = + /** Paths use Windows path conventions. */ + | "windows" + /** Paths use POSIX path conventions. */ + | "posix"; /** * How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "SessionFsSqliteQueryType". */ -export type SessionFsSqliteQueryType = "exec" | "query" | "run"; +export type SessionFsSqliteQueryType = + /** Execute DDL or multi-statement SQL without returning rows. */ + | "exec" + /** Execute a SELECT-style query and return rows. */ + | "query" + /** Execute INSERT, UPDATE, or DELETE SQL and return affected-row metadata. */ + | "run"; /** * Source descriptor for direct repo installs (when marketplace is empty) * @@ -547,7 +768,10 @@ export type WorkspaceSummary = { /** * Repository host type, if known */ - host_type?: "github" | "ado"; + host_type?: /** Workspace summary repository is hosted on GitHub. */ + | "github" + /** Workspace summary repository is hosted on Azure DevOps. */ + | "ado"; /** * Branch checked out at session start, if any */ @@ -571,7 +795,13 @@ export type WorkspaceSummary = { * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ShellKillSignal". */ -export type ShellKillSignal = "SIGTERM" | "SIGKILL" | "SIGINT"; +export type ShellKillSignal = + /** Request graceful process termination. */ + | "SIGTERM" + /** Forcefully terminate the process. */ + | "SIGKILL" + /** Send an interrupt signal to the process. */ + | "SIGINT"; /** * Result of invoking the slash command (text output, prompt to send to the agent, or completion). * @@ -581,7 +811,8 @@ export type ShellKillSignal = "SIGTERM" | "SIGKILL" | "SIGINT"; export type SlashCommandInvocationResult = | SlashCommandTextResult | SlashCommandAgentPromptResult - | SlashCommandCompletedResult; + | SlashCommandCompletedResult + | SlashCommandSelectSubcommandResult; /** * Current lifecycle status of the task * @@ -589,7 +820,17 @@ export type SlashCommandInvocationResult = * via the `definition` "TaskStatus". */ /** @experimental */ -export type TaskStatus = "running" | "idle" | "completed" | "failed" | "cancelled"; +export type TaskStatus = + /** The task is actively executing. */ + | "running" + /** The task is waiting for additional input. */ + | "idle" + /** The task finished successfully. */ + | "completed" + /** The task finished with an error. */ + | "failed" + /** The task was cancelled before completion. */ + | "cancelled"; /** * Whether task execution is synchronously awaited or managed in the background * @@ -597,7 +838,11 @@ export type TaskStatus = "running" | "idle" | "completed" | "failed" | "cancelle * via the `definition` "TaskExecutionMode". */ /** @experimental */ -export type TaskExecutionMode = "sync" | "background"; +export type TaskExecutionMode = + /** The task was started with synchronous waiting. */ + | "sync" + /** The task is managed in the background. */ + | "background"; /** * Schema for the `TaskAgentProgress` type. * @@ -658,7 +903,11 @@ export type TaskInfo = TaskAgentInfo | TaskShellInfo; * via the `definition` "TaskShellInfoAttachmentMode". */ /** @experimental */ -export type TaskShellInfoAttachmentMode = "attached" | "detached"; +export type TaskShellInfoAttachmentMode = + /** The shell runs in a managed PTY session. */ + | "attached" + /** The shell runs as an independent background process. */ + | "detached"; /** * Progress information for the task, discriminated by type. Returns null when no task with this ID is currently tracked. * @@ -681,7 +930,13 @@ export type TaskShellProgress = null; * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIAutoModeSwitchResponse". */ -export type UIAutoModeSwitchResponse = "yes" | "yes_always" | "no"; +export type UIAutoModeSwitchResponse = + /** Allow the automatic mode switch for this turn. */ + | "yes" + /** Allow this mode switch and persist the preference. */ + | "yes_always" + /** Decline the automatic mode switch. */ + | "no"; /** * Schema for the `UIElicitationFieldValue` type. * @@ -712,28 +967,54 @@ export type UIElicitationSchemaProperty = * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationSchemaPropertyStringFormat". */ -export type UIElicitationSchemaPropertyStringFormat = "email" | "uri" | "date" | "date-time"; +export type UIElicitationSchemaPropertyStringFormat = + /** Email address string format. */ + | "email" + /** URI string format. */ + | "uri" + /** Calendar date string format. */ + | "date" + /** Date-time string format. */ + | "date-time"; /** * Numeric type accepted by the field. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationSchemaPropertyNumberType". */ -export type UIElicitationSchemaPropertyNumberType = "number" | "integer"; +export type UIElicitationSchemaPropertyNumberType = + /** Any JSON number. */ + | "number" + /** Integer JSON number. */ + | "integer"; /** * The user's response: accept (submitted), decline (rejected), or cancel (dismissed) * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIElicitationResponseAction". */ -export type UIElicitationResponseAction = "accept" | "decline" | "cancel"; +export type UIElicitationResponseAction = + /** The user submitted the requested form values. */ + | "accept" + /** The user explicitly declined to provide the requested input. */ + | "decline" + /** The user dismissed the elicitation request. */ + | "cancel"; /** * The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "UIExitPlanModeAction". */ -export type UIExitPlanModeAction = "exit_only" | "interactive" | "autopilot" | "autopilot_fleet"; +export type UIExitPlanModeAction = + /** Exit plan mode without starting implementation. */ + | "exit_only" + /** Exit plan mode and continue interactively. */ + | "interactive" + /** Exit plan mode and continue in autopilot mode. */ + | "autopilot" + /** Exit plan mode and continue in autopilot mode with parallel subagent execution. */ + | "autopilot_fleet"; /** * Parameters for aborting the current turn @@ -6506,6 +6787,54 @@ export interface SlashCommandTextResult { */ runtimeSettingsChanged?: boolean; } +/** + * Schema for the `SlashCommandSelectSubcommandResult` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandSelectSubcommandResult". + */ +export interface SlashCommandSelectSubcommandResult { + /** + * Select subcommand result discriminator + */ + kind: "select-subcommand"; + /** + * Parent command name that requires subcommand selection + */ + command: string; + /** + * Human-readable title for the selection UI + */ + title: string; + /** + * Available subcommand options for the client to present + */ + options: SlashCommandSelectSubcommandOption[]; + /** + * True when the invocation mutated user runtime settings; consumers caching settings should refresh + */ + runtimeSettingsChanged?: boolean; +} +/** + * Schema for the `SlashCommandSelectSubcommandOption` type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SlashCommandSelectSubcommandOption". + */ +export interface SlashCommandSelectSubcommandOption { + /** + * Subcommand name to invoke + */ + name: string; + /** + * Human-readable description of the subcommand + */ + description: string; + /** + * Optional group label for organizing options + */ + group?: string; +} /** * Schema for the `TaskAgentInfo` type. * @@ -7658,7 +7987,10 @@ export interface WorkspacesGetWorkspaceResult { cwd?: string; git_root?: string; repository?: string; - host_type?: "github" | "ado"; + host_type?: /** Workspace repository is hosted on GitHub. */ + | "github" + /** Workspace repository is hosted on Azure DevOps. */ + | "ado"; branch?: string; name?: string; user_named?: boolean; diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 2e501591f..cf376c3db 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -91,35 +91,77 @@ export type SessionEvent = /** * Hosting platform type of the repository (github or ado) */ -export type WorkingDirectoryContextHostType = "github" | "ado"; +export type WorkingDirectoryContextHostType = + /** Repository is hosted on GitHub. */ + | "github" + /** Repository is hosted on Azure DevOps. */ + | "ado"; /** * Reasoning summary mode used for model calls, if applicable (e.g. "none", "concise", "detailed") */ -export type ReasoningSummary = "none" | "concise" | "detailed"; +export type ReasoningSummary = + /** Do not request reasoning summaries from the model. */ + | "none" + /** Request a concise summary of the model's reasoning. */ + | "concise" + /** Request a detailed summary of the model's reasoning. */ + | "detailed"; /** * The session mode the agent is operating in */ -export type SessionMode = "interactive" | "plan" | "autopilot"; +export type SessionMode = + /** The agent is responding interactively to the user. */ + | "interactive" + /** The agent is preparing a plan before making changes. */ + | "plan" + /** The agent is working autonomously toward task completion. */ + | "autopilot"; /** * The type of operation performed on the plan file */ -export type PlanChangedOperation = "create" | "update" | "delete"; +export type PlanChangedOperation = + /** The plan file was created. */ + | "create" + /** The plan file was updated. */ + | "update" + /** The plan file was deleted. */ + | "delete"; /** * Whether the file was newly created or updated */ -export type WorkspaceFileChangedOperation = "create" | "update"; +export type WorkspaceFileChangedOperation = + /** The workspace file was created. */ + | "create" + /** The workspace file was updated. */ + | "update"; /** * Origin type of the session being handed off */ -export type HandoffSourceType = "remote" | "local"; +export type HandoffSourceType = + /** The handoff originated from a remote session. */ + | "remote" + /** The handoff originated from a local session. */ + | "local"; /** * Whether the session ended normally ("routine") or due to a crash/fatal error ("error") */ -export type ShutdownType = "routine" | "error"; +export type ShutdownType = + /** The session ended normally. */ + | "routine" + /** The session ended because of a crash or fatal error. */ + | "error"; /** * The agent mode that was active when this message was sent */ -export type UserMessageAgentMode = "interactive" | "plan" | "autopilot" | "shell"; +export type UserMessageAgentMode = + /** The agent is responding interactively to the user. */ + | "interactive" + /** The agent is preparing a plan before making changes. */ + | "plan" + /** The agent is working autonomously toward task completion. */ + | "autopilot" + /** The agent is in shell-focused UI mode. */ + | "shell"; /** * A user message attachment — a file, directory, code selection, blob, or GitHub reference */ @@ -132,23 +174,53 @@ export type UserMessageAttachment = /** * Type of GitHub reference */ -export type UserMessageAttachmentGithubReferenceType = "issue" | "pr" | "discussion"; +export type UserMessageAttachmentGithubReferenceType = + /** GitHub issue reference. */ + | "issue" + /** GitHub pull request reference. */ + | "pr" + /** GitHub discussion reference. */ + | "discussion"; /** * Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. */ -export type AssistantMessageToolRequestType = "function" | "custom"; +export type AssistantMessageToolRequestType = + /** Standard function-style tool call. */ + | "function" + /** Custom grammar-based tool call. */ + | "custom"; /** * API endpoint used for this model call, matching CAPI supported_endpoints vocabulary */ -export type AssistantUsageApiEndpoint = "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses"; +export type AssistantUsageApiEndpoint = + /** Chat Completions API endpoint. */ + | "/chat/completions" + /** Anthropic Messages API endpoint. */ + | "/v1/messages" + /** Responses API endpoint. */ + | "/responses" + /** WebSocket Responses API endpoint. */ + | "ws:/responses"; /** * Where the failed model call originated */ -export type ModelCallFailureSource = "top_level" | "subagent" | "mcp_sampling"; +export type ModelCallFailureSource = + /** Model call from the top-level agent. */ + | "top_level" + /** Model call from a sub-agent. */ + | "subagent" + /** Model call from MCP sampling. */ + | "mcp_sampling"; /** * Finite reason code describing why the current turn was aborted */ -export type AbortReason = "user_initiated" | "remote_command" | "user_abort"; +export type AbortReason = + /** The local user requested the abort, for example by pressing Ctrl+C in the CLI. */ + | "user_initiated" + /** A remote command requested the abort. */ + | "remote_command" + /** An MCP server delivered a user.abort notification. */ + | "user_abort"; /** * A content block within a tool result, which may be text, terminal output, image, audio, or a resource */ @@ -162,7 +234,11 @@ export type ToolExecutionCompleteContent = /** * Theme variant this icon is intended for */ -export type ToolExecutionCompleteContentResourceLinkIconTheme = "light" | "dark"; +export type ToolExecutionCompleteContentResourceLinkIconTheme = + /** Icon intended for light themes. */ + | "light" + /** Icon intended for dark themes. */ + | "dark"; /** * The embedded resource contents, either text or base64-encoded binary */ @@ -170,7 +246,11 @@ export type ToolExecutionCompleteContentResourceDetails = EmbeddedTextResourceCo /** * Message role: "system" for system prompts, "developer" for developer-injected instructions */ -export type SystemMessageRole = "system" | "developer"; +export type SystemMessageRole = + /** System prompt message. */ + | "system" + /** Developer instruction message. */ + | "developer"; /** * Structured metadata identifying what triggered this notification */ @@ -184,7 +264,11 @@ export type SystemNotification = /** * Whether the agent completed successfully or failed */ -export type SystemNotificationAgentCompletedStatus = "completed" | "failed"; +export type SystemNotificationAgentCompletedStatus = + /** The agent completed successfully. */ + | "completed" + /** The agent failed. */ + | "failed"; /** * Details of the permission being requested */ @@ -202,11 +286,19 @@ export type PermissionRequest = /** * Whether this is a store or vote memory operation */ -export type PermissionRequestMemoryAction = "store" | "vote"; +export type PermissionRequestMemoryAction = + /** Store a new memory. */ + | "store" + /** Vote on an existing memory. */ + | "vote"; /** * Vote direction (vote only) */ -export type PermissionRequestMemoryDirection = "upvote" | "downvote"; +export type PermissionRequestMemoryDirection = + /** Vote that the memory is useful or accurate. */ + | "upvote" + /** Vote that the memory is incorrect or outdated. */ + | "downvote"; /** * Derived user-facing permission prompt details for UI consumers */ @@ -225,7 +317,13 @@ export type PermissionPromptRequest = /** * Underlying permission kind that needs path approval */ -export type PermissionPromptRequestPathAccessKind = "read" | "shell" | "write"; +export type PermissionPromptRequestPathAccessKind = + /** Read access to a filesystem path. */ + | "read" + /** Shell command access involving a filesystem path. */ + | "shell" + /** Write access to a filesystem path. */ + | "write"; /** * The result of the permission request */ @@ -254,11 +352,21 @@ export type UserToolSessionApproval = /** * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. */ -export type ElicitationRequestedMode = "form" | "url"; +export type ElicitationRequestedMode = + /** Structured form-based elicitation. */ + | "form" + /** Browser URL-based elicitation. */ + | "url"; /** * The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed) */ -export type ElicitationCompletedAction = "accept" | "decline" | "cancel"; +export type ElicitationCompletedAction = + /** The user submitted the requested form. */ + | "accept" + /** The user explicitly declined the request. */ + | "decline" + /** The user dismissed the request. */ + | "cancel"; /** * Schema for the `ElicitationCompletedContent` type. */ @@ -278,38 +386,91 @@ export type CustomNotificationPayload = /** * The user's auto-mode-switch choice */ -export type AutoModeSwitchResponse = "yes" | "yes_always" | "no"; +export type AutoModeSwitchResponse = + /** Switch models for this request. */ + | "yes" + /** Switch models now and keep using the replacement automatically. */ + | "yes_always" + /** Do not switch models. */ + | "no"; /** * Exit plan mode action */ -export type ExitPlanModeAction = "exit_only" | "interactive" | "autopilot" | "autopilot_fleet"; +export type ExitPlanModeAction = + /** Exit plan mode without starting implementation. */ + | "exit_only" + /** Exit plan mode and continue in interactive mode. */ + | "interactive" + /** Exit plan mode and continue autonomously. */ + | "autopilot" + /** Exit plan mode and continue with parallel autonomous workers. */ + | "autopilot_fleet"; /** * Source location type (e.g., project, personal-copilot, plugin, builtin) */ export type SkillSource = + /** Skill defined in the current project's skill directories. */ | "project" + /** Skill discovered from a parent directory in the current workspace tree. */ | "inherited" + /** Skill defined in the user's Copilot skill directory. */ | "personal-copilot" + /** Skill defined in the user's personal agents skill directory. */ | "personal-agents" + /** Skill provided by an installed plugin. */ | "plugin" + /** Skill loaded from a configured custom skill directory. */ | "custom" + /** Skill bundled with the runtime. */ | "builtin"; /** * Configuration source: user, workspace, plugin, or builtin */ -export type McpServerSource = "user" | "workspace" | "plugin" | "builtin"; +export type McpServerSource = + /** Server configured in the user's global MCP configuration. */ + | "user" + /** Server configured by the current workspace. */ + | "workspace" + /** Server contributed by an installed plugin. */ + | "plugin" + /** Server bundled with the runtime. */ + | "builtin"; /** * Connection status: connected, failed, needs-auth, pending, disabled, or not_configured */ -export type McpServerStatus = "connected" | "failed" | "needs-auth" | "pending" | "disabled" | "not_configured"; +export type McpServerStatus = + /** The server is connected and available. */ + | "connected" + /** The server failed to connect or initialize. */ + | "failed" + /** The server requires authentication before it can connect. */ + | "needs-auth" + /** The server connection is still being established. */ + | "pending" + /** The server is configured but disabled. */ + | "disabled" + /** The server is not configured for this session. */ + | "not_configured"; /** * Discovery source */ -export type ExtensionsLoadedExtensionSource = "project" | "user"; +export type ExtensionsLoadedExtensionSource = + /** Extension discovered from the current project. */ + | "project" + /** Extension discovered from the user's extension directory. */ + | "user"; /** * Current status: running, disabled, failed, or starting */ -export type ExtensionsLoadedExtensionStatus = "running" | "disabled" | "failed" | "starting"; +export type ExtensionsLoadedExtensionStatus = + /** The extension process is running. */ + | "running" + /** The extension is installed but disabled. */ + | "disabled" + /** The extension failed to start or crashed. */ + | "failed" + /** The extension process is starting. */ + | "starting"; /** * Session event "session.start". Session initialization metadata including context and configuration @@ -2566,7 +2727,7 @@ export interface AssistantUsageData { /** * Time to first token in milliseconds. Only available for streaming requests */ - ttftMs?: number; + timeToFirstTokenMs?: number; } /** * Per-request cost and usage data from the CAPI copilot_usage response field diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 6b9e969a7..6a5fcc340 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -4823,8 +4823,41 @@ class SlashCommandCompletedResultKind(Enum): class SlashCommandInvocationResultKind(Enum): AGENT_PROMPT = "agent-prompt" COMPLETED = "completed" + SELECT_SUBCOMMAND = "select-subcommand" TEXT = "text" +@dataclass +class SlashCommandSelectSubcommandOption: + """Schema for the `SlashCommandSelectSubcommandOption` type.""" + + description: str + """Human-readable description of the subcommand""" + + name: str + """Subcommand name to invoke""" + + group: str | None = None + """Optional group label for organizing options""" + + @staticmethod + def from_dict(obj: Any) -> 'SlashCommandSelectSubcommandOption': + assert isinstance(obj, dict) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + group = from_union([from_str, from_none], obj.get("group")) + return SlashCommandSelectSubcommandOption(description, name, group) + + def to_dict(self) -> dict: + result: dict = {} + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + if self.group is not None: + result["group"] = from_union([from_str, from_none], self.group) + return result + +class SlashCommandSelectSubcommandResultKind(Enum): + SELECT_SUBCOMMAND = "select-subcommand" + # Experimental: this type is part of an experimental API and may change or be removed. class TaskExecutionMode(Enum): """Whether task execution is synchronously awaited or managed in the background""" @@ -9148,6 +9181,47 @@ def to_dict(self) -> dict: result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) return result +@dataclass +class SlashCommandSelectSubcommandResult: + """Schema for the `SlashCommandSelectSubcommandResult` type.""" + + command: str + """Parent command name that requires subcommand selection""" + + kind: SlashCommandSelectSubcommandResultKind + """Select subcommand result discriminator""" + + options: list[SlashCommandSelectSubcommandOption] + """Available subcommand options for the client to present""" + + title: str + """Human-readable title for the selection UI""" + + runtime_settings_changed: bool | None = None + """True when the invocation mutated user runtime settings; consumers caching settings should + refresh + """ + + @staticmethod + def from_dict(obj: Any) -> 'SlashCommandSelectSubcommandResult': + assert isinstance(obj, dict) + command = from_str(obj.get("command")) + kind = SlashCommandSelectSubcommandResultKind(obj.get("kind")) + options = from_list(SlashCommandSelectSubcommandOption.from_dict, obj.get("options")) + title = from_str(obj.get("title")) + runtime_settings_changed = from_union([from_bool, from_none], obj.get("runtimeSettingsChanged")) + return SlashCommandSelectSubcommandResult(command, kind, options, title, runtime_settings_changed) + + def to_dict(self) -> dict: + result: dict = {} + result["command"] = from_str(self.command) + result["kind"] = to_enum(SlashCommandSelectSubcommandResultKind, self.kind) + result["options"] = from_list(lambda x: to_class(SlashCommandSelectSubcommandOption, x), self.options) + result["title"] = from_str(self.title) + if self.runtime_settings_changed is not None: + result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TaskAgentProgress: @@ -11207,6 +11281,8 @@ class SlashCommandInvocationResult: Schema for the `SlashCommandAgentPromptResult` type. Schema for the `SlashCommandCompletedResult` type. + + Schema for the `SlashCommandSelectSubcommandResult` type. """ kind: SlashCommandInvocationResultKind """Text result discriminator @@ -11214,6 +11290,8 @@ class SlashCommandInvocationResult: Agent prompt result discriminator Completed result discriminator + + Select subcommand result discriminator """ markdown: bool | None = None """Whether text contains Markdown""" @@ -11240,6 +11318,15 @@ class SlashCommandInvocationResult: message: str | None = None """Optional user-facing message describing the completed command""" + command: str | None = None + """Parent command name that requires subcommand selection""" + + options: list[SlashCommandSelectSubcommandOption] | None = None + """Available subcommand options for the client to present""" + + title: str | None = None + """Human-readable title for the selection UI""" + @staticmethod def from_dict(obj: Any) -> 'SlashCommandInvocationResult': assert isinstance(obj, dict) @@ -11252,7 +11339,10 @@ def from_dict(obj: Any) -> 'SlashCommandInvocationResult': mode = from_union([SessionMode, from_none], obj.get("mode")) prompt = from_union([from_str, from_none], obj.get("prompt")) message = from_union([from_str, from_none], obj.get("message")) - return SlashCommandInvocationResult(kind, markdown, preserve_ansi, runtime_settings_changed, text, display_prompt, mode, prompt, message) + command = from_union([from_str, from_none], obj.get("command")) + options = from_union([lambda x: from_list(SlashCommandSelectSubcommandOption.from_dict, x), from_none], obj.get("options")) + title = from_union([from_str, from_none], obj.get("title")) + return SlashCommandInvocationResult(kind, markdown, preserve_ansi, runtime_settings_changed, text, display_prompt, mode, prompt, message, command, options, title) def to_dict(self) -> dict: result: dict = {} @@ -11273,6 +11363,12 @@ def to_dict(self) -> dict: result["prompt"] = from_union([from_str, from_none], self.prompt) if self.message is not None: result["message"] = from_union([from_str, from_none], self.message) + if self.command is not None: + result["command"] = from_union([from_str, from_none], self.command) + if self.options is not None: + result["options"] = from_union([lambda x: from_list(lambda x: to_class(SlashCommandSelectSubcommandOption, x), x), from_none], self.options) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -14418,6 +14514,8 @@ class RPC: slash_command_input_completion: SlashCommandInputCompletion slash_command_invocation_result: SlashCommandInvocationResult slash_command_kind: SlashCommandKind + slash_command_select_subcommand_option: SlashCommandSelectSubcommandOption + slash_command_select_subcommand_result: SlashCommandSelectSubcommandResult slash_command_text_result: SlashCommandTextResult task_agent_info: TaskAgentInfo task_agent_progress: TaskAgentProgress @@ -14907,6 +15005,8 @@ def from_dict(obj: Any) -> 'RPC': slash_command_input_completion = SlashCommandInputCompletion(obj.get("SlashCommandInputCompletion")) slash_command_invocation_result = SlashCommandInvocationResult.from_dict(obj.get("SlashCommandInvocationResult")) slash_command_kind = SlashCommandKind(obj.get("SlashCommandKind")) + slash_command_select_subcommand_option = SlashCommandSelectSubcommandOption.from_dict(obj.get("SlashCommandSelectSubcommandOption")) + slash_command_select_subcommand_result = SlashCommandSelectSubcommandResult.from_dict(obj.get("SlashCommandSelectSubcommandResult")) slash_command_text_result = SlashCommandTextResult.from_dict(obj.get("SlashCommandTextResult")) task_agent_info = TaskAgentInfo.from_dict(obj.get("TaskAgentInfo")) task_agent_progress = TaskAgentProgress.from_dict(obj.get("TaskAgentProgress")) @@ -15004,7 +15104,7 @@ def from_dict(obj: Any) -> 'RPC': session_context_info = from_union([SessionContextInfo.from_dict, from_none], obj.get("SessionContextInfo")) task_progress = from_union([TaskProgressClass.from_dict, from_none], obj.get("TaskProgress")) workspace_summary = from_union([WorkspaceSummary.from_dict, from_none], obj.get("WorkspaceSummary")) - return RPC(abort_request, abort_result, account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_reload_result, agent_select_request, agent_select_result, api_key_auth_info, auth_info, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_source, installed_plugin_source_github, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, lsp_initialize_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_remove_git_hub_result, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_auth, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_list, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, options_update_env_value_mode, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, release_event_interest_params, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_mode, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, send_agent_mode, send_attachment, send_attachment_blob, send_attachment_directory, send_attachment_file, send_attachment_file_line_range, send_attachment_github_reference, send_attachment_github_reference_type, send_attachment_selection, send_attachment_selection_details, send_attachment_selection_details_end, send_attachment_selection_details_start, send_mode, send_request, send_result, server_skill, server_skill_list, session_auth_status, session_bulk_delete_result, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_github, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_load_deferred_repo_hooks_result, session_log_level, session_metadata, session_metadata_snapshot, session_mode, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_prune_old_request, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_tool_session_approval_commands, user_tool_session_approval_custom_tool, user_tool_session_approval_extension_management, user_tool_session_approval_extension_permission_access, user_tool_session_approval_mcp, user_tool_session_approval_memory, user_tool_session_approval_read, user_tool_session_approval_write, workspaces_checkpoints, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, session_context_info, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_reload_result, agent_select_request, agent_select_result, api_key_auth_info, auth_info, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_source, installed_plugin_source_github, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, lsp_initialize_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_remove_git_hub_result, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_auth, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_list, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, options_update_env_value_mode, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, release_event_interest_params, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_mode, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, send_agent_mode, send_attachment, send_attachment_blob, send_attachment_directory, send_attachment_file, send_attachment_file_line_range, send_attachment_github_reference, send_attachment_github_reference_type, send_attachment_selection, send_attachment_selection_details, send_attachment_selection_details_end, send_attachment_selection_details_start, send_mode, send_request, send_result, server_skill, server_skill_list, session_auth_status, session_bulk_delete_result, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_github, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_load_deferred_repo_hooks_result, session_log_level, session_metadata, session_metadata_snapshot, session_mode, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_prune_old_request, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_tool_session_approval_commands, user_tool_session_approval_custom_tool, user_tool_session_approval_extension_management, user_tool_session_approval_extension_permission_access, user_tool_session_approval_mcp, user_tool_session_approval_memory, user_tool_session_approval_read, user_tool_session_approval_write, workspaces_checkpoints, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, session_context_info, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -15396,6 +15496,8 @@ def to_dict(self) -> dict: result["SlashCommandInputCompletion"] = to_enum(SlashCommandInputCompletion, self.slash_command_input_completion) result["SlashCommandInvocationResult"] = to_class(SlashCommandInvocationResult, self.slash_command_invocation_result) result["SlashCommandKind"] = to_enum(SlashCommandKind, self.slash_command_kind) + result["SlashCommandSelectSubcommandOption"] = to_class(SlashCommandSelectSubcommandOption, self.slash_command_select_subcommand_option) + result["SlashCommandSelectSubcommandResult"] = to_class(SlashCommandSelectSubcommandResult, self.slash_command_select_subcommand_result) result["SlashCommandTextResult"] = to_class(SlashCommandTextResult, self.slash_command_text_result) result["TaskAgentInfo"] = to_class(TaskAgentInfo, self.task_agent_info) result["TaskAgentProgress"] = to_class(TaskAgentProgress, self.task_agent_progress) diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index ab9605546..83d9cb9ed 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -693,7 +693,7 @@ class AssistantUsageData: quota_snapshots: dict[str, AssistantUsageQuotaSnapshot] | None = None reasoning_effort: str | None = None reasoning_tokens: int | None = None - ttft: timedelta | None = None + time_to_first_token: timedelta | None = None @staticmethod def from_dict(obj: Any) -> "AssistantUsageData": @@ -715,7 +715,7 @@ def from_dict(obj: Any) -> "AssistantUsageData": quota_snapshots = from_union([from_none, lambda x: from_dict(AssistantUsageQuotaSnapshot.from_dict, x)], obj.get("quotaSnapshots")) reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort")) reasoning_tokens = from_union([from_none, from_int], obj.get("reasoningTokens")) - ttft = from_union([from_none, from_timedelta], obj.get("ttftMs")) + time_to_first_token = from_union([from_none, from_timedelta], obj.get("timeToFirstTokenMs")) return AssistantUsageData( model=model, api_call_id=api_call_id, @@ -734,7 +734,7 @@ def from_dict(obj: Any) -> "AssistantUsageData": quota_snapshots=quota_snapshots, reasoning_effort=reasoning_effort, reasoning_tokens=reasoning_tokens, - ttft=ttft, + time_to_first_token=time_to_first_token, ) def to_dict(self) -> dict: @@ -772,8 +772,8 @@ def to_dict(self) -> dict: result["reasoningEffort"] = from_union([from_none, from_str], self.reasoning_effort) if self.reasoning_tokens is not None: result["reasoningTokens"] = from_union([from_none, to_int], self.reasoning_tokens) - if self.ttft is not None: - result["ttftMs"] = from_union([from_none, to_timedelta_int], self.ttft) + if self.time_to_first_token is not None: + result["timeToFirstTokenMs"] = from_union([from_none, to_timedelta_int], self.time_to_first_token) return result @@ -4829,95 +4829,137 @@ def to_dict(self) -> dict: class AbortReason(Enum): "Finite reason code describing why the current turn was aborted" + # The local user requested the abort, for example by pressing Ctrl+C in the CLI. USER_INITIATED = "user_initiated" + # A remote command requested the abort. REMOTE_COMMAND = "remote_command" + # An MCP server delivered a user.abort notification. USER_ABORT = "user_abort" class AssistantMessageToolRequestType(Enum): "Tool call type: \"function\" for standard tool calls, \"custom\" for grammar-based tool calls. Defaults to \"function\" when absent." + # Standard function-style tool call. FUNCTION = "function" + # Custom grammar-based tool call. CUSTOM = "custom" class AssistantUsageApiEndpoint(Enum): "API endpoint used for this model call, matching CAPI supported_endpoints vocabulary" + # Chat Completions API endpoint. CHAT_COMPLETIONS = "/chat/completions" + # Anthropic Messages API endpoint. V1_MESSAGES = "/v1/messages" + # Responses API endpoint. RESPONSES = "/responses" + # WebSocket Responses API endpoint. WS_RESPONSES = "ws:/responses" class AutoModeSwitchResponse(Enum): "The user's auto-mode-switch choice" + # Switch models for this request. YES = "yes" + # Switch models now and keep using the replacement automatically. YES_ALWAYS = "yes_always" + # Do not switch models. NO = "no" class ElicitationCompletedAction(Enum): "The user action: \"accept\" (submitted form), \"decline\" (explicitly refused), or \"cancel\" (dismissed)" + # The user submitted the requested form. ACCEPT = "accept" + # The user explicitly declined the request. DECLINE = "decline" + # The user dismissed the request. CANCEL = "cancel" class ElicitationRequestedMode(Enum): "Elicitation mode; \"form\" for structured input, \"url\" for browser-based. Defaults to \"form\" when absent." + # Structured form-based elicitation. FORM = "form" + # Browser URL-based elicitation. URL = "url" class ExitPlanModeAction(Enum): "Exit plan mode action" + # Exit plan mode without starting implementation. EXIT_ONLY = "exit_only" + # Exit plan mode and continue in interactive mode. INTERACTIVE = "interactive" + # Exit plan mode and continue autonomously. AUTOPILOT = "autopilot" + # Exit plan mode and continue with parallel autonomous workers. AUTOPILOT_FLEET = "autopilot_fleet" class ExtensionsLoadedExtensionSource(Enum): "Discovery source" + # Extension discovered from the current project. PROJECT = "project" + # Extension discovered from the user's extension directory. USER = "user" class ExtensionsLoadedExtensionStatus(Enum): "Current status: running, disabled, failed, or starting" + # The extension process is running. RUNNING = "running" + # The extension is installed but disabled. DISABLED = "disabled" + # The extension failed to start or crashed. FAILED = "failed" + # The extension process is starting. STARTING = "starting" class HandoffSourceType(Enum): "Origin type of the session being handed off" + # The handoff originated from a remote session. REMOTE = "remote" + # The handoff originated from a local session. LOCAL = "local" class McpServerSource(Enum): "Configuration source: user, workspace, plugin, or builtin" + # Server configured in the user's global MCP configuration. USER = "user" + # Server configured by the current workspace. WORKSPACE = "workspace" + # Server contributed by an installed plugin. PLUGIN = "plugin" + # Server bundled with the runtime. BUILTIN = "builtin" class McpServerStatus(Enum): "Connection status: connected, failed, needs-auth, pending, disabled, or not_configured" + # The server is connected and available. CONNECTED = "connected" + # The server failed to connect or initialize. FAILED = "failed" + # The server requires authentication before it can connect. NEEDS_AUTH = "needs-auth" + # The server connection is still being established. PENDING = "pending" + # The server is configured but disabled. DISABLED = "disabled" + # The server is not configured for this session. NOT_CONFIGURED = "not_configured" class ModelCallFailureSource(Enum): "Where the failed model call originated" + # Model call from the top-level agent. TOP_LEVEL = "top_level" + # Model call from a sub-agent. SUBAGENT = "subagent" + # Model call from MCP sampling. MCP_SAMPLING = "mcp_sampling" @@ -4938,8 +4980,11 @@ class PermissionPromptRequestKind(Enum): class PermissionPromptRequestPathAccessKind(Enum): "Underlying permission kind that needs path approval" + # Read access to a filesystem path. READ = "read" + # Shell command access involving a filesystem path. SHELL = "shell" + # Write access to a filesystem path. WRITE = "write" @@ -4959,13 +5004,17 @@ class PermissionRequestKind(Enum): class PermissionRequestMemoryAction(Enum): "Whether this is a store or vote memory operation" + # Store a new memory. STORE = "store" + # Vote on an existing memory. VOTE = "vote" class PermissionRequestMemoryDirection(Enum): "Vote direction (vote only)" + # Vote that the memory is useful or accurate. UPVOTE = "upvote" + # Vote that the memory is incorrect or outdated. DOWNVOTE = "downvote" @@ -4984,51 +5033,73 @@ class PermissionResultKind(Enum): class PlanChangedOperation(Enum): "The type of operation performed on the plan file" + # The plan file was created. CREATE = "create" + # The plan file was updated. UPDATE = "update" + # The plan file was deleted. DELETE = "delete" class ReasoningSummary(Enum): "Reasoning summary mode used for model calls, if applicable (e.g. \"none\", \"concise\", \"detailed\")" + # Do not request reasoning summaries from the model. NONE = "none" + # Request a concise summary of the model's reasoning. CONCISE = "concise" + # Request a detailed summary of the model's reasoning. DETAILED = "detailed" class SessionMode(Enum): "The session mode the agent is operating in" + # The agent is responding interactively to the user. INTERACTIVE = "interactive" + # The agent is preparing a plan before making changes. PLAN = "plan" + # The agent is working autonomously toward task completion. AUTOPILOT = "autopilot" class ShutdownType(Enum): "Whether the session ended normally (\"routine\") or due to a crash/fatal error (\"error\")" + # The session ended normally. ROUTINE = "routine" + # The session ended because of a crash or fatal error. ERROR = "error" class SkillSource(Enum): "Source location type (e.g., project, personal-copilot, plugin, builtin)" + # Skill defined in the current project's skill directories. PROJECT = "project" + # Skill discovered from a parent directory in the current workspace tree. INHERITED = "inherited" + # Skill defined in the user's Copilot skill directory. PERSONAL_COPILOT = "personal-copilot" + # Skill defined in the user's personal agents skill directory. PERSONAL_AGENTS = "personal-agents" + # Skill provided by an installed plugin. PLUGIN = "plugin" + # Skill loaded from a configured custom skill directory. CUSTOM = "custom" + # Skill bundled with the runtime. BUILTIN = "builtin" class SystemMessageRole(Enum): "Message role: \"system\" for system prompts, \"developer\" for developer-injected instructions" + # System prompt message. SYSTEM = "system" + # Developer instruction message. DEVELOPER = "developer" class SystemNotificationAgentCompletedStatus(Enum): "Whether the agent completed successfully or failed" + # The agent completed successfully. COMPLETED = "completed" + # The agent failed. FAILED = "failed" @@ -5044,7 +5115,9 @@ class SystemNotificationType(Enum): class ToolExecutionCompleteContentResourceLinkIconTheme(Enum): "Theme variant this icon is intended for" + # Icon intended for light themes. LIGHT = "light" + # Icon intended for dark themes. DARK = "dark" @@ -5060,16 +5133,23 @@ class ToolExecutionCompleteContentType(Enum): class UserMessageAgentMode(Enum): "The agent mode that was active when this message was sent" + # The agent is responding interactively to the user. INTERACTIVE = "interactive" + # The agent is preparing a plan before making changes. PLAN = "plan" + # The agent is working autonomously toward task completion. AUTOPILOT = "autopilot" + # The agent is in shell-focused UI mode. SHELL = "shell" class UserMessageAttachmentGithubReferenceType(Enum): "Type of GitHub reference" + # GitHub issue reference. ISSUE = "issue" + # GitHub pull request reference. PR = "pr" + # GitHub discussion reference. DISCUSSION = "discussion" @@ -5096,13 +5176,17 @@ class UserToolSessionApprovalKind(Enum): class WorkingDirectoryContextHostType(Enum): "Hosting platform type of the repository (github or ado)" + # Repository is hosted on GitHub. GITHUB = "github" + # Repository is hosted on Azure DevOps. ADO = "ado" class WorkspaceFileChangedOperation(Enum): "Whether the file was newly created or updated" + # The workspace file was created. CREATE = "create" + # The workspace file was updated. UPDATE = "update" diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 271afb62c..fa53f1053 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -5420,6 +5420,36 @@ pub struct SlashCommandTextResult { pub text: String, } +/// Schema for the `SlashCommandSelectSubcommandOption` type. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SlashCommandSelectSubcommandOption { + /// Human-readable description of the subcommand + pub description: String, + /// Optional group label for organizing options + #[serde(skip_serializing_if = "Option::is_none")] + pub group: Option, + /// Subcommand name to invoke + pub name: String, +} + +/// Schema for the `SlashCommandSelectSubcommandResult` type. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SlashCommandSelectSubcommandResult { + /// Parent command name that requires subcommand selection + pub command: String, + /// Select subcommand result discriminator + pub kind: SlashCommandSelectSubcommandResultKind, + /// Available subcommand options for the client to present + pub options: Vec, + /// True when the invocation mutated user runtime settings; consumers caching settings should refresh + #[serde(skip_serializing_if = "Option::is_none")] + pub runtime_settings_changed: Option, + /// Human-readable title for the selection UI + pub title: String, +} + /// Schema for the `TaskAgentInfo` type. /// ///
@@ -8694,16 +8724,22 @@ pub struct SessionFsSqliteExistsParams { ///
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AgentInfoSource { + /// Agent loaded from the user's personal agent configuration. #[serde(rename = "user")] User, + /// Agent loaded from the current project's repository configuration. #[serde(rename = "project")] Project, + /// Agent inherited from a parent project or workspace. #[serde(rename = "inherited")] Inherited, + /// Agent provided by a remote runtime or service. #[serde(rename = "remote")] Remote, + /// Agent contributed by an installed plugin. #[serde(rename = "plugin")] Plugin, + /// Agent built into the Copilot runtime. #[serde(rename = "builtin")] Builtin, /// Unknown variant for forward compatibility. @@ -8723,18 +8759,25 @@ pub enum ApiKeyAuthInfoType { /// Authentication type #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AuthInfoType { + /// Authentication provided by a GitHub App HMAC credential. #[serde(rename = "hmac")] Hmac, + /// Authentication resolved from environment-provided credentials. #[serde(rename = "env")] Env, + /// Authentication from an interactive user sign-in. #[serde(rename = "user")] User, + /// Authentication delegated to the GitHub CLI. #[serde(rename = "gh-cli")] GhCli, + /// Authentication from an API key credential. #[serde(rename = "api-key")] ApiKey, + /// Authentication from a GitHub token. #[serde(rename = "token")] Token, + /// Authentication from a Copilot API token. #[serde(rename = "copilot-api-token")] CopilotApiToken, /// Unknown variant for forward compatibility. @@ -8746,6 +8789,7 @@ pub enum AuthInfoType { /// Optional completion hint for the input (e.g. 'directory' for filesystem path completion) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SlashCommandInputCompletion { + /// Input should complete filesystem directories. #[serde(rename = "directory")] Directory, /// Unknown variant for forward compatibility. @@ -8757,10 +8801,13 @@ pub enum SlashCommandInputCompletion { /// Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SlashCommandKind { + /// Command implemented by the runtime. #[serde(rename = "builtin")] Builtin, + /// Command backed by a skill. #[serde(rename = "skill")] Skill, + /// Command registered by an SDK client or extension. #[serde(rename = "client")] Client, /// Unknown variant for forward compatibility. @@ -8779,8 +8826,10 @@ pub enum SlashCommandKind { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ConnectedRemoteSessionMetadataKind { + /// Remote CLI session. #[serde(rename = "remote-session")] RemoteSession, + /// GitHub Copilot coding agent session. #[serde(rename = "coding-agent")] CodingAgent, /// Unknown variant for forward compatibility. @@ -8792,10 +8841,13 @@ pub enum ConnectedRemoteSessionMetadataKind { /// Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ContentFilterMode { + /// Leave MCP tool result content unchanged. #[serde(rename = "none")] None, + /// Sanitize HTML while preserving Markdown-friendly output. #[serde(rename = "markdown")] Markdown, + /// Remove characters that can hide directives. #[serde(rename = "hidden_characters")] HiddenCharacters, /// Unknown variant for forward compatibility. @@ -8823,12 +8875,16 @@ pub enum CopilotApiTokenAuthInfoType { /// Server transport type: stdio, http, sse, or memory #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum DiscoveredMcpServerType { + /// Server communicates over stdio with a local child process. #[serde(rename = "stdio")] Stdio, + /// Server communicates over streamable HTTP. #[serde(rename = "http")] Http, + /// Server communicates over Server-Sent Events. #[serde(rename = "sse")] Sse, + /// Server is backed by an in-memory runtime implementation. #[serde(rename = "memory")] Memory, /// Unknown variant for forward compatibility. @@ -8855,8 +8911,10 @@ pub enum EnvAuthInfoType { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum EventsAgentScope { + /// Return main-agent events and typed subagent lifecycle events. #[serde(rename = "primary")] Primary, + /// Return events from all agents. #[serde(rename = "all")] All, /// Unknown variant for forward compatibility. @@ -8875,8 +8933,10 @@ pub enum EventsAgentScope { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum EventsCursorStatus { + /// The cursor was applied successfully. #[serde(rename = "ok")] Ok, + /// The cursor referred to history that is no longer available. #[serde(rename = "expired")] Expired, /// Unknown variant for forward compatibility. @@ -8895,8 +8955,10 @@ pub enum EventsCursorStatus { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExtensionSource { + /// Extension discovered from the current project's .github/extensions directory. #[serde(rename = "project")] Project, + /// Extension discovered from the user's ~/.copilot/extensions directory. #[serde(rename = "user")] User, /// Unknown variant for forward compatibility. @@ -8915,12 +8977,16 @@ pub enum ExtensionSource { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExtensionStatus { + /// The extension process is running. #[serde(rename = "running")] Running, + /// The extension is installed but disabled. #[serde(rename = "disabled")] Disabled, + /// The extension failed to start or crashed. #[serde(rename = "failed")] Failed, + /// The extension process is starting. #[serde(rename = "starting")] Starting, /// Unknown variant for forward compatibility. @@ -8932,8 +8998,10 @@ pub enum ExtensionStatus { /// Binary result type discriminator. Use "image" for images and "resource" for other binary data. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExternalToolTextResultForLlmBinaryResultsForLlmType { + /// Binary image data. #[serde(rename = "image")] Image, + /// Other binary resource data. #[serde(rename = "resource")] Resource, /// Unknown variant for forward compatibility. @@ -8969,8 +9037,10 @@ pub enum ExternalToolTextResultForLlmContentResourceType { /// Theme variant this icon is intended for #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExternalToolTextResultForLlmContentResourceLinkIconTheme { + /// Icon intended for light themes. #[serde(rename = "light")] Light, + /// Icon intended for dark themes. #[serde(rename = "dark")] Dark, /// Unknown variant for forward compatibility. @@ -9054,12 +9124,16 @@ pub enum InstalledPluginSourceUrlSource { /// Where this source lives — used for UI grouping #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum InstructionsSourcesLocation { + /// Instructions live in user-level configuration. #[serde(rename = "user")] User, + /// Instructions live in repository-level configuration. #[serde(rename = "repository")] Repository, + /// Instructions live under the current working directory. #[serde(rename = "working-directory")] WorkingDirectory, + /// Instructions live in plugin-provided configuration. #[serde(rename = "plugin")] Plugin, /// Unknown variant for forward compatibility. @@ -9071,18 +9145,25 @@ pub enum InstructionsSourcesLocation { /// Category of instruction source — used for merge logic #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum InstructionsSourcesType { + /// Instructions loaded from the user's home configuration. #[serde(rename = "home")] Home, + /// Instructions loaded from repository-scoped files. #[serde(rename = "repo")] Repo, + /// Instructions loaded from model-specific files. #[serde(rename = "model")] Model, + /// Instructions loaded from VS Code instruction files. #[serde(rename = "vscode")] Vscode, + /// Instructions discovered from nested agent files. #[serde(rename = "nested-agents")] NestedAgents, + /// Instructions inherited from child instruction files. #[serde(rename = "child-instructions")] ChildInstructions, + /// Instructions supplied by an installed plugin. #[serde(rename = "plugin")] Plugin, /// Unknown variant for forward compatibility. @@ -9094,10 +9175,13 @@ pub enum InstructionsSourcesType { /// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionLogLevel { + /// Informational message. #[serde(rename = "info")] Info, + /// Warning message that may require attention. #[serde(rename = "warning")] Warning, + /// Error message describing a failure. #[serde(rename = "error")] Error, /// Unknown variant for forward compatibility. @@ -9116,10 +9200,13 @@ pub enum SessionLogLevel { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpSamplingExecutionAction { + /// The sampling inference completed and produced a result. #[serde(rename = "success")] Success, + /// The sampling inference failed or was rejected. #[serde(rename = "failure")] Failure, + /// The sampling inference was cancelled before completion. #[serde(rename = "cancelled")] Cancelled, /// Unknown variant for forward compatibility. @@ -9131,8 +9218,10 @@ pub enum McpSamplingExecutionAction { /// OAuth grant type to use when authenticating to the remote MCP server. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerConfigHttpOauthGrantType { + /// Interactive browser-based authorization code flow with PKCE. #[serde(rename = "authorization_code")] AuthorizationCode, + /// Headless client credentials flow using the configured OAuth client. #[serde(rename = "client_credentials")] ClientCredentials, /// Unknown variant for forward compatibility. @@ -9144,8 +9233,10 @@ pub enum McpServerConfigHttpOauthGrantType { /// Remote transport type. Defaults to "http" when omitted. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerConfigHttpType { + /// Streamable HTTP transport. #[serde(rename = "http")] Http, + /// Server-Sent Events transport. #[serde(rename = "sse")] Sse, /// Unknown variant for forward compatibility. @@ -9164,8 +9255,10 @@ pub enum McpServerConfigHttpType { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpSetEnvValueModeDetails { + /// Treat MCP server environment values as literal strings. #[serde(rename = "direct")] Direct, + /// Treat MCP server environment values as host-side references to resolve before launch. #[serde(rename = "indirect")] Indirect, /// Unknown variant for forward compatibility. @@ -9184,8 +9277,10 @@ pub enum McpSetEnvValueModeDetails { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionWorkingDirectoryContextHostType { + /// The working directory repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// The working directory repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -9204,10 +9299,13 @@ pub enum SessionWorkingDirectoryContextHostType { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum MetadataSnapshotCurrentMode { + /// The agent is responding interactively to the user. #[serde(rename = "interactive")] Interactive, + /// The agent is preparing a plan before making changes. #[serde(rename = "plan")] Plan, + /// The agent is working autonomously toward task completion. #[serde(rename = "autopilot")] Autopilot, /// Unknown variant for forward compatibility. @@ -9226,8 +9324,10 @@ pub enum MetadataSnapshotCurrentMode { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum MetadataSnapshotRemoteMetadataTaskType { + /// Remote task originated from Copilot Coding Agent. #[serde(rename = "cca")] Cca, + /// Remote task originated from a CLI remote-session invocation. #[serde(rename = "cli")] Cli, /// Unknown variant for forward compatibility. @@ -9239,10 +9339,13 @@ pub enum MetadataSnapshotRemoteMetadataTaskType { /// Model capability category for grouping in the model picker #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelPickerCategory { + /// Lightweight model category optimized for faster, lower-cost interactions. #[serde(rename = "lightweight")] Lightweight, + /// Versatile model category suitable for a broad range of tasks. #[serde(rename = "versatile")] Versatile, + /// Powerful model category optimized for complex tasks. #[serde(rename = "powerful")] Powerful, /// Unknown variant for forward compatibility. @@ -9254,12 +9357,16 @@ pub enum ModelPickerCategory { /// Relative cost tier for token-based billing users #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelPickerPriceCategory { + /// Lowest relative token cost tier. #[serde(rename = "low")] Low, + /// Medium relative token cost tier. #[serde(rename = "medium")] Medium, + /// High relative token cost tier. #[serde(rename = "high")] High, + /// Highest relative token cost tier. #[serde(rename = "very_high")] VeryHigh, /// Unknown variant for forward compatibility. @@ -9271,10 +9378,13 @@ pub enum ModelPickerPriceCategory { /// Current policy state for this model #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelPolicyState { + /// The model is enabled by policy. #[serde(rename = "enabled")] Enabled, + /// The model is disabled by policy. #[serde(rename = "disabled")] Disabled, + /// No explicit policy is configured for the model. #[serde(rename = "unconfigured")] Unconfigured, /// Unknown variant for forward compatibility. @@ -9293,8 +9403,10 @@ pub enum ModelPolicyState { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum OptionsUpdateEnvValueMode { + /// Pass MCP server environment values as literal strings. #[serde(rename = "direct")] Direct, + /// Resolve MCP server environment values from host-side references. #[serde(rename = "indirect")] Indirect, /// Unknown variant for forward compatibility. @@ -9625,8 +9737,10 @@ pub enum PermissionDecision { /// Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionsConfigureAdditionalContentExclusionPolicyScope { + /// The content exclusion policy applies to the current repository. #[serde(rename = "repo")] Repo, + /// The content exclusion policy applies across all repositories. #[serde(rename = "all")] All, /// Unknown variant for forward compatibility. @@ -9638,8 +9752,10 @@ pub enum PermissionsConfigureAdditionalContentExclusionPolicyScope { /// Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionsModifyRulesScope { + /// Apply the rule change only to this session. #[serde(rename = "session")] Session, + /// Persist the rule change for this project location. #[serde(rename = "location")] Location, /// Unknown variant for forward compatibility. @@ -9651,12 +9767,16 @@ pub enum PermissionsModifyRulesScope { /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionsSetApproveAllSource { + /// Allow-all was enabled from a CLI command-line flag. #[serde(rename = "cli_flag")] CliFlag, + /// Allow-all was enabled by a slash command. #[serde(rename = "slash_command")] SlashCommand, + /// Allow-all was enabled by confirming autopilot behavior. #[serde(rename = "autopilot_confirmation")] AutopilotConfirmation, + /// Allow-all was enabled through an RPC caller. #[serde(rename = "rpc")] Rpc, /// Unknown variant for forward compatibility. @@ -9675,8 +9795,10 @@ pub enum PermissionsSetApproveAllSource { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum QueuePendingItemsKind { + /// A queued user message. #[serde(rename = "message")] Message, + /// A queued slash command or model-change command. #[serde(rename = "command")] Command, /// Unknown variant for forward compatibility. @@ -9695,10 +9817,13 @@ pub enum QueuePendingItemsKind { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum RemoteSessionMode { + /// Disable remote session export and steering. #[serde(rename = "off")] Off, + /// Export session events to GitHub without enabling remote steering. #[serde(rename = "export")] Export, + /// Enable both remote session export and remote steering. #[serde(rename = "on")] On, /// Unknown variant for forward compatibility. @@ -9710,12 +9835,16 @@ pub enum RemoteSessionMode { /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SendAgentMode { + /// The agent is responding interactively to the user. #[serde(rename = "interactive")] Interactive, + /// The agent is preparing a plan before making changes. #[serde(rename = "plan")] Plan, + /// The agent is working autonomously toward task completion. #[serde(rename = "autopilot")] Autopilot, + /// The agent is in shell-focused UI mode. #[serde(rename = "shell")] Shell, /// Unknown variant for forward compatibility. @@ -9751,10 +9880,13 @@ pub enum SendAttachmentFileType { /// Type of GitHub reference #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SendAttachmentGithubReferenceType { + /// GitHub issue reference. #[serde(rename = "issue")] Issue, + /// GitHub pull request reference. #[serde(rename = "pr")] Pr, + /// GitHub discussion reference. #[serde(rename = "discussion")] Discussion, /// Unknown variant for forward compatibility. @@ -9774,8 +9906,10 @@ pub enum SendAttachmentSelectionType { /// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SendMode { + /// Append the message to the normal session queue. #[serde(rename = "enqueue")] Enqueue, + /// Interject the message during the in-progress turn. #[serde(rename = "immediate")] Immediate, /// Unknown variant for forward compatibility. @@ -9794,8 +9928,10 @@ pub enum SendMode { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionContextHostType { + /// Session repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Session repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -9807,7 +9943,9 @@ pub enum SessionContextHostType { /// Error classification #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionFsErrorCode { + /// The requested path does not exist. ENOENT, + /// The filesystem operation failed for an unspecified reason. UNKNOWN, /// Unknown variant for forward compatibility. #[default] @@ -9818,8 +9956,10 @@ pub enum SessionFsErrorCode { /// Entry type #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionFsReaddirWithTypesEntryType { + /// The entry is a file. #[serde(rename = "file")] File, + /// The entry is a directory. #[serde(rename = "directory")] Directory, /// Unknown variant for forward compatibility. @@ -9831,8 +9971,10 @@ pub enum SessionFsReaddirWithTypesEntryType { /// Path conventions used by this filesystem #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionFsSetProviderConventions { + /// Paths use Windows path conventions. #[serde(rename = "windows")] Windows, + /// Paths use POSIX path conventions. #[serde(rename = "posix")] Posix, /// Unknown variant for forward compatibility. @@ -9844,10 +9986,13 @@ pub enum SessionFsSetProviderConventions { /// How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionFsSqliteQueryType { + /// Execute DDL or multi-statement SQL without returning rows. #[serde(rename = "exec")] Exec, + /// Execute a SELECT-style query and return rows. #[serde(rename = "query")] Query, + /// Execute INSERT, UPDATE, or DELETE SQL and return affected-row metadata. #[serde(rename = "run")] Run, /// Unknown variant for forward compatibility. @@ -9883,8 +10028,10 @@ pub enum SessionInstalledPluginSourceUrlSource { /// Repository host type, if known #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionMetadataSnapshotWorkspaceHostType { + /// Workspace summary repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Workspace summary repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -9896,8 +10043,11 @@ pub enum SessionMetadataSnapshotWorkspaceHostType { /// Signal to send (default: SIGTERM) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ShellKillSignal { + /// Request graceful process termination. SIGTERM, + /// Forcefully terminate the process. SIGKILL, + /// Send an interrupt signal to the process. SIGINT, /// Unknown variant for forward compatibility. #[default] @@ -9929,6 +10079,14 @@ pub enum SlashCommandTextResultKind { Text, } +/// Select subcommand result discriminator +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SlashCommandSelectSubcommandResultKind { + #[serde(rename = "select-subcommand")] + #[default] + SelectSubcommand, +} + /// Result of invoking the slash command (text output, prompt to send to the agent, or completion). #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -9936,6 +10094,7 @@ pub enum SlashCommandInvocationResult { Text(SlashCommandTextResult), AgentPrompt(SlashCommandAgentPromptResult), Completed(SlashCommandCompletedResult), + SelectSubcommand(SlashCommandSelectSubcommandResult), } /// Whether task execution is synchronously awaited or managed in the background @@ -9948,8 +10107,10 @@ pub enum SlashCommandInvocationResult { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum TaskExecutionMode { + /// The task was started with synchronous waiting. #[serde(rename = "sync")] Sync, + /// The task is managed in the background. #[serde(rename = "background")] Background, /// Unknown variant for forward compatibility. @@ -9968,14 +10129,19 @@ pub enum TaskExecutionMode { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum TaskStatus { + /// The task is actively executing. #[serde(rename = "running")] Running, + /// The task is waiting for additional input. #[serde(rename = "idle")] Idle, + /// The task finished successfully. #[serde(rename = "completed")] Completed, + /// The task finished with an error. #[serde(rename = "failed")] Failed, + /// The task was cancelled before completion. #[serde(rename = "cancelled")] Cancelled, /// Unknown variant for forward compatibility. @@ -10002,8 +10168,10 @@ pub enum TaskAgentInfoType { /// #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum TaskShellInfoAttachmentMode { + /// The shell runs in a managed PTY session. #[serde(rename = "attached")] Attached, + /// The shell runs as an independent background process. #[serde(rename = "detached")] Detached, /// Unknown variant for forward compatibility. @@ -10031,10 +10199,13 @@ pub enum TokenAuthInfoType { /// User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIAutoModeSwitchResponse { + /// Allow the automatic mode switch for this turn. #[serde(rename = "yes")] Yes, + /// Allow this mode switch and persist the preference. #[serde(rename = "yes_always")] YesAlways, + /// Decline the automatic mode switch. #[serde(rename = "no")] No, /// Unknown variant for forward compatibility. @@ -10078,10 +10249,13 @@ pub enum UIElicitationSchemaType { /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationResponseAction { + /// The user submitted the requested form values. #[serde(rename = "accept")] Accept, + /// The user explicitly declined to provide the requested input. #[serde(rename = "decline")] Decline, + /// The user dismissed the elicitation request. #[serde(rename = "cancel")] Cancel, /// Unknown variant for forward compatibility. @@ -10101,8 +10275,10 @@ pub enum UIElicitationSchemaPropertyBooleanType { /// Numeric type accepted by the field. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyNumberType { + /// Any JSON number. #[serde(rename = "number")] Number, + /// Integer JSON number. #[serde(rename = "integer")] Integer, /// Unknown variant for forward compatibility. @@ -10114,12 +10290,16 @@ pub enum UIElicitationSchemaPropertyNumberType { /// Optional format hint that constrains the accepted input. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIElicitationSchemaPropertyStringFormat { + /// Email address string format. #[serde(rename = "email")] Email, + /// URI string format. #[serde(rename = "uri")] Uri, + /// Calendar date string format. #[serde(rename = "date")] Date, + /// Date-time string format. #[serde(rename = "date-time")] DateTime, /// Unknown variant for forward compatibility. @@ -10155,12 +10335,16 @@ pub enum UIElicitationStringOneOfFieldType { /// The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UIExitPlanModeAction { + /// Exit plan mode without starting implementation. #[serde(rename = "exit_only")] ExitOnly, + /// Exit plan mode and continue interactively. #[serde(rename = "interactive")] Interactive, + /// Exit plan mode and continue in autopilot mode. #[serde(rename = "autopilot")] Autopilot, + /// Exit plan mode and continue in autopilot mode with parallel subagent execution. #[serde(rename = "autopilot_fleet")] AutopilotFleet, /// Unknown variant for forward compatibility. @@ -10179,8 +10363,10 @@ pub enum UserAuthInfoType { #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum WorkspacesGetWorkspaceResultWorkspaceHostType { + /// Workspace repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Workspace repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -10192,8 +10378,10 @@ pub enum WorkspacesGetWorkspaceResultWorkspaceHostType { /// Repository host type, if known #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum WorkspaceSummaryHostType { + /// Workspace summary repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Workspace summary repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -10204,8 +10392,10 @@ pub enum WorkspaceSummaryHostType { #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType { + /// Workspace repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Workspace repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -10217,8 +10407,10 @@ pub enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType { /// Repository host type, if known #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionMetadataSnapshotResultWorkspaceHostType { + /// Workspace summary repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Workspace summary repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 6d9237b92..053c4f8f8 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -1305,7 +1305,7 @@ pub struct AssistantUsageData { pub reasoning_tokens: Option, /// Time to first token in milliseconds. Only available for streaming requests #[serde(skip_serializing_if = "Option::is_none")] - pub ttft_ms: Option, + pub time_to_first_token_ms: Option, } /// Session event "model.call_failure". Failed LLM API call metadata for telemetry @@ -2874,8 +2874,10 @@ pub struct SessionExtensionsLoadedData { /// Hosting platform type of the repository (github or ado) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum WorkingDirectoryContextHostType { + /// Repository is hosted on GitHub. #[serde(rename = "github")] Github, + /// Repository is hosted on Azure DevOps. #[serde(rename = "ado")] Ado, /// Unknown variant for forward compatibility. @@ -2887,10 +2889,13 @@ pub enum WorkingDirectoryContextHostType { /// Reasoning summary mode used for model calls, if applicable (e.g. "none", "concise", "detailed") #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ReasoningSummary { + /// Do not request reasoning summaries from the model. #[serde(rename = "none")] None, + /// Request a concise summary of the model's reasoning. #[serde(rename = "concise")] Concise, + /// Request a detailed summary of the model's reasoning. #[serde(rename = "detailed")] Detailed, /// Unknown variant for forward compatibility. @@ -2902,10 +2907,13 @@ pub enum ReasoningSummary { /// The session mode the agent is operating in #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SessionMode { + /// The agent is responding interactively to the user. #[serde(rename = "interactive")] Interactive, + /// The agent is preparing a plan before making changes. #[serde(rename = "plan")] Plan, + /// The agent is working autonomously toward task completion. #[serde(rename = "autopilot")] Autopilot, /// Unknown variant for forward compatibility. @@ -2917,10 +2925,13 @@ pub enum SessionMode { /// The type of operation performed on the plan file #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PlanChangedOperation { + /// The plan file was created. #[serde(rename = "create")] Create, + /// The plan file was updated. #[serde(rename = "update")] Update, + /// The plan file was deleted. #[serde(rename = "delete")] Delete, /// Unknown variant for forward compatibility. @@ -2932,8 +2943,10 @@ pub enum PlanChangedOperation { /// Whether the file was newly created or updated #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum WorkspaceFileChangedOperation { + /// The workspace file was created. #[serde(rename = "create")] Create, + /// The workspace file was updated. #[serde(rename = "update")] Update, /// Unknown variant for forward compatibility. @@ -2945,8 +2958,10 @@ pub enum WorkspaceFileChangedOperation { /// Origin type of the session being handed off #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum HandoffSourceType { + /// The handoff originated from a remote session. #[serde(rename = "remote")] Remote, + /// The handoff originated from a local session. #[serde(rename = "local")] Local, /// Unknown variant for forward compatibility. @@ -2958,8 +2973,10 @@ pub enum HandoffSourceType { /// Whether the session ended normally ("routine") or due to a crash/fatal error ("error") #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ShutdownType { + /// The session ended normally. #[serde(rename = "routine")] Routine, + /// The session ended because of a crash or fatal error. #[serde(rename = "error")] Error, /// Unknown variant for forward compatibility. @@ -2971,12 +2988,16 @@ pub enum ShutdownType { /// The agent mode that was active when this message was sent #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum UserMessageAgentMode { + /// The agent is responding interactively to the user. #[serde(rename = "interactive")] Interactive, + /// The agent is preparing a plan before making changes. #[serde(rename = "plan")] Plan, + /// The agent is working autonomously toward task completion. #[serde(rename = "autopilot")] Autopilot, + /// The agent is in shell-focused UI mode. #[serde(rename = "shell")] Shell, /// Unknown variant for forward compatibility. @@ -2988,8 +3009,10 @@ pub enum UserMessageAgentMode { /// Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AssistantMessageToolRequestType { + /// Standard function-style tool call. #[serde(rename = "function")] Function, + /// Custom grammar-based tool call. #[serde(rename = "custom")] Custom, /// Unknown variant for forward compatibility. @@ -3001,12 +3024,16 @@ pub enum AssistantMessageToolRequestType { /// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AssistantUsageApiEndpoint { + /// Chat Completions API endpoint. #[serde(rename = "/chat/completions")] ChatCompletions, + /// Anthropic Messages API endpoint. #[serde(rename = "/v1/messages")] V1Messages, + /// Responses API endpoint. #[serde(rename = "/responses")] Responses, + /// WebSocket Responses API endpoint. #[serde(rename = "ws:/responses")] WsResponses, /// Unknown variant for forward compatibility. @@ -3018,10 +3045,13 @@ pub enum AssistantUsageApiEndpoint { /// Where the failed model call originated #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelCallFailureSource { + /// Model call from the top-level agent. #[serde(rename = "top_level")] TopLevel, + /// Model call from a sub-agent. #[serde(rename = "subagent")] Subagent, + /// Model call from MCP sampling. #[serde(rename = "mcp_sampling")] McpSampling, /// Unknown variant for forward compatibility. @@ -3033,10 +3063,13 @@ pub enum ModelCallFailureSource { /// Finite reason code describing why the current turn was aborted #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AbortReason { + /// The local user requested the abort, for example by pressing Ctrl+C in the CLI. #[serde(rename = "user_initiated")] UserInitiated, + /// A remote command requested the abort. #[serde(rename = "remote_command")] RemoteCommand, + /// An MCP server delivered a user.abort notification. #[serde(rename = "user_abort")] UserAbort, /// Unknown variant for forward compatibility. @@ -3080,8 +3113,10 @@ pub enum ToolExecutionCompleteContentAudioType { /// Theme variant this icon is intended for #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ToolExecutionCompleteContentResourceLinkIconTheme { + /// Icon intended for light themes. #[serde(rename = "light")] Light, + /// Icon intended for dark themes. #[serde(rename = "dark")] Dark, /// Unknown variant for forward compatibility. @@ -3129,8 +3164,10 @@ pub enum ToolExecutionCompleteContent { /// Message role: "system" for system prompts, "developer" for developer-injected instructions #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SystemMessageRole { + /// System prompt message. #[serde(rename = "system")] System, + /// Developer instruction message. #[serde(rename = "developer")] Developer, /// Unknown variant for forward compatibility. @@ -3182,8 +3219,10 @@ pub enum PermissionRequestUrlKind { /// Whether this is a store or vote memory operation #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionRequestMemoryAction { + /// Store a new memory. #[serde(rename = "store")] Store, + /// Vote on an existing memory. #[serde(rename = "vote")] Vote, /// Unknown variant for forward compatibility. @@ -3195,8 +3234,10 @@ pub enum PermissionRequestMemoryAction { /// Vote direction (vote only) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionRequestMemoryDirection { + /// Vote that the memory is useful or accurate. #[serde(rename = "upvote")] Upvote, + /// Vote that the memory is incorrect or outdated. #[serde(rename = "downvote")] Downvote, /// Unknown variant for forward compatibility. @@ -3320,10 +3361,13 @@ pub enum PermissionPromptRequestCustomToolKind { /// Underlying permission kind that needs path approval #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PermissionPromptRequestPathAccessKind { + /// Read access to a filesystem path. #[serde(rename = "read")] Read, + /// Shell command access involving a filesystem path. #[serde(rename = "shell")] Shell, + /// Write access to a filesystem path. #[serde(rename = "write")] Write, /// Unknown variant for forward compatibility. @@ -3551,8 +3595,10 @@ pub enum PermissionResult { /// Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ElicitationRequestedMode { + /// Structured form-based elicitation. #[serde(rename = "form")] Form, + /// Browser URL-based elicitation. #[serde(rename = "url")] Url, /// Unknown variant for forward compatibility. @@ -3572,10 +3618,13 @@ pub enum ElicitationRequestedSchemaType { /// The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ElicitationCompletedAction { + /// The user submitted the requested form. #[serde(rename = "accept")] Accept, + /// The user explicitly declined the request. #[serde(rename = "decline")] Decline, + /// The user dismissed the request. #[serde(rename = "cancel")] Cancel, /// Unknown variant for forward compatibility. @@ -3595,10 +3644,13 @@ pub enum McpOauthRequiredStaticClientConfigGrantType { /// The user's auto-mode-switch choice #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AutoModeSwitchResponse { + /// Switch models for this request. #[serde(rename = "yes")] Yes, + /// Switch models now and keep using the replacement automatically. #[serde(rename = "yes_always")] YesAlways, + /// Do not switch models. #[serde(rename = "no")] No, /// Unknown variant for forward compatibility. @@ -3610,12 +3662,16 @@ pub enum AutoModeSwitchResponse { /// Exit plan mode action #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExitPlanModeAction { + /// Exit plan mode without starting implementation. #[serde(rename = "exit_only")] ExitOnly, + /// Exit plan mode and continue in interactive mode. #[serde(rename = "interactive")] Interactive, + /// Exit plan mode and continue autonomously. #[serde(rename = "autopilot")] Autopilot, + /// Exit plan mode and continue with parallel autonomous workers. #[serde(rename = "autopilot_fleet")] AutopilotFleet, /// Unknown variant for forward compatibility. @@ -3627,18 +3683,25 @@ pub enum ExitPlanModeAction { /// Source location type (e.g., project, personal-copilot, plugin, builtin) #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SkillSource { + /// Skill defined in the current project's skill directories. #[serde(rename = "project")] Project, + /// Skill discovered from a parent directory in the current workspace tree. #[serde(rename = "inherited")] Inherited, + /// Skill defined in the user's Copilot skill directory. #[serde(rename = "personal-copilot")] PersonalCopilot, + /// Skill defined in the user's personal agents skill directory. #[serde(rename = "personal-agents")] PersonalAgents, + /// Skill provided by an installed plugin. #[serde(rename = "plugin")] Plugin, + /// Skill loaded from a configured custom skill directory. #[serde(rename = "custom")] Custom, + /// Skill bundled with the runtime. #[serde(rename = "builtin")] Builtin, /// Unknown variant for forward compatibility. @@ -3650,12 +3713,16 @@ pub enum SkillSource { /// Configuration source: user, workspace, plugin, or builtin #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerSource { + /// Server configured in the user's global MCP configuration. #[serde(rename = "user")] User, + /// Server configured by the current workspace. #[serde(rename = "workspace")] Workspace, + /// Server contributed by an installed plugin. #[serde(rename = "plugin")] Plugin, + /// Server bundled with the runtime. #[serde(rename = "builtin")] Builtin, /// Unknown variant for forward compatibility. @@ -3667,16 +3734,22 @@ pub enum McpServerSource { /// Connection status: connected, failed, needs-auth, pending, disabled, or not_configured #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum McpServerStatus { + /// The server is connected and available. #[serde(rename = "connected")] Connected, + /// The server failed to connect or initialize. #[serde(rename = "failed")] Failed, + /// The server requires authentication before it can connect. #[serde(rename = "needs-auth")] NeedsAuth, + /// The server connection is still being established. #[serde(rename = "pending")] Pending, + /// The server is configured but disabled. #[serde(rename = "disabled")] Disabled, + /// The server is not configured for this session. #[serde(rename = "not_configured")] NotConfigured, /// Unknown variant for forward compatibility. @@ -3688,8 +3761,10 @@ pub enum McpServerStatus { /// Discovery source #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExtensionsLoadedExtensionSource { + /// Extension discovered from the current project. #[serde(rename = "project")] Project, + /// Extension discovered from the user's extension directory. #[serde(rename = "user")] User, /// Unknown variant for forward compatibility. @@ -3701,12 +3776,16 @@ pub enum ExtensionsLoadedExtensionSource { /// Current status: running, disabled, failed, or starting #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ExtensionsLoadedExtensionStatus { + /// The extension process is running. #[serde(rename = "running")] Running, + /// The extension is installed but disabled. #[serde(rename = "disabled")] Disabled, + /// The extension failed to start or crashed. #[serde(rename = "failed")] Failed, + /// The extension process is starting. #[serde(rename = "starting")] Starting, /// Unknown variant for forward compatibility. diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index 2d78be42f..21cd224f6 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@github/copilot": "^1.0.51-2", + "@github/copilot": "^1.0.51-3", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -464,9 +464,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-2.tgz", - "integrity": "sha512-z9DFxVYIvY4MPEidWJxHdJoQNeDRt86egFyVek3zIVOCH5V6+NTF8ZuJAdMJJqbt+5EWxOgT4wBY4JvUfN7fCg==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-3.tgz", + "integrity": "sha512-wbulKqSHhqVXoA8ffqukq3AxMGw8VfVbZ5ysGW+WSHbWXydh9aEKo9/4PqxUxWB4W9oSPggoqrVhj0NgJJ4agw==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -476,20 +476,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.51-2", - "@github/copilot-darwin-x64": "1.0.51-2", - "@github/copilot-linux-arm64": "1.0.51-2", - "@github/copilot-linux-x64": "1.0.51-2", - "@github/copilot-linuxmusl-arm64": "1.0.51-2", - "@github/copilot-linuxmusl-x64": "1.0.51-2", - "@github/copilot-win32-arm64": "1.0.51-2", - "@github/copilot-win32-x64": "1.0.51-2" + "@github/copilot-darwin-arm64": "1.0.51-3", + "@github/copilot-darwin-x64": "1.0.51-3", + "@github/copilot-linux-arm64": "1.0.51-3", + "@github/copilot-linux-x64": "1.0.51-3", + "@github/copilot-linuxmusl-arm64": "1.0.51-3", + "@github/copilot-linuxmusl-x64": "1.0.51-3", + "@github/copilot-win32-arm64": "1.0.51-3", + "@github/copilot-win32-x64": "1.0.51-3" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-2.tgz", - "integrity": "sha512-iOIAIBbOKuOnUGhsVvmFdrdKu5olSZ1Ve5RkwWj9E/62g4dAuGrEkhisA6xcNt63qDfGfsPQcDKkR+Nhxrgp4g==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-3.tgz", + "integrity": "sha512-PXnMWuaUIbxkBzeDr4cKQy7qtFqldufzWvihI5QhJaF7/l0L/8XoTGtj73qbX7IpG4wpzQ1N8MIZFm/SmyKoqQ==", "cpu": [ "arm64" ], @@ -504,9 +504,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-2.tgz", - "integrity": "sha512-7AYiP1D8mZg0UOSx0hiMGS6ZOTKA4miiHpiS5Bvd5AgTchWFNBgM/aHs1D/VSk0dLucGGzSClwzL5u80hNiw/Q==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-3.tgz", + "integrity": "sha512-sIRQBZjYh7gGDd2wUjgmX5PTfFZfvzrQp8lNvoRsqKnihzPnGaRg+St3lh7St3qtHoOBAaAoYw/DHREEp/p9xg==", "cpu": [ "x64" ], @@ -521,9 +521,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-2.tgz", - "integrity": "sha512-X5QVYcaU1IDeawCDxC8NHf8s/8Tq9NX+2a/tKXDFBFLIisoXZCpU0Ap9KRSGyKe8heJbvuDoW4JaJRZj4faAqw==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-3.tgz", + "integrity": "sha512-LzFRV9EqSFdEiqu+VyoDY4XcO3tvd7VmVzkF02BP9MgwApCCLRzJS4ElMh/3FojqV+hL18vpFSyqPVmsgjLcug==", "cpu": [ "arm64" ], @@ -538,9 +538,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-2.tgz", - "integrity": "sha512-wn4W2K+kV3f5XZ8iG7ZplLuxkv9m3oFNcgdfFF5LSlU39k9l/WFahCKWWP6ec4DG9cvfR/Z0Sj4rmQPJoF/nkg==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-3.tgz", + "integrity": "sha512-bMEE8/nj9GWx3f/PWvoSGnk6IUHoeVtdDNJk7xUTMMK2eQBUQGKfCtOKTa/mSVpJB81bxiK8IVqZypJO2cYxqQ==", "cpu": [ "x64" ], @@ -555,9 +555,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-2.tgz", - "integrity": "sha512-cQ4cJ42pN4b3Up5fDpRvVP+yPYifgQD2vplvUavY6bffCCYwLqzK4oHFsABC8uvtqkIq/GbFOZ6XF2W+YdVFUQ==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-3.tgz", + "integrity": "sha512-ZEr7RmNv8/FyWdbC6xBPdb7HZO0QdlTGt1SOO+AHW1PuHYdYBdGObDB41SfHf+h0kiiljBsLq8ps1njP/1kIDw==", "cpu": [ "arm64" ], @@ -572,9 +572,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-2.tgz", - "integrity": "sha512-3wm34yzDeCW2U0im6qDK51iF6dJHhrPqv3VxPwfvTK+7u5iWB9oaGvFRCYtQfA5sV0hJqmD6Gup6MJwB4JgEEQ==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-3.tgz", + "integrity": "sha512-d4BH9FkXTTSuXfVElNAHe4djktueVQUTj9cOdmKeQKC80Magew1F+7RvCgIDFupmhYnra+1NJf5nM7+wpiaECg==", "cpu": [ "x64" ], @@ -589,9 +589,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-2.tgz", - "integrity": "sha512-uAj1YwA8n/qbI1JG8UjHGtuBrJL18FSRkXwB0SdM0aKUozhZs3vdxRROuT5MAbt72KWk+rLldnkVy6HL/tm8sA==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-3.tgz", + "integrity": "sha512-o/tQTD4VFKhEfoxHD5HMdoaqys5jFt8+pXkQKXSFlkGWzAQZt4iZasIC7L5f/AuGctoZ/kZFW2iMOWNpDHtj5w==", "cpu": [ "arm64" ], @@ -606,9 +606,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.51-2", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-2.tgz", - "integrity": "sha512-Wur8d0y6VsXGbsMhED3uoZylRoJyWLQPHzgf3TD2AEc48zVpuTb4jUKzH9wD1frheAxGTl/kWvLr+6rYRcPK7w==", + "version": "1.0.51-3", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-3.tgz", + "integrity": "sha512-CjpogQNnl0YrEfTCPSUtKPpieVEfWWP2map4OQNLSJXwQ3toG1h359m4QXXLuSz/vJM8aCrCm1VxgCg5KR1eKw==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index 7c37f83d6..c1df0271f 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -11,7 +11,7 @@ "test": "vitest run" }, "devDependencies": { - "@github/copilot": "^1.0.51-2", + "@github/copilot": "^1.0.51-3", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", From ee0ebe825299d78b6a4e96175d1375dbe4b76177 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 21:13:30 -0400 Subject: [PATCH 2/2] Fix flaky CI tests: add TCP connection timeout and fix MCP test hang - nodejs/src/client.ts: Add 10s connection timeout to connectViaTcp() to prevent indefinite hangs on Windows when reconnecting after forceStop() - dotnet/test: Change MCP server command from 'echo' to 'true' in the Without_Args test. On Ubuntu, 'echo' (no args) outputs a bare newline that confuses the CLI's MCP JSON-RPC reader, causing a 2-minute hang. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs | 2 +- nodejs/src/client.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs b/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs index 1fd7feedd..cc528b219 100644 --- a/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs +++ b/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs @@ -48,7 +48,7 @@ public async Task Should_Accept_MCP_Server_Configuration_Without_Args() { ["test-server"] = new McpStdioServerConfig { - Command = "echo", + Command = "true", Tools = ["*"] } }; diff --git a/nodejs/src/client.ts b/nodejs/src/client.ts index 6342b6667..8a2fe32b4 100644 --- a/nodejs/src/client.ts +++ b/nodejs/src/client.ts @@ -1757,7 +1757,13 @@ export class CopilotClient { return new Promise((resolve, reject) => { this.socket = new Socket(); + const connectionTimeout = setTimeout(() => { + this.socket?.destroy(); + reject(new Error("Timeout connecting to CLI server")); + }, 10000); + this.socket.connect(this.actualPort!, this.actualHost, () => { + clearTimeout(connectionTimeout); // Create JSON-RPC connection this.connection = createMessageConnection( new StreamMessageReader(this.socket!), @@ -1770,6 +1776,7 @@ export class CopilotClient { }); this.socket.on("error", (error) => { + clearTimeout(connectionTimeout); reject(new Error(`Failed to connect to CLI server: ${error.message}`)); }); });