{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "title": "CopilotApi",
  "description": "Describes all JSON-RPC methods exposed by the Copilot CLI server. SDK codegen tools consume this to produce typed client wrappers.",
  "server": {
    "ping": {
      "rpcMethod": "ping",
      "description": "Checks server responsiveness and returns protocol information.",
      "params": {
        "$ref": "#/definitions/PingRequest",
        "description": "Optional message to echo back to the caller."
      },
      "result": {
        "$ref": "#/definitions/PingResult",
        "description": "Server liveness response, including the echoed message, current timestamp, and protocol version."
      }
    },
    "connect": {
      "rpcMethod": "connect",
      "description": "Performs the SDK server connection handshake and validates the optional connection token.",
      "params": {
        "$ref": "#/definitions/ConnectRequest",
        "description": "Optional connection token presented by the SDK client during the handshake."
      },
      "result": {
        "$ref": "#/definitions/ConnectResult",
        "description": "Handshake result reporting the server's protocol version and package version on success."
      },
      "visibility": "internal"
    },
    "models": {
      "list": {
        "rpcMethod": "models.list",
        "description": "Lists Copilot models available to the authenticated user.",
        "params": {
          "$ref": "#/definitions/ModelsListRequest",
          "description": "Optional GitHub token used to list models for a specific user instead of the global auth context."
        },
        "result": {
          "$ref": "#/definitions/ModelList",
          "description": "List of Copilot models available to the resolved user, including capabilities and billing metadata."
        }
      }
    },
    "tools": {
      "list": {
        "rpcMethod": "tools.list",
        "description": "Lists built-in tools available for a model.",
        "params": {
          "$ref": "#/definitions/ToolsListRequest",
          "description": "Optional model identifier whose tool overrides should be applied to the listing."
        },
        "result": {
          "$ref": "#/definitions/ToolList",
          "description": "Built-in tools available for the requested model, with their parameters and instructions."
        }
      }
    },
    "account": {
      "getQuota": {
        "rpcMethod": "account.getQuota",
        "description": "Gets Copilot quota usage for the authenticated user or supplied GitHub token.",
        "params": {
          "$ref": "#/definitions/AccountGetQuotaRequest",
          "description": "Optional GitHub token used to look up quota for a specific user instead of the global auth context."
        },
        "result": {
          "$ref": "#/definitions/AccountGetQuotaResult",
          "description": "Quota usage snapshots for the resolved user, keyed by quota type."
        }
      }
    },
    "mcp": {
      "config": {
        "list": {
          "rpcMethod": "mcp.config.list",
          "description": "Lists MCP servers from user configuration.",
          "params": null,
          "result": {
            "$ref": "#/definitions/McpConfigList",
            "description": "User-configured MCP servers, keyed by server name."
          }
        },
        "add": {
          "rpcMethod": "mcp.config.add",
          "description": "Adds an MCP server to user configuration.",
          "params": {
            "$ref": "#/definitions/McpConfigAddRequest",
            "description": "MCP server name and configuration to add to user configuration."
          },
          "result": {
            "type": "null"
          }
        },
        "update": {
          "rpcMethod": "mcp.config.update",
          "description": "Updates an MCP server in user configuration.",
          "params": {
            "$ref": "#/definitions/McpConfigUpdateRequest",
            "description": "MCP server name and replacement configuration to write to user configuration."
          },
          "result": {
            "type": "null"
          }
        },
        "remove": {
          "rpcMethod": "mcp.config.remove",
          "description": "Removes an MCP server from user configuration.",
          "params": {
            "$ref": "#/definitions/McpConfigRemoveRequest",
            "description": "MCP server name to remove from user configuration."
          },
          "result": {
            "type": "null"
          }
        },
        "enable": {
          "rpcMethod": "mcp.config.enable",
          "description": "Enables MCP servers in user configuration for new sessions.",
          "params": {
            "$ref": "#/definitions/McpConfigEnableRequest",
            "description": "MCP server names to enable for new sessions."
          },
          "result": {
            "type": "null"
          }
        },
        "disable": {
          "rpcMethod": "mcp.config.disable",
          "description": "Disables MCP servers in user configuration for new sessions.",
          "params": {
            "$ref": "#/definitions/McpConfigDisableRequest",
            "description": "MCP server names to disable for new sessions."
          },
          "result": {
            "type": "null"
          }
        }
      },
      "discover": {
        "rpcMethod": "mcp.discover",
        "description": "Discovers MCP servers from user, workspace, plugin, and builtin sources.",
        "params": {
          "$ref": "#/definitions/McpDiscoverRequest",
          "description": "Optional working directory used as context for MCP server discovery."
        },
        "result": {
          "$ref": "#/definitions/McpDiscoverResult",
          "description": "MCP servers discovered from user, workspace, plugin, and built-in sources."
        }
      }
    },
    "skills": {
      "config": {
        "setDisabledSkills": {
          "rpcMethod": "skills.config.setDisabledSkills",
          "description": "Replaces the global list of disabled skills.",
          "params": {
            "$ref": "#/definitions/SkillsConfigSetDisabledSkillsRequest",
            "description": "Skill names to mark as disabled in global configuration, replacing any previous list."
          },
          "result": {
            "type": "null"
          }
        }
      },
      "discover": {
        "rpcMethod": "skills.discover",
        "description": "Discovers skills across global and project sources.",
        "params": {
          "$ref": "#/definitions/SkillsDiscoverRequest",
          "description": "Optional project paths and additional skill directories to include in discovery."
        },
        "result": {
          "$ref": "#/definitions/ServerSkillList",
          "description": "Skills discovered across global and project sources."
        }
      }
    },
    "sessionFs": {
      "setProvider": {
        "rpcMethod": "sessionFs.setProvider",
        "description": "Registers an SDK client as the session filesystem provider.",
        "params": {
          "$ref": "#/definitions/SessionFsSetProviderRequest",
          "description": "Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider."
        },
        "result": {
          "$ref": "#/definitions/SessionFsSetProviderResult",
          "description": "Indicates whether the calling client was registered as the session filesystem provider."
        }
      }
    },
    "sessions": {
      "fork": {
        "rpcMethod": "sessions.fork",
        "description": "Creates a new session by forking persisted history from an existing session.",
        "params": {
          "$ref": "#/definitions/SessionsForkRequest",
          "description": "Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session."
        },
        "result": {
          "$ref": "#/definitions/SessionsForkResult",
          "description": "Identifier and optional friendly name assigned to the newly forked session."
        },
        "stability": "experimental"
      },
      "connect": {
        "rpcMethod": "sessions.connect",
        "description": "Connects to an existing remote session and exposes it as an SDK session.",
        "params": {
          "$ref": "#/definitions/ConnectRemoteSessionParams",
          "description": "Remote session connection parameters."
        },
        "result": {
          "$ref": "#/definitions/RemoteSessionConnectionResult",
          "description": "Remote session connection result."
        },
        "stability": "experimental"
      }
    }
  },
  "session": {
    "suspend": {
      "rpcMethod": "session.suspend",
      "description": "Suspends the session while preserving persisted state for later resume.",
      "params": {
        "type": "object",
        "description": "Identifies the target session.",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "Target session identifier"
          }
        },
        "required": [
          "sessionId"
        ],
        "additionalProperties": false
      },
      "result": {
        "type": "null"
      }
    },
    "auth": {
      "getStatus": {
        "rpcMethod": "session.auth.getStatus",
        "description": "Gets authentication status and account metadata for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/SessionAuthStatus",
          "description": "Authentication status and account metadata for the session."
        }
      }
    },
    "model": {
      "getCurrent": {
        "rpcMethod": "session.model.getCurrent",
        "description": "Gets the currently selected model for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/CurrentModel",
          "description": "The currently selected model for the session."
        }
      },
      "switchTo": {
        "rpcMethod": "session.model.switchTo",
        "description": "Switches the session to a model and optional reasoning configuration.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "modelId": {
              "type": "string",
              "description": "Model identifier to switch to"
            },
            "reasoningEffort": {
              "type": "string",
              "description": "Reasoning effort level to use for the model. \"none\" disables reasoning."
            },
            "reasoningSummary": {
              "$ref": "#/definitions/ReasoningSummary",
              "description": "Reasoning summary mode to request for supported model clients"
            },
            "modelCapabilities": {
              "$ref": "#/definitions/ModelCapabilitiesOverride",
              "description": "Override individual model capabilities resolved by the runtime"
            }
          },
          "required": [
            "sessionId",
            "modelId"
          ],
          "additionalProperties": false,
          "description": "Target model identifier and optional reasoning effort, summary, and capability overrides.",
          "title": "ModelSwitchToRequest"
        },
        "result": {
          "$ref": "#/definitions/ModelSwitchToResult",
          "description": "The model identifier active on the session after the switch."
        }
      }
    },
    "mode": {
      "get": {
        "rpcMethod": "session.mode.get",
        "description": "Gets the current agent interaction mode.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/SessionMode",
          "description": "The session mode the agent is operating in"
        }
      },
      "set": {
        "rpcMethod": "session.mode.set",
        "description": "Sets the current agent interaction mode.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "mode": {
              "$ref": "#/definitions/SessionMode",
              "description": "The session mode the agent is operating in"
            }
          },
          "required": [
            "sessionId",
            "mode"
          ],
          "additionalProperties": false,
          "description": "Agent interaction mode to apply to the session.",
          "title": "ModeSetRequest"
        },
        "result": {
          "type": "null"
        }
      }
    },
    "name": {
      "get": {
        "rpcMethod": "session.name.get",
        "description": "Gets the session's friendly name.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/NameGetResult",
          "description": "The session's friendly name, or null when not yet set."
        }
      },
      "set": {
        "rpcMethod": "session.name.set",
        "description": "Sets the session's friendly name.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "New session name (1–100 characters, trimmed of leading/trailing whitespace)"
            }
          },
          "required": [
            "sessionId",
            "name"
          ],
          "additionalProperties": false,
          "description": "New friendly name to apply to the session.",
          "title": "NameSetRequest"
        },
        "result": {
          "type": "null"
        }
      }
    },
    "plan": {
      "read": {
        "rpcMethod": "session.plan.read",
        "description": "Reads the session plan file from the workspace.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/PlanReadResult",
          "description": "Existence, contents, and resolved path of the session plan file."
        }
      },
      "update": {
        "rpcMethod": "session.plan.update",
        "description": "Writes new content to the session plan file.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "content": {
              "type": "string",
              "description": "The new content for the plan file"
            }
          },
          "required": [
            "sessionId",
            "content"
          ],
          "additionalProperties": false,
          "description": "Replacement contents to write to the session plan file.",
          "title": "PlanUpdateRequest"
        },
        "result": {
          "type": "null"
        }
      },
      "delete": {
        "rpcMethod": "session.plan.delete",
        "description": "Deletes the session plan file from the workspace.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "type": "null"
        }
      }
    },
    "workspaces": {
      "getWorkspace": {
        "rpcMethod": "session.workspaces.getWorkspace",
        "description": "Gets current workspace metadata for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/WorkspacesGetWorkspaceResult",
          "description": "Current workspace metadata for the session, or null when not available."
        }
      },
      "listFiles": {
        "rpcMethod": "session.workspaces.listFiles",
        "description": "Lists files stored in the session workspace files directory.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/WorkspacesListFilesResult",
          "description": "Relative paths of files stored in the session workspace files directory."
        }
      },
      "readFile": {
        "rpcMethod": "session.workspaces.readFile",
        "description": "Reads a file from the session workspace files directory.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Relative path within the workspace files directory"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Relative path of the workspace file to read.",
          "title": "WorkspacesReadFileRequest"
        },
        "result": {
          "$ref": "#/definitions/WorkspacesReadFileResult",
          "description": "Contents of the requested workspace file as a UTF-8 string."
        }
      },
      "createFile": {
        "rpcMethod": "session.workspaces.createFile",
        "description": "Creates or overwrites a file in the session workspace files directory.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Relative path within the workspace files directory"
            },
            "content": {
              "type": "string",
              "description": "File content to write as a UTF-8 string"
            }
          },
          "required": [
            "sessionId",
            "path",
            "content"
          ],
          "additionalProperties": false,
          "description": "Relative path and UTF-8 content for the workspace file to create or overwrite.",
          "title": "WorkspacesCreateFileRequest"
        },
        "result": {
          "type": "null"
        }
      }
    },
    "instructions": {
      "getSources": {
        "rpcMethod": "session.instructions.getSources",
        "description": "Gets instruction sources loaded for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/InstructionsGetSourcesResult",
          "description": "Instruction sources loaded for the session, in merge order."
        }
      }
    },
    "fleet": {
      "start": {
        "rpcMethod": "session.fleet.start",
        "description": "Starts fleet mode by submitting the fleet orchestration prompt to the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "prompt": {
              "type": "string",
              "description": "Optional user prompt to combine with fleet instructions"
            }
          },
          "additionalProperties": false,
          "description": "Optional user prompt to combine with the fleet orchestration instructions.",
          "title": "FleetStartRequest",
          "required": [
            "sessionId"
          ]
        },
        "result": {
          "$ref": "#/definitions/FleetStartResult",
          "description": "Indicates whether fleet mode was successfully activated."
        },
        "stability": "experimental"
      }
    },
    "agent": {
      "list": {
        "rpcMethod": "session.agent.list",
        "description": "Lists custom agents available to the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/AgentList",
          "description": "Custom agents available to the session."
        },
        "stability": "experimental"
      },
      "getCurrent": {
        "rpcMethod": "session.agent.getCurrent",
        "description": "Gets the currently selected custom agent for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/AgentGetCurrentResult",
          "description": "The currently selected custom agent, or null when using the default agent."
        },
        "stability": "experimental"
      },
      "select": {
        "rpcMethod": "session.agent.select",
        "description": "Selects a custom agent for subsequent turns in the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "name": {
              "type": "string",
              "description": "Name of the custom agent to select"
            }
          },
          "required": [
            "sessionId",
            "name"
          ],
          "additionalProperties": false,
          "description": "Name of the custom agent to select for subsequent turns.",
          "title": "AgentSelectRequest"
        },
        "result": {
          "$ref": "#/definitions/AgentSelectResult",
          "description": "The newly selected custom agent."
        },
        "stability": "experimental"
      },
      "deselect": {
        "rpcMethod": "session.agent.deselect",
        "description": "Clears the selected custom agent and returns the session to the default agent.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "reload": {
        "rpcMethod": "session.agent.reload",
        "description": "Reloads custom agent definitions and returns the refreshed list.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/AgentReloadResult",
          "description": "Custom agents available to the session after reloading definitions from disk."
        },
        "stability": "experimental"
      }
    },
    "tasks": {
      "startAgent": {
        "rpcMethod": "session.tasks.startAgent",
        "description": "Starts a background agent task in the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "agentType": {
              "type": "string",
              "description": "Type of agent to start (e.g., 'explore', 'task', 'general-purpose')"
            },
            "prompt": {
              "type": "string",
              "description": "Task prompt for the agent"
            },
            "name": {
              "type": "string",
              "description": "Short name for the agent, used to generate a human-readable ID"
            },
            "description": {
              "type": "string",
              "description": "Short description of the task"
            },
            "model": {
              "type": "string",
              "description": "Optional model override"
            }
          },
          "required": [
            "sessionId",
            "agentType",
            "prompt",
            "name"
          ],
          "additionalProperties": false,
          "description": "Agent type, prompt, name, and optional description and model override for the new task.",
          "title": "TasksStartAgentRequest"
        },
        "result": {
          "$ref": "#/definitions/TasksStartAgentResult",
          "description": "Identifier assigned to the newly started background agent task."
        },
        "stability": "experimental"
      },
      "list": {
        "rpcMethod": "session.tasks.list",
        "description": "Lists background tasks tracked by the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/TaskList",
          "description": "Background tasks currently tracked by the session."
        },
        "stability": "experimental"
      },
      "promoteToBackground": {
        "rpcMethod": "session.tasks.promoteToBackground",
        "description": "Promotes an eligible synchronously-waited task so it continues running in the background.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Task identifier"
            }
          },
          "required": [
            "sessionId",
            "id"
          ],
          "additionalProperties": false,
          "description": "Identifier of the task to promote to background mode.",
          "title": "TasksPromoteToBackgroundRequest"
        },
        "result": {
          "$ref": "#/definitions/TasksPromoteToBackgroundResult",
          "description": "Indicates whether the task was successfully promoted to background mode."
        },
        "stability": "experimental"
      },
      "cancel": {
        "rpcMethod": "session.tasks.cancel",
        "description": "Cancels a background task.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Task identifier"
            }
          },
          "required": [
            "sessionId",
            "id"
          ],
          "additionalProperties": false,
          "description": "Identifier of the background task to cancel.",
          "title": "TasksCancelRequest"
        },
        "result": {
          "$ref": "#/definitions/TasksCancelResult",
          "description": "Indicates whether the background task was successfully cancelled."
        },
        "stability": "experimental"
      },
      "remove": {
        "rpcMethod": "session.tasks.remove",
        "description": "Removes a completed or cancelled background task from tracking.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Task identifier"
            }
          },
          "required": [
            "sessionId",
            "id"
          ],
          "additionalProperties": false,
          "description": "Identifier of the completed or cancelled task to remove from tracking.",
          "title": "TasksRemoveRequest"
        },
        "result": {
          "$ref": "#/definitions/TasksRemoveResult",
          "description": "Indicates whether the task was removed. False when the task does not exist or is still running/idle."
        },
        "stability": "experimental"
      },
      "sendMessage": {
        "rpcMethod": "session.tasks.sendMessage",
        "description": "Sends a message to a background agent task.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Agent task identifier"
            },
            "message": {
              "type": "string",
              "description": "Message content to send to the agent"
            },
            "fromAgentId": {
              "type": "string",
              "description": "Agent ID of the sender, if sent on behalf of another agent"
            }
          },
          "required": [
            "sessionId",
            "id",
            "message"
          ],
          "additionalProperties": false,
          "description": "Identifier of the target agent task, message content, and optional sender agent ID.",
          "title": "TasksSendMessageRequest"
        },
        "result": {
          "$ref": "#/definitions/TasksSendMessageResult",
          "description": "Indicates whether the message was delivered, with an error message when delivery failed."
        },
        "stability": "experimental"
      }
    },
    "skills": {
      "list": {
        "rpcMethod": "session.skills.list",
        "description": "Lists skills available to the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/SkillList",
          "description": "Skills available to the session, with their enabled state."
        },
        "stability": "experimental"
      },
      "enable": {
        "rpcMethod": "session.skills.enable",
        "description": "Enables a skill for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "name": {
              "type": "string",
              "description": "Name of the skill to enable"
            }
          },
          "required": [
            "sessionId",
            "name"
          ],
          "additionalProperties": false,
          "description": "Name of the skill to enable for the session.",
          "title": "SkillsEnableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "disable": {
        "rpcMethod": "session.skills.disable",
        "description": "Disables a skill for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "name": {
              "type": "string",
              "description": "Name of the skill to disable"
            }
          },
          "required": [
            "sessionId",
            "name"
          ],
          "additionalProperties": false,
          "description": "Name of the skill to disable for the session.",
          "title": "SkillsDisableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "reload": {
        "rpcMethod": "session.skills.reload",
        "description": "Reloads skill definitions for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/SkillsLoadDiagnostics",
          "description": "Diagnostics from reloading skill definitions, with warnings and errors as separate lists."
        },
        "stability": "experimental"
      }
    },
    "mcp": {
      "list": {
        "rpcMethod": "session.mcp.list",
        "description": "Lists MCP servers configured for the session and their connection status.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/McpServerList",
          "description": "MCP servers configured for the session, with their connection status."
        },
        "stability": "experimental"
      },
      "enable": {
        "rpcMethod": "session.mcp.enable",
        "description": "Enables an MCP server for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "serverName": {
              "type": "string",
              "minLength": 1,
              "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
              "description": "Name of the MCP server to enable"
            }
          },
          "required": [
            "sessionId",
            "serverName"
          ],
          "additionalProperties": false,
          "description": "Name of the MCP server to enable for the session.",
          "title": "McpEnableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "disable": {
        "rpcMethod": "session.mcp.disable",
        "description": "Disables an MCP server for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "serverName": {
              "type": "string",
              "minLength": 1,
              "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
              "description": "Name of the MCP server to disable"
            }
          },
          "required": [
            "sessionId",
            "serverName"
          ],
          "additionalProperties": false,
          "description": "Name of the MCP server to disable for the session.",
          "title": "McpDisableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "reload": {
        "rpcMethod": "session.mcp.reload",
        "description": "Reloads MCP server connections for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "oauth": {
        "login": {
          "rpcMethod": "session.mcp.oauth.login",
          "description": "Starts OAuth authentication for a remote MCP server.",
          "params": {
            "type": "object",
            "properties": {
              "sessionId": {
                "type": "string",
                "description": "Target session identifier"
              },
              "serverName": {
                "type": "string",
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
                "description": "Name of the remote MCP server to authenticate"
              },
              "forceReauth": {
                "type": "boolean",
                "description": "When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck."
              },
              "clientName": {
                "type": "string",
                "description": "Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees."
              },
              "callbackSuccessMessage": {
                "type": "string",
                "description": "Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return."
              }
            },
            "required": [
              "sessionId",
              "serverName"
            ],
            "additionalProperties": false,
            "description": "Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.",
            "title": "McpOauthLoginRequest"
          },
          "result": {
            "$ref": "#/definitions/McpOauthLoginResult",
            "description": "OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server."
          },
          "stability": "experimental"
        }
      }
    },
    "plugins": {
      "list": {
        "rpcMethod": "session.plugins.list",
        "description": "Lists plugins installed for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/PluginList",
          "description": "Plugins installed for the session, with their enabled state and version metadata."
        },
        "stability": "experimental"
      }
    },
    "extensions": {
      "list": {
        "rpcMethod": "session.extensions.list",
        "description": "Lists extensions discovered for the session and their current status.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/ExtensionList",
          "description": "Extensions discovered for the session, with their current status."
        },
        "stability": "experimental"
      },
      "enable": {
        "rpcMethod": "session.extensions.enable",
        "description": "Enables an extension for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Source-qualified extension ID to enable"
            }
          },
          "required": [
            "sessionId",
            "id"
          ],
          "additionalProperties": false,
          "description": "Source-qualified extension identifier to enable for the session.",
          "title": "ExtensionsEnableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "disable": {
        "rpcMethod": "session.extensions.disable",
        "description": "Disables an extension for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "id": {
              "type": "string",
              "description": "Source-qualified extension ID to disable"
            }
          },
          "required": [
            "sessionId",
            "id"
          ],
          "additionalProperties": false,
          "description": "Source-qualified extension identifier to disable for the session.",
          "title": "ExtensionsDisableRequest"
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      },
      "reload": {
        "rpcMethod": "session.extensions.reload",
        "description": "Reloads extension definitions and processes for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      }
    },
    "tools": {
      "handlePendingToolCall": {
        "rpcMethod": "session.tools.handlePendingToolCall",
        "description": "Provides the result for a pending external tool call.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "requestId": {
              "type": "string",
              "description": "Request ID of the pending tool call"
            },
            "result": {
              "$ref": "#/definitions/ExternalToolResult",
              "description": "Tool call result (string or expanded result object)"
            },
            "error": {
              "type": "string",
              "description": "Error message if the tool call failed"
            }
          },
          "required": [
            "sessionId",
            "requestId"
          ],
          "additionalProperties": false,
          "description": "Pending external tool call request ID, with the tool result or an error describing why it failed.",
          "title": "HandlePendingToolCallRequest"
        },
        "result": {
          "$ref": "#/definitions/HandlePendingToolCallResult",
          "description": "Indicates whether the external tool call result was handled successfully."
        }
      }
    },
    "commands": {
      "list": {
        "rpcMethod": "session.commands.list",
        "description": "Lists slash commands available in the session.",
        "params": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "type": "object",
              "properties": {
                "includeBuiltins": {
                  "type": "boolean",
                  "description": "Include runtime built-in commands"
                },
                "includeSkills": {
                  "type": "boolean",
                  "description": "Include enabled user-invocable skills and commands"
                },
                "includeClientCommands": {
                  "type": "boolean",
                  "description": "Include commands registered by protocol clients, including SDK clients and extensions"
                }
              },
              "additionalProperties": false
            }
          ],
          "description": "Optional filters controlling which command sources to include in the listing.",
          "title": "CommandsListRequest",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ]
        },
        "result": {
          "$ref": "#/definitions/CommandList",
          "description": "Slash commands available in the session, after applying any include/exclude filters."
        }
      },
      "invoke": {
        "rpcMethod": "session.commands.invoke",
        "description": "Invokes a slash command in the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "name": {
              "type": "string",
              "description": "Command name. Leading slashes are stripped and the name is matched case-insensitively."
            },
            "input": {
              "type": "string",
              "description": "Raw input after the command name"
            }
          },
          "required": [
            "sessionId",
            "name"
          ],
          "additionalProperties": false,
          "description": "Slash command name and optional raw input string to invoke.",
          "title": "CommandsInvokeRequest"
        },
        "result": {
          "$ref": "#/definitions/SlashCommandInvocationResult",
          "description": "Result of invoking the slash command (text output, prompt to send to the agent, or completion)."
        }
      },
      "handlePendingCommand": {
        "rpcMethod": "session.commands.handlePendingCommand",
        "description": "Reports completion of a pending client-handled slash command.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "requestId": {
              "type": "string",
              "description": "Request ID from the command invocation event"
            },
            "error": {
              "type": "string",
              "description": "Error message if the command handler failed"
            }
          },
          "required": [
            "sessionId",
            "requestId"
          ],
          "additionalProperties": false,
          "description": "Pending command request ID and an optional error if the client handler failed.",
          "title": "CommandsHandlePendingCommandRequest"
        },
        "result": {
          "$ref": "#/definitions/CommandsHandlePendingCommandResult",
          "description": "Indicates whether the pending client-handled command was completed successfully."
        }
      },
      "respondToQueuedCommand": {
        "rpcMethod": "session.commands.respondToQueuedCommand",
        "description": "Responds to a queued command request from the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "requestId": {
              "type": "string",
              "description": "Request ID from the queued command event"
            },
            "result": {
              "$ref": "#/definitions/QueuedCommandResult",
              "description": "Result of the queued command execution"
            }
          },
          "required": [
            "sessionId",
            "requestId",
            "result"
          ],
          "additionalProperties": false,
          "description": "Queued command request ID and the result indicating whether the client handled it.",
          "title": "CommandsRespondToQueuedCommandRequest"
        },
        "result": {
          "$ref": "#/definitions/CommandsRespondToQueuedCommandResult",
          "description": "Indicates whether the queued-command response was accepted by the session."
        }
      }
    },
    "ui": {
      "elicitation": {
        "rpcMethod": "session.ui.elicitation",
        "description": "Requests structured input from a UI-capable client.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "message": {
              "type": "string",
              "description": "Message describing what information is needed from the user"
            },
            "requestedSchema": {
              "$ref": "#/definitions/UIElicitationSchema",
              "description": "JSON Schema describing the form fields to present to the user"
            }
          },
          "required": [
            "sessionId",
            "message",
            "requestedSchema"
          ],
          "additionalProperties": false,
          "description": "Prompt message and JSON schema describing the form fields to elicit from the user.",
          "title": "UIElicitationRequest"
        },
        "result": {
          "$ref": "#/definitions/UIElicitationResponse",
          "description": "The elicitation response (accept with form values, decline, or cancel)"
        }
      },
      "handlePendingElicitation": {
        "rpcMethod": "session.ui.handlePendingElicitation",
        "description": "Provides the user response for a pending elicitation request.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "requestId": {
              "type": "string",
              "description": "The unique request ID from the elicitation.requested event"
            },
            "result": {
              "$ref": "#/definitions/UIElicitationResponse",
              "description": "The elicitation response (accept with form values, decline, or cancel)"
            }
          },
          "required": [
            "sessionId",
            "requestId",
            "result"
          ],
          "additionalProperties": false,
          "description": "Pending elicitation request ID and the user's response (accept/decline/cancel + form values).",
          "title": "UIHandlePendingElicitationRequest"
        },
        "result": {
          "$ref": "#/definitions/UIElicitationResult",
          "description": "Indicates whether the elicitation response was accepted; false if it was already resolved by another client."
        }
      }
    },
    "permissions": {
      "handlePendingPermissionRequest": {
        "rpcMethod": "session.permissions.handlePendingPermissionRequest",
        "description": "Provides a decision for a pending tool permission request.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "requestId": {
              "type": "string",
              "description": "Request ID of the pending permission request"
            },
            "result": {
              "$ref": "#/definitions/PermissionDecision",
              "description": "Decision to apply to a pending permission request."
            }
          },
          "required": [
            "sessionId",
            "requestId",
            "result"
          ],
          "additionalProperties": false,
          "description": "Pending permission request ID and the decision to apply (approve/reject and scope).",
          "title": "PermissionDecisionRequest"
        },
        "result": {
          "$ref": "#/definitions/PermissionRequestResult",
          "description": "Indicates whether the permission decision was applied; false when the request was already resolved."
        }
      },
      "setApproveAll": {
        "rpcMethod": "session.permissions.setApproveAll",
        "description": "Enables or disables automatic approval of tool permission requests for the session.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "enabled": {
              "type": "boolean",
              "description": "Whether to auto-approve all tool permission requests"
            }
          },
          "required": [
            "sessionId",
            "enabled"
          ],
          "additionalProperties": false,
          "description": "Whether to auto-approve all tool permission requests for the rest of the session.",
          "title": "PermissionsSetApproveAllRequest"
        },
        "result": {
          "$ref": "#/definitions/PermissionsSetApproveAllResult",
          "description": "Indicates whether the operation succeeded."
        }
      },
      "resetSessionApprovals": {
        "rpcMethod": "session.permissions.resetSessionApprovals",
        "description": "Clears session-scoped tool permission approvals.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "additionalProperties": false,
          "description": "No parameters; clears all session-scoped tool permission approvals.",
          "title": "PermissionsResetSessionApprovalsRequest",
          "required": [
            "sessionId"
          ]
        },
        "result": {
          "$ref": "#/definitions/PermissionsResetSessionApprovalsResult",
          "description": "Indicates whether the operation succeeded."
        }
      }
    },
    "log": {
      "rpcMethod": "session.log",
      "description": "Emits a user-visible session log event.",
      "params": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "Target session identifier"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "level": {
            "$ref": "#/definitions/SessionLogLevel",
            "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\"."
          },
          "ephemeral": {
            "type": "boolean",
            "description": "When true, the message is transient and not persisted to the session event log on disk"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Optional URL the user can open in their browser for more details"
          }
        },
        "required": [
          "sessionId",
          "message"
        ],
        "additionalProperties": false,
        "description": "Message text, optional severity level, persistence flag, and optional follow-up URL.",
        "title": "LogRequest"
      },
      "result": {
        "$ref": "#/definitions/LogResult",
        "description": "Identifier of the session event that was emitted for the log message."
      }
    },
    "shell": {
      "exec": {
        "rpcMethod": "session.shell.exec",
        "description": "Starts a shell command and streams output through session notifications.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "command": {
              "type": "string",
              "description": "Shell command to execute"
            },
            "cwd": {
              "type": "string",
              "description": "Working directory (defaults to session working directory)"
            },
            "timeout": {
              "type": "integer",
              "minimum": 0,
              "description": "Timeout in milliseconds (default: 30000)",
              "format": "duration"
            }
          },
          "required": [
            "sessionId",
            "command"
          ],
          "additionalProperties": false,
          "description": "Shell command to run, with optional working directory and timeout in milliseconds.",
          "title": "ShellExecRequest"
        },
        "result": {
          "$ref": "#/definitions/ShellExecResult",
          "description": "Identifier of the spawned process, used to correlate streamed output and exit notifications."
        }
      },
      "kill": {
        "rpcMethod": "session.shell.kill",
        "description": "Sends a signal to a shell process previously started via \"shell.exec\".",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "processId": {
              "type": "string",
              "description": "Process identifier returned by shell.exec"
            },
            "signal": {
              "$ref": "#/definitions/ShellKillSignal",
              "description": "Signal to send (default: SIGTERM)"
            }
          },
          "required": [
            "sessionId",
            "processId"
          ],
          "additionalProperties": false,
          "description": "Identifier of a process previously returned by \"shell.exec\" and the signal to send.",
          "title": "ShellKillRequest"
        },
        "result": {
          "$ref": "#/definitions/ShellKillResult",
          "description": "Indicates whether the signal was delivered; false if the process was unknown or already exited."
        }
      }
    },
    "history": {
      "compact": {
        "rpcMethod": "session.history.compact",
        "description": "Compacts the session history to reduce context usage.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/HistoryCompactResult",
          "description": "Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown."
        },
        "stability": "experimental"
      },
      "truncate": {
        "rpcMethod": "session.history.truncate",
        "description": "Truncates persisted session history to a specific event.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "eventId": {
              "type": "string",
              "description": "Event ID to truncate to. This event and all events after it are removed from the session."
            }
          },
          "required": [
            "sessionId",
            "eventId"
          ],
          "additionalProperties": false,
          "description": "Identifier of the event to truncate to; this event and all later events are removed.",
          "title": "HistoryTruncateRequest"
        },
        "result": {
          "$ref": "#/definitions/HistoryTruncateResult",
          "description": "Number of events that were removed by the truncation."
        },
        "stability": "experimental"
      }
    },
    "usage": {
      "getMetrics": {
        "rpcMethod": "session.usage.getMetrics",
        "description": "Gets accumulated usage metrics for the session.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/UsageGetMetricsResult",
          "description": "Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals."
        },
        "stability": "experimental"
      }
    },
    "remote": {
      "enable": {
        "rpcMethod": "session.remote.enable",
        "description": "Enables remote session export or steering.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "mode": {
              "$ref": "#/definitions/RemoteSessionMode",
              "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering."
            }
          },
          "additionalProperties": false,
          "description": "Optional remote session mode (\"off\", \"export\", or \"on\"); defaults to enabling both export and remote steering.",
          "title": "RemoteEnableRequest",
          "required": [
            "sessionId"
          ]
        },
        "result": {
          "$ref": "#/definitions/RemoteEnableResult",
          "description": "GitHub URL for the session and a flag indicating whether remote steering is enabled."
        },
        "stability": "experimental"
      },
      "disable": {
        "rpcMethod": "session.remote.disable",
        "description": "Disables remote session export and steering.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "type": "null"
        },
        "stability": "experimental"
      }
    }
  },
  "clientSession": {
    "sessionFs": {
      "readFile": {
        "rpcMethod": "sessionFs.readFile",
        "description": "Reads a file from the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Path of the file to read from the client-provided session filesystem.",
          "title": "SessionFsReadFileRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsReadFileResult",
          "description": "File content as a UTF-8 string, or a filesystem error if the read failed."
        }
      },
      "writeFile": {
        "rpcMethod": "sessionFs.writeFile",
        "description": "Writes a file in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            },
            "content": {
              "type": "string",
              "description": "Content to write"
            },
            "mode": {
              "type": "integer",
              "minimum": 0,
              "description": "Optional POSIX-style mode for newly created files"
            }
          },
          "required": [
            "sessionId",
            "path",
            "content"
          ],
          "additionalProperties": false,
          "description": "File path, content to write, and optional mode for the client-provided session filesystem.",
          "title": "SessionFsWriteFileRequest"
        },
        "result": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "$ref": "#/definitions/SessionFsError",
              "description": "Describes a filesystem error."
            }
          ],
          "description": "Describes a filesystem error."
        }
      },
      "appendFile": {
        "rpcMethod": "sessionFs.appendFile",
        "description": "Appends content to a file in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            },
            "content": {
              "type": "string",
              "description": "Content to append"
            },
            "mode": {
              "type": "integer",
              "minimum": 0,
              "description": "Optional POSIX-style mode for newly created files"
            }
          },
          "required": [
            "sessionId",
            "path",
            "content"
          ],
          "additionalProperties": false,
          "description": "File path, content to append, and optional mode for the client-provided session filesystem.",
          "title": "SessionFsAppendFileRequest"
        },
        "result": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "$ref": "#/definitions/SessionFsError",
              "description": "Describes a filesystem error."
            }
          ],
          "description": "Describes a filesystem error."
        }
      },
      "exists": {
        "rpcMethod": "sessionFs.exists",
        "description": "Checks whether a path exists in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Path to test for existence in the client-provided session filesystem.",
          "title": "SessionFsExistsRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsExistsResult",
          "description": "Indicates whether the requested path exists in the client-provided session filesystem."
        }
      },
      "stat": {
        "rpcMethod": "sessionFs.stat",
        "description": "Gets metadata for a path in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Path whose metadata should be returned from the client-provided session filesystem.",
          "title": "SessionFsStatRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsStatResult",
          "description": "Filesystem metadata for the requested path, or a filesystem error if the stat failed."
        }
      },
      "mkdir": {
        "rpcMethod": "sessionFs.mkdir",
        "description": "Creates a directory in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            },
            "recursive": {
              "type": "boolean",
              "description": "Create parent directories as needed"
            },
            "mode": {
              "type": "integer",
              "minimum": 0,
              "description": "Optional POSIX-style mode for newly created directories"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode.",
          "title": "SessionFsMkdirRequest"
        },
        "result": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "$ref": "#/definitions/SessionFsError",
              "description": "Describes a filesystem error."
            }
          ],
          "description": "Describes a filesystem error."
        }
      },
      "readdir": {
        "rpcMethod": "sessionFs.readdir",
        "description": "Lists entry names in a directory from the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Directory path whose entries should be listed from the client-provided session filesystem.",
          "title": "SessionFsReaddirRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsReaddirResult",
          "description": "Names of entries in the requested directory, or a filesystem error if the read failed."
        }
      },
      "readdirWithTypes": {
        "rpcMethod": "sessionFs.readdirWithTypes",
        "description": "Lists directory entries with type information from the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Directory path whose entries (with type information) should be listed from the client-provided session filesystem.",
          "title": "SessionFsReaddirWithTypesRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsReaddirWithTypesResult",
          "description": "Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed."
        }
      },
      "rm": {
        "rpcMethod": "sessionFs.rm",
        "description": "Removes a file or directory from the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "path": {
              "type": "string",
              "description": "Path using SessionFs conventions"
            },
            "recursive": {
              "type": "boolean",
              "description": "Remove directories and their contents recursively"
            },
            "force": {
              "type": "boolean",
              "description": "Ignore errors if the path does not exist"
            }
          },
          "required": [
            "sessionId",
            "path"
          ],
          "additionalProperties": false,
          "description": "Path to remove from the client-provided session filesystem, with options for recursive removal and force.",
          "title": "SessionFsRmRequest"
        },
        "result": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "$ref": "#/definitions/SessionFsError",
              "description": "Describes a filesystem error."
            }
          ],
          "description": "Describes a filesystem error."
        }
      },
      "rename": {
        "rpcMethod": "sessionFs.rename",
        "description": "Renames or moves a path in the client-provided session filesystem.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "src": {
              "type": "string",
              "description": "Source path using SessionFs conventions"
            },
            "dest": {
              "type": "string",
              "description": "Destination path using SessionFs conventions"
            }
          },
          "required": [
            "sessionId",
            "src",
            "dest"
          ],
          "additionalProperties": false,
          "description": "Source and destination paths for renaming or moving an entry in the client-provided session filesystem.",
          "title": "SessionFsRenameRequest"
        },
        "result": {
          "anyOf": [
            {
              "not": {}
            },
            {
              "$ref": "#/definitions/SessionFsError",
              "description": "Describes a filesystem error."
            }
          ],
          "description": "Describes a filesystem error."
        }
      },
      "sqliteQuery": {
        "rpcMethod": "sessionFs.sqliteQuery",
        "description": "Executes a SQLite query against the per-session database.",
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            },
            "query": {
              "type": "string",
              "description": "SQL query to execute"
            },
            "queryType": {
              "$ref": "#/definitions/SessionFsSqliteQueryType",
              "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)"
            },
            "params": {
              "type": "object",
              "additionalProperties": {
                "type": [
                  "string",
                  "number",
                  "null"
                ]
              },
              "description": "Optional named bind parameters"
            }
          },
          "required": [
            "sessionId",
            "query",
            "queryType"
          ],
          "additionalProperties": false,
          "description": "SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database.",
          "title": "SessionFsSqliteQueryRequest"
        },
        "result": {
          "$ref": "#/definitions/SessionFsSqliteQueryResult",
          "description": "Query results including rows, columns, and rows affected, or a filesystem error if execution failed."
        }
      },
      "sqliteExists": {
        "rpcMethod": "sessionFs.sqliteExists",
        "description": "Checks whether the per-session SQLite database already exists, without creating it.",
        "params": {
          "type": "object",
          "description": "Identifies the target session.",
          "properties": {
            "sessionId": {
              "type": "string",
              "description": "Target session identifier"
            }
          },
          "required": [
            "sessionId"
          ],
          "additionalProperties": false
        },
        "result": {
          "$ref": "#/definitions/SessionFsSqliteExistsResult",
          "description": "Indicates whether the per-session SQLite database already exists."
        }
      }
    }
  },
  "definitions": {
    "AccountGetQuotaRequest": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "object",
          "properties": {
            "gitHubToken": {
              "type": "string",
              "description": "GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth."
            }
          },
          "additionalProperties": false
        }
      ],
      "description": "Optional GitHub token used to look up quota for a specific user instead of the global auth context.",
      "title": "AccountGetQuotaRequest"
    },
    "AccountGetQuotaResult": {
      "type": "object",
      "properties": {
        "quotaSnapshots": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/AccountQuotaSnapshot"
          },
          "description": "Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)"
        }
      },
      "required": [
        "quotaSnapshots"
      ],
      "additionalProperties": false,
      "description": "Quota usage snapshots for the resolved user, keyed by quota type.",
      "title": "AccountGetQuotaResult"
    },
    "AccountQuotaSnapshot": {
      "type": "object",
      "properties": {
        "isUnlimitedEntitlement": {
          "type": "boolean",
          "description": "Whether the user has an unlimited usage entitlement"
        },
        "entitlementRequests": {
          "type": "integer",
          "description": "Number of requests included in the entitlement, or -1 for unlimited entitlements"
        },
        "usedRequests": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of requests used so far this period"
        },
        "usageAllowedWithExhaustedQuota": {
          "type": "boolean",
          "description": "Whether usage is still permitted after quota exhaustion"
        },
        "remainingPercentage": {
          "type": "number",
          "description": "Percentage of entitlement remaining"
        },
        "overage": {
          "type": "number",
          "minimum": 0,
          "description": "Number of overage requests made this period"
        },
        "overageAllowedWithExhaustedQuota": {
          "type": "boolean",
          "description": "Whether overage is allowed when quota is exhausted"
        },
        "resetDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date when the quota resets (ISO 8601 string)"
        }
      },
      "required": [
        "isUnlimitedEntitlement",
        "entitlementRequests",
        "usedRequests",
        "usageAllowedWithExhaustedQuota",
        "remainingPercentage",
        "overage",
        "overageAllowedWithExhaustedQuota"
      ],
      "additionalProperties": false,
      "title": "AccountQuotaSnapshot",
      "description": "Schema for the `AccountQuotaSnapshot` type."
    },
    "AgentGetCurrentResult": {
      "type": "object",
      "properties": {
        "agent": {
          "$ref": "#/definitions/AgentInfo",
          "description": "Currently selected custom agent, or null if using the default agent"
        }
      },
      "required": [
        "agent"
      ],
      "additionalProperties": false,
      "description": "The currently selected custom agent, or null when using the default agent.",
      "title": "AgentGetCurrentResult"
    },
    "AgentInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Unique identifier of the custom agent"
        },
        "displayName": {
          "type": "string",
          "description": "Human-readable display name"
        },
        "description": {
          "type": "string",
          "description": "Description of the agent's purpose"
        },
        "path": {
          "type": "string",
          "description": "Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path."
        }
      },
      "required": [
        "name",
        "displayName",
        "description"
      ],
      "additionalProperties": false,
      "title": "AgentInfo",
      "description": "Schema for the `AgentInfo` type."
    },
    "AgentList": {
      "type": "object",
      "properties": {
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AgentInfo"
          },
          "description": "Available custom agents"
        }
      },
      "required": [
        "agents"
      ],
      "additionalProperties": false,
      "description": "Custom agents available to the session.",
      "title": "AgentList"
    },
    "AgentReloadResult": {
      "type": "object",
      "properties": {
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AgentInfo"
          },
          "description": "Reloaded custom agents"
        }
      },
      "required": [
        "agents"
      ],
      "additionalProperties": false,
      "description": "Custom agents available to the session after reloading definitions from disk.",
      "title": "AgentReloadResult"
    },
    "AgentSelectRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the custom agent to select"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "Name of the custom agent to select for subsequent turns.",
      "title": "AgentSelectRequest"
    },
    "AgentSelectResult": {
      "type": "object",
      "properties": {
        "agent": {
          "$ref": "#/definitions/AgentInfo",
          "description": "The newly selected custom agent"
        }
      },
      "required": [
        "agent"
      ],
      "additionalProperties": false,
      "description": "The newly selected custom agent.",
      "title": "AgentSelectResult"
    },
    "AuthInfoType": {
      "type": "string",
      "enum": [
        "hmac",
        "env",
        "user",
        "gh-cli",
        "api-key",
        "token",
        "copilot-api-token"
      ],
      "description": "Authentication type",
      "title": "AuthInfoType"
    },
    "CommandList": {
      "type": "object",
      "properties": {
        "commands": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SlashCommandInfo"
          },
          "description": "Commands available in this session"
        }
      },
      "required": [
        "commands"
      ],
      "additionalProperties": false,
      "description": "Slash commands available in the session, after applying any include/exclude filters.",
      "title": "CommandList"
    },
    "CommandsHandlePendingCommandRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID from the command invocation event"
        },
        "error": {
          "type": "string",
          "description": "Error message if the command handler failed"
        }
      },
      "required": [
        "requestId"
      ],
      "additionalProperties": false,
      "description": "Pending command request ID and an optional error if the client handler failed.",
      "title": "CommandsHandlePendingCommandRequest"
    },
    "CommandsHandlePendingCommandResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the command was handled successfully"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the pending client-handled command was completed successfully.",
      "title": "CommandsHandlePendingCommandResult"
    },
    "CommandsInvokeRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Command name. Leading slashes are stripped and the name is matched case-insensitively."
        },
        "input": {
          "type": "string",
          "description": "Raw input after the command name"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "Slash command name and optional raw input string to invoke.",
      "title": "CommandsInvokeRequest"
    },
    "CommandsListRequest": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "object",
          "properties": {
            "includeBuiltins": {
              "type": "boolean",
              "description": "Include runtime built-in commands"
            },
            "includeSkills": {
              "type": "boolean",
              "description": "Include enabled user-invocable skills and commands"
            },
            "includeClientCommands": {
              "type": "boolean",
              "description": "Include commands registered by protocol clients, including SDK clients and extensions"
            }
          },
          "additionalProperties": false
        }
      ],
      "description": "Optional filters controlling which command sources to include in the listing.",
      "title": "CommandsListRequest"
    },
    "CommandsRespondToQueuedCommandRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID from the queued command event"
        },
        "result": {
          "$ref": "#/definitions/QueuedCommandResult",
          "description": "Result of the queued command execution"
        }
      },
      "required": [
        "requestId",
        "result"
      ],
      "additionalProperties": false,
      "description": "Queued command request ID and the result indicating whether the client handled it.",
      "title": "CommandsRespondToQueuedCommandRequest"
    },
    "CommandsRespondToQueuedCommandResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the response was accepted (false if the requestId was not found or already resolved)"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the queued-command response was accepted by the session.",
      "title": "CommandsRespondToQueuedCommandResult"
    },
    "ConnectedRemoteSessionMetadata": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "SDK session ID for the connected remote session."
        },
        "name": {
          "type": "string",
          "description": "Optional friendly session name."
        },
        "summary": {
          "type": "string",
          "description": "Optional session summary."
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "Session start time as an ISO 8601 string."
        },
        "modifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Last session update time as an ISO 8601 string."
        },
        "repository": {
          "$ref": "#/definitions/ConnectedRemoteSessionMetadataRepository",
          "description": "Repository associated with the connected remote session."
        },
        "pullRequestNumber": {
          "type": "integer",
          "description": "Pull request number associated with the session."
        },
        "resourceId": {
          "type": "string",
          "description": "Original remote resource identifier."
        },
        "kind": {
          "$ref": "#/definitions/ConnectedRemoteSessionMetadataKind",
          "description": "Neutral SDK discriminator for the connected remote session kind."
        },
        "staleAt": {
          "type": "string",
          "format": "date-time",
          "description": "Remote session staleness deadline as an ISO 8601 string."
        },
        "state": {
          "type": "string",
          "description": "Remote session state returned by the backing service."
        }
      },
      "required": [
        "sessionId",
        "startTime",
        "modifiedTime",
        "repository",
        "kind"
      ],
      "additionalProperties": false,
      "description": "Metadata for a connected remote session.",
      "title": "ConnectedRemoteSessionMetadata"
    },
    "ConnectedRemoteSessionMetadataKind": {
      "type": "string",
      "enum": [
        "remote-session",
        "coding-agent"
      ],
      "description": "Neutral SDK discriminator for the connected remote session kind.",
      "title": "ConnectedRemoteSessionMetadataKind"
    },
    "ConnectedRemoteSessionMetadataRepository": {
      "type": "object",
      "properties": {
        "owner": {
          "type": "string",
          "description": "Repository owner or organization login."
        },
        "name": {
          "type": "string",
          "description": "Repository name."
        },
        "branch": {
          "type": "string",
          "description": "Branch associated with the remote session."
        }
      },
      "required": [
        "owner",
        "name",
        "branch"
      ],
      "additionalProperties": false,
      "description": "Repository associated with the connected remote session.",
      "title": "ConnectedRemoteSessionMetadataRepository"
    },
    "ConnectRemoteSessionParams": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "Session ID to connect to."
        }
      },
      "required": [
        "sessionId"
      ],
      "additionalProperties": false,
      "description": "Remote session connection parameters.",
      "title": "ConnectRemoteSessionParams"
    },
    "ConnectRequest": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN"
        }
      },
      "additionalProperties": false,
      "description": "Optional connection token presented by the SDK client during the handshake.",
      "title": "ConnectRequest",
      "visibility": "internal"
    },
    "ConnectResult": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true,
          "description": "Always true on success"
        },
        "protocolVersion": {
          "type": "integer",
          "description": "Server protocol version number"
        },
        "version": {
          "type": "string",
          "description": "Server package version"
        }
      },
      "required": [
        "ok",
        "protocolVersion",
        "version"
      ],
      "additionalProperties": false,
      "description": "Handshake result reporting the server's protocol version and package version on success.",
      "title": "ConnectResult",
      "visibility": "internal"
    },
    "ContentFilterMode": {
      "type": "string",
      "enum": [
        "none",
        "markdown",
        "hidden_characters"
      ],
      "description": "Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives.",
      "title": "ContentFilterMode"
    },
    "CurrentModel": {
      "type": "object",
      "properties": {
        "modelId": {
          "type": "string",
          "description": "Currently active model identifier"
        }
      },
      "additionalProperties": false,
      "description": "The currently selected model for the session.",
      "title": "CurrentModel"
    },
    "DiscoveredMcpServer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Server name (config key)"
        },
        "type": {
          "$ref": "#/definitions/DiscoveredMcpServerType",
          "description": "Server transport type: stdio, http, sse, or memory"
        },
        "source": {
          "$ref": "#/definitions/McpServerSource",
          "description": "Configuration source: user, workspace, plugin, or builtin"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the server is enabled (not in the disabled list)"
        }
      },
      "required": [
        "name",
        "source",
        "enabled"
      ],
      "additionalProperties": false,
      "title": "DiscoveredMcpServer",
      "description": "Schema for the `DiscoveredMcpServer` type."
    },
    "DiscoveredMcpServerType": {
      "type": "string",
      "enum": [
        "stdio",
        "http",
        "sse",
        "memory"
      ],
      "description": "Server transport type: stdio, http, sse, or memory",
      "title": "DiscoveredMcpServerType"
    },
    "EmbeddedBlobResourceContents": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "URI identifying the resource"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the blob content"
        },
        "blob": {
          "type": "string",
          "description": "Base64-encoded binary content of the resource",
          "contentEncoding": "base64"
        }
      },
      "required": [
        "uri",
        "blob"
      ],
      "additionalProperties": false,
      "title": "EmbeddedBlobResourceContents",
      "description": "Schema for the `EmbeddedBlobResourceContents` type."
    },
    "EmbeddedTextResourceContents": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "URI identifying the resource"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the text content"
        },
        "text": {
          "type": "string",
          "description": "Text content of the resource"
        }
      },
      "required": [
        "uri",
        "text"
      ],
      "additionalProperties": false,
      "title": "EmbeddedTextResourceContents",
      "description": "Schema for the `EmbeddedTextResourceContents` type."
    },
    "Extension": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')"
        },
        "name": {
          "type": "string",
          "description": "Extension name (directory name)"
        },
        "source": {
          "$ref": "#/definitions/ExtensionSource",
          "description": "Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)"
        },
        "status": {
          "$ref": "#/definitions/ExtensionStatus",
          "description": "Current status: running, disabled, failed, or starting"
        },
        "pid": {
          "type": "integer",
          "description": "Process ID if the extension is running"
        }
      },
      "required": [
        "id",
        "name",
        "source",
        "status"
      ],
      "additionalProperties": false,
      "title": "Extension",
      "description": "Schema for the `Extension` type."
    },
    "ExtensionList": {
      "type": "object",
      "properties": {
        "extensions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Extension"
          },
          "description": "Discovered extensions and their current status"
        }
      },
      "required": [
        "extensions"
      ],
      "additionalProperties": false,
      "description": "Extensions discovered for the session, with their current status.",
      "title": "ExtensionList"
    },
    "ExtensionsDisableRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Source-qualified extension ID to disable"
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Source-qualified extension identifier to disable for the session.",
      "title": "ExtensionsDisableRequest"
    },
    "ExtensionsEnableRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Source-qualified extension ID to enable"
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Source-qualified extension identifier to enable for the session.",
      "title": "ExtensionsEnableRequest"
    },
    "ExtensionSource": {
      "type": "string",
      "enum": [
        "project",
        "user"
      ],
      "description": "Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)",
      "title": "ExtensionSource"
    },
    "ExtensionStatus": {
      "type": "string",
      "enum": [
        "running",
        "disabled",
        "failed",
        "starting"
      ],
      "description": "Current status: running, disabled, failed, or starting",
      "title": "ExtensionStatus"
    },
    "ExternalToolResult": {
      "anyOf": [
        {
          "type": "string",
          "description": "Simple string tool result"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlm",
          "description": "Expanded external tool result payload"
        }
      ],
      "description": "Tool call result (string or expanded result object)",
      "title": "ExternalToolResult"
    },
    "ExternalToolTextResultForLlm": {
      "type": "object",
      "properties": {
        "textResultForLlm": {
          "type": "string",
          "description": "Text result returned to the model"
        },
        "resultType": {
          "type": "string",
          "description": "Execution outcome classification. Optional for back-compat; normalized to 'success' (or 'failure' when error is present) when missing or unrecognized."
        },
        "error": {
          "type": "string",
          "description": "Optional error message for failed executions"
        },
        "sessionLog": {
          "type": "string",
          "description": "Detailed log content for timeline display"
        },
        "toolTelemetry": {
          "type": "object",
          "additionalProperties": {},
          "description": "Optional tool-specific telemetry"
        },
        "binaryResultsForLlm": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExternalToolTextResultForLlmBinaryResultsForLlm",
            "description": "Binary result returned by a tool for the model"
          },
          "description": "Base64-encoded binary results returned to the model"
        },
        "contents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExternalToolTextResultForLlmContent",
            "description": "A content block within a tool result, which may be text, terminal output, image, audio, or a resource"
          },
          "description": "Structured content blocks from the tool"
        }
      },
      "required": [
        "textResultForLlm"
      ],
      "additionalProperties": true,
      "description": "Expanded external tool result payload",
      "title": "ExternalToolTextResultForLlm"
    },
    "ExternalToolTextResultForLlmBinaryResultsForLlm": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/ExternalToolTextResultForLlmBinaryResultsForLlmType",
          "description": "Binary result type discriminator. Use \"image\" for images and \"resource\" for other binary data."
        },
        "data": {
          "type": "string",
          "description": "Base64-encoded binary data",
          "contentEncoding": "base64"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the binary data"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of the binary data"
        }
      },
      "required": [
        "type",
        "data",
        "mimeType"
      ],
      "additionalProperties": false,
      "description": "Binary result returned by a tool for the model",
      "title": "ExternalToolTextResultForLlmBinaryResultsForLlm"
    },
    "ExternalToolTextResultForLlmBinaryResultsForLlmType": {
      "type": "string",
      "enum": [
        "image",
        "resource"
      ],
      "description": "Binary result type discriminator. Use \"image\" for images and \"resource\" for other binary data.",
      "title": "ExternalToolTextResultForLlmBinaryResultsForLlmType"
    },
    "ExternalToolTextResultForLlmContent": {
      "anyOf": [
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentText",
          "description": "Plain text content block"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentTerminal",
          "description": "Terminal/shell output content block with optional exit code and working directory"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentImage",
          "description": "Image content block with base64-encoded data"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentAudio",
          "description": "Audio content block with base64-encoded data"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLink",
          "description": "Resource link content block referencing an external resource"
        },
        {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentResource",
          "description": "Embedded resource content block with inline text or binary data"
        }
      ],
      "description": "A content block within a tool result, which may be text, terminal output, image, audio, or a resource",
      "title": "ExternalToolTextResultForLlmContent"
    },
    "ExternalToolTextResultForLlmContentAudio": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "audio",
          "description": "Content block type discriminator"
        },
        "data": {
          "type": "string",
          "description": "Base64-encoded audio data",
          "contentEncoding": "base64"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the audio (e.g., audio/wav, audio/mpeg)"
        }
      },
      "required": [
        "type",
        "data",
        "mimeType"
      ],
      "additionalProperties": false,
      "description": "Audio content block with base64-encoded data",
      "title": "ExternalToolTextResultForLlmContentAudio"
    },
    "ExternalToolTextResultForLlmContentImage": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "image",
          "description": "Content block type discriminator"
        },
        "data": {
          "type": "string",
          "description": "Base64-encoded image data",
          "contentEncoding": "base64"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the image (e.g., image/png, image/jpeg)"
        }
      },
      "required": [
        "type",
        "data",
        "mimeType"
      ],
      "additionalProperties": false,
      "description": "Image content block with base64-encoded data",
      "title": "ExternalToolTextResultForLlmContentImage"
    },
    "ExternalToolTextResultForLlmContentResource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "resource",
          "description": "Content block type discriminator"
        },
        "resource": {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceDetails",
          "description": "The embedded resource contents, either text or base64-encoded binary"
        }
      },
      "required": [
        "type",
        "resource"
      ],
      "additionalProperties": false,
      "description": "Embedded resource content block with inline text or binary data",
      "title": "ExternalToolTextResultForLlmContentResource"
    },
    "ExternalToolTextResultForLlmContentResourceDetails": {
      "anyOf": [
        {
          "$ref": "#/definitions/EmbeddedTextResourceContents"
        },
        {
          "$ref": "#/definitions/EmbeddedBlobResourceContents"
        }
      ],
      "description": "The embedded resource contents, either text or base64-encoded binary",
      "title": "ExternalToolTextResultForLlmContentResourceDetails"
    },
    "ExternalToolTextResultForLlmContentResourceLink": {
      "type": "object",
      "properties": {
        "icons": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLinkIcon",
            "description": "Icon image for a resource"
          },
          "description": "Icons associated with this resource"
        },
        "name": {
          "type": "string",
          "description": "Resource name identifier"
        },
        "title": {
          "type": "string",
          "description": "Human-readable display title for the resource"
        },
        "uri": {
          "type": "string",
          "description": "URI identifying the resource"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of the resource"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the resource content"
        },
        "size": {
          "type": "number",
          "description": "Size of the resource in bytes"
        },
        "type": {
          "type": "string",
          "const": "resource_link",
          "description": "Content block type discriminator"
        }
      },
      "required": [
        "name",
        "uri",
        "type"
      ],
      "additionalProperties": false,
      "description": "Resource link content block referencing an external resource",
      "title": "ExternalToolTextResultForLlmContentResourceLink"
    },
    "ExternalToolTextResultForLlmContentResourceLinkIcon": {
      "type": "object",
      "properties": {
        "src": {
          "type": "string",
          "description": "URL or path to the icon image"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the icon image"
        },
        "sizes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Available icon sizes (e.g., ['16x16', '32x32'])"
        },
        "theme": {
          "$ref": "#/definitions/ExternalToolTextResultForLlmContentResourceLinkIconTheme",
          "description": "Theme variant this icon is intended for"
        }
      },
      "required": [
        "src"
      ],
      "additionalProperties": false,
      "description": "Icon image for a resource",
      "title": "ExternalToolTextResultForLlmContentResourceLinkIcon"
    },
    "ExternalToolTextResultForLlmContentResourceLinkIconTheme": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ],
      "description": "Theme variant this icon is intended for",
      "title": "ExternalToolTextResultForLlmContentResourceLinkIconTheme"
    },
    "ExternalToolTextResultForLlmContentTerminal": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "terminal",
          "description": "Content block type discriminator"
        },
        "text": {
          "type": "string",
          "description": "Terminal/shell output text"
        },
        "exitCode": {
          "type": "number",
          "description": "Process exit code, if the command has completed"
        },
        "cwd": {
          "type": "string",
          "description": "Working directory where the command was executed"
        }
      },
      "required": [
        "type",
        "text"
      ],
      "additionalProperties": false,
      "description": "Terminal/shell output content block with optional exit code and working directory",
      "title": "ExternalToolTextResultForLlmContentTerminal"
    },
    "ExternalToolTextResultForLlmContentText": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "text",
          "description": "Content block type discriminator"
        },
        "text": {
          "type": "string",
          "description": "The text content"
        }
      },
      "required": [
        "type",
        "text"
      ],
      "additionalProperties": false,
      "description": "Plain text content block",
      "title": "ExternalToolTextResultForLlmContentText"
    },
    "FilterMapping": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ContentFilterMode",
            "description": "Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives."
          }
        },
        {
          "$ref": "#/definitions/ContentFilterMode",
          "description": "Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives."
        }
      ],
      "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode.",
      "title": "FilterMapping"
    },
    "FleetStartRequest": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "description": "Optional user prompt to combine with fleet instructions"
        }
      },
      "additionalProperties": false,
      "description": "Optional user prompt to combine with the fleet orchestration instructions.",
      "title": "FleetStartRequest"
    },
    "FleetStartResult": {
      "type": "object",
      "properties": {
        "started": {
          "type": "boolean",
          "description": "Whether fleet mode was successfully activated"
        }
      },
      "required": [
        "started"
      ],
      "additionalProperties": false,
      "description": "Indicates whether fleet mode was successfully activated.",
      "title": "FleetStartResult"
    },
    "HandlePendingToolCallRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID of the pending tool call"
        },
        "result": {
          "$ref": "#/definitions/ExternalToolResult",
          "description": "Tool call result (string or expanded result object)"
        },
        "error": {
          "type": "string",
          "description": "Error message if the tool call failed"
        }
      },
      "required": [
        "requestId"
      ],
      "additionalProperties": false,
      "description": "Pending external tool call request ID, with the tool result or an error describing why it failed.",
      "title": "HandlePendingToolCallRequest"
    },
    "HandlePendingToolCallResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the tool call result was handled successfully"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the external tool call result was handled successfully.",
      "title": "HandlePendingToolCallResult"
    },
    "HistoryCompactContextWindow": {
      "type": "object",
      "properties": {
        "tokenLimit": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum token count for the model's context window"
        },
        "currentTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Current total tokens in the context window (system + conversation + tool definitions)"
        },
        "messagesLength": {
          "type": "integer",
          "minimum": 0,
          "description": "Current number of messages in the conversation"
        },
        "systemTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Token count from system message(s)"
        },
        "conversationTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Token count from non-system messages (user, assistant, tool)"
        },
        "toolDefinitionsTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Token count from tool definitions"
        }
      },
      "required": [
        "tokenLimit",
        "currentTokens",
        "messagesLength"
      ],
      "additionalProperties": false,
      "description": "Post-compaction context window usage breakdown",
      "title": "HistoryCompactContextWindow"
    },
    "HistoryCompactResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether compaction completed successfully"
        },
        "tokensRemoved": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of tokens freed by compaction"
        },
        "messagesRemoved": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of messages removed during compaction"
        },
        "contextWindow": {
          "$ref": "#/definitions/HistoryCompactContextWindow",
          "description": "Post-compaction context window usage breakdown"
        }
      },
      "required": [
        "success",
        "tokensRemoved",
        "messagesRemoved"
      ],
      "additionalProperties": false,
      "description": "Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown.",
      "title": "HistoryCompactResult"
    },
    "HistoryTruncateRequest": {
      "type": "object",
      "properties": {
        "eventId": {
          "type": "string",
          "description": "Event ID to truncate to. This event and all events after it are removed from the session."
        }
      },
      "required": [
        "eventId"
      ],
      "additionalProperties": false,
      "description": "Identifier of the event to truncate to; this event and all later events are removed.",
      "title": "HistoryTruncateRequest"
    },
    "HistoryTruncateResult": {
      "type": "object",
      "properties": {
        "eventsRemoved": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of events that were removed"
        }
      },
      "required": [
        "eventsRemoved"
      ],
      "additionalProperties": false,
      "description": "Number of events that were removed by the truncation.",
      "title": "HistoryTruncateResult"
    },
    "InstructionsGetSourcesResult": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InstructionsSources"
          },
          "description": "Instruction sources for the session"
        }
      },
      "required": [
        "sources"
      ],
      "additionalProperties": false,
      "description": "Instruction sources loaded for the session, in merge order.",
      "title": "InstructionsGetSourcesResult"
    },
    "InstructionsSources": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for this source (used for toggling)"
        },
        "label": {
          "type": "string",
          "description": "Human-readable label"
        },
        "sourcePath": {
          "type": "string",
          "description": "File path relative to repo or absolute for home"
        },
        "content": {
          "type": "string",
          "description": "Raw content of the instruction file"
        },
        "type": {
          "$ref": "#/definitions/InstructionsSourcesType",
          "description": "Category of instruction source — used for merge logic"
        },
        "location": {
          "$ref": "#/definitions/InstructionsSourcesLocation",
          "description": "Where this source lives — used for UI grouping"
        },
        "applyTo": {
          "type": "string",
          "description": "Glob pattern from frontmatter — when set, this instruction applies only to matching files"
        },
        "description": {
          "type": "string",
          "description": "Short description (body after frontmatter) for use in instruction tables"
        }
      },
      "required": [
        "id",
        "label",
        "sourcePath",
        "content",
        "type",
        "location"
      ],
      "additionalProperties": false,
      "title": "InstructionsSources",
      "description": "Schema for the `InstructionsSources` type."
    },
    "InstructionsSourcesLocation": {
      "type": "string",
      "enum": [
        "user",
        "repository",
        "working-directory"
      ],
      "description": "Where this source lives — used for UI grouping",
      "title": "InstructionsSourcesLocation"
    },
    "InstructionsSourcesType": {
      "type": "string",
      "enum": [
        "home",
        "repo",
        "model",
        "vscode",
        "nested-agents",
        "child-instructions"
      ],
      "description": "Category of instruction source — used for merge logic",
      "title": "InstructionsSourcesType"
    },
    "LogRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Human-readable message"
        },
        "level": {
          "$ref": "#/definitions/SessionLogLevel",
          "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\"."
        },
        "ephemeral": {
          "type": "boolean",
          "description": "When true, the message is transient and not persisted to the session event log on disk"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Optional URL the user can open in their browser for more details"
        }
      },
      "required": [
        "message"
      ],
      "additionalProperties": false,
      "description": "Message text, optional severity level, persistence flag, and optional follow-up URL.",
      "title": "LogRequest"
    },
    "LogResult": {
      "type": "object",
      "properties": {
        "eventId": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the emitted session event"
        }
      },
      "required": [
        "eventId"
      ],
      "additionalProperties": false,
      "description": "Identifier of the session event that was emitted for the log message.",
      "title": "LogResult"
    },
    "McpConfigAddRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Unique name for the MCP server"
        },
        "config": {
          "$ref": "#/definitions/McpServerConfig",
          "description": "MCP server configuration (stdio process or remote HTTP/SSE)"
        }
      },
      "required": [
        "name",
        "config"
      ],
      "additionalProperties": false,
      "description": "MCP server name and configuration to add to user configuration.",
      "title": "McpConfigAddRequest"
    },
    "McpConfigDisableRequest": {
      "type": "object",
      "properties": {
        "names": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
            "description": "MCP server name used as a configuration key."
          },
          "description": "Names of MCP servers to disable. Each server is added to the persisted disabled list so new sessions skip it. Already-disabled names are ignored. Active sessions keep their current connections until they end."
        }
      },
      "required": [
        "names"
      ],
      "additionalProperties": false,
      "description": "MCP server names to disable for new sessions.",
      "title": "McpConfigDisableRequest"
    },
    "McpConfigEnableRequest": {
      "type": "object",
      "properties": {
        "names": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
            "description": "MCP server name used as a configuration key."
          },
          "description": "Names of MCP servers to enable. Each server is removed from the persisted disabled list so new sessions spawn it. Unknown or already-enabled names are ignored."
        }
      },
      "required": [
        "names"
      ],
      "additionalProperties": false,
      "description": "MCP server names to enable for new sessions.",
      "title": "McpConfigEnableRequest"
    },
    "McpConfigList": {
      "type": "object",
      "properties": {
        "servers": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/McpServerConfig",
            "description": "MCP server configuration (stdio process or remote HTTP/SSE)"
          },
          "propertyNames": {
            "minLength": 1,
            "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$"
          },
          "description": "All MCP servers from user config, keyed by name"
        }
      },
      "required": [
        "servers"
      ],
      "additionalProperties": false,
      "description": "User-configured MCP servers, keyed by server name.",
      "title": "McpConfigList"
    },
    "McpConfigRemoveRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Name of the MCP server to remove"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "MCP server name to remove from user configuration.",
      "title": "McpConfigRemoveRequest"
    },
    "McpConfigUpdateRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Name of the MCP server to update"
        },
        "config": {
          "$ref": "#/definitions/McpServerConfig",
          "description": "MCP server configuration (stdio process or remote HTTP/SSE)"
        }
      },
      "required": [
        "name",
        "config"
      ],
      "additionalProperties": false,
      "description": "MCP server name and replacement configuration to write to user configuration.",
      "title": "McpConfigUpdateRequest"
    },
    "McpDisableRequest": {
      "type": "object",
      "properties": {
        "serverName": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Name of the MCP server to disable"
        }
      },
      "required": [
        "serverName"
      ],
      "additionalProperties": false,
      "description": "Name of the MCP server to disable for the session.",
      "title": "McpDisableRequest"
    },
    "McpDiscoverRequest": {
      "type": "object",
      "properties": {
        "workingDirectory": {
          "type": "string",
          "description": "Working directory used as context for discovery (e.g., plugin resolution)"
        }
      },
      "additionalProperties": false,
      "description": "Optional working directory used as context for MCP server discovery.",
      "title": "McpDiscoverRequest"
    },
    "McpDiscoverResult": {
      "type": "object",
      "properties": {
        "servers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DiscoveredMcpServer"
          },
          "description": "MCP servers discovered from all sources"
        }
      },
      "required": [
        "servers"
      ],
      "additionalProperties": false,
      "description": "MCP servers discovered from user, workspace, plugin, and built-in sources.",
      "title": "McpDiscoverResult"
    },
    "McpEnableRequest": {
      "type": "object",
      "properties": {
        "serverName": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Name of the MCP server to enable"
        }
      },
      "required": [
        "serverName"
      ],
      "additionalProperties": false,
      "description": "Name of the MCP server to enable for the session.",
      "title": "McpEnableRequest"
    },
    "McpOauthLoginRequest": {
      "type": "object",
      "properties": {
        "serverName": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Name of the remote MCP server to authenticate"
        },
        "forceReauth": {
          "type": "boolean",
          "description": "When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck."
        },
        "clientName": {
          "type": "string",
          "description": "Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees."
        },
        "callbackSuccessMessage": {
          "type": "string",
          "description": "Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return."
        }
      },
      "required": [
        "serverName"
      ],
      "additionalProperties": false,
      "description": "Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.",
      "title": "McpOauthLoginRequest"
    },
    "McpOauthLoginResult": {
      "type": "object",
      "properties": {
        "authorizationUrl": {
          "type": "string",
          "format": "uri",
          "description": "URL the caller should open in a browser to complete OAuth. Omitted when cached tokens were still valid and no browser interaction was needed — the server is already reconnected in that case. When present, the runtime starts the callback listener before returning and continues the flow in the background; completion is signaled via session.mcp_server_status_changed."
        }
      },
      "additionalProperties": false,
      "description": "OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.",
      "title": "McpOauthLoginResult"
    },
    "McpServer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\x00-\\x1f/\\x7f-\\x9f}]+(?:\\/[^\\x00-\\x1f/\\x7f-\\x9f}]+)*$",
          "description": "Server name (config key)"
        },
        "status": {
          "$ref": "#/definitions/McpServerStatus",
          "description": "Connection status: connected, failed, needs-auth, pending, disabled, or not_configured"
        },
        "source": {
          "$ref": "#/definitions/McpServerSource",
          "description": "Configuration source: user, workspace, plugin, or builtin"
        },
        "error": {
          "type": "string",
          "description": "Error message if the server failed to connect"
        }
      },
      "required": [
        "name",
        "status"
      ],
      "additionalProperties": false,
      "title": "McpServer",
      "description": "Schema for the `McpServer` type."
    },
    "McpServerConfig": {
      "anyOf": [
        {
          "$ref": "#/definitions/McpServerConfigStdio",
          "description": "Stdio MCP server configuration launched as a child process."
        },
        {
          "$ref": "#/definitions/McpServerConfigHttp",
          "description": "Remote MCP server configuration accessed over HTTP or SSE."
        }
      ],
      "description": "MCP server configuration (stdio process or remote HTTP/SSE)",
      "title": "McpServerConfig"
    },
    "McpServerConfigHttp": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tools to include. Defaults to all tools if not specified."
        },
        "type": {
          "$ref": "#/definitions/McpServerConfigHttpType",
          "description": "Remote transport type. Defaults to \"http\" when omitted."
        },
        "isDefaultServer": {
          "type": "boolean",
          "description": "Whether this server is a built-in fallback used when the user has not configured their own server."
        },
        "filterMapping": {
          "$ref": "#/definitions/FilterMapping",
          "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode."
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": true,
          "minimum": 0,
          "description": "Timeout in milliseconds for tool calls to this server.",
          "format": "duration"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL of the remote MCP server endpoint."
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "HTTP headers to include in requests to the remote MCP server."
        },
        "oauthClientId": {
          "type": "string",
          "description": "OAuth client ID for a pre-registered remote MCP OAuth client."
        },
        "oauthPublicClient": {
          "type": "boolean",
          "description": "Whether the configured OAuth client is public and does not require a client secret."
        },
        "oauthGrantType": {
          "$ref": "#/definitions/McpServerConfigHttpOauthGrantType",
          "description": "OAuth grant type to use when authenticating to the remote MCP server."
        },
        "auth": {
          "$ref": "#/definitions/McpServerConfigHttpAuth",
          "description": "Additional authentication configuration for this server."
        }
      },
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "description": "Remote MCP server configuration accessed over HTTP or SSE.",
      "title": "McpServerConfigHttp"
    },
    "McpServerConfigHttpAuth": {
      "type": "object",
      "properties": {
        "redirectPort": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535,
          "description": "Fixed port for the OAuth redirect callback server."
        }
      },
      "additionalProperties": false,
      "description": "Additional authentication configuration for this server.",
      "title": "McpServerConfigHttpAuth"
    },
    "McpServerConfigHttpOauthGrantType": {
      "type": "string",
      "enum": [
        "authorization_code",
        "client_credentials"
      ],
      "description": "OAuth grant type to use when authenticating to the remote MCP server.",
      "title": "McpServerConfigHttpOauthGrantType"
    },
    "McpServerConfigHttpType": {
      "type": "string",
      "enum": [
        "http",
        "sse"
      ],
      "default": "http",
      "description": "Remote transport type. Defaults to \"http\" when omitted.",
      "title": "McpServerConfigHttpType"
    },
    "McpServerConfigStdio": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tools to include. Defaults to all tools if not specified."
        },
        "isDefaultServer": {
          "type": "boolean",
          "description": "Whether this server is a built-in fallback used when the user has not configured their own server."
        },
        "filterMapping": {
          "$ref": "#/definitions/FilterMapping",
          "description": "Content filtering mode to apply to all tools, or a map of tool name to content filtering mode."
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": true,
          "minimum": 0,
          "description": "Timeout in milliseconds for tool calls to this server.",
          "format": "duration"
        },
        "command": {
          "type": "string",
          "description": "Executable command used to start the Stdio MCP server process."
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": [],
          "description": "Command-line arguments passed to the Stdio MCP server process."
        },
        "cwd": {
          "type": "string",
          "description": "Working directory for the Stdio MCP server process."
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables to pass to the Stdio MCP server process."
        }
      },
      "required": [
        "command"
      ],
      "additionalProperties": false,
      "description": "Stdio MCP server configuration launched as a child process.",
      "title": "McpServerConfigStdio"
    },
    "McpServerList": {
      "type": "object",
      "properties": {
        "servers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/McpServer"
          },
          "description": "Configured MCP servers"
        }
      },
      "required": [
        "servers"
      ],
      "additionalProperties": false,
      "description": "MCP servers configured for the session, with their connection status.",
      "title": "McpServerList"
    },
    "McpServerSource": {
      "type": "string",
      "enum": [
        "user",
        "workspace",
        "plugin",
        "builtin"
      ],
      "description": "Configuration source: user, workspace, plugin, or builtin",
      "title": "McpServerSource"
    },
    "McpServerStatus": {
      "type": "string",
      "enum": [
        "connected",
        "failed",
        "needs-auth",
        "pending",
        "disabled",
        "not_configured"
      ],
      "description": "Connection status: connected, failed, needs-auth, pending, disabled, or not_configured",
      "title": "McpServerStatus"
    },
    "Model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Model identifier (e.g., \"claude-sonnet-4.5\")"
        },
        "name": {
          "type": "string",
          "description": "Display name"
        },
        "capabilities": {
          "$ref": "#/definitions/ModelCapabilities",
          "description": "Model capabilities and limits"
        },
        "policy": {
          "$ref": "#/definitions/ModelPolicy",
          "description": "Policy state (if applicable)"
        },
        "billing": {
          "$ref": "#/definitions/ModelBilling",
          "description": "Billing information"
        },
        "supportedReasoningEfforts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Supported reasoning effort levels (only present if model supports reasoning effort)"
        },
        "defaultReasoningEffort": {
          "type": "string",
          "description": "Default reasoning effort level (only present if model supports reasoning effort)"
        },
        "modelPickerCategory": {
          "$ref": "#/definitions/ModelPickerCategory",
          "description": "Model capability category for grouping in the model picker"
        },
        "modelPickerPriceCategory": {
          "$ref": "#/definitions/ModelPickerPriceCategory",
          "description": "Relative cost tier for token-based billing users"
        }
      },
      "required": [
        "id",
        "name",
        "capabilities"
      ],
      "additionalProperties": false,
      "title": "Model",
      "description": "Schema for the `Model` type."
    },
    "ModelBilling": {
      "type": "object",
      "properties": {
        "multiplier": {
          "type": "number",
          "description": "Billing cost multiplier relative to the base rate"
        },
        "tokenPrices": {
          "$ref": "#/definitions/ModelBillingTokenPrices",
          "description": "Token-level pricing information for this model"
        }
      },
      "additionalProperties": false,
      "description": "Billing information",
      "title": "ModelBilling"
    },
    "ModelBillingTokenPrices": {
      "type": "object",
      "properties": {
        "inputPrice": {
          "type": "integer",
          "description": "Price per billing batch of input tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)"
        },
        "outputPrice": {
          "type": "integer",
          "description": "Price per billing batch of output tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)"
        },
        "cachePrice": {
          "type": "integer",
          "description": "Price per billing batch of cached tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)"
        },
        "batchSize": {
          "type": "integer",
          "description": "Number of tokens per standard billing batch"
        }
      },
      "additionalProperties": false,
      "description": "Token-level pricing information for this model",
      "title": "ModelBillingTokenPrices"
    },
    "ModelCapabilities": {
      "type": "object",
      "properties": {
        "supports": {
          "$ref": "#/definitions/ModelCapabilitiesSupports",
          "description": "Feature flags indicating what the model supports"
        },
        "limits": {
          "$ref": "#/definitions/ModelCapabilitiesLimits",
          "description": "Token limits for prompts, outputs, and context window"
        }
      },
      "additionalProperties": false,
      "description": "Model capabilities and limits",
      "title": "ModelCapabilities"
    },
    "ModelCapabilitiesLimits": {
      "type": "object",
      "properties": {
        "max_prompt_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum number of prompt/input tokens"
        },
        "max_output_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum number of output/completion tokens"
        },
        "max_context_window_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum total context window size in tokens"
        },
        "vision": {
          "$ref": "#/definitions/ModelCapabilitiesLimitsVision",
          "description": "Vision-specific limits"
        }
      },
      "additionalProperties": false,
      "description": "Token limits for prompts, outputs, and context window",
      "title": "ModelCapabilitiesLimits"
    },
    "ModelCapabilitiesLimitsVision": {
      "type": "object",
      "properties": {
        "supported_media_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "MIME types the model accepts"
        },
        "max_prompt_images": {
          "type": "integer",
          "minimum": 1,
          "description": "Maximum number of images per prompt"
        },
        "max_prompt_image_size": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum image size in bytes"
        }
      },
      "required": [
        "supported_media_types",
        "max_prompt_images",
        "max_prompt_image_size"
      ],
      "additionalProperties": false,
      "description": "Vision-specific limits",
      "title": "ModelCapabilitiesLimitsVision"
    },
    "ModelCapabilitiesOverride": {
      "type": "object",
      "properties": {
        "supports": {
          "$ref": "#/definitions/ModelCapabilitiesOverrideSupports",
          "description": "Feature flags indicating what the model supports"
        },
        "limits": {
          "$ref": "#/definitions/ModelCapabilitiesOverrideLimits",
          "description": "Token limits for prompts, outputs, and context window"
        }
      },
      "additionalProperties": false,
      "description": "Override individual model capabilities resolved by the runtime",
      "title": "ModelCapabilitiesOverride"
    },
    "ModelCapabilitiesOverrideLimits": {
      "type": "object",
      "properties": {
        "max_prompt_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum number of prompt/input tokens"
        },
        "max_output_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum number of output/completion tokens"
        },
        "max_context_window_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum total context window size in tokens"
        },
        "vision": {
          "$ref": "#/definitions/ModelCapabilitiesOverrideLimitsVision",
          "description": "Vision-specific limits"
        }
      },
      "additionalProperties": false,
      "description": "Token limits for prompts, outputs, and context window",
      "title": "ModelCapabilitiesOverrideLimits"
    },
    "ModelCapabilitiesOverrideLimitsVision": {
      "type": "object",
      "properties": {
        "supported_media_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "MIME types the model accepts"
        },
        "max_prompt_images": {
          "type": "integer",
          "minimum": 1,
          "description": "Maximum number of images per prompt"
        },
        "max_prompt_image_size": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum image size in bytes"
        }
      },
      "additionalProperties": false,
      "description": "Vision-specific limits",
      "title": "ModelCapabilitiesOverrideLimitsVision"
    },
    "ModelCapabilitiesOverrideSupports": {
      "type": "object",
      "properties": {
        "vision": {
          "type": "boolean",
          "description": "Whether this model supports vision/image input"
        },
        "reasoningEffort": {
          "type": "boolean",
          "description": "Whether this model supports reasoning effort configuration"
        }
      },
      "additionalProperties": false,
      "description": "Feature flags indicating what the model supports",
      "title": "ModelCapabilitiesOverrideSupports"
    },
    "ModelCapabilitiesSupports": {
      "type": "object",
      "properties": {
        "vision": {
          "type": "boolean",
          "description": "Whether this model supports vision/image input"
        },
        "reasoningEffort": {
          "type": "boolean",
          "description": "Whether this model supports reasoning effort configuration"
        }
      },
      "additionalProperties": false,
      "description": "Feature flags indicating what the model supports",
      "title": "ModelCapabilitiesSupports"
    },
    "ModelList": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Model"
          },
          "description": "List of available models with full metadata"
        }
      },
      "required": [
        "models"
      ],
      "additionalProperties": false,
      "description": "List of Copilot models available to the resolved user, including capabilities and billing metadata.",
      "title": "ModelList"
    },
    "ModelPickerCategory": {
      "type": "string",
      "enum": [
        "lightweight",
        "versatile",
        "powerful"
      ],
      "description": "Model capability category for grouping in the model picker",
      "title": "ModelPickerCategory"
    },
    "ModelPickerPriceCategory": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high",
        "very_high"
      ],
      "description": "Relative cost tier for token-based billing users",
      "title": "ModelPickerPriceCategory"
    },
    "ModelPolicy": {
      "type": "object",
      "properties": {
        "state": {
          "$ref": "#/definitions/ModelPolicyState",
          "description": "Current policy state for this model"
        },
        "terms": {
          "type": "string",
          "description": "Usage terms or conditions for this model"
        }
      },
      "required": [
        "state"
      ],
      "additionalProperties": false,
      "description": "Policy state (if applicable)",
      "title": "ModelPolicy"
    },
    "ModelPolicyState": {
      "type": "string",
      "enum": [
        "enabled",
        "disabled",
        "unconfigured"
      ],
      "description": "Current policy state for this model",
      "title": "ModelPolicyState"
    },
    "ModelsListRequest": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "object",
          "properties": {
            "gitHubToken": {
              "type": "string",
              "description": "GitHub token for per-user model listing. When provided, resolves this token to determine the user's Copilot plan and available models instead of using the global auth."
            }
          },
          "additionalProperties": false
        }
      ],
      "description": "Optional GitHub token used to list models for a specific user instead of the global auth context.",
      "title": "ModelsListRequest"
    },
    "ModelSwitchToRequest": {
      "type": "object",
      "properties": {
        "modelId": {
          "type": "string",
          "description": "Model identifier to switch to"
        },
        "reasoningEffort": {
          "type": "string",
          "description": "Reasoning effort level to use for the model. \"none\" disables reasoning."
        },
        "reasoningSummary": {
          "$ref": "#/definitions/ReasoningSummary",
          "description": "Reasoning summary mode to request for supported model clients"
        },
        "modelCapabilities": {
          "$ref": "#/definitions/ModelCapabilitiesOverride",
          "description": "Override individual model capabilities resolved by the runtime"
        }
      },
      "required": [
        "modelId"
      ],
      "additionalProperties": false,
      "description": "Target model identifier and optional reasoning effort, summary, and capability overrides.",
      "title": "ModelSwitchToRequest"
    },
    "ModelSwitchToResult": {
      "type": "object",
      "properties": {
        "modelId": {
          "type": "string",
          "description": "Currently active model identifier after the switch"
        }
      },
      "additionalProperties": false,
      "description": "The model identifier active on the session after the switch.",
      "title": "ModelSwitchToResult"
    },
    "ModeSetRequest": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/definitions/SessionMode",
          "description": "The session mode the agent is operating in"
        }
      },
      "required": [
        "mode"
      ],
      "additionalProperties": false,
      "description": "Agent interaction mode to apply to the session.",
      "title": "ModeSetRequest"
    },
    "NameGetResult": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The session name (user-set or auto-generated), or null if not yet set"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "The session's friendly name, or null when not yet set.",
      "title": "NameGetResult"
    },
    "NameSetRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "description": "New session name (1–100 characters, trimmed of leading/trailing whitespace)"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "New friendly name to apply to the session.",
      "title": "NameSetRequest"
    },
    "PermissionDecision": {
      "anyOf": [
        {
          "$ref": "#/definitions/PermissionDecisionApproveOnce"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSession"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocation"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApprovePermanently"
        },
        {
          "$ref": "#/definitions/PermissionDecisionReject"
        },
        {
          "$ref": "#/definitions/PermissionDecisionUserNotAvailable"
        }
      ],
      "description": "Decision to apply to a pending permission request.",
      "title": "PermissionDecision"
    },
    "PermissionDecisionApproveForLocation": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "approve-for-location",
          "description": "Approved and persisted for this project location"
        },
        "approval": {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApproval",
          "description": "The approval to persist for this location"
        },
        "locationKey": {
          "type": "string",
          "description": "The location key (git root or cwd) to persist the approval to"
        }
      },
      "required": [
        "kind",
        "approval",
        "locationKey"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocation",
      "description": "Schema for the `PermissionDecisionApproveForLocation` type."
    },
    "PermissionDecisionApproveForLocationApproval": {
      "anyOf": [
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalCommands"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalRead"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalWrite"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMcp"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMcpSampling"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalMemory"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalCustomTool"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalExtensionManagement"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess"
        }
      ],
      "description": "The approval to persist for this location",
      "title": "PermissionDecisionApproveForLocationApproval"
    },
    "PermissionDecisionApproveForLocationApprovalCommands": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "commands",
          "description": "Approval scoped to specific command identifiers."
        },
        "commandIdentifiers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Command identifiers covered by this approval."
        }
      },
      "required": [
        "kind",
        "commandIdentifiers"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalCommands",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalCommands` type."
    },
    "PermissionDecisionApproveForLocationApprovalCustomTool": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "custom-tool",
          "description": "Approval covering a custom tool."
        },
        "toolName": {
          "type": "string",
          "description": "Custom tool name."
        }
      },
      "required": [
        "kind",
        "toolName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalCustomTool",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalCustomTool` type."
    },
    "PermissionDecisionApproveForLocationApprovalExtensionManagement": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "extension-management",
          "description": "Approval covering extension lifecycle operations such as enable, disable, or reload."
        },
        "operation": {
          "type": "string",
          "description": "Optional operation identifier; when omitted, the approval covers all extension management operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalExtensionManagement",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalExtensionManagement` type."
    },
    "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "extension-permission-access",
          "description": "Approval covering an extension's request to access a permission-gated capability."
        },
        "extensionName": {
          "type": "string",
          "description": "Extension name."
        }
      },
      "required": [
        "kind",
        "extensionName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess` type."
    },
    "PermissionDecisionApproveForLocationApprovalMcp": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "mcp",
          "description": "Approval covering an MCP tool."
        },
        "serverName": {
          "type": "string",
          "description": "MCP server name."
        },
        "toolName": {
          "type": [
            "string",
            "null"
          ],
          "description": "MCP tool name, or null to cover every tool on the server."
        }
      },
      "required": [
        "kind",
        "serverName",
        "toolName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalMcp",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMcp` type."
    },
    "PermissionDecisionApproveForLocationApprovalMcpSampling": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "mcp-sampling",
          "description": "Approval covering MCP sampling requests for a server."
        },
        "serverName": {
          "type": "string",
          "description": "MCP server name."
        }
      },
      "required": [
        "kind",
        "serverName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalMcpSampling",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMcpSampling` type."
    },
    "PermissionDecisionApproveForLocationApprovalMemory": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "memory",
          "description": "Approval covering writes to long-term memory."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalMemory",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalMemory` type."
    },
    "PermissionDecisionApproveForLocationApprovalRead": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "read",
          "description": "Approval covering read-only filesystem operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalRead",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalRead` type."
    },
    "PermissionDecisionApproveForLocationApprovalWrite": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "write",
          "description": "Approval covering filesystem write operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForLocationApprovalWrite",
      "description": "Schema for the `PermissionDecisionApproveForLocationApprovalWrite` type."
    },
    "PermissionDecisionApproveForSession": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "approve-for-session",
          "description": "Approved and remembered for the rest of the session"
        },
        "approval": {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApproval",
          "description": "The approval to add as a session-scoped rule"
        },
        "domain": {
          "type": "string",
          "description": "The URL domain to approve for this session"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSession",
      "description": "Schema for the `PermissionDecisionApproveForSession` type."
    },
    "PermissionDecisionApproveForSessionApproval": {
      "anyOf": [
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalCommands"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalRead"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalWrite"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMcp"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMcpSampling"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalMemory"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalCustomTool"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalExtensionManagement"
        },
        {
          "$ref": "#/definitions/PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess"
        }
      ],
      "description": "The approval to add as a session-scoped rule",
      "title": "PermissionDecisionApproveForSessionApproval"
    },
    "PermissionDecisionApproveForSessionApprovalCommands": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "commands",
          "description": "Approval scoped to specific command identifiers."
        },
        "commandIdentifiers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Command identifiers covered by this approval."
        }
      },
      "required": [
        "kind",
        "commandIdentifiers"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalCommands",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalCommands` type."
    },
    "PermissionDecisionApproveForSessionApprovalCustomTool": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "custom-tool",
          "description": "Approval covering a custom tool."
        },
        "toolName": {
          "type": "string",
          "description": "Custom tool name."
        }
      },
      "required": [
        "kind",
        "toolName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalCustomTool",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalCustomTool` type."
    },
    "PermissionDecisionApproveForSessionApprovalExtensionManagement": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "extension-management",
          "description": "Approval covering extension lifecycle operations such as enable, disable, or reload."
        },
        "operation": {
          "type": "string",
          "description": "Optional operation identifier; when omitted, the approval covers all extension management operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalExtensionManagement",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalExtensionManagement` type."
    },
    "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "extension-permission-access",
          "description": "Approval covering an extension's request to access a permission-gated capability."
        },
        "extensionName": {
          "type": "string",
          "description": "Extension name."
        }
      },
      "required": [
        "kind",
        "extensionName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess` type."
    },
    "PermissionDecisionApproveForSessionApprovalMcp": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "mcp",
          "description": "Approval covering an MCP tool."
        },
        "serverName": {
          "type": "string",
          "description": "MCP server name."
        },
        "toolName": {
          "type": [
            "string",
            "null"
          ],
          "description": "MCP tool name, or null to cover every tool on the server."
        }
      },
      "required": [
        "kind",
        "serverName",
        "toolName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalMcp",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMcp` type."
    },
    "PermissionDecisionApproveForSessionApprovalMcpSampling": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "mcp-sampling",
          "description": "Approval covering MCP sampling requests for a server."
        },
        "serverName": {
          "type": "string",
          "description": "MCP server name."
        }
      },
      "required": [
        "kind",
        "serverName"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalMcpSampling",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMcpSampling` type."
    },
    "PermissionDecisionApproveForSessionApprovalMemory": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "memory",
          "description": "Approval covering writes to long-term memory."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalMemory",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalMemory` type."
    },
    "PermissionDecisionApproveForSessionApprovalRead": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "read",
          "description": "Approval covering read-only filesystem operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalRead",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalRead` type."
    },
    "PermissionDecisionApproveForSessionApprovalWrite": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "write",
          "description": "Approval covering filesystem write operations."
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveForSessionApprovalWrite",
      "description": "Schema for the `PermissionDecisionApproveForSessionApprovalWrite` type."
    },
    "PermissionDecisionApproveOnce": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "approve-once",
          "description": "The permission request was approved for this one instance"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApproveOnce",
      "description": "Schema for the `PermissionDecisionApproveOnce` type."
    },
    "PermissionDecisionApprovePermanently": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "approve-permanently",
          "description": "Approved and persisted across sessions"
        },
        "domain": {
          "type": "string",
          "description": "The URL domain to approve permanently"
        }
      },
      "required": [
        "kind",
        "domain"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionApprovePermanently",
      "description": "Schema for the `PermissionDecisionApprovePermanently` type."
    },
    "PermissionDecisionReject": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "reject",
          "description": "Denied by the user during an interactive prompt"
        },
        "feedback": {
          "type": "string",
          "description": "Optional feedback from the user explaining the denial"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionReject",
      "description": "Schema for the `PermissionDecisionReject` type."
    },
    "PermissionDecisionRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID of the pending permission request"
        },
        "result": {
          "$ref": "#/definitions/PermissionDecision",
          "description": "Decision to apply to a pending permission request."
        }
      },
      "required": [
        "requestId",
        "result"
      ],
      "additionalProperties": false,
      "description": "Pending permission request ID and the decision to apply (approve/reject and scope).",
      "title": "PermissionDecisionRequest"
    },
    "PermissionDecisionUserNotAvailable": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "user-not-available",
          "description": "Denied because user confirmation was unavailable"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "PermissionDecisionUserNotAvailable",
      "description": "Schema for the `PermissionDecisionUserNotAvailable` type."
    },
    "PermissionRequestResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the permission request was handled successfully"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the permission decision was applied; false when the request was already resolved.",
      "title": "PermissionRequestResult"
    },
    "PermissionsResetSessionApprovalsRequest": {
      "type": "object",
      "properties": {},
      "additionalProperties": false,
      "description": "No parameters; clears all session-scoped tool permission approvals.",
      "title": "PermissionsResetSessionApprovalsRequest"
    },
    "PermissionsResetSessionApprovalsResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the operation succeeded"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the operation succeeded.",
      "title": "PermissionsResetSessionApprovalsResult"
    },
    "PermissionsSetApproveAllRequest": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether to auto-approve all tool permission requests"
        }
      },
      "required": [
        "enabled"
      ],
      "additionalProperties": false,
      "description": "Whether to auto-approve all tool permission requests for the rest of the session.",
      "title": "PermissionsSetApproveAllRequest"
    },
    "PermissionsSetApproveAllResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the operation succeeded"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the operation succeeded.",
      "title": "PermissionsSetApproveAllResult"
    },
    "PingRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Optional message to echo back"
        }
      },
      "additionalProperties": false,
      "description": "Optional message to echo back to the caller.",
      "title": "PingRequest"
    },
    "PingResult": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Echoed message (or default greeting)"
        },
        "timestamp": {
          "type": "integer",
          "description": "Server timestamp in milliseconds"
        },
        "protocolVersion": {
          "type": "integer",
          "description": "Server protocol version number"
        }
      },
      "required": [
        "message",
        "timestamp",
        "protocolVersion"
      ],
      "additionalProperties": false,
      "description": "Server liveness response, including the echoed message, current timestamp, and protocol version.",
      "title": "PingResult"
    },
    "PlanReadResult": {
      "type": "object",
      "properties": {
        "exists": {
          "type": "boolean",
          "description": "Whether the plan file exists in the workspace"
        },
        "content": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content of the plan file, or null if it does not exist"
        },
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "Absolute file path of the plan file, or null if workspace is not enabled"
        }
      },
      "required": [
        "exists",
        "content",
        "path"
      ],
      "additionalProperties": false,
      "description": "Existence, contents, and resolved path of the session plan file.",
      "title": "PlanReadResult"
    },
    "PlanUpdateRequest": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "description": "The new content for the plan file"
        }
      },
      "required": [
        "content"
      ],
      "additionalProperties": false,
      "description": "Replacement contents to write to the session plan file.",
      "title": "PlanUpdateRequest"
    },
    "Plugin": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Plugin name"
        },
        "marketplace": {
          "type": "string",
          "description": "Marketplace the plugin came from"
        },
        "version": {
          "type": "string",
          "description": "Installed version"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the plugin is currently enabled"
        }
      },
      "required": [
        "name",
        "marketplace",
        "enabled"
      ],
      "additionalProperties": false,
      "title": "Plugin",
      "description": "Schema for the `Plugin` type."
    },
    "PluginList": {
      "type": "object",
      "properties": {
        "plugins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Plugin"
          },
          "description": "Installed plugins"
        }
      },
      "required": [
        "plugins"
      ],
      "additionalProperties": false,
      "description": "Plugins installed for the session, with their enabled state and version metadata.",
      "title": "PluginList"
    },
    "QueuedCommandHandled": {
      "type": "object",
      "properties": {
        "handled": {
          "type": "boolean",
          "const": true,
          "description": "The command was handled"
        },
        "stopProcessingQueue": {
          "type": "boolean",
          "description": "If true, stop processing remaining queued items"
        }
      },
      "required": [
        "handled"
      ],
      "additionalProperties": false,
      "title": "QueuedCommandHandled",
      "description": "Schema for the `QueuedCommandHandled` type."
    },
    "QueuedCommandNotHandled": {
      "type": "object",
      "properties": {
        "handled": {
          "type": "boolean",
          "const": false,
          "description": "The command was not handled"
        }
      },
      "required": [
        "handled"
      ],
      "additionalProperties": false,
      "title": "QueuedCommandNotHandled",
      "description": "Schema for the `QueuedCommandNotHandled` type."
    },
    "QueuedCommandResult": {
      "anyOf": [
        {
          "$ref": "#/definitions/QueuedCommandHandled"
        },
        {
          "$ref": "#/definitions/QueuedCommandNotHandled"
        }
      ],
      "description": "Result of the queued command execution",
      "title": "QueuedCommandResult"
    },
    "ReasoningSummary": {
      "type": "string",
      "enum": [
        "none",
        "concise",
        "detailed"
      ],
      "description": "Reasoning summary mode to request for supported model clients",
      "title": "ReasoningSummary"
    },
    "RemoteEnableRequest": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/definitions/RemoteSessionMode",
          "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering."
        }
      },
      "additionalProperties": false,
      "description": "Optional remote session mode (\"off\", \"export\", or \"on\"); defaults to enabling both export and remote steering.",
      "title": "RemoteEnableRequest"
    },
    "RemoteEnableResult": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "GitHub frontend URL for this session"
        },
        "remoteSteerable": {
          "type": "boolean",
          "description": "Whether remote steering is enabled"
        }
      },
      "required": [
        "remoteSteerable"
      ],
      "additionalProperties": false,
      "description": "GitHub URL for the session and a flag indicating whether remote steering is enabled.",
      "title": "RemoteEnableResult"
    },
    "RemoteSessionConnectionResult": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "SDK session ID for the connected remote session."
        },
        "metadata": {
          "$ref": "#/definitions/ConnectedRemoteSessionMetadata",
          "description": "Metadata for a connected remote session."
        }
      },
      "required": [
        "sessionId",
        "metadata"
      ],
      "additionalProperties": false,
      "description": "Remote session connection result.",
      "title": "RemoteSessionConnectionResult"
    },
    "RemoteSessionMode": {
      "type": "string",
      "enum": [
        "off",
        "export",
        "on"
      ],
      "description": "Per-session remote mode. \"off\" disables remote, \"export\" exports session events to GitHub without enabling remote steering, \"on\" enables both export and remote steering.",
      "title": "RemoteSessionMode"
    },
    "ServerSkill": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Unique identifier for the skill"
        },
        "description": {
          "type": "string",
          "description": "Description of what the skill does"
        },
        "source": {
          "$ref": "#/definitions/SkillSource",
          "description": "Source location type (e.g., project, personal-copilot, plugin, builtin)"
        },
        "userInvocable": {
          "type": "boolean",
          "description": "Whether the skill can be invoked by the user as a slash command"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the skill is currently enabled (based on global config)"
        },
        "path": {
          "type": "string",
          "description": "Absolute path to the skill file"
        },
        "projectPath": {
          "type": "string",
          "description": "The project path this skill belongs to (only for project/inherited skills)"
        }
      },
      "required": [
        "name",
        "description",
        "source",
        "userInvocable",
        "enabled"
      ],
      "additionalProperties": false,
      "title": "ServerSkill",
      "description": "Schema for the `ServerSkill` type."
    },
    "ServerSkillList": {
      "type": "object",
      "properties": {
        "skills": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ServerSkill"
          },
          "description": "All discovered skills across all sources"
        }
      },
      "required": [
        "skills"
      ],
      "additionalProperties": false,
      "description": "Skills discovered across global and project sources.",
      "title": "ServerSkillList"
    },
    "SessionAuthStatus": {
      "type": "object",
      "properties": {
        "isAuthenticated": {
          "type": "boolean",
          "description": "Whether the session has resolved authentication"
        },
        "authType": {
          "$ref": "#/definitions/AuthInfoType",
          "description": "Authentication type"
        },
        "host": {
          "type": "string",
          "format": "uri",
          "description": "Authentication host URL"
        },
        "login": {
          "type": "string",
          "description": "Authenticated login/username, if available"
        },
        "statusMessage": {
          "type": "string",
          "description": "Human-readable authentication status description"
        },
        "copilotPlan": {
          "type": "string",
          "description": "Copilot plan tier (e.g., individual_pro, business)"
        }
      },
      "required": [
        "isAuthenticated"
      ],
      "additionalProperties": false,
      "description": "Authentication status and account metadata for the session.",
      "title": "SessionAuthStatus"
    },
    "SessionFsAppendFileRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        },
        "content": {
          "type": "string",
          "description": "Content to append"
        },
        "mode": {
          "type": "integer",
          "minimum": 0,
          "description": "Optional POSIX-style mode for newly created files"
        }
      },
      "required": [
        "path",
        "content"
      ],
      "additionalProperties": false,
      "description": "File path, content to append, and optional mode for the client-provided session filesystem.",
      "title": "SessionFsAppendFileRequest"
    },
    "SessionFsError": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/definitions/SessionFsErrorCode",
          "description": "Error classification"
        },
        "message": {
          "type": "string",
          "description": "Free-form detail about the error, for logging/diagnostics"
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false,
      "description": "Describes a filesystem error.",
      "title": "SessionFsError"
    },
    "SessionFsErrorCode": {
      "type": "string",
      "enum": [
        "ENOENT",
        "UNKNOWN"
      ],
      "description": "Error classification",
      "title": "SessionFsErrorCode"
    },
    "SessionFsExistsRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Path to test for existence in the client-provided session filesystem.",
      "title": "SessionFsExistsRequest"
    },
    "SessionFsExistsResult": {
      "type": "object",
      "properties": {
        "exists": {
          "type": "boolean",
          "description": "Whether the path exists"
        }
      },
      "required": [
        "exists"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the requested path exists in the client-provided session filesystem.",
      "title": "SessionFsExistsResult"
    },
    "SessionFsMkdirRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        },
        "recursive": {
          "type": "boolean",
          "description": "Create parent directories as needed"
        },
        "mode": {
          "type": "integer",
          "minimum": 0,
          "description": "Optional POSIX-style mode for newly created directories"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Directory path to create in the client-provided session filesystem, with options for recursive creation and POSIX mode.",
      "title": "SessionFsMkdirRequest"
    },
    "SessionFsReaddirRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Directory path whose entries should be listed from the client-provided session filesystem.",
      "title": "SessionFsReaddirRequest"
    },
    "SessionFsReaddirResult": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Entry names in the directory"
        },
        "error": {
          "$ref": "#/definitions/SessionFsError",
          "description": "Describes a filesystem error."
        }
      },
      "required": [
        "entries"
      ],
      "additionalProperties": false,
      "description": "Names of entries in the requested directory, or a filesystem error if the read failed.",
      "title": "SessionFsReaddirResult"
    },
    "SessionFsReaddirWithTypesEntry": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Entry name"
        },
        "type": {
          "$ref": "#/definitions/SessionFsReaddirWithTypesEntryType",
          "description": "Entry type"
        }
      },
      "required": [
        "name",
        "type"
      ],
      "additionalProperties": false,
      "title": "SessionFsReaddirWithTypesEntry",
      "description": "Schema for the `SessionFsReaddirWithTypesEntry` type."
    },
    "SessionFsReaddirWithTypesEntryType": {
      "type": "string",
      "enum": [
        "file",
        "directory"
      ],
      "description": "Entry type",
      "title": "SessionFsReaddirWithTypesEntryType"
    },
    "SessionFsReaddirWithTypesRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Directory path whose entries (with type information) should be listed from the client-provided session filesystem.",
      "title": "SessionFsReaddirWithTypesRequest"
    },
    "SessionFsReaddirWithTypesResult": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SessionFsReaddirWithTypesEntry"
          },
          "description": "Directory entries with type information"
        },
        "error": {
          "$ref": "#/definitions/SessionFsError",
          "description": "Describes a filesystem error."
        }
      },
      "required": [
        "entries"
      ],
      "additionalProperties": false,
      "description": "Entries in the requested directory paired with file/directory type information, or a filesystem error if the read failed.",
      "title": "SessionFsReaddirWithTypesResult"
    },
    "SessionFsReadFileRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Path of the file to read from the client-provided session filesystem.",
      "title": "SessionFsReadFileRequest"
    },
    "SessionFsReadFileResult": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "description": "File content as UTF-8 string"
        },
        "error": {
          "$ref": "#/definitions/SessionFsError",
          "description": "Describes a filesystem error."
        }
      },
      "required": [
        "content"
      ],
      "additionalProperties": false,
      "description": "File content as a UTF-8 string, or a filesystem error if the read failed.",
      "title": "SessionFsReadFileResult"
    },
    "SessionFsRenameRequest": {
      "type": "object",
      "properties": {
        "src": {
          "type": "string",
          "description": "Source path using SessionFs conventions"
        },
        "dest": {
          "type": "string",
          "description": "Destination path using SessionFs conventions"
        }
      },
      "required": [
        "src",
        "dest"
      ],
      "additionalProperties": false,
      "description": "Source and destination paths for renaming or moving an entry in the client-provided session filesystem.",
      "title": "SessionFsRenameRequest"
    },
    "SessionFsRmRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        },
        "recursive": {
          "type": "boolean",
          "description": "Remove directories and their contents recursively"
        },
        "force": {
          "type": "boolean",
          "description": "Ignore errors if the path does not exist"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Path to remove from the client-provided session filesystem, with options for recursive removal and force.",
      "title": "SessionFsRmRequest"
    },
    "SessionFsSetProviderCapabilities": {
      "type": "object",
      "properties": {
        "sqlite": {
          "type": "boolean",
          "description": "Whether the provider supports SQLite query/exists operations"
        }
      },
      "additionalProperties": false,
      "description": "Optional capabilities declared by the provider",
      "title": "SessionFsSetProviderCapabilities"
    },
    "SessionFsSetProviderConventions": {
      "type": "string",
      "enum": [
        "windows",
        "posix"
      ],
      "description": "Path conventions used by this filesystem",
      "title": "SessionFsSetProviderConventions"
    },
    "SessionFsSetProviderRequest": {
      "type": "object",
      "properties": {
        "initialCwd": {
          "type": "string",
          "description": "Initial working directory for sessions"
        },
        "sessionStatePath": {
          "type": "string",
          "description": "Path within each session's SessionFs where the runtime stores files for that session"
        },
        "conventions": {
          "$ref": "#/definitions/SessionFsSetProviderConventions",
          "description": "Path conventions used by this filesystem"
        },
        "capabilities": {
          "$ref": "#/definitions/SessionFsSetProviderCapabilities",
          "description": "Optional capabilities declared by the provider"
        }
      },
      "required": [
        "initialCwd",
        "sessionStatePath",
        "conventions"
      ],
      "additionalProperties": false,
      "description": "Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider.",
      "title": "SessionFsSetProviderRequest"
    },
    "SessionFsSetProviderResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the provider was set successfully"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the calling client was registered as the session filesystem provider.",
      "title": "SessionFsSetProviderResult"
    },
    "SessionFsSqliteExistsResult": {
      "type": "object",
      "properties": {
        "exists": {
          "type": "boolean",
          "description": "Whether the session database already exists"
        }
      },
      "required": [
        "exists"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the per-session SQLite database already exists.",
      "title": "SessionFsSqliteExistsResult"
    },
    "SessionFsSqliteQueryRequest": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "SQL query to execute"
        },
        "queryType": {
          "$ref": "#/definitions/SessionFsSqliteQueryType",
          "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)"
        },
        "params": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "description": "Optional named bind parameters"
        }
      },
      "required": [
        "query",
        "queryType"
      ],
      "additionalProperties": false,
      "description": "SQL query, query type, and optional bind parameters for executing a SQLite query against the per-session database.",
      "title": "SessionFsSqliteQueryRequest"
    },
    "SessionFsSqliteQueryResult": {
      "type": "object",
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {}
          },
          "description": "For SELECT: array of row objects. For others: empty array."
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Column names from the result set"
        },
        "rowsAffected": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of rows affected (for INSERT/UPDATE/DELETE)"
        },
        "lastInsertRowid": {
          "type": "number",
          "description": "Last inserted row ID (for INSERT)"
        },
        "error": {
          "$ref": "#/definitions/SessionFsError",
          "description": "Describes a filesystem error."
        }
      },
      "required": [
        "rows",
        "columns",
        "rowsAffected"
      ],
      "additionalProperties": false,
      "description": "Query results including rows, columns, and rows affected, or a filesystem error if execution failed.",
      "title": "SessionFsSqliteQueryResult"
    },
    "SessionFsSqliteQueryType": {
      "type": "string",
      "enum": [
        "exec",
        "query",
        "run"
      ],
      "description": "How to execute the query: 'exec' for DDL/multi-statement (no results), 'query' for SELECT (returns rows), 'run' for INSERT/UPDATE/DELETE (returns rowsAffected)",
      "title": "SessionFsSqliteQueryType"
    },
    "SessionFsStatRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Path whose metadata should be returned from the client-provided session filesystem.",
      "title": "SessionFsStatRequest"
    },
    "SessionFsStatResult": {
      "type": "object",
      "properties": {
        "isFile": {
          "type": "boolean",
          "description": "Whether the path is a file"
        },
        "isDirectory": {
          "type": "boolean",
          "description": "Whether the path is a directory"
        },
        "size": {
          "type": "integer",
          "minimum": 0,
          "description": "File size in bytes"
        },
        "mtime": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp of last modification"
        },
        "birthtime": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp of creation"
        },
        "error": {
          "$ref": "#/definitions/SessionFsError",
          "description": "Describes a filesystem error."
        }
      },
      "required": [
        "isFile",
        "isDirectory",
        "size",
        "mtime",
        "birthtime"
      ],
      "additionalProperties": false,
      "description": "Filesystem metadata for the requested path, or a filesystem error if the stat failed.",
      "title": "SessionFsStatResult"
    },
    "SessionFsWriteFileRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path using SessionFs conventions"
        },
        "content": {
          "type": "string",
          "description": "Content to write"
        },
        "mode": {
          "type": "integer",
          "minimum": 0,
          "description": "Optional POSIX-style mode for newly created files"
        }
      },
      "required": [
        "path",
        "content"
      ],
      "additionalProperties": false,
      "description": "File path, content to write, and optional mode for the client-provided session filesystem.",
      "title": "SessionFsWriteFileRequest"
    },
    "SessionLogLevel": {
      "type": "string",
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "description": "Log severity level. Determines how the message is displayed in the timeline. Defaults to \"info\".",
      "title": "SessionLogLevel"
    },
    "SessionMode": {
      "type": "string",
      "enum": [
        "interactive",
        "plan",
        "autopilot"
      ],
      "description": "The session mode the agent is operating in",
      "title": "SessionMode"
    },
    "SessionsForkRequest": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "Source session ID to fork from"
        },
        "toEventId": {
          "type": "string",
          "description": "Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included."
        },
        "name": {
          "type": "string",
          "description": "Optional friendly name to assign to the forked session."
        }
      },
      "required": [
        "sessionId"
      ],
      "additionalProperties": false,
      "description": "Source session identifier to fork from, optional event-ID boundary, and optional friendly name for the new session.",
      "title": "SessionsForkRequest"
    },
    "SessionsForkResult": {
      "type": "object",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "The new forked session's ID"
        },
        "name": {
          "type": "string",
          "description": "Friendly name assigned to the forked session, if any."
        }
      },
      "required": [
        "sessionId"
      ],
      "additionalProperties": false,
      "description": "Identifier and optional friendly name assigned to the newly forked session.",
      "title": "SessionsForkResult"
    },
    "ShellExecRequest": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string",
          "description": "Shell command to execute"
        },
        "cwd": {
          "type": "string",
          "description": "Working directory (defaults to session working directory)"
        },
        "timeout": {
          "type": "integer",
          "minimum": 0,
          "description": "Timeout in milliseconds (default: 30000)",
          "format": "duration"
        }
      },
      "required": [
        "command"
      ],
      "additionalProperties": false,
      "description": "Shell command to run, with optional working directory and timeout in milliseconds.",
      "title": "ShellExecRequest"
    },
    "ShellExecResult": {
      "type": "object",
      "properties": {
        "processId": {
          "type": "string",
          "description": "Unique identifier for tracking streamed output"
        }
      },
      "required": [
        "processId"
      ],
      "additionalProperties": false,
      "description": "Identifier of the spawned process, used to correlate streamed output and exit notifications.",
      "title": "ShellExecResult"
    },
    "ShellKillRequest": {
      "type": "object",
      "properties": {
        "processId": {
          "type": "string",
          "description": "Process identifier returned by shell.exec"
        },
        "signal": {
          "$ref": "#/definitions/ShellKillSignal",
          "description": "Signal to send (default: SIGTERM)"
        }
      },
      "required": [
        "processId"
      ],
      "additionalProperties": false,
      "description": "Identifier of a process previously returned by \"shell.exec\" and the signal to send.",
      "title": "ShellKillRequest"
    },
    "ShellKillResult": {
      "type": "object",
      "properties": {
        "killed": {
          "type": "boolean",
          "description": "Whether the signal was sent successfully"
        }
      },
      "required": [
        "killed"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the signal was delivered; false if the process was unknown or already exited.",
      "title": "ShellKillResult"
    },
    "ShellKillSignal": {
      "type": "string",
      "enum": [
        "SIGTERM",
        "SIGKILL",
        "SIGINT"
      ],
      "description": "Signal to send (default: SIGTERM)",
      "title": "ShellKillSignal"
    },
    "Skill": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Unique identifier for the skill"
        },
        "description": {
          "type": "string",
          "description": "Description of what the skill does"
        },
        "source": {
          "$ref": "#/definitions/SkillSource",
          "description": "Source location type (e.g., project, personal-copilot, plugin, builtin)"
        },
        "userInvocable": {
          "type": "boolean",
          "description": "Whether the skill can be invoked by the user as a slash command"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the skill is currently enabled"
        },
        "path": {
          "type": "string",
          "description": "Absolute path to the skill file"
        }
      },
      "required": [
        "name",
        "description",
        "source",
        "userInvocable",
        "enabled"
      ],
      "additionalProperties": false,
      "title": "Skill",
      "description": "Schema for the `Skill` type."
    },
    "SkillList": {
      "type": "object",
      "properties": {
        "skills": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Skill"
          },
          "description": "Available skills"
        }
      },
      "required": [
        "skills"
      ],
      "additionalProperties": false,
      "description": "Skills available to the session, with their enabled state.",
      "title": "SkillList"
    },
    "SkillsConfigSetDisabledSkillsRequest": {
      "type": "object",
      "properties": {
        "disabledSkills": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of skill names to disable"
        }
      },
      "required": [
        "disabledSkills"
      ],
      "additionalProperties": false,
      "description": "Skill names to mark as disabled in global configuration, replacing any previous list.",
      "title": "SkillsConfigSetDisabledSkillsRequest"
    },
    "SkillsDisableRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the skill to disable"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "Name of the skill to disable for the session.",
      "title": "SkillsDisableRequest"
    },
    "SkillsDiscoverRequest": {
      "type": "object",
      "properties": {
        "projectPaths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional list of project directory paths to scan for project-scoped skills"
        },
        "skillDirectories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional list of additional skill directory paths to include"
        }
      },
      "additionalProperties": false,
      "description": "Optional project paths and additional skill directories to include in discovery.",
      "title": "SkillsDiscoverRequest"
    },
    "SkillsEnableRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the skill to enable"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "description": "Name of the skill to enable for the session.",
      "title": "SkillsEnableRequest"
    },
    "SkillsLoadDiagnostics": {
      "type": "object",
      "properties": {
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Warnings emitted while loading skills (e.g. skills that loaded but had issues)"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Errors emitted while loading skills (e.g. skills that failed to load entirely)"
        }
      },
      "required": [
        "warnings",
        "errors"
      ],
      "additionalProperties": false,
      "description": "Diagnostics from reloading skill definitions, with warnings and errors as separate lists.",
      "title": "SkillsLoadDiagnostics"
    },
    "SkillSource": {
      "type": "string",
      "enum": [
        "project",
        "inherited",
        "personal-copilot",
        "personal-agents",
        "plugin",
        "custom",
        "builtin"
      ],
      "description": "Source location type (e.g., project, personal-copilot, plugin, builtin)",
      "title": "SkillSource"
    },
    "SlashCommandAgentPromptResult": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "agent-prompt",
          "description": "Agent prompt result discriminator"
        },
        "prompt": {
          "type": "string",
          "description": "Prompt to submit to the agent"
        },
        "displayPrompt": {
          "type": "string",
          "description": "Prompt text to display to the user"
        },
        "mode": {
          "$ref": "#/definitions/SessionMode",
          "description": "Optional target session mode for the agent prompt"
        },
        "runtimeSettingsChanged": {
          "type": "boolean",
          "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh"
        }
      },
      "required": [
        "kind",
        "prompt",
        "displayPrompt"
      ],
      "additionalProperties": false,
      "title": "SlashCommandAgentPromptResult",
      "description": "Schema for the `SlashCommandAgentPromptResult` type."
    },
    "SlashCommandCompletedResult": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "completed",
          "description": "Completed result discriminator"
        },
        "message": {
          "type": "string",
          "description": "Optional user-facing message describing the completed command"
        },
        "runtimeSettingsChanged": {
          "type": "boolean",
          "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "title": "SlashCommandCompletedResult",
      "description": "Schema for the `SlashCommandCompletedResult` type."
    },
    "SlashCommandInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Canonical command name without a leading slash"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Canonical aliases without leading slashes"
        },
        "description": {
          "type": "string",
          "description": "Human-readable command description"
        },
        "kind": {
          "$ref": "#/definitions/SlashCommandKind",
          "description": "Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command"
        },
        "input": {
          "$ref": "#/definitions/SlashCommandInput",
          "description": "Optional unstructured input hint"
        },
        "allowDuringAgentExecution": {
          "type": "boolean",
          "description": "Whether the command may run while an agent turn is active"
        },
        "experimental": {
          "type": "boolean",
          "description": "Whether the command is experimental"
        }
      },
      "required": [
        "name",
        "description",
        "kind",
        "allowDuringAgentExecution"
      ],
      "additionalProperties": false,
      "title": "SlashCommandInfo",
      "description": "Schema for the `SlashCommandInfo` type."
    },
    "SlashCommandInput": {
      "type": "object",
      "properties": {
        "hint": {
          "type": "string",
          "description": "Hint to display when command input has not been provided"
        },
        "required": {
          "type": "boolean",
          "description": "When true, the command requires non-empty input; clients should render the input hint as required"
        },
        "completion": {
          "$ref": "#/definitions/SlashCommandInputCompletion",
          "description": "Optional completion hint for the input (e.g. 'directory' for filesystem path completion)"
        },
        "preserveMultilineInput": {
          "type": "boolean",
          "description": "When true, clients should pass the full text after the command name as a single argument rather than splitting on whitespace"
        }
      },
      "required": [
        "hint"
      ],
      "additionalProperties": false,
      "description": "Optional unstructured input hint",
      "title": "SlashCommandInput"
    },
    "SlashCommandInputCompletion": {
      "type": "string",
      "enum": [
        "directory"
      ],
      "description": "Optional completion hint for the input (e.g. 'directory' for filesystem path completion)",
      "title": "SlashCommandInputCompletion"
    },
    "SlashCommandInvocationResult": {
      "anyOf": [
        {
          "$ref": "#/definitions/SlashCommandTextResult"
        },
        {
          "$ref": "#/definitions/SlashCommandAgentPromptResult"
        },
        {
          "$ref": "#/definitions/SlashCommandCompletedResult"
        }
      ],
      "description": "Result of invoking the slash command (text output, prompt to send to the agent, or completion).",
      "title": "SlashCommandInvocationResult"
    },
    "SlashCommandKind": {
      "type": "string",
      "enum": [
        "builtin",
        "skill",
        "client"
      ],
      "description": "Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command",
      "title": "SlashCommandKind"
    },
    "SlashCommandTextResult": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "text",
          "description": "Text result discriminator"
        },
        "text": {
          "type": "string",
          "description": "Text output for the client to render"
        },
        "markdown": {
          "type": "boolean",
          "description": "Whether text contains Markdown"
        },
        "preserveAnsi": {
          "type": "boolean",
          "description": "Whether ANSI sequences should be preserved"
        },
        "runtimeSettingsChanged": {
          "type": "boolean",
          "description": "True when the invocation mutated user runtime settings; consumers caching settings should refresh"
        }
      },
      "required": [
        "kind",
        "text"
      ],
      "additionalProperties": false,
      "title": "SlashCommandTextResult",
      "description": "Schema for the `SlashCommandTextResult` type."
    },
    "TaskAgentInfo": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "agent",
          "description": "Task kind"
        },
        "id": {
          "type": "string",
          "description": "Unique task identifier"
        },
        "toolCallId": {
          "type": "string",
          "description": "Tool call ID associated with this agent task"
        },
        "description": {
          "type": "string",
          "description": "Short description of the task"
        },
        "status": {
          "$ref": "#/definitions/TaskStatus",
          "description": "Current lifecycle status of the task"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the task was started"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the task finished"
        },
        "activeTimeMs": {
          "type": "integer",
          "description": "Accumulated active execution time in milliseconds",
          "format": "duration"
        },
        "activeStartedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the current active period began"
        },
        "error": {
          "type": "string",
          "description": "Error message when the task failed"
        },
        "agentType": {
          "type": "string",
          "description": "Type of agent running this task"
        },
        "prompt": {
          "type": "string",
          "description": "Prompt passed to the agent"
        },
        "result": {
          "type": "string",
          "description": "Result text from the task when available"
        },
        "model": {
          "type": "string",
          "description": "Model used for the task when specified"
        },
        "executionMode": {
          "$ref": "#/definitions/TaskExecutionMode",
          "description": "Whether task execution is synchronously awaited or managed in the background"
        },
        "canPromoteToBackground": {
          "type": "boolean",
          "description": "Whether the task is currently in the original sync wait and can be moved to background mode. False once it is already backgrounded, idle, finished, or no longer has a promotable sync waiter."
        },
        "latestResponse": {
          "type": "string",
          "description": "Most recent response text from the agent"
        },
        "idleSince": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the agent entered idle state"
        }
      },
      "required": [
        "type",
        "id",
        "toolCallId",
        "description",
        "status",
        "startedAt",
        "agentType",
        "prompt"
      ],
      "additionalProperties": false,
      "title": "TaskAgentInfo",
      "description": "Schema for the `TaskAgentInfo` type."
    },
    "TaskExecutionMode": {
      "type": "string",
      "enum": [
        "sync",
        "background"
      ],
      "description": "Whether task execution is synchronously awaited or managed in the background",
      "title": "TaskExecutionMode"
    },
    "TaskInfo": {
      "anyOf": [
        {
          "$ref": "#/definitions/TaskAgentInfo"
        },
        {
          "$ref": "#/definitions/TaskShellInfo"
        }
      ],
      "title": "TaskInfo",
      "description": "Schema for the `TaskInfo` type."
    },
    "TaskList": {
      "type": "object",
      "properties": {
        "tasks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaskInfo"
          },
          "description": "Currently tracked tasks"
        }
      },
      "required": [
        "tasks"
      ],
      "additionalProperties": false,
      "description": "Background tasks currently tracked by the session.",
      "title": "TaskList"
    },
    "TasksCancelRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Task identifier"
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Identifier of the background task to cancel.",
      "title": "TasksCancelRequest"
    },
    "TasksCancelResult": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "boolean",
          "description": "Whether the task was successfully cancelled"
        }
      },
      "required": [
        "cancelled"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the background task was successfully cancelled.",
      "title": "TasksCancelResult"
    },
    "TaskShellInfo": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "shell",
          "description": "Task kind"
        },
        "id": {
          "type": "string",
          "description": "Unique task identifier"
        },
        "description": {
          "type": "string",
          "description": "Short description of the task"
        },
        "status": {
          "$ref": "#/definitions/TaskStatus",
          "description": "Current lifecycle status of the task"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the task was started"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the task finished"
        },
        "command": {
          "type": "string",
          "description": "Command being executed"
        },
        "attachmentMode": {
          "$ref": "#/definitions/TaskShellInfoAttachmentMode",
          "description": "Whether the shell runs inside a managed PTY session or as an independent background process"
        },
        "executionMode": {
          "$ref": "#/definitions/TaskExecutionMode",
          "description": "Whether task execution is synchronously awaited or managed in the background"
        },
        "canPromoteToBackground": {
          "type": "boolean",
          "description": "Whether this shell task can be promoted to background mode"
        },
        "logPath": {
          "type": "string",
          "description": "Path to the detached shell log, when available"
        },
        "pid": {
          "type": "integer",
          "description": "Process ID when available"
        }
      },
      "required": [
        "type",
        "id",
        "description",
        "status",
        "startedAt",
        "command",
        "attachmentMode"
      ],
      "additionalProperties": false,
      "title": "TaskShellInfo",
      "description": "Schema for the `TaskShellInfo` type."
    },
    "TaskShellInfoAttachmentMode": {
      "type": "string",
      "enum": [
        "attached",
        "detached"
      ],
      "description": "Whether the shell runs inside a managed PTY session or as an independent background process",
      "title": "TaskShellInfoAttachmentMode"
    },
    "TasksPromoteToBackgroundRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Task identifier"
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Identifier of the task to promote to background mode.",
      "title": "TasksPromoteToBackgroundRequest"
    },
    "TasksPromoteToBackgroundResult": {
      "type": "object",
      "properties": {
        "promoted": {
          "type": "boolean",
          "description": "Whether the task was successfully promoted to background mode"
        }
      },
      "required": [
        "promoted"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the task was successfully promoted to background mode.",
      "title": "TasksPromoteToBackgroundResult"
    },
    "TasksRemoveRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Task identifier"
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "description": "Identifier of the completed or cancelled task to remove from tracking.",
      "title": "TasksRemoveRequest"
    },
    "TasksRemoveResult": {
      "type": "object",
      "properties": {
        "removed": {
          "type": "boolean",
          "description": "Whether the task was removed. Returns false if the task does not exist or is still running/idle (cancel it first)."
        }
      },
      "required": [
        "removed"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the task was removed. False when the task does not exist or is still running/idle.",
      "title": "TasksRemoveResult"
    },
    "TasksSendMessageRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Agent task identifier"
        },
        "message": {
          "type": "string",
          "description": "Message content to send to the agent"
        },
        "fromAgentId": {
          "type": "string",
          "description": "Agent ID of the sender, if sent on behalf of another agent"
        }
      },
      "required": [
        "id",
        "message"
      ],
      "additionalProperties": false,
      "description": "Identifier of the target agent task, message content, and optional sender agent ID.",
      "title": "TasksSendMessageRequest"
    },
    "TasksSendMessageResult": {
      "type": "object",
      "properties": {
        "sent": {
          "type": "boolean",
          "description": "Whether the message was successfully delivered or steered"
        },
        "error": {
          "type": "string",
          "description": "Error message if delivery failed"
        }
      },
      "required": [
        "sent"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the message was delivered, with an error message when delivery failed.",
      "title": "TasksSendMessageResult"
    },
    "TasksStartAgentRequest": {
      "type": "object",
      "properties": {
        "agentType": {
          "type": "string",
          "description": "Type of agent to start (e.g., 'explore', 'task', 'general-purpose')"
        },
        "prompt": {
          "type": "string",
          "description": "Task prompt for the agent"
        },
        "name": {
          "type": "string",
          "description": "Short name for the agent, used to generate a human-readable ID"
        },
        "description": {
          "type": "string",
          "description": "Short description of the task"
        },
        "model": {
          "type": "string",
          "description": "Optional model override"
        }
      },
      "required": [
        "agentType",
        "prompt",
        "name"
      ],
      "additionalProperties": false,
      "description": "Agent type, prompt, name, and optional description and model override for the new task.",
      "title": "TasksStartAgentRequest"
    },
    "TasksStartAgentResult": {
      "type": "object",
      "properties": {
        "agentId": {
          "type": "string",
          "description": "Generated agent ID for the background task"
        }
      },
      "required": [
        "agentId"
      ],
      "additionalProperties": false,
      "description": "Identifier assigned to the newly started background agent task.",
      "title": "TasksStartAgentResult"
    },
    "TaskStatus": {
      "type": "string",
      "enum": [
        "running",
        "idle",
        "completed",
        "failed",
        "cancelled"
      ],
      "description": "Current lifecycle status of the task",
      "title": "TaskStatus"
    },
    "Tool": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Tool identifier (e.g., \"bash\", \"grep\", \"str_replace_editor\")"
        },
        "namespacedName": {
          "type": "string",
          "description": "Optional namespaced name for declarative filtering (e.g., \"playwright/navigate\" for MCP tools)"
        },
        "description": {
          "type": "string",
          "description": "Description of what the tool does"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": {},
          "description": "JSON Schema for the tool's input parameters"
        },
        "instructions": {
          "type": "string",
          "description": "Optional instructions for how to use this tool effectively"
        }
      },
      "required": [
        "name",
        "description"
      ],
      "additionalProperties": false,
      "title": "Tool",
      "description": "Schema for the `Tool` type."
    },
    "ToolList": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tool"
          },
          "description": "List of available built-in tools with metadata"
        }
      },
      "required": [
        "tools"
      ],
      "additionalProperties": false,
      "description": "Built-in tools available for the requested model, with their parameters and instructions.",
      "title": "ToolList"
    },
    "ToolsListRequest": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "description": "Optional model ID — when provided, the returned tool list reflects model-specific overrides"
        }
      },
      "additionalProperties": false,
      "description": "Optional model identifier whose tool overrides should be applied to the listing.",
      "title": "ToolsListRequest"
    },
    "UIElicitationArrayAnyOfField": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "array",
          "description": "Type discriminator. Always \"array\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "minItems": {
          "type": "number",
          "description": "Minimum number of items the user must select."
        },
        "maxItems": {
          "type": "number",
          "description": "Maximum number of items the user may select."
        },
        "items": {
          "$ref": "#/definitions/UIElicitationArrayAnyOfFieldItems",
          "description": "Schema applied to each item in the array."
        },
        "default": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Default values selected when the form is first shown."
        }
      },
      "required": [
        "type",
        "items"
      ],
      "additionalProperties": false,
      "description": "Multi-select string field where each option pairs a value with a display label.",
      "title": "UIElicitationArrayAnyOfField"
    },
    "UIElicitationArrayAnyOfFieldItems": {
      "type": "object",
      "properties": {
        "anyOf": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UIElicitationArrayAnyOfFieldItemsAnyOf"
          },
          "description": "Selectable options, each with a value and a display label."
        }
      },
      "required": [
        "anyOf"
      ],
      "additionalProperties": false,
      "description": "Schema applied to each item in the array.",
      "title": "UIElicitationArrayAnyOfFieldItems"
    },
    "UIElicitationArrayAnyOfFieldItemsAnyOf": {
      "type": "object",
      "properties": {
        "const": {
          "type": "string",
          "description": "Value submitted when this option is selected."
        },
        "title": {
          "type": "string",
          "description": "Display label for this option."
        }
      },
      "required": [
        "const",
        "title"
      ],
      "additionalProperties": false,
      "title": "UIElicitationArrayAnyOfFieldItemsAnyOf",
      "description": "Schema for the `UIElicitationArrayAnyOfFieldItemsAnyOf` type."
    },
    "UIElicitationArrayEnumField": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "array",
          "description": "Type discriminator. Always \"array\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "minItems": {
          "type": "number",
          "description": "Minimum number of items the user must select."
        },
        "maxItems": {
          "type": "number",
          "description": "Maximum number of items the user may select."
        },
        "items": {
          "$ref": "#/definitions/UIElicitationArrayEnumFieldItems",
          "description": "Schema applied to each item in the array."
        },
        "default": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Default values selected when the form is first shown."
        }
      },
      "required": [
        "type",
        "items"
      ],
      "additionalProperties": false,
      "description": "Multi-select string field whose allowed values are defined inline.",
      "title": "UIElicitationArrayEnumField"
    },
    "UIElicitationArrayEnumFieldItems": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "string",
          "description": "Type discriminator. Always \"string\"."
        },
        "enum": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Allowed string values for each selected item."
        }
      },
      "required": [
        "type",
        "enum"
      ],
      "additionalProperties": false,
      "description": "Schema applied to each item in the array.",
      "title": "UIElicitationArrayEnumFieldItems"
    },
    "UIElicitationFieldValue": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "title": "UIElicitationFieldValue",
      "description": "Schema for the `UIElicitationFieldValue` type."
    },
    "UIElicitationRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Message describing what information is needed from the user"
        },
        "requestedSchema": {
          "$ref": "#/definitions/UIElicitationSchema",
          "description": "JSON Schema describing the form fields to present to the user"
        }
      },
      "required": [
        "message",
        "requestedSchema"
      ],
      "additionalProperties": false,
      "description": "Prompt message and JSON schema describing the form fields to elicit from the user.",
      "title": "UIElicitationRequest"
    },
    "UIElicitationResponse": {
      "type": "object",
      "properties": {
        "action": {
          "$ref": "#/definitions/UIElicitationResponseAction",
          "description": "The user's response: accept (submitted), decline (rejected), or cancel (dismissed)"
        },
        "content": {
          "$ref": "#/definitions/UIElicitationResponseContent",
          "description": "The form values submitted by the user (present when action is 'accept')"
        }
      },
      "required": [
        "action"
      ],
      "additionalProperties": false,
      "description": "The elicitation response (accept with form values, decline, or cancel)",
      "title": "UIElicitationResponse"
    },
    "UIElicitationResponseAction": {
      "type": "string",
      "enum": [
        "accept",
        "decline",
        "cancel"
      ],
      "description": "The user's response: accept (submitted), decline (rejected), or cancel (dismissed)",
      "title": "UIElicitationResponseAction"
    },
    "UIElicitationResponseContent": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/UIElicitationFieldValue"
      },
      "description": "The form values submitted by the user (present when action is 'accept')",
      "title": "UIElicitationResponseContent"
    },
    "UIElicitationResult": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the response was accepted. False if the request was already resolved by another client."
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": false,
      "description": "Indicates whether the elicitation response was accepted; false if it was already resolved by another client.",
      "title": "UIElicitationResult"
    },
    "UIElicitationSchema": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "object",
          "description": "Schema type indicator (always 'object')"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/UIElicitationSchemaProperty",
            "description": "Definition for a single elicitation form field."
          },
          "description": "Form field definitions, keyed by field name"
        },
        "required": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of required field names"
        }
      },
      "required": [
        "type",
        "properties"
      ],
      "additionalProperties": false,
      "description": "JSON Schema describing the form fields to present to the user",
      "title": "UIElicitationSchema"
    },
    "UIElicitationSchemaProperty": {
      "anyOf": [
        {
          "$ref": "#/definitions/UIElicitationStringEnumField",
          "description": "Single-select string field whose allowed values are defined inline."
        },
        {
          "$ref": "#/definitions/UIElicitationStringOneOfField",
          "description": "Single-select string field where each option pairs a value with a display label."
        },
        {
          "$ref": "#/definitions/UIElicitationArrayEnumField",
          "description": "Multi-select string field whose allowed values are defined inline."
        },
        {
          "$ref": "#/definitions/UIElicitationArrayAnyOfField",
          "description": "Multi-select string field where each option pairs a value with a display label."
        },
        {
          "$ref": "#/definitions/UIElicitationSchemaPropertyBoolean",
          "description": "Boolean field rendered as a yes/no toggle."
        },
        {
          "$ref": "#/definitions/UIElicitationSchemaPropertyString",
          "description": "Free-text string field with optional length and format constraints."
        },
        {
          "$ref": "#/definitions/UIElicitationSchemaPropertyNumber",
          "description": "Numeric field accepting either a number or an integer."
        }
      ],
      "description": "Definition for a single elicitation form field.",
      "title": "UIElicitationSchemaProperty"
    },
    "UIElicitationSchemaPropertyBoolean": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "boolean",
          "description": "Type discriminator. Always \"boolean\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "default": {
          "type": "boolean",
          "description": "Default value selected when the form is first shown."
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "description": "Boolean field rendered as a yes/no toggle.",
      "title": "UIElicitationSchemaPropertyBoolean"
    },
    "UIElicitationSchemaPropertyNumber": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/UIElicitationSchemaPropertyNumberType",
          "description": "Numeric type accepted by the field."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "minimum": {
          "type": "number",
          "description": "Minimum allowed value (inclusive)."
        },
        "maximum": {
          "type": "number",
          "description": "Maximum allowed value (inclusive)."
        },
        "default": {
          "type": "number",
          "description": "Default value populated in the input when the form is first shown."
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "description": "Numeric field accepting either a number or an integer.",
      "title": "UIElicitationSchemaPropertyNumber"
    },
    "UIElicitationSchemaPropertyNumberType": {
      "type": "string",
      "enum": [
        "number",
        "integer"
      ],
      "description": "Numeric type accepted by the field.",
      "title": "UIElicitationSchemaPropertyNumberType"
    },
    "UIElicitationSchemaPropertyString": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "string",
          "description": "Type discriminator. Always \"string\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "minLength": {
          "type": "number",
          "description": "Minimum number of characters required."
        },
        "maxLength": {
          "type": "number",
          "description": "Maximum number of characters allowed."
        },
        "format": {
          "$ref": "#/definitions/UIElicitationSchemaPropertyStringFormat",
          "description": "Optional format hint that constrains the accepted input."
        },
        "default": {
          "type": "string",
          "description": "Default value populated in the input when the form is first shown."
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "description": "Free-text string field with optional length and format constraints.",
      "title": "UIElicitationSchemaPropertyString"
    },
    "UIElicitationSchemaPropertyStringFormat": {
      "type": "string",
      "enum": [
        "email",
        "uri",
        "date",
        "date-time"
      ],
      "description": "Optional format hint that constrains the accepted input.",
      "title": "UIElicitationSchemaPropertyStringFormat"
    },
    "UIElicitationStringEnumField": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "string",
          "description": "Type discriminator. Always \"string\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "enum": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Allowed string values."
        },
        "enumNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional display labels for each enum value, in the same order as `enum`."
        },
        "default": {
          "type": "string",
          "description": "Default value selected when the form is first shown."
        }
      },
      "required": [
        "type",
        "enum"
      ],
      "additionalProperties": false,
      "description": "Single-select string field whose allowed values are defined inline.",
      "title": "UIElicitationStringEnumField"
    },
    "UIElicitationStringOneOfField": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "string",
          "description": "Type discriminator. Always \"string\"."
        },
        "title": {
          "type": "string",
          "description": "Human-readable label for the field."
        },
        "description": {
          "type": "string",
          "description": "Help text describing the field."
        },
        "oneOf": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UIElicitationStringOneOfFieldOneOf"
          },
          "description": "Selectable options, each with a value and a display label."
        },
        "default": {
          "type": "string",
          "description": "Default value selected when the form is first shown."
        }
      },
      "required": [
        "type",
        "oneOf"
      ],
      "additionalProperties": false,
      "description": "Single-select string field where each option pairs a value with a display label.",
      "title": "UIElicitationStringOneOfField"
    },
    "UIElicitationStringOneOfFieldOneOf": {
      "type": "object",
      "properties": {
        "const": {
          "type": "string",
          "description": "Value submitted when this option is selected."
        },
        "title": {
          "type": "string",
          "description": "Display label for this option."
        }
      },
      "required": [
        "const",
        "title"
      ],
      "additionalProperties": false,
      "title": "UIElicitationStringOneOfFieldOneOf",
      "description": "Schema for the `UIElicitationStringOneOfFieldOneOf` type."
    },
    "UIHandlePendingElicitationRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "The unique request ID from the elicitation.requested event"
        },
        "result": {
          "$ref": "#/definitions/UIElicitationResponse",
          "description": "The elicitation response (accept with form values, decline, or cancel)"
        }
      },
      "required": [
        "requestId",
        "result"
      ],
      "additionalProperties": false,
      "description": "Pending elicitation request ID and the user's response (accept/decline/cancel + form values).",
      "title": "UIHandlePendingElicitationRequest"
    },
    "UsageGetMetricsResult": {
      "type": "object",
      "properties": {
        "totalPremiumRequestCost": {
          "type": "number",
          "description": "Total user-initiated premium request cost across all models (may be fractional due to multipliers)"
        },
        "totalUserRequests": {
          "type": "integer",
          "minimum": 0,
          "description": "Raw count of user-initiated API requests"
        },
        "totalNanoAiu": {
          "type": "integer",
          "minimum": 0,
          "description": "Session-wide accumulated nano-AI units cost"
        },
        "tokenDetails": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/UsageMetricsTokenDetail"
          },
          "description": "Session-wide per-token-type accumulated token counts"
        },
        "totalApiDurationMs": {
          "type": "number",
          "minimum": 0,
          "description": "Total time spent in model API calls (milliseconds)",
          "format": "duration"
        },
        "sessionStartTime": {
          "type": "integer",
          "description": "Session start timestamp (epoch milliseconds)"
        },
        "codeChanges": {
          "$ref": "#/definitions/UsageMetricsCodeChanges",
          "description": "Aggregated code change metrics"
        },
        "modelMetrics": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/UsageMetricsModelMetric"
          },
          "description": "Per-model token and request metrics, keyed by model identifier"
        },
        "currentModel": {
          "type": "string",
          "description": "Currently active model identifier"
        },
        "lastCallInputTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Input tokens from the most recent main-agent API call"
        },
        "lastCallOutputTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Output tokens from the most recent main-agent API call"
        }
      },
      "required": [
        "totalPremiumRequestCost",
        "totalUserRequests",
        "totalApiDurationMs",
        "sessionStartTime",
        "codeChanges",
        "modelMetrics",
        "lastCallInputTokens",
        "lastCallOutputTokens"
      ],
      "additionalProperties": false,
      "description": "Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals.",
      "title": "UsageGetMetricsResult"
    },
    "UsageMetricsCodeChanges": {
      "type": "object",
      "properties": {
        "linesAdded": {
          "type": "integer",
          "description": "Total lines of code added"
        },
        "linesRemoved": {
          "type": "integer",
          "description": "Total lines of code removed"
        },
        "filesModifiedCount": {
          "type": "integer",
          "description": "Number of distinct files modified"
        }
      },
      "required": [
        "linesAdded",
        "linesRemoved",
        "filesModifiedCount"
      ],
      "additionalProperties": false,
      "description": "Aggregated code change metrics",
      "title": "UsageMetricsCodeChanges"
    },
    "UsageMetricsModelMetric": {
      "type": "object",
      "properties": {
        "requests": {
          "$ref": "#/definitions/UsageMetricsModelMetricRequests",
          "description": "Request count and cost metrics for this model"
        },
        "usage": {
          "$ref": "#/definitions/UsageMetricsModelMetricUsage",
          "description": "Token usage metrics for this model"
        },
        "totalNanoAiu": {
          "type": "integer",
          "minimum": 0,
          "description": "Accumulated nano-AI units cost for this model"
        },
        "tokenDetails": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/UsageMetricsModelMetricTokenDetail"
          },
          "description": "Token count details per type"
        }
      },
      "required": [
        "requests",
        "usage"
      ],
      "additionalProperties": false,
      "title": "UsageMetricsModelMetric",
      "description": "Schema for the `UsageMetricsModelMetric` type."
    },
    "UsageMetricsModelMetricRequests": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "description": "Number of API requests made with this model"
        },
        "cost": {
          "type": "number",
          "description": "User-initiated premium request cost (with multiplier applied)"
        }
      },
      "required": [
        "count",
        "cost"
      ],
      "additionalProperties": false,
      "description": "Request count and cost metrics for this model",
      "title": "UsageMetricsModelMetricRequests"
    },
    "UsageMetricsModelMetricTokenDetail": {
      "type": "object",
      "properties": {
        "tokenCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Accumulated token count for this token type"
        }
      },
      "required": [
        "tokenCount"
      ],
      "additionalProperties": false,
      "title": "UsageMetricsModelMetricTokenDetail",
      "description": "Schema for the `UsageMetricsModelMetricTokenDetail` type."
    },
    "UsageMetricsModelMetricUsage": {
      "type": "object",
      "properties": {
        "inputTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Total input tokens consumed"
        },
        "outputTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Total output tokens produced"
        },
        "cacheReadTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Total tokens read from prompt cache"
        },
        "cacheWriteTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Total tokens written to prompt cache"
        },
        "reasoningTokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Total output tokens used for reasoning"
        }
      },
      "required": [
        "inputTokens",
        "outputTokens",
        "cacheReadTokens",
        "cacheWriteTokens"
      ],
      "additionalProperties": false,
      "description": "Token usage metrics for this model",
      "title": "UsageMetricsModelMetricUsage"
    },
    "UsageMetricsTokenDetail": {
      "type": "object",
      "properties": {
        "tokenCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Accumulated token count for this token type"
        }
      },
      "required": [
        "tokenCount"
      ],
      "additionalProperties": false,
      "title": "UsageMetricsTokenDetail",
      "description": "Schema for the `UsageMetricsTokenDetail` type."
    },
    "WorkspacesCreateFileRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Relative path within the workspace files directory"
        },
        "content": {
          "type": "string",
          "description": "File content to write as a UTF-8 string"
        }
      },
      "required": [
        "path",
        "content"
      ],
      "additionalProperties": false,
      "description": "Relative path and UTF-8 content for the workspace file to create or overwrite.",
      "title": "WorkspacesCreateFileRequest"
    },
    "WorkspacesGetWorkspaceResult": {
      "type": "object",
      "properties": {
        "workspace": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "cwd": {
                  "type": "string"
                },
                "git_root": {
                  "type": "string"
                },
                "repository": {
                  "type": "string"
                },
                "host_type": {
                  "type": "string",
                  "enum": [
                    "github",
                    "ado"
                  ]
                },
                "branch": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "user_named": {
                  "type": "boolean"
                },
                "summary_count": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "remote_steerable": {
                  "type": "boolean"
                },
                "mc_task_id": {
                  "type": "string"
                },
                "mc_session_id": {
                  "type": "string"
                },
                "mc_last_event_id": {
                  "type": "string"
                },
                "chronicle_sync_dismissed": {
                  "type": "boolean"
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Current workspace metadata, or null if not available"
        }
      },
      "required": [
        "workspace"
      ],
      "additionalProperties": false,
      "description": "Current workspace metadata for the session, or null when not available.",
      "title": "WorkspacesGetWorkspaceResult"
    },
    "WorkspacesListFilesResult": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Relative file paths in the workspace files directory"
        }
      },
      "required": [
        "files"
      ],
      "additionalProperties": false,
      "description": "Relative paths of files stored in the session workspace files directory.",
      "title": "WorkspacesListFilesResult"
    },
    "WorkspacesReadFileRequest": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Relative path within the workspace files directory"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false,
      "description": "Relative path of the workspace file to read.",
      "title": "WorkspacesReadFileRequest"
    },
    "WorkspacesReadFileResult": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "description": "File content as a UTF-8 string"
        }
      },
      "required": [
        "content"
      ],
      "additionalProperties": false,
      "description": "Contents of the requested workspace file as a UTF-8 string.",
      "title": "WorkspacesReadFileResult"
    }
  }
}
