,
/// Whether the server (account/org) managed-settings layer was present
pub server_managed: bool,
/// The effective (resolved) managed settings values, so clients can render exactly what is enforced. Absent when no managed policy is in force.
@@ -4229,6 +4453,22 @@ pub struct SessionToolsUpdatedData {
#[serde(rename_all = "camelCase")]
pub struct SessionBackgroundTasksChangedData {}
+/// Session event "factory.run_updated". Ephemeral invalidation signal for a changed factory run.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FactoryRunUpdatedData {
+ /// Monotonic revision now available for the run.
+ pub revision: i64,
+ pub run_id: String,
+}
+
/// A single resolved skill in `session.skills_loaded`, including source, invocability, enabled state, path, and argument hint.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -4703,6 +4943,21 @@ pub enum Verbosity {
Unknown,
}
+/// Who created the schedule: `user` (an explicit user action such as `/every` or `/after`) or `model` (the agent via the `manage_schedule` tool). Gates whether a scheduled skill that opted out of model invocation may fire: only user-created schedules may.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum ScheduleOrigin {
+ /// The schedule was created by an explicit user action, such as `/every` or `/after`.
+ #[serde(rename = "user")]
+ User,
+ /// The schedule was created by the agent via the `manage_schedule` tool.
+ #[serde(rename = "model")]
+ Model,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// The type of operation performed on the autopilot objective state file
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum AutopilotObjectiveChangedOperation {
@@ -4848,6 +5103,30 @@ pub enum ShutdownType {
Unknown,
}
+/// What initiated a conversation compaction
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum CompactionTrigger {
+ /// Background compaction started automatically because context utilization crossed the background threshold.
+ #[serde(rename = "threshold")]
+ Threshold,
+ /// Compaction forced by a context-limit model response (e.g. HTTP 413) before retrying the request.
+ #[serde(rename = "context_limit_retry")]
+ ContextLimitRetry,
+ /// User-requested compaction, e.g. the /compact command or the history.compact API.
+ #[serde(rename = "manual")]
+ Manual,
+ /// Emergency compaction triggered by high process memory usage.
+ #[serde(rename = "memory_pressure")]
+ MemoryPressure,
+ /// Compaction requested while switching to a model with a smaller context window.
+ #[serde(rename = "model_switch")]
+ ModelSwitch,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// The agent mode that was active when this message was sent
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum UserMessageAgentMode {
@@ -5325,6 +5604,37 @@ pub enum PermissionRequest {
ExtensionPermissionAccess(PermissionRequestExtensionPermissionAccess),
}
+/// Why the auto-approval judge produced no usable recommendation. Present only alongside an `error` recommendation, where the human-readable reason is a fixed string and therefore cannot distinguish these cases. Intended to make a judge failure reportable by a consumer that has no access to the host's logs.
+///
+///
+///
+/// **Experimental.** This type 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 AutoApprovalJudgeFailureReason {
+ /// The judge model call exceeded its deadline.
+ #[serde(rename = "timeout")]
+ Timeout,
+ /// The judge model call was cancelled before it returned.
+ #[serde(rename = "abort")]
+ Abort,
+ /// The judge model call completed but returned no content.
+ #[serde(rename = "empty_response")]
+ EmptyResponse,
+ /// The judge model call failed (for example a transport, authentication, or rate-limit error).
+ #[serde(rename = "model_error")]
+ ModelError,
+ /// The judge model replied, but the reply carried no ALLOW/DENY verdict.
+ #[serde(rename = "parse_error")]
+ ParseError,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Outcome of the auto-approval safety judge for a permission request. Present only when auto mode is enabled; its absence means the judge did not evaluate the request (auto mode was off).
///
///
@@ -5764,6 +6074,111 @@ pub enum McpHeadersRefreshCompletedOutcome {
Unknown,
}
+/// Direction of an MCP wire message.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticWireMessageDirection {
+ /// The runtime sent the message to the MCP server.
+ #[serde(rename = "outbound")]
+ Outbound,
+ /// The runtime received the message from the MCP server.
+ #[serde(rename = "inbound")]
+ Inbound,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
+/// Diagnostic kind discriminator
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticWireMessageKind {
+ #[serde(rename = "wire_message")]
+ #[default]
+ WireMessage,
+}
+
+/// Diagnostic kind discriminator
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticHttpExchangeKind {
+ #[serde(rename = "http_exchange")]
+ #[default]
+ HttpExchange,
+}
+
+/// Phase of an observed MCP HTTP exchange.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticHttpExchangePhase {
+ /// The outgoing HTTP request.
+ #[serde(rename = "request")]
+ Request,
+ /// The incoming HTTP response.
+ #[serde(rename = "response")]
+ Response,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
+/// Diagnostic kind discriminator
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticServerLogKind {
+ #[serde(rename = "server_log")]
+ #[default]
+ ServerLog,
+}
+
+/// Output stream for an MCP server log line.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticServerLogStream {
+ /// The process standard-error stream.
+ #[serde(rename = "stderr")]
+ Stderr,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
+/// Diagnostic kind discriminator
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpDiagnosticProcessLifecycleKind {
+ #[serde(rename = "process_lifecycle")]
+ #[default]
+ ProcessLifecycle,
+}
+
+/// Detailed MCP diagnostic payload discriminated by `kind`.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum McpDiagnosticDetail {
+ WireMessage(McpDiagnosticWireMessage),
+ HttpExchange(McpDiagnosticHttpExchange),
+ ServerLog(McpDiagnosticServerLog),
+ ProcessLifecycle(McpDiagnosticProcessLifecycle),
+}
+
+/// Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum McpServerTransport {
+ /// Server communicates over stdio with a local child process.
+ #[serde(rename = "stdio")]
+ Stdio,
+ /// Server communicates over streamable HTTP.
+ #[serde(rename = "http")]
+ Http,
+ /// Server communicates over Server-Sent Events (deprecated).
+ #[serde(rename = "sse")]
+ Sse,
+ /// Server is backed by an in-memory runtime implementation.
+ #[serde(rename = "memory")]
+ Memory,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// The user's auto-mode-switch choice
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum AutoModeSwitchResponse {
@@ -5974,27 +6389,6 @@ pub enum McpServerStatus {
Unknown,
}
-/// Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
-#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
-pub enum McpServerTransport {
- /// Server communicates over stdio with a local child process.
- #[serde(rename = "stdio")]
- Stdio,
- /// Server communicates over streamable HTTP.
- #[serde(rename = "http")]
- Http,
- /// Server communicates over Server-Sent Events (deprecated).
- #[serde(rename = "sse")]
- Sse,
- /// Server is backed by an in-memory runtime implementation.
- #[serde(rename = "memory")]
- Memory,
- /// Unknown variant for forward compatibility.
- #[default]
- #[serde(other)]
- Unknown,
-}
-
/// Discovery source
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ExtensionsLoadedExtensionSource {