diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 99ab26061..2bd4910a2 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -708,7 +708,8 @@ public sealed class SessionList } /// Optional filter applied to the returned sessions. -public sealed class SessionsListRequestFilter +[Experimental(Diagnostics.Experimental)] +public sealed class SessionListFilter { /// Match sessions whose context.branch equals this value. [JsonPropertyName("branch")] @@ -733,7 +734,7 @@ internal sealed class SessionsListRequest { /// Optional filter applied to the returned sessions. [JsonPropertyName("filter")] - public SessionsListRequestFilter? Filter { get; set; } + public SessionListFilter? Filter { get; set; } /// When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. [JsonPropertyName("metadataLimit")] @@ -1074,6 +1075,7 @@ internal sealed class SessionsSetAdditionalPluginsRequest } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionSuspendRequest { /// Target session identifier. @@ -1082,6 +1084,7 @@ internal sealed class SessionSuspendRequest } /// Result of sending a user message. +[Experimental(Diagnostics.Experimental)] public sealed class SendResult { /// Unique identifier assigned to the message. @@ -1091,6 +1094,7 @@ public sealed class SendResult /// A user message attachment — a file, directory, code selection, blob, or GitHub reference. /// Polymorphic base type discriminated by type. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -1108,6 +1112,7 @@ public partial class SendAttachment /// Optional line range to scope the attachment to a specific section of the file. +[Experimental(Diagnostics.Experimental)] public sealed class SendAttachmentFileLineRange { /// End line number (1-based, inclusive). @@ -1121,6 +1126,7 @@ public sealed class SendAttachmentFileLineRange /// File attachment. /// The file variant of . +[Experimental(Diagnostics.Experimental)] public partial class SendAttachmentFile : SendAttachment { /// @@ -1143,6 +1149,7 @@ public partial class SendAttachmentFile : SendAttachment /// Directory attachment. /// The directory variant of . +[Experimental(Diagnostics.Experimental)] public partial class SendAttachmentDirectory : SendAttachment { /// @@ -1159,6 +1166,7 @@ public partial class SendAttachmentDirectory : SendAttachment } /// End position of the selection. +[Experimental(Diagnostics.Experimental)] public sealed class SendAttachmentSelectionDetailsEnd { /// End character offset within the line (0-based). @@ -1171,6 +1179,7 @@ public sealed class SendAttachmentSelectionDetailsEnd } /// Start position of the selection. +[Experimental(Diagnostics.Experimental)] public sealed class SendAttachmentSelectionDetailsStart { /// Start character offset within the line (0-based). @@ -1183,6 +1192,7 @@ public sealed class SendAttachmentSelectionDetailsStart } /// Position range of the selection within the file. +[Experimental(Diagnostics.Experimental)] public sealed class SendAttachmentSelectionDetails { /// End position of the selection. @@ -1196,6 +1206,7 @@ public sealed class SendAttachmentSelectionDetails /// Code selection attachment from an editor. /// The selection variant of . +[Experimental(Diagnostics.Experimental)] public partial class SendAttachmentSelection : SendAttachment { /// @@ -1221,6 +1232,7 @@ public partial class SendAttachmentSelection : SendAttachment /// GitHub issue, pull request, or discussion reference. /// The github_reference variant of . +[Experimental(Diagnostics.Experimental)] public partial class SendAttachmentGithubReference : SendAttachment { /// @@ -1252,6 +1264,7 @@ public partial class SendAttachmentGithubReference : SendAttachment /// Blob attachment with inline base64-encoded data. /// The blob variant of . +[Experimental(Diagnostics.Experimental)] public partial class SendAttachmentBlob : SendAttachment { /// @@ -1274,6 +1287,7 @@ public partial class SendAttachmentBlob : SendAttachment } /// Parameters for sending a user message to the session. +[Experimental(Diagnostics.Experimental)] internal sealed class SendRequest { /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. @@ -1334,6 +1348,7 @@ internal sealed class SendRequest } /// Result of aborting the current turn. +[Experimental(Diagnostics.Experimental)] public sealed class AbortResult { /// Error message if the abort failed. @@ -1346,6 +1361,7 @@ public sealed class AbortResult } /// Parameters for aborting the current turn. +[Experimental(Diagnostics.Experimental)] internal sealed class AbortRequest { /// Finite reason code describing why the current turn was aborted. @@ -1358,6 +1374,7 @@ internal sealed class AbortRequest } /// Parameters for shutting down the session. +[Experimental(Diagnostics.Experimental)] internal sealed class ShutdownRequest { /// Optional human-readable reason. Typically the message of the error that triggered shutdown when type is 'error'. @@ -1374,6 +1391,7 @@ internal sealed class ShutdownRequest } /// Identifier of the session event that was emitted for the log message. +[Experimental(Diagnostics.Experimental)] public sealed class LogResult { /// The unique identifier of the emitted session event. @@ -1382,6 +1400,7 @@ public sealed class LogResult } /// Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. +[Experimental(Diagnostics.Experimental)] internal sealed class LogRequest { /// When true, the message is transient and not persisted to the session event log on disk. @@ -1416,6 +1435,7 @@ internal sealed class LogRequest } /// Authentication status and account metadata for the session. +[Experimental(Diagnostics.Experimental)] public sealed class SessionAuthStatus { /// Authentication type. @@ -1446,6 +1466,7 @@ public sealed class SessionAuthStatus } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionAuthGetStatusRequest { /// Target session identifier. @@ -1454,6 +1475,7 @@ internal sealed class SessionAuthGetStatusRequest } /// Indicates whether the credential update succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class SessionSetCredentialsResult { /// Whether the operation succeeded. @@ -1463,6 +1485,7 @@ public sealed class SessionSetCredentialsResult /// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. /// Polymorphic base type discriminated by type. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -1482,6 +1505,7 @@ public partial class AuthInfo /// Schema for the `CopilotUserResponseEndpoints` type. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseEndpoints { /// Gets or sets the api value. @@ -1514,6 +1538,7 @@ public sealed class CopilotUserResponseOrganizationListItem } /// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsChat { /// Gets or sets the entitlement value. @@ -1566,6 +1591,7 @@ public sealed class CopilotUserResponseQuotaSnapshotsChat } /// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsCompletions { /// Gets or sets the entitlement value. @@ -1618,6 +1644,7 @@ public sealed class CopilotUserResponseQuotaSnapshotsCompletions } /// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshotsPremiumInteractions { /// Gets or sets the entitlement value. @@ -1670,6 +1697,7 @@ public sealed class CopilotUserResponseQuotaSnapshotsPremiumInteractions } /// Schema for the `CopilotUserResponseQuotaSnapshots` type. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponseQuotaSnapshots { /// Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. @@ -1686,6 +1714,7 @@ public sealed class CopilotUserResponseQuotaSnapshots } /// Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. +[Experimental(Diagnostics.Experimental)] public sealed class CopilotUserResponse { /// Gets or sets the access_type_sku value. @@ -1783,6 +1812,7 @@ public sealed class CopilotUserResponse /// Schema for the `HMACAuthInfo` type. /// The hmac variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoHmac : AuthInfo { /// @@ -1805,6 +1835,7 @@ public partial class AuthInfoHmac : AuthInfo /// Schema for the `EnvAuthInfo` type. /// The env variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoEnv : AuthInfo { /// @@ -1836,6 +1867,7 @@ public partial class AuthInfoEnv : AuthInfo /// Schema for the `TokenAuthInfo` type. /// The token variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoToken : AuthInfo { /// @@ -1858,6 +1890,7 @@ public partial class AuthInfoToken : AuthInfo /// Schema for the `CopilotApiTokenAuthInfo` type. /// The copilot-api-token variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoCopilotApiToken : AuthInfo { /// @@ -1876,6 +1909,7 @@ public partial class AuthInfoCopilotApiToken : AuthInfo /// Schema for the `UserAuthInfo` type. /// The user variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoUser : AuthInfo { /// @@ -1898,6 +1932,7 @@ public partial class AuthInfoUser : AuthInfo /// Schema for the `GhCliAuthInfo` type. /// The gh-cli variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoGhCli : AuthInfo { /// @@ -1924,6 +1959,7 @@ public partial class AuthInfoGhCli : AuthInfo /// Schema for the `ApiKeyAuthInfo` type. /// The api-key variant of . +[Experimental(Diagnostics.Experimental)] public partial class AuthInfoApiKey : AuthInfo { /// @@ -1945,6 +1981,7 @@ public partial class AuthInfoApiKey : AuthInfo } /// New auth credentials to install on the session. Omit to leave credentials unchanged. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionSetCredentialsParams { /// The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. @@ -1957,6 +1994,7 @@ internal sealed class SessionSetCredentialsParams } /// The currently selected model and reasoning effort for the session. +[Experimental(Diagnostics.Experimental)] public sealed class CurrentModel { /// Currently active model identifier. @@ -1969,6 +2007,7 @@ public sealed class CurrentModel } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionModelGetCurrentRequest { /// Target session identifier. @@ -1977,6 +2016,7 @@ internal sealed class SessionModelGetCurrentRequest } /// The model identifier active on the session after the switch. +[Experimental(Diagnostics.Experimental)] public sealed class ModelSwitchToResult { /// Currently active model identifier after the switch. @@ -1985,6 +2025,7 @@ public sealed class ModelSwitchToResult } /// Vision-specific limits. +[Experimental(Diagnostics.Experimental)] public sealed class ModelCapabilitiesOverrideLimitsVision { /// Maximum image size in bytes. @@ -2001,6 +2042,7 @@ public sealed class ModelCapabilitiesOverrideLimitsVision } /// Token limits for prompts, outputs, and context window. +[Experimental(Diagnostics.Experimental)] public sealed class ModelCapabilitiesOverrideLimits { /// Maximum total context window size in tokens. @@ -2021,6 +2063,7 @@ public sealed class ModelCapabilitiesOverrideLimits } /// Feature flags indicating what the model supports. +[Experimental(Diagnostics.Experimental)] public sealed class ModelCapabilitiesOverrideSupports { /// Whether this model supports reasoning effort configuration. @@ -2033,6 +2076,7 @@ public sealed class ModelCapabilitiesOverrideSupports } /// Override individual model capabilities resolved by the runtime. +[Experimental(Diagnostics.Experimental)] public sealed class ModelCapabilitiesOverride { /// Token limits for prompts, outputs, and context window. @@ -2045,6 +2089,7 @@ public sealed class ModelCapabilitiesOverride } /// Target model identifier and optional reasoning effort, summary, and capability overrides. +[Experimental(Diagnostics.Experimental)] internal sealed class ModelSwitchToRequest { /// Override individual model capabilities resolved by the runtime. @@ -2069,6 +2114,7 @@ internal sealed class ModelSwitchToRequest } /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. +[Experimental(Diagnostics.Experimental)] public sealed class ModelSetReasoningEffortResult { /// Reasoning effort level recorded on the session after the update. @@ -2077,6 +2123,7 @@ public sealed class ModelSetReasoningEffortResult } /// Reasoning effort level to apply to the currently selected model. +[Experimental(Diagnostics.Experimental)] internal sealed class ModelSetReasoningEffortRequest { /// Reasoning effort level to apply to the currently selected model. The host is responsible for validating the value against the model's supported levels before calling. @@ -2089,6 +2136,7 @@ internal sealed class ModelSetReasoningEffortRequest } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionModeGetRequest { /// Target session identifier. @@ -2097,6 +2145,7 @@ internal sealed class SessionModeGetRequest } /// Agent interaction mode to apply to the session. +[Experimental(Diagnostics.Experimental)] internal sealed class ModeSetRequest { /// The session mode the agent is operating in. @@ -2109,6 +2158,7 @@ internal sealed class ModeSetRequest } /// The session's friendly name, or null when not yet set. +[Experimental(Diagnostics.Experimental)] public sealed class NameGetResult { /// The session name (user-set or auto-generated), or null if not yet set. @@ -2117,6 +2167,7 @@ public sealed class NameGetResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionNameGetRequest { /// Target session identifier. @@ -2125,6 +2176,7 @@ internal sealed class SessionNameGetRequest } /// New friendly name to apply to the session. +[Experimental(Diagnostics.Experimental)] internal sealed class NameSetRequest { /// New session name (1–100 characters, trimmed of leading/trailing whitespace). @@ -2140,6 +2192,7 @@ internal sealed class NameSetRequest } /// Indicates whether the auto-generated summary was applied as the session's name. +[Experimental(Diagnostics.Experimental)] public sealed class NameSetAutoResult { /// Whether the auto-generated summary was persisted. False if the session already has a user-set name, the summary normalized to empty, or the session does not have a workspace. @@ -2148,6 +2201,7 @@ public sealed class NameSetAutoResult } /// Auto-generated session summary to apply as the session's name when no user-set name exists. +[Experimental(Diagnostics.Experimental)] internal sealed class NameSetAutoRequest { /// Target session identifier. @@ -2160,6 +2214,7 @@ internal sealed class NameSetAutoRequest } /// Existence, contents, and resolved path of the session plan file. +[Experimental(Diagnostics.Experimental)] public sealed class PlanReadResult { /// The content of the plan file, or null if it does not exist. @@ -2176,6 +2231,7 @@ public sealed class PlanReadResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionPlanReadRequest { /// Target session identifier. @@ -2184,6 +2240,7 @@ internal sealed class SessionPlanReadRequest } /// Replacement contents to write to the session plan file. +[Experimental(Diagnostics.Experimental)] internal sealed class PlanUpdateRequest { /// The new content for the plan file. @@ -2196,6 +2253,7 @@ internal sealed class PlanUpdateRequest } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionPlanDeleteRequest { /// Target session identifier. @@ -2226,13 +2284,15 @@ public sealed class WorkspacesGetWorkspaceResultWorkspace [JsonPropertyName("git_root")] public string? GitRoot { get; set; } - /// Gets or sets the host_type value. + /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. [JsonPropertyName("host_type")] - public WorkspacesGetWorkspaceResultWorkspaceHostType? HostType { get; set; } + public WorkspacesWorkspaceDetailsHostType? HostType { get; set; } /// Gets or sets the id value. + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")] + [MinLength(1)] [JsonPropertyName("id")] - public Guid Id { get; set; } + public string Id { get; set; } = string.Empty; /// Gets or sets the mc_last_event_id value. [JsonPropertyName("mc_last_event_id")] @@ -2272,6 +2332,7 @@ public sealed class WorkspacesGetWorkspaceResultWorkspace } /// Current workspace metadata for the session, including its absolute filesystem path when available. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesGetWorkspaceResult { /// Absolute filesystem path to the workspace directory. Omitted when the session has no workspace (e.g. remote sessions). @@ -2284,6 +2345,7 @@ public sealed class WorkspacesGetWorkspaceResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionWorkspacesGetWorkspaceRequest { /// Target session identifier. @@ -2292,6 +2354,7 @@ internal sealed class SessionWorkspacesGetWorkspaceRequest } /// Relative paths of files stored in the session workspace files directory. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesListFilesResult { /// Relative file paths in the workspace files directory. @@ -2300,6 +2363,7 @@ public sealed class WorkspacesListFilesResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionWorkspacesListFilesRequest { /// Target session identifier. @@ -2308,6 +2372,7 @@ internal sealed class SessionWorkspacesListFilesRequest } /// Contents of the requested workspace file as a UTF-8 string. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesReadFileResult { /// File content as a UTF-8 string. @@ -2316,6 +2381,7 @@ public sealed class WorkspacesReadFileResult } /// Relative path of the workspace file to read. +[Experimental(Diagnostics.Experimental)] internal sealed class WorkspacesReadFileRequest { /// Relative path within the workspace files directory. @@ -2328,6 +2394,7 @@ internal sealed class WorkspacesReadFileRequest } /// Relative path and UTF-8 content for the workspace file to create or overwrite. +[Experimental(Diagnostics.Experimental)] internal sealed class WorkspacesCreateFileRequest { /// File content to write as a UTF-8 string. @@ -2344,6 +2411,7 @@ internal sealed class WorkspacesCreateFileRequest } /// Schema for the `WorkspacesCheckpoints` type. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesCheckpoints { /// Filename of the checkpoint within the workspace checkpoints directory. @@ -2360,6 +2428,7 @@ public sealed class WorkspacesCheckpoints } /// Workspace checkpoints in chronological order; empty when the workspace is not enabled. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesListCheckpointsResult { /// Workspace checkpoints in chronological order. Empty when workspace is not enabled. @@ -2368,6 +2437,7 @@ public sealed class WorkspacesListCheckpointsResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionWorkspacesListCheckpointsRequest { /// Target session identifier. @@ -2376,6 +2446,7 @@ internal sealed class SessionWorkspacesListCheckpointsRequest } /// Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesReadCheckpointResult { /// Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. @@ -2384,6 +2455,7 @@ public sealed class WorkspacesReadCheckpointResult } /// Checkpoint number to read. +[Experimental(Diagnostics.Experimental)] internal sealed class WorkspacesReadCheckpointRequest { /// Checkpoint number to read. @@ -2412,6 +2484,7 @@ public sealed class WorkspacesSaveLargePasteResultSaved } /// Descriptor for the saved paste file, or null when the workspace is unavailable. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesSaveLargePasteResult { /// Saved-paste descriptor, or null when the workspace is unavailable (e.g. CCA runtime, non-infinite sessions, remote sessions). @@ -2420,6 +2493,7 @@ public sealed class WorkspacesSaveLargePasteResult } /// Pasted content to save as a UTF-8 file in the session workspace. +[Experimental(Diagnostics.Experimental)] internal sealed class WorkspacesSaveLargePasteRequest { /// Pasted content to save as a UTF-8 file. @@ -2432,6 +2506,7 @@ internal sealed class WorkspacesSaveLargePasteRequest } /// Schema for the `InstructionsSources` type. +[Experimental(Diagnostics.Experimental)] public sealed class InstructionsSources { /// Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files. @@ -2472,6 +2547,7 @@ public sealed class InstructionsSources } /// Instruction sources loaded for the session, in merge order. +[Experimental(Diagnostics.Experimental)] public sealed class InstructionsGetSourcesResult { /// Instruction sources for the session. @@ -2480,6 +2556,7 @@ public sealed class InstructionsGetSourcesResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionInstructionsGetSourcesRequest { /// Target session identifier. @@ -2893,13 +2970,76 @@ internal sealed class SessionTasksWaitForPendingRequest public string SessionId { get; set; } = string.Empty; } +/// Polymorphic base type discriminated by type. +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "type", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(TasksGetProgressResultProgressAgent), "agent")] +[JsonDerivedType(typeof(TasksGetProgressResultProgressShell), "shell")] +public partial class TasksGetProgressResultProgress +{ + /// The type discriminator. + [JsonPropertyName("type")] + public virtual string Type { get; set; } = string.Empty; +} + + +/// Schema for the `TaskProgressLine` type. +[Experimental(Diagnostics.Experimental)] +public sealed class TaskProgressLine +{ + /// Display message, e.g., "▸ bash", "✓ edit src/foo.ts". + [JsonPropertyName("message")] + public string Message { get; set; } = string.Empty; + + /// ISO 8601 timestamp when this event occurred. + [JsonPropertyName("timestamp")] + public DateTimeOffset Timestamp { get; set; } +} + +/// Schema for the `TaskAgentProgress` type. +/// The agent variant of . +public partial class TasksGetProgressResultProgressAgent : TasksGetProgressResultProgress +{ + /// + [JsonIgnore] + public override string Type => "agent"; + + /// The most recent intent reported by the agent. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("latestIntent")] + public string? LatestIntent { get; set; } + + /// Recent tool execution events converted to display lines. + [JsonPropertyName("recentActivity")] + public required IList RecentActivity { get; set; } +} + +/// Schema for the `TaskShellProgress` type. +/// The shell variant of . +public partial class TasksGetProgressResultProgressShell : TasksGetProgressResultProgress +{ + /// + [JsonIgnore] + public override string Type => "shell"; + + /// Process ID when available. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("pid")] + public long? Pid { get; set; } + + /// Recent stdout/stderr lines from the running shell command. + [JsonPropertyName("recentOutput")] + public required string RecentOutput { get; set; } +} + /// Progress information for the task, or null when no task with that ID is tracked. [Experimental(Diagnostics.Experimental)] public sealed class TasksGetProgressResult { /// Progress information for the task, discriminated by type. Returns null when no task with this ID is currently tracked. [JsonPropertyName("progress")] - public object? Progress { get; set; } + public TasksGetProgressResultProgress? Progress { get; set; } } /// Identifier of the background task to fetch progress for. @@ -3774,6 +3914,7 @@ internal sealed class SessionExtensionsReloadRequest } /// Indicates whether the external tool call result was handled successfully. +[Experimental(Diagnostics.Experimental)] public sealed class HandlePendingToolCallResult { /// Whether the tool call result was handled successfully. @@ -3782,6 +3923,7 @@ public sealed class HandlePendingToolCallResult } /// Pending external tool call request ID, with the tool result or an error describing why it failed. +[Experimental(Diagnostics.Experimental)] internal sealed class HandlePendingToolCallRequest { /// Error message if the tool call failed. @@ -3802,11 +3944,13 @@ internal sealed class HandlePendingToolCallRequest } /// Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation. +[Experimental(Diagnostics.Experimental)] public sealed class ToolsInitializeAndValidateResult { } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionToolsInitializeAndValidateRequest { /// Target session identifier. @@ -3815,6 +3959,7 @@ internal sealed class SessionToolsInitializeAndValidateRequest } /// Optional unstructured input hint. +[Experimental(Diagnostics.Experimental)] public sealed class SlashCommandInput { /// Optional completion hint for the input (e.g. 'directory' for filesystem path completion). @@ -3835,6 +3980,7 @@ public sealed class SlashCommandInput } /// Schema for the `SlashCommandInfo` type. +[Experimental(Diagnostics.Experimental)] public sealed class SlashCommandInfo { /// Canonical aliases without leading slashes. @@ -3867,6 +4013,7 @@ public sealed class SlashCommandInfo } /// Slash commands available in the session, after applying any include/exclude filters. +[Experimental(Diagnostics.Experimental)] public sealed class CommandList { /// Commands available in this session. @@ -3875,6 +4022,7 @@ public sealed class CommandList } /// Optional filters controlling which command sources to include in the listing. +[Experimental(Diagnostics.Experimental)] public sealed class CommandsListRequest { /// Include runtime built-in commands. @@ -3891,6 +4039,7 @@ public sealed class CommandsListRequest } /// Optional filters controlling which command sources to include in the listing. +[Experimental(Diagnostics.Experimental)] internal sealed class CommandsListRequestWithSession { /// Include runtime built-in commands. @@ -3912,6 +4061,7 @@ internal sealed class CommandsListRequestWithSession /// Result of invoking the slash command (text output, prompt to send to the agent, or completion). /// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -3929,6 +4079,7 @@ public partial class SlashCommandInvocationResult /// Schema for the `SlashCommandTextResult` type. /// The text variant of . +[Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultText : SlashCommandInvocationResult { /// @@ -3957,6 +4108,7 @@ public partial class SlashCommandInvocationResultText : SlashCommandInvocationRe /// Schema for the `SlashCommandAgentPromptResult` type. /// The agent-prompt variant of . +[Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvocationResult { /// @@ -3984,6 +4136,7 @@ public partial class SlashCommandInvocationResultAgentPrompt : SlashCommandInvoc /// Schema for the `SlashCommandCompletedResult` type. /// The completed variant of . +[Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocationResult { /// @@ -4002,6 +4155,7 @@ public partial class SlashCommandInvocationResultCompleted : SlashCommandInvocat } /// Schema for the `SlashCommandSelectSubcommandOption` type. +[Experimental(Diagnostics.Experimental)] public sealed class SlashCommandSelectSubcommandOption { /// Human-readable description of the subcommand. @@ -4019,6 +4173,7 @@ public sealed class SlashCommandSelectSubcommandOption /// Schema for the `SlashCommandSelectSubcommandResult` type. /// The select-subcommand variant of . +[Experimental(Diagnostics.Experimental)] public partial class SlashCommandInvocationResultSelectSubcommand : SlashCommandInvocationResult { /// @@ -4044,6 +4199,7 @@ public partial class SlashCommandInvocationResultSelectSubcommand : SlashCommand } /// Slash command name and optional raw input string to invoke. +[Experimental(Diagnostics.Experimental)] internal sealed class CommandsInvokeRequest { /// Raw input after the command name. @@ -4060,6 +4216,7 @@ internal sealed class CommandsInvokeRequest } /// Indicates whether the pending client-handled command was completed successfully. +[Experimental(Diagnostics.Experimental)] public sealed class CommandsHandlePendingCommandResult { /// Whether the command was handled successfully. @@ -4068,6 +4225,7 @@ public sealed class CommandsHandlePendingCommandResult } /// Pending command request ID and an optional error if the client handler failed. +[Experimental(Diagnostics.Experimental)] internal sealed class CommandsHandlePendingCommandRequest { /// Error message if the command handler failed. @@ -4084,6 +4242,7 @@ internal sealed class CommandsHandlePendingCommandRequest } /// Error message produced while executing the command, if any. +[Experimental(Diagnostics.Experimental)] public sealed class ExecuteCommandResult { /// Error message produced while executing the command, if any. Omitted when the handler succeeded. @@ -4092,6 +4251,7 @@ public sealed class ExecuteCommandResult } /// Slash command name and argument string to execute synchronously. +[Experimental(Diagnostics.Experimental)] internal sealed class ExecuteCommandParams { /// Argument string to pass to the command (empty string if none). @@ -4108,6 +4268,7 @@ internal sealed class ExecuteCommandParams } /// Indicates whether the command was accepted into the local execution queue. +[Experimental(Diagnostics.Experimental)] public sealed class EnqueueCommandResult { /// True when the command was accepted into the local execution queue. False when the call targets a session that does not support local command queueing (e.g. remote sessions). @@ -4116,6 +4277,7 @@ public sealed class EnqueueCommandResult } /// Slash-prefixed command string to enqueue for FIFO processing. +[Experimental(Diagnostics.Experimental)] internal sealed class EnqueueCommandParams { /// Slash-prefixed command string to enqueue, e.g. '/compact' or '/model gpt-4'. Queued FIFO with any in-flight items; if the session is idle, processing kicks off immediately. @@ -4128,6 +4290,7 @@ internal sealed class EnqueueCommandParams } /// Indicates whether the queued-command response was matched to a pending request. +[Experimental(Diagnostics.Experimental)] public sealed class CommandsRespondToQueuedCommandResult { /// Whether a pending queued command with the given request ID was found and resolved. False when the request was already resolved, cancelled, or unknown. @@ -4137,6 +4300,7 @@ public sealed class CommandsRespondToQueuedCommandResult /// Result of the queued command execution. /// Data type discriminated by handled. +[Experimental(Diagnostics.Experimental)] public partial class QueuedCommandResult { /// The boolean discriminator. @@ -4150,6 +4314,7 @@ public partial class QueuedCommandResult } /// Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands). +[Experimental(Diagnostics.Experimental)] internal sealed class CommandsRespondToQueuedCommandRequest { /// Request ID from the `command.queued` event the host is responding to. @@ -4179,6 +4344,7 @@ internal sealed class TelemetrySetFeatureOverridesRequest } /// The elicitation response (accept with form values, decline, or cancel). +[Experimental(Diagnostics.Experimental)] public sealed class UIElicitationResponse { /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed). @@ -4191,6 +4357,7 @@ public sealed class UIElicitationResponse } /// JSON Schema describing the form fields to present to the user. +[Experimental(Diagnostics.Experimental)] public sealed class UIElicitationSchema { /// Form field definitions, keyed by field name. @@ -4207,6 +4374,7 @@ public sealed class UIElicitationSchema } /// Prompt message and JSON schema describing the form fields to elicit from the user. +[Experimental(Diagnostics.Experimental)] internal sealed class UIElicitationRequest { /// Message describing what information is needed from the user. @@ -4223,6 +4391,7 @@ internal sealed class UIElicitationRequest } /// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. +[Experimental(Diagnostics.Experimental)] public sealed class UIElicitationResult { /// Whether the response was accepted. False if the request was already resolved by another client. @@ -4231,6 +4400,7 @@ public sealed class UIElicitationResult } /// Pending elicitation request ID and the user's response (accept/decline/cancel + form values). +[Experimental(Diagnostics.Experimental)] internal sealed class UIHandlePendingElicitationRequest { /// The unique request ID from the elicitation.requested event. @@ -4247,6 +4417,7 @@ internal sealed class UIHandlePendingElicitationRequest } /// Indicates whether the pending UI request was resolved by this call. +[Experimental(Diagnostics.Experimental)] public sealed class UIHandlePendingResult { /// True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. @@ -4255,6 +4426,7 @@ public sealed class UIHandlePendingResult } /// Schema for the `UIUserInputResponse` type. +[Experimental(Diagnostics.Experimental)] public sealed class UIUserInputResponse { /// The user's answer text. @@ -4267,6 +4439,7 @@ public sealed class UIUserInputResponse } /// Request ID of a pending `user_input.requested` event and the user's response. +[Experimental(Diagnostics.Experimental)] internal sealed class UIHandlePendingUserInputRequest { /// The unique request ID from the user_input.requested event. @@ -4283,11 +4456,13 @@ internal sealed class UIHandlePendingUserInputRequest } /// Optional sampling result payload. Omit to reject/cancel the sampling request without providing a result. +[Experimental(Diagnostics.Experimental)] public sealed class UIHandlePendingSamplingResponse { } /// Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). +[Experimental(Diagnostics.Experimental)] internal sealed class UIHandlePendingSamplingRequest { /// The unique request ID from the sampling.requested event. @@ -4304,6 +4479,7 @@ internal sealed class UIHandlePendingSamplingRequest } /// Request ID of a pending `auto_mode_switch.requested` event and the user's response. +[Experimental(Diagnostics.Experimental)] internal sealed class UIHandlePendingAutoModeSwitchRequest { /// The unique request ID from the auto_mode_switch.requested event. @@ -4320,6 +4496,7 @@ internal sealed class UIHandlePendingAutoModeSwitchRequest } /// Schema for the `UIExitPlanModeResponse` type. +[Experimental(Diagnostics.Experimental)] public sealed class UIExitPlanModeResponse { /// Whether the plan was approved. @@ -4340,6 +4517,7 @@ public sealed class UIExitPlanModeResponse } /// Request ID of a pending `exit_plan_mode.requested` event and the user's response. +[Experimental(Diagnostics.Experimental)] internal sealed class UIHandlePendingExitPlanModeRequest { /// The unique request ID from the exit_plan_mode.requested event. @@ -4356,6 +4534,7 @@ internal sealed class UIHandlePendingExitPlanModeRequest } /// Register an in-process handler for `auto_mode_switch.requested` events. The caller still attaches the actual listener via the standard event-subscription mechanism; this registration solely tells the server bridge to skip its own dispatch (so a remote client doesn't race the in-process handler for the same requestId). +[Experimental(Diagnostics.Experimental)] public sealed class UIRegisterDirectAutoModeSwitchHandlerResult { /// Opaque handle representing the registration. Pass this same handle to `unregisterDirectAutoModeSwitchHandler` when the in-process handler is no longer active. Multiple registrations are reference-counted; the server bridge will only dispatch auto-mode-switch requests when no handles are active. @@ -4364,6 +4543,7 @@ public sealed class UIRegisterDirectAutoModeSwitchHandlerResult } /// Identifies the target session. +[Experimental(Diagnostics.Experimental)] internal sealed class SessionUiRegisterDirectAutoModeSwitchHandlerRequest { /// Target session identifier. @@ -4372,6 +4552,7 @@ internal sealed class SessionUiRegisterDirectAutoModeSwitchHandlerRequest } /// Indicates whether the handle was active and the registration count was decremented. +[Experimental(Diagnostics.Experimental)] public sealed class UIUnregisterDirectAutoModeSwitchHandlerResult { /// True if the handle was active and decremented the counter; false if the handle was unknown. @@ -4380,6 +4561,7 @@ public sealed class UIUnregisterDirectAutoModeSwitchHandlerResult } /// Opaque handle previously returned by `registerDirectAutoModeSwitchHandler` to release. +[Experimental(Diagnostics.Experimental)] internal sealed class UIUnregisterDirectAutoModeSwitchHandlerRequest { /// Handle previously returned by `registerDirectAutoModeSwitchHandler`. @@ -4392,6 +4574,7 @@ internal sealed class UIUnregisterDirectAutoModeSwitchHandlerRequest } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureResult { /// Whether the operation succeeded. @@ -4400,6 +4583,7 @@ public sealed class PermissionsConfigureResult } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { /// Gets or sets the name value. @@ -4412,6 +4596,7 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRuleSour } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule { /// Gets or sets the ifAnyMatch value. @@ -4432,6 +4617,7 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicyRule } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsConfigureAdditionalContentExclusionPolicy { /// Gets or sets the last_updated_at value. @@ -4448,6 +4634,7 @@ public sealed class PermissionsConfigureAdditionalContentExclusionPolicy } /// If specified, replaces the session's path-permission policy. The runtime constructs the appropriate PathManager based on these inputs (rooted at the session's working directory). Omit to leave the current path policy unchanged. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionPathsConfig { /// Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). @@ -4468,6 +4655,7 @@ public sealed class PermissionPathsConfig } /// If specified, replaces the session's approved/denied permission rules. Omit to leave the current rules unchanged. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionRulesSet { /// Rules that auto-approve matching requests. @@ -4480,6 +4668,7 @@ public sealed class PermissionRulesSet } /// If specified, replaces the session's URL-permission policy. The runtime constructs a fresh DefaultUrlManager based on these inputs. Omit to leave the current URL policy unchanged. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionUrlsConfig { /// Initial list of allowed URL/domain patterns. Patterns may include path components. Ignored when `unrestricted` is true. @@ -4492,6 +4681,7 @@ public sealed class PermissionUrlsConfig } /// Patch of permission policy fields to apply (omit a field to leave it unchanged). +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsConfigureParams { /// If specified, replaces the host-supplied GitHub Content Exclusion policies on the session (combined with natively-discovered policies when evaluating tool/file access). Omit to leave the current policies unchanged. @@ -4524,6 +4714,7 @@ internal sealed class PermissionsConfigureParams } /// Indicates whether the permission decision was applied; false when the request was already resolved. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionRequestResult { /// Whether the permission request was handled successfully. @@ -4533,6 +4724,7 @@ public sealed class PermissionRequestResult /// The client's response to the pending permission prompt. /// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -4561,6 +4753,7 @@ public partial class PermissionDecision /// Schema for the `PermissionDecisionApproveOnce` type. /// The approve-once variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveOnce : PermissionDecision { /// @@ -4570,6 +4763,7 @@ public partial class PermissionDecisionApproveOnce : PermissionDecision /// Session-scoped approval to remember (tool prompts only; omitted for path/url prompts). /// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -4592,6 +4786,7 @@ public partial class PermissionDecisionApproveForSessionApproval /// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type. /// The commands variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalCommands : PermissionDecisionApproveForSessionApproval { /// @@ -4605,6 +4800,7 @@ public partial class PermissionDecisionApproveForSessionApprovalCommands : Permi /// Schema for the `PermissionDecisionApproveForSessionApprovalRead` type. /// The read variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalRead : PermissionDecisionApproveForSessionApproval { /// @@ -4614,6 +4810,7 @@ public partial class PermissionDecisionApproveForSessionApprovalRead : Permissio /// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type. /// The write variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalWrite : PermissionDecisionApproveForSessionApproval { /// @@ -4623,6 +4820,7 @@ public partial class PermissionDecisionApproveForSessionApprovalWrite : Permissi /// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type. /// The mcp variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMcp : PermissionDecisionApproveForSessionApproval { /// @@ -4640,6 +4838,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMcp : Permission /// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type. /// The mcp-sampling variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMcpSampling : PermissionDecisionApproveForSessionApproval { /// @@ -4653,6 +4852,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMcpSampling : Pe /// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type. /// The memory variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalMemory : PermissionDecisionApproveForSessionApproval { /// @@ -4662,6 +4862,7 @@ public partial class PermissionDecisionApproveForSessionApprovalMemory : Permiss /// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type. /// The custom-tool variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalCustomTool : PermissionDecisionApproveForSessionApproval { /// @@ -4675,6 +4876,7 @@ public partial class PermissionDecisionApproveForSessionApprovalCustomTool : Per /// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type. /// The extension-management variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalExtensionManagement : PermissionDecisionApproveForSessionApproval { /// @@ -4689,6 +4891,7 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionManagem /// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type. /// The extension-permission-access variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess : PermissionDecisionApproveForSessionApproval { /// @@ -4702,6 +4905,7 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionPermiss /// Schema for the `PermissionDecisionApproveForSession` type. /// The approve-for-session variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForSession : PermissionDecision { /// @@ -4721,6 +4925,7 @@ public partial class PermissionDecisionApproveForSession : PermissionDecision /// Approval to persist for this location. /// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] [JsonPolymorphic( TypeDiscriminatorPropertyName = "kind", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] @@ -4743,6 +4948,7 @@ public partial class PermissionDecisionApproveForLocationApproval /// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type. /// The commands variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalCommands : PermissionDecisionApproveForLocationApproval { /// @@ -4756,6 +4962,7 @@ public partial class PermissionDecisionApproveForLocationApprovalCommands : Perm /// Schema for the `PermissionDecisionApproveForLocationApprovalRead` type. /// The read variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalRead : PermissionDecisionApproveForLocationApproval { /// @@ -4765,6 +4972,7 @@ public partial class PermissionDecisionApproveForLocationApprovalRead : Permissi /// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type. /// The write variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalWrite : PermissionDecisionApproveForLocationApproval { /// @@ -4774,6 +4982,7 @@ public partial class PermissionDecisionApproveForLocationApprovalWrite : Permiss /// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type. /// The mcp variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMcp : PermissionDecisionApproveForLocationApproval { /// @@ -4791,6 +5000,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMcp : Permissio /// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type. /// The mcp-sampling variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMcpSampling : PermissionDecisionApproveForLocationApproval { /// @@ -4804,6 +5014,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMcpSampling : P /// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type. /// The memory variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalMemory : PermissionDecisionApproveForLocationApproval { /// @@ -4813,6 +5024,7 @@ public partial class PermissionDecisionApproveForLocationApprovalMemory : Permis /// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type. /// The custom-tool variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalCustomTool : PermissionDecisionApproveForLocationApproval { /// @@ -4826,6 +5038,7 @@ public partial class PermissionDecisionApproveForLocationApprovalCustomTool : Pe /// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type. /// The extension-management variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalExtensionManagement : PermissionDecisionApproveForLocationApproval { /// @@ -4840,6 +5053,7 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionManage /// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type. /// The extension-permission-access variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess : PermissionDecisionApproveForLocationApproval { /// @@ -4853,6 +5067,7 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionPermis /// Schema for the `PermissionDecisionApproveForLocation` type. /// The approve-for-location variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproveForLocation : PermissionDecision { /// @@ -4870,6 +5085,7 @@ public partial class PermissionDecisionApproveForLocation : PermissionDecision /// Schema for the `PermissionDecisionApprovePermanently` type. /// The approve-permanently variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovePermanently : PermissionDecision { /// @@ -4883,6 +5099,7 @@ public partial class PermissionDecisionApprovePermanently : PermissionDecision /// Schema for the `PermissionDecisionReject` type. /// The reject variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionReject : PermissionDecision { /// @@ -4897,6 +5114,7 @@ public partial class PermissionDecisionReject : PermissionDecision /// Schema for the `PermissionDecisionUserNotAvailable` type. /// The user-not-available variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionUserNotAvailable : PermissionDecision { /// @@ -4906,6 +5124,7 @@ public partial class PermissionDecisionUserNotAvailable : PermissionDecision /// Schema for the `PermissionDecisionApproved` type. /// The approved variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApproved : PermissionDecision { /// @@ -4915,6 +5134,7 @@ public partial class PermissionDecisionApproved : PermissionDecision /// Schema for the `PermissionDecisionApprovedForSession` type. /// The approved-for-session variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovedForSession : PermissionDecision { /// @@ -4928,6 +5148,7 @@ public partial class PermissionDecisionApprovedForSession : PermissionDecision /// Schema for the `PermissionDecisionApprovedForLocation` type. /// The approved-for-location variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionApprovedForLocation : PermissionDecision { /// @@ -4945,6 +5166,7 @@ public partial class PermissionDecisionApprovedForLocation : PermissionDecision /// Schema for the `PermissionDecisionCancelled` type. /// The cancelled variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionCancelled : PermissionDecision { /// @@ -4959,6 +5181,7 @@ public partial class PermissionDecisionCancelled : PermissionDecision /// Schema for the `PermissionDecisionDeniedByRules` type. /// The denied-by-rules variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByRules : PermissionDecision { /// @@ -4972,6 +5195,7 @@ public partial class PermissionDecisionDeniedByRules : PermissionDecision /// Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type. /// The denied-no-approval-rule-and-could-not-request-from-user variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser : PermissionDecision { /// @@ -4981,6 +5205,7 @@ public partial class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFro /// Schema for the `PermissionDecisionDeniedInteractivelyByUser` type. /// The denied-interactively-by-user variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedInteractivelyByUser : PermissionDecision { /// @@ -5000,6 +5225,7 @@ public partial class PermissionDecisionDeniedInteractivelyByUser : PermissionDec /// Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type. /// The denied-by-content-exclusion-policy variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByContentExclusionPolicy : PermissionDecision { /// @@ -5017,6 +5243,7 @@ public partial class PermissionDecisionDeniedByContentExclusionPolicy : Permissi /// Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type. /// The denied-by-permission-request-hook variant of . +[Experimental(Diagnostics.Experimental)] public partial class PermissionDecisionDeniedByPermissionRequestHook : PermissionDecision { /// @@ -5035,6 +5262,7 @@ public partial class PermissionDecisionDeniedByPermissionRequestHook : Permissio } /// Pending permission request ID and the decision to apply (approve/reject and scope). +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionDecisionRequest { /// Request ID of the pending permission request. @@ -5051,6 +5279,7 @@ internal sealed class PermissionDecisionRequest } /// Schema for the `PendingPermissionRequest` type. +[Experimental(Diagnostics.Experimental)] public sealed class PendingPermissionRequest { /// The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook). @@ -5063,6 +5292,7 @@ public sealed class PendingPermissionRequest } /// List of pending permission requests reconstructed from event history. +[Experimental(Diagnostics.Experimental)] public sealed class PendingPermissionRequestList { /// Pending permission prompts reconstructed from the session's event history. Equivalent to the set of `permission.requested` events that have not yet been followed by a matching `permission.completed` event. Used by clients (e.g. the CLI) to hydrate UI for prompts that were emitted before the client attached to the session. @@ -5071,6 +5301,7 @@ public sealed class PendingPermissionRequestList } /// No parameters; returns currently-pending permission requests for the session. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsPendingRequestsRequest { /// Target session identifier. @@ -5079,6 +5310,7 @@ internal sealed class PermissionsPendingRequestsRequest } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsSetApproveAllResult { /// Whether the operation succeeded. @@ -5087,6 +5319,7 @@ public sealed class PermissionsSetApproveAllResult } /// Allow-all toggle for tool permission requests, with an optional telemetry source. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsSetApproveAllRequest { /// Whether to auto-approve all tool permission requests. @@ -5103,6 +5336,7 @@ internal sealed class PermissionsSetApproveAllRequest } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsModifyRulesResult { /// Whether the operation succeeded. @@ -5111,6 +5345,7 @@ public sealed class PermissionsModifyRulesResult } /// Scope and add/remove instructions for modifying session- or location-scoped permission rules. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsModifyRulesParams { /// Rules to add to the scope. Applied before `remove`/`removeAll`. @@ -5135,6 +5370,7 @@ internal sealed class PermissionsModifyRulesParams } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsSetRequiredResult { /// Whether the operation succeeded. @@ -5143,6 +5379,7 @@ public sealed class PermissionsSetRequiredResult } /// Toggles whether permission prompts should be bridged into session events for this client. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsSetRequiredRequest { /// Whether the client wants `permission.requested` events bridged from the session-owned permission service. CLI clients that render prompt UI set this to `true` for as long as their listener is mounted; headless callers leave it unset (the default is `false`). @@ -5155,6 +5392,7 @@ internal sealed class PermissionsSetRequiredRequest } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsResetSessionApprovalsResult { /// Whether the operation succeeded. @@ -5163,6 +5401,7 @@ public sealed class PermissionsResetSessionApprovalsResult } /// No parameters; clears all session-scoped tool permission approvals. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionsResetSessionApprovalsRequest { /// Target session identifier. @@ -5171,6 +5410,7 @@ internal sealed class PermissionsResetSessionApprovalsRequest } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsNotifyPromptShownResult { /// Whether the operation succeeded. @@ -5179,89 +5419,378 @@ public sealed class PermissionsNotifyPromptShownResult } /// Notification payload describing the permission prompt that the client just rendered. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionPromptShownNotification { /// Human-readable description of the prompt the user is being asked to approve. Used by the runtime to fire the registered `permission_prompt` notification hook (e.g. terminal bell, desktop notification). [JsonPropertyName("message")] public string Message { get; set; } = string.Empty; - /// Target session identifier. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Snapshot of the session's allow-listed directories and primary working directory. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionPathsList +{ + /// All directories currently allowed for tool access on this session. + [JsonPropertyName("directories")] + public IList Directories { get => field ??= []; set; } + + /// The primary working directory for this session. + [JsonPropertyName("primary")] + public string Primary { get; set; } = string.Empty; +} + +/// No parameters; returns the session's allow-listed directories. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionsPathsListRequest +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsPathsAddResult +{ + /// Whether the operation succeeded. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Directory path to add to the session's allowed directories. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionPathsAddParams +{ + /// Directory to add to the allow-list. The runtime resolves and validates the path before adding. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsPathsUpdatePrimaryResult +{ + /// Whether the operation succeeded. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Directory path to set as the session's new primary working directory. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionPathsUpdatePrimaryParams +{ + /// Directory to set as the new primary working directory for the session's permission policy. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Indicates whether the supplied path is within the session's allowed directories. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionPathsAllowedCheckResult +{ + /// Whether the path is within the session's allowed directories. + [JsonPropertyName("allowed")] + public bool Allowed { get; set; } +} + +/// Path to evaluate against the session's allowed directories. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionPathsAllowedCheckParams +{ + /// Path to check against the session's allowed directories. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Indicates whether the supplied path is within the session's workspace directory. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionPathsWorkspaceCheckResult +{ + /// Whether the path is within the session workspace directory. + [JsonPropertyName("allowed")] + public bool Allowed { get; set; } +} + +/// Path to evaluate against the session's workspace (primary) directory. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionPathsWorkspaceCheckParams +{ + /// Path to check against the session workspace directory. + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// Resolved location-permissions key and type. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionLocationResolveResult +{ + /// Location key used in the location-permissions store. + [JsonPropertyName("locationKey")] + public string LocationKey { get; set; } = string.Empty; + + /// Whether the location is a git repo or directory. + [JsonPropertyName("locationType")] + public PermissionLocationType LocationType { get; set; } +} + +/// Working directory to resolve into a location-permissions key. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionLocationResolveParams +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Working directory whose permission location should be resolved. + [JsonPropertyName("workingDirectory")] + public string WorkingDirectory { get; set; } = string.Empty; +} + +/// Summary of persisted location permissions applied to the session. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionLocationApplyResult +{ + /// Number of persisted allowed directories added to the live path manager. + [JsonPropertyName("appliedDirectoryCount")] + public long AppliedDirectoryCount { get; set; } + + /// Number of location-scoped rules added to the live permission service. + [JsonPropertyName("appliedRuleCount")] + public long AppliedRuleCount { get; set; } + + /// Location-scoped rules applied to the live permission service. + [JsonPropertyName("appliedRules")] + public IList AppliedRules { get => field ??= []; set; } + + /// Whether a different location was applied since the previous apply call. + [JsonPropertyName("changed")] + public bool Changed { get; set; } + + /// Location key used in the location-permissions store. + [JsonPropertyName("locationKey")] + public string LocationKey { get; set; } = string.Empty; + + /// Whether the location is a git repo or directory. + [JsonPropertyName("locationType")] + public PermissionLocationType LocationType { get; set; } +} + +/// Working directory to load persisted location permissions for. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionLocationApplyParams +{ + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; + + /// Working directory whose persisted location permissions should be applied. + [JsonPropertyName("workingDirectory")] + public string WorkingDirectory { get; set; } = string.Empty; +} + +/// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsLocationsAddToolApprovalResult +{ + /// Whether the operation succeeded. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Tool approval to persist and apply. +/// Polymorphic base type discriminated by kind. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "kind", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsCommands), "commands")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsRead), "read")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsWrite), "write")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsMcp), "mcp")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsMcpSampling), "mcp-sampling")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsMemory), "memory")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsCustomTool), "custom-tool")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionManagement), "extension-management")] +[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess), "extension-permission-access")] +public partial class PermissionsLocationsAddToolApprovalDetails +{ + /// The type discriminator. + [JsonPropertyName("kind")] + public virtual string Kind { get; set; } = string.Empty; +} + + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. +/// The commands variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsCommands : PermissionsLocationsAddToolApprovalDetails +{ + /// + [JsonIgnore] + public override string Kind => "commands"; + + /// Command identifiers covered by this approval. + [JsonPropertyName("commandIdentifiers")] + public required IList CommandIdentifiers { get; set; } +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. +/// The read variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsRead : PermissionsLocationsAddToolApprovalDetails +{ + /// + [JsonIgnore] + public override string Kind => "read"; +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. +/// The write variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsWrite : PermissionsLocationsAddToolApprovalDetails +{ + /// + [JsonIgnore] + public override string Kind => "write"; +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. +/// The mcp variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsMcp : PermissionsLocationsAddToolApprovalDetails +{ + /// + [JsonIgnore] + public override string Kind => "mcp"; + + /// MCP server name. + [JsonPropertyName("serverName")] + public required string ServerName { get; set; } + + /// MCP tool name, or null to cover every tool on the server. + [JsonPropertyName("toolName")] + public string? ToolName { get; set; } } -/// Snapshot of the session's allow-listed directories and primary working directory. -public sealed class PermissionPathsList +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. +/// The mcp-sampling variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsMcpSampling : PermissionsLocationsAddToolApprovalDetails { - /// All directories currently allowed for tool access on this session. - [JsonPropertyName("directories")] - public IList Directories { get => field ??= []; set; } + /// + [JsonIgnore] + public override string Kind => "mcp-sampling"; - /// The primary working directory for this session. - [JsonPropertyName("primary")] - public string Primary { get; set; } = string.Empty; + /// MCP server name. + [JsonPropertyName("serverName")] + public required string ServerName { get; set; } } -/// No parameters; returns the session's allow-listed directories. -internal sealed class PermissionsPathsListRequest +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. +/// The memory variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsMemory : PermissionsLocationsAddToolApprovalDetails { - /// Target session identifier. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + /// + [JsonIgnore] + public override string Kind => "memory"; } -/// Indicates whether the operation succeeded. -public sealed class PermissionsPathsAddResult +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. +/// The custom-tool variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsCustomTool : PermissionsLocationsAddToolApprovalDetails { - /// Whether the operation succeeded. - [JsonPropertyName("success")] - public bool Success { get; set; } + /// + [JsonIgnore] + public override string Kind => "custom-tool"; + + /// Custom tool name. + [JsonPropertyName("toolName")] + public required string ToolName { get; set; } } -/// Directory path to add to the session's allowed directories. -internal sealed class PermissionPathsAddParams +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. +/// The extension-management variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsExtensionManagement : PermissionsLocationsAddToolApprovalDetails { - /// Directory to add to the allow-list. The runtime resolves and validates the path before adding. - [JsonPropertyName("path")] - public string Path { get; set; } = string.Empty; + /// + [JsonIgnore] + public override string Kind => "extension-management"; - /// Target session identifier. - [JsonPropertyName("sessionId")] - public string SessionId { get; set; } = string.Empty; + /// Optional operation identifier; when omitted, the approval covers all extension management operations. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("operation")] + public string? Operation { get; set; } } -/// Indicates whether the operation succeeded. -public sealed class PermissionsPathsUpdatePrimaryResult +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. +/// The extension-permission-access variant of . +[Experimental(Diagnostics.Experimental)] +public partial class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess : PermissionsLocationsAddToolApprovalDetails { - /// Whether the operation succeeded. - [JsonPropertyName("success")] - public bool Success { get; set; } + /// + [JsonIgnore] + public override string Kind => "extension-permission-access"; + + /// Extension name. + [JsonPropertyName("extensionName")] + public required string ExtensionName { get; set; } } -/// Directory path to set as the session's new primary working directory. -internal sealed class PermissionPathsUpdatePrimaryParams +/// Location-scoped tool approval to persist. +[Experimental(Diagnostics.Experimental)] +internal sealed class PermissionLocationAddToolApprovalParams { - /// Directory to set as the new primary working directory for the session's permission policy. - [JsonPropertyName("path")] - public string Path { get; set; } = string.Empty; + /// Tool approval to persist and apply. + [JsonPropertyName("approval")] + public PermissionsLocationsAddToolApprovalDetails Approval { get => field ??= new(); set; } + + /// Location key (git root or cwd) to persist the approval to. + [JsonPropertyName("locationKey")] + public string LocationKey { get; set; } = string.Empty; /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; } -/// Indicates whether the supplied path is within the session's allowed directories. -public sealed class PermissionPathsAllowedCheckResult +/// Folder trust check result. +[Experimental(Diagnostics.Experimental)] +public sealed class FolderTrustCheckResult { - /// Whether the path is within the session's allowed directories. - [JsonPropertyName("allowed")] - public bool Allowed { get; set; } + /// Whether the folder is trusted. + [JsonPropertyName("trusted")] + public bool Trusted { get; set; } } -/// Path to evaluate against the session's allowed directories. -internal sealed class PermissionPathsAllowedCheckParams +/// Folder path to check for trust. +[Experimental(Diagnostics.Experimental)] +internal sealed class FolderTrustCheckParams { - /// Path to check against the session's allowed directories. + /// Folder path to check. [JsonPropertyName("path")] public string Path { get; set; } = string.Empty; @@ -5270,18 +5799,20 @@ internal sealed class PermissionPathsAllowedCheckParams public string SessionId { get; set; } = string.Empty; } -/// Indicates whether the supplied path is within the session's workspace directory. -public sealed class PermissionPathsWorkspaceCheckResult +/// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsFolderTrustAddTrustedResult { - /// Whether the path is within the session workspace directory. - [JsonPropertyName("allowed")] - public bool Allowed { get; set; } + /// Whether the operation succeeded. + [JsonPropertyName("success")] + public bool Success { get; set; } } -/// Path to evaluate against the session's workspace (primary) directory. -internal sealed class PermissionPathsWorkspaceCheckParams +/// Folder path to add to trusted folders. +[Experimental(Diagnostics.Experimental)] +internal sealed class FolderTrustAddParams { - /// Path to check against the session workspace directory. + /// Folder path to mark as trusted. [JsonPropertyName("path")] public string Path { get; set; } = string.Empty; @@ -5291,6 +5822,7 @@ internal sealed class PermissionPathsWorkspaceCheckParams } /// Indicates whether the operation succeeded. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsUrlsSetUnrestrictedModeResult { /// Whether the operation succeeded. @@ -5299,6 +5831,7 @@ public sealed class PermissionsUrlsSetUnrestrictedModeResult } /// Whether the URL-permission policy should run in unrestricted mode. +[Experimental(Diagnostics.Experimental)] internal sealed class PermissionUrlsSetUnrestrictedModeParams { /// Whether to allow access to all URLs without prompting. Toggles the runtime's URL-permission policy in place. @@ -5369,11 +5902,13 @@ public sealed class SessionMetadataSnapshotWorkspace /// Repository host type, if known. [JsonPropertyName("host_type")] - public SessionMetadataSnapshotWorkspaceHostType? HostType { get; set; } + public WorkspaceSummaryHostType? HostType { get; set; } /// Workspace identifier (1:1 with sessionId). + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")] + [MinLength(1)] [JsonPropertyName("id")] - public Guid Id { get; set; } + public string Id { get; set; } = string.Empty; /// Display name for the session, if set. [JsonPropertyName("name")] @@ -5651,6 +6186,7 @@ internal sealed class MetadataRecomputeContextTokensRequest } /// Identifier of the spawned process, used to correlate streamed output and exit notifications. +[Experimental(Diagnostics.Experimental)] public sealed class ShellExecResult { /// Unique identifier for tracking streamed output. @@ -5659,6 +6195,7 @@ public sealed class ShellExecResult } /// Shell command to run, with optional working directory and timeout in milliseconds. +[Experimental(Diagnostics.Experimental)] internal sealed class ShellExecRequest { /// Shell command to execute. @@ -5680,6 +6217,7 @@ internal sealed class ShellExecRequest } /// Indicates whether the signal was delivered; false if the process was unknown or already exited. +[Experimental(Diagnostics.Experimental)] public sealed class ShellKillResult { /// Whether the signal was sent successfully. @@ -5688,6 +6226,7 @@ public sealed class ShellKillResult } /// Identifier of a process previously returned by "shell.exec" and the signal to send. +[Experimental(Diagnostics.Experimental)] internal sealed class ShellKillRequest { /// Process identifier returned by shell.exec. @@ -7067,6 +7606,7 @@ public override void Write(Utf8JsonWriter writer, SessionContextHostType value, /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SendAgentMode : IEquatable @@ -7135,6 +7675,7 @@ public override void Write(Utf8JsonWriter writer, SendAgentMode value, JsonSeria /// Type of GitHub reference. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SendAttachmentGithubReferenceType : IEquatable @@ -7200,6 +7741,7 @@ public override void Write(Utf8JsonWriter writer, SendAttachmentGithubReferenceT /// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SendMode : IEquatable @@ -7262,6 +7804,7 @@ public override void Write(Utf8JsonWriter writer, SendMode value, JsonSerializer /// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SessionLogLevel : IEquatable @@ -7327,6 +7870,7 @@ public override void Write(Utf8JsonWriter writer, SessionLogLevel value, JsonSer /// Authentication type. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct AuthInfoType : IEquatable @@ -7403,42 +7947,43 @@ public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerial } -/// Defines the allowed values. +/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct WorkspacesGetWorkspaceResultWorkspaceHostType : IEquatable +public readonly struct WorkspacesWorkspaceDetailsHostType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public WorkspacesGetWorkspaceResultWorkspaceHostType(string value) + public WorkspacesWorkspaceDetailsHostType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; /// Workspace repository is hosted on GitHub. - public static WorkspacesGetWorkspaceResultWorkspaceHostType Github { get; } = new("github"); + public static WorkspacesWorkspaceDetailsHostType Github { get; } = new("github"); /// Workspace repository is hosted on Azure DevOps. - public static WorkspacesGetWorkspaceResultWorkspaceHostType Ado { get; } = new("ado"); + public static WorkspacesWorkspaceDetailsHostType Ado { get; } = new("ado"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(WorkspacesGetWorkspaceResultWorkspaceHostType left, WorkspacesGetWorkspaceResultWorkspaceHostType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(WorkspacesGetWorkspaceResultWorkspaceHostType left, WorkspacesGetWorkspaceResultWorkspaceHostType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspacesWorkspaceDetailsHostType left, WorkspacesWorkspaceDetailsHostType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is WorkspacesGetWorkspaceResultWorkspaceHostType other && Equals(other); + public override bool Equals(object? obj) => obj is WorkspacesWorkspaceDetailsHostType other && Equals(other); /// - public bool Equals(WorkspacesGetWorkspaceResultWorkspaceHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(WorkspacesWorkspaceDetailsHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -7446,26 +7991,27 @@ public WorkspacesGetWorkspaceResultWorkspaceHostType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override WorkspacesGetWorkspaceResultWorkspaceHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override WorkspacesWorkspaceDetailsHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, WorkspacesGetWorkspaceResultWorkspaceHostType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, WorkspacesWorkspaceDetailsHostType value, JsonSerializerOptions options) { - GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesGetWorkspaceResultWorkspaceHostType)); + GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspacesWorkspaceDetailsHostType)); } } } /// Where this source lives — used for UI grouping. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct InstructionsSourcesLocation : IEquatable @@ -7534,6 +8080,7 @@ public override void Write(Utf8JsonWriter writer, InstructionsSourcesLocation va /// Category of instruction source — used for merge logic. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct InstructionsSourcesType : IEquatable @@ -8208,6 +8755,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionStatus value, JsonSer /// Optional completion hint for the input (e.g. 'directory' for filesystem path completion). +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SlashCommandInputCompletion : IEquatable @@ -8267,6 +8815,7 @@ public override void Write(Utf8JsonWriter writer, SlashCommandInputCompletion va /// Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct SlashCommandKind : IEquatable @@ -8332,6 +8881,7 @@ public override void Write(Utf8JsonWriter writer, SlashCommandKind value, JsonSe /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed). +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct UIElicitationResponseAction : IEquatable @@ -8397,6 +8947,7 @@ public override void Write(Utf8JsonWriter writer, UIElicitationResponseAction va /// User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct UIAutoModeSwitchResponse : IEquatable @@ -8462,6 +9013,7 @@ public override void Write(Utf8JsonWriter writer, UIAutoModeSwitchResponse value /// The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct UIExitPlanModeAction : IEquatable @@ -8530,6 +9082,7 @@ public override void Write(Utf8JsonWriter writer, UIExitPlanModeAction value, Js /// Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct PermissionsConfigureAdditionalContentExclusionPolicyScope : IEquatable @@ -8592,6 +9145,7 @@ public override void Write(Utf8JsonWriter writer, PermissionsConfigureAdditional /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct PermissionsSetApproveAllSource : IEquatable @@ -8660,6 +9214,7 @@ public override void Write(Utf8JsonWriter writer, PermissionsSetApproveAllSource /// Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct PermissionsModifyRulesScope : IEquatable @@ -8721,6 +9276,69 @@ public override void Write(Utf8JsonWriter writer, PermissionsModifyRulesScope va } +/// Whether the location is a git repo or directory. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionLocationType : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionLocationType(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The permission location is persisted at the git repository root. + public static PermissionLocationType Repo { get; } = new("repo"); + + /// The permission location is persisted at the working directory. + public static PermissionLocationType Dir { get; } = new("dir"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionLocationType left, PermissionLocationType right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionLocationType left, PermissionLocationType right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionLocationType other && Equals(other); + + /// + public bool Equals(PermissionLocationType 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 PermissionLocationType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionLocationType value, JsonSerializerOptions options) + { + GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionLocationType)); + } + } +} + + /// The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot'). [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -8851,41 +9469,42 @@ public override void Write(Utf8JsonWriter writer, MetadataSnapshotRemoteMetadata /// Repository host type, if known. +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] -public readonly struct SessionMetadataSnapshotWorkspaceHostType : IEquatable +public readonly struct WorkspaceSummaryHostType : IEquatable { private readonly string? _value; - /// Initializes a new instance of the struct. - /// The value to associate with this . + /// Initializes a new instance of the struct. + /// The value to associate with this . [JsonConstructor] - public SessionMetadataSnapshotWorkspaceHostType(string value) + public WorkspaceSummaryHostType(string value) { ArgumentException.ThrowIfNullOrWhiteSpace(value); _value = value; } - /// Gets the value associated with this . + /// Gets the value associated with this . public string Value => _value ?? string.Empty; /// Workspace summary repository is hosted on GitHub. - public static SessionMetadataSnapshotWorkspaceHostType Github { get; } = new("github"); + public static WorkspaceSummaryHostType Github { get; } = new("github"); /// Workspace summary repository is hosted on Azure DevOps. - public static SessionMetadataSnapshotWorkspaceHostType Ado { get; } = new("ado"); + public static WorkspaceSummaryHostType Ado { get; } = new("ado"); - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(SessionMetadataSnapshotWorkspaceHostType left, SessionMetadataSnapshotWorkspaceHostType right) => left.Equals(right); + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(WorkspaceSummaryHostType left, WorkspaceSummaryHostType right) => left.Equals(right); - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(SessionMetadataSnapshotWorkspaceHostType left, SessionMetadataSnapshotWorkspaceHostType right) => !(left == right); + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(WorkspaceSummaryHostType left, WorkspaceSummaryHostType right) => !(left == right); /// - public override bool Equals(object? obj) => obj is SessionMetadataSnapshotWorkspaceHostType other && Equals(other); + public override bool Equals(object? obj) => obj is WorkspaceSummaryHostType other && Equals(other); /// - public bool Equals(SessionMetadataSnapshotWorkspaceHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + public bool Equals(WorkspaceSummaryHostType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); /// public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value); @@ -8893,20 +9512,20 @@ public SessionMetadataSnapshotWorkspaceHostType(string value) /// public override string ToString() => Value; - /// Provides a for serializing instances. + /// Provides a for serializing instances. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class Converter : JsonConverter + public sealed class Converter : JsonConverter { /// - public override SessionMetadataSnapshotWorkspaceHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override WorkspaceSummaryHostType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { return new(GitHub.Copilot.SDK.GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); } /// - public override void Write(Utf8JsonWriter writer, SessionMetadataSnapshotWorkspaceHostType value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, WorkspaceSummaryHostType value, JsonSerializerOptions options) { - GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SessionMetadataSnapshotWorkspaceHostType)); + GitHub.Copilot.SDK.GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkspaceSummaryHostType)); } } } @@ -8976,6 +9595,7 @@ public override void Write(Utf8JsonWriter writer, SessionWorkingDirectoryContext /// Signal to send (default: SIGTERM). +[Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct ShellKillSignal : IEquatable @@ -9844,7 +10464,7 @@ public async Task ConnectAsync(string sessionId, /// Optional filter applied to the returned sessions. /// The to monitor for cancellation requests. The default is . /// Persisted sessions matching the filter, ordered most-recently-modified first. - public async Task ListAsync(long? metadataLimit = null, SessionsListRequestFilter? filter = null, CancellationToken cancellationToken = default) + public async Task ListAsync(long? metadataLimit = null, SessionListFilter? filter = null, CancellationToken cancellationToken = default) { var request = new SessionsListRequest { MetadataLimit = metadataLimit, Filter = filter }; return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.list", [request], cancellationToken); @@ -10227,6 +10847,7 @@ internal SessionRpc(CopilotSession session) /// Suspends the session while preserving persisted state for later resume. /// The to monitor for cancellation requests. The default is . + [Experimental(Diagnostics.Experimental)] public async Task SuspendAsync(CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -10251,6 +10872,7 @@ public async Task SuspendAsync(CancellationToken cancellationToken = default) /// If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. /// The to monitor for cancellation requests. The default is . /// Result of sending a user message. + [Experimental(Diagnostics.Experimental)] public async Task SendAsync(string prompt, string? displayPrompt = null, IList? attachments = null, SendMode? mode = null, bool? prepend = null, bool? billable = null, string? requiredTool = null, object? source = null, SendAgentMode? agentMode = null, IDictionary? requestHeaders = null, string? traceparent = null, string? tracestate = null, bool? wait = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(prompt); @@ -10264,6 +10886,7 @@ public async Task SendAsync(string prompt, string? displayPrompt = n /// Finite reason code describing why the current turn was aborted. /// The to monitor for cancellation requests. The default is . /// Result of aborting the current turn. + [Experimental(Diagnostics.Experimental)] public async Task AbortAsync(AbortReason? reason = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -10276,6 +10899,7 @@ public async Task AbortAsync(AbortReason? reason = null, Cancellati /// Why the session is being shut down. Defaults to "routine" when omitted. /// Optional human-readable reason. Typically the message of the error that triggered shutdown when type is 'error'. /// The to monitor for cancellation requests. The default is . + [Experimental(Diagnostics.Experimental)] public async Task ShutdownAsync(ShutdownType? type = null, string? reason = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); @@ -10293,6 +10917,7 @@ public async Task ShutdownAsync(ShutdownType? type = null, string? reason = null /// Optional actionable tip displayed alongside the message. Only honored on `level: "info"`. /// The to monitor for cancellation requests. The default is . /// Identifier of the session event that was emitted for the log message. + [Experimental(Diagnostics.Experimental)] public async Task LogAsync(string message, SessionLogLevel? level = null, string? type = null, bool? ephemeral = null, string? url = null, string? tip = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(message); @@ -10304,6 +10929,7 @@ public async Task LogAsync(string message, SessionLogLevel? level = n } /// Provides session-scoped Auth APIs. +[Experimental(Diagnostics.Experimental)] public sealed class AuthApi { private readonly CopilotSession _session; @@ -10338,6 +10964,7 @@ public async Task SetCredentialsAsync(AuthInfo? cre } /// Provides session-scoped Model APIs. +[Experimental(Diagnostics.Experimental)] public sealed class ModelApi { private readonly CopilotSession _session; @@ -10389,6 +11016,7 @@ public async Task SetReasoningEffortAsync(string } /// Provides session-scoped Mode APIs. +[Experimental(Diagnostics.Experimental)] public sealed class ModeApi { private readonly CopilotSession _session; @@ -10422,6 +11050,7 @@ public async Task SetAsync(SessionMode mode, CancellationToken cancellationToken } /// Provides session-scoped Name APIs. +[Experimental(Diagnostics.Experimental)] public sealed class NameApi { private readonly CopilotSession _session; @@ -10469,6 +11098,7 @@ public async Task SetAutoAsync(string summary, CancellationTo } /// Provides session-scoped Plan APIs. +[Experimental(Diagnostics.Experimental)] public sealed class PlanApi { private readonly CopilotSession _session; @@ -10513,6 +11143,7 @@ public async Task DeleteAsync(CancellationToken cancellationToken = default) } /// Provides session-scoped Workspaces APIs. +[Experimental(Diagnostics.Experimental)] public sealed class WorkspacesApi { private readonly CopilotSession _session; @@ -10609,6 +11240,7 @@ public async Task SaveLargePasteAsync(string con } /// Provides session-scoped Instructions APIs. +[Experimental(Diagnostics.Experimental)] public sealed class InstructionsApi { private readonly CopilotSession _session; @@ -11266,6 +11898,7 @@ public async Task ReloadAsync(CancellationToken cancellationToken = default) } /// Provides session-scoped Tools APIs. +[Experimental(Diagnostics.Experimental)] public sealed class ToolsApi { private readonly CopilotSession _session; @@ -11303,6 +11936,7 @@ public async Task InitializeAndValidateAsync(C } /// Provides session-scoped Commands APIs. +[Experimental(Diagnostics.Experimental)] public sealed class CommandsApi { private readonly CopilotSession _session; @@ -11421,6 +12055,7 @@ public async Task SetFeatureOverridesAsync(IDictionary features, } /// Provides session-scoped Ui APIs. +[Experimental(Diagnostics.Experimental)] public sealed class UiApi { private readonly CopilotSession _session; @@ -11544,6 +12179,7 @@ public async Task UnregisterDirec } /// Provides session-scoped Permissions APIs. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsApi { private readonly CopilotSession _session; @@ -11666,6 +12302,18 @@ public async Task NotifyPromptShownAsync(str Interlocked.CompareExchange(ref field, new(_session), null) ?? field; + /// Locations APIs. + public PermissionsLocationsApi Locations => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; + + /// FolderTrust APIs. + public PermissionsFolderTrustApi FolderTrust => + field ?? + Interlocked.CompareExchange(ref field, new(_session), null) ?? + field; + /// Urls APIs. public PermissionsUrlsApi Urls => field ?? @@ -11674,6 +12322,7 @@ public async Task NotifyPromptShownAsync(str } /// Provides session-scoped PermissionsPaths APIs. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsPathsApi { private readonly CopilotSession _session; @@ -11747,7 +12396,99 @@ public async Task IsPathWithinWorkspaceAsyn } } +/// Provides session-scoped PermissionsLocations APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsLocationsApi +{ + private readonly CopilotSession _session; + + internal PermissionsLocationsApi(CopilotSession session) + { + _session = session; + } + + /// Resolves the permission location key and type for a working directory. + /// Working directory whose permission location should be resolved. + /// The to monitor for cancellation requests. The default is . + /// Resolved location-permissions key and type. + public async Task ResolveAsync(string workingDirectory, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(workingDirectory); + _session.ThrowIfDisposed(); + + var request = new PermissionLocationResolveParams { SessionId = _session.SessionId, WorkingDirectory = workingDirectory }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.locations.resolve", [request], cancellationToken); + } + + /// Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session's permission service. + /// Working directory whose persisted location permissions should be applied. + /// The to monitor for cancellation requests. The default is . + /// Summary of persisted location permissions applied to the session. + public async Task ApplyAsync(string workingDirectory, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(workingDirectory); + _session.ThrowIfDisposed(); + + var request = new PermissionLocationApplyParams { SessionId = _session.SessionId, WorkingDirectory = workingDirectory }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.locations.apply", [request], cancellationToken); + } + + /// Persists a tool approval for a permission location and applies its rules to this session's live permission service. + /// Location key (git root or cwd) to persist the approval to. + /// Tool approval to persist and apply. + /// The to monitor for cancellation requests. The default is . + /// Indicates whether the operation succeeded. + public async Task AddToolApprovalAsync(string locationKey, PermissionsLocationsAddToolApprovalDetails approval, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(locationKey); + ArgumentNullException.ThrowIfNull(approval); + _session.ThrowIfDisposed(); + + var request = new PermissionLocationAddToolApprovalParams { SessionId = _session.SessionId, LocationKey = locationKey, Approval = approval }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.locations.addToolApproval", [request], cancellationToken); + } +} + +/// Provides session-scoped PermissionsFolderTrust APIs. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionsFolderTrustApi +{ + private readonly CopilotSession _session; + + internal PermissionsFolderTrustApi(CopilotSession session) + { + _session = session; + } + + /// Reports whether a folder is trusted according to the user's folder trust state. + /// Folder path to check. + /// The to monitor for cancellation requests. The default is . + /// Folder trust check result. + public async Task IsTrustedAsync(string path, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(path); + _session.ThrowIfDisposed(); + + var request = new FolderTrustCheckParams { SessionId = _session.SessionId, Path = path }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.folderTrust.isTrusted", [request], cancellationToken); + } + + /// Adds a folder to the user's trusted folders list. + /// Folder path to mark as trusted. + /// The to monitor for cancellation requests. The default is . + /// Indicates whether the operation succeeded. + public async Task AddTrustedAsync(string path, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(path); + _session.ThrowIfDisposed(); + + var request = new FolderTrustAddParams { SessionId = _session.SessionId, Path = path }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.permissions.folderTrust.addTrusted", [request], cancellationToken); + } +} + /// Provides session-scoped PermissionsUrls APIs. +[Experimental(Diagnostics.Experimental)] public sealed class PermissionsUrlsApi { private readonly CopilotSession _session; @@ -11858,6 +12599,7 @@ public async Task RecomputeContextTokensAs } /// Provides session-scoped Shell APIs. +[Experimental(Diagnostics.Experimental)] public sealed class ShellApi { private readonly CopilotSession _session; @@ -12612,6 +13354,9 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, Func => connection.sendRequest("session.suspend", { sessionId }), @@ -8469,6 +9042,8 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin * @param params Parameters for sending a user message to the session * * @returns Result of sending a user message + * + * @experimental */ send: async (params: SendRequest): Promise => connection.sendRequest("session.send", { sessionId, ...params }), @@ -8478,6 +9053,8 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin * @param params Parameters for aborting the current turn * * @returns Result of aborting the current turn + * + * @experimental */ abort: async (params: AbortRequest): Promise => connection.sendRequest("session.abort", { sessionId, ...params }), @@ -8485,9 +9062,12 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin * Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down. * * @param params Parameters for shutting down the session + * + * @experimental */ shutdown: async (params: ShutdownRequest): Promise => connection.sendRequest("session.shutdown", { sessionId, ...params }), + /** @experimental */ auth: { /** * Gets authentication status and account metadata for the session. @@ -8506,6 +9086,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin setCredentials: async (params: SessionSetCredentialsParams): Promise => connection.sendRequest("session.auth.setCredentials", { sessionId, ...params }), }, + /** @experimental */ model: { /** * Gets the currently selected model for the session. @@ -8533,6 +9114,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin setReasoningEffort: async (params: ModelSetReasoningEffortRequest): Promise => connection.sendRequest("session.model.setReasoningEffort", { sessionId, ...params }), }, + /** @experimental */ mode: { /** * Gets the current agent interaction mode. @@ -8549,6 +9131,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin set: async (params: ModeSetRequest): Promise => connection.sendRequest("session.mode.set", { sessionId, ...params }), }, + /** @experimental */ name: { /** * Gets the session's friendly name. @@ -8574,6 +9157,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin setAuto: async (params: NameSetAutoRequest): Promise => connection.sendRequest("session.name.setAuto", { sessionId, ...params }), }, + /** @experimental */ plan: { /** * Reads the session plan file from the workspace. @@ -8595,6 +9179,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin delete: async (): Promise => connection.sendRequest("session.plan.delete", { sessionId }), }, + /** @experimental */ workspaces: { /** * Gets current workspace metadata for the session. @@ -8652,6 +9237,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin saveLargePaste: async (params: WorkspacesSaveLargePasteRequest): Promise => connection.sendRequest("session.workspaces.saveLargePaste", { sessionId, ...params }), }, + /** @experimental */ instructions: { /** * Gets instruction sources loaded for the session. @@ -8982,6 +9568,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin reload: async (): Promise => connection.sendRequest("session.extensions.reload", { sessionId }), }, + /** @experimental */ tools: { /** * Provides the result for a pending external tool call. @@ -9000,6 +9587,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin initializeAndValidate: async (): Promise => connection.sendRequest("session.tools.initializeAndValidate", { sessionId }), }, + /** @experimental */ commands: { /** * Lists slash commands available in the session. @@ -9066,6 +9654,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin setFeatureOverrides: async (params: TelemetrySetFeatureOverridesRequest): Promise => connection.sendRequest("session.telemetry.setFeatureOverrides", { sessionId, ...params }), }, + /** @experimental */ ui: { /** * Requests structured input from a UI-capable client. @@ -9138,6 +9727,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin unregisterDirectAutoModeSwitchHandler: async (params: UIUnregisterDirectAutoModeSwitchHandlerRequest): Promise => connection.sendRequest("session.ui.unregisterDirectAutoModeSwitchHandler", { sessionId, ...params }), }, + /** @experimental */ permissions: { /** * Replaces selected permission policy fields (rules, paths, URLs, exclusions, allow-all flags) on the session. @@ -9207,6 +9797,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ notifyPromptShown: async (params: PermissionPromptShownNotification): Promise => connection.sendRequest("session.permissions.notifyPromptShown", { sessionId, ...params }), + /** @experimental */ paths: { /** * Returns the session's allowed directories and primary working directory. @@ -9252,6 +9843,58 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin isPathWithinWorkspace: async (params: PermissionPathsWorkspaceCheckParams): Promise => connection.sendRequest("session.permissions.paths.isPathWithinWorkspace", { sessionId, ...params }), }, + /** @experimental */ + locations: { + /** + * Resolves the permission location key and type for a working directory. + * + * @param params Working directory to resolve into a location-permissions key. + * + * @returns Resolved location-permissions key and type. + */ + resolve: async (params: PermissionLocationResolveParams): Promise => + connection.sendRequest("session.permissions.locations.resolve", { sessionId, ...params }), + /** + * Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session's permission service. + * + * @param params Working directory to load persisted location permissions for. + * + * @returns Summary of persisted location permissions applied to the session. + */ + apply: async (params: PermissionLocationApplyParams): Promise => + connection.sendRequest("session.permissions.locations.apply", { sessionId, ...params }), + /** + * Persists a tool approval for a permission location and applies its rules to this session's live permission service. + * + * @param params Location-scoped tool approval to persist. + * + * @returns Indicates whether the operation succeeded. + */ + addToolApproval: async (params: PermissionLocationAddToolApprovalParams): Promise => + connection.sendRequest("session.permissions.locations.addToolApproval", { sessionId, ...params }), + }, + /** @experimental */ + folderTrust: { + /** + * Reports whether a folder is trusted according to the user's folder trust state. + * + * @param params Folder path to check for trust. + * + * @returns Folder trust check result. + */ + isTrusted: async (params: FolderTrustCheckParams): Promise => + connection.sendRequest("session.permissions.folderTrust.isTrusted", { sessionId, ...params }), + /** + * Adds a folder to the user's trusted folders list. + * + * @param params Folder path to add to trusted folders. + * + * @returns Indicates whether the operation succeeded. + */ + addTrusted: async (params: FolderTrustAddParams): Promise => + connection.sendRequest("session.permissions.folderTrust.addTrusted", { sessionId, ...params }), + }, + /** @experimental */ urls: { /** * Toggles the runtime's URL-permission policy between unrestricted and restricted modes. @@ -9270,6 +9913,8 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin * @param params Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. * * @returns Identifier of the session event that was emitted for the log message. + * + * @experimental */ log: async (params: LogRequest): Promise => connection.sendRequest("session.log", { sessionId, ...params }), @@ -9326,6 +9971,7 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin recomputeContextTokens: async (params: MetadataRecomputeContextTokensRequest): Promise => connection.sendRequest("session.metadata.recomputeContextTokens", { sessionId, ...params }), }, + /** @experimental */ shell: { /** * Starts a shell command and streams output through session notifications. diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index 6a5fcc340..bb9092b47 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -74,6 +74,7 @@ def to_enum(c: type[EnumT], x: Any) -> EnumT: def from_datetime(x: Any) -> datetime: return dateutil.parser.parse(x) +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AbortRequest: """Parameters for aborting the current turn""" @@ -93,6 +94,7 @@ def to_dict(self) -> dict: result["reason"] = from_union([lambda x: to_enum(AbortReason, x), from_none], self.reason) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AbortResult: """Result of aborting the current turn""" @@ -220,6 +222,7 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseEndpoints: """Schema for the `CopilotUserResponseEndpoints` type.""" @@ -253,6 +256,7 @@ def to_dict(self) -> dict: class APIKeyAuthInfoType(Enum): API_KEY = "api-key" +# Experimental: this type is part of an experimental API and may change or be removed. class AuthInfoType(Enum): """Authentication type""" @@ -264,11 +268,13 @@ class AuthInfoType(Enum): TOKEN = "token" USER = "user" +# Experimental: this type is part of an experimental API and may change or be removed. class SlashCommandInputCompletion(Enum): """Optional completion hint for the input (e.g. 'directory' for filesystem path completion)""" DIRECTORY = "directory" +# Experimental: this type is part of an experimental API and may change or be removed. class SlashCommandKind(Enum): """Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command @@ -277,6 +283,7 @@ class SlashCommandKind(Enum): CLIENT = "client" SKILL = "skill" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsHandlePendingCommandRequest: """Pending command request ID and an optional error if the client handler failed.""" @@ -301,6 +308,7 @@ def to_dict(self) -> dict: result["error"] = from_union([from_str, from_none], self.error) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsHandlePendingCommandResult: """Indicates whether the pending client-handled command was completed successfully.""" @@ -319,6 +327,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsInvokeRequest: """Slash command name and optional raw input string to invoke.""" @@ -343,6 +352,7 @@ def to_dict(self) -> dict: result["input"] = from_union([from_str, from_none], self.input) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsListRequest: """Optional filters controlling which command sources to include in the listing.""" @@ -374,6 +384,7 @@ def to_dict(self) -> dict: result["includeSkills"] = from_union([from_bool, from_none], self.include_skills) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsRespondToQueuedCommandResult: """Indicates whether the queued-command response was matched to a pending request.""" @@ -513,6 +524,7 @@ class Host(Enum): class CopilotAPITokenAuthInfoType(Enum): COPILOT_API_TOKEN = "copilot-api-token" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsChat: """Schema for the `CopilotUserResponseQuotaSnapshotsChat` type.""" @@ -575,6 +587,7 @@ def to_dict(self) -> dict: result["unlimited"] = from_union([from_bool, from_none], self.unlimited) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsCompletions: """Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type.""" @@ -637,6 +650,7 @@ def to_dict(self) -> dict: result["unlimited"] = from_union([from_bool, from_none], self.unlimited) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshotsPremiumInteractions: """Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type.""" @@ -699,6 +713,7 @@ def to_dict(self) -> dict: result["unlimited"] = from_union([from_bool, from_none], self.unlimited) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CurrentModel: """The currently selected model and reasoning effort for the session.""" @@ -735,6 +750,7 @@ class DiscoveredMCPServerType(Enum): SSE = "sse" STDIO = "stdio" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class EnqueueCommandParams: """Slash-prefixed command string to enqueue for FIFO processing.""" @@ -755,6 +771,7 @@ def to_dict(self) -> dict: result["command"] = from_str(self.command) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class EnqueueCommandResult: """Indicates whether the command was accepted into the local execution queue.""" @@ -846,6 +863,7 @@ class EventsCursorStatus(Enum): EXPIRED = "expired" OK = "ok" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExecuteCommandParams: """Slash command name and argument string to execute synchronously.""" @@ -869,6 +887,7 @@ def to_dict(self) -> dict: result["commandName"] = from_str(self.command_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExecuteCommandResult: """Error message produced while executing the command, if any.""" @@ -944,6 +963,7 @@ def to_dict(self) -> dict: result["id"] = from_str(self.id) return result +# Experimental: this type is part of an experimental API and may change or be removed. class ExternalToolTextResultForLlmBinaryResultsForLlmType(Enum): """Binary result type discriminator. Use "image" for images and "resource" for other binary data. @@ -951,6 +971,7 @@ class ExternalToolTextResultForLlmBinaryResultsForLlmType(Enum): IMAGE = "image" RESOURCE = "resource" +# Experimental: this type is part of an experimental API and may change or be removed. class ExternalToolTextResultForLlmContentResourceLinkIconTheme(Enum): """Theme variant this icon is intended for""" @@ -1022,9 +1043,67 @@ def to_dict(self) -> dict: result["started"] = from_bool(self.started) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FolderTrustAddParams: + """Folder path to add to trusted folders.""" + + path: str + """Folder path to mark as trusted""" + + @staticmethod + def from_dict(obj: Any) -> 'FolderTrustAddParams': + assert isinstance(obj, dict) + path = from_str(obj.get("path")) + return FolderTrustAddParams(path) + + def to_dict(self) -> dict: + result: dict = {} + result["path"] = from_str(self.path) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FolderTrustCheckParams: + """Folder path to check for trust.""" + + path: str + """Folder path to check""" + + @staticmethod + def from_dict(obj: Any) -> 'FolderTrustCheckParams': + assert isinstance(obj, dict) + path = from_str(obj.get("path")) + return FolderTrustCheckParams(path) + + def to_dict(self) -> dict: + result: dict = {} + result["path"] = from_str(self.path) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FolderTrustCheckResult: + """Folder trust check result.""" + + trusted: bool + """Whether the folder is trusted""" + + @staticmethod + def from_dict(obj: Any) -> 'FolderTrustCheckResult': + assert isinstance(obj, dict) + trusted = from_bool(obj.get("trusted")) + return FolderTrustCheckResult(trusted) + + def to_dict(self) -> dict: + result: dict = {} + result["trusted"] = from_bool(self.trusted) + return result + class GhCLIAuthInfoType(Enum): GH_CLI = "gh-cli" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HandlePendingToolCallResult: """Indicates whether the external tool call result was handled successfully.""" @@ -1208,6 +1287,7 @@ class TentacledSource(Enum): class StickySource(Enum): URL = "url" +# Experimental: this type is part of an experimental API and may change or be removed. class InstructionsSourcesLocation(Enum): """Where this source lives — used for UI grouping""" @@ -1216,6 +1296,7 @@ class InstructionsSourcesLocation(Enum): USER = "user" WORKING_DIRECTORY = "working-directory" +# Experimental: this type is part of an experimental API and may change or be removed. class InstructionsSourcesType(Enum): """Category of instruction source — used for merge logic""" @@ -1227,6 +1308,7 @@ class InstructionsSourcesType(Enum): REPO = "repo" VSCODE = "vscode" +# Experimental: this type is part of an experimental API and may change or be removed. class SessionLogLevel(Enum): """Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". @@ -1235,6 +1317,7 @@ class SessionLogLevel(Enum): INFO = "info" WARNING = "warning" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class LogResult: """Identifier of the session event that was emitted for the log message.""" @@ -1755,12 +1838,14 @@ def to_dict(self) -> dict: return result # Experimental: this type is part of an experimental API and may change or be removed. -class SessionContextHostType(Enum): +class HostType(Enum): """Hosting platform type of the repository Repository host type Repository host type, if known + + Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. """ ADO = "ado" GITHUB = "github" @@ -1871,6 +1956,7 @@ class MetadataSnapshotRemoteMetadataTaskType(Enum): CCA = "cca" CLI = "cli" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModeSetRequest: """Agent interaction mode to apply to the session.""" @@ -1998,6 +2084,7 @@ class ModelPolicyState(Enum): ENABLED = "enabled" UNCONFIGURED = "unconfigured" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverrideLimitsVision: """Vision-specific limits""" @@ -2029,6 +2116,7 @@ def to_dict(self) -> dict: result["supported_media_types"] = from_union([lambda x: from_list(from_str, x), from_none], self.supported_media_types) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverrideSupports: """Feature flags indicating what the model supports""" @@ -2054,6 +2142,7 @@ def to_dict(self) -> dict: result["vision"] = from_union([from_bool, from_none], self.vision) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelSetReasoningEffortRequest: """Reasoning effort level to apply to the currently selected model.""" @@ -2074,6 +2163,7 @@ def to_dict(self) -> dict: result["reasoningEffort"] = from_str(self.reasoning_effort) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelSetReasoningEffortResult: """Update the session's reasoning effort without changing the selected model. Use `switchTo` @@ -2094,6 +2184,7 @@ def to_dict(self) -> dict: result["reasoningEffort"] = from_str(self.reasoning_effort) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelSwitchToResult: """The model identifier active on the session after the switch.""" @@ -2132,6 +2223,7 @@ def to_dict(self) -> dict: result["gitHubToken"] = from_union([from_str, from_none], self.git_hub_token) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class NameGetResult: """The session's friendly name, or null when not yet set.""" @@ -2150,6 +2242,7 @@ def to_dict(self) -> dict: result["name"] = from_union([from_none, from_str], self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class NameSetAutoRequest: """Auto-generated session summary to apply as the session's name when no user-set name @@ -2171,6 +2264,7 @@ def to_dict(self) -> dict: result["summary"] = from_str(self.summary) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class NameSetAutoResult: """Indicates whether the auto-generated summary was applied as the session's name.""" @@ -2191,6 +2285,7 @@ def to_dict(self) -> dict: result["applied"] = from_bool(self.applied) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class NameSetRequest: """New friendly name to apply to the session.""" @@ -2209,6 +2304,7 @@ def to_dict(self) -> dict: result["name"] = from_str(self.name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PendingPermissionRequest: """Schema for the `PendingPermissionRequest` type.""" @@ -2333,6 +2429,52 @@ class PermissionDecisionRejectKind(Enum): class PermissionDecisionUserNotAvailableKind(Enum): USER_NOT_AVAILABLE = "user-not-available" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationApplyParams: + """Working directory to load persisted location permissions for.""" + + working_directory: str + """Working directory whose persisted location permissions should be applied""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationApplyParams': + assert isinstance(obj, dict) + working_directory = from_str(obj.get("workingDirectory")) + return PermissionLocationApplyParams(working_directory) + + def to_dict(self) -> dict: + result: dict = {} + result["workingDirectory"] = from_str(self.working_directory) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +class PermissionLocationType(Enum): + """Whether the location is a git repo or directory""" + + DIR = "dir" + REPO = "repo" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationResolveParams: + """Working directory to resolve into a location-permissions key.""" + + working_directory: str + """Working directory whose permission location should be resolved""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationResolveParams': + assert isinstance(obj, dict) + working_directory = from_str(obj.get("workingDirectory")) + return PermissionLocationResolveParams(working_directory) + + def to_dict(self) -> dict: + result: dict = {} + result["workingDirectory"] = from_str(self.working_directory) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsAddParams: """Directory path to add to the session's allowed directories.""" @@ -2353,6 +2495,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsAllowedCheckParams: """Path to evaluate against the session's allowed directories.""" @@ -2371,6 +2514,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsAllowedCheckResult: """Indicates whether the supplied path is within the session's allowed directories.""" @@ -2389,6 +2533,7 @@ def to_dict(self) -> dict: result["allowed"] = from_bool(self.allowed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsList: """Snapshot of the session's allow-listed directories and primary working directory.""" @@ -2412,6 +2557,7 @@ def to_dict(self) -> dict: result["primary"] = from_str(self.primary) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsUpdatePrimaryParams: """Directory path to set as the session's new primary working directory.""" @@ -2430,6 +2576,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsWorkspaceCheckParams: """Path to evaluate against the session's workspace (primary) directory.""" @@ -2448,6 +2595,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsWorkspaceCheckResult: """Indicates whether the supplied path is within the session's workspace directory.""" @@ -2466,6 +2614,7 @@ def to_dict(self) -> dict: result["allowed"] = from_bool(self.allowed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPromptShownNotification: """Notification payload describing the permission prompt that the client just rendered.""" @@ -2487,6 +2636,7 @@ def to_dict(self) -> dict: result["message"] = from_str(self.message) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionRequestResult: """Indicates whether the permission decision was applied; false when the request was already @@ -2506,6 +2656,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionRulesSet: """If specified, replaces the session's approved/denied permission rules. Omit to leave the @@ -2530,6 +2681,7 @@ def to_dict(self) -> dict: result["denied"] = from_list(lambda x: to_class(PermissionRule, x), self.denied) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionUrlsConfig: """If specified, replaces the session's URL-permission policy. The runtime constructs a @@ -2560,6 +2712,7 @@ def to_dict(self) -> dict: result["unrestricted"] = from_union([from_bool, from_none], self.unrestricted) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionUrlsSetUnrestrictedModeParams: """Whether the URL-permission policy should run in unrestricted mode.""" @@ -2580,6 +2733,7 @@ def to_dict(self) -> 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 PermissionsConfigureAdditionalContentExclusionPolicyRuleSource: """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.""" @@ -2600,6 +2754,7 @@ def to_dict(self) -> dict: result["type"] = from_str(self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. class PermissionsConfigureAdditionalContentExclusionPolicyScope(Enum): """Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. @@ -2607,6 +2762,7 @@ class PermissionsConfigureAdditionalContentExclusionPolicyScope(Enum): ALL = "all" REPO = "repo" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureResult: """Indicates whether the operation succeeded.""" @@ -2625,6 +2781,45 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsFolderTrustAddTrustedResult: + """Indicates whether the operation succeeded.""" + + success: bool + """Whether the operation succeeded""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsFolderTrustAddTrustedResult': + assert isinstance(obj, dict) + success = from_bool(obj.get("success")) + return PermissionsFolderTrustAddTrustedResult(success) + + def to_dict(self) -> dict: + result: dict = {} + result["success"] = from_bool(self.success) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalResult: + """Indicates whether the operation succeeded.""" + + success: bool + """Whether the operation succeeded""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalResult': + assert isinstance(obj, dict) + success = from_bool(obj.get("success")) + return PermissionsLocationsAddToolApprovalResult(success) + + def to_dict(self) -> dict: + result: dict = {} + result["success"] = from_bool(self.success) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. class PermissionsModifyRulesScope(Enum): """Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. @@ -2632,6 +2827,7 @@ class PermissionsModifyRulesScope(Enum): LOCATION = "location" SESSION = "session" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsModifyRulesResult: """Indicates whether the operation succeeded.""" @@ -2650,6 +2846,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsNotifyPromptShownResult: """Indicates whether the operation succeeded.""" @@ -2668,6 +2865,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsPathsAddResult: """Indicates whether the operation succeeded.""" @@ -2686,6 +2884,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsPathsListRequest: """No parameters; returns the session's allow-listed directories.""" @@ -2698,6 +2897,7 @@ def to_dict(self) -> dict: result: dict = {} return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsPathsUpdatePrimaryResult: """Indicates whether the operation succeeded.""" @@ -2716,6 +2916,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsPendingRequestsRequest: """No parameters; returns currently-pending permission requests for the session.""" @@ -2728,6 +2929,7 @@ def to_dict(self) -> dict: result: dict = {} return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsResetSessionApprovalsRequest: """No parameters; clears all session-scoped tool permission approvals.""" @@ -2740,6 +2942,7 @@ def to_dict(self) -> dict: result: dict = {} return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsResetSessionApprovalsResult: """Indicates whether the operation succeeded.""" @@ -2758,6 +2961,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsSetApproveAllResult: """Indicates whether the operation succeeded.""" @@ -2776,6 +2980,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsSetRequiredRequest: """Toggles whether permission prompts should be bridged into session events for this client.""" @@ -2797,6 +3002,7 @@ def to_dict(self) -> dict: result["required"] = from_bool(self.required) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsSetRequiredResult: """Indicates whether the operation succeeded.""" @@ -2815,6 +3021,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsUrlsSetUnrestrictedModeResult: """Indicates whether the operation succeeded.""" @@ -2881,6 +3088,7 @@ def to_dict(self) -> dict: result["timestamp"] = self.timestamp.isoformat() return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PlanReadResult: """Existence, contents, and resolved path of the session plan file.""" @@ -2909,6 +3117,7 @@ def to_dict(self) -> dict: result["path"] = from_union([from_none, from_str], self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PlanUpdateRequest: """Replacement contents to write to the session plan file.""" @@ -2990,6 +3199,7 @@ def to_dict(self) -> dict: result["removed"] = from_bool(self.removed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuedCommandHandled: """Schema for the `QueuedCommandHandled` type.""" @@ -3016,6 +3226,7 @@ def to_dict(self) -> dict: result["stopProcessingQueue"] = from_union([from_bool, from_none], self.stop_processing_queue) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuedCommandNotHandled: """Schema for the `QueuedCommandNotHandled` type.""" @@ -3254,6 +3465,7 @@ def to_dict(self) -> dict: result["id"] = from_int(self.id) return result +# Experimental: this type is part of an experimental API and may change or be removed. class SendAgentMode(Enum): """The UI mode the agent was in when this message was sent. Defaults to the session's current mode. @@ -3263,6 +3475,7 @@ class SendAgentMode(Enum): PLAN = "plan" SHELL = "shell" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentFileLineRange: """Optional line range to scope the attachment to a specific section of the file""" @@ -3293,6 +3506,7 @@ class SendAttachmentGithubReferenceTypeEnum(Enum): ISSUE = "issue" PR = "pr" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentSelectionDetailsEnd: """End position of the selection""" @@ -3316,6 +3530,7 @@ def to_dict(self) -> dict: result["line"] = from_int(self.line) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentSelectionDetailsStart: """Start position of the selection""" @@ -3352,12 +3567,14 @@ class SendAttachmentBlobType(Enum): class SendAttachmentFileType(Enum): FILE = "file" +# Experimental: this type is part of an experimental API and may change or be removed. class SendAttachmentGithubReferenceType(Enum): GITHUB_REFERENCE = "github_reference" class SendAttachmentSelectionType(Enum): SELECTION = "selection" +# Experimental: this type is part of an experimental API and may change or be removed. class SendMode(Enum): """How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. @@ -3365,6 +3582,7 @@ class SendMode(Enum): ENQUEUE = "enqueue" IMMEDIATE = "immediate" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendResult: """Result of sending a user message""" @@ -3858,6 +4076,44 @@ def to_dict(self) -> dict: result["mode"] = from_union([from_int, from_none], self.mode) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionListFilter: + """Optional filter applied to the returned sessions""" + + branch: str | None = None + """Match sessions whose context.branch equals this value""" + + cwd: str | None = None + """Match sessions whose context.cwd equals this value""" + + git_root: str | None = None + """Match sessions whose context.gitRoot equals this value""" + + repository: str | None = None + """Match sessions whose context.repository equals this value""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionListFilter': + assert isinstance(obj, dict) + branch = from_union([from_str, from_none], obj.get("branch")) + cwd = from_union([from_str, from_none], obj.get("cwd")) + git_root = from_union([from_str, from_none], obj.get("gitRoot")) + repository = from_union([from_str, from_none], obj.get("repository")) + return SessionListFilter(branch, cwd, git_root, repository) + + def to_dict(self) -> dict: + result: dict = {} + if self.branch is not None: + result["branch"] = from_union([from_str, from_none], self.branch) + if self.cwd is not None: + result["cwd"] = from_union([from_str, from_none], self.cwd) + if self.git_root is not None: + result["gitRoot"] = from_union([from_str, from_none], self.git_root) + if self.repository is not None: + result["repository"] = from_union([from_str, from_none], self.repository) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionLoadDeferredRepoHooksResult: @@ -3925,6 +4181,7 @@ def to_dict(self) -> dict: result["skipped"] = from_list(from_str, self.skipped) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSetCredentialsResult: """Indicates whether the credential update succeeded.""" @@ -4314,43 +4571,6 @@ def to_dict(self) -> dict: result["remoteSteerable"] = from_union([from_bool, from_none], self.remote_steerable) return result -@dataclass -class Filter: - """Optional filter applied to the returned sessions""" - - branch: str | None = None - """Match sessions whose context.branch equals this value""" - - cwd: str | None = None - """Match sessions whose context.cwd equals this value""" - - git_root: str | None = None - """Match sessions whose context.gitRoot equals this value""" - - repository: str | None = None - """Match sessions whose context.repository equals this value""" - - @staticmethod - def from_dict(obj: Any) -> 'Filter': - assert isinstance(obj, dict) - branch = from_union([from_str, from_none], obj.get("branch")) - cwd = from_union([from_str, from_none], obj.get("cwd")) - git_root = from_union([from_str, from_none], obj.get("gitRoot")) - repository = from_union([from_str, from_none], obj.get("repository")) - return Filter(branch, cwd, git_root, repository) - - def to_dict(self) -> dict: - result: dict = {} - if self.branch is not None: - result["branch"] = from_union([from_str, from_none], self.branch) - if self.cwd is not None: - result["cwd"] = from_union([from_str, from_none], self.cwd) - if self.git_root is not None: - result["gitRoot"] = from_union([from_str, from_none], self.git_root) - if self.repository is not None: - result["repository"] = from_union([from_str, from_none], self.repository) - return result - # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionsLoadDeferredRepoHooksRequest: @@ -4535,6 +4755,7 @@ def to_dict(self) -> dict: result: dict = {} return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShellExecRequest: """Shell command to run, with optional working directory and timeout in milliseconds.""" @@ -4565,6 +4786,7 @@ def to_dict(self) -> dict: result["timeout"] = from_union([from_int, from_none], self.timeout) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShellExecResult: """Identifier of the spawned process, used to correlate streamed output and exit @@ -4584,6 +4806,7 @@ def to_dict(self) -> dict: result["processId"] = from_str(self.process_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. class ShellKillSignal(Enum): """Signal to send (default: SIGTERM)""" @@ -4591,6 +4814,7 @@ class ShellKillSignal(Enum): SIGKILL = "SIGKILL" SIGTERM = "SIGTERM" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShellKillResult: """Indicates whether the signal was delivered; false if the process was unknown or already @@ -4610,6 +4834,7 @@ def to_dict(self) -> dict: result["killed"] = from_bool(self.killed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShutdownRequest: """Parameters for shutting down the session""" @@ -4826,6 +5051,7 @@ class SlashCommandInvocationResultKind(Enum): SELECT_SUBCOMMAND = "select-subcommand" TEXT = "text" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandSelectSubcommandOption: """Schema for the `SlashCommandSelectSubcommandOption` type.""" @@ -4878,8 +5104,11 @@ class TaskStatus(Enum): class TaskAgentInfoType(Enum): AGENT = "agent" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class RecentActivity: +class TaskProgressLine: + """Schema for the `TaskProgressLine` type.""" + message: str """Display message, e.g., "▸ bash", "✓ edit src/foo.ts\"""" @@ -4887,11 +5116,11 @@ class RecentActivity: """ISO 8601 timestamp when this event occurred""" @staticmethod - def from_dict(obj: Any) -> 'RecentActivity': + def from_dict(obj: Any) -> 'TaskProgressLine': assert isinstance(obj, dict) message = from_str(obj.get("message")) timestamp = from_datetime(obj.get("timestamp")) - return RecentActivity(message, timestamp) + return TaskProgressLine(message, timestamp) def to_dict(self) -> dict: result: dict = {} @@ -4899,10 +5128,6 @@ def to_dict(self) -> dict: result["timestamp"] = self.timestamp.isoformat() return result -class TaskAgentProgressType(Enum): - AGENT = "agent" - SHELL = "shell" - # Experimental: this type is part of an experimental API and may change or be removed. class TaskShellInfoAttachmentMode(Enum): """Whether the shell runs inside a managed PTY session or as an independent background @@ -4911,6 +5136,10 @@ class TaskShellInfoAttachmentMode(Enum): ATTACHED = "attached" DETACHED = "detached" +class TaskInfoType(Enum): + AGENT = "agent" + SHELL = "shell" + class TaskShellInfoType(Enum): SHELL = "shell" @@ -5264,6 +5493,7 @@ def to_dict(self) -> dict: result["parameters"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.parameters) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ToolsInitializeAndValidateResult: """Resolve, build, and validate the runtime tool list for this session. Subagent sessions @@ -5300,6 +5530,7 @@ 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. class UIAutoModeSwitchResponse(Enum): """User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). @@ -5308,6 +5539,7 @@ class UIAutoModeSwitchResponse(Enum): YES = "yes" YES_ALWAYS = "yes_always" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayAnyOfFieldItemsAnyOf: """Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type.""" @@ -5337,6 +5569,7 @@ class UIElicitationArrayAnyOfFieldType(Enum): class UIElicitationArrayEnumFieldItemsType(Enum): STRING = "string" +# Experimental: this type is part of an experimental API and may change or be removed. class UIElicitationSchemaPropertyStringFormat(Enum): """Optional format hint that constrains the accepted input.""" @@ -5345,6 +5578,7 @@ class UIElicitationSchemaPropertyStringFormat(Enum): EMAIL = "email" URI = "uri" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationStringOneOfFieldOneOf: """Schema for the `UIElicitationStringOneOfFieldOneOf` type.""" @@ -5380,6 +5614,7 @@ class UIElicitationSchemaPropertyType(Enum): class UIElicitationSchemaType(Enum): OBJECT = "object" +# Experimental: this type is part of an experimental API and may change or be removed. class UIElicitationResponseAction(Enum): """The user's response: accept (submitted), decline (rejected), or cancel (dismissed)""" @@ -5387,6 +5622,7 @@ class UIElicitationResponseAction(Enum): CANCEL = "cancel" DECLINE = "decline" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationResult: """Indicates whether the elicitation response was accepted; false if it was already resolved @@ -5411,12 +5647,14 @@ def to_dict(self) -> dict: class UIElicitationSchemaPropertyBooleanType(Enum): BOOLEAN = "boolean" +# Experimental: this type is part of an experimental API and may change or be removed. class UIElicitationSchemaPropertyNumberType(Enum): """Numeric type accepted by the field.""" INTEGER = "integer" NUMBER = "number" +# Experimental: this type is part of an experimental API and may change or be removed. class UIExitPlanModeAction(Enum): """The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. @@ -5426,6 +5664,7 @@ class UIExitPlanModeAction(Enum): EXIT_ONLY = "exit_only" INTERACTIVE = "interactive" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingResult: """Indicates whether the pending UI request was resolved by this call.""" @@ -5447,6 +5686,7 @@ def to_dict(self) -> dict: result["success"] = from_bool(self.success) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingSamplingRequest: """Request ID of a pending `sampling.requested` event and an optional sampling result @@ -5474,6 +5714,7 @@ def to_dict(self) -> dict: result["response"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.response) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIUserInputResponse: """Schema for the `UIUserInputResponse` type.""" @@ -5499,6 +5740,7 @@ def to_dict(self) -> dict: result["wasFreeform"] = from_bool(self.was_freeform) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIRegisterDirectAutoModeSwitchHandlerResult: """Register an in-process handler for `auto_mode_switch.requested` events. The caller still @@ -5524,6 +5766,7 @@ def to_dict(self) -> dict: result["handle"] = from_str(self.handle) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIUnregisterDirectAutoModeSwitchHandlerRequest: """Opaque handle previously returned by `registerDirectAutoModeSwitchHandler` to release.""" @@ -5542,6 +5785,7 @@ def to_dict(self) -> dict: result["handle"] = from_str(self.handle) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIUnregisterDirectAutoModeSwitchHandlerResult: """Indicates whether the handle was active and the registration count was decremented.""" @@ -5701,6 +5945,7 @@ def to_dict(self) -> dict: class UserAuthInfoType(Enum): USER = "user" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesCheckpoints: """Schema for the `WorkspacesCheckpoints` type.""" @@ -5729,6 +5974,7 @@ def to_dict(self) -> dict: result["title"] = from_str(self.title) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesCreateFileRequest: """Relative path and UTF-8 content for the workspace file to create or overwrite.""" @@ -5752,6 +5998,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesListFilesResult: """Relative paths of files stored in the session workspace files directory.""" @@ -5770,6 +6017,7 @@ def to_dict(self) -> dict: result["files"] = from_list(from_str, self.files) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesReadCheckpointRequest: """Checkpoint number to read.""" @@ -5788,6 +6036,7 @@ def to_dict(self) -> dict: result["number"] = from_int(self.number) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesReadCheckpointResult: """Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing.""" @@ -5806,6 +6055,7 @@ def to_dict(self) -> dict: result["content"] = from_union([from_none, from_str], self.content) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesReadFileRequest: """Relative path of the workspace file to read.""" @@ -5824,6 +6074,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesReadFileResult: """Contents of the requested workspace file as a UTF-8 string.""" @@ -5842,6 +6093,7 @@ def to_dict(self) -> dict: result["content"] = from_str(self.content) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesSaveLargePasteRequest: """Pasted content to save as a UTF-8 file in the session workspace.""" @@ -5904,6 +6156,7 @@ def to_dict(self) -> dict: result["quotaSnapshots"] = from_dict(lambda x: to_class(AccountQuotaSnapshot, x), self.quota_snapshots) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionAuthStatus: """Authentication status and account metadata for the session.""" @@ -5952,6 +6205,7 @@ def to_dict(self) -> dict: result["statusMessage"] = from_union([from_str, from_none], self.status_message) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandInput: """Optional unstructured input hint""" @@ -5991,6 +6245,7 @@ def to_dict(self) -> dict: result["required"] = from_union([from_bool, from_none], self.required) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentDirectory: """Directory attachment""" @@ -6156,6 +6411,7 @@ def to_dict(self) -> dict: result["tools"] = from_union([lambda x: from_list(from_str, x), from_none], self.tools) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponseQuotaSnapshots: """Schema for the `CopilotUserResponseQuotaSnapshotsChat` type. @@ -6392,6 +6648,7 @@ def to_dict(self) -> dict: result["pid"] = from_union([from_int, from_none], self.pid) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmBinaryResultsForLlm: """Binary result returned by a tool for the model""" @@ -6427,6 +6684,7 @@ def to_dict(self) -> dict: result["description"] = from_union([from_str, from_none], self.description) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentResourceLinkIcon: """Icon image for a resource""" @@ -6465,6 +6723,7 @@ def to_dict(self) -> dict: ExternalToolTextResultForLlmContentResourceDetails = EmbeddedTextResourceContents | EmbeddedBlobResourceContents +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentAudio: """Audio content block with base64-encoded data""" @@ -6493,6 +6752,7 @@ def to_dict(self) -> dict: result["type"] = to_enum(ExternalToolTextResultForLlmContentAudioType, self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentImage: """Image content block with base64-encoded data""" @@ -6521,6 +6781,7 @@ def to_dict(self) -> dict: result["type"] = to_enum(ExternalToolTextResultForLlmContentImageType, self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentResource: """Embedded resource content block with inline text or binary data""" @@ -6544,6 +6805,7 @@ def to_dict(self) -> dict: result["type"] = to_enum(ExternalToolTextResultForLlmContentResourceType, self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentTerminal: """Terminal/shell output content block with optional exit code and working directory""" @@ -6579,6 +6841,7 @@ def to_dict(self) -> dict: result["exitCode"] = from_union([from_int, from_none], self.exit_code) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentText: """Plain text content block""" @@ -6602,6 +6865,7 @@ def to_dict(self) -> dict: result["type"] = to_enum(KindEnum, self.type) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandTextResult: """Schema for the `SlashCommandTextResult` type.""" @@ -6857,6 +7121,7 @@ def to_dict(self) -> dict: result["ref"] = from_union([from_str, from_none], self.ref) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstructionsSources: """Schema for the `InstructionsSources` type.""" @@ -6919,6 +7184,7 @@ def to_dict(self) -> dict: result["description"] = from_union([from_str, from_none], self.description) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class LogRequest: """Message text, optional severity level, persistence flag, optional follow-up URL, and @@ -7300,7 +7566,7 @@ class SessionWorkingDirectoryContext: head_commit: str | None = None """Head commit of the current git branch""" - host_type: SessionContextHostType | None = None + host_type: HostType | None = None """Hosting platform type of the repository""" repository: str | None = None @@ -7318,7 +7584,7 @@ def from_dict(obj: Any) -> 'SessionWorkingDirectoryContext': branch = from_union([from_str, from_none], obj.get("branch")) git_root = from_union([from_str, from_none], obj.get("gitRoot")) head_commit = from_union([from_str, from_none], obj.get("headCommit")) - host_type = from_union([SessionContextHostType, from_none], obj.get("hostType")) + host_type = from_union([HostType, from_none], obj.get("hostType")) repository = from_union([from_str, from_none], obj.get("repository")) repository_host = from_union([from_str, from_none], obj.get("repositoryHost")) return SessionWorkingDirectoryContext(cwd, base_commit, branch, git_root, head_commit, host_type, repository, repository_host) @@ -7335,7 +7601,7 @@ def to_dict(self) -> dict: if self.head_commit is not None: result["headCommit"] = from_union([from_str, from_none], self.head_commit) if self.host_type is not None: - result["hostType"] = from_union([lambda x: to_enum(SessionContextHostType, x), from_none], self.host_type) + result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) if self.repository is not None: result["repository"] = from_union([from_str, from_none], self.repository) if self.repository_host is not None: @@ -7359,7 +7625,7 @@ class SessionContext: git_root: str | None = None """Git repository root, if the cwd was inside a git repo""" - host_type: SessionContextHostType | None = None + host_type: HostType | None = None """Repository host type""" repository: str | None = None @@ -7371,7 +7637,7 @@ def from_dict(obj: Any) -> 'SessionContext': cwd = from_str(obj.get("cwd")) branch = from_union([from_str, from_none], obj.get("branch")) git_root = from_union([from_str, from_none], obj.get("gitRoot")) - host_type = from_union([SessionContextHostType, from_none], obj.get("hostType")) + host_type = from_union([HostType, from_none], obj.get("hostType")) repository = from_union([from_str, from_none], obj.get("repository")) return SessionContext(cwd, branch, git_root, host_type, repository) @@ -7383,20 +7649,22 @@ def to_dict(self) -> dict: if self.git_root is not None: result["gitRoot"] = from_union([from_str, from_none], self.git_root) if self.host_type is not None: - result["hostType"] = from_union([lambda x: to_enum(SessionContextHostType, x), from_none], self.host_type) + result["hostType"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) if self.repository is not None: result["repository"] = from_union([from_str, from_none], self.repository) return result @dataclass class Workspace: - id: UUID + id: str branch: str | None = None chronicle_sync_dismissed: bool | None = None created_at: datetime | None = None cwd: str | None = None git_root: str | None = None - host_type: SessionContextHostType | None = None + host_type: HostType | None = None + """Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.""" + mc_last_event_id: str | None = None mc_session_id: str | None = None mc_task_id: str | None = None @@ -7410,13 +7678,13 @@ class Workspace: @staticmethod def from_dict(obj: Any) -> 'Workspace': assert isinstance(obj, dict) - id = UUID(obj.get("id")) + id = from_str(obj.get("id")) branch = from_union([from_str, from_none], obj.get("branch")) chronicle_sync_dismissed = from_union([from_bool, from_none], obj.get("chronicle_sync_dismissed")) created_at = from_union([from_datetime, from_none], obj.get("created_at")) cwd = from_union([from_str, from_none], obj.get("cwd")) git_root = from_union([from_str, from_none], obj.get("git_root")) - host_type = from_union([SessionContextHostType, from_none], obj.get("host_type")) + host_type = from_union([HostType, from_none], obj.get("host_type")) mc_last_event_id = from_union([from_str, from_none], obj.get("mc_last_event_id")) mc_session_id = from_union([from_str, from_none], obj.get("mc_session_id")) mc_task_id = from_union([from_str, from_none], obj.get("mc_task_id")) @@ -7430,7 +7698,7 @@ def from_dict(obj: Any) -> 'Workspace': def to_dict(self) -> dict: result: dict = {} - result["id"] = str(self.id) + result["id"] = from_str(self.id) if self.branch is not None: result["branch"] = from_union([from_str, from_none], self.branch) if self.chronicle_sync_dismissed is not None: @@ -7442,7 +7710,7 @@ def to_dict(self) -> dict: if self.git_root is not None: result["git_root"] = from_union([from_str, from_none], self.git_root) if self.host_type is not None: - result["host_type"] = from_union([lambda x: to_enum(SessionContextHostType, x), from_none], self.host_type) + result["host_type"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) if self.mc_last_event_id is not None: result["mc_last_event_id"] = from_union([from_str, from_none], self.mc_last_event_id) if self.mc_session_id is not None: @@ -7590,6 +7858,7 @@ def to_dict(self) -> dict: result["terms"] = from_union([from_str, from_none], self.terms) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverrideLimits: """Token limits for prompts, outputs, and context window""" @@ -7627,6 +7896,7 @@ def to_dict(self) -> dict: result["vision"] = from_union([lambda x: to_class(ModelCapabilitiesOverrideLimitsVision, x), from_none], self.vision) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PendingPermissionRequestList: """List of pending permission requests reconstructed from event history.""" @@ -7649,6 +7919,7 @@ def to_dict(self) -> dict: result["items"] = from_list(lambda x: to_class(PendingPermissionRequest, x), self.items) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalCommands: """Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type.""" @@ -7672,6 +7943,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalCommandsKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalCommands: """Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type.""" @@ -7695,6 +7967,30 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalCommandsKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsCommands: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type.""" + + command_identifiers: list[str] + """Command identifiers covered by this approval.""" + + kind: PermissionDecisionApproveForLocationApprovalCommandsKind + """Approval scoped to specific command identifiers.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsCommands': + assert isinstance(obj, dict) + command_identifiers = from_list(from_str, obj.get("commandIdentifiers")) + kind = PermissionDecisionApproveForLocationApprovalCommandsKind(obj.get("kind")) + return PermissionsLocationsAddToolApprovalDetailsCommands(command_identifiers, kind) + + def to_dict(self) -> dict: + result: dict = {} + result["commandIdentifiers"] = from_list(from_str, self.command_identifiers) + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalCommandsKind, self.kind) + return result + @dataclass class UserToolSessionApprovalCommands: """Schema for the `UserToolSessionApprovalCommands` type.""" @@ -7718,6 +8014,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalCommandsKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalCustomTool: """Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type.""" @@ -7741,6 +8038,7 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalCustomTool: """Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type.""" @@ -7764,6 +8062,30 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsCustomTool: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type.""" + + kind: PermissionDecisionApproveForLocationApprovalCustomToolKind + """Approval covering a custom tool.""" + + tool_name: str + """Custom tool name.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsCustomTool': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalCustomToolKind(obj.get("kind")) + tool_name = from_str(obj.get("toolName")) + return PermissionsLocationsAddToolApprovalDetailsCustomTool(kind, tool_name) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalCustomToolKind, self.kind) + result["toolName"] = from_str(self.tool_name) + return result + @dataclass class UserToolSessionApprovalCustomTool: """Schema for the `UserToolSessionApprovalCustomTool` type.""" @@ -7787,6 +8109,7 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalExtensionManagement: """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type.""" @@ -7813,6 +8136,7 @@ def to_dict(self) -> dict: result["operation"] = from_union([from_str, from_none], self.operation) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalExtensionManagement: """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type.""" @@ -7839,6 +8163,34 @@ def to_dict(self) -> dict: result["operation"] = from_union([from_str, from_none], self.operation) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsExtensionManagement: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type.""" + + kind: PermissionDecisionApproveForLocationApprovalExtensionManagementKind + """Approval covering extension lifecycle operations such as enable, disable, or reload.""" + + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsExtensionManagement': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalExtensionManagementKind(obj.get("kind")) + operation = from_union([from_str, from_none], obj.get("operation")) + return PermissionsLocationsAddToolApprovalDetailsExtensionManagement(kind, operation) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionManagementKind, self.kind) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalMCP: """Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type.""" @@ -7867,6 +8219,7 @@ def to_dict(self) -> dict: result["toolName"] = from_union([from_none, from_str], self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalMCP: """Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type.""" @@ -7895,6 +8248,35 @@ def to_dict(self) -> dict: result["toolName"] = from_union([from_none, from_str], self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsMCP: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type.""" + + kind: PermissionDecisionApproveForLocationApprovalMCPKind + """Approval covering an MCP tool.""" + + server_name: str + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsMCP': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalMCPKind(obj.get("kind")) + server_name = from_str(obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + return PermissionsLocationsAddToolApprovalDetailsMCP(kind, server_name, tool_name) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMCPKind, self.kind) + result["serverName"] = from_str(self.server_name) + result["toolName"] = from_union([from_none, from_str], self.tool_name) + return result + @dataclass class UserToolSessionApprovalMCP: """Schema for the `UserToolSessionApprovalMcp` type.""" @@ -7923,6 +8305,7 @@ def to_dict(self) -> dict: result["toolName"] = from_union([from_none, from_str], self.tool_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalMCPSampling: """Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type.""" @@ -7946,6 +8329,7 @@ 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 PermissionDecisionApproveForSessionApprovalMCPSampling: """Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type.""" @@ -7969,6 +8353,31 @@ 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 PermissionsLocationsAddToolApprovalDetailsMCPSampling: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type.""" + + kind: PermissionDecisionApproveForLocationApprovalMCPSamplingKind + """Approval covering MCP sampling requests for a server.""" + + server_name: str + """MCP server name.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsMCPSampling': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalMCPSamplingKind(obj.get("kind")) + server_name = from_str(obj.get("serverName")) + return PermissionsLocationsAddToolApprovalDetailsMCPSampling(kind, server_name) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMCPSamplingKind, self.kind) + 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 PermissionDecisionApproveForLocationApprovalMemory: """Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type.""" @@ -7987,6 +8396,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMemoryKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalMemory: """Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type.""" @@ -8005,6 +8415,25 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMemoryKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsMemory: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type.""" + + kind: PermissionDecisionApproveForLocationApprovalMemoryKind + """Approval covering writes to long-term memory.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsMemory': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalMemoryKind(obj.get("kind")) + return PermissionsLocationsAddToolApprovalDetailsMemory(kind) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMemoryKind, self.kind) + return result + @dataclass class UserToolSessionApprovalMemory: """Schema for the `UserToolSessionApprovalMemory` type.""" @@ -8023,6 +8452,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalMemoryKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalRead: """Schema for the `PermissionDecisionApproveForLocationApprovalRead` type.""" @@ -8041,6 +8471,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalReadKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalRead: """Schema for the `PermissionDecisionApproveForSessionApprovalRead` type.""" @@ -8059,6 +8490,25 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalReadKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsRead: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type.""" + + kind: PermissionDecisionApproveForLocationApprovalReadKind + """Approval covering read-only filesystem operations.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsRead': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalReadKind(obj.get("kind")) + return PermissionsLocationsAddToolApprovalDetailsRead(kind) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalReadKind, self.kind) + return result + @dataclass class UserToolSessionApprovalRead: """Schema for the `UserToolSessionApprovalRead` type.""" @@ -8077,6 +8527,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalReadKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalWrite: """Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type.""" @@ -8095,6 +8546,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalWriteKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalWrite: """Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type.""" @@ -8113,6 +8565,25 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalWriteKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsWrite: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type.""" + + kind: PermissionDecisionApproveForLocationApprovalWriteKind + """Approval covering filesystem write operations.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsWrite': + assert isinstance(obj, dict) + kind = PermissionDecisionApproveForLocationApprovalWriteKind(obj.get("kind")) + return PermissionsLocationsAddToolApprovalDetailsWrite(kind) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalWriteKind, self.kind) + return result + @dataclass class UserToolSessionApprovalWrite: """Schema for the `UserToolSessionApprovalWrite` type.""" @@ -8131,6 +8602,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalWriteKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveOnce: """Schema for the `PermissionDecisionApproveOnce` type.""" @@ -8149,6 +8621,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveOnceKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovePermanently: """Schema for the `PermissionDecisionApprovePermanently` type.""" @@ -8172,6 +8645,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApprovePermanentlyKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproved: """Schema for the `PermissionDecisionApproved` type.""" @@ -8190,6 +8664,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApprovedKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovedForLocation: """Schema for the `PermissionDecisionApprovedForLocation` type.""" @@ -8218,6 +8693,7 @@ def to_dict(self) -> dict: result["locationKey"] = from_str(self.location_key) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApprovedForSession: """Schema for the `PermissionDecisionApprovedForSession` type.""" @@ -8241,6 +8717,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApprovedForSessionKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionCancelled: """Schema for the `PermissionDecisionCancelled` type.""" @@ -8265,6 +8742,7 @@ def to_dict(self) -> dict: result["reason"] = from_union([from_str, from_none], self.reason) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByContentExclusionPolicy: """Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` type.""" @@ -8293,6 +8771,7 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByPermissionRequestHook: """Schema for the `PermissionDecisionDeniedByPermissionRequestHook` type.""" @@ -8323,6 +8802,7 @@ def to_dict(self) -> dict: result["message"] = from_union([from_str, from_none], self.message) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedByRules: """Schema for the `PermissionDecisionDeniedByRules` type.""" @@ -8346,6 +8826,7 @@ def to_dict(self) -> dict: result["rules"] = from_list(lambda x: to_class(PermissionRule, x), self.rules) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedInteractivelyByUser: """Schema for the `PermissionDecisionDeniedInteractivelyByUser` type.""" @@ -8376,6 +8857,7 @@ def to_dict(self) -> dict: result["forceReject"] = from_union([from_bool, from_none], self.force_reject) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser: """Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type.""" @@ -8394,6 +8876,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionReject: """Schema for the `PermissionDecisionReject` type.""" @@ -8418,6 +8901,7 @@ def to_dict(self) -> dict: result["feedback"] = from_union([from_str, from_none], self.feedback) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionUserNotAvailable: """Schema for the `PermissionDecisionUserNotAvailable` type.""" @@ -8436,6 +8920,75 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionUserNotAvailableKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationApplyResult: + """Summary of persisted location permissions applied to the session.""" + + applied_directory_count: int + """Number of persisted allowed directories added to the live path manager""" + + applied_rule_count: int + """Number of location-scoped rules added to the live permission service""" + + applied_rules: list[PermissionRule] + """Location-scoped rules applied to the live permission service""" + + changed: bool + """Whether a different location was applied since the previous apply call""" + + location_key: str + """Location key used in the location-permissions store""" + + location_type: PermissionLocationType + """Whether the location is a git repo or directory""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationApplyResult': + assert isinstance(obj, dict) + applied_directory_count = from_int(obj.get("appliedDirectoryCount")) + applied_rule_count = from_int(obj.get("appliedRuleCount")) + applied_rules = from_list(PermissionRule.from_dict, obj.get("appliedRules")) + changed = from_bool(obj.get("changed")) + location_key = from_str(obj.get("locationKey")) + location_type = PermissionLocationType(obj.get("locationType")) + return PermissionLocationApplyResult(applied_directory_count, applied_rule_count, applied_rules, changed, location_key, location_type) + + def to_dict(self) -> dict: + result: dict = {} + result["appliedDirectoryCount"] = from_int(self.applied_directory_count) + result["appliedRuleCount"] = from_int(self.applied_rule_count) + result["appliedRules"] = from_list(lambda x: to_class(PermissionRule, x), self.applied_rules) + result["changed"] = from_bool(self.changed) + result["locationKey"] = from_str(self.location_key) + result["locationType"] = to_enum(PermissionLocationType, self.location_type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationResolveResult: + """Resolved location-permissions key and type.""" + + location_key: str + """Location key used in the location-permissions store""" + + location_type: PermissionLocationType + """Whether the location is a git repo or directory""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationResolveResult': + assert isinstance(obj, dict) + location_key = from_str(obj.get("locationKey")) + location_type = PermissionLocationType(obj.get("locationType")) + return PermissionLocationResolveResult(location_key, location_type) + + def to_dict(self) -> dict: + result: dict = {} + result["locationKey"] = from_str(self.location_key) + result["locationType"] = to_enum(PermissionLocationType, self.location_type) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicyRule: """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type.""" @@ -8466,6 +9019,7 @@ def to_dict(self) -> dict: result["ifNoneMatch"] = from_union([lambda x: from_list(from_str, x), from_none], self.if_none_match) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsModifyRulesParams: """Scope and add/remove instructions for modifying session- or location-scoped permission @@ -8549,6 +9103,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(QueuePendingItemsKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class QueuedCommandResult: """Result of the queued command execution. @@ -8644,6 +9199,7 @@ def to_dict(self) -> dict: result["entry"] = from_union([lambda x: to_class(ScheduleEntry, x), from_none], self.entry) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentSelectionDetails: """Position range of the selection within the file""" @@ -8667,6 +9223,7 @@ def to_dict(self) -> dict: result["start"] = to_class(SendAttachmentSelectionDetailsStart, self.start) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentBlob: """Blob attachment with inline base64-encoded data""" @@ -8701,6 +9258,7 @@ def to_dict(self) -> dict: result["displayName"] = from_union([from_str, from_none], self.display_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentFile: """File attachment""" @@ -8735,6 +9293,7 @@ def to_dict(self) -> dict: result["lineRange"] = from_union([lambda x: to_class(SendAttachmentFileLineRange, x), from_none], self.line_range) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentGithubReference: """GitHub issue, pull request, or discussion reference""" @@ -8919,7 +9478,7 @@ def to_dict(self) -> dict: class SessionsListRequest: """Optional metadata-load limit and context filter applied to the returned sessions.""" - filter: Filter | None = None + filter: SessionListFilter | None = None """Optional filter applied to the returned sessions""" metadata_limit: int | None = None @@ -8931,18 +9490,19 @@ class SessionsListRequest: @staticmethod def from_dict(obj: Any) -> 'SessionsListRequest': assert isinstance(obj, dict) - filter = from_union([Filter.from_dict, from_none], obj.get("filter")) + filter = from_union([SessionListFilter.from_dict, from_none], obj.get("filter")) metadata_limit = from_union([from_int, from_none], obj.get("metadataLimit")) return SessionsListRequest(filter, metadata_limit) def to_dict(self) -> dict: result: dict = {} if self.filter is not None: - result["filter"] = from_union([lambda x: to_class(Filter, x), from_none], self.filter) + result["filter"] = from_union([lambda x: to_class(SessionListFilter, x), from_none], self.filter) if self.metadata_limit is not None: result["metadataLimit"] = from_union([from_int, from_none], self.metadata_limit) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ShellKillRequest: """Identifier of a process previously returned by "shell.exec" and the signal to send.""" @@ -9107,6 +9667,7 @@ def to_dict(self) -> dict: result["skills"] = from_list(lambda x: to_class(SkillsInvokedSkill, x), self.skills) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandAgentPromptResult: """Schema for the `SlashCommandAgentPromptResult` type.""" @@ -9149,6 +9710,7 @@ def to_dict(self) -> dict: result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandCompletedResult: """Schema for the `SlashCommandCompletedResult` type.""" @@ -9181,6 +9743,7 @@ def to_dict(self) -> dict: result["runtimeSettingsChanged"] = from_union([from_bool, from_none], self.runtime_settings_changed) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandSelectSubcommandResult: """Schema for the `SlashCommandSelectSubcommandResult` type.""" @@ -9227,83 +9790,29 @@ def to_dict(self) -> dict: class TaskAgentProgress: """Schema for the `TaskAgentProgress` type.""" - type: TaskAgentProgressType - """Progress kind""" - - latest_intent: str | None = None - """The most recent intent reported by the agent""" - - recent_activity: list[RecentActivity] | None = None + recent_activity: list[TaskProgressLine] """Recent tool execution events converted to display lines""" - pid: int | None = None - """Process ID when available""" - - recent_output: str | None = None - """Recent stdout/stderr lines from the running shell command""" - - @staticmethod - def from_dict(obj: Any) -> 'TaskAgentProgress': - assert isinstance(obj, dict) - type = TaskAgentProgressType(obj.get("type")) - latest_intent = from_union([from_str, from_none], obj.get("latestIntent")) - recent_activity = from_union([lambda x: from_list(RecentActivity.from_dict, x), from_none], obj.get("recentActivity")) - pid = from_union([from_int, from_none], obj.get("pid")) - recent_output = from_union([from_str, from_none], obj.get("recentOutput")) - return TaskAgentProgress(type, latest_intent, recent_activity, pid, recent_output) - - def to_dict(self) -> dict: - result: dict = {} - result["type"] = to_enum(TaskAgentProgressType, self.type) - if self.latest_intent is not None: - result["latestIntent"] = from_union([from_str, from_none], self.latest_intent) - if self.recent_activity is not None: - result["recentActivity"] = from_union([lambda x: from_list(lambda x: to_class(RecentActivity, x), x), from_none], self.recent_activity) - if self.pid is not None: - result["pid"] = from_union([from_int, from_none], self.pid) - if self.recent_output is not None: - result["recentOutput"] = from_union([from_str, from_none], self.recent_output) - return result - -# Experimental: this type is part of an experimental API and may change or be removed. -@dataclass -class TaskProgressClass: - type: TaskAgentProgressType + type: TaskAgentInfoType """Progress kind""" latest_intent: str | None = None """The most recent intent reported by the agent""" - recent_activity: list[RecentActivity] | None = None - """Recent tool execution events converted to display lines""" - - pid: int | None = None - """Process ID when available""" - - recent_output: str | None = None - """Recent stdout/stderr lines from the running shell command""" - @staticmethod - def from_dict(obj: Any) -> 'TaskProgressClass': + def from_dict(obj: Any) -> 'TaskAgentProgress': assert isinstance(obj, dict) - type = TaskAgentProgressType(obj.get("type")) + recent_activity = from_list(TaskProgressLine.from_dict, obj.get("recentActivity")) + type = TaskAgentInfoType(obj.get("type")) latest_intent = from_union([from_str, from_none], obj.get("latestIntent")) - recent_activity = from_union([lambda x: from_list(RecentActivity.from_dict, x), from_none], obj.get("recentActivity")) - pid = from_union([from_int, from_none], obj.get("pid")) - recent_output = from_union([from_str, from_none], obj.get("recentOutput")) - return TaskProgressClass(type, latest_intent, recent_activity, pid, recent_output) + return TaskAgentProgress(recent_activity, type, latest_intent) def to_dict(self) -> dict: result: dict = {} - result["type"] = to_enum(TaskAgentProgressType, self.type) + result["recentActivity"] = from_list(lambda x: to_class(TaskProgressLine, x), self.recent_activity) + result["type"] = to_enum(TaskAgentInfoType, self.type) if self.latest_intent is not None: result["latestIntent"] = from_union([from_str, from_none], self.latest_intent) - if self.recent_activity is not None: - result["recentActivity"] = from_union([lambda x: from_list(lambda x: to_class(RecentActivity, x), x), from_none], self.recent_activity) - if self.pid is not None: - result["pid"] = from_union([from_int, from_none], self.pid) - if self.recent_output is not None: - result["recentOutput"] = from_union([from_str, from_none], self.recent_output) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -9386,6 +9895,36 @@ def to_dict(self) -> dict: result["pid"] = from_union([from_int, from_none], self.pid) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TaskShellProgress: + """Schema for the `TaskShellProgress` type.""" + + recent_output: str + """Recent stdout/stderr lines from the running shell command""" + + type: TaskShellInfoType + """Progress kind""" + + pid: int | None = None + """Process ID when available""" + + @staticmethod + def from_dict(obj: Any) -> 'TaskShellProgress': + assert isinstance(obj, dict) + recent_output = from_str(obj.get("recentOutput")) + type = TaskShellInfoType(obj.get("type")) + pid = from_union([from_int, from_none], obj.get("pid")) + return TaskShellProgress(recent_output, type, pid) + + def to_dict(self) -> dict: + result: dict = {} + result["recentOutput"] = from_str(self.recent_output) + result["type"] = to_enum(TaskShellInfoType, self.type) + if self.pid is not None: + result["pid"] = from_union([from_int, from_none], self.pid) + return result + @dataclass class ToolList: """Built-in tools available for the requested model, with their parameters and instructions.""" @@ -9404,6 +9943,7 @@ def to_dict(self) -> dict: result["tools"] = from_list(lambda x: to_class(Tool, x), self.tools) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingAutoModeSwitchRequest: """Request ID of a pending `auto_mode_switch.requested` event and the user's response.""" @@ -9429,6 +9969,7 @@ def to_dict(self) -> dict: result["response"] = to_enum(UIAutoModeSwitchResponse, self.response) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayAnyOfFieldItems: """Schema applied to each item in the array.""" @@ -9447,6 +9988,7 @@ def to_dict(self) -> dict: result["anyOf"] = from_list(lambda x: to_class(UIElicitationArrayAnyOfFieldItemsAnyOf, x), self.any_of) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayEnumFieldItems: """Schema applied to each item in the array.""" @@ -9501,6 +10043,7 @@ def to_dict(self) -> dict: result["anyOf"] = from_union([lambda x: from_list(lambda x: to_class(UIElicitationArrayAnyOfFieldItemsAnyOf, x), x), from_none], self.any_of) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationStringEnumField: """Single-select string field whose allowed values are defined inline.""" @@ -9548,6 +10091,7 @@ 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 UIElicitationSchemaPropertyString: """Free-text string field with optional length and format constraints.""" @@ -9602,6 +10146,7 @@ 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 UIElicitationStringOneOfField: """Single-select string field where each option pairs a value with a display label.""" @@ -9643,6 +10188,7 @@ 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 UIElicitationResponse: """The elicitation response (accept with form values, decline, or cancel)""" @@ -9667,6 +10213,7 @@ def to_dict(self) -> dict: result["content"] = from_union([lambda x: from_dict(lambda x: from_union([to_float, from_bool, lambda x: from_list(from_str, x), from_str], x), x), from_none], self.content) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationSchemaPropertyBoolean: """Boolean field rendered as a yes/no toggle.""" @@ -9703,6 +10250,7 @@ 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 UIElicitationSchemaPropertyNumber: """Numeric field accepting either a number or an integer.""" @@ -9751,6 +10299,7 @@ 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 UIExitPlanModeResponse: """Schema for the `UIExitPlanModeResponse` type.""" @@ -9789,6 +10338,7 @@ def to_dict(self) -> dict: result["selectedAction"] = from_union([lambda x: to_enum(UIExitPlanModeAction, x), from_none], self.selected_action) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingUserInputRequest: """Request ID of a pending `user_input.requested` event and the user's response.""" @@ -9848,6 +10398,7 @@ def to_dict(self) -> dict: result["totalNanoAiu"] = from_union([to_float, from_none], self.total_nano_aiu) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesSaveLargePasteResult: """Descriptor for the saved paste file, or null when the workspace is unavailable.""" @@ -9868,6 +10419,7 @@ def to_dict(self) -> dict: result["saved"] = from_union([lambda x: to_class(Saved, x), from_none], self.saved) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandInfo: """Schema for the `SlashCommandInfo` type.""" @@ -9944,6 +10496,7 @@ def to_dict(self) -> dict: result["sessionId"] = from_str(self.session_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotUserResponse: """Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the @@ -10093,6 +10646,7 @@ def to_dict(self) -> dict: result["extensions"] = from_list(lambda x: to_class(Extension, x), self.extensions) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess: """Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` @@ -10117,6 +10671,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess: """Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` @@ -10141,6 +10696,30 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess: + """Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type.""" + + extension_name: str + """Extension name.""" + + kind: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind + """Approval covering an extension's request to access a permission-gated capability.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess': + assert isinstance(obj, dict) + extension_name = from_str(obj.get("extensionName")) + kind = PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind(obj.get("kind")) + return PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess(extension_name, kind) + + def to_dict(self) -> dict: + result: dict = {} + result["extensionName"] = from_str(self.extension_name) + result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) + return result + @dataclass class UserToolSessionApprovalExtensionManagement: """Schema for the `UserToolSessionApprovalExtensionManagement` type.""" @@ -10188,6 +10767,7 @@ def to_dict(self) -> dict: result["kind"] = to_enum(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKind, self.kind) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContent: """A content block within a tool result, which may be text, terminal output, image, audio, @@ -10299,6 +10879,7 @@ def to_dict(self) -> dict: result["resource"] = from_union([lambda x: from_union([lambda x: to_class(EmbeddedTextResourceContents, x), lambda x: to_class(EmbeddedBlobResourceContents, x)], x), from_none], self.resource) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlmContentResourceLink: """Resource link content block referencing an external resource""" @@ -10445,6 +11026,7 @@ def to_dict(self) -> dict: result["url"] = from_union([from_str, from_none], self.url) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class InstructionsGetSourcesResult: """Instruction sources loaded for the session, in merge order.""" @@ -10629,6 +11211,7 @@ def to_dict(self) -> dict: result["context"] = from_union([lambda x: to_class(SessionContext, x), from_none], self.context) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionPathsConfig: """If specified, replaces the session's path-permission policy. The runtime constructs the @@ -10680,7 +11263,7 @@ def to_dict(self) -> dict: class WorkspaceSummary: """Public-facing projection of workspace metadata for SDK / TUI consumers""" - id: UUID + id: str """Workspace identifier (1:1 with sessionId)""" branch: str | None = None @@ -10695,7 +11278,7 @@ class WorkspaceSummary: git_root: str | None = None """Resolved git root for cwd, if any""" - host_type: SessionContextHostType | None = None + host_type: HostType | None = None """Repository host type, if known""" name: str | None = None @@ -10710,12 +11293,12 @@ class WorkspaceSummary: @staticmethod def from_dict(obj: Any) -> 'WorkspaceSummary': assert isinstance(obj, dict) - id = UUID(obj.get("id")) + id = from_str(obj.get("id")) branch = from_union([from_str, from_none], obj.get("branch")) created_at = from_union([from_datetime, from_none], obj.get("created_at")) cwd = from_union([from_str, from_none], obj.get("cwd")) git_root = from_union([from_str, from_none], obj.get("git_root")) - host_type = from_union([SessionContextHostType, from_none], obj.get("host_type")) + host_type = from_union([HostType, from_none], obj.get("host_type")) name = from_union([from_str, from_none], obj.get("name")) repository = from_union([from_str, from_none], obj.get("repository")) updated_at = from_union([from_datetime, from_none], obj.get("updated_at")) @@ -10723,7 +11306,7 @@ def from_dict(obj: Any) -> 'WorkspaceSummary': def to_dict(self) -> dict: result: dict = {} - result["id"] = str(self.id) + result["id"] = from_str(self.id) if self.branch is not None: result["branch"] = from_union([from_str, from_none], self.branch) if self.created_at is not None: @@ -10733,7 +11316,7 @@ def to_dict(self) -> dict: if self.git_root is not None: result["git_root"] = from_union([from_str, from_none], self.git_root) if self.host_type is not None: - result["host_type"] = from_union([lambda x: to_enum(SessionContextHostType, x), from_none], self.host_type) + result["host_type"] = from_union([lambda x: to_enum(HostType, x), from_none], self.host_type) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) if self.repository is not None: @@ -10742,6 +11325,7 @@ def to_dict(self) -> dict: result["updated_at"] = from_union([lambda x: x.isoformat(), from_none], self.updated_at) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesGetWorkspaceResult: """Current workspace metadata for the session, including its absolute filesystem path when @@ -10768,6 +11352,7 @@ def to_dict(self) -> dict: result["workspace"] = from_union([lambda x: to_class(Workspace, x), from_none], self.workspace) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class WorkspacesListCheckpointsResult: """Workspace checkpoints in chronological order; empty when the workspace is not enabled.""" @@ -10786,6 +11371,7 @@ def to_dict(self) -> dict: result["checkpoints"] = from_list(lambda x: to_class(WorkspacesCheckpoints, x), self.checkpoints) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelCapabilitiesOverride: """Override individual model capabilities resolved by the runtime""" @@ -10811,6 +11397,7 @@ def to_dict(self) -> dict: result["supports"] = from_union([lambda x: to_class(ModelCapabilitiesOverrideSupports, x), from_none], self.supports) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicy: """Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type.""" @@ -10864,6 +11451,7 @@ def to_dict(self) -> dict: result["steeringMessages"] = from_list(from_str, self.steering_messages) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandsRespondToQueuedCommandRequest: """Queued-command request ID and the result indicating whether the host executed it (and @@ -10888,6 +11476,7 @@ def to_dict(self) -> dict: result["result"] = to_class(QueuedCommandResult, self.result) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachment: """A user message attachment — a file, directory, code selection, blob, or GitHub reference @@ -10998,6 +11587,7 @@ def to_dict(self) -> dict: result["mimeType"] = from_union([from_str, from_none], self.mime_type) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendAttachmentSelection: """Code selection attachment from an editor""" @@ -11271,6 +11861,7 @@ def to_dict(self) -> dict: result["agent"] = to_class(AgentInfo, self.agent) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SlashCommandInvocationResult: """Result of invoking the slash command (text output, prompt to send to the agent, or @@ -11373,26 +11964,50 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass -class TasksGetProgressResult: - """Progress information for the task, or null when no task with that ID is tracked.""" +class TaskProgress: + """Schema for the `TaskAgentProgress` type. - progress: TaskProgressClass | None = None - """Progress information for the task, discriminated by type. Returns null when no task with - this ID is currently tracked. + Schema for the `TaskShellProgress` type. """ + type: TaskInfoType + """Progress kind""" + + latest_intent: str | None = None + """The most recent intent reported by the agent""" + + recent_activity: list[TaskProgressLine] | None = None + """Recent tool execution events converted to display lines""" + + pid: int | None = None + """Process ID when available""" + + recent_output: str | None = None + """Recent stdout/stderr lines from the running shell command""" @staticmethod - def from_dict(obj: Any) -> 'TasksGetProgressResult': + def from_dict(obj: Any) -> 'TaskProgress': assert isinstance(obj, dict) - progress = from_union([TaskProgressClass.from_dict, from_none], obj.get("progress")) - return TasksGetProgressResult(progress) + type = TaskInfoType(obj.get("type")) + latest_intent = from_union([from_str, from_none], obj.get("latestIntent")) + recent_activity = from_union([lambda x: from_list(TaskProgressLine.from_dict, x), from_none], obj.get("recentActivity")) + pid = from_union([from_int, from_none], obj.get("pid")) + recent_output = from_union([from_str, from_none], obj.get("recentOutput")) + return TaskProgress(type, latest_intent, recent_activity, pid, recent_output) def to_dict(self) -> dict: result: dict = {} - if self.progress is not None: - result["progress"] = from_union([lambda x: to_class(TaskProgressClass, x), from_none], self.progress) + result["type"] = to_enum(TaskInfoType, self.type) + if self.latest_intent is not None: + result["latestIntent"] = from_union([from_str, from_none], self.latest_intent) + if self.recent_activity is not None: + result["recentActivity"] = from_union([lambda x: from_list(lambda x: to_class(TaskProgressLine, x), x), from_none], self.recent_activity) + if self.pid is not None: + result["pid"] = from_union([from_int, from_none], self.pid) + if self.recent_output is not None: + result["recentOutput"] = from_union([from_str, from_none], self.recent_output) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationArrayAnyOfField: """Multi-select string field where each option pairs a value with a display label.""" @@ -11446,6 +12061,7 @@ 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 UIElicitationArrayEnumField: """Multi-select string field whose allowed values are defined inline.""" @@ -11499,6 +12115,7 @@ 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 UIElicitationSchemaProperty: """Definition for a single elicitation form field. @@ -11625,6 +12242,7 @@ def to_dict(self) -> dict: result["minimum"] = from_union([to_float, from_none], self.minimum) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingElicitationRequest: """Pending elicitation request ID and the user's response (accept/decline/cancel + form @@ -11649,6 +12267,7 @@ def to_dict(self) -> dict: result["result"] = to_class(UIElicitationResponse, self.result) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIHandlePendingExitPlanModeRequest: """Request ID of a pending `exit_plan_mode.requested` event and the user's response.""" @@ -11746,6 +12365,7 @@ def to_dict(self) -> dict: result["totalNanoAiu"] = from_union([to_float, from_none], self.total_nano_aiu) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CommandList: """Slash commands available in the session, after applying any include/exclude filters.""" @@ -11764,6 +12384,7 @@ def to_dict(self) -> dict: result["commands"] = from_list(lambda x: to_class(SlashCommandInfo, x), self.commands) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class APIKeyAuthInfo: """Schema for the `ApiKeyAuthInfo` type.""" @@ -11801,6 +12422,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class CopilotAPITokenAuthInfo: """Schema for the `CopilotApiTokenAuthInfo` type.""" @@ -11835,6 +12457,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class EnvAuthInfo: """Schema for the `EnvAuthInfo` type.""" @@ -11885,6 +12508,7 @@ def to_dict(self) -> dict: result["login"] = from_union([from_str, from_none], self.login) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class GhCLIAuthInfo: """Schema for the `GhCliAuthInfo` type.""" @@ -11927,6 +12551,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HMACAuthInfo: """Schema for the `HMACAuthInfo` type.""" @@ -11964,6 +12589,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class TokenAuthInfo: """Schema for the `TokenAuthInfo` type.""" @@ -12001,6 +12627,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UserAuthInfo: """Schema for the `UserAuthInfo` type.""" @@ -12039,6 +12666,7 @@ def to_dict(self) -> dict: result["copilotUser"] = from_union([lambda x: to_class(CopilotUserResponse, x), from_none], self.copilot_user) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocationApproval: """Approval to persist for this location @@ -12242,6 +12870,7 @@ def to_dict(self) -> dict: result["__externalRefMarker___ExternalRef_UserToolSessionApproval"] = from_union([from_str, from_none], self.external_ref_marker_external_ref_user_tool_session_approval) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSessionApproval: """Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) @@ -12328,6 +12957,93 @@ def to_dict(self) -> dict: result["extensionName"] = from_union([from_str, from_none], self.extension_name) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionsLocationsAddToolApprovalDetails: + """Tool approval to persist and apply + + Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` type. + + Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` type. + """ + kind: ApprovalKind + """Approval scoped to specific command identifiers. + + Approval covering read-only filesystem operations. + + Approval covering filesystem write operations. + + Approval covering an MCP tool. + + Approval covering MCP sampling requests for a server. + + Approval covering writes to long-term memory. + + Approval covering a custom tool. + + Approval covering extension lifecycle operations such as enable, disable, or reload. + + Approval covering an extension's request to access a permission-gated capability. + """ + command_identifiers: list[str] | None = None + """Command identifiers covered by this approval.""" + + server_name: str | None = None + """MCP server name.""" + + tool_name: str | None = None + """MCP tool name, or null to cover every tool on the server. + + Custom tool name. + """ + operation: str | None = None + """Optional operation identifier; when omitted, the approval covers all extension management + operations. + """ + extension_name: str | None = None + """Extension name.""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionsLocationsAddToolApprovalDetails': + assert isinstance(obj, dict) + kind = ApprovalKind(obj.get("kind")) + command_identifiers = from_union([lambda x: from_list(from_str, x), from_none], obj.get("commandIdentifiers")) + server_name = from_union([from_str, from_none], obj.get("serverName")) + tool_name = from_union([from_none, from_str], obj.get("toolName")) + operation = from_union([from_str, from_none], obj.get("operation")) + extension_name = from_union([from_str, from_none], obj.get("extensionName")) + return PermissionsLocationsAddToolApprovalDetails(kind, command_identifiers, server_name, tool_name, operation, extension_name) + + def to_dict(self) -> dict: + result: dict = {} + result["kind"] = to_enum(ApprovalKind, self.kind) + if self.command_identifiers is not None: + result["commandIdentifiers"] = from_union([lambda x: from_list(from_str, x), from_none], self.command_identifiers) + if self.server_name is not None: + result["serverName"] = from_union([from_str, from_none], self.server_name) + if self.tool_name is not None: + result["toolName"] = from_union([from_none, from_str], self.tool_name) + if self.operation is not None: + result["operation"] = from_union([from_str, from_none], self.operation) + if self.extension_name is not None: + result["extensionName"] = from_union([from_str, from_none], self.extension_name) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ExternalToolTextResultForLlm: """Expanded external tool result payload""" @@ -12642,6 +13358,7 @@ def to_dict(self) -> dict: result["workspacePath"] = from_union([from_none, from_str], self.workspace_path) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureParams: """Patch of permission policy fields to apply (omit a field to leave it unchanged).""" @@ -12701,6 +13418,7 @@ def to_dict(self) -> dict: result["urls"] = from_union([lambda x: to_class(PermissionUrlsConfig, x), from_none], self.urls) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SendRequest: """Parameters for sending a user message to the session""" @@ -12802,6 +13520,29 @@ def to_dict(self) -> dict: result["wait"] = from_union([from_bool, from_none], self.wait) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class TasksGetProgressResult: + """Progress information for the task, or null when no task with that ID is tracked.""" + + progress: TaskProgress | None = None + """Progress information for the task, discriminated by type. Returns null when no task with + this ID is currently tracked. + """ + + @staticmethod + def from_dict(obj: Any) -> 'TasksGetProgressResult': + assert isinstance(obj, dict) + progress = from_union([TaskProgress.from_dict, from_none], obj.get("progress")) + return TasksGetProgressResult(progress) + + def to_dict(self) -> dict: + result: dict = {} + if self.progress is not None: + result["progress"] = from_union([lambda x: to_class(TaskProgress, x), from_none], self.progress) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationSchema: """JSON Schema describing the form fields to present to the user""" @@ -12831,6 +13572,7 @@ def to_dict(self) -> dict: result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class AuthInfo: """The new auth credentials to install on the session. When omitted or `undefined`, the call @@ -12939,6 +13681,7 @@ def to_dict(self) -> dict: result["apiKey"] = from_union([from_str, from_none], self.api_key) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForLocation: """Schema for the `PermissionDecisionApproveForLocation` type.""" @@ -12967,6 +13710,7 @@ def to_dict(self) -> dict: result["locationKey"] = from_str(self.location_key) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionApproveForSession: """Schema for the `PermissionDecisionApproveForSession` type.""" @@ -12997,6 +13741,31 @@ def to_dict(self) -> dict: result["domain"] = from_union([from_str, from_none], self.domain) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class PermissionLocationAddToolApprovalParams: + """Location-scoped tool approval to persist.""" + + approval: PermissionsLocationsAddToolApprovalDetails + """Tool approval to persist and apply""" + + location_key: str + """Location key (git root or cwd) to persist the approval to""" + + @staticmethod + def from_dict(obj: Any) -> 'PermissionLocationAddToolApprovalParams': + assert isinstance(obj, dict) + approval = PermissionsLocationsAddToolApprovalDetails.from_dict(obj.get("approval")) + location_key = from_str(obj.get("locationKey")) + return PermissionLocationAddToolApprovalParams(approval, location_key) + + def to_dict(self) -> dict: + result: dict = {} + result["approval"] = to_class(PermissionsLocationsAddToolApprovalDetails, self.approval) + result["locationKey"] = from_str(self.location_key) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class HandlePendingToolCallRequest: """Pending external tool call request ID, with the tool result or an error describing why it @@ -13288,6 +14057,7 @@ def to_dict(self) -> dict: result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class UIElicitationRequest: """Prompt message and JSON schema describing the form fields to elicit from the user.""" @@ -13311,6 +14081,7 @@ def to_dict(self) -> dict: result["requestedSchema"] = to_class(UIElicitationSchema, self.requested_schema) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionSetCredentialsParams: """New auth credentials to install on the session. Omit to leave credentials unchanged.""" @@ -13335,6 +14106,7 @@ def to_dict(self) -> dict: result["credentials"] = from_union([lambda x: to_class(AuthInfo, x), from_none], self.credentials) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecision: """The client's response to the pending permission prompt @@ -13485,6 +14257,7 @@ def to_dict(self) -> dict: result["interrupt"] = from_union([from_bool, from_none], self.interrupt) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionDecisionRequest: """Pending permission request ID and the decision to apply (approve/reject and scope).""" @@ -13716,6 +14489,7 @@ def to_dict(self) -> dict: result["models"] = from_list(lambda x: to_class(Model, x), self.models) return result +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelSwitchToRequest: """Target model identifier and optional reasoning effort, summary, and capability overrides.""" @@ -13752,6 +14526,7 @@ def to_dict(self) -> dict: result["reasoningSummary"] = from_union([lambda x: to_enum(ReasoningSummary, x), from_none], self.reasoning_summary) return result +# Experimental: this type is part of an experimental API and may change or be removed. class PermissionsSetApproveAllSource(Enum): """Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers.""" @@ -13760,6 +14535,7 @@ class PermissionsSetApproveAllSource(Enum): RPC = "rpc" SLASH_COMMAND = "slash_command" +# Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsSetApproveAllRequest: """Allow-all toggle for tool permission requests, with an optional telemetry source.""" @@ -13929,7 +14705,7 @@ class TaskInfo: status: TaskStatus """Current lifecycle status of the task""" - type: TaskAgentProgressType + type: TaskInfoType """Task kind""" active_started_at: datetime | None = None @@ -13995,7 +14771,7 @@ def from_dict(obj: Any) -> 'TaskInfo': id = from_str(obj.get("id")) started_at = from_datetime(obj.get("startedAt")) status = TaskStatus(obj.get("status")) - type = TaskAgentProgressType(obj.get("type")) + type = TaskInfoType(obj.get("type")) active_started_at = from_union([from_datetime, from_none], obj.get("activeStartedAt")) active_time_ms = from_union([from_int, from_none], obj.get("activeTimeMs")) agent_type = from_union([from_str, from_none], obj.get("agentType")) @@ -14021,7 +14797,7 @@ def to_dict(self) -> dict: result["id"] = from_str(self.id) result["startedAt"] = self.started_at.isoformat() result["status"] = to_enum(TaskStatus, self.status) - result["type"] = to_enum(TaskAgentProgressType, self.type) + result["type"] = to_enum(TaskInfoType, self.type) if self.active_started_at is not None: result["activeStartedAt"] = from_union([lambda x: x.isoformat(), from_none], self.active_started_at) if self.active_time_ms is not None: @@ -14200,6 +14976,9 @@ class RPC: filter_mapping: dict[str, ContentFilterMode] | ContentFilterMode fleet_start_request: FleetStartRequest fleet_start_result: FleetStartResult + folder_trust_add_params: FolderTrustAddParams + folder_trust_check_params: FolderTrustCheckParams + folder_trust_check_result: FolderTrustCheckResult gh_cli_auth_info: GhCLIAuthInfo handle_pending_tool_call_request: HandlePendingToolCallRequest handle_pending_tool_call_result: HandlePendingToolCallResult @@ -14333,6 +15112,12 @@ class RPC: permission_decision_reject: PermissionDecisionReject permission_decision_request: PermissionDecisionRequest permission_decision_user_not_available: PermissionDecisionUserNotAvailable + permission_location_add_tool_approval_params: PermissionLocationAddToolApprovalParams + permission_location_apply_params: PermissionLocationApplyParams + permission_location_apply_result: PermissionLocationApplyResult + permission_location_resolve_params: PermissionLocationResolveParams + permission_location_resolve_result: PermissionLocationResolveResult + permission_location_type: PermissionLocationType permission_paths_add_params: PermissionPathsAddParams permission_paths_allowed_check_params: PermissionPathsAllowedCheckParams permission_paths_allowed_check_result: PermissionPathsAllowedCheckResult @@ -14350,6 +15135,18 @@ class RPC: permissions_configure_additional_content_exclusion_policy_scope: PermissionsConfigureAdditionalContentExclusionPolicyScope permissions_configure_params: PermissionsConfigureParams permissions_configure_result: PermissionsConfigureResult + permissions_folder_trust_add_trusted_result: PermissionsFolderTrustAddTrustedResult + permissions_locations_add_tool_approval_details: PermissionsLocationsAddToolApprovalDetails + permissions_locations_add_tool_approval_details_commands: PermissionsLocationsAddToolApprovalDetailsCommands + permissions_locations_add_tool_approval_details_custom_tool: PermissionsLocationsAddToolApprovalDetailsCustomTool + permissions_locations_add_tool_approval_details_extension_management: PermissionsLocationsAddToolApprovalDetailsExtensionManagement + permissions_locations_add_tool_approval_details_extension_permission_access: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess + permissions_locations_add_tool_approval_details_mcp: PermissionsLocationsAddToolApprovalDetailsMCP + permissions_locations_add_tool_approval_details_mcp_sampling: PermissionsLocationsAddToolApprovalDetailsMCPSampling + permissions_locations_add_tool_approval_details_memory: PermissionsLocationsAddToolApprovalDetailsMemory + permissions_locations_add_tool_approval_details_read: PermissionsLocationsAddToolApprovalDetailsRead + permissions_locations_add_tool_approval_details_write: PermissionsLocationsAddToolApprovalDetailsWrite + permissions_locations_add_tool_approval_result: PermissionsLocationsAddToolApprovalResult permissions_modify_rules_params: PermissionsModifyRulesParams permissions_modify_rules_result: PermissionsModifyRulesResult permissions_modify_rules_scope: PermissionsModifyRulesScope @@ -14414,7 +15211,7 @@ class RPC: session_auth_status: SessionAuthStatus session_bulk_delete_result: SessionBulkDeleteResult session_context: SessionContext - session_context_host_type: SessionContextHostType + session_context_host_type: HostType session_enrich_metadata_result: SessionEnrichMetadataResult session_fs_append_file_request: SessionFSAppendFileRequest session_fs_error: SessionFSError @@ -14450,6 +15247,7 @@ class RPC: session_installed_plugin_source_local: SessionInstalledPluginSourceLocal session_installed_plugin_source_url: SessionInstalledPluginSourceURL session_list: SessionList + session_list_filter: SessionListFilter session_load_deferred_repo_hooks_result: SessionLoadDeferredRepoHooksResult session_log_level: SessionLogLevel session_metadata: SessionMetadata @@ -14491,7 +15289,7 @@ class RPC: session_update_options_params: SessionUpdateOptionsParams session_update_options_result: SessionUpdateOptionsResult session_working_directory_context: SessionWorkingDirectoryContext - session_working_directory_context_host_type: SessionContextHostType + session_working_directory_context_host_type: HostType shell_exec_request: ShellExecRequest shell_exec_result: ShellExecResult shell_kill_request: ShellKillRequest @@ -14522,6 +15320,7 @@ class RPC: task_execution_mode: TaskExecutionMode task_info: TaskInfo task_list: TaskList + task_progress_line: TaskProgressLine tasks_cancel_request: TasksCancelRequest tasks_cancel_result: TasksCancelResult tasks_get_current_promotable_result: TasksGetCurrentPromotableResult @@ -14529,7 +15328,7 @@ class RPC: tasks_get_progress_result: TasksGetProgressResult task_shell_info: TaskShellInfo task_shell_info_attachment_mode: TaskShellInfoAttachmentMode - task_shell_progress: None + task_shell_progress: TaskShellProgress tasks_promote_current_to_background_result: TasksPromoteCurrentToBackgroundResult tasks_promote_to_background_request: TasksPromoteToBackgroundRequest tasks_promote_to_background_result: TasksPromoteToBackgroundResult @@ -14610,8 +15409,10 @@ class RPC: workspaces_read_file_result: WorkspacesReadFileResult workspaces_save_large_paste_request: WorkspacesSaveLargePasteRequest workspaces_save_large_paste_result: WorkspacesSaveLargePasteResult + workspace_summary_host_type: HostType + workspaces_workspace_details_host_type: HostType session_context_info: SessionContextInfo | None = None - task_progress: TaskProgressClass | None = None + task_progress: TaskProgress | None = None workspace_summary: WorkspaceSummary | None = None @staticmethod @@ -14691,6 +15492,9 @@ def from_dict(obj: Any) -> 'RPC': filter_mapping = from_union([lambda x: from_dict(ContentFilterMode, x), ContentFilterMode], obj.get("FilterMapping")) fleet_start_request = FleetStartRequest.from_dict(obj.get("FleetStartRequest")) fleet_start_result = FleetStartResult.from_dict(obj.get("FleetStartResult")) + folder_trust_add_params = FolderTrustAddParams.from_dict(obj.get("FolderTrustAddParams")) + folder_trust_check_params = FolderTrustCheckParams.from_dict(obj.get("FolderTrustCheckParams")) + folder_trust_check_result = FolderTrustCheckResult.from_dict(obj.get("FolderTrustCheckResult")) gh_cli_auth_info = GhCLIAuthInfo.from_dict(obj.get("GhCliAuthInfo")) handle_pending_tool_call_request = HandlePendingToolCallRequest.from_dict(obj.get("HandlePendingToolCallRequest")) handle_pending_tool_call_result = HandlePendingToolCallResult.from_dict(obj.get("HandlePendingToolCallResult")) @@ -14824,6 +15628,12 @@ def from_dict(obj: Any) -> 'RPC': permission_decision_reject = PermissionDecisionReject.from_dict(obj.get("PermissionDecisionReject")) permission_decision_request = PermissionDecisionRequest.from_dict(obj.get("PermissionDecisionRequest")) permission_decision_user_not_available = PermissionDecisionUserNotAvailable.from_dict(obj.get("PermissionDecisionUserNotAvailable")) + permission_location_add_tool_approval_params = PermissionLocationAddToolApprovalParams.from_dict(obj.get("PermissionLocationAddToolApprovalParams")) + permission_location_apply_params = PermissionLocationApplyParams.from_dict(obj.get("PermissionLocationApplyParams")) + permission_location_apply_result = PermissionLocationApplyResult.from_dict(obj.get("PermissionLocationApplyResult")) + permission_location_resolve_params = PermissionLocationResolveParams.from_dict(obj.get("PermissionLocationResolveParams")) + permission_location_resolve_result = PermissionLocationResolveResult.from_dict(obj.get("PermissionLocationResolveResult")) + permission_location_type = PermissionLocationType(obj.get("PermissionLocationType")) permission_paths_add_params = PermissionPathsAddParams.from_dict(obj.get("PermissionPathsAddParams")) permission_paths_allowed_check_params = PermissionPathsAllowedCheckParams.from_dict(obj.get("PermissionPathsAllowedCheckParams")) permission_paths_allowed_check_result = PermissionPathsAllowedCheckResult.from_dict(obj.get("PermissionPathsAllowedCheckResult")) @@ -14841,6 +15651,18 @@ def from_dict(obj: Any) -> 'RPC': permissions_configure_additional_content_exclusion_policy_scope = PermissionsConfigureAdditionalContentExclusionPolicyScope(obj.get("PermissionsConfigureAdditionalContentExclusionPolicyScope")) permissions_configure_params = PermissionsConfigureParams.from_dict(obj.get("PermissionsConfigureParams")) permissions_configure_result = PermissionsConfigureResult.from_dict(obj.get("PermissionsConfigureResult")) + permissions_folder_trust_add_trusted_result = PermissionsFolderTrustAddTrustedResult.from_dict(obj.get("PermissionsFolderTrustAddTrustedResult")) + permissions_locations_add_tool_approval_details = PermissionsLocationsAddToolApprovalDetails.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetails")) + permissions_locations_add_tool_approval_details_commands = PermissionsLocationsAddToolApprovalDetailsCommands.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsCommands")) + permissions_locations_add_tool_approval_details_custom_tool = PermissionsLocationsAddToolApprovalDetailsCustomTool.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsCustomTool")) + permissions_locations_add_tool_approval_details_extension_management = PermissionsLocationsAddToolApprovalDetailsExtensionManagement.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsExtensionManagement")) + permissions_locations_add_tool_approval_details_extension_permission_access = PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess")) + permissions_locations_add_tool_approval_details_mcp = PermissionsLocationsAddToolApprovalDetailsMCP.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsMcp")) + permissions_locations_add_tool_approval_details_mcp_sampling = PermissionsLocationsAddToolApprovalDetailsMCPSampling.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsMcpSampling")) + permissions_locations_add_tool_approval_details_memory = PermissionsLocationsAddToolApprovalDetailsMemory.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsMemory")) + permissions_locations_add_tool_approval_details_read = PermissionsLocationsAddToolApprovalDetailsRead.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsRead")) + permissions_locations_add_tool_approval_details_write = PermissionsLocationsAddToolApprovalDetailsWrite.from_dict(obj.get("PermissionsLocationsAddToolApprovalDetailsWrite")) + permissions_locations_add_tool_approval_result = PermissionsLocationsAddToolApprovalResult.from_dict(obj.get("PermissionsLocationsAddToolApprovalResult")) permissions_modify_rules_params = PermissionsModifyRulesParams.from_dict(obj.get("PermissionsModifyRulesParams")) permissions_modify_rules_result = PermissionsModifyRulesResult.from_dict(obj.get("PermissionsModifyRulesResult")) permissions_modify_rules_scope = PermissionsModifyRulesScope(obj.get("PermissionsModifyRulesScope")) @@ -14905,7 +15727,7 @@ def from_dict(obj: Any) -> 'RPC': session_auth_status = SessionAuthStatus.from_dict(obj.get("SessionAuthStatus")) session_bulk_delete_result = SessionBulkDeleteResult.from_dict(obj.get("SessionBulkDeleteResult")) session_context = SessionContext.from_dict(obj.get("SessionContext")) - session_context_host_type = SessionContextHostType(obj.get("SessionContextHostType")) + session_context_host_type = HostType(obj.get("SessionContextHostType")) session_enrich_metadata_result = SessionEnrichMetadataResult.from_dict(obj.get("SessionEnrichMetadataResult")) session_fs_append_file_request = SessionFSAppendFileRequest.from_dict(obj.get("SessionFsAppendFileRequest")) session_fs_error = SessionFSError.from_dict(obj.get("SessionFsError")) @@ -14941,6 +15763,7 @@ def from_dict(obj: Any) -> 'RPC': session_installed_plugin_source_local = SessionInstalledPluginSourceLocal.from_dict(obj.get("SessionInstalledPluginSourceLocal")) session_installed_plugin_source_url = SessionInstalledPluginSourceURL.from_dict(obj.get("SessionInstalledPluginSourceUrl")) session_list = SessionList.from_dict(obj.get("SessionList")) + session_list_filter = SessionListFilter.from_dict(obj.get("SessionListFilter")) session_load_deferred_repo_hooks_result = SessionLoadDeferredRepoHooksResult.from_dict(obj.get("SessionLoadDeferredRepoHooksResult")) session_log_level = SessionLogLevel(obj.get("SessionLogLevel")) session_metadata = SessionMetadata.from_dict(obj.get("SessionMetadata")) @@ -14982,7 +15805,7 @@ def from_dict(obj: Any) -> 'RPC': session_update_options_params = SessionUpdateOptionsParams.from_dict(obj.get("SessionUpdateOptionsParams")) session_update_options_result = SessionUpdateOptionsResult.from_dict(obj.get("SessionUpdateOptionsResult")) session_working_directory_context = SessionWorkingDirectoryContext.from_dict(obj.get("SessionWorkingDirectoryContext")) - session_working_directory_context_host_type = SessionContextHostType(obj.get("SessionWorkingDirectoryContextHostType")) + session_working_directory_context_host_type = HostType(obj.get("SessionWorkingDirectoryContextHostType")) shell_exec_request = ShellExecRequest.from_dict(obj.get("ShellExecRequest")) shell_exec_result = ShellExecResult.from_dict(obj.get("ShellExecResult")) shell_kill_request = ShellKillRequest.from_dict(obj.get("ShellKillRequest")) @@ -15013,6 +15836,7 @@ def from_dict(obj: Any) -> 'RPC': task_execution_mode = TaskExecutionMode(obj.get("TaskExecutionMode")) task_info = TaskInfo.from_dict(obj.get("TaskInfo")) task_list = TaskList.from_dict(obj.get("TaskList")) + task_progress_line = TaskProgressLine.from_dict(obj.get("TaskProgressLine")) tasks_cancel_request = TasksCancelRequest.from_dict(obj.get("TasksCancelRequest")) tasks_cancel_result = TasksCancelResult.from_dict(obj.get("TasksCancelResult")) tasks_get_current_promotable_result = TasksGetCurrentPromotableResult.from_dict(obj.get("TasksGetCurrentPromotableResult")) @@ -15020,7 +15844,7 @@ def from_dict(obj: Any) -> 'RPC': tasks_get_progress_result = TasksGetProgressResult.from_dict(obj.get("TasksGetProgressResult")) task_shell_info = TaskShellInfo.from_dict(obj.get("TaskShellInfo")) task_shell_info_attachment_mode = TaskShellInfoAttachmentMode(obj.get("TaskShellInfoAttachmentMode")) - task_shell_progress = from_none(obj.get("TaskShellProgress")) + task_shell_progress = TaskShellProgress.from_dict(obj.get("TaskShellProgress")) tasks_promote_current_to_background_result = TasksPromoteCurrentToBackgroundResult.from_dict(obj.get("TasksPromoteCurrentToBackgroundResult")) tasks_promote_to_background_request = TasksPromoteToBackgroundRequest.from_dict(obj.get("TasksPromoteToBackgroundRequest")) tasks_promote_to_background_result = TasksPromoteToBackgroundResult.from_dict(obj.get("TasksPromoteToBackgroundResult")) @@ -15101,10 +15925,12 @@ def from_dict(obj: Any) -> 'RPC': workspaces_read_file_result = WorkspacesReadFileResult.from_dict(obj.get("WorkspacesReadFileResult")) workspaces_save_large_paste_request = WorkspacesSaveLargePasteRequest.from_dict(obj.get("WorkspacesSaveLargePasteRequest")) workspaces_save_large_paste_result = WorkspacesSaveLargePasteResult.from_dict(obj.get("WorkspacesSaveLargePasteResult")) + 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")) - task_progress = from_union([TaskProgressClass.from_dict, from_none], obj.get("TaskProgress")) + 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_reload_result, agent_select_request, agent_select_result, api_key_auth_info, auth_info, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_source, installed_plugin_source_github, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, lsp_initialize_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_remove_git_hub_result, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_auth, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_list, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, options_update_env_value_mode, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, release_event_interest_params, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_mode, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, send_agent_mode, send_attachment, send_attachment_blob, send_attachment_directory, send_attachment_file, send_attachment_file_line_range, send_attachment_github_reference, send_attachment_github_reference_type, send_attachment_selection, send_attachment_selection_details, send_attachment_selection_details_end, send_attachment_selection_details_start, send_mode, send_request, send_result, server_skill, server_skill_list, session_auth_status, session_bulk_delete_result, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_github, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_load_deferred_repo_hooks_result, session_log_level, session_metadata, session_metadata_snapshot, session_mode, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_prune_old_request, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_tool_session_approval_commands, user_tool_session_approval_custom_tool, user_tool_session_approval_extension_management, user_tool_session_approval_extension_permission_access, user_tool_session_approval_mcp, user_tool_session_approval_memory, user_tool_session_approval_read, user_tool_session_approval_write, workspaces_checkpoints, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, session_context_info, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_get_quota_request, account_get_quota_result, account_quota_snapshot, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_reload_result, agent_select_request, agent_select_result, api_key_auth_info, auth_info, auth_info_type, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, 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_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_source, installed_plugin_source_github, installed_plugin_source_local, installed_plugin_source_url, instructions_get_sources_result, instructions_sources, instructions_sources_location, instructions_sources_type, log_request, log_result, lsp_initialize_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_oauth_login_request, mcp_oauth_login_result, mcp_remove_git_hub_result, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_config, mcp_server_config_http, mcp_server_config_http_auth, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_list, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, options_update_env_value_mode, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_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_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_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_update_request, plugin, plugin_list, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, release_event_interest_params, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_mode, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, send_agent_mode, send_attachment, send_attachment_blob, send_attachment_directory, send_attachment_file, send_attachment_file_line_range, send_attachment_github_reference, send_attachment_github_reference_type, send_attachment_selection, send_attachment_selection_details, send_attachment_selection_details_end, send_attachment_selection_details_start, send_mode, send_request, send_result, server_skill, server_skill_list, session_auth_status, session_bulk_delete_result, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_github, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_metadata, session_metadata_snapshot, session_mode, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_prune_old_request, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, session_update_options_params, session_update_options_result, session_working_directory_context, session_working_directory_context_host_type, shell_exec_request, shell_exec_result, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, 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_initialize_and_validate_result, tools_list_request, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_tool_session_approval_commands, user_tool_session_approval_custom_tool, user_tool_session_approval_extension_management, user_tool_session_approval_extension_permission_access, user_tool_session_approval_mcp, user_tool_session_approval_memory, user_tool_session_approval_read, user_tool_session_approval_write, workspaces_checkpoints, workspaces_create_file_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -15182,6 +16008,9 @@ def to_dict(self) -> dict: result["FilterMapping"] = from_union([lambda x: from_dict(lambda x: to_enum(ContentFilterMode, x), x), lambda x: to_enum(ContentFilterMode, x)], self.filter_mapping) result["FleetStartRequest"] = to_class(FleetStartRequest, self.fleet_start_request) result["FleetStartResult"] = to_class(FleetStartResult, self.fleet_start_result) + result["FolderTrustAddParams"] = to_class(FolderTrustAddParams, self.folder_trust_add_params) + result["FolderTrustCheckParams"] = to_class(FolderTrustCheckParams, self.folder_trust_check_params) + result["FolderTrustCheckResult"] = to_class(FolderTrustCheckResult, self.folder_trust_check_result) result["GhCliAuthInfo"] = to_class(GhCLIAuthInfo, self.gh_cli_auth_info) result["HandlePendingToolCallRequest"] = to_class(HandlePendingToolCallRequest, self.handle_pending_tool_call_request) result["HandlePendingToolCallResult"] = to_class(HandlePendingToolCallResult, self.handle_pending_tool_call_result) @@ -15315,6 +16144,12 @@ def to_dict(self) -> dict: result["PermissionDecisionReject"] = to_class(PermissionDecisionReject, self.permission_decision_reject) result["PermissionDecisionRequest"] = to_class(PermissionDecisionRequest, self.permission_decision_request) result["PermissionDecisionUserNotAvailable"] = to_class(PermissionDecisionUserNotAvailable, self.permission_decision_user_not_available) + result["PermissionLocationAddToolApprovalParams"] = to_class(PermissionLocationAddToolApprovalParams, self.permission_location_add_tool_approval_params) + result["PermissionLocationApplyParams"] = to_class(PermissionLocationApplyParams, self.permission_location_apply_params) + result["PermissionLocationApplyResult"] = to_class(PermissionLocationApplyResult, self.permission_location_apply_result) + result["PermissionLocationResolveParams"] = to_class(PermissionLocationResolveParams, self.permission_location_resolve_params) + result["PermissionLocationResolveResult"] = to_class(PermissionLocationResolveResult, self.permission_location_resolve_result) + result["PermissionLocationType"] = to_enum(PermissionLocationType, self.permission_location_type) result["PermissionPathsAddParams"] = to_class(PermissionPathsAddParams, self.permission_paths_add_params) result["PermissionPathsAllowedCheckParams"] = to_class(PermissionPathsAllowedCheckParams, self.permission_paths_allowed_check_params) result["PermissionPathsAllowedCheckResult"] = to_class(PermissionPathsAllowedCheckResult, self.permission_paths_allowed_check_result) @@ -15332,6 +16167,18 @@ def to_dict(self) -> dict: result["PermissionsConfigureAdditionalContentExclusionPolicyScope"] = to_enum(PermissionsConfigureAdditionalContentExclusionPolicyScope, self.permissions_configure_additional_content_exclusion_policy_scope) result["PermissionsConfigureParams"] = to_class(PermissionsConfigureParams, self.permissions_configure_params) result["PermissionsConfigureResult"] = to_class(PermissionsConfigureResult, self.permissions_configure_result) + result["PermissionsFolderTrustAddTrustedResult"] = to_class(PermissionsFolderTrustAddTrustedResult, self.permissions_folder_trust_add_trusted_result) + result["PermissionsLocationsAddToolApprovalDetails"] = to_class(PermissionsLocationsAddToolApprovalDetails, self.permissions_locations_add_tool_approval_details) + result["PermissionsLocationsAddToolApprovalDetailsCommands"] = to_class(PermissionsLocationsAddToolApprovalDetailsCommands, self.permissions_locations_add_tool_approval_details_commands) + result["PermissionsLocationsAddToolApprovalDetailsCustomTool"] = to_class(PermissionsLocationsAddToolApprovalDetailsCustomTool, self.permissions_locations_add_tool_approval_details_custom_tool) + result["PermissionsLocationsAddToolApprovalDetailsExtensionManagement"] = to_class(PermissionsLocationsAddToolApprovalDetailsExtensionManagement, self.permissions_locations_add_tool_approval_details_extension_management) + result["PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess"] = to_class(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess, self.permissions_locations_add_tool_approval_details_extension_permission_access) + result["PermissionsLocationsAddToolApprovalDetailsMcp"] = to_class(PermissionsLocationsAddToolApprovalDetailsMCP, self.permissions_locations_add_tool_approval_details_mcp) + result["PermissionsLocationsAddToolApprovalDetailsMcpSampling"] = to_class(PermissionsLocationsAddToolApprovalDetailsMCPSampling, self.permissions_locations_add_tool_approval_details_mcp_sampling) + result["PermissionsLocationsAddToolApprovalDetailsMemory"] = to_class(PermissionsLocationsAddToolApprovalDetailsMemory, self.permissions_locations_add_tool_approval_details_memory) + result["PermissionsLocationsAddToolApprovalDetailsRead"] = to_class(PermissionsLocationsAddToolApprovalDetailsRead, self.permissions_locations_add_tool_approval_details_read) + result["PermissionsLocationsAddToolApprovalDetailsWrite"] = to_class(PermissionsLocationsAddToolApprovalDetailsWrite, self.permissions_locations_add_tool_approval_details_write) + result["PermissionsLocationsAddToolApprovalResult"] = to_class(PermissionsLocationsAddToolApprovalResult, self.permissions_locations_add_tool_approval_result) result["PermissionsModifyRulesParams"] = to_class(PermissionsModifyRulesParams, self.permissions_modify_rules_params) result["PermissionsModifyRulesResult"] = to_class(PermissionsModifyRulesResult, self.permissions_modify_rules_result) result["PermissionsModifyRulesScope"] = to_enum(PermissionsModifyRulesScope, self.permissions_modify_rules_scope) @@ -15396,7 +16243,7 @@ def to_dict(self) -> dict: result["SessionAuthStatus"] = to_class(SessionAuthStatus, self.session_auth_status) result["SessionBulkDeleteResult"] = to_class(SessionBulkDeleteResult, self.session_bulk_delete_result) result["SessionContext"] = to_class(SessionContext, self.session_context) - result["SessionContextHostType"] = to_enum(SessionContextHostType, self.session_context_host_type) + result["SessionContextHostType"] = to_enum(HostType, self.session_context_host_type) result["SessionEnrichMetadataResult"] = to_class(SessionEnrichMetadataResult, self.session_enrich_metadata_result) result["SessionFsAppendFileRequest"] = to_class(SessionFSAppendFileRequest, self.session_fs_append_file_request) result["SessionFsError"] = to_class(SessionFSError, self.session_fs_error) @@ -15432,6 +16279,7 @@ def to_dict(self) -> dict: result["SessionInstalledPluginSourceLocal"] = to_class(SessionInstalledPluginSourceLocal, self.session_installed_plugin_source_local) result["SessionInstalledPluginSourceUrl"] = to_class(SessionInstalledPluginSourceURL, self.session_installed_plugin_source_url) result["SessionList"] = to_class(SessionList, self.session_list) + result["SessionListFilter"] = to_class(SessionListFilter, self.session_list_filter) result["SessionLoadDeferredRepoHooksResult"] = to_class(SessionLoadDeferredRepoHooksResult, self.session_load_deferred_repo_hooks_result) result["SessionLogLevel"] = to_enum(SessionLogLevel, self.session_log_level) result["SessionMetadata"] = to_class(SessionMetadata, self.session_metadata) @@ -15473,7 +16321,7 @@ def to_dict(self) -> dict: result["SessionUpdateOptionsParams"] = to_class(SessionUpdateOptionsParams, self.session_update_options_params) result["SessionUpdateOptionsResult"] = to_class(SessionUpdateOptionsResult, self.session_update_options_result) result["SessionWorkingDirectoryContext"] = to_class(SessionWorkingDirectoryContext, self.session_working_directory_context) - result["SessionWorkingDirectoryContextHostType"] = to_enum(SessionContextHostType, self.session_working_directory_context_host_type) + result["SessionWorkingDirectoryContextHostType"] = to_enum(HostType, self.session_working_directory_context_host_type) result["ShellExecRequest"] = to_class(ShellExecRequest, self.shell_exec_request) result["ShellExecResult"] = to_class(ShellExecResult, self.shell_exec_result) result["ShellKillRequest"] = to_class(ShellKillRequest, self.shell_kill_request) @@ -15504,6 +16352,7 @@ def to_dict(self) -> dict: result["TaskExecutionMode"] = to_enum(TaskExecutionMode, self.task_execution_mode) result["TaskInfo"] = to_class(TaskInfo, self.task_info) result["TaskList"] = to_class(TaskList, self.task_list) + result["TaskProgressLine"] = to_class(TaskProgressLine, self.task_progress_line) result["TasksCancelRequest"] = to_class(TasksCancelRequest, self.tasks_cancel_request) result["TasksCancelResult"] = to_class(TasksCancelResult, self.tasks_cancel_result) result["TasksGetCurrentPromotableResult"] = to_class(TasksGetCurrentPromotableResult, self.tasks_get_current_promotable_result) @@ -15511,7 +16360,7 @@ def to_dict(self) -> dict: result["TasksGetProgressResult"] = to_class(TasksGetProgressResult, self.tasks_get_progress_result) result["TaskShellInfo"] = to_class(TaskShellInfo, self.task_shell_info) result["TaskShellInfoAttachmentMode"] = to_enum(TaskShellInfoAttachmentMode, self.task_shell_info_attachment_mode) - result["TaskShellProgress"] = from_none(self.task_shell_progress) + result["TaskShellProgress"] = to_class(TaskShellProgress, self.task_shell_progress) result["TasksPromoteCurrentToBackgroundResult"] = to_class(TasksPromoteCurrentToBackgroundResult, self.tasks_promote_current_to_background_result) result["TasksPromoteToBackgroundRequest"] = to_class(TasksPromoteToBackgroundRequest, self.tasks_promote_to_background_request) result["TasksPromoteToBackgroundResult"] = to_class(TasksPromoteToBackgroundResult, self.tasks_promote_to_background_result) @@ -15592,8 +16441,10 @@ def to_dict(self) -> dict: result["WorkspacesReadFileResult"] = to_class(WorkspacesReadFileResult, self.workspaces_read_file_result) result["WorkspacesSaveLargePasteRequest"] = to_class(WorkspacesSaveLargePasteRequest, self.workspaces_save_large_paste_request) result["WorkspacesSaveLargePasteResult"] = to_class(WorkspacesSaveLargePasteResult, self.workspaces_save_large_paste_result) + 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["TaskProgress"] = from_union([lambda x: to_class(TaskProgressClass, x), from_none], self.task_progress) + 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 @@ -15609,12 +16460,12 @@ def rpc_to_dict(x: RPC) -> Any: McpExecuteSamplingRequest = dict McpExecuteSamplingResult = dict OptionsUpdateEnvValueMode = MCPSetEnvValueModeDetails -SessionWorkingDirectoryContextHostType = SessionContextHostType +SessionContextHostType = HostType +SessionWorkingDirectoryContextHostType = HostType TaskInfoExecutionMode = TaskExecutionMode TaskInfoStatus = TaskStatus -TaskInfoType = TaskAgentProgressType -TaskProgress = TaskProgressClass -TaskShellProgress = None +WorkspaceSummaryHostType = HostType +WorkspacesWorkspaceDetailsHostType = HostType def _timeout_kwargs(timeout: float | None) -> dict: """Build keyword arguments for optional timeout forwarding.""" @@ -15879,6 +16730,7 @@ async def connect(self, params: ConnectRequest, *, timeout: float | None = None) return ConnectResult.from_dict(await self._client.request("connect", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class AuthApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -15895,6 +16747,7 @@ async def set_credentials(self, params: SessionSetCredentialsParams, *, timeout: return SessionSetCredentialsResult.from_dict(await self._client.request("session.auth.setCredentials", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class ModelApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -15917,6 +16770,7 @@ async def set_reasoning_effort(self, params: ModelSetReasoningEffortRequest, *, return ModelSetReasoningEffortResult.from_dict(await self._client.request("session.model.setReasoningEffort", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class ModeApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -15933,6 +16787,7 @@ async def set(self, params: ModeSetRequest, *, timeout: float | None = None) -> await self._client.request("session.mode.set", params_dict, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. class NameApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -15955,6 +16810,7 @@ async def set_auto(self, params: NameSetAutoRequest, *, timeout: float | None = return NameSetAutoResult.from_dict(await self._client.request("session.name.setAuto", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class PlanApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -15975,6 +16831,7 @@ async def delete(self, *, timeout: float | None = None) -> None: await self._client.request("session.plan.delete", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. class WorkspacesApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16017,6 +16874,7 @@ async def save_large_paste(self, params: WorkspacesSaveLargePasteRequest, *, tim return WorkspacesSaveLargePasteResult.from_dict(await self._client.request("session.workspaces.saveLargePaste", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class InstructionsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16294,6 +17152,7 @@ async def reload(self, *, timeout: float | None = None) -> None: await self._client.request("session.extensions.reload", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. class ToolsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16310,6 +17169,7 @@ async def initialize_and_validate(self, *, timeout: float | None = None) -> Tool return ToolsInitializeAndValidateResult.from_dict(await self._client.request("session.tools.initializeAndValidate", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class CommandsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16365,6 +17225,7 @@ async def set_feature_overrides(self, params: TelemetrySetFeatureOverridesReques await self._client.request("session.telemetry.setFeatureOverrides", params_dict, **_timeout_kwargs(timeout)) +# Experimental: this API group is experimental and may change or be removed. class UiApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16417,6 +17278,7 @@ async def unregister_direct_auto_mode_switch_handler(self, params: UIUnregisterD return UIUnregisterDirectAutoModeSwitchHandlerResult.from_dict(await self._client.request("session.ui.unregisterDirectAutoModeSwitchHandler", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class PermissionsPathsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16451,6 +17313,51 @@ async def is_path_within_workspace(self, params: PermissionPathsWorkspaceCheckPa return PermissionPathsWorkspaceCheckResult.from_dict(await self._client.request("session.permissions.paths.isPathWithinWorkspace", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. +class PermissionsLocationsApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def resolve(self, params: PermissionLocationResolveParams, *, timeout: float | None = None) -> PermissionLocationResolveResult: + "Resolves the permission location key and type for a working directory.\n\nArgs:\n params: Working directory to resolve into a location-permissions key.\n\nReturns:\n Resolved location-permissions key and type." + 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 PermissionLocationResolveResult.from_dict(await self._client.request("session.permissions.locations.resolve", params_dict, **_timeout_kwargs(timeout))) + + async def apply(self, params: PermissionLocationApplyParams, *, timeout: float | None = None) -> PermissionLocationApplyResult: + "Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session's permission service.\n\nArgs:\n params: Working directory to load persisted location permissions for.\n\nReturns:\n Summary of persisted location permissions applied to the session." + 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 PermissionLocationApplyResult.from_dict(await self._client.request("session.permissions.locations.apply", params_dict, **_timeout_kwargs(timeout))) + + async def add_tool_approval(self, params: PermissionLocationAddToolApprovalParams, *, timeout: float | None = None) -> PermissionsLocationsAddToolApprovalResult: + "Persists a tool approval for a permission location and applies its rules to this session's live permission service.\n\nArgs:\n params: Location-scoped tool approval to persist.\n\nReturns:\n Indicates whether the operation succeeded." + 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 PermissionsLocationsAddToolApprovalResult.from_dict(await self._client.request("session.permissions.locations.addToolApproval", params_dict, **_timeout_kwargs(timeout))) + + +# Experimental: this API group is experimental and may change or be removed. +class PermissionsFolderTrustApi: + def __init__(self, client: "JsonRpcClient", session_id: str): + self._client = client + self._session_id = session_id + + async def is_trusted(self, params: FolderTrustCheckParams, *, timeout: float | None = None) -> FolderTrustCheckResult: + "Reports whether a folder is trusted according to the user's folder trust state.\n\nArgs:\n params: Folder path to check for trust.\n\nReturns:\n Folder trust check result." + 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 FolderTrustCheckResult.from_dict(await self._client.request("session.permissions.folderTrust.isTrusted", params_dict, **_timeout_kwargs(timeout))) + + async def add_trusted(self, params: FolderTrustAddParams, *, timeout: float | None = None) -> PermissionsFolderTrustAddTrustedResult: + "Adds a folder to the user's trusted folders list.\n\nArgs:\n params: Folder path to add to trusted folders.\n\nReturns:\n Indicates whether the operation succeeded." + 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 PermissionsFolderTrustAddTrustedResult.from_dict(await self._client.request("session.permissions.folderTrust.addTrusted", params_dict, **_timeout_kwargs(timeout))) + + +# Experimental: this API group is experimental and may change or be removed. class PermissionsUrlsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16463,11 +17370,14 @@ async def set_unrestricted_mode(self, params: PermissionUrlsSetUnrestrictedModeP return PermissionsUrlsSetUnrestrictedModeResult.from_dict(await self._client.request("session.permissions.urls.setUnrestrictedMode", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class PermissionsApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client self._session_id = session_id self.paths = PermissionsPathsApi(client, session_id) + self.locations = PermissionsLocationsApi(client, session_id) + self.folder_trust = PermissionsFolderTrustApi(client, session_id) self.urls = PermissionsUrlsApi(client, session_id) async def configure(self, params: PermissionsConfigureParams, *, timeout: float | None = None) -> PermissionsConfigureResult: @@ -16554,6 +17464,7 @@ async def recompute_context_tokens(self, params: MetadataRecomputeContextTokensR return MetadataRecomputeContextTokensResult.from_dict(await self._client.request("session.metadata.recomputeContextTokens", params_dict, **_timeout_kwargs(timeout))) +# Experimental: this API group is experimental and may change or be removed. class ShellApi: def __init__(self, client: "JsonRpcClient", session_id: str): self._client = client @@ -16736,29 +17647,29 @@ def __init__(self, client: "JsonRpcClient", session_id: str): self.schedule = ScheduleApi(client, session_id) async def suspend(self, *, timeout: float | None = None) -> None: - "Suspends the session while preserving persisted state for later resume." + "Suspends the session while preserving persisted state for later resume.\n\n.. warning:: This API is experimental and may change or be removed in future versions." await self._client.request("session.suspend", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)) async def send(self, params: SendRequest, *, timeout: float | None = None) -> SendResult: - "Sends a user message to the session and returns its message ID.\n\nArgs:\n params: Parameters for sending a user message to the session\n\nReturns:\n Result of sending a user message" + "Sends a user message to the session and returns its message ID.\n\nArgs:\n params: Parameters for sending a user message to the session\n\nReturns:\n Result of sending a user message\n\n.. warning:: This API is experimental and may change or be removed in future versions." 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 SendResult.from_dict(await self._client.request("session.send", params_dict, **_timeout_kwargs(timeout))) async def abort(self, params: AbortRequest, *, timeout: float | None = None) -> AbortResult: - "Aborts the current agent turn.\n\nArgs:\n params: Parameters for aborting the current turn\n\nReturns:\n Result of aborting the current turn" + "Aborts the current agent turn.\n\nArgs:\n params: Parameters for aborting the current turn\n\nReturns:\n Result of aborting the current turn\n\n.. warning:: This API is experimental and may change or be removed in future versions." 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 AbortResult.from_dict(await self._client.request("session.abort", params_dict, **_timeout_kwargs(timeout))) async def shutdown(self, params: ShutdownRequest, *, timeout: float | None = None) -> None: - "Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.\n\nArgs:\n params: Parameters for shutting down the session" + "Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.\n\nArgs:\n params: Parameters for shutting down the session\n\n.. warning:: This API is experimental and may change or be removed in future versions." 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 await self._client.request("session.shutdown", params_dict, **_timeout_kwargs(timeout)) async def log(self, params: LogRequest, *, timeout: float | None = None) -> LogResult: - "Emits a user-visible session log event.\n\nArgs:\n params: Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.\n\nReturns:\n Identifier of the session event that was emitted for the log message." + "Emits a user-visible session log event.\n\nArgs:\n params: Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.\n\nReturns:\n Identifier of the session event that was emitted for the log message.\n\n.. warning:: This API is experimental and may change or be removed in future versions." 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 LogResult.from_dict(await self._client.request("session.log", params_dict, **_timeout_kwargs(timeout))) diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index fa53f1053..b7ebd6c48 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -280,6 +280,19 @@ pub mod rpc_methods { /// `session.permissions.paths.isPathWithinWorkspace` pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE: &str = "session.permissions.paths.isPathWithinWorkspace"; + /// `session.permissions.locations.resolve` + pub const SESSION_PERMISSIONS_LOCATIONS_RESOLVE: &str = "session.permissions.locations.resolve"; + /// `session.permissions.locations.apply` + pub const SESSION_PERMISSIONS_LOCATIONS_APPLY: &str = "session.permissions.locations.apply"; + /// `session.permissions.locations.addToolApproval` + pub const SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL: &str = + "session.permissions.locations.addToolApproval"; + /// `session.permissions.folderTrust.isTrusted` + pub const SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED: &str = + "session.permissions.folderTrust.isTrusted"; + /// `session.permissions.folderTrust.addTrusted` + pub const SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED: &str = + "session.permissions.folderTrust.addTrusted"; /// `session.permissions.urls.setUnrestrictedMode` pub const SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE: &str = "session.permissions.urls.setUnrestrictedMode"; @@ -366,6 +379,13 @@ pub mod rpc_methods { } /// Parameters for aborting the current turn +/// +///
+/// +/// **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 AbortRequest { @@ -375,6 +395,13 @@ pub struct AbortRequest { } /// Result of aborting the current turn +/// +///
+/// +/// **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 AbortResult { @@ -543,6 +570,13 @@ pub struct AgentSelectResult { } /// Schema for the `CopilotUserResponseEndpoints` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseEndpoints { @@ -557,6 +591,13 @@ pub struct CopilotUserResponseEndpoints { } /// Schema for the `CopilotUserResponseQuotaSnapshotsChat` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsChat { @@ -590,6 +631,13 @@ pub struct CopilotUserResponseQuotaSnapshotsChat { } /// Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsCompletions { @@ -623,6 +671,13 @@ pub struct CopilotUserResponseQuotaSnapshotsCompletions { } /// Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { @@ -656,6 +711,13 @@ pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { } /// Schema for the `CopilotUserResponseQuotaSnapshots` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotUserResponseQuotaSnapshots { @@ -674,6 +736,13 @@ pub struct CopilotUserResponseQuotaSnapshots { } /// Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. +/// +///
+/// +/// **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 CopilotUserResponse { @@ -758,6 +827,13 @@ pub struct CopilotUserResponse { } /// Schema for the `ApiKeyAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ApiKeyAuthInfo { @@ -773,6 +849,13 @@ pub struct ApiKeyAuthInfo { } /// Optional unstructured input hint +/// +///
+/// +/// **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 SlashCommandInput { @@ -790,6 +873,13 @@ pub struct SlashCommandInput { } /// Schema for the `SlashCommandInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandInfo { @@ -813,6 +903,13 @@ pub struct SlashCommandInfo { } /// Slash commands available in the session, after applying any include/exclude filters. +/// +///
+/// +/// **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 CommandList { @@ -821,6 +918,13 @@ pub struct CommandList { } /// Pending command request ID and an optional error if the client handler failed. +/// +///
+/// +/// **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 CommandsHandlePendingCommandRequest { @@ -832,6 +936,13 @@ pub struct CommandsHandlePendingCommandRequest { } /// Indicates whether the pending client-handled command was completed successfully. +/// +///
+/// +/// **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 CommandsHandlePendingCommandResult { @@ -840,6 +951,13 @@ pub struct CommandsHandlePendingCommandResult { } /// Slash command name and optional raw input string to invoke. +/// +///
+/// +/// **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 CommandsInvokeRequest { @@ -851,6 +969,13 @@ pub struct CommandsInvokeRequest { } /// Optional filters controlling which command sources to include in the listing. +/// +///
+/// +/// **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 CommandsListRequest { @@ -866,6 +991,13 @@ pub struct CommandsListRequest { } /// Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands). +/// +///
+/// +/// **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 CommandsRespondToQueuedCommandRequest { @@ -876,6 +1008,13 @@ pub struct CommandsRespondToQueuedCommandRequest { } /// Indicates whether the queued-command response was matched to a pending request. +/// +///
+/// +/// **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 CommandsRespondToQueuedCommandResult { @@ -980,6 +1119,13 @@ pub struct ConnectResult { } /// Schema for the `CopilotApiTokenAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CopilotApiTokenAuthInfo { @@ -993,6 +1139,13 @@ pub struct CopilotApiTokenAuthInfo { } /// The currently selected model and reasoning effort for the 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 CurrentModel { @@ -1020,6 +1173,13 @@ pub struct DiscoveredMcpServer { } /// Slash-prefixed command string to enqueue for FIFO processing. +/// +///
+/// +/// **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 EnqueueCommandParams { @@ -1028,6 +1188,13 @@ pub struct EnqueueCommandParams { } /// Indicates whether the command was accepted into the local execution queue. +/// +///
+/// +/// **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 EnqueueCommandResult { @@ -1036,6 +1203,13 @@ pub struct EnqueueCommandResult { } /// Schema for the `EnvAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EnvAuthInfo { @@ -1135,6 +1309,13 @@ pub struct EventsReadResult { } /// Slash command name and argument string to execute synchronously. +/// +///
+/// +/// **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 ExecuteCommandParams { @@ -1145,6 +1326,13 @@ pub struct ExecuteCommandParams { } /// Error message produced while executing the command, if any. +/// +///
+/// +/// **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 ExecuteCommandResult { @@ -1223,6 +1411,13 @@ pub struct ExtensionsEnableRequest { } /// Binary result returned by a tool for the model +/// +///
+/// +/// **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 ExternalToolTextResultForLlmBinaryResultsForLlm { @@ -1238,6 +1433,13 @@ pub struct ExternalToolTextResultForLlmBinaryResultsForLlm { } /// Expanded external tool result payload +/// +///
+/// +/// **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 ExternalToolTextResultForLlm { @@ -1264,6 +1466,13 @@ pub struct ExternalToolTextResultForLlm { } /// Audio content block with base64-encoded data +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentAudio { @@ -1276,6 +1485,13 @@ pub struct ExternalToolTextResultForLlmContentAudio { } /// Image content block with base64-encoded data +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentImage { @@ -1288,6 +1504,13 @@ pub struct ExternalToolTextResultForLlmContentImage { } /// Embedded resource content block with inline text or binary data +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentResource { @@ -1298,6 +1521,13 @@ pub struct ExternalToolTextResultForLlmContentResource { } /// Icon image for a resource +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentResourceLinkIcon { @@ -1315,6 +1545,13 @@ pub struct ExternalToolTextResultForLlmContentResourceLinkIcon { } /// Resource link content block referencing an external resource +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentResourceLink { @@ -1342,6 +1579,13 @@ pub struct ExternalToolTextResultForLlmContentResourceLink { } /// Terminal/shell output content block with optional exit code and working directory +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentTerminal { @@ -1358,6 +1602,13 @@ pub struct ExternalToolTextResultForLlmContentTerminal { } /// Plain text content block +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentText { @@ -1398,24 +1649,83 @@ pub struct FleetStartResult { pub started: bool, } -/// Schema for the `GhCliAuthInfo` type. +/// Folder path to add to trusted folders. +/// +///
+/// +/// **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 GhCliAuthInfo { - /// Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. - #[serde(skip_serializing_if = "Option::is_none")] - pub copilot_user: Option, - /// Authentication host. - pub host: String, - /// User login as reported by `gh auth status`. - pub login: String, - /// The token returned by `gh auth token`. Treat as a secret. - pub token: String, +pub struct FolderTrustAddParams { + /// Folder path to mark as trusted + pub path: String, +} + +/// Folder path to check for trust. +/// +///
+/// +/// **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 FolderTrustCheckParams { + /// Folder path to check + pub path: String, +} + +/// Folder trust check result. +/// +///
+/// +/// **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 FolderTrustCheckResult { + /// Whether the folder is trusted + pub trusted: bool, +} + +/// Schema for the `GhCliAuthInfo` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct GhCliAuthInfo { + /// Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set. + #[serde(skip_serializing_if = "Option::is_none")] + pub copilot_user: Option, + /// Authentication host. + pub host: String, + /// User login as reported by `gh auth status`. + pub login: String, + /// The token returned by `gh auth token`. Treat as a secret. + pub token: String, /// Authentication via the `gh` CLI's saved credentials. pub r#type: GhCliAuthInfoType, } /// Pending external tool call request ID, with the tool result or an error describing why it failed. +/// +///
+/// +/// **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 HandlePendingToolCallRequest { @@ -1430,6 +1740,13 @@ pub struct HandlePendingToolCallRequest { } /// Indicates whether the external tool call result was handled successfully. +/// +///
+/// +/// **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 HandlePendingToolCallResult { @@ -1566,6 +1883,13 @@ pub struct HistoryTruncateResult { } /// Schema for the `HMACAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct HMACAuthInfo { @@ -1668,6 +1992,13 @@ pub struct InstalledPluginSourceUrl { } /// Schema for the `InstructionsSources` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstructionsSources { @@ -1695,6 +2026,13 @@ pub struct InstructionsSources { } /// Instruction sources loaded for the session, in merge order. +/// +///
+/// +/// **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 InstructionsGetSourcesResult { @@ -1703,6 +2041,13 @@ pub struct InstructionsGetSourcesResult { } /// Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. +/// +///
+/// +/// **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 LogRequest { @@ -1726,6 +2071,13 @@ pub struct LogRequest { } /// Identifier of the session event that was emitted for the log message. +/// +///
+/// +/// **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 LogResult { @@ -2525,6 +2877,13 @@ pub struct Model { } /// Vision-specific limits +/// +///
+/// +/// **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 ModelCapabilitiesOverrideLimitsVision { @@ -2543,6 +2902,13 @@ pub struct ModelCapabilitiesOverrideLimitsVision { } /// Token limits for prompts, outputs, and context window +/// +///
+/// +/// **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 ModelCapabilitiesOverrideLimits { @@ -2564,6 +2930,13 @@ pub struct ModelCapabilitiesOverrideLimits { } /// Feature flags indicating what the model supports +/// +///
+/// +/// **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 ModelCapabilitiesOverrideSupports { @@ -2576,6 +2949,13 @@ pub struct ModelCapabilitiesOverrideSupports { } /// Override individual model capabilities resolved by the runtime +/// +///
+/// +/// **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 ModelCapabilitiesOverride { @@ -2596,6 +2976,13 @@ pub struct ModelList { } /// Reasoning effort level to apply to the currently selected model. +/// +///
+/// +/// **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 ModelSetReasoningEffortRequest { @@ -2604,6 +2991,13 @@ pub struct ModelSetReasoningEffortRequest { } /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. +/// +///
+/// +/// **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 ModelSetReasoningEffortResult { @@ -2621,6 +3015,13 @@ pub struct ModelsListRequest { } /// Target model identifier and optional reasoning effort, summary, and capability overrides. +/// +///
+/// +/// **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 ModelSwitchToRequest { @@ -2638,6 +3039,13 @@ pub struct ModelSwitchToRequest { } /// The model identifier active on the session after the switch. +/// +///
+/// +/// **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 ModelSwitchToResult { @@ -2647,6 +3055,13 @@ pub struct ModelSwitchToResult { } /// Agent interaction mode to apply to the 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 ModeSetRequest { @@ -2655,6 +3070,13 @@ pub struct ModeSetRequest { } /// The session's friendly name, or null when not yet set. +/// +///
+/// +/// **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 NameGetResult { @@ -2663,6 +3085,13 @@ pub struct NameGetResult { } /// Auto-generated session summary to apply as the session's name when no user-set name exists. +/// +///
+/// +/// **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 NameSetAutoRequest { @@ -2671,6 +3100,13 @@ pub struct NameSetAutoRequest { } /// Indicates whether the auto-generated summary was applied as the session's name. +/// +///
+/// +/// **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 NameSetAutoResult { @@ -2679,6 +3115,13 @@ pub struct NameSetAutoResult { } /// New friendly name to apply to the 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 NameSetRequest { @@ -2687,6 +3130,13 @@ pub struct NameSetRequest { } /// Schema for the `PendingPermissionRequest` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PendingPermissionRequest { @@ -2697,6 +3147,13 @@ pub struct PendingPermissionRequest { } /// List of pending permission requests reconstructed from event history. +/// +///
+/// +/// **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 PendingPermissionRequestList { @@ -2705,6 +3162,13 @@ pub struct PendingPermissionRequestList { } /// Schema for the `PermissionDecisionApproveOnce` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveOnce { @@ -2713,6 +3177,13 @@ pub struct PermissionDecisionApproveOnce { } /// Schema for the `PermissionDecisionApproveForSessionApprovalCommands` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalCommands { @@ -2723,6 +3194,13 @@ pub struct PermissionDecisionApproveForSessionApprovalCommands { } /// Schema for the `PermissionDecisionApproveForSessionApprovalRead` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalRead { @@ -2731,6 +3209,13 @@ pub struct PermissionDecisionApproveForSessionApprovalRead { } /// Schema for the `PermissionDecisionApproveForSessionApprovalWrite` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalWrite { @@ -2739,6 +3224,13 @@ pub struct PermissionDecisionApproveForSessionApprovalWrite { } /// Schema for the `PermissionDecisionApproveForSessionApprovalMcp` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMcp { @@ -2751,6 +3243,13 @@ pub struct PermissionDecisionApproveForSessionApprovalMcp { } /// Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMcpSampling { @@ -2761,6 +3260,13 @@ pub struct PermissionDecisionApproveForSessionApprovalMcpSampling { } /// Schema for the `PermissionDecisionApproveForSessionApprovalMemory` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalMemory { @@ -2769,6 +3275,13 @@ pub struct PermissionDecisionApproveForSessionApprovalMemory { } /// Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalCustomTool { @@ -2779,6 +3292,13 @@ pub struct PermissionDecisionApproveForSessionApprovalCustomTool { } /// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalExtensionManagement { @@ -2790,6 +3310,13 @@ pub struct PermissionDecisionApproveForSessionApprovalExtensionManagement { } /// Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess { @@ -2800,6 +3327,13 @@ pub struct PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess } /// Schema for the `PermissionDecisionApproveForSession` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForSession { @@ -2814,6 +3348,13 @@ pub struct PermissionDecisionApproveForSession { } /// Schema for the `PermissionDecisionApproveForLocationApprovalCommands` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalCommands { @@ -2824,6 +3365,13 @@ pub struct PermissionDecisionApproveForLocationApprovalCommands { } /// Schema for the `PermissionDecisionApproveForLocationApprovalRead` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalRead { @@ -2832,6 +3380,13 @@ pub struct PermissionDecisionApproveForLocationApprovalRead { } /// Schema for the `PermissionDecisionApproveForLocationApprovalWrite` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalWrite { @@ -2840,6 +3395,13 @@ pub struct PermissionDecisionApproveForLocationApprovalWrite { } /// Schema for the `PermissionDecisionApproveForLocationApprovalMcp` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMcp { @@ -2852,6 +3414,13 @@ pub struct PermissionDecisionApproveForLocationApprovalMcp { } /// Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMcpSampling { @@ -2862,6 +3431,13 @@ pub struct PermissionDecisionApproveForLocationApprovalMcpSampling { } /// Schema for the `PermissionDecisionApproveForLocationApprovalMemory` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalMemory { @@ -2870,6 +3446,13 @@ pub struct PermissionDecisionApproveForLocationApprovalMemory { } /// Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalCustomTool { @@ -2880,6 +3463,13 @@ pub struct PermissionDecisionApproveForLocationApprovalCustomTool { } /// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalExtensionManagement { @@ -2891,6 +3481,13 @@ pub struct PermissionDecisionApproveForLocationApprovalExtensionManagement { } /// Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess { @@ -2901,6 +3498,13 @@ pub struct PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess } /// Schema for the `PermissionDecisionApproveForLocation` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproveForLocation { @@ -2913,6 +3517,13 @@ pub struct PermissionDecisionApproveForLocation { } /// Schema for the `PermissionDecisionApprovePermanently` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApprovePermanently { @@ -2923,6 +3534,13 @@ pub struct PermissionDecisionApprovePermanently { } /// Schema for the `PermissionDecisionReject` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionReject { @@ -2934,6 +3552,13 @@ pub struct PermissionDecisionReject { } /// Schema for the `PermissionDecisionUserNotAvailable` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionUserNotAvailable { @@ -2942,6 +3567,13 @@ pub struct PermissionDecisionUserNotAvailable { } /// Schema for the `PermissionDecisionApproved` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApproved { @@ -2950,6 +3582,13 @@ pub struct PermissionDecisionApproved { } /// Schema for the `PermissionDecisionApprovedForSession` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApprovedForSession { @@ -2960,6 +3599,13 @@ pub struct PermissionDecisionApprovedForSession { } /// Schema for the `PermissionDecisionApprovedForLocation` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionApprovedForLocation { @@ -2972,6 +3618,13 @@ pub struct PermissionDecisionApprovedForLocation { } /// Schema for the `PermissionDecisionCancelled` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionCancelled { @@ -2983,6 +3636,13 @@ pub struct PermissionDecisionCancelled { } /// Schema for the `PermissionDecisionDeniedByRules` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionDeniedByRules { @@ -2993,6 +3653,13 @@ pub struct PermissionDecisionDeniedByRules { } /// Schema for the `PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser { @@ -3001,6 +3668,13 @@ pub struct PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser { } /// Schema for the `PermissionDecisionDeniedInteractivelyByUser` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionDeniedInteractivelyByUser { @@ -3015,6 +3689,13 @@ pub struct PermissionDecisionDeniedInteractivelyByUser { } /// Schema for the `PermissionDecisionDeniedByContentExclusionPolicy` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionDeniedByContentExclusionPolicy { @@ -3027,6 +3708,13 @@ pub struct PermissionDecisionDeniedByContentExclusionPolicy { } /// Schema for the `PermissionDecisionDeniedByPermissionRequestHook` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionDeniedByPermissionRequestHook { @@ -3041,6 +3729,13 @@ pub struct PermissionDecisionDeniedByPermissionRequestHook { } /// Pending permission request ID and the decision to apply (approve/reject and scope). +/// +///
+/// +/// **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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionDecisionRequest { @@ -3050,7 +3745,253 @@ pub struct PermissionDecisionRequest { pub result: PermissionDecision, } +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCommands` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsCommands { + /// Command identifiers covered by this approval. + pub command_identifiers: Vec, + /// Approval scoped to specific command identifiers. + pub kind: PermissionsLocationsAddToolApprovalDetailsCommandsKind, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsRead` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsRead { + /// Approval covering read-only filesystem operations. + pub kind: PermissionsLocationsAddToolApprovalDetailsReadKind, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsWrite` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsWrite { + /// Approval covering filesystem write operations. + pub kind: PermissionsLocationsAddToolApprovalDetailsWriteKind, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcp` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsMcp { + /// Approval covering an MCP tool. + pub kind: PermissionsLocationsAddToolApprovalDetailsMcpKind, + /// MCP server name. + pub server_name: String, + /// MCP tool name, or null to cover every tool on the server. + pub tool_name: Option, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMcpSampling` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsMcpSampling { + /// Approval covering MCP sampling requests for a server. + pub kind: PermissionsLocationsAddToolApprovalDetailsMcpSamplingKind, + /// MCP server name. + pub server_name: String, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsMemory` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsMemory { + /// Approval covering writes to long-term memory. + pub kind: PermissionsLocationsAddToolApprovalDetailsMemoryKind, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsCustomTool` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsCustomTool { + /// Approval covering a custom tool. + pub kind: PermissionsLocationsAddToolApprovalDetailsCustomToolKind, + /// Custom tool name. + pub tool_name: String, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionManagement` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsExtensionManagement { + /// Approval covering extension lifecycle operations such as enable, disable, or reload. + pub kind: PermissionsLocationsAddToolApprovalDetailsExtensionManagementKind, + /// Optional operation identifier; when omitted, the approval covers all extension management operations. + #[serde(skip_serializing_if = "Option::is_none")] + pub operation: Option, +} + +/// Schema for the `PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess { + /// Extension name. + pub extension_name: String, + /// Approval covering an extension's request to access a permission-gated capability. + pub kind: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccessKind, +} + +/// Location-scoped tool approval to persist. +/// +///
+/// +/// **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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionLocationAddToolApprovalParams { + /// Tool approval to persist and apply + pub approval: PermissionsLocationsAddToolApprovalDetails, + /// Location key (git root or cwd) to persist the approval to + pub location_key: String, +} + +/// Working directory to load persisted location permissions for. +/// +///
+/// +/// **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 PermissionLocationApplyParams { + /// Working directory whose persisted location permissions should be applied + pub working_directory: String, +} + +/// Summary of persisted location permissions applied to the 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 PermissionLocationApplyResult { + /// Number of persisted allowed directories added to the live path manager + pub applied_directory_count: i64, + /// Number of location-scoped rules added to the live permission service + pub applied_rule_count: i64, + /// Location-scoped rules applied to the live permission service + pub applied_rules: Vec, + /// Whether a different location was applied since the previous apply call + pub changed: bool, + /// Location key used in the location-permissions store + pub location_key: String, + /// Whether the location is a git repo or directory + pub location_type: PermissionLocationType, +} + +/// Working directory to resolve into a location-permissions key. +/// +///
+/// +/// **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 PermissionLocationResolveParams { + /// Working directory whose permission location should be resolved + pub working_directory: String, +} + +/// Resolved location-permissions key and 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PermissionLocationResolveResult { + /// Location key used in the location-permissions store + pub location_key: String, + /// Whether the location is a git repo or directory + pub location_type: PermissionLocationType, +} + /// Directory path to add to the session's allowed directories. +/// +///
+/// +/// **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 PermissionPathsAddParams { @@ -3059,6 +4000,13 @@ pub struct PermissionPathsAddParams { } /// Path to evaluate against the session's allowed directories. +/// +///
+/// +/// **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 PermissionPathsAllowedCheckParams { @@ -3067,6 +4015,13 @@ pub struct PermissionPathsAllowedCheckParams { } /// Indicates whether the supplied path is within the session's allowed directories. +/// +///
+/// +/// **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 PermissionPathsAllowedCheckResult { @@ -3075,6 +4030,13 @@ pub struct PermissionPathsAllowedCheckResult { } /// If specified, replaces the session's path-permission policy. The runtime constructs the appropriate PathManager based on these inputs (rooted at the session's working directory). Omit to leave the current path policy unchanged. +/// +///
+/// +/// **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 PermissionPathsConfig { @@ -3093,6 +4055,13 @@ pub struct PermissionPathsConfig { } /// Snapshot of the session's allow-listed directories and primary working directory. +/// +///
+/// +/// **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 PermissionPathsList { @@ -3103,6 +4072,13 @@ pub struct PermissionPathsList { } /// Directory path to set as the session's new primary working directory. +/// +///
+/// +/// **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 PermissionPathsUpdatePrimaryParams { @@ -3111,6 +4087,13 @@ pub struct PermissionPathsUpdatePrimaryParams { } /// Path to evaluate against the session's workspace (primary) directory. +/// +///
+/// +/// **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 PermissionPathsWorkspaceCheckParams { @@ -3119,6 +4102,13 @@ pub struct PermissionPathsWorkspaceCheckParams { } /// Indicates whether the supplied path is within the session's workspace directory. +/// +///
+/// +/// **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 PermissionPathsWorkspaceCheckResult { @@ -3127,6 +4117,13 @@ pub struct PermissionPathsWorkspaceCheckResult { } /// Notification payload describing the permission prompt that the client just rendered. +/// +///
+/// +/// **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 PermissionPromptShownNotification { @@ -3135,6 +4132,13 @@ pub struct PermissionPromptShownNotification { } /// Indicates whether the permission decision was applied; false when the request was already resolved. +/// +///
+/// +/// **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 PermissionRequestResult { @@ -3143,6 +4147,13 @@ pub struct PermissionRequestResult { } /// If specified, replaces the session's approved/denied permission rules. Omit to leave the current rules unchanged. +/// +///
+/// +/// **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 PermissionRulesSet { @@ -3153,6 +4164,13 @@ pub struct PermissionRulesSet { } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { @@ -3161,6 +4179,13 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRuleSource { } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicyRule { @@ -3174,6 +4199,13 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicyRule { } /// Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PermissionsConfigureAdditionalContentExclusionPolicy { @@ -3185,6 +4217,13 @@ pub struct PermissionsConfigureAdditionalContentExclusionPolicy { } /// If specified, replaces the session's URL-permission policy. The runtime constructs a fresh DefaultUrlManager based on these inputs. Omit to leave the current URL policy unchanged. +/// +///
+/// +/// **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 PermissionUrlsConfig { @@ -3197,6 +4236,13 @@ pub struct PermissionUrlsConfig { } /// Patch of permission policy fields to apply (omit a field to leave it unchanged). +/// +///
+/// +/// **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 PermissionsConfigureParams { @@ -3222,6 +4268,13 @@ pub struct PermissionsConfigureParams { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsConfigureResult { @@ -3229,7 +4282,44 @@ pub struct PermissionsConfigureResult { pub success: bool, } +/// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsFolderTrustAddTrustedResult { + /// Whether the operation succeeded + pub success: bool, +} + +/// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsLocationsAddToolApprovalResult { + /// Whether the operation succeeded + pub success: bool, +} + /// Scope and add/remove instructions for modifying session- or location-scoped permission rules. +/// +///
+/// +/// **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 PermissionsModifyRulesParams { @@ -3247,6 +4337,13 @@ pub struct PermissionsModifyRulesParams { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsModifyRulesResult { @@ -3255,6 +4352,13 @@ pub struct PermissionsModifyRulesResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsNotifyPromptShownResult { @@ -3263,6 +4367,13 @@ pub struct PermissionsNotifyPromptShownResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsPathsAddResult { @@ -3271,11 +4382,25 @@ pub struct PermissionsPathsAddResult { } /// No parameters; returns the session's allow-listed directories. +/// +///
+/// +/// **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 PermissionsPathsListRequest {} /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsPathsUpdatePrimaryResult { @@ -3284,16 +4409,37 @@ pub struct PermissionsPathsUpdatePrimaryResult { } /// No parameters; returns currently-pending permission requests for the 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 PermissionsPendingRequestsRequest {} /// No parameters; clears all session-scoped tool permission approvals. +/// +///
+/// +/// **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 PermissionsResetSessionApprovalsRequest {} /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsResetSessionApprovalsResult { @@ -3302,6 +4448,13 @@ pub struct PermissionsResetSessionApprovalsResult { } /// Allow-all toggle for tool permission requests, with an optional telemetry source. +/// +///
+/// +/// **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 PermissionsSetApproveAllRequest { @@ -3313,6 +4466,13 @@ pub struct PermissionsSetApproveAllRequest { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsSetApproveAllResult { @@ -3321,6 +4481,13 @@ pub struct PermissionsSetApproveAllResult { } /// Toggles whether permission prompts should be bridged into session events for this client. +/// +///
+/// +/// **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 PermissionsSetRequiredRequest { @@ -3329,6 +4496,13 @@ pub struct PermissionsSetRequiredRequest { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsSetRequiredResult { @@ -3337,6 +4511,13 @@ pub struct PermissionsSetRequiredResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 PermissionsUrlsSetUnrestrictedModeResult { @@ -3345,6 +4526,13 @@ pub struct PermissionsUrlsSetUnrestrictedModeResult { } /// Whether the URL-permission policy should run in unrestricted mode. +/// +///
+/// +/// **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 PermissionUrlsSetUnrestrictedModeParams { @@ -3374,6 +4562,13 @@ pub struct PingResult { } /// Existence, contents, and resolved path of the session plan file. +/// +///
+/// +/// **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 PlanReadResult { @@ -3386,6 +4581,13 @@ pub struct PlanReadResult { } /// Replacement contents to write to the session plan file. +/// +///
+/// +/// **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 PlanUpdateRequest { @@ -3431,6 +4633,13 @@ pub struct PluginList { } /// Schema for the `QueuedCommandHandled` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueuedCommandHandled { @@ -3442,6 +4651,13 @@ pub struct QueuedCommandHandled { } /// Schema for the `QueuedCommandNotHandled` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueuedCommandNotHandled { @@ -3694,6 +4910,13 @@ pub struct ScheduleStopResult { } /// Blob attachment with inline base64-encoded data +/// +///
+/// +/// **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 SendAttachmentBlob { @@ -3709,6 +4932,13 @@ pub struct SendAttachmentBlob { } /// Directory attachment +/// +///
+/// +/// **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 SendAttachmentDirectory { @@ -3721,6 +4951,13 @@ pub struct SendAttachmentDirectory { } /// Optional line range to scope the attachment to a specific section of the file +/// +///
+/// +/// **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 SendAttachmentFileLineRange { @@ -3731,6 +4968,13 @@ pub struct SendAttachmentFileLineRange { } /// File attachment +/// +///
+/// +/// **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 SendAttachmentFile { @@ -3746,6 +4990,13 @@ pub struct SendAttachmentFile { } /// GitHub issue, pull request, or discussion reference +/// +///
+/// +/// **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 SendAttachmentGithubReference { @@ -3764,6 +5015,13 @@ pub struct SendAttachmentGithubReference { } /// End position of the selection +/// +///
+/// +/// **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 SendAttachmentSelectionDetailsEnd { @@ -3774,6 +5032,13 @@ pub struct SendAttachmentSelectionDetailsEnd { } /// Start position of the selection +/// +///
+/// +/// **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 SendAttachmentSelectionDetailsStart { @@ -3784,6 +5049,13 @@ pub struct SendAttachmentSelectionDetailsStart { } /// Position range of the selection within the file +/// +///
+/// +/// **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 SendAttachmentSelectionDetails { @@ -3794,6 +5066,13 @@ pub struct SendAttachmentSelectionDetails { } /// Code selection attachment from an editor +/// +///
+/// +/// **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 SendAttachmentSelection { @@ -3810,6 +5089,13 @@ pub struct SendAttachmentSelection { } /// Parameters for sending a user message to the 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 SendRequest { @@ -3854,6 +5140,13 @@ pub struct SendRequest { } /// Result of sending a user message +/// +///
+/// +/// **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 SendResult { @@ -3892,6 +5185,13 @@ pub struct ServerSkillList { } /// Authentication status and account metadata for the 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 SessionAuthStatus { @@ -4415,6 +5715,31 @@ pub struct SessionList { pub sessions: Vec, } +/// Optional filter applied to the returned sessions +/// +///
+/// +/// **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 SessionListFilter { + /// Match sessions whose context.branch equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub branch: Option, + /// Match sessions whose context.cwd equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub cwd: Option, + /// Match sessions whose context.gitRoot equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub git_root: Option, + /// Match sessions whose context.repository equals this value + #[serde(skip_serializing_if = "Option::is_none")] + pub repository: Option, +} + /// Queued repo-level startup prompts and the total hook command count after loading. /// ///
@@ -4450,7 +5775,7 @@ pub struct SessionMetadataSnapshotWorkspace { pub git_root: Option, /// Repository host type, if known #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] - pub host_type: Option, + pub host_type: Option, /// Workspace identifier (1:1 with sessionId) pub id: String, /// Display name for the session, if set @@ -4618,6 +5943,13 @@ pub struct SessionsEnrichMetadataRequest { } /// New auth credentials to install on the session. Omit to leave credentials unchanged. +/// +///
+/// +/// **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 SessionSetCredentialsParams { @@ -4627,6 +5959,13 @@ pub struct SessionSetCredentialsParams { } /// Indicates whether the credential update succeeded. +/// +///
+/// +/// **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 SessionSetCredentialsResult { @@ -4843,24 +6182,6 @@ pub struct SessionSizes { pub sizes: HashMap, } -/// Optional filter applied to the returned sessions -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct SessionsListRequestFilter { - /// Match sessions whose context.branch equals this value - #[serde(skip_serializing_if = "Option::is_none")] - pub branch: Option, - /// Match sessions whose context.cwd equals this value - #[serde(skip_serializing_if = "Option::is_none")] - pub cwd: Option, - /// Match sessions whose context.gitRoot equals this value - #[serde(skip_serializing_if = "Option::is_none")] - pub git_root: Option, - /// Match sessions whose context.repository equals this value - #[serde(skip_serializing_if = "Option::is_none")] - pub repository: Option, -} - /// Optional metadata-load limit and context filter applied to the returned sessions. /// ///
@@ -4874,7 +6195,7 @@ pub struct SessionsListRequestFilter { pub struct SessionsListRequest { /// Optional filter applied to the returned sessions #[serde(skip_serializing_if = "Option::is_none")] - pub filter: Option, + pub filter: Option, /// When provided, only the first N sessions (sorted by modification time, newest first) load full metadata; remaining sessions return basic info only. Use 0 to return only basic info for every session. #[serde(skip_serializing_if = "Option::is_none")] pub metadata_limit: Option, @@ -5167,6 +6488,13 @@ pub struct SessionUpdateOptionsResult { } /// Shell command to run, with optional working directory and timeout in milliseconds. +/// +///
+/// +/// **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 ShellExecRequest { @@ -5181,6 +6509,13 @@ pub struct ShellExecRequest { } /// Identifier of the spawned process, used to correlate streamed output and exit notifications. +/// +///
+/// +/// **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 ShellExecResult { @@ -5189,6 +6524,13 @@ pub struct ShellExecResult { } /// Identifier of a process previously returned by "shell.exec" and the signal to send. +/// +///
+/// +/// **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 ShellKillRequest { @@ -5200,6 +6542,13 @@ pub struct ShellKillRequest { } /// Indicates whether the signal was delivered; false if the process was unknown or already exited. +/// +///
+/// +/// **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 ShellKillResult { @@ -5208,6 +6557,13 @@ pub struct ShellKillResult { } /// Parameters for shutting down the 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 ShutdownRequest { @@ -5370,6 +6726,13 @@ pub struct SkillsLoadDiagnostics { } /// Schema for the `SlashCommandAgentPromptResult` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandAgentPromptResult { @@ -5388,6 +6751,13 @@ pub struct SlashCommandAgentPromptResult { } /// Schema for the `SlashCommandCompletedResult` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandCompletedResult { @@ -5402,6 +6772,13 @@ pub struct SlashCommandCompletedResult { } /// Schema for the `SlashCommandTextResult` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandTextResult { @@ -5421,6 +6798,13 @@ pub struct SlashCommandTextResult { } /// Schema for the `SlashCommandSelectSubcommandOption` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandSelectSubcommandOption { @@ -5434,6 +6818,13 @@ pub struct SlashCommandSelectSubcommandOption { } /// Schema for the `SlashCommandSelectSubcommandResult` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SlashCommandSelectSubcommandResult { @@ -5498,15 +6889,52 @@ pub struct TaskAgentInfo { pub prompt: String, /// Result text from the task when available #[serde(skip_serializing_if = "Option::is_none")] - pub result: Option, - /// ISO 8601 timestamp when the task was started - pub started_at: String, - /// Current lifecycle status of the task - pub status: TaskStatus, - /// Tool call ID associated with this agent task - pub tool_call_id: String, - /// Task kind - pub r#type: TaskAgentInfoType, + pub result: Option, + /// ISO 8601 timestamp when the task was started + pub started_at: String, + /// Current lifecycle status of the task + pub status: TaskStatus, + /// Tool call ID associated with this agent task + pub tool_call_id: String, + /// Task kind + pub r#type: TaskAgentInfoType, +} + +/// Schema for the `TaskProgressLine` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TaskProgressLine { + /// Display message, e.g., "▸ bash", "✓ edit src/foo.ts" + pub message: String, + /// ISO 8601 timestamp when this event occurred + pub timestamp: String, +} + +/// Schema for the `TaskAgentProgress` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TaskAgentProgress { + /// The most recent intent reported by the agent + #[serde(skip_serializing_if = "Option::is_none")] + pub latest_intent: Option, + /// Recent tool execution events converted to display lines + pub recent_activity: Vec, + /// Progress kind + pub r#type: TaskAgentProgressType, } /// Background tasks currently tracked by the session. @@ -5597,7 +7025,7 @@ pub struct TasksGetProgressRequest { #[serde(rename_all = "camelCase")] pub struct TasksGetProgressResult { /// Progress information for the task, discriminated by type. Returns null when no task with this ID is currently tracked. - pub progress: serde_json::Value, + pub progress: Option, } /// Schema for the `TaskShellInfo` type. @@ -5642,6 +7070,26 @@ pub struct TaskShellInfo { pub r#type: TaskShellInfoType, } +/// Schema for the `TaskShellProgress` 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, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TaskShellProgress { + /// Process ID when available + #[serde(skip_serializing_if = "Option::is_none")] + pub pid: Option, + /// Recent stdout/stderr lines from the running shell command + pub recent_output: String, + /// Progress kind + pub r#type: TaskShellProgressType, +} + /// The promoted task as it now exists in background mode, omitted if no promotable task was waiting. /// ///
@@ -5836,6 +7284,13 @@ pub struct TelemetrySetFeatureOverridesRequest { } /// Schema for the `TokenAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TokenAuthInfo { @@ -5878,6 +7333,13 @@ pub struct ToolList { } /// Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation. +/// +///
+/// +/// **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 ToolsInitializeAndValidateResult {} @@ -5892,6 +7354,13 @@ pub struct ToolsListRequest { } /// Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationArrayAnyOfFieldItemsAnyOf { @@ -5902,6 +7371,13 @@ pub struct UIElicitationArrayAnyOfFieldItemsAnyOf { } /// Schema applied to each item in the array. +/// +///
+/// +/// **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 UIElicitationArrayAnyOfFieldItems { @@ -5910,6 +7386,13 @@ pub struct UIElicitationArrayAnyOfFieldItems { } /// Multi-select string field where each option pairs a value with a display label. +/// +///
+/// +/// **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 UIElicitationArrayAnyOfField { @@ -5935,6 +7418,13 @@ pub struct UIElicitationArrayAnyOfField { } /// Schema applied to each item in the array. +/// +///
+/// +/// **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 UIElicitationArrayEnumFieldItems { @@ -5945,6 +7435,13 @@ pub struct UIElicitationArrayEnumFieldItems { } /// Multi-select string field whose allowed values are defined inline. +/// +///
+/// +/// **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 UIElicitationArrayEnumField { @@ -5970,6 +7467,13 @@ pub struct UIElicitationArrayEnumField { } /// JSON Schema describing the form fields to present to the user +/// +///
+/// +/// **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 UIElicitationSchema { @@ -5983,6 +7487,13 @@ pub struct UIElicitationSchema { } /// Prompt message and JSON schema describing the form fields to elicit from the user. +/// +///
+/// +/// **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 UIElicitationRequest { @@ -5993,6 +7504,13 @@ pub struct UIElicitationRequest { } /// The elicitation response (accept with form values, decline, or cancel) +/// +///
+/// +/// **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 UIElicitationResponse { @@ -6004,6 +7522,13 @@ pub struct UIElicitationResponse { } /// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. +/// +///
+/// +/// **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 UIElicitationResult { @@ -6012,6 +7537,13 @@ pub struct UIElicitationResult { } /// Boolean field rendered as a yes/no toggle. +/// +///
+/// +/// **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 UIElicitationSchemaPropertyBoolean { @@ -6029,6 +7561,13 @@ pub struct UIElicitationSchemaPropertyBoolean { } /// Numeric field accepting either a number or an integer. +/// +///
+/// +/// **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 UIElicitationSchemaPropertyNumber { @@ -6052,6 +7591,13 @@ pub struct UIElicitationSchemaPropertyNumber { } /// Free-text string field with optional length and format constraints. +/// +///
+/// +/// **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 UIElicitationSchemaPropertyString { @@ -6078,6 +7624,13 @@ pub struct UIElicitationSchemaPropertyString { } /// Single-select string field whose allowed values are defined inline. +/// +///
+/// +/// **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 UIElicitationStringEnumField { @@ -6100,6 +7653,13 @@ pub struct UIElicitationStringEnumField { } /// Schema for the `UIElicitationStringOneOfFieldOneOf` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIElicitationStringOneOfFieldOneOf { @@ -6110,6 +7670,13 @@ pub struct UIElicitationStringOneOfFieldOneOf { } /// Single-select string field where each option pairs a value with a display label. +/// +///
+/// +/// **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 UIElicitationStringOneOfField { @@ -6129,6 +7696,13 @@ pub struct UIElicitationStringOneOfField { } /// Schema for the `UIExitPlanModeResponse` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIExitPlanModeResponse { @@ -6146,6 +7720,13 @@ pub struct UIExitPlanModeResponse { } /// Request ID of a pending `auto_mode_switch.requested` event and the user's response. +/// +///
+/// +/// **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 UIHandlePendingAutoModeSwitchRequest { @@ -6156,6 +7737,13 @@ pub struct UIHandlePendingAutoModeSwitchRequest { } /// Pending elicitation request ID and the user's response (accept/decline/cancel + form values). +/// +///
+/// +/// **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 UIHandlePendingElicitationRequest { @@ -6166,6 +7754,13 @@ pub struct UIHandlePendingElicitationRequest { } /// Request ID of a pending `exit_plan_mode.requested` event and the user's response. +/// +///
+/// +/// **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 UIHandlePendingExitPlanModeRequest { @@ -6176,6 +7771,13 @@ pub struct UIHandlePendingExitPlanModeRequest { } /// Indicates whether the pending UI request was resolved by this call. +/// +///
+/// +/// **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 UIHandlePendingResult { @@ -6184,11 +7786,25 @@ pub struct UIHandlePendingResult { } /// Optional sampling result payload. Omit to reject/cancel the sampling request without providing a result. +/// +///
+/// +/// **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 UIHandlePendingSamplingResponse {} /// Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). +/// +///
+/// +/// **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 UIHandlePendingSamplingRequest { @@ -6200,6 +7816,13 @@ pub struct UIHandlePendingSamplingRequest { } /// Schema for the `UIUserInputResponse` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UIUserInputResponse { @@ -6210,6 +7833,13 @@ pub struct UIUserInputResponse { } /// Request ID of a pending `user_input.requested` event and the user's response. +/// +///
+/// +/// **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 UIHandlePendingUserInputRequest { @@ -6220,6 +7850,13 @@ pub struct UIHandlePendingUserInputRequest { } /// Register an in-process handler for `auto_mode_switch.requested` events. The caller still attaches the actual listener via the standard event-subscription mechanism; this registration solely tells the server bridge to skip its own dispatch (so a remote client doesn't race the in-process handler for the same requestId). +/// +///
+/// +/// **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 UIRegisterDirectAutoModeSwitchHandlerResult { @@ -6228,6 +7865,13 @@ pub struct UIRegisterDirectAutoModeSwitchHandlerResult { } /// Opaque handle previously returned by `registerDirectAutoModeSwitchHandler` to release. +/// +///
+/// +/// **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 UIUnregisterDirectAutoModeSwitchHandlerRequest { @@ -6236,6 +7880,13 @@ pub struct UIUnregisterDirectAutoModeSwitchHandlerRequest { } /// Indicates whether the handle was active and the registration count was decremented. +/// +///
+/// +/// **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 UIUnregisterDirectAutoModeSwitchHandlerResult { @@ -6397,6 +8048,13 @@ pub struct UsageGetMetricsResult { } /// Schema for the `UserAuthInfo` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UserAuthInfo { @@ -6412,6 +8070,13 @@ pub struct UserAuthInfo { } /// Schema for the `WorkspacesCheckpoints` 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspacesCheckpoints { @@ -6424,6 +8089,13 @@ pub struct WorkspacesCheckpoints { } /// Relative path and UTF-8 content for the workspace file to create or overwrite. +/// +///
+/// +/// **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 WorkspacesCreateFileRequest { @@ -6449,8 +8121,9 @@ pub struct WorkspacesGetWorkspaceResultWorkspace { pub cwd: Option, #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, + /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] - pub host_type: Option, + pub host_type: Option, pub id: String, #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, @@ -6473,6 +8146,13 @@ pub struct WorkspacesGetWorkspaceResultWorkspace { } /// Current workspace metadata for the session, including its absolute filesystem path when available. +/// +///
+/// +/// **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 WorkspacesGetWorkspaceResult { @@ -6484,6 +8164,13 @@ pub struct WorkspacesGetWorkspaceResult { } /// Workspace checkpoints in chronological order; empty when the workspace is not enabled. +/// +///
+/// +/// **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 WorkspacesListCheckpointsResult { @@ -6492,6 +8179,13 @@ pub struct WorkspacesListCheckpointsResult { } /// Relative paths of files stored in the session workspace files directory. +/// +///
+/// +/// **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 WorkspacesListFilesResult { @@ -6500,6 +8194,13 @@ pub struct WorkspacesListFilesResult { } /// Checkpoint number to read. +/// +///
+/// +/// **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 WorkspacesReadCheckpointRequest { @@ -6508,6 +8209,13 @@ pub struct WorkspacesReadCheckpointRequest { } /// Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. +/// +///
+/// +/// **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 WorkspacesReadCheckpointResult { @@ -6516,6 +8224,13 @@ pub struct WorkspacesReadCheckpointResult { } /// Relative path of the workspace file to read. +/// +///
+/// +/// **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 WorkspacesReadFileRequest { @@ -6524,6 +8239,13 @@ pub struct WorkspacesReadFileRequest { } /// Contents of the requested workspace file as a UTF-8 string. +/// +///
+/// +/// **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 WorkspacesReadFileResult { @@ -6532,6 +8254,13 @@ pub struct WorkspacesReadFileResult { } /// Pasted content to save as a UTF-8 file in the session workspace. +/// +///
+/// +/// **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 WorkspacesSaveLargePasteRequest { @@ -6551,6 +8280,13 @@ pub struct WorkspacesSaveLargePasteResultSaved { } /// Descriptor for the saved paste file, or null when the workspace is unavailable. +/// +///
+/// +/// **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 WorkspacesSaveLargePasteResult { @@ -6763,6 +8499,13 @@ pub struct SessionsLoadDeferredRepoHooksResult { } /// 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 SessionSuspendParams { @@ -6771,6 +8514,13 @@ pub struct SessionSuspendParams { } /// Result of sending a user message +/// +///
+/// +/// **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 SessionSendResult { @@ -6779,6 +8529,13 @@ pub struct SessionSendResult { } /// Result of aborting the current turn +/// +///
+/// +/// **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 SessionAbortResult { @@ -6790,6 +8547,13 @@ pub struct SessionAbortResult { } /// 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 SessionAuthGetStatusParams { @@ -6798,6 +8562,13 @@ pub struct SessionAuthGetStatusParams { } /// Authentication status and account metadata for the 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 SessionAuthGetStatusResult { @@ -6821,6 +8592,13 @@ pub struct SessionAuthGetStatusResult { } /// Indicates whether the credential update succeeded. +/// +///
+/// +/// **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 SessionAuthSetCredentialsResult { @@ -6829,6 +8607,13 @@ pub struct SessionAuthSetCredentialsResult { } /// 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 SessionModelGetCurrentParams { @@ -6837,6 +8622,13 @@ pub struct SessionModelGetCurrentParams { } /// The currently selected model and reasoning effort for the 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 SessionModelGetCurrentResult { @@ -6849,6 +8641,13 @@ pub struct SessionModelGetCurrentResult { } /// The model identifier active on the session after the switch. +/// +///
+/// +/// **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 SessionModelSwitchToResult { @@ -6858,6 +8657,13 @@ pub struct SessionModelSwitchToResult { } /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. +/// +///
+/// +/// **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 SessionModelSetReasoningEffortResult { @@ -6866,6 +8672,13 @@ pub struct SessionModelSetReasoningEffortResult { } /// 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 SessionModeGetParams { @@ -6874,6 +8687,13 @@ pub struct SessionModeGetParams { } /// 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 SessionNameGetParams { @@ -6882,6 +8702,13 @@ pub struct SessionNameGetParams { } /// The session's friendly name, or null when not yet set. +/// +///
+/// +/// **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 SessionNameGetResult { @@ -6890,6 +8717,13 @@ pub struct SessionNameGetResult { } /// Indicates whether the auto-generated summary was applied as the session's name. +/// +///
+/// +/// **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 SessionNameSetAutoResult { @@ -6898,6 +8732,13 @@ pub struct SessionNameSetAutoResult { } /// 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 SessionPlanReadParams { @@ -6906,6 +8747,13 @@ pub struct SessionPlanReadParams { } /// Existence, contents, and resolved path of the session plan file. +/// +///
+/// +/// **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 SessionPlanReadResult { @@ -6918,6 +8766,13 @@ pub struct SessionPlanReadResult { } /// 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 SessionPlanDeleteParams { @@ -6926,6 +8781,13 @@ pub struct SessionPlanDeleteParams { } /// 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 SessionWorkspacesGetWorkspaceParams { @@ -6949,8 +8811,9 @@ pub struct SessionWorkspacesGetWorkspaceResultWorkspace { pub cwd: Option, #[serde(rename = "git_root", skip_serializing_if = "Option::is_none")] pub git_root: Option, + /// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] - pub host_type: Option, + pub host_type: Option, pub id: String, #[serde(rename = "mc_last_event_id", skip_serializing_if = "Option::is_none")] pub mc_last_event_id: Option, @@ -6973,6 +8836,13 @@ pub struct SessionWorkspacesGetWorkspaceResultWorkspace { } /// Current workspace metadata for the session, including its absolute filesystem path when available. +/// +///
+/// +/// **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 SessionWorkspacesGetWorkspaceResult { @@ -6984,6 +8854,13 @@ pub struct SessionWorkspacesGetWorkspaceResult { } /// 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 SessionWorkspacesListFilesParams { @@ -6992,6 +8869,13 @@ pub struct SessionWorkspacesListFilesParams { } /// Relative paths of files stored in the session workspace files directory. +/// +///
+/// +/// **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 SessionWorkspacesListFilesResult { @@ -7000,6 +8884,13 @@ pub struct SessionWorkspacesListFilesResult { } /// Contents of the requested workspace file as a UTF-8 string. +/// +///
+/// +/// **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 SessionWorkspacesReadFileResult { @@ -7008,6 +8899,13 @@ pub struct SessionWorkspacesReadFileResult { } /// 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 SessionWorkspacesListCheckpointsParams { @@ -7016,6 +8914,13 @@ pub struct SessionWorkspacesListCheckpointsParams { } /// Workspace checkpoints in chronological order; empty when the workspace is not enabled. +/// +///
+/// +/// **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 SessionWorkspacesListCheckpointsResult { @@ -7024,6 +8929,13 @@ pub struct SessionWorkspacesListCheckpointsResult { } /// Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. +/// +///
+/// +/// **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 SessionWorkspacesReadCheckpointResult { @@ -7043,6 +8955,13 @@ pub struct SessionWorkspacesSaveLargePasteResultSaved { } /// Descriptor for the saved paste file, or null when the workspace is unavailable. +/// +///
+/// +/// **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 SessionWorkspacesSaveLargePasteResult { @@ -7051,6 +8970,13 @@ pub struct SessionWorkspacesSaveLargePasteResult { } /// 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 SessionInstructionsGetSourcesParams { @@ -7059,6 +8985,13 @@ pub struct SessionInstructionsGetSourcesParams { } /// Instruction sources loaded for the session, in merge order. +/// +///
+/// +/// **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 SessionInstructionsGetSourcesResult { @@ -7312,7 +9245,7 @@ pub struct SessionTasksWaitForPendingResult {} #[serde(rename_all = "camelCase")] pub struct SessionTasksGetProgressResult { /// Progress information for the task, discriminated by type. Returns null when no task with this ID is currently tracked. - pub progress: serde_json::Value, + pub progress: Option, } /// Identifies the target session. @@ -7780,6 +9713,13 @@ pub struct SessionExtensionsReloadParams { } /// Indicates whether the external tool call result was handled successfully. +/// +///
+/// +/// **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 SessionToolsHandlePendingToolCallResult { @@ -7788,6 +9728,13 @@ pub struct SessionToolsHandlePendingToolCallResult { } /// 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 SessionToolsInitializeAndValidateParams { @@ -7796,11 +9743,25 @@ pub struct SessionToolsInitializeAndValidateParams { } /// Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation. +/// +///
+/// +/// **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 SessionToolsInitializeAndValidateResult {} /// Slash commands available in the session, after applying any include/exclude filters. +/// +///
+/// +/// **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 SessionCommandsListResult { @@ -7809,6 +9770,13 @@ pub struct SessionCommandsListResult { } /// Indicates whether the pending client-handled command was completed successfully. +/// +///
+/// +/// **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 SessionCommandsHandlePendingCommandResult { @@ -7817,6 +9785,13 @@ pub struct SessionCommandsHandlePendingCommandResult { } /// Error message produced while executing the command, if any. +/// +///
+/// +/// **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 SessionCommandsExecuteResult { @@ -7826,6 +9801,13 @@ pub struct SessionCommandsExecuteResult { } /// Indicates whether the command was accepted into the local execution queue. +/// +///
+/// +/// **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 SessionCommandsEnqueueResult { @@ -7834,6 +9816,13 @@ pub struct SessionCommandsEnqueueResult { } /// Indicates whether the queued-command response was matched to a pending request. +/// +///
+/// +/// **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 SessionCommandsRespondToQueuedCommandResult { @@ -7842,6 +9831,13 @@ pub struct SessionCommandsRespondToQueuedCommandResult { } /// The elicitation response (accept with form values, decline, or cancel) +/// +///
+/// +/// **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 SessionUiElicitationResult { @@ -7853,6 +9849,13 @@ pub struct SessionUiElicitationResult { } /// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. +/// +///
+/// +/// **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 SessionUiHandlePendingElicitationResult { @@ -7861,6 +9864,13 @@ pub struct SessionUiHandlePendingElicitationResult { } /// Indicates whether the pending UI request was resolved by this call. +/// +///
+/// +/// **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 SessionUiHandlePendingUserInputResult { @@ -7869,6 +9879,13 @@ pub struct SessionUiHandlePendingUserInputResult { } /// Indicates whether the pending UI request was resolved by this call. +/// +///
+/// +/// **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 SessionUiHandlePendingSamplingResult { @@ -7877,6 +9894,13 @@ pub struct SessionUiHandlePendingSamplingResult { } /// Indicates whether the pending UI request was resolved by this call. +/// +///
+/// +/// **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 SessionUiHandlePendingAutoModeSwitchResult { @@ -7885,6 +9909,13 @@ pub struct SessionUiHandlePendingAutoModeSwitchResult { } /// Indicates whether the pending UI request was resolved by this call. +/// +///
+/// +/// **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 SessionUiHandlePendingExitPlanModeResult { @@ -7893,6 +9924,13 @@ pub struct SessionUiHandlePendingExitPlanModeResult { } /// 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 SessionUiRegisterDirectAutoModeSwitchHandlerParams { @@ -7901,6 +9939,13 @@ pub struct SessionUiRegisterDirectAutoModeSwitchHandlerParams { } /// Register an in-process handler for `auto_mode_switch.requested` events. The caller still attaches the actual listener via the standard event-subscription mechanism; this registration solely tells the server bridge to skip its own dispatch (so a remote client doesn't race the in-process handler for the same requestId). +/// +///
+/// +/// **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 SessionUiRegisterDirectAutoModeSwitchHandlerResult { @@ -7909,6 +9954,13 @@ pub struct SessionUiRegisterDirectAutoModeSwitchHandlerResult { } /// Indicates whether the handle was active and the registration count was decremented. +/// +///
+/// +/// **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 SessionUiUnregisterDirectAutoModeSwitchHandlerResult { @@ -7917,6 +9969,13 @@ pub struct SessionUiUnregisterDirectAutoModeSwitchHandlerResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsConfigureResult { @@ -7925,6 +9984,13 @@ pub struct SessionPermissionsConfigureResult { } /// Indicates whether the permission decision was applied; false when the request was already resolved. +/// +///
+/// +/// **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 SessionPermissionsHandlePendingPermissionRequestResult { @@ -7933,6 +9999,13 @@ pub struct SessionPermissionsHandlePendingPermissionRequestResult { } /// List of pending permission requests reconstructed from event history. +/// +///
+/// +/// **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 SessionPermissionsPendingRequestsResult { @@ -7941,6 +10014,13 @@ pub struct SessionPermissionsPendingRequestsResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsSetApproveAllResult { @@ -7949,6 +10029,13 @@ pub struct SessionPermissionsSetApproveAllResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsModifyRulesResult { @@ -7957,6 +10044,13 @@ pub struct SessionPermissionsModifyRulesResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsSetRequiredResult { @@ -7965,6 +10059,13 @@ pub struct SessionPermissionsSetRequiredResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsResetSessionApprovalsResult { @@ -7973,6 +10074,13 @@ pub struct SessionPermissionsResetSessionApprovalsResult { } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsNotifyPromptShownResult { @@ -7981,48 +10089,177 @@ pub struct SessionPermissionsNotifyPromptShownResult { } /// Snapshot of the session's allow-listed directories and primary working directory. +/// +///
+/// +/// **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 SessionPermissionsPathsListResult { + /// All directories currently allowed for tool access on this session. + pub directories: Vec, + /// The primary working directory for this session. + pub primary: String, +} + +/// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsPathsAddResult { + /// Whether the operation succeeded + pub success: bool, +} + +/// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsPathsUpdatePrimaryResult { + /// Whether the operation succeeded + pub success: bool, +} + +/// Indicates whether the supplied path is within the session's allowed directories. +/// +///
+/// +/// **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 SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult { + /// Whether the path is within the session's allowed directories + pub allowed: bool, +} + +/// Indicates whether the supplied path is within the session's workspace directory. +/// +///
+/// +/// **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 SessionPermissionsPathsIsPathWithinWorkspaceResult { + /// Whether the path is within the session workspace directory + pub allowed: bool, +} + +/// Resolved location-permissions key and 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, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionPermissionsPathsListResult { - /// All directories currently allowed for tool access on this session. - pub directories: Vec, - /// The primary working directory for this session. - pub primary: String, +pub struct SessionPermissionsLocationsResolveResult { + /// Location key used in the location-permissions store + pub location_key: String, + /// Whether the location is a git repo or directory + pub location_type: PermissionLocationType, } -/// Indicates whether the operation succeeded. +/// Summary of persisted location permissions applied to the 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 SessionPermissionsPathsAddResult { - /// Whether the operation succeeded - pub success: bool, +pub struct SessionPermissionsLocationsApplyResult { + /// Number of persisted allowed directories added to the live path manager + pub applied_directory_count: i64, + /// Number of location-scoped rules added to the live permission service + pub applied_rule_count: i64, + /// Location-scoped rules applied to the live permission service + pub applied_rules: Vec, + /// Whether a different location was applied since the previous apply call + pub changed: bool, + /// Location key used in the location-permissions store + pub location_key: String, + /// Whether the location is a git repo or directory + pub location_type: PermissionLocationType, } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsPathsUpdatePrimaryResult { +pub struct SessionPermissionsLocationsAddToolApprovalResult { /// Whether the operation succeeded pub success: bool, } -/// Indicates whether the supplied path is within the session's allowed directories. +/// Folder trust check result. +/// +///
+/// +/// **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 SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult { - /// Whether the path is within the session's allowed directories - pub allowed: bool, +pub struct SessionPermissionsFolderTrustIsTrustedResult { + /// Whether the folder is trusted + pub trusted: bool, } -/// Indicates whether the supplied path is within the session's workspace directory. +/// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsPathsIsPathWithinWorkspaceResult { - /// Whether the path is within the session workspace directory - pub allowed: bool, +pub struct SessionPermissionsFolderTrustAddTrustedResult { + /// Whether the operation succeeded + pub success: bool, } /// Indicates whether the operation succeeded. +/// +///
+/// +/// **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 SessionPermissionsUrlsSetUnrestrictedModeResult { @@ -8031,6 +10268,13 @@ pub struct SessionPermissionsUrlsSetUnrestrictedModeResult { } /// Identifier of the session event that was emitted for the log message. +/// +///
+/// +/// **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 SessionLogResult { @@ -8071,7 +10315,7 @@ pub struct SessionMetadataSnapshotResultWorkspace { pub git_root: Option, /// Repository host type, if known #[serde(rename = "host_type", skip_serializing_if = "Option::is_none")] - pub host_type: Option, + pub host_type: Option, /// Workspace identifier (1:1 with sessionId) pub id: String, /// Display name for the session, if set @@ -8244,6 +10488,13 @@ pub struct SessionMetadataRecomputeContextTokensResult { } /// Identifier of the spawned process, used to correlate streamed output and exit notifications. +/// +///
+/// +/// **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 SessionShellExecResult { @@ -8252,6 +10503,13 @@ pub struct SessionShellExecResult { } /// Indicates whether the signal was delivered; false if the process was unknown or already exited. +/// +///
+/// +/// **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 SessionShellKillResult { @@ -8757,6 +11015,13 @@ pub enum ApiKeyAuthInfoType { } /// Authentication 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 AuthInfoType { /// Authentication provided by a GitHub App HMAC credential. @@ -8787,6 +11052,13 @@ pub enum AuthInfoType { } /// Optional completion hint for the input (e.g. 'directory' for filesystem path completion) +/// +///
+/// +/// **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 SlashCommandInputCompletion { /// Input should complete filesystem directories. @@ -8799,6 +11071,13 @@ pub enum SlashCommandInputCompletion { } /// Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command +/// +///
+/// +/// **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 SlashCommandKind { /// Command implemented by the runtime. @@ -8996,6 +11275,13 @@ pub enum ExtensionStatus { } /// Binary result type discriminator. Use "image" for images and "resource" for other binary data. +/// +///
+/// +/// **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 ExternalToolTextResultForLlmBinaryResultsForLlmType { /// Binary image data. @@ -9035,6 +11321,13 @@ pub enum ExternalToolTextResultForLlmContentResourceType { } /// Theme variant this icon is intended for +/// +///
+/// +/// **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 ExternalToolTextResultForLlmContentResourceLinkIconTheme { /// Icon intended for light themes. @@ -9122,6 +11415,13 @@ pub enum InstalledPluginSourceUrlSource { } /// Where this source lives — used for UI grouping +/// +///
+/// +/// **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 InstructionsSourcesLocation { /// Instructions live in user-level configuration. @@ -9143,6 +11443,13 @@ pub enum InstructionsSourcesLocation { } /// Category of instruction source — used for merge logic +/// +///
+/// +/// **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 InstructionsSourcesType { /// Instructions loaded from the user's home configuration. @@ -9173,6 +11480,13 @@ pub enum InstructionsSourcesType { } /// Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". +/// +///
+/// +/// **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 SessionLogLevel { /// Informational message. @@ -9496,6 +11810,13 @@ pub enum PermissionDecisionApproveForSessionApprovalExtensionPermissionAccessKin } /// Session-scoped approval to remember (tool prompts only; omitted for path/url prompts) +/// +///
+/// +/// **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, Serialize, Deserialize)] #[serde(untagged)] pub enum PermissionDecisionApproveForSessionApproval { @@ -9591,6 +11912,13 @@ pub enum PermissionDecisionApproveForLocationApprovalExtensionPermissionAccessKi } /// Approval to persist for this location +/// +///
+/// +/// **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, Serialize, Deserialize)] #[serde(untagged)] pub enum PermissionDecisionApproveForLocationApproval { @@ -9649,92 +11977,222 @@ pub enum PermissionDecisionApprovedKind { /// Approved and remembered for the rest of the session #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionApprovedForSessionKind { - #[serde(rename = "approved-for-session")] +pub enum PermissionDecisionApprovedForSessionKind { + #[serde(rename = "approved-for-session")] + #[default] + ApprovedForSession, +} + +/// Approved and persisted for this project location +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionApprovedForLocationKind { + #[serde(rename = "approved-for-location")] + #[default] + ApprovedForLocation, +} + +/// The permission request was cancelled before a response was used +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionCancelledKind { + #[serde(rename = "cancelled")] + #[default] + Cancelled, +} + +/// Denied because approval rules explicitly blocked it +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionDeniedByRulesKind { + #[serde(rename = "denied-by-rules")] + #[default] + DeniedByRules, +} + +/// Denied because no approval rule matched and user confirmation was unavailable +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind { + #[serde(rename = "denied-no-approval-rule-and-could-not-request-from-user")] + #[default] + DeniedNoApprovalRuleAndCouldNotRequestFromUser, +} + +/// Denied by the user during an interactive prompt +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionDeniedInteractivelyByUserKind { + #[serde(rename = "denied-interactively-by-user")] + #[default] + DeniedInteractivelyByUser, +} + +/// Denied by the organization's content exclusion policy +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionDeniedByContentExclusionPolicyKind { + #[serde(rename = "denied-by-content-exclusion-policy")] + #[default] + DeniedByContentExclusionPolicy, +} + +/// Denied by a permission request hook registered by an extension or plugin +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionDecisionDeniedByPermissionRequestHookKind { + #[serde(rename = "denied-by-permission-request-hook")] + #[default] + DeniedByPermissionRequestHook, +} + +/// The client's response to the pending permission prompt +/// +///
+/// +/// **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, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PermissionDecision { + ApproveOnce(PermissionDecisionApproveOnce), + ApproveForSession(PermissionDecisionApproveForSession), + ApproveForLocation(PermissionDecisionApproveForLocation), + ApprovePermanently(PermissionDecisionApprovePermanently), + Reject(PermissionDecisionReject), + UserNotAvailable(PermissionDecisionUserNotAvailable), + Approved(PermissionDecisionApproved), + ApprovedForSession(PermissionDecisionApprovedForSession), + ApprovedForLocation(PermissionDecisionApprovedForLocation), + Cancelled(PermissionDecisionCancelled), + DeniedByRules(PermissionDecisionDeniedByRules), + DeniedNoApprovalRuleAndCouldNotRequestFromUser( + PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser, + ), + DeniedInteractivelyByUser(PermissionDecisionDeniedInteractivelyByUser), + DeniedByContentExclusionPolicy(PermissionDecisionDeniedByContentExclusionPolicy), + DeniedByPermissionRequestHook(PermissionDecisionDeniedByPermissionRequestHook), +} + +/// Approval scoped to specific command identifiers. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionsLocationsAddToolApprovalDetailsCommandsKind { + #[serde(rename = "commands")] + #[default] + Commands, +} + +/// Approval covering read-only filesystem operations. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum PermissionsLocationsAddToolApprovalDetailsReadKind { + #[serde(rename = "read")] #[default] - ApprovedForSession, + Read, } -/// Approved and persisted for this project location +/// Approval covering filesystem write operations. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionApprovedForLocationKind { - #[serde(rename = "approved-for-location")] +pub enum PermissionsLocationsAddToolApprovalDetailsWriteKind { + #[serde(rename = "write")] #[default] - ApprovedForLocation, + Write, } -/// The permission request was cancelled before a response was used +/// Approval covering an MCP tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionCancelledKind { - #[serde(rename = "cancelled")] +pub enum PermissionsLocationsAddToolApprovalDetailsMcpKind { + #[serde(rename = "mcp")] #[default] - Cancelled, + Mcp, } -/// Denied because approval rules explicitly blocked it +/// Approval covering MCP sampling requests for a server. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionDeniedByRulesKind { - #[serde(rename = "denied-by-rules")] +pub enum PermissionsLocationsAddToolApprovalDetailsMcpSamplingKind { + #[serde(rename = "mcp-sampling")] #[default] - DeniedByRules, + McpSampling, } -/// Denied because no approval rule matched and user confirmation was unavailable +/// Approval covering writes to long-term memory. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind { - #[serde(rename = "denied-no-approval-rule-and-could-not-request-from-user")] +pub enum PermissionsLocationsAddToolApprovalDetailsMemoryKind { + #[serde(rename = "memory")] #[default] - DeniedNoApprovalRuleAndCouldNotRequestFromUser, + Memory, } -/// Denied by the user during an interactive prompt +/// Approval covering a custom tool. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionDeniedInteractivelyByUserKind { - #[serde(rename = "denied-interactively-by-user")] +pub enum PermissionsLocationsAddToolApprovalDetailsCustomToolKind { + #[serde(rename = "custom-tool")] #[default] - DeniedInteractivelyByUser, + CustomTool, } -/// Denied by the organization's content exclusion policy +/// Approval covering extension lifecycle operations such as enable, disable, or reload. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionDeniedByContentExclusionPolicyKind { - #[serde(rename = "denied-by-content-exclusion-policy")] +pub enum PermissionsLocationsAddToolApprovalDetailsExtensionManagementKind { + #[serde(rename = "extension-management")] #[default] - DeniedByContentExclusionPolicy, + ExtensionManagement, } -/// Denied by a permission request hook registered by an extension or plugin +/// Approval covering an extension's request to access a permission-gated capability. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum PermissionDecisionDeniedByPermissionRequestHookKind { - #[serde(rename = "denied-by-permission-request-hook")] +pub enum PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccessKind { + #[serde(rename = "extension-permission-access")] #[default] - DeniedByPermissionRequestHook, + ExtensionPermissionAccess, } -/// The client's response to the pending permission prompt +/// Tool approval to persist and apply +/// +///
+/// +/// **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, Serialize, Deserialize)] #[serde(untagged)] -pub enum PermissionDecision { - ApproveOnce(PermissionDecisionApproveOnce), - ApproveForSession(PermissionDecisionApproveForSession), - ApproveForLocation(PermissionDecisionApproveForLocation), - ApprovePermanently(PermissionDecisionApprovePermanently), - Reject(PermissionDecisionReject), - UserNotAvailable(PermissionDecisionUserNotAvailable), - Approved(PermissionDecisionApproved), - ApprovedForSession(PermissionDecisionApprovedForSession), - ApprovedForLocation(PermissionDecisionApprovedForLocation), - Cancelled(PermissionDecisionCancelled), - DeniedByRules(PermissionDecisionDeniedByRules), - DeniedNoApprovalRuleAndCouldNotRequestFromUser( - PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser, - ), - DeniedInteractivelyByUser(PermissionDecisionDeniedInteractivelyByUser), - DeniedByContentExclusionPolicy(PermissionDecisionDeniedByContentExclusionPolicy), - DeniedByPermissionRequestHook(PermissionDecisionDeniedByPermissionRequestHook), +pub enum PermissionsLocationsAddToolApprovalDetails { + Commands(PermissionsLocationsAddToolApprovalDetailsCommands), + Read(PermissionsLocationsAddToolApprovalDetailsRead), + Write(PermissionsLocationsAddToolApprovalDetailsWrite), + Mcp(PermissionsLocationsAddToolApprovalDetailsMcp), + McpSampling(PermissionsLocationsAddToolApprovalDetailsMcpSampling), + Memory(PermissionsLocationsAddToolApprovalDetailsMemory), + CustomTool(PermissionsLocationsAddToolApprovalDetailsCustomTool), + ExtensionManagement(PermissionsLocationsAddToolApprovalDetailsExtensionManagement), + ExtensionPermissionAccess(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess), +} + +/// Whether the location is a git repo or directory +/// +///
+/// +/// **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 PermissionLocationType { + /// The permission location is persisted at the git repository root. + #[serde(rename = "repo")] + Repo, + /// The permission location is persisted at the working directory. + #[serde(rename = "dir")] + Dir, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, } /// Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. +/// +///
+/// +/// **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 PermissionsConfigureAdditionalContentExclusionPolicyScope { /// The content exclusion policy applies to the current repository. @@ -9750,6 +12208,13 @@ pub enum PermissionsConfigureAdditionalContentExclusionPolicyScope { } /// Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. +/// +///
+/// +/// **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 PermissionsModifyRulesScope { /// Apply the rule change only to this session. @@ -9765,6 +12230,13 @@ pub enum PermissionsModifyRulesScope { } /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. +/// +///
+/// +/// **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 PermissionsSetApproveAllSource { /// Allow-all was enabled from a CLI command-line flag. @@ -9833,6 +12305,13 @@ pub enum RemoteSessionMode { } /// The UI mode the agent was in when this message was sent. Defaults to the session's current mode. +/// +///
+/// +/// **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 SendAgentMode { /// The agent is responding interactively to the user. @@ -9878,6 +12357,13 @@ pub enum SendAttachmentFileType { } /// Type of GitHub reference +/// +///
+/// +/// **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 SendAttachmentGithubReferenceType { /// GitHub issue reference. @@ -9904,6 +12390,13 @@ pub enum SendAttachmentSelectionType { } /// How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. +/// +///
+/// +/// **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 SendMode { /// Append the message to the normal session queue. @@ -10026,8 +12519,15 @@ pub enum SessionInstalledPluginSourceUrlSource { } /// Repository host type, if known +/// +///
+/// +/// **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 SessionMetadataSnapshotWorkspaceHostType { +pub enum WorkspaceSummaryHostType { /// Workspace summary repository is hosted on GitHub. #[serde(rename = "github")] Github, @@ -10041,6 +12541,13 @@ pub enum SessionMetadataSnapshotWorkspaceHostType { } /// Signal to send (default: SIGTERM) +/// +///
+/// +/// **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 ShellKillSignal { /// Request graceful process termination. @@ -10088,6 +12595,13 @@ pub enum SlashCommandSelectSubcommandResultKind { } /// Result of invoking the slash command (text output, prompt to send to the agent, or completion). +/// +///
+/// +/// **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, Serialize, Deserialize)] #[serde(untagged)] pub enum SlashCommandInvocationResult { @@ -10158,6 +12672,14 @@ pub enum TaskAgentInfoType { Agent, } +/// Progress kind +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum TaskAgentProgressType { + #[serde(rename = "agent")] + #[default] + Agent, +} + /// Whether the shell runs inside a managed PTY session or as an independent background process /// ///
@@ -10188,6 +12710,14 @@ pub enum TaskShellInfoType { Shell, } +/// Progress kind +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum TaskShellProgressType { + #[serde(rename = "shell")] + #[default] + Shell, +} + /// SDK-side token authentication; the host configured the token directly via the SDK. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum TokenAuthInfoType { @@ -10197,6 +12727,13 @@ pub enum TokenAuthInfoType { } /// User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). +/// +///
+/// +/// **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 UIAutoModeSwitchResponse { /// Allow the automatic mode switch for this turn. @@ -10247,6 +12784,13 @@ pub enum UIElicitationSchemaType { } /// The user's response: accept (submitted), decline (rejected), or cancel (dismissed) +/// +///
+/// +/// **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 UIElicitationResponseAction { /// The user submitted the requested form values. @@ -10273,6 +12817,13 @@ pub enum UIElicitationSchemaPropertyBooleanType { } /// Numeric type accepted by the field. +/// +///
+/// +/// **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 UIElicitationSchemaPropertyNumberType { /// Any JSON number. @@ -10288,6 +12839,13 @@ pub enum UIElicitationSchemaPropertyNumberType { } /// Optional format hint that constrains the accepted input. +/// +///
+/// +/// **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 UIElicitationSchemaPropertyStringFormat { /// Email address string format. @@ -10333,6 +12891,13 @@ pub enum UIElicitationStringOneOfFieldType { } /// The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. +/// +///
+/// +/// **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 UIExitPlanModeAction { /// Exit plan mode without starting implementation. @@ -10361,37 +12926,16 @@ pub enum UserAuthInfoType { User, } +/// Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. +/// +///
+/// +/// **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 WorkspacesGetWorkspaceResultWorkspaceHostType { - /// Workspace repository is hosted on GitHub. - #[serde(rename = "github")] - Github, - /// Workspace repository is hosted on Azure DevOps. - #[serde(rename = "ado")] - Ado, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - -/// Repository host type, if known -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum WorkspaceSummaryHostType { - /// Workspace summary repository is hosted on GitHub. - #[serde(rename = "github")] - Github, - /// Workspace summary repository is hosted on Azure DevOps. - #[serde(rename = "ado")] - Ado, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} - -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType { +pub enum WorkspacesWorkspaceDetailsHostType { /// Workspace repository is hosted on GitHub. #[serde(rename = "github")] Github, @@ -10403,18 +12947,3 @@ pub enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType { #[serde(other)] Unknown, } - -/// Repository host type, if known -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub enum SessionMetadataSnapshotResultWorkspaceHostType { - /// Workspace summary repository is hosted on GitHub. - #[serde(rename = "github")] - Github, - /// Workspace summary repository is hosted on Azure DevOps. - #[serde(rename = "ado")] - Ado, - /// Unknown variant for forward compatibility. - #[default] - #[serde(other)] - Unknown, -} diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index 2d18b816b..5831a4553 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -1291,6 +1291,14 @@ impl<'a> SessionRpc<'a> { /// Suspends the session while preserving persisted state for later resume. /// /// Wire method: `session.suspend`. + /// + ///
+ /// + /// **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 suspend(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -1312,6 +1320,14 @@ impl<'a> SessionRpc<'a> { /// # Returns /// /// Result of sending a user message + /// + ///
+ /// + /// **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 send(&self, params: SendRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -1334,6 +1350,14 @@ impl<'a> SessionRpc<'a> { /// # Returns /// /// Result of aborting the current turn + /// + ///
+ /// + /// **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 abort(&self, params: AbortRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -1352,6 +1376,14 @@ impl<'a> SessionRpc<'a> { /// # Parameters /// /// * `params` - Parameters for shutting down the session + /// + ///
+ /// + /// **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 shutdown(&self, params: ShutdownRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -1374,6 +1406,14 @@ impl<'a> SessionRpc<'a> { /// # Returns /// /// Identifier of the session event that was emitted for the log message. + /// + ///
+ /// + /// **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 log(&self, params: LogRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -1534,6 +1574,14 @@ impl<'a> SessionRpcAuth<'a> { /// # Returns /// /// Authentication status and account metadata for the session. + /// + ///
+ /// + /// **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_status(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -1555,6 +1603,14 @@ impl<'a> SessionRpcAuth<'a> { /// # Returns /// /// Indicates whether the credential update succeeded. + /// + ///
+ /// + /// **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 set_credentials( &self, params: SessionSetCredentialsParams, @@ -1584,6 +1640,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Slash commands available in the session, after applying any include/exclude filters. + /// + ///
+ /// + /// **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 list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -1605,6 +1669,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Slash commands available in the session, after applying any include/exclude filters. + /// + ///
+ /// + /// **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 list_with_params( &self, params: CommandsListRequest, @@ -1630,6 +1702,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Result of invoking the slash command (text output, prompt to send to the agent, or completion). + /// + ///
+ /// + /// **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 invoke( &self, params: CommandsInvokeRequest, @@ -1655,6 +1735,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Indicates whether the pending client-handled command was completed successfully. + /// + ///
+ /// + /// **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 handle_pending_command( &self, params: CommandsHandlePendingCommandRequest, @@ -1683,6 +1771,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Error message produced while executing the command, if any. + /// + ///
+ /// + /// **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 execute( &self, params: ExecuteCommandParams, @@ -1708,6 +1804,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Indicates whether the command was accepted into the local execution queue. + /// + ///
+ /// + /// **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 enqueue( &self, params: EnqueueCommandParams, @@ -1733,6 +1837,14 @@ impl<'a> SessionRpcCommands<'a> { /// # Returns /// /// Indicates whether the queued-command response was matched to a pending request. + /// + ///
+ /// + /// **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 respond_to_queued_command( &self, params: CommandsRespondToQueuedCommandRequest, @@ -2198,6 +2310,14 @@ impl<'a> SessionRpcInstructions<'a> { /// # Returns /// /// Instruction sources loaded for the session, in merge order. + /// + ///
+ /// + /// **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_sources(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -2740,6 +2860,14 @@ impl<'a> SessionRpcMode<'a> { /// # Returns /// /// The session mode the agent is operating in + /// + ///
+ /// + /// **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(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -2757,6 +2885,14 @@ impl<'a> SessionRpcMode<'a> { /// # Parameters /// /// * `params` - Agent interaction mode to apply to the session. + /// + ///
+ /// + /// **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 set(&self, params: ModeSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -2783,6 +2919,14 @@ impl<'a> SessionRpcModel<'a> { /// # Returns /// /// The currently selected model and reasoning effort for the session. + /// + ///
+ /// + /// **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_current(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -2804,6 +2948,14 @@ impl<'a> SessionRpcModel<'a> { /// # Returns /// /// The model identifier active on the session after the switch. + /// + ///
+ /// + /// **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 switch_to( &self, params: ModelSwitchToRequest, @@ -2829,6 +2981,14 @@ impl<'a> SessionRpcModel<'a> { /// # Returns /// /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. + /// + ///
+ /// + /// **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 set_reasoning_effort( &self, params: ModelSetReasoningEffortRequest, @@ -2861,6 +3021,14 @@ impl<'a> SessionRpcName<'a> { /// # Returns /// /// The session's friendly name, or null when not yet set. + /// + ///
+ /// + /// **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(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -2878,6 +3046,14 @@ impl<'a> SessionRpcName<'a> { /// # Parameters /// /// * `params` - New friendly name to apply to the session. + /// + ///
+ /// + /// **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 set(&self, params: NameSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -2900,6 +3076,14 @@ impl<'a> SessionRpcName<'a> { /// # Returns /// /// Indicates whether the auto-generated summary was applied as the session's name. + /// + ///
+ /// + /// **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 set_auto(&self, params: NameSetAutoRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -2960,6 +3144,20 @@ pub struct SessionRpcPermissions<'a> { } impl<'a> SessionRpcPermissions<'a> { + /// `session.permissions.folderTrust.*` sub-namespace. + pub fn folder_trust(&self) -> SessionRpcPermissionsFolderTrust<'a> { + SessionRpcPermissionsFolderTrust { + session: self.session, + } + } + + /// `session.permissions.locations.*` sub-namespace. + pub fn locations(&self) -> SessionRpcPermissionsLocations<'a> { + SessionRpcPermissionsLocations { + session: self.session, + } + } + /// `session.permissions.paths.*` sub-namespace. pub fn paths(&self) -> SessionRpcPermissionsPaths<'a> { SessionRpcPermissionsPaths { @@ -2985,6 +3183,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 configure( &self, params: PermissionsConfigureParams, @@ -3013,6 +3219,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the permission decision was applied; false when the request was already resolved. + /// + ///
+ /// + /// **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 handle_pending_permission_request( &self, params: PermissionDecisionRequest, @@ -3037,6 +3251,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// List of pending permission requests reconstructed from event history. + /// + ///
+ /// + /// **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 pending_requests(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -3061,6 +3283,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 set_approve_all( &self, params: PermissionsSetApproveAllRequest, @@ -3089,6 +3319,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 modify_rules( &self, params: PermissionsModifyRulesParams, @@ -3117,6 +3355,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 set_required( &self, params: PermissionsSetRequiredRequest, @@ -3141,6 +3387,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 reset_session_approvals( &self, ) -> Result { @@ -3167,6 +3421,14 @@ impl<'a> SessionRpcPermissions<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 notify_prompt_shown( &self, params: PermissionPromptShownNotification, @@ -3185,6 +3447,202 @@ impl<'a> SessionRpcPermissions<'a> { } } +/// `session.permissions.folderTrust.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcPermissionsFolderTrust<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcPermissionsFolderTrust<'a> { + /// Reports whether a folder is trusted according to the user's folder trust state. + /// + /// Wire method: `session.permissions.folderTrust.isTrusted`. + /// + /// # Parameters + /// + /// * `params` - Folder path to check for trust. + /// + /// # Returns + /// + /// Folder trust check result. + /// + ///
+ /// + /// **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 is_trusted( + &self, + params: FolderTrustCheckParams, + ) -> 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_PERMISSIONS_FOLDERTRUST_ISTRUSTED, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Adds a folder to the user's trusted folders list. + /// + /// Wire method: `session.permissions.folderTrust.addTrusted`. + /// + /// # Parameters + /// + /// * `params` - Folder path to add to trusted folders. + /// + /// # Returns + /// + /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 add_trusted( + &self, + params: FolderTrustAddParams, + ) -> 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_PERMISSIONS_FOLDERTRUST_ADDTRUSTED, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + +/// `session.permissions.locations.*` RPCs. +#[derive(Clone, Copy)] +pub struct SessionRpcPermissionsLocations<'a> { + pub(crate) session: &'a Session, +} + +impl<'a> SessionRpcPermissionsLocations<'a> { + /// Resolves the permission location key and type for a working directory. + /// + /// Wire method: `session.permissions.locations.resolve`. + /// + /// # Parameters + /// + /// * `params` - Working directory to resolve into a location-permissions key. + /// + /// # Returns + /// + /// Resolved location-permissions key and type. + /// + ///
+ /// + /// **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 resolve( + &self, + params: PermissionLocationResolveParams, + ) -> 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_PERMISSIONS_LOCATIONS_RESOLVE, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session's permission service. + /// + /// Wire method: `session.permissions.locations.apply`. + /// + /// # Parameters + /// + /// * `params` - Working directory to load persisted location permissions for. + /// + /// # Returns + /// + /// Summary of persisted location permissions applied to the session. + /// + ///
+ /// + /// **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 apply( + &self, + params: PermissionLocationApplyParams, + ) -> 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_PERMISSIONS_LOCATIONS_APPLY, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Persists a tool approval for a permission location and applies its rules to this session's live permission service. + /// + /// Wire method: `session.permissions.locations.addToolApproval`. + /// + /// # Parameters + /// + /// * `params` - Location-scoped tool approval to persist. + /// + /// # Returns + /// + /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 add_tool_approval( + &self, + params: PermissionLocationAddToolApprovalParams, + ) -> 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_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } +} + /// `session.permissions.paths.*` RPCs. #[derive(Clone, Copy)] pub struct SessionRpcPermissionsPaths<'a> { @@ -3199,6 +3657,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// # Returns /// /// Snapshot of the session's allow-listed directories and primary working directory. + /// + ///
+ /// + /// **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 list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -3223,6 +3689,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 add( &self, params: PermissionPathsAddParams, @@ -3251,6 +3725,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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_primary( &self, params: PermissionPathsUpdatePrimaryParams, @@ -3279,6 +3761,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// # Returns /// /// Indicates whether the supplied path is within the session's allowed directories. + /// + ///
+ /// + /// **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 is_path_within_allowed_directories( &self, params: PermissionPathsAllowedCheckParams, @@ -3307,6 +3797,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// # Returns /// /// Indicates whether the supplied path is within the session's workspace directory. + /// + ///
+ /// + /// **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 is_path_within_workspace( &self, params: PermissionPathsWorkspaceCheckParams, @@ -3343,6 +3841,14 @@ impl<'a> SessionRpcPermissionsUrls<'a> { /// # Returns /// /// Indicates whether the operation succeeded. + /// + ///
+ /// + /// **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 set_unrestricted_mode( &self, params: PermissionUrlsSetUnrestrictedModeParams, @@ -3375,6 +3881,14 @@ impl<'a> SessionRpcPlan<'a> { /// # Returns /// /// Existence, contents, and resolved path of the session plan file. + /// + ///
+ /// + /// **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(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -3392,6 +3906,14 @@ impl<'a> SessionRpcPlan<'a> { /// # Parameters /// /// * `params` - Replacement contents to write to the session plan file. + /// + ///
+ /// + /// **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(&self, params: PlanUpdateRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -3406,6 +3928,14 @@ impl<'a> SessionRpcPlan<'a> { /// Deletes the session plan file from the workspace. /// /// Wire method: `session.plan.delete`. + /// + ///
+ /// + /// **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 delete(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -3708,6 +4238,14 @@ impl<'a> SessionRpcShell<'a> { /// # Returns /// /// Identifier of the spawned process, used to correlate streamed output and exit notifications. + /// + ///
+ /// + /// **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 exec(&self, params: ShellExecRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -3730,6 +4268,14 @@ impl<'a> SessionRpcShell<'a> { /// # Returns /// /// Indicates whether the signal was delivered; false if the process was unknown or already exited. + /// + ///
+ /// + /// **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 kill(&self, params: ShellKillRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -4292,6 +4838,14 @@ impl<'a> SessionRpcTools<'a> { /// # Returns /// /// Indicates whether the external tool call result was handled successfully. + /// + ///
+ /// + /// **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 handle_pending_tool_call( &self, params: HandlePendingToolCallRequest, @@ -4316,6 +4870,14 @@ impl<'a> SessionRpcTools<'a> { /// # Returns /// /// Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation. + /// + ///
+ /// + /// **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 initialize_and_validate(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -4348,6 +4910,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// The elicitation response (accept with form values, decline, or cancel) + /// + ///
+ /// + /// **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 elicitation( &self, params: UIElicitationRequest, @@ -4373,6 +4943,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the elicitation response was accepted; false if it was already resolved by another client. + /// + ///
+ /// + /// **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 handle_pending_elicitation( &self, params: UIHandlePendingElicitationRequest, @@ -4401,6 +4979,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the pending UI request was resolved by this call. + /// + ///
+ /// + /// **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 handle_pending_user_input( &self, params: UIHandlePendingUserInputRequest, @@ -4429,6 +5015,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the pending UI request was resolved by this call. + /// + ///
+ /// + /// **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 handle_pending_sampling( &self, params: UIHandlePendingSamplingRequest, @@ -4457,6 +5051,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the pending UI request was resolved by this call. + /// + ///
+ /// + /// **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 handle_pending_auto_mode_switch( &self, params: UIHandlePendingAutoModeSwitchRequest, @@ -4485,6 +5087,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the pending UI request was resolved by this call. + /// + ///
+ /// + /// **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 handle_pending_exit_plan_mode( &self, params: UIHandlePendingExitPlanModeRequest, @@ -4509,6 +5119,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Register an in-process handler for `auto_mode_switch.requested` events. The caller still attaches the actual listener via the standard event-subscription mechanism; this registration solely tells the server bridge to skip its own dispatch (so a remote client doesn't race the in-process handler for the same requestId). + /// + ///
+ /// + /// **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 register_direct_auto_mode_switch_handler( &self, ) -> Result { @@ -4535,6 +5153,14 @@ impl<'a> SessionRpcUi<'a> { /// # Returns /// /// Indicates whether the handle was active and the registration count was decremented. + /// + ///
+ /// + /// **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 unregister_direct_auto_mode_switch_handler( &self, params: UIUnregisterDirectAutoModeSwitchHandlerRequest, @@ -4600,6 +5226,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Current workspace metadata for the session, including its absolute filesystem path when available. + /// + ///
+ /// + /// **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_workspace(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -4620,6 +5254,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Relative paths of files stored in the session workspace files directory. + /// + ///
+ /// + /// **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 list_files(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -4641,6 +5283,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Contents of the requested workspace file as a UTF-8 string. + /// + ///
+ /// + /// **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_file( &self, params: WorkspacesReadFileRequest, @@ -4662,6 +5312,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Parameters /// /// * `params` - Relative path and UTF-8 content for the workspace file to create or overwrite. + /// + ///
+ /// + /// **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 create_file(&self, params: WorkspacesCreateFileRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); @@ -4683,6 +5341,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Workspace checkpoints in chronological order; empty when the workspace is not enabled. + /// + ///
+ /// + /// **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 list_checkpoints(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); let _value = self @@ -4707,6 +5373,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. + /// + ///
+ /// + /// **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_checkpoint( &self, params: WorkspacesReadCheckpointRequest, @@ -4735,6 +5409,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// # Returns /// /// Descriptor for the saved paste file, or null when the workspace is unavailable. + /// + ///
+ /// + /// **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 save_large_paste( &self, params: WorkspacesSaveLargePasteRequest, diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index 21cd224f6..540108690 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@github/copilot": "^1.0.51-3", + "@github/copilot": "^1.0.51", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -464,9 +464,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51-3.tgz", - "integrity": "sha512-wbulKqSHhqVXoA8ffqukq3AxMGw8VfVbZ5ysGW+WSHbWXydh9aEKo9/4PqxUxWB4W9oSPggoqrVhj0NgJJ4agw==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51.tgz", + "integrity": "sha512-yKXbMeApxO8P68/BeSS/lmIRsCprcMdY8MRRp+Vp/QymCv59o4lxDcAIVq2h/CD8vJHoiG4OijdWydd76yoqLw==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -476,20 +476,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.51-3", - "@github/copilot-darwin-x64": "1.0.51-3", - "@github/copilot-linux-arm64": "1.0.51-3", - "@github/copilot-linux-x64": "1.0.51-3", - "@github/copilot-linuxmusl-arm64": "1.0.51-3", - "@github/copilot-linuxmusl-x64": "1.0.51-3", - "@github/copilot-win32-arm64": "1.0.51-3", - "@github/copilot-win32-x64": "1.0.51-3" + "@github/copilot-darwin-arm64": "1.0.51", + "@github/copilot-darwin-x64": "1.0.51", + "@github/copilot-linux-arm64": "1.0.51", + "@github/copilot-linux-x64": "1.0.51", + "@github/copilot-linuxmusl-arm64": "1.0.51", + "@github/copilot-linuxmusl-x64": "1.0.51", + "@github/copilot-win32-arm64": "1.0.51", + "@github/copilot-win32-x64": "1.0.51" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51-3.tgz", - "integrity": "sha512-PXnMWuaUIbxkBzeDr4cKQy7qtFqldufzWvihI5QhJaF7/l0L/8XoTGtj73qbX7IpG4wpzQ1N8MIZFm/SmyKoqQ==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51.tgz", + "integrity": "sha512-i713sW3GzbeLKowGVY6/A97lGkUMJNVdUD0oaUWTWmXX08u+hWsnVKbqL4EQlw7x8xU511X5vkgFMi31DWyCuQ==", "cpu": [ "arm64" ], @@ -504,9 +504,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51-3.tgz", - "integrity": "sha512-sIRQBZjYh7gGDd2wUjgmX5PTfFZfvzrQp8lNvoRsqKnihzPnGaRg+St3lh7St3qtHoOBAaAoYw/DHREEp/p9xg==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51.tgz", + "integrity": "sha512-c67SbMznclcHqlJINXBCwudhqRgE5HNaY9fqMQqu954+ezVa6Q/2hwhCU51PNbYLWtZTGgXsgWnrxOg77hh0ug==", "cpu": [ "x64" ], @@ -521,9 +521,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51-3.tgz", - "integrity": "sha512-LzFRV9EqSFdEiqu+VyoDY4XcO3tvd7VmVzkF02BP9MgwApCCLRzJS4ElMh/3FojqV+hL18vpFSyqPVmsgjLcug==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51.tgz", + "integrity": "sha512-MlQeTB4CSPnG2BZTxsPSV5a7rjsqFOzhTCVCNjLeht3ODObWjrIYhtzVF7h/nue9ii96u9RBB0gIAfoBReryTw==", "cpu": [ "arm64" ], @@ -538,9 +538,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51-3.tgz", - "integrity": "sha512-bMEE8/nj9GWx3f/PWvoSGnk6IUHoeVtdDNJk7xUTMMK2eQBUQGKfCtOKTa/mSVpJB81bxiK8IVqZypJO2cYxqQ==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51.tgz", + "integrity": "sha512-fniGTwR5KLFfNDjSFbWvZ3Bno+2bXsMdNM0l3dFHwVTHyBqQSXZ3xvEEDadGimCxgKfRDRt1M1FYnUpqhLYf/Q==", "cpu": [ "x64" ], @@ -555,9 +555,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51-3.tgz", - "integrity": "sha512-ZEr7RmNv8/FyWdbC6xBPdb7HZO0QdlTGt1SOO+AHW1PuHYdYBdGObDB41SfHf+h0kiiljBsLq8ps1njP/1kIDw==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51.tgz", + "integrity": "sha512-vg9sWZw4u/bqHa7ylF/GZeuznt+k4/Em899C++CTBU4CKhtAaxd2TZDsEV0Ap2DXzP2UFxCn77vZoHyxByMI5A==", "cpu": [ "arm64" ], @@ -572,9 +572,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51-3.tgz", - "integrity": "sha512-d4BH9FkXTTSuXfVElNAHe4djktueVQUTj9cOdmKeQKC80Magew1F+7RvCgIDFupmhYnra+1NJf5nM7+wpiaECg==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51.tgz", + "integrity": "sha512-zxXRdzjshHTQd/LDWmOIDXt0T8nvw66ue6cneAXHhLXWzuiv5mqPKnxuHQyvQDt+IBEyq9utuetlKxcAVo+gYw==", "cpu": [ "x64" ], @@ -589,9 +589,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51-3.tgz", - "integrity": "sha512-o/tQTD4VFKhEfoxHD5HMdoaqys5jFt8+pXkQKXSFlkGWzAQZt4iZasIC7L5f/AuGctoZ/kZFW2iMOWNpDHtj5w==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51.tgz", + "integrity": "sha512-/SP8DfOukjllCXavgBNI0qwJa+8hCFRNK7Q3/Q3qzAOvaWUZZkabKSVZfXaGxerTGpGq009Zg3nyIPR0jfm60w==", "cpu": [ "arm64" ], @@ -606,9 +606,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.51-3", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51-3.tgz", - "integrity": "sha512-CjpogQNnl0YrEfTCPSUtKPpieVEfWWP2map4OQNLSJXwQ3toG1h359m4QXXLuSz/vJM8aCrCm1VxgCg5KR1eKw==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51.tgz", + "integrity": "sha512-ZB5Jr9m4ZR8gFOwXnYGNfdU+bMFeUgj1OCU3x64Tx5GC6Uln/pf8Ue5LHlsBkBq/NuKvkp/g4GARDIHBCKXEnQ==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index c1df0271f..4da4c5b52 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -11,7 +11,7 @@ "test": "vitest run" }, "devDependencies": { - "@github/copilot": "^1.0.51-3", + "@github/copilot": "^1.0.51", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14",