diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 4b6cdab93..89e863ad1 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -3584,7 +3584,7 @@ internal sealed class SessionPlanDeleteRequest public string SessionId { get; set; } = string.Empty; } -/// Schema for the `PlanSqlTodosRow` type. +/// A single todo row read from the session SQL `todos` table. All fields are optional because the SQL schema is best-effort and the agent may not have populated every column. [Experimental(Diagnostics.Experimental)] public sealed class PlanSqlTodosRow { @@ -3623,6 +3623,41 @@ internal sealed class SessionPlanReadSqlTodosRequest public string SessionId { get; set; } = string.Empty; } +/// A single dependency edge read from the session SQL `todo_deps` table, indicating that one todo must complete before another. +[Experimental(Diagnostics.Experimental)] +public sealed class PlanSqlTodoDependency +{ + /// ID of the todo it depends on. + [JsonPropertyName("dependsOn")] + public string DependsOn { get; set; } = string.Empty; + + /// ID of the todo that has the dependency. + [JsonPropertyName("todoId")] + public string TodoId { get; set; } = string.Empty; +} + +/// Todo rows + dependency edges read from the session SQL database. +[Experimental(Diagnostics.Experimental)] +public sealed class PlanReadSqlTodosWithDependenciesResult +{ + /// Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa. + [JsonPropertyName("dependencies")] + public IList Dependencies { get => field ??= []; set; } + + /// Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed. + [JsonPropertyName("rows")] + public IList Rows { get => field ??= []; set; } +} + +/// Identifies the target session. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionPlanReadSqlTodosWithDependenciesRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// RPC data type for WorkspacesGetWorkspaceResultWorkspace operations. public sealed class WorkspacesGetWorkspaceResultWorkspace { @@ -5607,6 +5642,80 @@ internal sealed class PluginsReloadRequestWithSession public string SessionId { get; set; } = string.Empty; } +/// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. +[Experimental(Diagnostics.Experimental)] +public sealed class ProviderSessionToken +{ + /// When the token expires, if known. Callers should refresh by calling `getEndpoint` again before this time, or reactively on any 401/403 response from `baseUrl`. + [JsonPropertyName("expiresAt")] + public DateTimeOffset? ExpiresAt { get; set; } + + /// HTTP header name the token must be sent under. + [JsonPropertyName("header")] + public string Header { get; set; } = string.Empty; + + /// The model the token is bound to, when applicable. When set, the token is only valid for requests against this model. + [JsonPropertyName("model")] + public string? Model { get; set; } + + /// The short-lived token value. + [JsonPropertyName("token")] + public string Token { get; set; } = string.Empty; +} + +/// A snapshot of the provider endpoint the session is currently configured to talk to. +[Experimental(Diagnostics.Experimental)] +public sealed class ProviderEndpoint +{ + /// A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests. + [JsonPropertyName("apiKey")] + public string? ApiKey { get; set; } + + /// Base URL to pass to the LLM client library. + [Url] + [StringSyntax(StringSyntaxAttribute.Uri)] + [JsonPropertyName("baseUrl")] + public string BaseUrl { get; set; } = string.Empty; + + /// HTTP headers the caller must include on every outbound request. + [JsonPropertyName("headers")] + public IDictionary Headers { get => field ??= new Dictionary(); set; } + + /// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. + [JsonPropertyName("sessionToken")] + public ProviderSessionToken? SessionToken { get; set; } + + /// Provider family. Matches the `type` field of a BYOK provider config. + [JsonPropertyName("type")] + public ProviderEndpointType Type { get; set; } + + /// Wire API to be used, when required for the provider type. + [JsonPropertyName("wireApi")] + public ProviderEndpointWireApi? WireApi { get; set; } +} + +/// Optional model identifier to scope the endpoint snapshot to. +[Experimental(Diagnostics.Experimental)] +public sealed class ProviderGetEndpointRequest +{ + /// Model identifier the caller intends to use against the returned endpoint. Used to pick the correct wire shape. Omit to use whichever model the session is currently using. + [JsonPropertyName("modelId")] + public string? ModelId { get; set; } +} + +/// Optional model identifier to scope the endpoint snapshot to. +[Experimental(Diagnostics.Experimental)] +internal sealed class ProviderGetEndpointRequestWithSession +{ + /// Model identifier the caller intends to use against the returned endpoint. Used to pick the correct wire shape. Omit to use whichever model the session is currently using. + [JsonPropertyName("modelId")] + public string? ModelId { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Indicates whether the session options patch was applied successfully. [Experimental(Diagnostics.Experimental)] public sealed class SessionUpdateOptionsResult @@ -6087,7 +6196,7 @@ internal sealed class LspInitializeRequest [Experimental(Diagnostics.Experimental)] public sealed class Extension { - /// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper'). + /// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext'). [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; @@ -6099,7 +6208,7 @@ public sealed class Extension [JsonPropertyName("pid")] public long? Pid { get; set; } - /// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/). + /// Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state/<id>/extensions/). [JsonPropertyName("source")] public ExtensionSource Source { get; set; } @@ -6487,6 +6596,54 @@ internal sealed class SessionToolsGetCurrentMetadataRequest public string SessionId { get; set; } = string.Empty; } +/// Empty result after applying subagent settings. +[Experimental(Diagnostics.Experimental)] +public sealed class ToolsUpdateSubagentSettingsResult +{ +} + +/// Subagent model, reasoning effort, and context tier settings. +[Experimental(Diagnostics.Experimental)] +public sealed class SubagentSettingsEntry +{ + /// Context tier override for matching subagents. + [JsonPropertyName("contextTier")] + public SubagentSettingsEntryContextTier? ContextTier { get; set; } + + /// Reasoning effort override for matching subagents. + [JsonPropertyName("effortLevel")] + public string? EffortLevel { get; set; } + + /// Model override for matching subagents. + [JsonPropertyName("model")] + public string? Model { get; set; } +} + +/// Configured per-agent subagent overrides. +public sealed class UpdateSubagentSettingsRequestSubagents +{ + /// Per-agent settings keyed by subagent agent_type. + [JsonPropertyName("agents")] + public IDictionary? Agents { get; set; } + + /// Names of subagents the user has turned off; they cannot be dispatched. + [JsonPropertyName("disabledSubagents")] + public IList? DisabledSubagents { get; set; } +} + +/// Subagent settings to apply to the current session. +[Experimental(Diagnostics.Experimental)] +internal sealed class UpdateSubagentSettingsRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Subagent settings to apply, or null to clear the live session override. + [JsonPropertyName("subagents")] + public UpdateSubagentSettingsRequestSubagents? Subagents { get; set; } +} + /// Optional unstructured input hint. [Experimental(Diagnostics.Experimental)] public sealed class SlashCommandInput @@ -6539,6 +6696,10 @@ public sealed class SlashCommandInfo /// Canonical command name without a leading slash. [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; + + /// Whether the command may be the target of `/every` / `/after` schedules. Resolution happens at every tick, so only set this when the command is safe to re-invoke and produces an agent prompt. + [JsonPropertyName("schedulable")] + public bool? Schedulable { get; set; } } /// Slash commands available in the session, after applying any include/exclude filters. @@ -12995,6 +13156,135 @@ public override void Write(Utf8JsonWriter writer, McpAppsHostContextDetailsTheme } +/// Provider family. Matches the `type` field of a BYOK provider config. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ProviderEndpointType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ProviderEndpointType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// OpenAI-compatible endpoint (use the OpenAI client library). + public static ProviderEndpointType Openai { get; } = new("openai"); + + /// Azure OpenAI endpoint (use the OpenAI client library with the Azure base URL). + public static ProviderEndpointType Azure { get; } = new("azure"); + + /// Anthropic endpoint (use the Anthropic client library). + public static ProviderEndpointType Anthropic { get; } = new("anthropic"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ProviderEndpointType left, ProviderEndpointType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ProviderEndpointType left, ProviderEndpointType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ProviderEndpointType other && Equals(other); + + /// + public bool Equals(ProviderEndpointType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override ProviderEndpointType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ProviderEndpointType value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ProviderEndpointType)); + } + } +} + + +/// Wire API to be used, when required for the provider type. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ProviderEndpointWireApi : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ProviderEndpointWireApi(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Classic chat-completions request shape. + public static ProviderEndpointWireApi Completions { get; } = new("completions"); + + /// Newer responses request shape. + public static ProviderEndpointWireApi Responses { get; } = new("responses"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ProviderEndpointWireApi left, ProviderEndpointWireApi right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ProviderEndpointWireApi left, ProviderEndpointWireApi right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ProviderEndpointWireApi other && Equals(other); + + /// + public bool Equals(ProviderEndpointWireApi other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override ProviderEndpointWireApi Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ProviderEndpointWireApi value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ProviderEndpointWireApi)); + } + } +} + + /// Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -13532,7 +13822,7 @@ public override void Write(Utf8JsonWriter writer, OptionsUpdateToolFilterPrecede } -/// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/). +/// Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state/<id>/extensions/). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -13558,6 +13848,12 @@ public ExtensionSource(string value) /// Extension discovered from the user's ~/.copilot/extensions directory. public static ExtensionSource User { get; } = new("user"); + /// Extension contributed by an installed plugin. + public static ExtensionSource Plugin { get; } = new("plugin"); + + /// Extension discovered from the current session's state directory (loaded only for this session). + public static ExtensionSource Session { get; } = new("session"); + /// Returns a value indicating whether two instances are equivalent. public static bool operator ==(ExtensionSource left, ExtensionSource right) => left.Equals(right); @@ -13730,6 +14026,72 @@ public override void Write(Utf8JsonWriter writer, PushAttachmentGitHubReferenceT } +/// Context tier override for matching subagents. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SubagentSettingsEntryContextTier : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SubagentSettingsEntryContextTier(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Inherit the parent session's effective context tier at dispatch time. + public static SubagentSettingsEntryContextTier Inherit { get; } = new("inherit"); + + /// Use the model's default context window. + public static SubagentSettingsEntryContextTier Default { get; } = new("default"); + + /// Pin the subagent to the long-context tier when supported. + public static SubagentSettingsEntryContextTier LongContext { get; } = new("long_context"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SubagentSettingsEntryContextTier left, SubagentSettingsEntryContextTier right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SubagentSettingsEntryContextTier left, SubagentSettingsEntryContextTier right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SubagentSettingsEntryContextTier other && Equals(other); + + /// + public bool Equals(SubagentSettingsEntryContextTier other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override SubagentSettingsEntryContextTier Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SubagentSettingsEntryContextTier value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SubagentSettingsEntryContextTier)); + } + } +} + + /// Optional completion hint for the input (e.g. 'directory' for filesystem path completion). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -16279,6 +16641,12 @@ internal SessionRpc(CopilotSession session) Interlocked.CompareExchange(ref field, new(_session), null) ?? field; + /// Provider APIs. + public ProviderApi Provider => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; + /// Options APIs. public OptionsApi Options => field ?? @@ -16791,6 +17159,17 @@ public async Task ReadSqlTodosAsync(CancellationToken ca var request = new SessionPlanReadSqlTodosRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plan.readSqlTodos", [request], cancellationToken); } + + /// Reads todo rows AND dependency edges from the session SQL database for structured progress UI. Same defensive behavior as readSqlTodos — returns empty arrays when the database, tables, or columns aren't available. Clients should call this on session start and after every `session.todos_changed` event to refresh structured-UI rendering. + /// The to monitor for cancellation requests. The default is . + /// Todo rows + dependency edges read from the session SQL database. + public async Task ReadSqlTodosWithDependenciesAsync(CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new SessionPlanReadSqlTodosWithDependenciesRequest { SessionId = _session.SessionId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plan.readSqlTodosWithDependencies", [request], cancellationToken); + } } /// Provides session-scoped Workspaces APIs. @@ -17668,6 +18047,30 @@ public async Task ReloadAsync(PluginsReloadRequest? request = null, Cancellation } } +/// Provides session-scoped Provider APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class ProviderApi +{ + private readonly CopilotSession _session; + + internal ProviderApi(CopilotSession session) + { + _session = session; + } + + /// Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses. + /// Optional model identifier to scope the endpoint snapshot to. + /// The to monitor for cancellation requests. The default is . + /// A snapshot of the provider endpoint the session is currently configured to talk to. + public async Task GetEndpointAsync(ProviderGetEndpointRequest? request = null, CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var rpcRequest = new ProviderGetEndpointRequestWithSession { SessionId = _session.SessionId, ModelId = request?.ModelId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.provider.getEndpoint", [rpcRequest], cancellationToken); + } +} + /// Provides session-scoped Options APIs. [Experimental(Diagnostics.Experimental)] public sealed class OptionsApi @@ -17881,6 +18284,18 @@ public async Task GetCurrentMetadataAsync(Cancell var request = new SessionToolsGetCurrentMetadataRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.tools.getCurrentMetadata", [request], cancellationToken); } + + /// Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions. + /// Subagent settings to apply, or null to clear the live session override. + /// The to monitor for cancellation requests. The default is . + /// Empty result after applying subagent settings. + public async Task UpdateSubagentSettingsAsync(UpdateSubagentSettingsRequestSubagents? subagents = null, CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new UpdateSubagentSettingsRequest { SessionId = _session.SessionId, Subagents = subagents }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.tools.updateSubagentSettings", [request], cancellationToken); + } } /// Provides session-scoped Commands APIs. @@ -19176,6 +19591,7 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, FuncSignal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. +/// Represents the session.todos_changed event. +public sealed partial class SessionTodosChangedEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "session.todos_changed"; + + /// The session.todos_changed event payload. + [JsonPropertyName("data")] + public required SessionTodosChangedData Data { get; set; } +} + /// Workspace file change details including path and operation type. /// Represents the session.workspace_file_changed event. public sealed partial class SessionWorkspaceFileChangedEvent : SessionEvent @@ -1693,6 +1707,11 @@ public sealed partial class SessionPlanChangedData public required PlanChangedOperation Operation { get; set; } } +/// Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. +public sealed partial class SessionTodosChangedData +{ +} + /// Workspace file change details including path and operation type. public sealed partial class SessionWorkspaceFileChangedData { @@ -2181,18 +2200,6 @@ public sealed partial class AssistantStreamingDeltaData /// Assistant response containing text content, optional tool requests, and interaction metadata. public sealed partial class AssistantMessageData { - /// Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping. - [Experimental(Diagnostics.Experimental)] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("anthropicAdvisorBlocks")] - public JsonElement[]? AnthropicAdvisorBlocks { get; set; } - - /// Anthropic advisor model ID used for this response, for timeline display on replay. - [Experimental(Diagnostics.Experimental)] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("anthropicAdvisorModel")] - public string? AnthropicAdvisorModel { get; set; } - /// Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("apiCallId")] @@ -2253,6 +2260,11 @@ public sealed partial class AssistantMessageData [JsonPropertyName("requestId")] public string? RequestId { get; set; } + /// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("serverTools")] + public AssistantMessageServerTools? ServerTools { get; set; } + /// Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("serviceRequestId")] @@ -2528,6 +2540,11 @@ public sealed partial class ToolExecutionStartData [JsonPropertyName("toolCallId")] public required string ToolCallId { get; set; } + /// Tool definition metadata, present for MCP tools with MCP Apps support. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("toolDescription")] + public ToolExecutionStartToolDescription? ToolDescription { get; set; } + /// Name of the tool being executed. [JsonPropertyName("toolName")] public required string ToolName { get; set; } @@ -2661,7 +2678,7 @@ public sealed partial class SkillInvokedData [JsonPropertyName("pluginVersion")] public string? PluginVersion { get; set; } - /// Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill). + /// Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill). [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("source")] public string? Source { get; set; } @@ -3953,6 +3970,36 @@ public partial class Attachment } +/// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping. +/// Nested data type for AssistantMessageServerTools. +[Experimental(Diagnostics.Experimental)] +public sealed partial class AssistantMessageServerTools +{ + /// Gets or sets the advisorModel value. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("advisorModel")] + public string? AdvisorModel { get; set; } + + /// Gets or sets the functionCallNamespaces value. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("functionCallNamespaces")] + public IDictionary? FunctionCallNamespaces { get; set; } + + /// Gets or sets the items value. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("items")] + public JsonElement[]? Items { get; set; } + + /// Gets or sets the provider value. + [JsonPropertyName("provider")] + public required string Provider { get; set; } + + /// Gets or sets the rawContentBlocks value. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("rawContentBlocks")] + public JsonElement[]? RawContentBlocks { get; set; } +} + /// A tool invocation request from the assistant. /// Nested data type for AssistantMessageToolRequest. public sealed partial class AssistantMessageToolRequest @@ -4076,6 +4123,50 @@ internal sealed partial class AssistantUsageQuotaSnapshot internal required long UsedRequests { get; set; } } +/// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +/// Nested data type for ToolExecutionStartToolDescriptionMetaUI. +public sealed partial class ToolExecutionStartToolDescriptionMetaUI +{ + /// URI of the UI resource. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("resourceUri")] + public string? ResourceUri { get; set; } + + /// Who can access this tool. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("visibility")] + public ToolExecutionStartToolDescriptionMetaUIVisibility[]? Visibility { get; set; } +} + +/// MCP Apps metadata for UI resource association. +/// Nested data type for ToolExecutionStartToolDescriptionMeta. +public sealed partial class ToolExecutionStartToolDescriptionMeta +{ + /// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("ui")] + public ToolExecutionStartToolDescriptionMetaUI? Ui { get; set; } +} + +/// Tool definition metadata, present for MCP tools with MCP Apps support. +/// Nested data type for ToolExecutionStartToolDescription. +public sealed partial class ToolExecutionStartToolDescription +{ + /// MCP Apps metadata for UI resource association. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("_meta")] + public ToolExecutionStartToolDescriptionMeta? _meta { get; set; } + + /// Tool description. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("description")] + public string? Description { get; set; } + + /// Tool name. + [JsonPropertyName("name")] + public required string Name { get; set; } +} + /// Error details when the tool execution failed. /// Nested data type for ToolExecutionCompleteError. public sealed partial class ToolExecutionCompleteError @@ -5925,7 +6016,7 @@ public sealed partial class McpServersLoadedServer /// Nested data type for ExtensionsLoadedExtension. public sealed partial class ExtensionsLoadedExtension { - /// Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper'). + /// Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext'). [JsonPropertyName("id")] public required string Id { get; set; } @@ -7048,6 +7139,67 @@ public override void Write(Utf8JsonWriter writer, AbortReason value, JsonSeriali } } +/// Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct ToolExecutionStartToolDescriptionMetaUIVisibility : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public ToolExecutionStartToolDescriptionMetaUIVisibility(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Tool is callable by the model (LLM tool surface). + public static ToolExecutionStartToolDescriptionMetaUIVisibility Model { get; } = new("model"); + + /// Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool. + public static ToolExecutionStartToolDescriptionMetaUIVisibility App { get; } = new("app"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(ToolExecutionStartToolDescriptionMetaUIVisibility left, ToolExecutionStartToolDescriptionMetaUIVisibility right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(ToolExecutionStartToolDescriptionMetaUIVisibility left, ToolExecutionStartToolDescriptionMetaUIVisibility right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is ToolExecutionStartToolDescriptionMetaUIVisibility other && Equals(other); + + /// + public bool Equals(ToolExecutionStartToolDescriptionMetaUIVisibility other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + /// + public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); + + /// + public override string ToString() => Value; + + /// Provides a for serializing instances. + [EditorBrowsable(EditorBrowsableState.Never)] + public sealed class Converter : JsonConverter + { + /// + public override ToolExecutionStartToolDescriptionMetaUIVisibility Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, ToolExecutionStartToolDescriptionMetaUIVisibility value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ToolExecutionStartToolDescriptionMetaUIVisibility)); + } + } +} + /// Theme variant this icon is intended for. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -8106,6 +8258,12 @@ public ExtensionsLoadedExtensionSource(string value) /// Extension discovered from the user's extension directory. public static ExtensionsLoadedExtensionSource User { get; } = new("user"); + /// Extension contributed by an installed plugin. + public static ExtensionsLoadedExtensionSource Plugin { get; } = new("plugin"); + + /// Extension discovered from the current session's state directory. + public static ExtensionsLoadedExtensionSource Session { get; } = new("session"); + /// Returns a value indicating whether two instances are equivalent. public static bool operator ==(ExtensionsLoadedExtensionSource left, ExtensionsLoadedExtensionSource right) => left.Equals(right); @@ -8283,6 +8441,7 @@ public override void Write(Utf8JsonWriter writer, CanvasOpenedAvailability value [JsonSerializable(typeof(AssistantMessageDeltaData))] [JsonSerializable(typeof(AssistantMessageDeltaEvent))] [JsonSerializable(typeof(AssistantMessageEvent))] +[JsonSerializable(typeof(AssistantMessageServerTools))] [JsonSerializable(typeof(AssistantMessageStartData))] [JsonSerializable(typeof(AssistantMessageStartEvent))] [JsonSerializable(typeof(AssistantMessageToolRequest))] @@ -8482,6 +8641,8 @@ public override void Write(Utf8JsonWriter writer, CanvasOpenedAvailability value [JsonSerializable(typeof(SessionTaskCompleteEvent))] [JsonSerializable(typeof(SessionTitleChangedData))] [JsonSerializable(typeof(SessionTitleChangedEvent))] +[JsonSerializable(typeof(SessionTodosChangedData))] +[JsonSerializable(typeof(SessionTodosChangedEvent))] [JsonSerializable(typeof(SessionToolsUpdatedData))] [JsonSerializable(typeof(SessionToolsUpdatedEvent))] [JsonSerializable(typeof(SessionTruncationData))] @@ -8554,6 +8715,9 @@ public override void Write(Utf8JsonWriter writer, CanvasOpenedAvailability value [JsonSerializable(typeof(ToolExecutionProgressEvent))] [JsonSerializable(typeof(ToolExecutionStartData))] [JsonSerializable(typeof(ToolExecutionStartEvent))] +[JsonSerializable(typeof(ToolExecutionStartToolDescription))] +[JsonSerializable(typeof(ToolExecutionStartToolDescriptionMeta))] +[JsonSerializable(typeof(ToolExecutionStartToolDescriptionMetaUI))] [JsonSerializable(typeof(ToolUserRequestedData))] [JsonSerializable(typeof(ToolUserRequestedEvent))] [JsonSerializable(typeof(UserInputCompletedData))] diff --git a/dotnet/test/E2E/BuiltinToolsE2ETests.cs b/dotnet/test/E2E/BuiltinToolsE2ETests.cs index 467904577..5fc031417 100644 --- a/dotnet/test/E2E/BuiltinToolsE2ETests.cs +++ b/dotnet/test/E2E/BuiltinToolsE2ETests.cs @@ -49,7 +49,7 @@ public async Task Should_Capture_Stderr_Output() var session = await CreateSessionAsync(); var msg = await session.SendAndWaitAsync(new MessageOptions { - Prompt = "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.", + Prompt = "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.", }, SendTimeout); Assert.Contains("error_msg", msg?.Data.Content ?? string.Empty); } diff --git a/go/internal/e2e/builtin_tools_e2e_test.go b/go/internal/e2e/builtin_tools_e2e_test.go index 7b48018e0..46d3f1dca 100644 --- a/go/internal/e2e/builtin_tools_e2e_test.go +++ b/go/internal/e2e/builtin_tools_e2e_test.go @@ -68,7 +68,7 @@ func TestBuiltinToolsE2E(t *testing.T) { sendCtx, cancel := context.WithTimeout(t.Context(), sendTimeout) defer cancel() msg, err := session.SendAndWait(sendCtx, copilot.MessageOptions{ - Prompt: "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.", + Prompt: "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.", }) if err != nil { t.Fatalf("SendAndWait failed: %v", err) diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index c61facef0..583ed3c58 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -1290,13 +1290,15 @@ type ExecuteCommandResult struct { // Schema for the `Extension` type. // Experimental: Extension is part of an experimental API and may change or be removed. type Extension struct { - // Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') + // Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', + // 'plugin:my-plugin:my-ext') ID string `json:"id"` // Extension name (directory name) Name string `json:"name"` // Process ID if the extension is running Pid *int64 `json:"pid,omitempty"` - // Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) + // Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin + // (installed plugin), or session (session-state//extensions/) Source ExtensionSource `json:"source"` // Current status: running, disabled, failed, or starting Status ExtensionStatus `json:"status"` @@ -2715,6 +2717,14 @@ type MCPUnregisterExternalClientRequest struct { ServerName string `json:"serverName"` } +// Memory configuration for this session. +// Experimental: MemoryConfiguration is part of an experimental API and may change or be +// removed. +type MemoryConfiguration struct { + // Whether memory is enabled for the session. + Enabled bool `json:"enabled"` +} + // Model identifier and token limits used to compute the context-info breakdown. // Experimental: MetadataContextInfoRequest is part of an experimental API and may change or // be removed. @@ -4277,7 +4287,32 @@ type PlanReadSQLTodosResult struct { Rows []PlanSQLTodosRow `json:"rows"` } -// Schema for the `PlanSqlTodosRow` type. +// Todo rows + dependency edges read from the session SQL database. +// Experimental: PlanReadSQLTodosWithDependenciesResult is part of an experimental API and +// may change or be removed. +type PlanReadSQLTodosWithDependenciesResult struct { + // Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, + // or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does + // not affect the rows result and vice versa. + Dependencies []PlanSQLTodoDependency `json:"dependencies"` + // Rows from the session SQL todos table, ordered by creation time and id. Empty when no + // database, no todos table, or the SELECT failed. + Rows []PlanSQLTodosRow `json:"rows"` +} + +// A single dependency edge read from the session SQL `todo_deps` table, indicating that one +// todo must complete before another. +// Experimental: PlanSQLTodoDependency is part of an experimental API and may change or be +// removed. +type PlanSQLTodoDependency struct { + // ID of the todo it depends on. + DependsOn string `json:"dependsOn"` + // ID of the todo that has the dependency. + TodoID string `json:"todoId"` +} + +// A single todo row read from the session SQL `todos` table. All fields are optional +// because the SQL schema is best-effort and the agent may not have populated every column. // Experimental: PlanSQLTodosRow is part of an experimental API and may change or be removed. type PlanSQLTodosRow struct { // Todo description. @@ -4552,6 +4587,52 @@ type ProviderConfigAzure struct { APIVersion *string `json:"apiVersion,omitempty"` } +// A snapshot of the provider endpoint the session is currently configured to talk to. +// Experimental: ProviderEndpoint is part of an experimental API and may change or be +// removed. +type ProviderEndpoint struct { + // A credential the caller should use with this endpoint. Omitted only when the endpoint + // accepts unauthenticated requests. + APIKey *string `json:"apiKey,omitempty"` + // Base URL to pass to the LLM client library. + BaseURL string `json:"baseUrl"` + // HTTP headers the caller must include on every outbound request. + Headers map[string]string `json:"headers"` + // Short-lived, rotating credential the caller must send on every request, in addition to + // `apiKey` if one is present. Omitted when the endpoint does not require one. + SessionToken *ProviderSessionToken `json:"sessionToken,omitempty"` + // Provider family. Matches the `type` field of a BYOK provider config. + Type ProviderEndpointType `json:"type"` + // Wire API to be used, when required for the provider type. + WireAPI *ProviderEndpointWireAPI `json:"wireApi,omitempty"` +} + +// Optional model identifier to scope the endpoint snapshot to. +// Experimental: ProviderGetEndpointRequest is part of an experimental API and may change or +// be removed. +type ProviderGetEndpointRequest struct { + // Model identifier the caller intends to use against the returned endpoint. Used to pick + // the correct wire shape. Omit to use whichever model the session is currently using. + ModelID *string `json:"modelId,omitempty"` +} + +// Short-lived, rotating credential the caller must send on every request, in addition to +// `apiKey` if one is present. Omitted when the endpoint does not require one. +// Experimental: ProviderSessionToken is part of an experimental API and may change or be +// removed. +type ProviderSessionToken struct { + // When the token expires, if known. Callers should refresh by calling `getEndpoint` again + // before this time, or reactively on any 401/403 response from `baseUrl`. + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // HTTP header name the token must be sent under. + Header string `json:"header"` + // The model the token is bound to, when applicable. When set, the token is only valid for + // requests against this model. + Model *string `json:"model,omitempty"` + // The short-lived token value. + Token string `json:"token"` +} + // Schema for the `PushAttachment` type. // Experimental: PushAttachment is part of an experimental API and may change or be removed. type PushAttachment interface { @@ -6008,6 +6089,13 @@ type SessionOpenOptions struct { EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` // Denylist of tool names. ExcludedTools []string `json:"excludedTools,omitzero"` + // ExP assignment ('flight') data injected by an SDK integrator, in the same JSON shape the + // Copilot CLI fetches from the experimentation service (CopilotExpAssignmentResponse). When + // supplied this is fed into the FeatureFlagService exactly like CLI-fetched assignments and + // ExP-backed flags wait for it. When absent the session does not block on ExP. + // Internal: ExpAssignments is part of the SDK's internal API surface and is not intended + // for external use. + ExpAssignments any `json:"expAssignments,omitempty"` // Feature-flag values resolved by the host. FeatureFlags map[string]bool `json:"featureFlags,omitzero"` // Installed plugins visible to the session. @@ -6020,6 +6108,8 @@ type SessionOpenOptions struct { LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` // Identifier sent to LSP-style integrations. LspClientName *string `json:"lspClientName,omitempty"` + // Memory configuration for this session. + Memory *MemoryConfiguration `json:"memory,omitempty"` // Initial model identifier. Model *string `json:"model,omitempty"` // Initial model capability overrides. @@ -7086,6 +7176,10 @@ type SlashCommandInfo struct { Kind SlashCommandKind `json:"kind"` // Canonical command name without a leading slash Name string `json:"name"` + // Whether the command may be the target of `/every` / `/after` schedules. Resolution + // happens at every tick, so only set this when the command is safe to re-invoke and + // produces an agent prompt. + Schedulable *bool `json:"schedulable,omitempty"` } // Optional unstructured input hint @@ -7211,6 +7305,28 @@ type SlashCommandSelectSubcommandOption struct { Name string `json:"name"` } +// Configured per-agent subagent overrides +// Experimental: SubagentSettings is part of an experimental API and may change or be +// removed. +type SubagentSettings struct { + // Per-agent settings keyed by subagent agent_type + Agents map[string]SubagentSettingsEntry `json:"agents,omitzero"` + // Names of subagents the user has turned off; they cannot be dispatched + DisabledSubagents []string `json:"disabledSubagents,omitzero"` +} + +// Subagent model, reasoning effort, and context tier settings +// Experimental: SubagentSettingsEntry is part of an experimental API and may change or be +// removed. +type SubagentSettingsEntry struct { + // Context tier override for matching subagents + ContextTier *SubagentSettingsEntryContextTier `json:"contextTier,omitempty"` + // Reasoning effort override for matching subagents + EffortLevel *string `json:"effortLevel,omitempty"` + // Model override for matching subagents + Model *string `json:"model,omitempty"` +} + // Schema for the `TaskInfo` type. // Experimental: TaskInfo is part of an experimental API and may change or be removed. type TaskInfo interface { @@ -7577,6 +7693,12 @@ type ToolsListRequest struct { Model *string `json:"model,omitempty"` } +// Empty result after applying subagent settings +// Experimental: ToolsUpdateSubagentSettingsResult is part of an experimental API and may +// change or be removed. +type ToolsUpdateSubagentSettingsResult struct { +} + // Schema applied to each item in the array. // Experimental: UIElicitationArrayAnyOfFieldItems is part of an experimental API and may // change or be removed. @@ -8010,6 +8132,14 @@ type UIUserInputResponse struct { WasFreeform bool `json:"wasFreeform"` } +// Subagent settings to apply to the current session +// Experimental: UpdateSubagentSettingsRequest is part of an experimental API and may change +// or be removed. +type UpdateSubagentSettingsRequest struct { + // Subagent settings to apply, or null to clear the live session override + Subagents *SubagentSettings `json:"subagents,omitempty"` +} + // Accumulated session usage metrics, including premium request cost, token counts, model // breakdown, and code-change totals. // Experimental: UsageGetMetricsResult is part of an experimental API and may change or be @@ -8758,13 +8888,19 @@ const ( EventsCursorStatusOk EventsCursorStatus = "ok" ) -// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) +// Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin +// (installed plugin), or session (session-state//extensions/) // Experimental: ExtensionSource is part of an experimental API and may change or be removed. type ExtensionSource string const ( + // Extension contributed by an installed plugin. + ExtensionSourcePlugin ExtensionSource = "plugin" // Extension discovered from the current project's .github/extensions directory. ExtensionSourceProject ExtensionSource = "project" + // Extension discovered from the current session's state directory (loaded only for this + // session). + ExtensionSourceSession ExtensionSource = "session" // Extension discovered from the user's ~/.copilot/extensions directory. ExtensionSourceUser ExtensionSource = "user" ) @@ -9377,6 +9513,32 @@ const ( ProviderConfigWireAPIResponses ProviderConfigWireAPI = "responses" ) +// Provider family. Matches the `type` field of a BYOK provider config. +// Experimental: ProviderEndpointType is part of an experimental API and may change or be +// removed. +type ProviderEndpointType string + +const ( + // Anthropic endpoint (use the Anthropic client library). + ProviderEndpointTypeAnthropic ProviderEndpointType = "anthropic" + // Azure OpenAI endpoint (use the OpenAI client library with the Azure base URL). + ProviderEndpointTypeAzure ProviderEndpointType = "azure" + // OpenAI-compatible endpoint (use the OpenAI client library). + ProviderEndpointTypeOpenai ProviderEndpointType = "openai" +) + +// Wire API to be used, when required for the provider type. +// Experimental: ProviderEndpointWireAPI is part of an experimental API and may change or be +// removed. +type ProviderEndpointWireAPI string + +const ( + // Classic chat-completions request shape. + ProviderEndpointWireAPICompletions ProviderEndpointWireAPI = "completions" + // Newer responses request shape. + ProviderEndpointWireAPIResponses ProviderEndpointWireAPI = "responses" +) + // Type of GitHub reference // Experimental: PushAttachmentGitHubReferenceType is part of an experimental API and may // change or be removed. @@ -9852,6 +10014,20 @@ const ( SlashCommandKindSkill SlashCommandKind = "skill" ) +// Context tier override for matching subagents +// Experimental: SubagentSettingsEntryContextTier is part of an experimental API and may +// change or be removed. +type SubagentSettingsEntryContextTier string + +const ( + // Use the model's default context window. + SubagentSettingsEntryContextTierDefault SubagentSettingsEntryContextTier = "default" + // Inherit the parent session's effective context tier at dispatch time. + SubagentSettingsEntryContextTierInherit SubagentSettingsEntryContextTier = "inherit" + // Pin the subagent to the long-context tier when supported. + SubagentSettingsEntryContextTierLongContext SubagentSettingsEntryContextTier = "long_context" +) + // Whether task execution is synchronously awaited or managed in the background // Experimental: TaskExecutionMode is part of an experimental API and may change or be // removed. @@ -13941,6 +14117,28 @@ func (a *PlanAPI) ReadSqlTodos(ctx context.Context) (*PlanReadSQLTodosResult, er return &result, nil } +// ReadSqlTodosWithDependencies reads todo rows AND dependency edges from the session SQL +// database for structured progress UI. Same defensive behavior as readSqlTodos — returns +// empty arrays when the database, tables, or columns aren't available. Clients should call +// this on session start and after every `session.todos_changed` event to refresh +// structured-UI rendering. +// +// RPC method: session.plan.readSqlTodosWithDependencies. +// +// Returns: Todo rows + dependency edges read from the session SQL database. +func (a *PlanAPI) ReadSqlTodosWithDependencies(ctx context.Context) (*PlanReadSQLTodosWithDependenciesResult, error) { + req := map[string]any{"sessionId": a.sessionID} + raw, err := a.client.Request(ctx, "session.plan.readSqlTodosWithDependencies", req) + if err != nil { + return nil, err + } + var result PlanReadSQLTodosWithDependenciesResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Update writes new content to the session plan file. // // RPC method: session.plan.update. @@ -14020,6 +14218,41 @@ func (a *PluginsAPI) Reload(ctx context.Context, params ...*PluginsReloadRequest return &result, nil } +// Experimental: ProviderAPI contains experimental APIs that may change or be removed. +type ProviderAPI sessionAPI + +// GetEndpoint returns the provider endpoint and credentials the session is currently +// configured to talk to, so the caller can make inference calls directly against the same +// backend the session uses. +// +// RPC method: session.provider.getEndpoint. +// +// Parameters: Optional model identifier to scope the endpoint snapshot to. +// +// Returns: A snapshot of the provider endpoint the session is currently configured to talk +// to. +func (a *ProviderAPI) GetEndpoint(ctx context.Context, params ...*ProviderGetEndpointRequest) (*ProviderEndpoint, error) { + var requestParams *ProviderGetEndpointRequest + if len(params) > 0 { + requestParams = params[0] + } + req := map[string]any{"sessionId": a.sessionID} + if requestParams != nil { + if requestParams.ModelID != nil { + req["modelId"] = *requestParams.ModelID + } + } + raw, err := a.client.Request(ctx, "session.provider.getEndpoint", req) + if err != nil { + return nil, err + } + var result ProviderEndpoint + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: QueueAPI contains experimental APIs that may change or be removed. type QueueAPI sessionAPI @@ -14794,6 +15027,33 @@ func (a *ToolsAPI) InitializeAndValidate(ctx context.Context) (*ToolsInitializeA return &result, nil } +// UpdateSubagentSettings updates the current session's live subagent settings after user +// settings change. The persisted user settings remain the source of truth for future +// sessions. +// +// RPC method: session.tools.updateSubagentSettings. +// +// Parameters: Subagent settings to apply to the current session +// +// Returns: Empty result after applying subagent settings +func (a *ToolsAPI) UpdateSubagentSettings(ctx context.Context, params *UpdateSubagentSettingsRequest) (*ToolsUpdateSubagentSettingsResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.Subagents != nil { + req["subagents"] = *params.Subagents + } + } + raw, err := a.client.Request(ctx, "session.tools.updateSubagentSettings", req) + if err != nil { + return nil, err + } + var result ToolsUpdateSubagentSettingsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Experimental: UIAPI contains experimental APIs that may change or be removed. type UIAPI sessionAPI @@ -15251,6 +15511,7 @@ type SessionRPC struct { Permissions *PermissionsAPI Plan *PlanAPI Plugins *PluginsAPI + Provider *ProviderAPI Queue *QueueAPI Remote *RemoteAPI Schedule *ScheduleAPI @@ -15461,6 +15722,7 @@ func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC { r.Permissions = (*PermissionsAPI)(&r.common) r.Plan = (*PlanAPI)(&r.common) r.Plugins = (*PluginsAPI)(&r.common) + r.Provider = (*ProviderAPI)(&r.common) r.Queue = (*QueueAPI)(&r.common) r.Remote = (*RemoteAPI)(&r.common) r.Schedule = (*ScheduleAPI)(&r.common) diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index bf455dc7e..573528b5a 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -2694,12 +2694,14 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` ExcludedTools []string `json:"excludedTools,omitzero"` + ExpAssignments any `json:"expAssignments,omitempty"` FeatureFlags map[string]bool `json:"featureFlags,omitzero"` InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` IntegrationID *string `json:"integrationId,omitempty"` IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` LspClientName *string `json:"lspClientName,omitempty"` + Memory *MemoryConfiguration `json:"memory,omitempty"` Model *string `json:"model,omitempty"` ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` Name *string `json:"name,omitempty"` @@ -2753,12 +2755,14 @@ func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { r.EnvValueMode = raw.EnvValueMode r.EventsLogDirectory = raw.EventsLogDirectory r.ExcludedTools = raw.ExcludedTools + r.ExpAssignments = raw.ExpAssignments r.FeatureFlags = raw.FeatureFlags r.InstalledPlugins = raw.InstalledPlugins r.IntegrationID = raw.IntegrationID r.IsExperimentalMode = raw.IsExperimentalMode r.LogInteractiveShells = raw.LogInteractiveShells r.LspClientName = raw.LspClientName + r.Memory = raw.Memory r.Model = raw.Model r.ModelCapabilitiesOverrides = raw.ModelCapabilitiesOverrides r.Name = raw.Name diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index c9091edc5..066fd854a 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -443,6 +443,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeSessionTodosChanged: + var d SessionTodosChangedData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeSessionToolsUpdated: var d SessionToolsUpdatedData if err := json.Unmarshal(raw.Data, &d); err != nil { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 98d008256..fdad4a1ad 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -121,6 +121,7 @@ const ( SessionEventTypeSessionStart SessionEventType = "session.start" SessionEventTypeSessionTaskComplete SessionEventType = "session.task_complete" SessionEventTypeSessionTitleChanged SessionEventType = "session.title_changed" + SessionEventTypeSessionTodosChanged SessionEventType = "session.todos_changed" SessionEventTypeSessionToolsUpdated SessionEventType = "session.tools_updated" SessionEventTypeSessionTruncation SessionEventType = "session.truncation" SessionEventTypeSessionUsageInfo SessionEventType = "session.usage_info" @@ -177,12 +178,6 @@ func (*AssistantReasoningData) Type() SessionEventType { return SessionEventType // Assistant response containing text content, optional tool requests, and interaction metadata type AssistantMessageData struct { - // Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - // Experimental: AnthropicAdvisorBlocks is part of an experimental API and may change or be removed. - AnthropicAdvisorBlocks []any `json:"anthropicAdvisorBlocks,omitzero"` - // Anthropic advisor model ID used for this response, for timeline display on replay - // Experimental: AnthropicAdvisorModel is part of an experimental API and may change or be removed. - AnthropicAdvisorModel *string `json:"anthropicAdvisorModel,omitempty"` // Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. APICallID *string `json:"apiCallId,omitempty"` // The assistant's text response content @@ -208,6 +203,8 @@ type AssistantMessageData struct { ReasoningText *string `json:"reasoningText,omitempty"` // GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs RequestID *string `json:"requestId,omitempty"` + // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping + ServerTools *AssistantMessageServerTools `json:"serverTools,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Tool invocations requested by the assistant in this message @@ -1242,6 +1239,13 @@ type SessionTitleChangedData struct { func (*SessionTitleChangedData) sessionEventData() {} func (*SessionTitleChangedData) Type() SessionEventType { return SessionEventTypeSessionTitleChanged } +// Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. +type SessionTodosChangedData struct { +} + +func (*SessionTodosChangedData) sessionEventData() {} +func (*SessionTodosChangedData) Type() SessionEventType { return SessionEventTypeSessionTodosChanged } + // Skill invocation details including content, allowed tools, and plugin metadata type SkillInvokedData struct { // Tool names that should be auto-approved when this skill is active @@ -1258,7 +1262,7 @@ type SkillInvokedData struct { PluginName *string `json:"pluginName,omitempty"` // Version of the plugin this skill originated from, when applicable PluginVersion *string `json:"pluginVersion,omitempty"` - // Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) + // Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) Source *string `json:"source,omitempty"` // What triggered the skill invocation: `user-invoked` (explicit user action, such as via a slash command or UI affordance), `agent-invoked` (agent requested the skill), or `context-load` (loaded as part of another context, such as preloading skills configured on a custom agent or subagent) Trigger *SkillInvokedTrigger `json:"trigger,omitempty"` @@ -1495,6 +1499,8 @@ type ToolExecutionStartData struct { ParentToolCallID *string `json:"parentToolCallId,omitempty"` // Unique identifier for this tool call ToolCallID string `json:"toolCallId"` + // Tool definition metadata, present for MCP tools with MCP Apps support + ToolDescription *ToolExecutionStartToolDescription `json:"toolDescription,omitempty"` // Name of the tool being executed ToolName string `json:"toolName"` // Identifier for the agent loop turn this tool was invoked in, matching the corresponding assistant.turn_start event @@ -1627,6 +1633,16 @@ func (*SessionWorkspaceFileChangedData) Type() SessionEventType { return SessionEventTypeSessionWorkspaceFileChanged } +// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping +// Experimental: AssistantMessageServerTools is part of an experimental API and may change or be removed. +type AssistantMessageServerTools struct { + AdvisorModel *string `json:"advisorModel,omitempty"` + FunctionCallNamespaces map[string]string `json:"functionCallNamespaces,omitzero"` + Items []any `json:"items,omitzero"` + Provider string `json:"provider"` + RawContentBlocks []any `json:"rawContentBlocks,omitzero"` +} + // A tool invocation request from the assistant type AssistantMessageToolRequest struct { // Arguments to pass to the tool, format depends on the tool @@ -1845,7 +1861,7 @@ type ElicitationRequestedSchema struct { // Schema for the `ExtensionsLoadedExtension` type. type ExtensionsLoadedExtension struct { - // Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper') + // Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') ID string `json:"id"` // Extension name (directory name) Name string `json:"name"` @@ -2892,6 +2908,30 @@ type ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation struct { type ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone struct { } +// Tool definition metadata, present for MCP tools with MCP Apps support +type ToolExecutionStartToolDescription struct { + // Tool description + Description *string `json:"description,omitempty"` + // MCP Apps metadata for UI resource association + Meta *ToolExecutionStartToolDescriptionMeta `json:"_meta,omitempty"` + // Tool name + Name string `json:"name"` +} + +// MCP Apps metadata for UI resource association +type ToolExecutionStartToolDescriptionMeta struct { + // Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + UI *ToolExecutionStartToolDescriptionMetaUI `json:"ui,omitempty"` +} + +// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +type ToolExecutionStartToolDescriptionMetaUI struct { + // URI of the UI resource + ResourceURI *string `json:"resourceUri,omitempty"` + // Who can access this tool + Visibility []ToolExecutionStartToolDescriptionMetaUIVisibility `json:"visibility,omitzero"` +} + // Working directory and git context at session start type WorkingDirectoryContext struct { // Base commit of current git branch at session start time @@ -3031,8 +3071,12 @@ const ( type ExtensionsLoadedExtensionSource string const ( + // Extension contributed by an installed plugin. + ExtensionsLoadedExtensionSourcePlugin ExtensionsLoadedExtensionSource = "plugin" // Extension discovered from the current project. ExtensionsLoadedExtensionSourceProject ExtensionsLoadedExtensionSource = "project" + // Extension discovered from the current session's state directory. + ExtensionsLoadedExtensionSourceSession ExtensionsLoadedExtensionSource = "session" // Extension discovered from the user's extension directory. ExtensionsLoadedExtensionSourceUser ExtensionsLoadedExtensionSource = "user" ) @@ -3262,6 +3306,16 @@ const ( ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel ToolExecutionCompleteToolDescriptionMetaUIVisibility = "model" ) +// Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration. +type ToolExecutionStartToolDescriptionMetaUIVisibility string + +const ( + // Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool + ToolExecutionStartToolDescriptionMetaUIVisibilityApp ToolExecutionStartToolDescriptionMetaUIVisibility = "app" + // Tool is callable by the model (LLM tool surface) + ToolExecutionStartToolDescriptionMetaUIVisibilityModel ToolExecutionStartToolDescriptionMetaUIVisibility = "model" +) + // The agent mode that was active when this message was sent type UserMessageAgentMode string diff --git a/go/zsession_events.go b/go/zsession_events.go index 5a8962efd..46b641663 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -12,6 +12,7 @@ type ( AssistantIntentData = rpc.AssistantIntentData AssistantMessageData = rpc.AssistantMessageData AssistantMessageDeltaData = rpc.AssistantMessageDeltaData + AssistantMessageServerTools = rpc.AssistantMessageServerTools AssistantMessageStartData = rpc.AssistantMessageStartData AssistantMessageToolRequest = rpc.AssistantMessageToolRequest AssistantMessageToolRequestType = rpc.AssistantMessageToolRequestType @@ -190,6 +191,7 @@ type ( SessionStartData = rpc.SessionStartData SessionTaskCompleteData = rpc.SessionTaskCompleteData SessionTitleChangedData = rpc.SessionTitleChangedData + SessionTodosChangedData = rpc.SessionTodosChangedData SessionToolsUpdatedData = rpc.SessionToolsUpdatedData SessionTruncationData = rpc.SessionTruncationData SessionUsageInfoData = rpc.SessionUsageInfoData @@ -254,6 +256,10 @@ type ( ToolExecutionPartialResultData = rpc.ToolExecutionPartialResultData ToolExecutionProgressData = rpc.ToolExecutionProgressData ToolExecutionStartData = rpc.ToolExecutionStartData + ToolExecutionStartToolDescription = rpc.ToolExecutionStartToolDescription + ToolExecutionStartToolDescriptionMeta = rpc.ToolExecutionStartToolDescriptionMeta + ToolExecutionStartToolDescriptionMetaUI = rpc.ToolExecutionStartToolDescriptionMetaUI + ToolExecutionStartToolDescriptionMetaUIVisibility = rpc.ToolExecutionStartToolDescriptionMetaUIVisibility ToolUserRequestedData = rpc.ToolUserRequestedData UserInputCompletedData = rpc.UserInputCompletedData UserInputRequestedData = rpc.UserInputRequestedData @@ -318,7 +324,9 @@ const ( ExitPlanModeActionAutopilotFleet = rpc.ExitPlanModeActionAutopilotFleet ExitPlanModeActionExitOnly = rpc.ExitPlanModeActionExitOnly ExitPlanModeActionInteractive = rpc.ExitPlanModeActionInteractive + ExtensionsLoadedExtensionSourcePlugin = rpc.ExtensionsLoadedExtensionSourcePlugin ExtensionsLoadedExtensionSourceProject = rpc.ExtensionsLoadedExtensionSourceProject + ExtensionsLoadedExtensionSourceSession = rpc.ExtensionsLoadedExtensionSourceSession ExtensionsLoadedExtensionSourceUser = rpc.ExtensionsLoadedExtensionSourceUser ExtensionsLoadedExtensionStatusDisabled = rpc.ExtensionsLoadedExtensionStatusDisabled ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed @@ -455,6 +463,7 @@ const ( SessionEventTypeSessionStart = rpc.SessionEventTypeSessionStart SessionEventTypeSessionTaskComplete = rpc.SessionEventTypeSessionTaskComplete SessionEventTypeSessionTitleChanged = rpc.SessionEventTypeSessionTitleChanged + SessionEventTypeSessionTodosChanged = rpc.SessionEventTypeSessionTodosChanged SessionEventTypeSessionToolsUpdated = rpc.SessionEventTypeSessionToolsUpdated SessionEventTypeSessionTruncation = rpc.SessionEventTypeSessionTruncation SessionEventTypeSessionUsageInfo = rpc.SessionEventTypeSessionUsageInfo @@ -511,6 +520,8 @@ const ( ToolExecutionCompleteContentTypeText = rpc.ToolExecutionCompleteContentTypeText ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel + ToolExecutionStartToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityApp + ToolExecutionStartToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityModel UserMessageAgentModeAutopilot = rpc.UserMessageAgentModeAutopilot UserMessageAgentModeInteractive = rpc.UserMessageAgentModeInteractive UserMessageAgentModePlan = rpc.UserMessageAgentModePlan diff --git a/java/pom.xml b/java/pom.xml index 6b94abe27..bbe6376be 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -86,7 +86,7 @@ DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency workflow. --> - ^1.0.61 + ^1.0.62 diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index 502563b7d..b7a1176b8 100644 --- a/java/scripts/codegen/package-lock.json +++ b/java/scripts/codegen/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "copilot-sdk-java-codegen", "dependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "json-schema": "^0.4.0", "tsx": "^4.22.4" } @@ -428,31 +428,32 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.61.tgz", - "integrity": "sha512-E4f7YXTL2uUZY/ypnfsUruAeSgrHx3AGYEbm5N0DrpzPqoNAZqV6kHEWM4vu+W/nGvydIfPxmOTqaMEhM8r0Uw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.62.tgz", + "integrity": "sha512-jR2msL2xmLPHvcfnQnIJuaM9oEoL8qcjmsVOkyUrsqBVRGw2HaaFx9yAB4NLR+ub/XrhaIdnV91/4URR59Utbw==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { - "detect-libc": "^2.1.2" + "detect-libc": "^2.1.2", + "os-theme": "^0.0.8" }, "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.61", - "@github/copilot-darwin-x64": "1.0.61", - "@github/copilot-linux-arm64": "1.0.61", - "@github/copilot-linux-x64": "1.0.61", - "@github/copilot-linuxmusl-arm64": "1.0.61", - "@github/copilot-linuxmusl-x64": "1.0.61", - "@github/copilot-win32-arm64": "1.0.61", - "@github/copilot-win32-x64": "1.0.61" + "@github/copilot-darwin-arm64": "1.0.62", + "@github/copilot-darwin-x64": "1.0.62", + "@github/copilot-linux-arm64": "1.0.62", + "@github/copilot-linux-x64": "1.0.62", + "@github/copilot-linuxmusl-arm64": "1.0.62", + "@github/copilot-linuxmusl-x64": "1.0.62", + "@github/copilot-win32-arm64": "1.0.62", + "@github/copilot-win32-x64": "1.0.62" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.61.tgz", - "integrity": "sha512-10prvjHRXB0SD28NsIpzdNDgLquQYUwaH5Ev9KVdIWdBPAvlQsHmQ4JSCyD/UILc/nrrr02CKUgum+mZRKUKIg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.62.tgz", + "integrity": "sha512-ShFS6+O/9SzXT7WelzRnbDo/RWieTnEsACcarfYunbYb5CWbc3VDgpWc6ispn6UbLXFxO5Nj26j6vMlRqYugfA==", "cpu": [ "arm64" ], @@ -466,9 +467,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.61.tgz", - "integrity": "sha512-NXUjageJ3mxDfHtXGYu//XhJ+dhJFYObT4R3jeWgIHhd+4lX7FlC754nwlBP/ZuVhJ3ND22JK9sua9d2F3Cbwg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.62.tgz", + "integrity": "sha512-6Ne9q04o/bIJyGciFqv0zu+6VftEA9BZahvg9QrBt/tMHxJ1IhY8//0deQlPtFh2hu5gaWp64hBjTBY3ViJkKA==", "cpu": [ "x64" ], @@ -482,9 +483,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.61.tgz", - "integrity": "sha512-dwB2+QSMr622JkePeK56M7YWXsTT/DQzKfpDq8Lk2kmGU052RZAarRmt8gcNm4anofN7pMSrqc3YHj1TM84MFw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.62.tgz", + "integrity": "sha512-PAEU/VyJ/6AUc+p5BfpuKVXUEZhQSZT26hiEf6R2ZxSOAL1BZPXj1BuqniFdBghP7SS2JKh6M5FM7oT0PomKPg==", "cpu": [ "arm64" ], @@ -498,9 +499,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.61.tgz", - "integrity": "sha512-q6n8R8oybvuCmmkP+43w809Wpud/wwRi/fFSZEYJagiNGmYJ00SDkrfJxHbZsAFMpaJC+oTswqzJHjRoZbO74w==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.62.tgz", + "integrity": "sha512-XE+O7a1lyF6fhWrALPuyXARAwvVKSzbH+L1cbQU/BdVgx6TR68B0MMX3ByJTnwjGSzfxxVs2LI6nMrcbTyXhUQ==", "cpu": [ "x64" ], @@ -514,9 +515,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.61.tgz", - "integrity": "sha512-yWo7JXnZS11eJpm68E1RWKMR47EwzPKj3V7GX0EMTd8Fw0T2Aurk9wt9p3c9w0v02nTO1DqJhi68KVWJPdVqvA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.62.tgz", + "integrity": "sha512-kww9Hi75i5BVhzrIgQnA/gz48m7A7aLkzG/ci2cRvuI7gTG3XzX+b93mpNqOcVD4yN1oqWza49rWnElJhjSvvg==", "cpu": [ "arm64" ], @@ -530,9 +531,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.61.tgz", - "integrity": "sha512-nHzx27Ac4B0fpD9CcmvyrGOBEMJ01CPRgVRP0yAl4wpU4cM2I6+9TPyfYThlWDqZqiUKGXC1ZRQ+B8cJREVGmA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.62.tgz", + "integrity": "sha512-6sC/Uz1OsMltkd0eqg7so5WyejnSxhnu2sY6rfVsn0epJ9wQyMXcjUDSHaY9DobUaF7HpgT3EPzU9Ncs0rByCQ==", "cpu": [ "x64" ], @@ -546,9 +547,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.61.tgz", - "integrity": "sha512-k6knzI+K5HlZeJDS/yeJAfoYD4xcURWfuqunpTCyk1pDbIFxmrLSqR/TDi7KNlpsf883n5WqpnB06K5kysdHHQ==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.62.tgz", + "integrity": "sha512-kPpckuVCEvuXOEW+FNTs4AbF3I3/O8dA+S0wSyehNVzQczJRIpI+SDIGGXzehThw8EM2yf2mkcl9KfFq/ji18Q==", "cpu": [ "arm64" ], @@ -562,9 +563,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.61.tgz", - "integrity": "sha512-L6NZ6o73VZFHd7OoRaztV3Prh1PbW9HXqYsAx+XywNALQvE1u489WBUC1ggfYBW5MTBCf8mxSkYQdb3Am2omsw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.62.tgz", + "integrity": "sha512-cpXRdLMPm5dwCvF57NFmsr//Dsiqx5jMHSpzaqX78h4NI9m30v24cXFkXSoOOsCCgoPtO6170sassAlj1WWPNQ==", "cpu": [ "x64" ], @@ -577,6 +578,45 @@ "copilot-win32-x64": "copilot.exe" } }, + "node_modules/@os-theme/darwin-arm64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/darwin-arm64/-/darwin-arm64-0.0.8.tgz", + "integrity": "sha512-gMsOs+8Ju396a5yyMWigkbA0dMTxD78U3HzG3mlpiAyn6hfd5dbyI4VGP+sfTB82KGgWLzIhWWTFX5UYY6iX0A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@os-theme/linux-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/linux-x64/-/linux-x64-0.0.8.tgz", + "integrity": "sha512-zvjmBUiSQPjM1RbhpsfCDYMJxW4eLlGmkFPnpteC/03X2lz6CjiX2hfbN2EWLxXjNnIje3Jqaen8IsqEnWrRBg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@os-theme/win32-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/win32-x64/-/win32-x64-0.0.8.tgz", + "integrity": "sha512-N3yxKNbVl2IBa/ncDuq55QhwqwUjnYLJxDKMEmYeJbLIV950qZNojPw3scXA6PbfxPZfIiRa8iz1pzNg9XxP8w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -647,6 +687,20 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "license": "(AFL-2.1 OR BSD-3-Clause)" }, + "node_modules/os-theme": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/os-theme/-/os-theme-0.0.8.tgz", + "integrity": "sha512-u1q3bLSv5uMHNIiPItkfDrHXu6ZFs2juwqxWREFM/uVBa+7Kkhy2v49LmJev2JcinGwqiEccElB/XsH9gwasuA==", + "license": "MIT", + "optionalDependencies": { + "@os-theme/darwin-arm64": "0.0.8", + "@os-theme/linux-x64": "0.0.8", + "@os-theme/win32-x64": "0.0.8" + }, + "peerDependencies": { + "typescript": "^5" + } + }, "node_modules/tsx": { "version": "4.22.4", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", @@ -664,6 +718,20 @@ "optionalDependencies": { "fsevents": "~2.3.3" } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } } } } diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index 21883cc76..d8c18dfc1 100644 --- a/java/scripts/codegen/package.json +++ b/java/scripts/codegen/package.json @@ -7,7 +7,7 @@ "generate:java": "tsx java.ts" }, "dependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "json-schema": "^0.4.0", "tsx": "^4.22.4" } diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java b/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java index 84d4e4091..afa9fe8d8 100644 --- a/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java @@ -61,10 +61,8 @@ public record AssistantMessageEventData( @JsonProperty("serviceRequestId") String serviceRequestId, /** Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. */ @JsonProperty("apiCallId") String apiCallId, - /** Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping */ - @JsonProperty("anthropicAdvisorBlocks") List anthropicAdvisorBlocks, - /** Anthropic advisor model ID used for this response, for timeline display on replay */ - @JsonProperty("anthropicAdvisorModel") String anthropicAdvisorModel, + /** Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping */ + @JsonProperty("serverTools") AssistantMessageServerTools serverTools, /** Identifier for the agent loop turn that produced this message, matching the corresponding assistant.turn_start event */ @JsonProperty("turnId") String turnId, /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */ diff --git a/java/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java b/java/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java new file mode 100644 index 000000000..72d685037 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record AssistantMessageServerTools( + @JsonProperty("provider") String provider, + @JsonProperty("items") List items, + @JsonProperty("functionCallNamespaces") Map functionCallNamespaces, + @JsonProperty("rawContentBlocks") List rawContentBlocks, + @JsonProperty("advisorModel") String advisorModel +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java index b47f308c8..b45c72139 100644 --- a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java +++ b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record ExtensionsLoadedExtension( - /** Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper') */ + /** Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') */ @JsonProperty("id") String id, /** Extension name (directory name) */ @JsonProperty("name") String name, diff --git a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionSource.java b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionSource.java index abf991a01..e9a36b6c4 100644 --- a/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionSource.java +++ b/java/src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionSource.java @@ -19,7 +19,11 @@ public enum ExtensionsLoadedExtensionSource { /** The {@code project} variant. */ PROJECT("project"), /** The {@code user} variant. */ - USER("user"); + USER("user"), + /** The {@code plugin} variant. */ + PLUGIN("plugin"), + /** The {@code session} variant. */ + SESSION("session"); private final String value; ExtensionsLoadedExtensionSource(String value) { this.value = value; } diff --git a/java/src/generated/java/com/github/copilot/generated/SessionEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionEvent.java index 92e975a30..b208a419b 100644 --- a/java/src/generated/java/com/github/copilot/generated/SessionEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SessionEvent.java @@ -40,6 +40,7 @@ @JsonSubTypes.Type(value = SessionModeChangedEvent.class, name = "session.mode_changed"), @JsonSubTypes.Type(value = SessionPermissionsChangedEvent.class, name = "session.permissions_changed"), @JsonSubTypes.Type(value = SessionPlanChangedEvent.class, name = "session.plan_changed"), + @JsonSubTypes.Type(value = SessionTodosChangedEvent.class, name = "session.todos_changed"), @JsonSubTypes.Type(value = SessionWorkspaceFileChangedEvent.class, name = "session.workspace_file_changed"), @JsonSubTypes.Type(value = SessionHandoffEvent.class, name = "session.handoff"), @JsonSubTypes.Type(value = SessionTruncationEvent.class, name = "session.truncation"), @@ -132,6 +133,7 @@ public abstract sealed class SessionEvent permits SessionModeChangedEvent, SessionPermissionsChangedEvent, SessionPlanChangedEvent, + SessionTodosChangedEvent, SessionWorkspaceFileChangedEvent, SessionHandoffEvent, SessionTruncationEvent, diff --git a/java/src/generated/java/com/github/copilot/generated/SessionTodosChangedEvent.java b/java/src/generated/java/com/github/copilot/generated/SessionTodosChangedEvent.java new file mode 100644 index 000000000..28432ddf8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/SessionTodosChangedEvent.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session event "session.todos_changed". Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionTodosChangedEvent extends SessionEvent { + + @Override + public String getType() { return "session.todos_changed"; } + + @JsonProperty("data") + private SessionTodosChangedEventData data; + + public SessionTodosChangedEventData getData() { return data; } + public void setData(SessionTodosChangedEventData data) { this.data = data; } + + /** Data payload for {@link SessionTodosChangedEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionTodosChangedEventData() { + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java b/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java index 4f0f1a32f..a3bac49bc 100644 --- a/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java @@ -43,7 +43,7 @@ public record SkillInvokedEventData( @JsonProperty("content") String content, /** Tool names that should be auto-approved when this skill is active */ @JsonProperty("allowedTools") List allowedTools, - /** Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) */ + /** Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) */ @JsonProperty("source") String source, /** Name of the plugin this skill originated from, when applicable */ @JsonProperty("pluginName") String pluginName, diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java index d7f49fb5f..cd4e5a137 100644 --- a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java @@ -50,6 +50,8 @@ public record ToolExecutionStartEventData( @JsonProperty("turnId") String turnId, /** When true, the tool output should be displayed expanded (verbatim) in the CLI timeline */ @JsonProperty("displayVerbatim") Boolean displayVerbatim, + /** Tool definition metadata, present for MCP tools with MCP Apps support */ + @JsonProperty("toolDescription") ToolExecutionStartToolDescription toolDescription, /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */ @JsonProperty("parentToolCallId") String parentToolCallId ) { diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescription.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescription.java new file mode 100644 index 000000000..4c12ca981 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescription.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Tool definition metadata, present for MCP tools with MCP Apps support + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ToolExecutionStartToolDescription( + /** Tool name */ + @JsonProperty("name") String name, + /** Tool description */ + @JsonProperty("description") String description, + /** MCP Apps metadata for UI resource association */ + @JsonProperty("_meta") ToolExecutionStartToolDescriptionMeta meta +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java new file mode 100644 index 000000000..25296d1d3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMeta.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * MCP Apps metadata for UI resource association + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ToolExecutionStartToolDescriptionMeta( + /** Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. */ + @JsonProperty("ui") ToolExecutionStartToolDescriptionMetaUI ui +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java new file mode 100644 index 000000000..c928a03f6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUI.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ToolExecutionStartToolDescriptionMetaUI( + /** URI of the UI resource */ + @JsonProperty("resourceUri") String resourceUri, + /** Who can access this tool */ + @JsonProperty("visibility") List visibility +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUIVisibility.java b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUIVisibility.java new file mode 100644 index 000000000..078d1d89f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/ToolExecutionStartToolDescriptionMetaUIVisibility.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import javax.annotation.processing.Generated; + +/** + * Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ToolExecutionStartToolDescriptionMetaUIVisibility { + /** The {@code model} variant. */ + MODEL("model"), + /** The {@code app} variant. */ + APP("app"); + + private final String value; + ToolExecutionStartToolDescriptionMetaUIVisibility(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ToolExecutionStartToolDescriptionMetaUIVisibility fromValue(String value) { + for (ToolExecutionStartToolDescriptionMetaUIVisibility v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ToolExecutionStartToolDescriptionMetaUIVisibility value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java b/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java index 13bb851b4..7bbdb5207 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/Extension.java @@ -21,11 +21,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record Extension( - /** Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') */ + /** Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') */ @JsonProperty("id") String id, /** Extension name (directory name) */ @JsonProperty("name") String name, - /** Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) */ + /** Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state//extensions/) */ @JsonProperty("source") ExtensionSource source, /** Current status: running, disabled, failed, or starting */ @JsonProperty("status") ExtensionStatus status, diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ExtensionSource.java b/java/src/generated/java/com/github/copilot/generated/rpc/ExtensionSource.java index aeb7a144f..7ddd18615 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/ExtensionSource.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ExtensionSource.java @@ -10,7 +10,7 @@ import javax.annotation.processing.Generated; /** - * Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) + * Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state//extensions/) * * @since 1.0.0 */ @@ -19,7 +19,11 @@ public enum ExtensionSource { /** The {@code project} variant. */ PROJECT("project"), /** The {@code user} variant. */ - USER("user"); + USER("user"), + /** The {@code plugin} variant. */ + PLUGIN("plugin"), + /** The {@code session} variant. */ + SESSION("session"); private final String value; ExtensionSource(String value) { this.value = value; } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodoDependency.java b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodoDependency.java new file mode 100644 index 000000000..91c637478 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodoDependency.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * A single dependency edge read from the session SQL `todo_deps` table, indicating that one todo must complete before another. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PlanSqlTodoDependency( + /** ID of the todo that has the dependency. */ + @JsonProperty("todoId") String todoId, + /** ID of the todo it depends on. */ + @JsonProperty("dependsOn") String dependsOn +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java index 8b1fb61dd..bee0a4854 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/PlanSqlTodosRow.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Schema for the `PlanSqlTodosRow` type. + * A single todo row read from the session SQL `todos` table. All fields are optional because the SQL schema is best-effort and the agent may not have populated every column. * * @since 1.0.0 */ diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointType.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointType.java new file mode 100644 index 000000000..1d4c377bb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointType.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Provider family. Matches the `type` field of a BYOK provider config. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ProviderEndpointType { + /** The {@code openai} variant. */ + OPENAI("openai"), + /** The {@code azure} variant. */ + AZURE("azure"), + /** The {@code anthropic} variant. */ + ANTHROPIC("anthropic"); + + private final String value; + ProviderEndpointType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ProviderEndpointType fromValue(String value) { + for (ProviderEndpointType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ProviderEndpointType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointWireApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointWireApi.java new file mode 100644 index 000000000..72a5c4d61 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderEndpointWireApi.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Wire API to be used, when required for the provider type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ProviderEndpointWireApi { + /** The {@code completions} variant. */ + COMPLETIONS("completions"), + /** The {@code responses} variant. */ + RESPONSES("responses"); + + private final String value; + ProviderEndpointWireApi(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ProviderEndpointWireApi fromValue(String value) { + for (ProviderEndpointWireApi v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ProviderEndpointWireApi value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ProviderSessionToken.java b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderSessionToken.java new file mode 100644 index 000000000..0ca81941a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/ProviderSessionToken.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import javax.annotation.processing.Generated; + +/** + * Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ProviderSessionToken( + /** The short-lived token value. */ + @JsonProperty("token") String token, + /** HTTP header name the token must be sent under. */ + @JsonProperty("header") String header, + /** The model the token is bound to, when applicable. When set, the token is only valid for requests against this model. */ + @JsonProperty("model") String model, + /** When the token expires, if known. Callers should refresh by calling `getEndpoint` again before this time, or reactively on any 401/403 response from `baseUrl`. */ + @JsonProperty("expiresAt") OffsetDateTime expiresAt +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java index cd643fbc8..7805183dd 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java @@ -79,4 +79,15 @@ public CompletableFuture readSqlTodos() { return caller.invoke("session.plan.readSqlTodos", java.util.Map.of("sessionId", this.sessionId), SessionPlanReadSqlTodosResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture readSqlTodosWithDependencies() { + return caller.invoke("session.plan.readSqlTodosWithDependencies", java.util.Map.of("sessionId", this.sessionId), SessionPlanReadSqlTodosWithDependenciesResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesParams.java new file mode 100644 index 000000000..c0b49a960 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPlanReadSqlTodosWithDependenciesParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesResult.java new file mode 100644 index 000000000..505d08303 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadSqlTodosWithDependenciesResult.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Todo rows + dependency edges read from the session SQL database. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPlanReadSqlTodosWithDependenciesResult( + /** Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed. */ + @JsonProperty("rows") List rows, + /** Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa. */ + @JsonProperty("dependencies") List dependencies +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderApi.java new file mode 100644 index 000000000..428f916ae --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderApi.java @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.github.copilot.CopilotExperimental; +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code provider} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionProviderApi { + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionProviderApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Optional model identifier to scope the endpoint snapshot to. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture getEndpoint() { + return caller.invoke("session.provider.getEndpoint", java.util.Map.of("sessionId", this.sessionId), SessionProviderGetEndpointResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointParams.java new file mode 100644 index 000000000..09e992a78 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Optional model identifier to scope the endpoint snapshot to. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionProviderGetEndpointParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointResult.java new file mode 100644 index 000000000..344af3a82 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionProviderGetEndpointResult.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * A snapshot of the provider endpoint the session is currently configured to talk to. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionProviderGetEndpointResult( + /** Provider family. Matches the `type` field of a BYOK provider config. */ + @JsonProperty("type") ProviderEndpointType type, + /** Wire API to be used, when required for the provider type. */ + @JsonProperty("wireApi") ProviderEndpointWireApi wireApi, + /** Base URL to pass to the LLM client library. */ + @JsonProperty("baseUrl") String baseUrl, + /** A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests. */ + @JsonProperty("apiKey") String apiKey, + /** HTTP headers the caller must include on every outbound request. */ + @JsonProperty("headers") Map headers, + /** Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. */ + @JsonProperty("sessionToken") ProviderSessionToken sessionToken +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java index bc87f7989..4f36674d5 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java @@ -57,6 +57,8 @@ public final class SessionRpc { public final SessionMcpApi mcp; /** API methods for the {@code plugins} namespace. */ public final SessionPluginsApi plugins; + /** API methods for the {@code provider} namespace. */ + public final SessionProviderApi provider; /** API methods for the {@code options} namespace. */ public final SessionOptionsApi options; /** API methods for the {@code lsp} namespace. */ @@ -113,6 +115,7 @@ public SessionRpc(RpcCaller caller, String sessionId) { this.skills = new SessionSkillsApi(caller, sessionId); this.mcp = new SessionMcpApi(caller, sessionId); this.plugins = new SessionPluginsApi(caller, sessionId); + this.provider = new SessionProviderApi(caller, sessionId); this.options = new SessionOptionsApi(caller, sessionId); this.lsp = new SessionLspApi(caller, sessionId); this.extensions = new SessionExtensionsApi(caller, sessionId); diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java index c9a9563b1..0f4b05882 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java @@ -68,4 +68,20 @@ public CompletableFuture getCurrentMetadat return caller.invoke("session.tools.getCurrentMetadata", java.util.Map.of("sessionId", this.sessionId), SessionToolsGetCurrentMetadataResult.class); } + /** + * Subagent settings to apply to the current session + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + @CopilotExperimental + public CompletableFuture updateSubagentSettings(SessionToolsUpdateSubagentSettingsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.tools.updateSubagentSettings", _p, Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsUpdateSubagentSettingsParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsUpdateSubagentSettingsParams.java new file mode 100644 index 000000000..44758350b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionToolsUpdateSubagentSettingsParams.java @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.List; +import java.util.Map; +import javax.annotation.processing.Generated; + +/** + * Subagent settings to apply to the current session + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ +@CopilotExperimental +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionToolsUpdateSubagentSettingsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Subagent settings to apply, or null to clear the live session override */ + @JsonProperty("subagents") SessionToolsUpdateSubagentSettingsParamsSubagents subagents +) { + + /** Configured per-agent subagent overrides */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionToolsUpdateSubagentSettingsParamsSubagents( + /** Per-agent settings keyed by subagent agent_type */ + @JsonProperty("agents") Map agents, + /** Names of subagents the user has turned off; they cannot be dispatched */ + @JsonProperty("disabledSubagents") List disabledSubagents + ) { + } +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java index 722274524..61b2e933f 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java @@ -35,6 +35,8 @@ public record SlashCommandInfo( /** Whether the command may run while an agent turn is active */ @JsonProperty("allowDuringAgentExecution") Boolean allowDuringAgentExecution, /** Whether the command is experimental */ - @JsonProperty("experimental") Boolean experimental + @JsonProperty("experimental") Boolean experimental, + /** Whether the command may be the target of `/every` / `/after` schedules. Resolution happens at every tick, so only set this when the command is safe to re-invoke and produces an agent prompt. */ + @JsonProperty("schedulable") Boolean schedulable ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntry.java b/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntry.java new file mode 100644 index 000000000..29426d931 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntry.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Subagent model, reasoning effort, and context tier settings + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SubagentSettingsEntry( + /** Model override for matching subagents */ + @JsonProperty("model") String model, + /** Reasoning effort override for matching subagents */ + @JsonProperty("effortLevel") String effortLevel, + /** Context tier override for matching subagents */ + @JsonProperty("contextTier") SubagentSettingsEntryContextTier contextTier +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntryContextTier.java b/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntryContextTier.java new file mode 100644 index 000000000..ae6261a9c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SubagentSettingsEntryContextTier.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Context tier override for matching subagents + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SubagentSettingsEntryContextTier { + /** The {@code inherit} variant. */ + INHERIT("inherit"), + /** The {@code default} variant. */ + DEFAULT("default"), + /** The {@code long_context} variant. */ + LONG_CONTEXT("long_context"); + + private final String value; + SubagentSettingsEntryContextTier(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SubagentSettingsEntryContextTier fromValue(String value) { + for (SubagentSettingsEntryContextTier v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SubagentSettingsEntryContextTier value: " + value); + } +} diff --git a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java index 3ca56b817..17c2c59cf 100644 --- a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java +++ b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java @@ -865,7 +865,7 @@ private SessionStartEvent createSessionStartEvent(String sessionId) { private AssistantMessageEvent createAssistantMessageEvent(String content) { var event = new AssistantMessageEvent(); var data = new AssistantMessageEvent.AssistantMessageEventData(null, null, content, null, null, null, null, - null, null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null); event.setData(data); return event; } diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 2c9823233..cd500d88b 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, @@ -697,31 +697,32 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.61.tgz", - "integrity": "sha512-E4f7YXTL2uUZY/ypnfsUruAeSgrHx3AGYEbm5N0DrpzPqoNAZqV6kHEWM4vu+W/nGvydIfPxmOTqaMEhM8r0Uw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.62.tgz", + "integrity": "sha512-jR2msL2xmLPHvcfnQnIJuaM9oEoL8qcjmsVOkyUrsqBVRGw2HaaFx9yAB4NLR+ub/XrhaIdnV91/4URR59Utbw==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { - "detect-libc": "^2.1.2" + "detect-libc": "^2.1.2", + "os-theme": "^0.0.8" }, "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.61", - "@github/copilot-darwin-x64": "1.0.61", - "@github/copilot-linux-arm64": "1.0.61", - "@github/copilot-linux-x64": "1.0.61", - "@github/copilot-linuxmusl-arm64": "1.0.61", - "@github/copilot-linuxmusl-x64": "1.0.61", - "@github/copilot-win32-arm64": "1.0.61", - "@github/copilot-win32-x64": "1.0.61" + "@github/copilot-darwin-arm64": "1.0.62", + "@github/copilot-darwin-x64": "1.0.62", + "@github/copilot-linux-arm64": "1.0.62", + "@github/copilot-linux-x64": "1.0.62", + "@github/copilot-linuxmusl-arm64": "1.0.62", + "@github/copilot-linuxmusl-x64": "1.0.62", + "@github/copilot-win32-arm64": "1.0.62", + "@github/copilot-win32-x64": "1.0.62" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.61.tgz", - "integrity": "sha512-10prvjHRXB0SD28NsIpzdNDgLquQYUwaH5Ev9KVdIWdBPAvlQsHmQ4JSCyD/UILc/nrrr02CKUgum+mZRKUKIg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.62.tgz", + "integrity": "sha512-ShFS6+O/9SzXT7WelzRnbDo/RWieTnEsACcarfYunbYb5CWbc3VDgpWc6ispn6UbLXFxO5Nj26j6vMlRqYugfA==", "cpu": [ "arm64" ], @@ -735,9 +736,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.61.tgz", - "integrity": "sha512-NXUjageJ3mxDfHtXGYu//XhJ+dhJFYObT4R3jeWgIHhd+4lX7FlC754nwlBP/ZuVhJ3ND22JK9sua9d2F3Cbwg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.62.tgz", + "integrity": "sha512-6Ne9q04o/bIJyGciFqv0zu+6VftEA9BZahvg9QrBt/tMHxJ1IhY8//0deQlPtFh2hu5gaWp64hBjTBY3ViJkKA==", "cpu": [ "x64" ], @@ -751,9 +752,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.61.tgz", - "integrity": "sha512-dwB2+QSMr622JkePeK56M7YWXsTT/DQzKfpDq8Lk2kmGU052RZAarRmt8gcNm4anofN7pMSrqc3YHj1TM84MFw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.62.tgz", + "integrity": "sha512-PAEU/VyJ/6AUc+p5BfpuKVXUEZhQSZT26hiEf6R2ZxSOAL1BZPXj1BuqniFdBghP7SS2JKh6M5FM7oT0PomKPg==", "cpu": [ "arm64" ], @@ -767,9 +768,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.61.tgz", - "integrity": "sha512-q6n8R8oybvuCmmkP+43w809Wpud/wwRi/fFSZEYJagiNGmYJ00SDkrfJxHbZsAFMpaJC+oTswqzJHjRoZbO74w==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.62.tgz", + "integrity": "sha512-XE+O7a1lyF6fhWrALPuyXARAwvVKSzbH+L1cbQU/BdVgx6TR68B0MMX3ByJTnwjGSzfxxVs2LI6nMrcbTyXhUQ==", "cpu": [ "x64" ], @@ -783,9 +784,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.61.tgz", - "integrity": "sha512-yWo7JXnZS11eJpm68E1RWKMR47EwzPKj3V7GX0EMTd8Fw0T2Aurk9wt9p3c9w0v02nTO1DqJhi68KVWJPdVqvA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.62.tgz", + "integrity": "sha512-kww9Hi75i5BVhzrIgQnA/gz48m7A7aLkzG/ci2cRvuI7gTG3XzX+b93mpNqOcVD4yN1oqWza49rWnElJhjSvvg==", "cpu": [ "arm64" ], @@ -799,9 +800,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.61.tgz", - "integrity": "sha512-nHzx27Ac4B0fpD9CcmvyrGOBEMJ01CPRgVRP0yAl4wpU4cM2I6+9TPyfYThlWDqZqiUKGXC1ZRQ+B8cJREVGmA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.62.tgz", + "integrity": "sha512-6sC/Uz1OsMltkd0eqg7so5WyejnSxhnu2sY6rfVsn0epJ9wQyMXcjUDSHaY9DobUaF7HpgT3EPzU9Ncs0rByCQ==", "cpu": [ "x64" ], @@ -815,9 +816,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.61.tgz", - "integrity": "sha512-k6knzI+K5HlZeJDS/yeJAfoYD4xcURWfuqunpTCyk1pDbIFxmrLSqR/TDi7KNlpsf883n5WqpnB06K5kysdHHQ==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.62.tgz", + "integrity": "sha512-kPpckuVCEvuXOEW+FNTs4AbF3I3/O8dA+S0wSyehNVzQczJRIpI+SDIGGXzehThw8EM2yf2mkcl9KfFq/ji18Q==", "cpu": [ "arm64" ], @@ -831,9 +832,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.61.tgz", - "integrity": "sha512-L6NZ6o73VZFHd7OoRaztV3Prh1PbW9HXqYsAx+XywNALQvE1u489WBUC1ggfYBW5MTBCf8mxSkYQdb3Am2omsw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.62.tgz", + "integrity": "sha512-cpXRdLMPm5dwCvF57NFmsr//Dsiqx5jMHSpzaqX78h4NI9m30v24cXFkXSoOOsCCgoPtO6170sassAlj1WWPNQ==", "cpu": [ "x64" ], @@ -938,6 +939,45 @@ "@emnapi/runtime": "^1.7.1" } }, + "node_modules/@os-theme/darwin-arm64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/darwin-arm64/-/darwin-arm64-0.0.8.tgz", + "integrity": "sha512-gMsOs+8Ju396a5yyMWigkbA0dMTxD78U3HzG3mlpiAyn6hfd5dbyI4VGP+sfTB82KGgWLzIhWWTFX5UYY6iX0A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@os-theme/linux-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/linux-x64/-/linux-x64-0.0.8.tgz", + "integrity": "sha512-zvjmBUiSQPjM1RbhpsfCDYMJxW4eLlGmkFPnpteC/03X2lz6CjiX2hfbN2EWLxXjNnIje3Jqaen8IsqEnWrRBg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@os-theme/win32-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/win32-x64/-/win32-x64-0.0.8.tgz", + "integrity": "sha512-N3yxKNbVl2IBa/ncDuq55QhwqwUjnYLJxDKMEmYeJbLIV950qZNojPw3scXA6PbfxPZfIiRa8iz1pzNg9XxP8w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@oxc-project/types": { "version": "0.133.0", "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", @@ -3050,6 +3090,20 @@ "node": ">= 0.8.0" } }, + "node_modules/os-theme": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/os-theme/-/os-theme-0.0.8.tgz", + "integrity": "sha512-u1q3bLSv5uMHNIiPItkfDrHXu6ZFs2juwqxWREFM/uVBa+7Kkhy2v49LmJev2JcinGwqiEccElB/XsH9gwasuA==", + "license": "MIT", + "optionalDependencies": { + "@os-theme/darwin-arm64": "0.0.8", + "@os-theme/linux-x64": "0.0.8", + "@os-theme/win32-x64": "0.0.8" + }, + "peerDependencies": { + "typescript": "^5" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3612,7 +3666,6 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/nodejs/package.json b/nodejs/package.json index df34b9df7..7d86b9620 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index d80779f81..d4211a6b4 100644 --- a/nodejs/samples/package-lock.json +++ b/nodejs/samples/package-lock.json @@ -18,7 +18,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index c17a21d21..1ef280abf 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -313,7 +313,7 @@ export type EventsCursorStatus = /** The cursor referred to history that is no longer available. */ | "expired"; /** - * Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) + * Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state//extensions/) * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "ExtensionSource". @@ -323,7 +323,11 @@ export type ExtensionSource = /** Extension discovered from the current project's .github/extensions directory. */ | "project" /** Extension discovered from the user's ~/.copilot/extensions directory. */ - | "user"; + | "user" + /** Extension contributed by an installed plugin. */ + | "plugin" + /** Extension discovered from the current session's state directory (loaded only for this session). */ + | "session"; /** * Current status: running, disabled, failed, or starting * @@ -1011,6 +1015,32 @@ export type ProviderConfigWireApi = | "completions" /** OpenAI Responses API wire format. */ | "responses"; +/** + * Provider family. Matches the `type` field of a BYOK provider config. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderEndpointType". + */ +/** @experimental */ +export type ProviderEndpointType = + /** OpenAI-compatible endpoint (use the OpenAI client library). */ + | "openai" + /** Azure OpenAI endpoint (use the OpenAI client library with the Azure base URL). */ + | "azure" + /** Anthropic endpoint (use the Anthropic client library). */ + | "anthropic"; +/** + * Wire API to be used, when required for the provider type. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderEndpointWireApi". + */ +/** @experimental */ +export type ProviderEndpointWireApi = + /** Classic chat-completions request shape. */ + | "completions" + /** Newer responses request shape. */ + | "responses"; /** * Schema for the `PushAttachment` type. * @@ -1429,6 +1459,39 @@ export type SlashCommandInvocationResult = | SlashCommandAgentPromptResult | SlashCommandCompletedResult | SlashCommandSelectSubcommandResult; +/** + * Subagent settings to apply, or null to clear the live session override + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SubagentSettings". + */ +/** @experimental */ +export type SubagentSettings = { + /** + * Per-agent settings keyed by subagent agent_type + */ + agents?: { + [k: string]: SubagentSettingsEntry | undefined; + }; + /** + * Names of subagents the user has turned off; they cannot be dispatched + */ + disabledSubagents?: string[]; +} | null; +/** + * Context tier override for matching subagents + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SubagentSettingsEntryContextTier". + */ +/** @experimental */ +export type SubagentSettingsEntryContextTier = + /** Inherit the parent session's effective context tier at dispatch time. */ + | "inherit" + /** Use the model's default context window. */ + | "default" + /** Pin the subagent to the long-context tier when supported. */ + | "long_context"; /** * Current lifecycle status of the task * @@ -2840,6 +2903,10 @@ export interface SlashCommandInfo { * Whether the command is experimental */ experimental?: boolean; + /** + * Whether the command may be the target of `/every` / `/after` schedules. Resolution happens at every tick, so only set this when the command is safe to re-invoke and produces an agent prompt. + */ + schedulable?: boolean; } /** * Optional unstructured input hint @@ -3338,7 +3405,7 @@ export interface ExecuteCommandResult { /** @experimental */ export interface Extension { /** - * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') + * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') */ id: string; /** @@ -5383,6 +5450,19 @@ export interface McpUnregisterExternalClientRequest { */ serverName: string; } +/** + * Memory configuration for this session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "MemoryConfiguration". + */ +/** @experimental */ +export interface MemoryConfiguration { + /** + * Whether memory is enabled for the session. + */ + enabled: boolean; +} /** * Model identifier and token limits used to compute the context-info breakdown. * @@ -7390,7 +7470,7 @@ export interface PlanReadSqlTodosResult { rows: PlanSqlTodosRow[]; } /** - * Schema for the `PlanSqlTodosRow` type. + * A single todo row read from the session SQL `todos` table. All fields are optional because the SQL schema is best-effort and the agent may not have populated every column. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PlanSqlTodosRow". @@ -7414,6 +7494,40 @@ export interface PlanSqlTodosRow { */ status?: string; } +/** + * Todo rows + dependency edges read from the session SQL database. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanReadSqlTodosWithDependenciesResult". + */ +/** @experimental */ +export interface PlanReadSqlTodosWithDependenciesResult { + /** + * Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed. + */ + rows: PlanSqlTodosRow[]; + /** + * Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa. + */ + dependencies: PlanSqlTodoDependency[]; +} +/** + * A single dependency edge read from the session SQL `todo_deps` table, indicating that one todo must complete before another. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "PlanSqlTodoDependency". + */ +/** @experimental */ +export interface PlanSqlTodoDependency { + /** + * ID of the todo that has the dependency. + */ + todoId: string; + /** + * ID of the todo it depends on. + */ + dependsOn: string; +} /** * Replacement contents to write to the session plan file. * @@ -7809,6 +7923,70 @@ export interface ProviderConfigAzure { */ apiVersion?: string; } +/** + * A snapshot of the provider endpoint the session is currently configured to talk to. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderEndpoint". + */ +/** @experimental */ +export interface ProviderEndpoint { + type: ProviderEndpointType; + wireApi?: ProviderEndpointWireApi; + /** + * Base URL to pass to the LLM client library. + */ + baseUrl: string; + /** + * A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests. + */ + apiKey?: string; + /** + * HTTP headers the caller must include on every outbound request. + */ + headers: { + [k: string]: string | undefined; + }; + sessionToken?: ProviderSessionToken; +} +/** + * Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderSessionToken". + */ +/** @experimental */ +export interface ProviderSessionToken { + /** + * The short-lived token value. + */ + token: string; + /** + * HTTP header name the token must be sent under. + */ + header: string; + /** + * The model the token is bound to, when applicable. When set, the token is only valid for requests against this model. + */ + model?: string; + /** + * When the token expires, if known. Callers should refresh by calling `getEndpoint` again before this time, or reactively on any 401/403 response from `baseUrl`. + */ + expiresAt?: string; +} +/** + * Optional model identifier to scope the endpoint snapshot to. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ProviderGetEndpointRequest". + */ +/** @experimental */ +export interface ProviderGetEndpointRequest { + /** + * Model identifier the caller intends to use against the returned endpoint. Used to pick the correct wire shape. Omit to use whichever model the session is currently using. + */ + modelId?: string; +} /** * File attachment * @@ -9598,6 +9776,14 @@ export interface SessionOpenOptions { * Stable integration identifier for analytics. */ integrationId?: string; + /** + * ExP assignment ('flight') data injected by an SDK integrator, in the same JSON shape the Copilot CLI fetches from the experimentation service (CopilotExpAssignmentResponse). When supplied this is fed into the FeatureFlagService exactly like CLI-fetched assignments and ExP-backed flags wait for it. When absent the session does not block on ExP. + * + * @internal + */ + expAssignments?: { + [k: string]: unknown | undefined; + }; /** * Feature-flag values resolved by the host. */ @@ -9736,6 +9922,7 @@ export interface SessionOpenOptions { * @experimental */ additionalContentExclusionPolicies?: SessionOpenOptionsAdditionalContentExclusionPolicy[]; + memory?: MemoryConfiguration; /** * Capabilities enabled for this session. */ @@ -11130,6 +11317,24 @@ export interface SlashCommandSelectSubcommandOption { */ group?: string; } +/** + * Subagent model, reasoning effort, and context tier settings + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SubagentSettingsEntry". + */ +/** @experimental */ +export interface SubagentSettingsEntry { + /** + * Model override for matching subagents + */ + model?: string; + /** + * Reasoning effort override for matching subagents + */ + effortLevel?: string; + contextTier?: SubagentSettingsEntryContextTier; +} /** * Schema for the `TaskAgentInfo` type. * @@ -11639,6 +11844,14 @@ export interface ToolsListRequest { */ model?: string; } +/** + * Empty result after applying subagent settings + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ToolsUpdateSubagentSettingsResult". + */ +/** @experimental */ +export interface ToolsUpdateSubagentSettingsResult {} /** * Multi-select string field where each option pairs a value with a display label. * @@ -12206,6 +12419,19 @@ export interface UIUnregisterDirectAutoModeSwitchHandlerResult { */ unregistered: boolean; } +/** + * Subagent settings to apply to the current session + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "UpdateSubagentSettingsRequest". + */ +/** @experimental */ +export interface UpdateSubagentSettingsRequest { + /** + * Subagent settings to apply, or null to clear the live session override + */ + subagents?: SubagentSettings | null; +} /** * Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals. * @@ -13477,6 +13703,13 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ readSqlTodos: async (): Promise => connection.sendRequest("session.plan.readSqlTodos", { sessionId }), + /** + * Reads todo rows AND dependency edges from the session SQL database for structured progress UI. Same defensive behavior as readSqlTodos — returns empty arrays when the database, tables, or columns aren't available. Clients should call this on session start and after every `session.todos_changed` event to refresh structured-UI rendering. + * + * @returns Todo rows + dependency edges read from the session SQL database. + */ + readSqlTodosWithDependencies: async (): Promise => + connection.sendRequest("session.plan.readSqlTodosWithDependencies", { sessionId }), }, /** @experimental */ workspaces: { @@ -13911,6 +14144,18 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin connection.sendRequest("session.plugins.reload", { sessionId, ...params }), }, /** @experimental */ + provider: { + /** + * Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses. + * + * @param params Optional model identifier to scope the endpoint snapshot to. + * + * @returns A snapshot of the provider endpoint the session is currently configured to talk to. + */ + getEndpoint: async (params?: ProviderGetEndpointRequest): Promise => + connection.sendRequest("session.provider.getEndpoint", { sessionId, ...params }), + }, + /** @experimental */ options: { /** * Patches the genuinely-mutable subset of session options. @@ -13993,6 +14238,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ getCurrentMetadata: async (): Promise => connection.sendRequest("session.tools.getCurrentMetadata", { sessionId }), + /** + * Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions. + * + * @param params Subagent settings to apply to the current session + * + * @returns Empty result after applying subagent settings + */ + updateSubagentSettings: async (params: UpdateSubagentSettingsRequest): Promise => + connection.sendRequest("session.tools.updateSubagentSettings", { sessionId, ...params }), }, /** @experimental */ commands: { diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index a4fba8f33..b17901504 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -22,6 +22,7 @@ export type SessionEvent = | ModeChangedEvent | PermissionsChangedEvent | PlanChangedEvent + | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent @@ -260,6 +261,14 @@ export type AbortReason = | "remote_command" /** An MCP server delivered a user.abort notification. */ | "user_abort"; +/** + * Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration. + */ +export type ToolExecutionStartToolDescriptionMetaUIVisibility = + /** Tool is callable by the model (LLM tool surface) */ + | "model" + /** Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool */ + | "app"; /** * A content block within a tool result, which may be text, terminal output, image, audio, or a resource */ @@ -527,7 +536,11 @@ export type ExtensionsLoadedExtensionSource = /** Extension discovered from the current project. */ | "project" /** Extension discovered from the user's extension directory. */ - | "user"; + | "user" + /** Extension contributed by an installed plugin. */ + | "plugin" + /** Extension discovered from the current session's state directory. */ + | "session"; /** * Current status: running, disabled, failed, or starting */ @@ -1351,6 +1364,40 @@ export interface PlanChangedEvent { export interface PlanChangedData { operation: PlanChangedOperation; } +/** + * Session event "session.todos_changed". Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. + */ +export interface TodosChangedEvent { + /** + * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events. + */ + agentId?: string; + data: TodosChangedData; + /** + * Always true for events that are transient and not persisted to the session event log on disk. + */ + ephemeral: true; + /** + * Unique event identifier (UUID v4), generated when the event is emitted + */ + id: string; + /** + * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event. + */ + parentId: string | null; + /** + * ISO 8601 timestamp when the event was created + */ + timestamp: string; + /** + * Type discriminator. Always "session.todos_changed". + */ + type: "session.todos_changed"; +} +/** + * Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. + */ +export interface TodosChangedData {} /** * Session event "session.workspace_file_changed". Workspace file change details including path and operation type */ @@ -2653,18 +2700,6 @@ export interface AssistantMessageEvent { * Assistant response containing text content, optional tool requests, and interaction metadata */ export interface AssistantMessageData { - /** - * Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - * - * @experimental - */ - anthropicAdvisorBlocks?: unknown[]; - /** - * Anthropic advisor model ID used for this response, for timeline display on replay - * - * @experimental - */ - anthropicAdvisorModel?: string; /** * Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. */ @@ -2714,6 +2749,7 @@ export interface AssistantMessageData { * GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs */ requestId?: string; + serverTools?: AssistantMessageServerTools; /** * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation */ @@ -2727,6 +2763,19 @@ export interface AssistantMessageData { */ turnId?: string; } +/** + * Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping + */ +/** @experimental */ +export interface AssistantMessageServerTools { + advisorModel?: string; + functionCallNamespaces?: { + [k: string]: string | undefined; + }; + items?: unknown[]; + provider: string; + rawContentBlocks?: unknown[]; +} /** * A tool invocation request from the assistant */ @@ -3317,6 +3366,7 @@ export interface ToolExecutionStartData { * Unique identifier for this tool call */ toolCallId: string; + toolDescription?: ToolExecutionStartToolDescription; /** * Name of the tool being executed */ @@ -3326,6 +3376,39 @@ export interface ToolExecutionStartData { */ turnId?: string; } +/** + * Tool definition metadata, present for MCP tools with MCP Apps support + */ +export interface ToolExecutionStartToolDescription { + _meta?: ToolExecutionStartToolDescriptionMeta; + /** + * Tool description + */ + description?: string; + /** + * Tool name + */ + name: string; +} +/** + * MCP Apps metadata for UI resource association + */ +export interface ToolExecutionStartToolDescriptionMeta { + ui?: ToolExecutionStartToolDescriptionMetaUI; +} +/** + * Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + */ +export interface ToolExecutionStartToolDescriptionMetaUI { + /** + * URI of the UI resource + */ + resourceUri?: string; + /** + * Who can access this tool + */ + visibility?: ToolExecutionStartToolDescriptionMetaUIVisibility[]; +} /** * Session event "tool.execution_partial_result". Streaming tool execution output for incremental result display */ @@ -3862,7 +3945,7 @@ export interface SkillInvokedData { */ pluginVersion?: string; /** - * Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) + * Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) */ source?: string; trigger?: SkillInvokedTrigger; @@ -6812,7 +6895,7 @@ export interface ExtensionsLoadedData { */ export interface ExtensionsLoadedExtension { /** - * Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper') + * Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') */ id: string; /** diff --git a/nodejs/test/e2e/builtin_tools.e2e.test.ts b/nodejs/test/e2e/builtin_tools.e2e.test.ts index 233ffbf28..36b70ea19 100644 --- a/nodejs/test/e2e/builtin_tools.e2e.test.ts +++ b/nodejs/test/e2e/builtin_tools.e2e.test.ts @@ -43,7 +43,7 @@ describe("Built-in Tools", async () => { const session = await client.createSession({ onPermissionRequest: approveAll }); const msg = await session.sendAndWait( { - prompt: "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.", + prompt: "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.", }, SEND_TIMEOUT_MS ); diff --git a/nodejs/test/e2e/pending_work_resume.e2e.test.ts b/nodejs/test/e2e/pending_work_resume.e2e.test.ts index a890839bd..60bb2399e 100644 --- a/nodejs/test/e2e/pending_work_resume.e2e.test.ts +++ b/nodejs/test/e2e/pending_work_resume.e2e.test.ts @@ -560,7 +560,15 @@ describe("Pending work resume", async () => { await session2.disconnect(); } finally { - if (!releaseOriginalTool.settled()) { + // Release the still-pending original tool handler so it doesn't + // leak — but only in the warm scenario where the original client + // is still connected. In the cold scenario the original client was + // force-stopped, so its connection (and underlying socket) is gone; + // resolving the handler would make the SDK try to send the tool + // result over the destroyed stream, surfacing an ERR_STREAM_DESTROYED + // unhandled rejection (most visibly on Windows). The orphaned handler + // is harmless left pending since its client no longer exists. + if (!scenario.disconnectOriginalClient && !releaseOriginalTool.settled()) { releaseOriginalTool.resolve("ORIGINAL_SHOULD_NOT_WIN"); } } diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 69bf16007..ec00eefb5 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -1333,9 +1333,12 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. class ExtensionSource(Enum): - """Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)""" - + """Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin + (installed plugin), or session (session-state//extensions/) + """ + PLUGIN = "plugin" PROJECT = "project" + SESSION = "session" USER = "user" # Experimental: this type is part of an experimental API and may change or be removed. @@ -2809,6 +2812,25 @@ def to_dict(self) -> dict: result["serverName"] = from_str(self.server_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class MemoryConfiguration: + """Memory configuration for this session.""" + + enabled: bool + """Whether memory is enabled for the session.""" + + @staticmethod + def from_dict(obj: Any) -> 'MemoryConfiguration': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + return MemoryConfiguration(enabled) + + def to_dict(self) -> dict: + result: dict = {} + result["enabled"] = from_bool(self.enabled) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionContextInfo: @@ -4304,8 +4326,9 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PlanSQLTodosRow: - """Schema for the `PlanSqlTodosRow` type.""" - + """A single todo row read from the session SQL `todos` table. All fields are optional + because the SQL schema is best-effort and the agent may not have populated every column. + """ description: str | None = None """Todo description.""" @@ -4339,6 +4362,31 @@ def to_dict(self) -> dict: 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. +@dataclass +class PlanSQLTodoDependency: + """A single dependency edge read from the session SQL `todo_deps` table, indicating that one + todo must complete before another. + """ + depends_on: str + """ID of the todo it depends on.""" + + todo_id: str + """ID of the todo that has the dependency.""" + + @staticmethod + def from_dict(obj: Any) -> 'PlanSQLTodoDependency': + assert isinstance(obj, dict) + depends_on = from_str(obj.get("dependsOn")) + todo_id = from_str(obj.get("todoId")) + return PlanSQLTodoDependency(depends_on, todo_id) + + def to_dict(self) -> dict: + result: dict = {} + result["dependsOn"] = from_str(self.depends_on) + result["todoId"] = from_str(self.todo_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PlanUpdateRequest: @@ -4594,20 +4642,64 @@ def to_dict(self) -> dict: return result # Experimental: this type is part of an experimental API and may change or be removed. -class ProviderConfigType(Enum): - """Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.""" +class ProviderType(Enum): + """Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. + Provider family. Matches the `type` field of a BYOK provider config. + """ ANTHROPIC = "anthropic" AZURE = "azure" OPENAI = "openai" # Experimental: this type is part of an experimental API and may change or be removed. -class ProviderConfigWireAPI(Enum): - """Wire API format (openai/azure only). Defaults to "completions".""" +class ProviderWireAPI(Enum): + """Wire API format (openai/azure only). Defaults to "completions". + Wire API to be used, when required for the provider type. + """ COMPLETIONS = "completions" RESPONSES = "responses" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ProviderSessionToken: + """Short-lived, rotating credential the caller must send on every request, in addition to + `apiKey` if one is present. Omitted when the endpoint does not require one. + """ + header: str + """HTTP header name the token must be sent under.""" + + token: str + """The short-lived token value.""" + + expires_at: datetime | None = None + """When the token expires, if known. Callers should refresh by calling `getEndpoint` again + before this time, or reactively on any 401/403 response from `baseUrl`. + """ + model: str | None = None + """The model the token is bound to, when applicable. When set, the token is only valid for + requests against this model. + """ + + @staticmethod + def from_dict(obj: Any) -> 'ProviderSessionToken': + assert isinstance(obj, dict) + header = from_str(obj.get("header")) + token = from_str(obj.get("token")) + expires_at = from_union([from_datetime, from_none], obj.get("expiresAt")) + model = from_union([from_str, from_none], obj.get("model")) + return ProviderSessionToken(header, token, expires_at, model) + + def to_dict(self) -> dict: + result: dict = {} + result["header"] = from_str(self.header) + result["token"] = from_str(self.token) + if self.expires_at is not None: + result["expiresAt"] = from_union([lambda x: x.isoformat(), from_none], self.expires_at) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PushAttachmentFileLineRange: @@ -7311,6 +7403,14 @@ def to_dict(self) -> dict: class SlashCommandSelectSubcommandResultKind(Enum): SELECT_SUBCOMMAND = "select-subcommand" +# Experimental: this type is part of an experimental API and may change or be removed. +class SubagentSettingsEntryContextTier(Enum): + """Context tier override for matching subagents""" + + DEFAULT = "default" + INHERIT = "inherit" + LONG_CONTEXT = "long_context" + # 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""" @@ -7823,6 +7923,19 @@ def to_dict(self) -> dict: result["model"] = from_union([from_str, from_none], self.model) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ToolsUpdateSubagentSettingsResult: + """Empty result after applying subagent settings""" + @staticmethod + def from_dict(obj: Any) -> 'ToolsUpdateSubagentSettingsResult': + assert isinstance(obj, dict) + return ToolsUpdateSubagentSettingsResult() + + def to_dict(self) -> dict: + result: dict = {} + return result + # Experimental: this type is part of an experimental API and may change or be removed. class UIAutoModeSwitchResponse(Enum): """User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist @@ -9125,14 +9238,16 @@ class Extension: """Schema for the `Extension` type.""" id: str - """Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')""" - + """Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', + 'plugin:my-plugin:my-ext') + """ name: str """Extension name (directory name)""" source: ExtensionSource - """Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)""" - + """Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin + (installed plugin), or session (session-state//extensions/) + """ status: ExtensionStatus """Current status: running, disabled, failed, or starting""" @@ -11919,6 +12034,34 @@ def to_dict(self) -> dict: result["rows"] = from_list(lambda x: to_class(PlanSQLTodosRow, x), self.rows) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PlanReadSQLTodosWithDependenciesResult: + """Todo rows + dependency edges read from the session SQL database.""" + + dependencies: list[PlanSQLTodoDependency] + """Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, + or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does + not affect the rows result and vice versa. + """ + rows: list[PlanSQLTodosRow] + """Rows from the session SQL todos table, ordered by creation time and id. Empty when no + database, no todos table, or the SELECT failed. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PlanReadSQLTodosWithDependenciesResult': + assert isinstance(obj, dict) + dependencies = from_list(PlanSQLTodoDependency.from_dict, obj.get("dependencies")) + rows = from_list(PlanSQLTodosRow.from_dict, obj.get("rows")) + return PlanReadSQLTodosWithDependenciesResult(dependencies, rows) + + def to_dict(self) -> dict: + result: dict = {} + result["dependencies"] = from_list(lambda x: to_class(PlanSQLTodoDependency, x), self.dependencies) + result["rows"] = from_list(lambda x: to_class(PlanSQLTodosRow, x), self.rows) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstalledPluginInfo: @@ -12226,10 +12369,10 @@ class ProviderConfig: """Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model. """ - type: ProviderConfigType | None = None + type: ProviderType | None = None """Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.""" - wire_api: ProviderConfigWireAPI | None = None + wire_api: ProviderWireAPI | None = None """Wire API format (openai/azure only). Defaults to "completions".""" wire_model: str | None = None @@ -12249,8 +12392,8 @@ def from_dict(obj: Any) -> 'ProviderConfig': max_output_tokens = from_union([from_float, from_none], obj.get("maxOutputTokens")) max_prompt_tokens = from_union([from_float, from_none], obj.get("maxPromptTokens")) model_id = from_union([from_str, from_none], obj.get("modelId")) - type = from_union([ProviderConfigType, from_none], obj.get("type")) - wire_api = from_union([ProviderConfigWireAPI, from_none], obj.get("wireApi")) + type = from_union([ProviderType, from_none], obj.get("type")) + wire_api = from_union([ProviderWireAPI, from_none], obj.get("wireApi")) wire_model = from_union([from_str, from_none], obj.get("wireModel")) return ProviderConfig(base_url, api_key, azure, bearer_token, headers, max_context_window_tokens, max_output_tokens, max_prompt_tokens, model_id, type, wire_api, wire_model) @@ -12274,13 +12417,62 @@ def to_dict(self) -> dict: if self.model_id is not None: result["modelId"] = from_union([from_str, from_none], self.model_id) if self.type is not None: - result["type"] = from_union([lambda x: to_enum(ProviderConfigType, x), from_none], self.type) + result["type"] = from_union([lambda x: to_enum(ProviderType, x), from_none], self.type) if self.wire_api is not None: - result["wireApi"] = from_union([lambda x: to_enum(ProviderConfigWireAPI, x), from_none], self.wire_api) + result["wireApi"] = from_union([lambda x: to_enum(ProviderWireAPI, x), from_none], self.wire_api) if self.wire_model is not None: result["wireModel"] = from_union([from_str, from_none], self.wire_model) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ProviderEndpoint: + """A snapshot of the provider endpoint the session is currently configured to talk to.""" + + base_url: str + """Base URL to pass to the LLM client library.""" + + headers: dict[str, str] + """HTTP headers the caller must include on every outbound request.""" + + type: ProviderType + """Provider family. Matches the `type` field of a BYOK provider config.""" + + api_key: str | None = None + """A credential the caller should use with this endpoint. Omitted only when the endpoint + accepts unauthenticated requests. + """ + session_token: ProviderSessionToken | None = None + """Short-lived, rotating credential the caller must send on every request, in addition to + `apiKey` if one is present. Omitted when the endpoint does not require one. + """ + wire_api: ProviderWireAPI | None = None + """Wire API to be used, when required for the provider type.""" + + @staticmethod + def from_dict(obj: Any) -> 'ProviderEndpoint': + assert isinstance(obj, dict) + base_url = from_str(obj.get("baseUrl")) + headers = from_dict(from_str, obj.get("headers")) + type = ProviderType(obj.get("type")) + api_key = from_union([from_str, from_none], obj.get("apiKey")) + session_token = from_union([ProviderSessionToken.from_dict, from_none], obj.get("sessionToken")) + wire_api = from_union([ProviderWireAPI, from_none], obj.get("wireApi")) + return ProviderEndpoint(base_url, headers, type, api_key, session_token, wire_api) + + def to_dict(self) -> dict: + result: dict = {} + result["baseUrl"] = from_str(self.base_url) + result["headers"] = from_dict(from_str, self.headers) + result["type"] = to_enum(ProviderType, self.type) + if self.api_key is not None: + result["apiKey"] = from_union([from_str, from_none], self.api_key) + if self.session_token is not None: + result["sessionToken"] = from_union([lambda x: to_class(ProviderSessionToken, x), from_none], self.session_token) + if self.wire_api is not None: + result["wireApi"] = from_union([lambda x: to_enum(ProviderWireAPI, x), from_none], self.wire_api) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PushAttachmentSelectionDetails: @@ -14418,6 +14610,12 @@ class SlashCommandInfo: input: SlashCommandInput | None = None """Optional unstructured input hint""" + schedulable: bool | None = None + """Whether the command may be the target of `/every` / `/after` schedules. Resolution + happens at every tick, so only set this when the command is safe to re-invoke and + produces an agent prompt. + """ + @staticmethod def from_dict(obj: Any) -> 'SlashCommandInfo': assert isinstance(obj, dict) @@ -14428,7 +14626,8 @@ def from_dict(obj: Any) -> 'SlashCommandInfo': aliases = from_union([lambda x: from_list(from_str, x), from_none], obj.get("aliases")) experimental = from_union([from_bool, from_none], obj.get("experimental")) input = from_union([SlashCommandInput.from_dict, from_none], obj.get("input")) - return SlashCommandInfo(allow_during_agent_execution, description, kind, name, aliases, experimental, input) + schedulable = from_union([from_bool, from_none], obj.get("schedulable")) + return SlashCommandInfo(allow_during_agent_execution, description, kind, name, aliases, experimental, input, schedulable) def to_dict(self) -> dict: result: dict = {} @@ -14442,6 +14641,8 @@ def to_dict(self) -> dict: result["experimental"] = from_union([from_bool, from_none], self.experimental) if self.input is not None: result["input"] = from_union([lambda x: to_class(SlashCommandInput, x), from_none], self.input) + if self.schedulable is not None: + result["schedulable"] = from_union([from_bool, from_none], self.schedulable) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -17733,6 +17934,13 @@ class SessionOpenOptions: excluded_tools: list[str] | None = None """Denylist of tool names.""" + # Internal: this field is an internal SDK API and is not part of the public surface. + exp_assignments: Any = None + """ExP assignment ('flight') data injected by an SDK integrator, in the same JSON shape the + Copilot CLI fetches from the experimentation service (CopilotExpAssignmentResponse). When + supplied this is fed into the FeatureFlagService exactly like CLI-fetched assignments and + ExP-backed flags wait for it. When absent the session does not block on ExP. + """ feature_flags: dict[str, bool] | None = None """Feature-flag values resolved by the host.""" @@ -17751,6 +17959,9 @@ class SessionOpenOptions: lsp_client_name: str | None = None """Identifier sent to LSP-style integrations.""" + memory: MemoryConfiguration | None = None + """Memory configuration for this session.""" + model: str | None = None """Initial model identifier.""" @@ -17836,12 +18047,14 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': env_value_mode = from_union([MCPSetEnvValueModeDetails, from_none], obj.get("envValueMode")) events_log_directory = from_union([from_str, from_none], obj.get("eventsLogDirectory")) excluded_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedTools")) + exp_assignments = obj.get("expAssignments") feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags")) installed_plugins = from_union([lambda x: from_list(InstalledPlugin.from_dict, x), from_none], obj.get("installedPlugins")) integration_id = from_union([from_str, from_none], obj.get("integrationId")) is_experimental_mode = from_union([from_bool, from_none], obj.get("isExperimentalMode")) log_interactive_shells = from_union([from_bool, from_none], obj.get("logInteractiveShells")) lsp_client_name = from_union([from_str, from_none], obj.get("lspClientName")) + memory = from_union([MemoryConfiguration.from_dict, from_none], obj.get("memory")) model = from_union([from_str, from_none], obj.get("model")) model_capabilities_overrides = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilitiesOverrides")) name = from_union([from_str, from_none], obj.get("name")) @@ -17862,7 +18075,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions': trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile")) working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) working_directory_context = from_union([SessionContext.from_dict, from_none], obj.get("workingDirectoryContext")) - return SessionOpenOptions(additional_content_exclusion_policies, agent_context, ask_user_disabled, auth_info, available_tools, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_skills, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, model, model_capabilities_overrides, name, provider, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context) + return SessionOpenOptions(additional_content_exclusion_policies, agent_context, ask_user_disabled, auth_info, available_tools, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_skills, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_tools, exp_assignments, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, memory, model, model_capabilities_overrides, name, provider, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context) def to_dict(self) -> dict: result: dict = {} @@ -17910,6 +18123,8 @@ def to_dict(self) -> dict: result["eventsLogDirectory"] = from_union([from_str, from_none], self.events_log_directory) if self.excluded_tools is not None: result["excludedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_tools) + if self.exp_assignments is not None: + result["expAssignments"] = self.exp_assignments if self.feature_flags is not None: result["featureFlags"] = from_union([lambda x: from_dict(from_bool, x), from_none], self.feature_flags) if self.installed_plugins is not None: @@ -17922,6 +18137,8 @@ def to_dict(self) -> dict: result["logInteractiveShells"] = from_union([from_bool, from_none], self.log_interactive_shells) if self.lsp_client_name is not None: result["lspClientName"] = from_union([from_str, from_none], self.lsp_client_name) + if self.memory is not None: + result["memory"] = from_union([lambda x: to_class(MemoryConfiguration, x), from_none], self.memory) if self.model is not None: result["model"] = from_union([from_str, from_none], self.model) if self.model_capabilities_overrides is not None: @@ -19102,6 +19319,28 @@ def to_dict(self) -> dict: result["source"] = from_union([lambda x: to_enum(PermissionsSetAAllSource, x), from_none], self.source) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ProviderGetEndpointRequest: + """Optional model identifier to scope the endpoint snapshot to.""" + + model_id: str | None = None + """Model identifier the caller intends to use against the returned endpoint. Used to pick + the correct wire shape. Omit to use whichever model the session is currently using. + """ + + @staticmethod + def from_dict(obj: Any) -> 'ProviderGetEndpointRequest': + assert isinstance(obj, dict) + model_id = from_union([from_str, from_none], obj.get("modelId")) + return ProviderGetEndpointRequest(model_id) + + def to_dict(self) -> dict: + result: dict = {} + if self.model_id is not None: + result["modelId"] = from_union([from_str, from_none], self.model_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. # Internal: this type is an internal SDK API and is not part of the public surface. @dataclass @@ -19222,6 +19461,64 @@ def to_dict(self) -> dict: result["taskType"] = from_union([lambda x: to_enum(TaskType, x), from_none], self.task_type) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SubagentSettingsEntry: + """Subagent model, reasoning effort, and context tier settings""" + + context_tier: SubagentSettingsEntryContextTier | None = None + """Context tier override for matching subagents""" + + effort_level: str | None = None + """Reasoning effort override for matching subagents""" + + model: str | None = None + """Model override for matching subagents""" + + @staticmethod + def from_dict(obj: Any) -> 'SubagentSettingsEntry': + assert isinstance(obj, dict) + context_tier = from_union([SubagentSettingsEntryContextTier, from_none], obj.get("contextTier")) + effort_level = from_union([from_str, from_none], obj.get("effortLevel")) + model = from_union([from_str, from_none], obj.get("model")) + return SubagentSettingsEntry(context_tier, effort_level, model) + + def to_dict(self) -> dict: + result: dict = {} + if self.context_tier is not None: + result["contextTier"] = from_union([lambda x: to_enum(SubagentSettingsEntryContextTier, x), from_none], self.context_tier) + if self.effort_level is not None: + result["effortLevel"] = from_union([from_str, from_none], self.effort_level) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SubagentSettings: + """Configured per-agent subagent overrides""" + + agents: dict[str, SubagentSettingsEntry] | None = None + """Per-agent settings keyed by subagent agent_type""" + + disabled_subagents: list[str] | None = None + """Names of subagents the user has turned off; they cannot be dispatched""" + + @staticmethod + def from_dict(obj: Any) -> 'SubagentSettings': + assert isinstance(obj, dict) + agents = from_union([lambda x: from_dict(SubagentSettingsEntry.from_dict, x), from_none], obj.get("agents")) + disabled_subagents = from_union([lambda x: from_list(from_str, x), from_none], obj.get("disabledSubagents")) + return SubagentSettings(agents, disabled_subagents) + + def to_dict(self) -> dict: + result: dict = {} + if self.agents is not None: + result["agents"] = from_union([lambda x: from_dict(lambda x: to_class(SubagentSettingsEntry, x), x), from_none], self.agents) + if self.disabled_subagents is not None: + result["disabledSubagents"] = from_union([lambda x: from_list(from_str, x), from_none], self.disabled_subagents) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ToolsGetCurrentMetadataResult: @@ -19279,6 +19576,26 @@ def to_dict(self) -> dict: result["onChunk"] = self.on_chunk return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class UpdateSubagentSettingsRequest: + """Subagent settings to apply to the current session""" + + subagents: SubagentSettings | None = None + """Subagent settings to apply, or null to clear the live session override""" + + @staticmethod + def from_dict(obj: Any) -> 'UpdateSubagentSettingsRequest': + assert isinstance(obj, dict) + subagents = from_union([SubagentSettings.from_dict, from_none], obj.get("subagents")) + return UpdateSubagentSettingsRequest(subagents) + + def to_dict(self) -> dict: + result: dict = {} + if self.subagents is not None: + result["subagents"] = from_union([lambda x: to_class(SubagentSettings, x), from_none], self.subagents) + return result + @dataclass class RPC: abort_request: AbortRequest @@ -19508,6 +19825,7 @@ class RPC: mcp_stop_server_request: MCPStopServerRequest mcp_tools: MCPTools mcp_unregister_external_client_request: MCPUnregisterExternalClientRequest + memory_configuration: MemoryConfiguration metadata_context_info_request: MetadataContextInfoRequest metadata_context_info_result: MetadataContextInfoResult metadata_is_processing_result: MetadataIsProcessingResult @@ -19657,6 +19975,8 @@ class RPC: ping_result: PingResult plan_read_result: PlanReadResult plan_read_sql_todos_result: PlanReadSQLTodosResult + plan_read_sql_todos_with_dependencies_result: PlanReadSQLTodosWithDependenciesResult + plan_sql_todo_dependency: PlanSQLTodoDependency plan_sql_todos_row: PlanSQLTodosRow plan_update_request: PlanUpdateRequest plugin: Plugin @@ -19679,8 +19999,13 @@ class RPC: poll_spawned_sessions_result: PollSpawnedSessionsResult provider_config: ProviderConfig provider_config_azure: ProviderConfigAzure - provider_config_type: ProviderConfigType - provider_config_wire_api: ProviderConfigWireAPI + provider_config_type: ProviderType + provider_config_wire_api: ProviderWireAPI + provider_endpoint: ProviderEndpoint + provider_endpoint_type: ProviderType + provider_endpoint_wire_api: ProviderWireAPI + provider_get_endpoint_request: ProviderGetEndpointRequest + provider_session_token: ProviderSessionToken push_attachment: PushAttachment push_attachment_blob: PushAttachmentBlob push_attachment_directory: PushAttachmentDirectory @@ -19890,6 +20215,8 @@ class RPC: slash_command_select_subcommand_option: SlashCommandSelectSubcommandOption slash_command_select_subcommand_result: SlashCommandSelectSubcommandResult slash_command_text_result: SlashCommandTextResult + subagent_settings_entry: SubagentSettingsEntry + subagent_settings_entry_context_tier: SubagentSettingsEntryContextTier task_agent_info: TaskAgentInfo task_agent_progress: TaskAgentProgress task_execution_mode: TaskExecutionMode @@ -19923,6 +20250,7 @@ class RPC: tools_get_current_metadata_result: ToolsGetCurrentMetadataResult tools_initialize_and_validate_result: ToolsInitializeAndValidateResult tools_list_request: ToolsListRequest + tools_update_subagent_settings_result: ToolsUpdateSubagentSettingsResult ui_auto_mode_switch_response: UIAutoModeSwitchResponse ui_elicitation_array_any_of_field: UIElicitationArrayAnyOfField ui_elicitation_array_any_of_field_items: UIElicitationArrayAnyOfFieldItems @@ -19960,6 +20288,7 @@ class RPC: ui_unregister_direct_auto_mode_switch_handler_request: UIUnregisterDirectAutoModeSwitchHandlerRequest ui_unregister_direct_auto_mode_switch_handler_result: UIUnregisterDirectAutoModeSwitchHandlerResult ui_user_input_response: UIUserInputResponse + update_subagent_settings_request: UpdateSubagentSettingsRequest usage_get_metrics_result: UsageGetMetricsResult usage_metrics_code_changes: UsageMetricsCodeChanges usage_metrics_model_metric: UsageMetricsModelMetric @@ -19988,6 +20317,7 @@ class RPC: workspace_summary_host_type: HostType workspaces_workspace_details_host_type: HostType session_context_info: SessionContextInfo | None = None + subagent_settings: SubagentSettings | None = None task_progress: TaskProgress | None = None workspace_summary: WorkspaceSummary | None = None @@ -20221,6 +20551,7 @@ def from_dict(obj: Any) -> 'RPC': mcp_stop_server_request = MCPStopServerRequest.from_dict(obj.get("McpStopServerRequest")) mcp_tools = MCPTools.from_dict(obj.get("McpTools")) mcp_unregister_external_client_request = MCPUnregisterExternalClientRequest.from_dict(obj.get("McpUnregisterExternalClientRequest")) + memory_configuration = MemoryConfiguration.from_dict(obj.get("MemoryConfiguration")) metadata_context_info_request = MetadataContextInfoRequest.from_dict(obj.get("MetadataContextInfoRequest")) metadata_context_info_result = MetadataContextInfoResult.from_dict(obj.get("MetadataContextInfoResult")) metadata_is_processing_result = MetadataIsProcessingResult.from_dict(obj.get("MetadataIsProcessingResult")) @@ -20370,6 +20701,8 @@ def from_dict(obj: Any) -> 'RPC': ping_result = PingResult.from_dict(obj.get("PingResult")) plan_read_result = PlanReadResult.from_dict(obj.get("PlanReadResult")) plan_read_sql_todos_result = PlanReadSQLTodosResult.from_dict(obj.get("PlanReadSqlTodosResult")) + plan_read_sql_todos_with_dependencies_result = PlanReadSQLTodosWithDependenciesResult.from_dict(obj.get("PlanReadSqlTodosWithDependenciesResult")) + plan_sql_todo_dependency = PlanSQLTodoDependency.from_dict(obj.get("PlanSqlTodoDependency")) plan_sql_todos_row = PlanSQLTodosRow.from_dict(obj.get("PlanSqlTodosRow")) plan_update_request = PlanUpdateRequest.from_dict(obj.get("PlanUpdateRequest")) plugin = Plugin.from_dict(obj.get("Plugin")) @@ -20392,8 +20725,13 @@ def from_dict(obj: Any) -> 'RPC': poll_spawned_sessions_result = PollSpawnedSessionsResult.from_dict(obj.get("PollSpawnedSessionsResult")) provider_config = ProviderConfig.from_dict(obj.get("ProviderConfig")) provider_config_azure = ProviderConfigAzure.from_dict(obj.get("ProviderConfigAzure")) - provider_config_type = ProviderConfigType(obj.get("ProviderConfigType")) - provider_config_wire_api = ProviderConfigWireAPI(obj.get("ProviderConfigWireApi")) + provider_config_type = ProviderType(obj.get("ProviderConfigType")) + provider_config_wire_api = ProviderWireAPI(obj.get("ProviderConfigWireApi")) + provider_endpoint = ProviderEndpoint.from_dict(obj.get("ProviderEndpoint")) + provider_endpoint_type = ProviderType(obj.get("ProviderEndpointType")) + provider_endpoint_wire_api = ProviderWireAPI(obj.get("ProviderEndpointWireApi")) + provider_get_endpoint_request = ProviderGetEndpointRequest.from_dict(obj.get("ProviderGetEndpointRequest")) + provider_session_token = ProviderSessionToken.from_dict(obj.get("ProviderSessionToken")) push_attachment = _load_PushAttachment(obj.get("PushAttachment")) push_attachment_blob = PushAttachmentBlob.from_dict(obj.get("PushAttachmentBlob")) push_attachment_directory = PushAttachmentDirectory.from_dict(obj.get("PushAttachmentDirectory")) @@ -20603,6 +20941,8 @@ def from_dict(obj: Any) -> 'RPC': 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")) + subagent_settings_entry = SubagentSettingsEntry.from_dict(obj.get("SubagentSettingsEntry")) + subagent_settings_entry_context_tier = SubagentSettingsEntryContextTier(obj.get("SubagentSettingsEntryContextTier")) task_agent_info = TaskAgentInfo.from_dict(obj.get("TaskAgentInfo")) task_agent_progress = TaskAgentProgress.from_dict(obj.get("TaskAgentProgress")) task_execution_mode = TaskExecutionMode(obj.get("TaskExecutionMode")) @@ -20636,6 +20976,7 @@ def from_dict(obj: Any) -> 'RPC': tools_get_current_metadata_result = ToolsGetCurrentMetadataResult.from_dict(obj.get("ToolsGetCurrentMetadataResult")) tools_initialize_and_validate_result = ToolsInitializeAndValidateResult.from_dict(obj.get("ToolsInitializeAndValidateResult")) tools_list_request = ToolsListRequest.from_dict(obj.get("ToolsListRequest")) + tools_update_subagent_settings_result = ToolsUpdateSubagentSettingsResult.from_dict(obj.get("ToolsUpdateSubagentSettingsResult")) ui_auto_mode_switch_response = UIAutoModeSwitchResponse(obj.get("UIAutoModeSwitchResponse")) ui_elicitation_array_any_of_field = UIElicitationArrayAnyOfField.from_dict(obj.get("UIElicitationArrayAnyOfField")) ui_elicitation_array_any_of_field_items = UIElicitationArrayAnyOfFieldItems.from_dict(obj.get("UIElicitationArrayAnyOfFieldItems")) @@ -20673,6 +21014,7 @@ def from_dict(obj: Any) -> 'RPC': ui_unregister_direct_auto_mode_switch_handler_request = UIUnregisterDirectAutoModeSwitchHandlerRequest.from_dict(obj.get("UIUnregisterDirectAutoModeSwitchHandlerRequest")) ui_unregister_direct_auto_mode_switch_handler_result = UIUnregisterDirectAutoModeSwitchHandlerResult.from_dict(obj.get("UIUnregisterDirectAutoModeSwitchHandlerResult")) ui_user_input_response = UIUserInputResponse.from_dict(obj.get("UIUserInputResponse")) + update_subagent_settings_request = UpdateSubagentSettingsRequest.from_dict(obj.get("UpdateSubagentSettingsRequest")) usage_get_metrics_result = UsageGetMetricsResult.from_dict(obj.get("UsageGetMetricsResult")) usage_metrics_code_changes = UsageMetricsCodeChanges.from_dict(obj.get("UsageMetricsCodeChanges")) usage_metrics_model_metric = UsageMetricsModelMetric.from_dict(obj.get("UsageMetricsModelMetric")) @@ -20701,9 +21043,10 @@ def from_dict(obj: Any) -> 'RPC': workspace_summary_host_type = HostType(obj.get("WorkspaceSummaryHostType")) workspaces_workspace_details_host_type = HostType(obj.get("WorkspacesWorkspaceDetailsHostType")) session_context_info = from_union([SessionContextInfo.from_dict, from_none], obj.get("SessionContextInfo")) + subagent_settings = from_union([SubagentSettings.from_dict, from_none], obj.get("SubagentSettings")) task_progress = from_union([TaskProgress.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_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_instance_availability, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, 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, configure_session_extensions_params, 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, current_tool_metadata, discovered_canvas, 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_context_push_input, 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, folder_trust_add_params, folder_trust_check_params, folder_trust_check_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_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instructions_discover_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, local_session_metadata_value, log_request, log_result, lsp_initialize_request, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_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_configure_git_hub_request, mcp_configure_git_hub_result, 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_filtered_server, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, 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_billing_token_prices_long_context, 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_list_request, 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, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, 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_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, 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_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_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_allow_all_request, permissions_set_allow_all_source, 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_read_sql_todos_result, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, poll_spawned_sessions_result, provider_config, provider_config_azure, provider_config_type, provider_config_wire_api, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, 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, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, 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_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, 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_board_entry_count_request, sessions_get_board_entry_count_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_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_poll_spawned_sessions_event, sessions_poll_spawned_sessions_request, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, 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, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, 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, task_progress_line, 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_get_current_metadata_result, 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_ephemeral_query_request, ui_ephemeral_query_result, 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_requested_shell_command_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_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, workspace_summary_host_type, workspaces_workspace_details_host_type, 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_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_instance_availability, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, 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, configure_session_extensions_params, 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, current_tool_metadata, discovered_canvas, 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_context_push_input, 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, folder_trust_add_params, folder_trust_check_params, folder_trust_check_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_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instructions_discover_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, local_session_metadata_value, log_request, log_result, lsp_initialize_request, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_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_configure_git_hub_request, mcp_configure_git_hub_result, 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_filtered_server, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, memory_configuration, 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_billing_token_prices_long_context, 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_list_request, 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, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, 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_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, 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_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_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_allow_all_request, permissions_set_allow_all_source, 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_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, poll_spawned_sessions_result, provider_config, provider_config_azure, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_session_token, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, 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, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, 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_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, 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_board_entry_count_request, sessions_get_board_entry_count_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_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_poll_spawned_sessions_event, sessions_poll_spawned_sessions_request, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, 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, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, 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, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, 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_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, 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_ephemeral_query_request, ui_ephemeral_query_result, 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, update_subagent_settings_request, 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_requested_shell_command_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_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, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, subagent_settings, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -20934,6 +21277,7 @@ def to_dict(self) -> dict: result["McpStopServerRequest"] = to_class(MCPStopServerRequest, self.mcp_stop_server_request) result["McpTools"] = to_class(MCPTools, self.mcp_tools) result["McpUnregisterExternalClientRequest"] = to_class(MCPUnregisterExternalClientRequest, self.mcp_unregister_external_client_request) + result["MemoryConfiguration"] = to_class(MemoryConfiguration, self.memory_configuration) result["MetadataContextInfoRequest"] = to_class(MetadataContextInfoRequest, self.metadata_context_info_request) result["MetadataContextInfoResult"] = to_class(MetadataContextInfoResult, self.metadata_context_info_result) result["MetadataIsProcessingResult"] = to_class(MetadataIsProcessingResult, self.metadata_is_processing_result) @@ -21083,6 +21427,8 @@ def to_dict(self) -> dict: result["PingResult"] = to_class(PingResult, self.ping_result) result["PlanReadResult"] = to_class(PlanReadResult, self.plan_read_result) result["PlanReadSqlTodosResult"] = to_class(PlanReadSQLTodosResult, self.plan_read_sql_todos_result) + result["PlanReadSqlTodosWithDependenciesResult"] = to_class(PlanReadSQLTodosWithDependenciesResult, self.plan_read_sql_todos_with_dependencies_result) + result["PlanSqlTodoDependency"] = to_class(PlanSQLTodoDependency, self.plan_sql_todo_dependency) result["PlanSqlTodosRow"] = to_class(PlanSQLTodosRow, self.plan_sql_todos_row) result["PlanUpdateRequest"] = to_class(PlanUpdateRequest, self.plan_update_request) result["Plugin"] = to_class(Plugin, self.plugin) @@ -21105,8 +21451,13 @@ def to_dict(self) -> dict: result["PollSpawnedSessionsResult"] = to_class(PollSpawnedSessionsResult, self.poll_spawned_sessions_result) result["ProviderConfig"] = to_class(ProviderConfig, self.provider_config) result["ProviderConfigAzure"] = to_class(ProviderConfigAzure, self.provider_config_azure) - result["ProviderConfigType"] = to_enum(ProviderConfigType, self.provider_config_type) - result["ProviderConfigWireApi"] = to_enum(ProviderConfigWireAPI, self.provider_config_wire_api) + result["ProviderConfigType"] = to_enum(ProviderType, self.provider_config_type) + result["ProviderConfigWireApi"] = to_enum(ProviderWireAPI, self.provider_config_wire_api) + result["ProviderEndpoint"] = to_class(ProviderEndpoint, self.provider_endpoint) + result["ProviderEndpointType"] = to_enum(ProviderType, self.provider_endpoint_type) + result["ProviderEndpointWireApi"] = to_enum(ProviderWireAPI, self.provider_endpoint_wire_api) + result["ProviderGetEndpointRequest"] = to_class(ProviderGetEndpointRequest, self.provider_get_endpoint_request) + result["ProviderSessionToken"] = to_class(ProviderSessionToken, self.provider_session_token) result["PushAttachment"] = (self.push_attachment).to_dict() result["PushAttachmentBlob"] = to_class(PushAttachmentBlob, self.push_attachment_blob) result["PushAttachmentDirectory"] = to_class(PushAttachmentDirectory, self.push_attachment_directory) @@ -21316,6 +21667,8 @@ def to_dict(self) -> dict: 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["SubagentSettingsEntry"] = to_class(SubagentSettingsEntry, self.subagent_settings_entry) + result["SubagentSettingsEntryContextTier"] = to_enum(SubagentSettingsEntryContextTier, self.subagent_settings_entry_context_tier) result["TaskAgentInfo"] = to_class(TaskAgentInfo, self.task_agent_info) result["TaskAgentProgress"] = to_class(TaskAgentProgress, self.task_agent_progress) result["TaskExecutionMode"] = to_enum(TaskExecutionMode, self.task_execution_mode) @@ -21349,6 +21702,7 @@ def to_dict(self) -> dict: result["ToolsGetCurrentMetadataResult"] = to_class(ToolsGetCurrentMetadataResult, self.tools_get_current_metadata_result) result["ToolsInitializeAndValidateResult"] = to_class(ToolsInitializeAndValidateResult, self.tools_initialize_and_validate_result) result["ToolsListRequest"] = to_class(ToolsListRequest, self.tools_list_request) + result["ToolsUpdateSubagentSettingsResult"] = to_class(ToolsUpdateSubagentSettingsResult, self.tools_update_subagent_settings_result) result["UIAutoModeSwitchResponse"] = to_enum(UIAutoModeSwitchResponse, self.ui_auto_mode_switch_response) result["UIElicitationArrayAnyOfField"] = to_class(UIElicitationArrayAnyOfField, self.ui_elicitation_array_any_of_field) result["UIElicitationArrayAnyOfFieldItems"] = to_class(UIElicitationArrayAnyOfFieldItems, self.ui_elicitation_array_any_of_field_items) @@ -21386,6 +21740,7 @@ def to_dict(self) -> dict: result["UIUnregisterDirectAutoModeSwitchHandlerRequest"] = to_class(UIUnregisterDirectAutoModeSwitchHandlerRequest, self.ui_unregister_direct_auto_mode_switch_handler_request) result["UIUnregisterDirectAutoModeSwitchHandlerResult"] = to_class(UIUnregisterDirectAutoModeSwitchHandlerResult, self.ui_unregister_direct_auto_mode_switch_handler_result) result["UIUserInputResponse"] = to_class(UIUserInputResponse, self.ui_user_input_response) + result["UpdateSubagentSettingsRequest"] = to_class(UpdateSubagentSettingsRequest, self.update_subagent_settings_request) result["UsageGetMetricsResult"] = to_class(UsageGetMetricsResult, self.usage_get_metrics_result) result["UsageMetricsCodeChanges"] = to_class(UsageMetricsCodeChanges, self.usage_metrics_code_changes) result["UsageMetricsModelMetric"] = to_class(UsageMetricsModelMetric, self.usage_metrics_model_metric) @@ -21414,6 +21769,7 @@ def to_dict(self) -> dict: result["WorkspaceSummaryHostType"] = to_enum(HostType, self.workspace_summary_host_type) result["WorkspacesWorkspaceDetailsHostType"] = to_enum(HostType, self.workspaces_workspace_details_host_type) result["SessionContextInfo"] = from_union([lambda x: to_class(SessionContextInfo, x), from_none], self.session_context_info) + result["SubagentSettings"] = from_union([lambda x: to_class(SubagentSettings, x), from_none], self.subagent_settings) result["TaskProgress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.task_progress) result["WorkspaceSummary"] = from_union([lambda x: to_class(WorkspaceSummary, x), from_none], self.workspace_summary) return result @@ -21659,6 +22015,10 @@ def _load_TaskInfo(obj: Any) -> "TaskInfo": PermissionsConfigureAdditionalContentExclusionPolicyScope = AdditionalContentExclusionPolicyScope PermissionsSetAllowAllSource = PermissionsSetAAllSource PermissionsSetApproveAllSource = PermissionsSetAAllSource +ProviderConfigType = ProviderType +ProviderConfigWireApi = ProviderWireAPI +ProviderEndpointType = ProviderType +ProviderEndpointWireApi = ProviderWireAPI RemoteSessionMetadataTaskType = TaskType SessionContextHostType = HostType SessionMcpAppsCallToolResult = dict @@ -22290,6 +22650,10 @@ async def read_sql_todos(self, *, timeout: float | None = None) -> PlanReadSQLTo "Reads todo rows from the session SQL database for plan rendering.\n\nReturns:\n Todo rows read from the session SQL database. Empty when no session database is available." return PlanReadSQLTodosResult.from_dict(await self._client.request("session.plan.readSqlTodos", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def read_sql_todos_with_dependencies(self, *, timeout: float | None = None) -> PlanReadSQLTodosWithDependenciesResult: + "Reads todo rows AND dependency edges from the session SQL database for structured progress UI. Same defensive behavior as readSqlTodos — returns empty arrays when the database, tables, or columns aren't available. Clients should call this on session start and after every `session.todos_changed` event to refresh structured-UI rendering.\n\nReturns:\n Todo rows + dependency edges read from the session SQL database." + return PlanReadSQLTodosWithDependenciesResult.from_dict(await self._client.request("session.plan.readSqlTodosWithDependencies", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class WorkspacesApi: @@ -22631,6 +22995,19 @@ async def reload(self, params: PluginsReloadRequest | None = None, *, timeout: f await self._client.request("session.plugins.reload", params_dict, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. +class ProviderApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def get_endpoint(self, params: ProviderGetEndpointRequest | None = None, *, timeout: float | None = None) -> ProviderEndpoint: + "Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.\n\nArgs:\n params: Optional model identifier to scope the endpoint snapshot to.\n\nReturns:\n A snapshot of the provider endpoint the session is currently configured to talk to." + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} if params is not None else {} + params_dict["sessionId"] = self._session_id + return ProviderEndpoint.from_dict(await self._client.request("session.provider.getEndpoint", params_dict, **_timeout_kwargs(timeout))) + + # Experimental: this API group is experimental and may change or be removed. class OptionsApi: def __init__(self, client: "JsonRpcClient", session_id: str): @@ -22710,6 +23087,12 @@ async def get_current_metadata(self, *, timeout: float | None = None) -> ToolsGe "Returns lightweight metadata for the session's currently initialized tools.\n\nReturns:\n Current lightweight tool metadata snapshot for the session." return ToolsGetCurrentMetadataResult.from_dict(await self._client.request("session.tools.getCurrentMetadata", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def update_subagent_settings(self, params: UpdateSubagentSettingsRequest, *, timeout: float | None = None) -> ToolsUpdateSubagentSettingsResult: + "Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions.\n\nArgs:\n params: Subagent settings to apply to the current session\n\nReturns:\n Empty result after applying subagent settings" + params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} + params_dict["sessionId"] = self._session_id + return ToolsUpdateSubagentSettingsResult.from_dict(await self._client.request("session.tools.updateSubagentSettings", params_dict, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class CommandsApi: @@ -23210,6 +23593,7 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self.skills = SkillsApi(client, session_id) self.mcp = McpApi(client, session_id) self.plugins = PluginsApi(client, session_id) + self.provider = ProviderApi(client, session_id) self.options = OptionsApi(client, session_id) self.lsp = LspApi(client, session_id) self.extensions = ExtensionsApi(client, session_id) @@ -23753,6 +24137,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "McpExecuteSamplingResult", "McpOauthApi", "McpServerAuthConfig", + "MemoryConfiguration", "MetadataApi", "MetadataContextInfoRequest", "MetadataContextInfoResult", @@ -23940,6 +24325,8 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "PlanApi", "PlanReadResult", "PlanReadSQLTodosResult", + "PlanReadSQLTodosWithDependenciesResult", + "PlanSQLTodoDependency", "PlanSQLTodosRow", "PlanUpdateRequest", "Plugin", @@ -23961,10 +24348,18 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "PluginsUninstallRequest", "PluginsUpdateRequest", "PollSpawnedSessionsResult", + "ProviderApi", "ProviderConfig", "ProviderConfigAzure", "ProviderConfigType", - "ProviderConfigWireAPI", + "ProviderConfigWireApi", + "ProviderEndpoint", + "ProviderEndpointType", + "ProviderEndpointWireApi", + "ProviderGetEndpointRequest", + "ProviderSessionToken", + "ProviderType", + "ProviderWireAPI", "PurpleSource", "PushAttachment", "PushAttachmentBlob", @@ -24224,6 +24619,9 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "SlashCommandSelectSubcommandResultKind", "SlashCommandTextResult", "StickySource", + "SubagentSettings", + "SubagentSettingsEntry", + "SubagentSettingsEntryContextTier", "TaskAgentInfo", "TaskAgentInfoType", "TaskAgentProgress", @@ -24270,6 +24668,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "ToolsGetCurrentMetadataResult", "ToolsInitializeAndValidateResult", "ToolsListRequest", + "ToolsUpdateSubagentSettingsResult", "UIAutoModeSwitchResponse", "UIElicitationArrayAnyOfField", "UIElicitationArrayAnyOfFieldItems", @@ -24311,6 +24710,7 @@ async def handle_canvas_action_invoke(params: dict) -> dict | None: "UIUnregisterDirectAutoModeSwitchHandlerResult", "UIUserInputResponse", "UiApi", + "UpdateSubagentSettingsRequest", "UsageApi", "UsageGetMetricsResult", "UsageMetricsCodeChanges", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index f2e155f49..697968181 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -136,6 +136,7 @@ class SessionEventType(Enum): SESSION_MODE_CHANGED = "session.mode_changed" SESSION_PERMISSIONS_CHANGED = "session.permissions_changed" SESSION_PLAN_CHANGED = "session.plan_changed" + SESSION_TODOS_CHANGED = "session.todos_changed" SESSION_WORKSPACE_FILE_CHANGED = "session.workspace_file_changed" SESSION_HANDOFF = "session.handoff" SESSION_TRUNCATION = "session.truncation" @@ -285,6 +286,46 @@ def to_dict(self) -> dict: return {_compat_to_json_key(key): _compat_to_json_value(value) for key, value in self._values.items() if value is not None} +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class AssistantMessageServerTools: + "Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping" + provider: str + advisor_model: str | None = None + function_call_namespaces: dict[str, str] | None = None + items: list[Any] | None = None + raw_content_blocks: list[Any] | None = None + + @staticmethod + def from_dict(obj: Any) -> "AssistantMessageServerTools": + assert isinstance(obj, dict) + provider = from_str(obj.get("provider")) + advisor_model = from_union([from_none, from_str], obj.get("advisorModel")) + function_call_namespaces = from_union([from_none, lambda x: from_dict(from_str, x)], obj.get("functionCallNamespaces")) + items = from_union([from_none, lambda x: from_list(lambda x: x, x)], obj.get("items")) + raw_content_blocks = from_union([from_none, lambda x: from_list(lambda x: x, x)], obj.get("rawContentBlocks")) + return AssistantMessageServerTools( + provider=provider, + advisor_model=advisor_model, + function_call_namespaces=function_call_namespaces, + items=items, + raw_content_blocks=raw_content_blocks, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["provider"] = from_str(self.provider) + if self.advisor_model is not None: + result["advisorModel"] = from_union([from_none, from_str], self.advisor_model) + if self.function_call_namespaces is not None: + result["functionCallNamespaces"] = from_union([from_none, lambda x: from_dict(from_str, x)], self.function_call_namespaces) + if self.items is not None: + result["items"] = from_union([from_none, lambda x: from_list(lambda x: x, x)], self.items) + if self.raw_content_blocks is not None: + result["rawContentBlocks"] = from_union([from_none, lambda x: from_list(lambda x: x, x)], self.raw_content_blocks) + return result + + @dataclass class AbortData: "Turn abort information including the reason for termination" @@ -328,10 +369,6 @@ class AssistantMessageData: "Assistant response containing text content, optional tool requests, and interaction metadata" content: str message_id: str - # Experimental: this field is part of an experimental API and may change or be removed. - anthropic_advisor_blocks: list[Any] | None = None - # Experimental: this field is part of an experimental API and may change or be removed. - anthropic_advisor_model: str | None = None api_call_id: str | None = None encrypted_content: str | None = None interaction_id: str | None = None @@ -343,6 +380,7 @@ class AssistantMessageData: reasoning_opaque: str | None = None reasoning_text: str | None = None request_id: str | None = None + server_tools: AssistantMessageServerTools | None = None service_request_id: str | None = None tool_requests: list[AssistantMessageToolRequest] | None = None turn_id: str | None = None @@ -352,8 +390,6 @@ def from_dict(obj: Any) -> "AssistantMessageData": assert isinstance(obj, dict) content = from_str(obj.get("content")) message_id = from_str(obj.get("messageId")) - anthropic_advisor_blocks = from_union([from_none, lambda x: from_list(lambda x: x, x)], obj.get("anthropicAdvisorBlocks")) - anthropic_advisor_model = from_union([from_none, from_str], obj.get("anthropicAdvisorModel")) api_call_id = from_union([from_none, from_str], obj.get("apiCallId")) encrypted_content = from_union([from_none, from_str], obj.get("encryptedContent")) interaction_id = from_union([from_none, from_str], obj.get("interactionId")) @@ -364,14 +400,13 @@ def from_dict(obj: Any) -> "AssistantMessageData": reasoning_opaque = from_union([from_none, from_str], obj.get("reasoningOpaque")) reasoning_text = from_union([from_none, from_str], obj.get("reasoningText")) request_id = from_union([from_none, from_str], obj.get("requestId")) + server_tools = from_union([from_none, AssistantMessageServerTools.from_dict], obj.get("serverTools")) service_request_id = from_union([from_none, from_str], obj.get("serviceRequestId")) tool_requests = from_union([from_none, lambda x: from_list(AssistantMessageToolRequest.from_dict, x)], obj.get("toolRequests")) turn_id = from_union([from_none, from_str], obj.get("turnId")) return AssistantMessageData( content=content, message_id=message_id, - anthropic_advisor_blocks=anthropic_advisor_blocks, - anthropic_advisor_model=anthropic_advisor_model, api_call_id=api_call_id, encrypted_content=encrypted_content, interaction_id=interaction_id, @@ -382,6 +417,7 @@ def from_dict(obj: Any) -> "AssistantMessageData": reasoning_opaque=reasoning_opaque, reasoning_text=reasoning_text, request_id=request_id, + server_tools=server_tools, service_request_id=service_request_id, tool_requests=tool_requests, turn_id=turn_id, @@ -391,10 +427,6 @@ def to_dict(self) -> dict: result: dict = {} result["content"] = from_str(self.content) result["messageId"] = from_str(self.message_id) - if self.anthropic_advisor_blocks is not None: - result["anthropicAdvisorBlocks"] = from_union([from_none, lambda x: from_list(lambda x: x, x)], self.anthropic_advisor_blocks) - if self.anthropic_advisor_model is not None: - result["anthropicAdvisorModel"] = from_union([from_none, from_str], self.anthropic_advisor_model) if self.api_call_id is not None: result["apiCallId"] = from_union([from_none, from_str], self.api_call_id) if self.encrypted_content is not None: @@ -415,6 +447,8 @@ def to_dict(self) -> dict: result["reasoningText"] = from_union([from_none, from_str], self.reasoning_text) if self.request_id is not None: result["requestId"] = from_union([from_none, from_str], self.request_id) + if self.server_tools is not None: + result["serverTools"] = from_union([from_none, lambda x: to_class(AssistantMessageServerTools, x)], self.server_tools) if self.service_request_id is not None: result["serviceRequestId"] = from_union([from_none, from_str], self.service_request_id) if self.tool_requests is not None: @@ -4719,6 +4753,18 @@ def to_dict(self) -> dict: return result +@dataclass +class SessionTodosChangedData: + "Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed." + @staticmethod + def from_dict(obj: Any) -> "SessionTodosChangedData": + assert isinstance(obj, dict) + return SessionTodosChangedData() + + def to_dict(self) -> dict: + return {} + + @dataclass class SessionToolsUpdatedData: "Schema for the `ToolsUpdatedData` type." @@ -6271,6 +6317,7 @@ class ToolExecutionStartData: model: str | None = None # Deprecated: this field is deprecated. parent_tool_call_id: str | None = None + tool_description: ToolExecutionStartToolDescription | None = None turn_id: str | None = None @staticmethod @@ -6284,6 +6331,7 @@ def from_dict(obj: Any) -> "ToolExecutionStartData": mcp_tool_name = from_union([from_none, from_str], obj.get("mcpToolName")) model = from_union([from_none, from_str], obj.get("model")) parent_tool_call_id = from_union([from_none, from_str], obj.get("parentToolCallId")) + tool_description = from_union([from_none, ToolExecutionStartToolDescription.from_dict], obj.get("toolDescription")) turn_id = from_union([from_none, from_str], obj.get("turnId")) return ToolExecutionStartData( tool_call_id=tool_call_id, @@ -6294,6 +6342,7 @@ def from_dict(obj: Any) -> "ToolExecutionStartData": mcp_tool_name=mcp_tool_name, model=model, parent_tool_call_id=parent_tool_call_id, + tool_description=tool_description, turn_id=turn_id, ) @@ -6313,11 +6362,87 @@ def to_dict(self) -> dict: result["model"] = from_union([from_none, from_str], self.model) if self.parent_tool_call_id is not None: result["parentToolCallId"] = from_union([from_none, from_str], self.parent_tool_call_id) + if self.tool_description is not None: + result["toolDescription"] = from_union([from_none, lambda x: to_class(ToolExecutionStartToolDescription, x)], self.tool_description) if self.turn_id is not None: result["turnId"] = from_union([from_none, from_str], self.turn_id) return result +@dataclass +class ToolExecutionStartToolDescription: + "Tool definition metadata, present for MCP tools with MCP Apps support" + name: str + _meta: ToolExecutionStartToolDescriptionMeta | None = None + description: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "ToolExecutionStartToolDescription": + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + _meta = from_union([from_none, ToolExecutionStartToolDescriptionMeta.from_dict], obj.get("_meta")) + description = from_union([from_none, from_str], obj.get("description")) + return ToolExecutionStartToolDescription( + name=name, + _meta=_meta, + description=description, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + if self._meta is not None: + result["_meta"] = from_union([from_none, lambda x: to_class(ToolExecutionStartToolDescriptionMeta, x)], self._meta) + if self.description is not None: + result["description"] = from_union([from_none, from_str], self.description) + return result + + +@dataclass +class ToolExecutionStartToolDescriptionMeta: + "MCP Apps metadata for UI resource association" + ui: ToolExecutionStartToolDescriptionMetaUI | None = None + + @staticmethod + def from_dict(obj: Any) -> "ToolExecutionStartToolDescriptionMeta": + assert isinstance(obj, dict) + ui = from_union([from_none, ToolExecutionStartToolDescriptionMetaUI.from_dict], obj.get("ui")) + return ToolExecutionStartToolDescriptionMeta( + ui=ui, + ) + + def to_dict(self) -> dict: + result: dict = {} + if self.ui is not None: + result["ui"] = from_union([from_none, lambda x: to_class(ToolExecutionStartToolDescriptionMetaUI, x)], self.ui) + return result + + +@dataclass +class ToolExecutionStartToolDescriptionMetaUI: + "Schema for the `ToolExecutionStartToolDescriptionMetaUI` type." + resource_uri: str | None = None + visibility: list[ToolExecutionStartToolDescriptionMetaUIVisibility] | None = None + + @staticmethod + def from_dict(obj: Any) -> "ToolExecutionStartToolDescriptionMetaUI": + assert isinstance(obj, dict) + resource_uri = from_union([from_none, from_str], obj.get("resourceUri")) + visibility = from_union([from_none, lambda x: from_list(lambda x: parse_enum(ToolExecutionStartToolDescriptionMetaUIVisibility, x), x)], obj.get("visibility")) + return ToolExecutionStartToolDescriptionMetaUI( + resource_uri=resource_uri, + visibility=visibility, + ) + + def to_dict(self) -> dict: + result: dict = {} + if self.resource_uri is not None: + result["resourceUri"] = from_union([from_none, from_str], self.resource_uri) + if self.visibility is not None: + result["visibility"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ToolExecutionStartToolDescriptionMetaUIVisibility, x), x)], self.visibility) + return result + + @dataclass class ToolUserRequestedData: "User-initiated tool invocation request with tool name and arguments" @@ -6953,6 +7078,10 @@ class ExtensionsLoadedExtensionSource(Enum): PROJECT = "project" # Extension discovered from the user's extension directory. USER = "user" + # Extension contributed by an installed plugin. + PLUGIN = "plugin" + # Extension discovered from the current session's state directory. + SESSION = "session" class ExtensionsLoadedExtensionStatus(Enum): @@ -7149,6 +7278,14 @@ class ToolExecutionCompleteToolDescriptionMetaUIVisibility(Enum): APP = "app" +class ToolExecutionStartToolDescriptionMetaUIVisibility(Enum): + "Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration." + # Tool is callable by the model (LLM tool surface) + MODEL = "model" + # Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool + APP = "app" + + class UserMessageAgentMode(Enum): "The agent mode that was active when this message was sent" # The agent is responding interactively to the user. @@ -7177,7 +7314,7 @@ class WorkspaceFileChangedOperation(Enum): UPDATE = "update" -SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data +SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data @dataclass @@ -7218,6 +7355,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.SESSION_MODE_CHANGED: data = SessionModeChangedData.from_dict(data_obj) case SessionEventType.SESSION_PERMISSIONS_CHANGED: data = SessionPermissionsChangedData.from_dict(data_obj) case SessionEventType.SESSION_PLAN_CHANGED: data = SessionPlanChangedData.from_dict(data_obj) + case SessionEventType.SESSION_TODOS_CHANGED: data = SessionTodosChangedData.from_dict(data_obj) case SessionEventType.SESSION_WORKSPACE_FILE_CHANGED: data = SessionWorkspaceFileChangedData.from_dict(data_obj) case SessionEventType.SESSION_HANDOFF: data = SessionHandoffData.from_dict(data_obj) case SessionEventType.SESSION_TRUNCATION: data = SessionTruncationData.from_dict(data_obj) @@ -7331,6 +7469,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "AssistantIntentData", "AssistantMessageData", "AssistantMessageDeltaData", + "AssistantMessageServerTools", "AssistantMessageStartData", "AssistantMessageToolRequest", "AssistantMessageToolRequestType", @@ -7491,6 +7630,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "SessionStartData", "SessionTaskCompleteData", "SessionTitleChangedData", + "SessionTodosChangedData", "SessionToolsUpdatedData", "SessionTruncationData", "SessionUsageInfoData", @@ -7553,6 +7693,10 @@ def session_event_to_dict(x: SessionEvent) -> Any: "ToolExecutionPartialResultData", "ToolExecutionProgressData", "ToolExecutionStartData", + "ToolExecutionStartToolDescription", + "ToolExecutionStartToolDescriptionMeta", + "ToolExecutionStartToolDescriptionMetaUI", + "ToolExecutionStartToolDescriptionMetaUIVisibility", "ToolUserRequestedData", "UserInputCompletedData", "UserInputRequestedData", diff --git a/python/e2e/test_builtin_tools_e2e.py b/python/e2e/test_builtin_tools_e2e.py index b8e40b478..64b5c1295 100644 --- a/python/e2e/test_builtin_tools_e2e.py +++ b/python/e2e/test_builtin_tools_e2e.py @@ -47,7 +47,7 @@ async def test_should_capture_stderr_output(self, ctx: E2ETestContext): ) try: message = await session.send_and_wait( - "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. " + "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. " "Reply with just the stderr content.", timeout=SEND_TIMEOUT, ) diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index f52c06651..6dc971717 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -2,6 +2,7 @@ #![allow(clippy::large_enum_variant)] #![allow(dead_code)] +#![allow(rustdoc::invalid_html_tags)] use std::collections::HashMap; @@ -191,6 +192,9 @@ pub mod rpc_methods { pub const SESSION_PLAN_DELETE: &str = "session.plan.delete"; /// `session.plan.readSqlTodos` pub const SESSION_PLAN_READSQLTODOS: &str = "session.plan.readSqlTodos"; + /// `session.plan.readSqlTodosWithDependencies` + pub const SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES: &str = + "session.plan.readSqlTodosWithDependencies"; /// `session.workspaces.getWorkspace` pub const SESSION_WORKSPACES_GETWORKSPACE: &str = "session.workspaces.getWorkspace"; /// `session.workspaces.listFiles` @@ -310,6 +314,8 @@ pub mod rpc_methods { pub const SESSION_PLUGINS_LIST: &str = "session.plugins.list"; /// `session.plugins.reload` pub const SESSION_PLUGINS_RELOAD: &str = "session.plugins.reload"; + /// `session.provider.getEndpoint` + pub const SESSION_PROVIDER_GETENDPOINT: &str = "session.provider.getEndpoint"; /// `session.options.update` pub const SESSION_OPTIONS_UPDATE: &str = "session.options.update"; /// `session.lsp.initialize` @@ -331,6 +337,8 @@ pub mod rpc_methods { pub const SESSION_TOOLS_INITIALIZEANDVALIDATE: &str = "session.tools.initializeAndValidate"; /// `session.tools.getCurrentMetadata` pub const SESSION_TOOLS_GETCURRENTMETADATA: &str = "session.tools.getCurrentMetadata"; + /// `session.tools.updateSubagentSettings` + pub const SESSION_TOOLS_UPDATESUBAGENTSETTINGS: &str = "session.tools.updateSubagentSettings"; /// `session.commands.list` pub const SESSION_COMMANDS_LIST: &str = "session.commands.list"; /// `session.commands.invoke` @@ -1878,6 +1886,9 @@ pub struct SlashCommandInfo { pub kind: SlashCommandKind, /// Canonical command name without a leading slash pub name: String, + /// Whether the command may be the target of `/every` / `/after` schedules. Resolution happens at every tick, so only set this when the command is safe to re-invoke and produces an agent prompt. + #[serde(skip_serializing_if = "Option::is_none")] + pub schedulable: Option, } /// Slash commands available in the session, after applying any include/exclude filters. @@ -2384,14 +2395,14 @@ pub struct ExecuteCommandResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Extension { - /// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper') + /// Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') pub id: String, /// Extension name (directory name) pub name: String, /// Process ID if the extension is running #[serde(skip_serializing_if = "Option::is_none")] pub pid: Option, - /// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) + /// Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state//extensions/) pub source: ExtensionSource, /// Current status: running, disabled, failed, or starting pub status: ExtensionStatus, @@ -4464,6 +4475,21 @@ pub(crate) struct McpUnregisterExternalClientRequest { pub server_name: String, } +/// Memory configuration for this session. +/// +///

+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MemoryConfiguration { + /// Whether memory is enabled for the session. + pub enabled: bool, +} + /// Model identifier and token limits used to compute the context-info breakdown. /// ///
@@ -6674,7 +6700,7 @@ pub struct PlanReadResult { pub path: Option, } -/// Schema for the `PlanSqlTodosRow` type. +/// A single todo row read from the session SQL `todos` table. All fields are optional because the SQL schema is best-effort and the agent may not have populated every column. /// ///
/// @@ -6714,6 +6740,40 @@ pub struct PlanReadSqlTodosResult { pub rows: Vec, } +/// A single dependency edge read from the session SQL `todo_deps` table, indicating that one todo must complete before another. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PlanSqlTodoDependency { + /// ID of the todo it depends on. + pub depends_on: String, + /// ID of the todo that has the dependency. + pub todo_id: String, +} + +/// Todo rows + dependency edges read from the session SQL database. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PlanReadSqlTodosWithDependenciesResult { + /// Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa. + pub dependencies: Vec, + /// Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed. + pub rows: Vec, +} + /// Replacement contents to write to the session plan file. /// ///
@@ -7134,6 +7194,73 @@ pub struct ProviderConfig { pub wire_model: Option, } +/// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ProviderSessionToken { + /// When the token expires, if known. Callers should refresh by calling `getEndpoint` again before this time, or reactively on any 401/403 response from `baseUrl`. + #[serde(skip_serializing_if = "Option::is_none")] + pub expires_at: Option, + /// HTTP header name the token must be sent under. + pub header: String, + /// The model the token is bound to, when applicable. When set, the token is only valid for requests against this model. + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, + /// The short-lived token value. + pub token: String, +} + +/// A snapshot of the provider endpoint the session is currently configured to talk to. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ProviderEndpoint { + /// A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests. + #[serde(skip_serializing_if = "Option::is_none")] + pub api_key: Option, + /// Base URL to pass to the LLM client library. + pub base_url: String, + /// HTTP headers the caller must include on every outbound request. + pub headers: HashMap, + /// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_token: Option, + /// Provider family. Matches the `type` field of a BYOK provider config. + pub r#type: ProviderEndpointType, + /// Wire API to be used, when required for the provider type. + #[serde(skip_serializing_if = "Option::is_none")] + pub wire_api: Option, +} + +/// Optional model identifier to scope the endpoint snapshot to. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ProviderGetEndpointRequest { + /// Model identifier the caller intends to use against the returned endpoint. Used to pick the correct wire shape. Omit to use whichever model the session is currently using. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_id: Option, +} + /// Blob attachment with inline base64-encoded data /// ///
@@ -9111,6 +9238,10 @@ pub struct SessionOpenOptions { /// Denylist of tool names. #[serde(skip_serializing_if = "Option::is_none")] pub excluded_tools: Option>, + /// ExP assignment ('flight') data injected by an SDK integrator, in the same JSON shape the Copilot CLI fetches from the experimentation service (CopilotExpAssignmentResponse). When supplied this is fed into the FeatureFlagService exactly like CLI-fetched assignments and ExP-backed flags wait for it. When absent the session does not block on ExP. + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) exp_assignments: Option, /// Feature-flag values resolved by the host. #[serde(skip_serializing_if = "Option::is_none")] pub feature_flags: Option>, @@ -9129,6 +9260,9 @@ pub struct SessionOpenOptions { /// Identifier sent to LSP-style integrations. #[serde(skip_serializing_if = "Option::is_none")] pub lsp_client_name: Option, + /// Memory configuration for this session. + #[serde(skip_serializing_if = "Option::is_none")] + pub memory: Option, /// Initial model identifier. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, @@ -10640,6 +10774,47 @@ pub struct SlashCommandSelectSubcommandResult { pub title: String, } +/// Subagent model, reasoning effort, and context tier settings +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SubagentSettingsEntry { + /// Context tier override for matching subagents + #[serde(skip_serializing_if = "Option::is_none")] + pub context_tier: Option, + /// Reasoning effort override for matching subagents + #[serde(skip_serializing_if = "Option::is_none")] + pub effort_level: Option, + /// Model override for matching subagents + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, +} + +/// Subagent settings to apply, or null to clear the live session override +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SubagentSettings { + /// Per-agent settings keyed by subagent agent_type + #[serde(skip_serializing_if = "Option::is_none")] + pub agents: Option>, + /// Names of subagents the user has turned off; they cannot be dispatched + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled_subagents: Option>, +} + /// Schema for the `TaskAgentInfo` type. /// ///
@@ -11170,6 +11345,18 @@ pub struct ToolsListRequest { pub model: Option, } +/// Empty result after applying subagent settings +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ToolsUpdateSubagentSettingsResult {} + /// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type. /// ///
@@ -11749,6 +11936,33 @@ pub struct UIUnregisterDirectAutoModeSwitchHandlerResult { pub unregistered: bool, } +/// Configured per-agent subagent overrides +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UpdateSubagentSettingsRequestSubagents { + /// Per-agent settings keyed by subagent agent_type + #[serde(skip_serializing_if = "Option::is_none")] + pub agents: Option>, + /// Names of subagents the user has turned off; they cannot be dispatched + #[serde(skip_serializing_if = "Option::is_none")] + pub disabled_subagents: Option>, +} + +/// Subagent settings to apply to the current session +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct UpdateSubagentSettingsRequest { + /// Subagent settings to apply, or null to clear the live session override + pub subagents: Option, +} + /// Aggregated code change metrics /// ///
@@ -13222,6 +13436,38 @@ pub struct SessionPlanReadSqlTodosResult { pub rows: Vec, } +/// Identifies the target session. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionPlanReadSqlTodosWithDependenciesParams { + /// Target session identifier + pub session_id: SessionId, +} + +/// Todo rows + dependency edges read from the session SQL database. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionPlanReadSqlTodosWithDependenciesResult { + /// Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa. + pub dependencies: Vec, + /// Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed. + pub rows: Vec, +} + /// Identifies the target session. /// ///
@@ -14275,6 +14521,34 @@ pub struct SessionPluginsListResult { pub plugins: Vec, } +/// A snapshot of the provider endpoint the session is currently configured to talk to. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionProviderGetEndpointResult { + /// A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests. + #[serde(skip_serializing_if = "Option::is_none")] + pub api_key: Option, + /// Base URL to pass to the LLM client library. + pub base_url: String, + /// HTTP headers the caller must include on every outbound request. + pub headers: HashMap, + /// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one. + #[serde(skip_serializing_if = "Option::is_none")] + pub session_token: Option, + /// Provider family. Matches the `type` field of a BYOK provider config. + pub r#type: ProviderEndpointType, + /// Wire API to be used, when required for the provider type. + #[serde(skip_serializing_if = "Option::is_none")] + pub wire_api: Option, +} + /// Indicates whether the session options patch was applied successfully. /// ///
@@ -14407,6 +14681,18 @@ pub struct SessionToolsGetCurrentMetadataResult { pub tools: Option>, } +/// Empty result after applying subagent settings +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionToolsUpdateSubagentSettingsResult {} + /// Slash commands available in the session, after applying any include/exclude filters. /// ///
@@ -16430,7 +16716,7 @@ pub enum EventsCursorStatus { Unknown, } -/// Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/) +/// Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state//extensions/) /// ///
/// @@ -16446,6 +16732,12 @@ pub enum ExtensionSource { /// Extension discovered from the user's ~/.copilot/extensions directory. #[serde(rename = "user")] User, + /// Extension contributed by an installed plugin. + #[serde(rename = "plugin")] + Plugin, + /// Extension discovered from the current session's state directory (loaded only for this session). + #[serde(rename = "session")] + Session, /// Unknown variant for forward compatibility. #[default] #[serde(other)] @@ -17853,6 +18145,53 @@ pub enum ProviderConfigWireApi { Unknown, } +/// Provider family. Matches the `type` field of a BYOK provider config. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ProviderEndpointType { + /// OpenAI-compatible endpoint (use the OpenAI client library). + #[serde(rename = "openai")] + Openai, + /// Azure OpenAI endpoint (use the OpenAI client library with the Azure base URL). + #[serde(rename = "azure")] + Azure, + /// Anthropic endpoint (use the Anthropic client library). + #[serde(rename = "anthropic")] + Anthropic, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + +/// Wire API to be used, when required for the provider type. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ProviderEndpointWireApi { + /// Classic chat-completions request shape. + #[serde(rename = "completions")] + Completions, + /// Newer responses request shape. + #[serde(rename = "responses")] + Responses, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Attachment type discriminator #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PushAttachmentBlobType { @@ -18588,6 +18927,31 @@ pub enum SlashCommandInvocationResult { SelectSubcommand(SlashCommandSelectSubcommandResult), } +/// Context tier override for matching subagents +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SubagentSettingsEntryContextTier { + /// Inherit the parent session's effective context tier at dispatch time. + #[serde(rename = "inherit")] + Inherit, + /// Use the model's default context window. + #[serde(rename = "default")] + Default, + /// Pin the subagent to the long-context tier when supported. + #[serde(rename = "long_context")] + LongContext, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Whether task execution is synchronously awaited or managed in the background /// ///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index cd5132f48..22fd08904 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -2209,6 +2209,13 @@ impl<'a> SessionRpc<'a> { } } + /// `session.provider.*` sub-namespace. + pub fn provider(&self) -> SessionRpcProvider<'a> { + SessionRpcProvider { + session: self.session, + } + } + /// `session.queue.*` sub-namespace. pub fn queue(&self) -> SessionRpcQueue<'a> { SessionRpcQueue { @@ -5862,6 +5869,36 @@ impl<'a> SessionRpcPlan<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Reads todo rows AND dependency edges from the session SQL database for structured progress UI. Same defensive behavior as readSqlTodos — returns empty arrays when the database, tables, or columns aren't available. Clients should call this on session start and after every `session.todos_changed` event to refresh structured-UI rendering. + /// + /// Wire method: `session.plan.readSqlTodosWithDependencies`. + /// + /// # Returns + /// + /// Todo rows + dependency edges read from the session SQL database. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn read_sql_todos_with_dependencies( + &self, + ) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.plugins.*` RPCs. @@ -5944,6 +5981,72 @@ impl<'a> SessionRpcPlugins<'a> { } } +/// `session.provider.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcProvider<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcProvider<'a> { + /// Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses. + /// + /// Wire method: `session.provider.getEndpoint`. + /// + /// # Returns + /// + /// A snapshot of the provider endpoint the session is currently configured to talk to. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_endpoint(&self) -> Result { + let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses. + /// + /// Wire method: `session.provider.getEndpoint`. + /// + /// # Parameters + /// + /// * `params` - Optional model identifier to scope the endpoint snapshot to. + /// + /// # Returns + /// + /// A snapshot of the provider endpoint the session is currently configured to talk to. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn get_endpoint_with_params( + &self, + params: ProviderGetEndpointRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + /// `session.queue.*` RPCs. #[derive(Clone, Copy)] pub struct SessionRpcQueue<'a> { @@ -6982,6 +7085,42 @@ impl<'a> SessionRpcTools<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions. + /// + /// Wire method: `session.tools.updateSubagentSettings`. + /// + /// # Parameters + /// + /// * `params` - Subagent settings to apply to the current session + /// + /// # Returns + /// + /// Empty result after applying subagent settings + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn update_subagent_settings( + &self, + params: UpdateSubagentSettingsRequest, + ) -> Result { + let mut wire_params = serde_json::to_value(params)?; + wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TOOLS_UPDATESUBAGENTSETTINGS, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.ui.*` RPCs. diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index e20d7d6ef..92d7fa133 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -39,6 +39,8 @@ pub enum SessionEventType { SessionPermissionsChanged, #[serde(rename = "session.plan_changed")] SessionPlanChanged, + #[serde(rename = "session.todos_changed")] + SessionTodosChanged, #[serde(rename = "session.workspace_file_changed")] SessionWorkspaceFileChanged, #[serde(rename = "session.handoff")] @@ -229,6 +231,8 @@ pub enum SessionEventData { SessionPermissionsChanged(SessionPermissionsChangedData), #[serde(rename = "session.plan_changed")] SessionPlanChanged(SessionPlanChangedData), + #[serde(rename = "session.todos_changed")] + SessionTodosChanged(SessionTodosChangedData), #[serde(rename = "session.workspace_file_changed")] SessionWorkspaceFileChanged(SessionWorkspaceFileChangedData), #[serde(rename = "session.handoff")] @@ -707,6 +711,11 @@ pub struct SessionPlanChangedData { pub operation: PlanChangedOperation, } +/// Session event "session.todos_changed". Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionTodosChangedData {} + /// Session event "session.workspace_file_changed". Workspace file change details including path and operation type #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -1210,6 +1219,28 @@ pub struct AssistantStreamingDeltaData { pub total_response_size_bytes: i64, } +/// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AssistantMessageServerTools { + #[serde(skip_serializing_if = "Option::is_none")] + pub advisor_model: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub function_call_namespaces: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub items: Option>, + pub provider: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub raw_content_blocks: Option>, +} + /// A tool invocation request from the assistant #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -1242,26 +1273,6 @@ pub struct AssistantMessageToolRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantMessageData { - /// Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping - /// - ///
- /// - /// **Experimental.** This type is part of an experimental wire-protocol surface - /// and may change or be removed in future SDK or CLI releases. - /// - ///
- #[serde(skip_serializing_if = "Option::is_none")] - pub anthropic_advisor_blocks: Option>, - /// Anthropic advisor model ID used for this response, for timeline display on replay - /// - ///
- /// - /// **Experimental.** This type is part of an experimental wire-protocol surface - /// and may change or be removed in future SDK or CLI releases. - /// - ///
- #[serde(skip_serializing_if = "Option::is_none")] - pub anthropic_advisor_model: Option, /// Provider's completion / response identifier; shared across all chunks of a single API call. Used to group multi-chunk assistant utterances. #[serde(skip_serializing_if = "Option::is_none")] pub api_call_id: Option, @@ -1298,6 +1309,9 @@ pub struct AssistantMessageData { /// GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs #[serde(skip_serializing_if = "Option::is_none")] pub request_id: Option, + /// Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping + #[serde(skip_serializing_if = "Option::is_none")] + pub server_tools: Option, /// Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation #[serde(skip_serializing_if = "Option::is_none")] pub service_request_id: Option, @@ -1524,6 +1538,41 @@ pub struct ToolUserRequestedData { pub tool_name: String, } +/// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ToolExecutionStartToolDescriptionMetaUI { + /// URI of the UI resource + #[serde(skip_serializing_if = "Option::is_none")] + pub resource_uri: Option, + /// Who can access this tool + #[serde(skip_serializing_if = "Option::is_none")] + pub visibility: Option>, +} + +/// MCP Apps metadata for UI resource association +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ToolExecutionStartToolDescriptionMeta { + /// Schema for the `ToolExecutionStartToolDescriptionMetaUI` type. + #[serde(skip_serializing_if = "Option::is_none")] + pub ui: Option, +} + +/// Tool definition metadata, present for MCP tools with MCP Apps support +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ToolExecutionStartToolDescription { + /// MCP Apps metadata for UI resource association + #[serde(rename = "_meta", skip_serializing_if = "Option::is_none")] + pub meta: Option, + /// Tool description + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Tool name + pub name: String, +} + /// Session event "tool.execution_start". Tool execution startup details including MCP server information when applicable #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -1550,6 +1599,9 @@ pub struct ToolExecutionStartData { pub parent_tool_call_id: Option, /// Unique identifier for this tool call pub tool_call_id: String, + /// Tool definition metadata, present for MCP tools with MCP Apps support + #[serde(skip_serializing_if = "Option::is_none")] + pub tool_description: Option, /// Name of the tool being executed pub tool_name: String, /// Identifier for the agent loop turn this tool was invoked in, matching the corresponding assistant.turn_start event @@ -1930,7 +1982,7 @@ pub struct SkillInvokedData { /// Version of the plugin this skill originated from, when applicable #[serde(skip_serializing_if = "Option::is_none")] pub plugin_version: Option, - /// Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) + /// Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill) #[serde(skip_serializing_if = "Option::is_none")] pub source: Option, /// What triggered the skill invocation: `user-invoked` (explicit user action, such as via a slash command or UI affordance), `agent-invoked` (agent requested the skill), or `context-load` (loaded as part of another context, such as preloading skills configured on a custom agent or subagent) @@ -3206,7 +3258,7 @@ pub struct SessionMcpServerStatusChangedData { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExtensionsLoadedExtension { - /// Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper') + /// Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext') pub id: String, /// Extension name (directory name) pub name: String, @@ -3636,6 +3688,21 @@ pub enum AbortReason { Unknown, } +/// Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum ToolExecutionStartToolDescriptionMetaUIVisibility { + /// Tool is callable by the model (LLM tool surface) + #[serde(rename = "model")] + Model, + /// Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool + #[serde(rename = "app")] + App, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Content block type discriminator #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum ToolExecutionCompleteContentTextType { @@ -4379,6 +4446,12 @@ pub enum ExtensionsLoadedExtensionSource { /// Extension discovered from the user's extension directory. #[serde(rename = "user")] User, + /// Extension contributed by an installed plugin. + #[serde(rename = "plugin")] + Plugin, + /// Extension discovered from the current session's state directory. + #[serde(rename = "session")] + Session, /// Unknown variant for forward compatibility. #[default] #[serde(other)] diff --git a/rust/tests/e2e/builtin_tools.rs b/rust/tests/e2e/builtin_tools.rs index 627d0a9e1..41584d3a0 100644 --- a/rust/tests/e2e/builtin_tools.rs +++ b/rust/tests/e2e/builtin_tools.rs @@ -62,7 +62,7 @@ async fn should_capture_stderr_output() { .expect("create session"); let msg = session - .send_and_wait(message("Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.")) + .send_and_wait(message("Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.")) .await .expect("send") .expect("assistant message"); diff --git a/scripts/codegen/rust.ts b/scripts/codegen/rust.ts index 0d7dd5d77..e8543c5cf 100644 --- a/scripts/codegen/rust.ts +++ b/scripts/codegen/rust.ts @@ -1546,6 +1546,7 @@ function generateApiTypesCode( out.push(""); out.push("#![allow(clippy::large_enum_variant)]"); out.push("#![allow(dead_code)]"); + out.push("#![allow(rustdoc::invalid_html_tags)]"); out.push(""); out.push("use std::collections::HashMap;"); out.push(""); diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index e67890d98..87feab5c6 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.61", + "@github/copilot": "^1.0.62", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -501,32 +501,33 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.61.tgz", - "integrity": "sha512-E4f7YXTL2uUZY/ypnfsUruAeSgrHx3AGYEbm5N0DrpzPqoNAZqV6kHEWM4vu+W/nGvydIfPxmOTqaMEhM8r0Uw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.62.tgz", + "integrity": "sha512-jR2msL2xmLPHvcfnQnIJuaM9oEoL8qcjmsVOkyUrsqBVRGw2HaaFx9yAB4NLR+ub/XrhaIdnV91/4URR59Utbw==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { - "detect-libc": "^2.1.2" + "detect-libc": "^2.1.2", + "os-theme": "^0.0.8" }, "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.61", - "@github/copilot-darwin-x64": "1.0.61", - "@github/copilot-linux-arm64": "1.0.61", - "@github/copilot-linux-x64": "1.0.61", - "@github/copilot-linuxmusl-arm64": "1.0.61", - "@github/copilot-linuxmusl-x64": "1.0.61", - "@github/copilot-win32-arm64": "1.0.61", - "@github/copilot-win32-x64": "1.0.61" + "@github/copilot-darwin-arm64": "1.0.62", + "@github/copilot-darwin-x64": "1.0.62", + "@github/copilot-linux-arm64": "1.0.62", + "@github/copilot-linux-x64": "1.0.62", + "@github/copilot-linuxmusl-arm64": "1.0.62", + "@github/copilot-linuxmusl-x64": "1.0.62", + "@github/copilot-win32-arm64": "1.0.62", + "@github/copilot-win32-x64": "1.0.62" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.61.tgz", - "integrity": "sha512-10prvjHRXB0SD28NsIpzdNDgLquQYUwaH5Ev9KVdIWdBPAvlQsHmQ4JSCyD/UILc/nrrr02CKUgum+mZRKUKIg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.62.tgz", + "integrity": "sha512-ShFS6+O/9SzXT7WelzRnbDo/RWieTnEsACcarfYunbYb5CWbc3VDgpWc6ispn6UbLXFxO5Nj26j6vMlRqYugfA==", "cpu": [ "arm64" ], @@ -541,9 +542,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.61.tgz", - "integrity": "sha512-NXUjageJ3mxDfHtXGYu//XhJ+dhJFYObT4R3jeWgIHhd+4lX7FlC754nwlBP/ZuVhJ3ND22JK9sua9d2F3Cbwg==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.62.tgz", + "integrity": "sha512-6Ne9q04o/bIJyGciFqv0zu+6VftEA9BZahvg9QrBt/tMHxJ1IhY8//0deQlPtFh2hu5gaWp64hBjTBY3ViJkKA==", "cpu": [ "x64" ], @@ -558,9 +559,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.61.tgz", - "integrity": "sha512-dwB2+QSMr622JkePeK56M7YWXsTT/DQzKfpDq8Lk2kmGU052RZAarRmt8gcNm4anofN7pMSrqc3YHj1TM84MFw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.62.tgz", + "integrity": "sha512-PAEU/VyJ/6AUc+p5BfpuKVXUEZhQSZT26hiEf6R2ZxSOAL1BZPXj1BuqniFdBghP7SS2JKh6M5FM7oT0PomKPg==", "cpu": [ "arm64" ], @@ -575,9 +576,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.61.tgz", - "integrity": "sha512-q6n8R8oybvuCmmkP+43w809Wpud/wwRi/fFSZEYJagiNGmYJ00SDkrfJxHbZsAFMpaJC+oTswqzJHjRoZbO74w==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.62.tgz", + "integrity": "sha512-XE+O7a1lyF6fhWrALPuyXARAwvVKSzbH+L1cbQU/BdVgx6TR68B0MMX3ByJTnwjGSzfxxVs2LI6nMrcbTyXhUQ==", "cpu": [ "x64" ], @@ -592,9 +593,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.61.tgz", - "integrity": "sha512-yWo7JXnZS11eJpm68E1RWKMR47EwzPKj3V7GX0EMTd8Fw0T2Aurk9wt9p3c9w0v02nTO1DqJhi68KVWJPdVqvA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.62.tgz", + "integrity": "sha512-kww9Hi75i5BVhzrIgQnA/gz48m7A7aLkzG/ci2cRvuI7gTG3XzX+b93mpNqOcVD4yN1oqWza49rWnElJhjSvvg==", "cpu": [ "arm64" ], @@ -609,9 +610,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.61.tgz", - "integrity": "sha512-nHzx27Ac4B0fpD9CcmvyrGOBEMJ01CPRgVRP0yAl4wpU4cM2I6+9TPyfYThlWDqZqiUKGXC1ZRQ+B8cJREVGmA==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.62.tgz", + "integrity": "sha512-6sC/Uz1OsMltkd0eqg7so5WyejnSxhnu2sY6rfVsn0epJ9wQyMXcjUDSHaY9DobUaF7HpgT3EPzU9Ncs0rByCQ==", "cpu": [ "x64" ], @@ -626,9 +627,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.61.tgz", - "integrity": "sha512-k6knzI+K5HlZeJDS/yeJAfoYD4xcURWfuqunpTCyk1pDbIFxmrLSqR/TDi7KNlpsf883n5WqpnB06K5kysdHHQ==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.62.tgz", + "integrity": "sha512-kPpckuVCEvuXOEW+FNTs4AbF3I3/O8dA+S0wSyehNVzQczJRIpI+SDIGGXzehThw8EM2yf2mkcl9KfFq/ji18Q==", "cpu": [ "arm64" ], @@ -643,9 +644,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.61", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.61.tgz", - "integrity": "sha512-L6NZ6o73VZFHd7OoRaztV3Prh1PbW9HXqYsAx+XywNALQvE1u489WBUC1ggfYBW5MTBCf8mxSkYQdb3Am2omsw==", + "version": "1.0.62", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.62.tgz", + "integrity": "sha512-cpXRdLMPm5dwCvF57NFmsr//Dsiqx5jMHSpzaqX78h4NI9m30v24cXFkXSoOOsCCgoPtO6170sassAlj1WWPNQ==", "cpu": [ "x64" ], @@ -739,6 +740,48 @@ "@emnapi/runtime": "^1.7.1" } }, + "node_modules/@os-theme/darwin-arm64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/darwin-arm64/-/darwin-arm64-0.0.8.tgz", + "integrity": "sha512-gMsOs+8Ju396a5yyMWigkbA0dMTxD78U3HzG3mlpiAyn6hfd5dbyI4VGP+sfTB82KGgWLzIhWWTFX5UYY6iX0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@os-theme/linux-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/linux-x64/-/linux-x64-0.0.8.tgz", + "integrity": "sha512-zvjmBUiSQPjM1RbhpsfCDYMJxW4eLlGmkFPnpteC/03X2lz6CjiX2hfbN2EWLxXjNnIje3Jqaen8IsqEnWrRBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@os-theme/win32-x64": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@os-theme/win32-x64/-/win32-x64-0.0.8.tgz", + "integrity": "sha512-N3yxKNbVl2IBa/ncDuq55QhwqwUjnYLJxDKMEmYeJbLIV950qZNojPw3scXA6PbfxPZfIiRa8iz1pzNg9XxP8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@oxc-project/types": { "version": "0.133.0", "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", @@ -2452,6 +2495,21 @@ } } }, + "node_modules/os-theme": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/os-theme/-/os-theme-0.0.8.tgz", + "integrity": "sha512-u1q3bLSv5uMHNIiPItkfDrHXu6ZFs2juwqxWREFM/uVBa+7Kkhy2v49LmJev2JcinGwqiEccElB/XsH9gwasuA==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "@os-theme/darwin-arm64": "0.0.8", + "@os-theme/linux-x64": "0.0.8", + "@os-theme/win32-x64": "0.0.8" + }, + "peerDependencies": { + "typescript": "^5" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", diff --git a/test/harness/package.json b/test/harness/package.json index 8b7016592..7158860ab 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -14,7 +14,7 @@ "node": "^20.19.0 || >=22.12.0" }, "devDependencies": { - "@github/copilot": "^1.0.61", + "@github/copilot": "^1.0.62", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", diff --git a/test/snapshots/builtin_tools/should_capture_stderr_output.yaml b/test/snapshots/builtin_tools/should_capture_stderr_output.yaml index 32db145ca..0ba318148 100644 --- a/test/snapshots/builtin_tools/should_capture_stderr_output.yaml +++ b/test/snapshots/builtin_tools/should_capture_stderr_output.yaml @@ -5,14 +5,14 @@ conversations: - role: system content: ${system} - role: user - content: Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content. + content: Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content. - role: assistant tool_calls: - id: toolcall_0 type: function function: name: ${shell} - arguments: '{"command":"echo error_msg >&2; echo ok","description":"Run command with stderr output"}' + arguments: '{"command":"echo error_msg >&2; sleep 0.5; echo ok","description":"Running command to capture stderr"}' - role: tool tool_call_id: toolcall_0 content: |-