From 6de3c6ad853ddaa28681ea3f87313e0a94722a9a Mon Sep 17 00:00:00 2001 From: Yingjie He Date: Mon, 19 May 2025 10:36:01 -0700 Subject: [PATCH 1/2] feat: deprecate jetbrains extension in favor of public one --- crates/goose-cli/src/commands/mcp.rs | 4 +- crates/goose-mcp/src/jetbrains/mod.rs | 236 --------- crates/goose-mcp/src/jetbrains/proxy.rs | 343 ------------ crates/goose-mcp/src/lib.rs | 2 - crates/goose-server/src/commands/mcp.rs | 4 +- ui/desktop/openapi.json | 494 ++++-------------- ui/desktop/src/built-in-extensions.json | 9 - .../extensions/bundled-extensions.json | 11 - 8 files changed, 110 insertions(+), 993 deletions(-) delete mode 100644 crates/goose-mcp/src/jetbrains/mod.rs delete mode 100644 crates/goose-mcp/src/jetbrains/proxy.rs diff --git a/crates/goose-cli/src/commands/mcp.rs b/crates/goose-cli/src/commands/mcp.rs index 8fbd399f06d9..f70bd8c6f2ee 100644 --- a/crates/goose-cli/src/commands/mcp.rs +++ b/crates/goose-cli/src/commands/mcp.rs @@ -1,7 +1,6 @@ use anyhow::Result; use goose_mcp::{ - ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, - TutorialRouter, + ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, MemoryRouter, TutorialRouter, }; use mcp_server::router::RouterService; use mcp_server::{BoundedService, ByteTransport, Server}; @@ -26,7 +25,6 @@ pub async fn run_server(name: &str) -> Result<()> { let router: Option> = match name { "developer" => Some(Box::new(RouterService(DeveloperRouter::new()))), "computercontroller" => Some(Box::new(RouterService(ComputerControllerRouter::new()))), - "jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))), "google_drive" | "googledrive" => { let router = GoogleDriveRouter::new().await; Some(Box::new(RouterService(router))) diff --git a/crates/goose-mcp/src/jetbrains/mod.rs b/crates/goose-mcp/src/jetbrains/mod.rs deleted file mode 100644 index d6d718227a0d..000000000000 --- a/crates/goose-mcp/src/jetbrains/mod.rs +++ /dev/null @@ -1,236 +0,0 @@ -mod proxy; - -use anyhow::Result; -use mcp_core::{ - handler::{PromptError, ResourceError, ToolError}, - prompt::Prompt, - protocol::{JsonRpcMessage, ServerCapabilities}, - resource::Resource, - role::Role, - tool::Tool, -}; -use mcp_server::router::CapabilitiesBuilder; -use mcp_server::Router; -use rmcp::model::Content; -use serde_json::Value; -use std::future::Future; -use std::pin::Pin; -use std::sync::Arc; -use tokio::sync::{mpsc, Mutex}; -use tokio::time::{sleep, Duration}; -use tracing::error; - -use self::proxy::JetBrainsProxy; - -pub struct JetBrainsRouter { - tools: Arc>>, - proxy: Arc, - instructions: String, -} - -impl Default for JetBrainsRouter { - fn default() -> Self { - Self::new() - } -} - -impl JetBrainsRouter { - pub fn new() -> Self { - let tools = Arc::new(Mutex::new(Vec::new())); - let proxy = Arc::new(JetBrainsProxy::new()); - let instructions = "JetBrains IDE integration".to_string(); - - // Initialize the proxy - let proxy_clone = Arc::clone(&proxy); - tokio::spawn(async move { - if let Err(e) = proxy_clone.start().await { - error!("Failed to start JetBrains proxy: {}", e); - } - }); - - // Start the background task to update tools - let tools_clone = Arc::clone(&tools); - let proxy_clone = Arc::clone(&proxy); - tokio::spawn(async move { - let mut interval = tokio::time::interval(Duration::from_secs(5)); - loop { - interval.tick().await; - match proxy_clone.list_tools().await { - Ok(new_tools) => { - let mut tools = tools_clone.lock().await; - *tools = new_tools; - } - Err(e) => { - error!("Failed to update tools: {}", e); - } - } - } - }); - - Self { - tools, - proxy, - instructions, - } - } - - async fn call_proxy_tool( - &self, - tool_name: String, - arguments: Value, - ) -> Result, ToolError> { - let result = self - .proxy - .call_tool(&tool_name, arguments) - .await - .map_err(|e| ToolError::ExecutionError(e.to_string()))?; - - // Create a success message for the assistant - let mut contents = vec![ - Content::text(format!("Tool {} executed successfully", tool_name)) - .with_audience(vec![Role::Assistant]), - ]; - - // Add the tool's result contents - contents.extend(result.content); - - Ok(contents) - } - - async fn ensure_tools(&self) -> Result<(), ToolError> { - let mut retry_count = 0; - let max_retries = 50; // 5 second total wait time - let retry_delay = Duration::from_millis(100); - - while retry_count < max_retries { - let tools = self.tools.lock().await; - if !tools.is_empty() { - return Ok(()); - } - drop(tools); // Release the lock before sleeping - - sleep(retry_delay).await; - retry_count += 1; - } - - Err(ToolError::ExecutionError("Failed to get tools list from IDE. Make sure the IDE is running and the plugin is installed.".to_string())) - } -} - -impl Router for JetBrainsRouter { - fn name(&self) -> String { - "jetbrains".to_string() - } - - fn instructions(&self) -> String { - self.instructions.clone() - } - - fn capabilities(&self) -> ServerCapabilities { - CapabilitiesBuilder::new().with_tools(true).build() - } - - fn list_tools(&self) -> Vec { - // Use block_in_place to avoid blocking the runtime - tokio::task::block_in_place(|| { - let rt = tokio::runtime::Builder::new_current_thread() - .enable_all() - .build() - .unwrap(); - rt.block_on(async { - let tools = self.tools.lock().await; - if tools.is_empty() { - drop(tools); - if let Err(e) = self.ensure_tools().await { - error!("Failed to ensure tools: {}", e); - vec![] - } else { - self.tools.lock().await.clone() - } - } else { - tools.clone() - } - }) - }) - } - - fn call_tool( - &self, - tool_name: &str, - arguments: Value, - _notifier: mpsc::Sender, - ) -> Pin, ToolError>> + Send + 'static>> { - let this = self.clone(); - let tool_name = tool_name.to_string(); - Box::pin(async move { - this.ensure_tools().await?; - this.call_proxy_tool(tool_name, arguments).await - }) - } - - fn list_resources(&self) -> Vec { - vec![] - } - - fn read_resource( - &self, - _uri: &str, - ) -> Pin> + Send + 'static>> { - Box::pin(async { Err(ResourceError::NotFound("Resource not found".into())) }) - } - - fn list_prompts(&self) -> Vec { - vec![] - } - - fn get_prompt( - &self, - prompt_name: &str, - ) -> Pin> + Send + 'static>> { - let prompt_name = prompt_name.to_string(); - Box::pin(async move { - Err(PromptError::NotFound(format!( - "Prompt {} not found", - prompt_name - ))) - }) - } -} - -impl Clone for JetBrainsRouter { - fn clone(&self) -> Self { - Self { - tools: Arc::clone(&self.tools), - proxy: Arc::clone(&self.proxy), - instructions: self.instructions.clone(), - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - use tokio::sync::OnceCell; - - static JETBRAINS_ROUTER: OnceCell = OnceCell::const_new(); - - async fn get_router() -> &'static JetBrainsRouter { - JETBRAINS_ROUTER - .get_or_init(|| async { JetBrainsRouter::new() }) - .await - } - - #[tokio::test] - async fn test_router_creation() { - let router = get_router().await; - assert_eq!(router.name(), "jetbrains"); - assert!(!router.instructions().is_empty()); - } - - #[tokio::test] - async fn test_capabilities() { - let router = get_router().await; - let capabilities = router.capabilities(); - assert!(capabilities.tools.is_some()); - } -} diff --git a/crates/goose-mcp/src/jetbrains/proxy.rs b/crates/goose-mcp/src/jetbrains/proxy.rs deleted file mode 100644 index b75b22c77a15..000000000000 --- a/crates/goose-mcp/src/jetbrains/proxy.rs +++ /dev/null @@ -1,343 +0,0 @@ -use anyhow::{anyhow, Result}; -use mcp_core::Tool; -use reqwest::Client; -use rmcp::model::Content; -use serde::{Deserialize, Serialize}; -use serde_json::Value; -use std::env; -use std::sync::Arc; -use std::time::Duration; -use tokio::sync::RwLock; -use tracing::{debug, error, info}; - -const PORT_RANGE_START: u16 = 63342; -const PORT_RANGE_END: u16 = 63352; -const ENDPOINT_CHECK_INTERVAL: Duration = Duration::from_secs(10); - -#[derive(Debug, Serialize, Deserialize)] -struct IDEResponseOk { - status: String, - error: Option, -} - -#[derive(Debug, Serialize, Deserialize)] -struct IDEResponseErr { - status: Option, - error: String, -} - -#[derive(Debug, Serialize)] -pub struct CallToolResult { - pub content: Vec, - pub is_error: bool, -} - -#[derive(Debug)] -pub struct JetBrainsProxy { - cached_endpoint: Arc>>, - previous_response: Arc>>, - client: Client, -} - -impl JetBrainsProxy { - pub fn new() -> Self { - Self { - cached_endpoint: Arc::new(RwLock::new(None)), - previous_response: Arc::new(RwLock::new(None)), - client: Client::new(), - } - } - - async fn test_list_tools(&self, endpoint: &str) -> Result { - debug!("Sending test request to {}/mcp/list_tools", endpoint); - - let response = match self - .client - .get(format!("{}/mcp/list_tools", endpoint)) - .send() - .await - { - Ok(resp) => { - debug!("Got response with status: {}", resp.status()); - resp - } - Err(e) => { - debug!("Error testing endpoint {}: {}", endpoint, e); - return Ok(false); - } - }; - - if !response.status().is_success() { - debug!("Test request failed with status {}", response.status()); - return Ok(false); - } - - let current_response = response.text().await?; - debug!("Received response: {}", current_response); - - // Try to parse as JSON array to validate format - if serde_json::from_str::>(¤t_response).is_err() { - debug!("Response is not a valid JSON array of tools"); - return Ok(false); - } - - let mut prev_response = self.previous_response.write().await; - if let Some(prev) = prev_response.as_ref() { - if prev != ¤t_response { - debug!("Response changed since last check"); - self.send_tools_changed().await; - } - } - *prev_response = Some(current_response); - - Ok(true) - } - - async fn find_working_ide_endpoint(&self) -> Result { - debug!("Attempting to find working IDE endpoint..."); - - // Check IDE_PORT environment variable first - if let Ok(port) = env::var("IDE_PORT") { - debug!("Found IDE_PORT environment variable: {}", port); - let test_endpoint = format!("http://127.0.0.1:{}/api", port); - if self.test_list_tools(&test_endpoint).await? { - debug!("IDE_PORT {} is working", port); - return Ok(test_endpoint); - } - debug!("IDE_PORT {} is not responding correctly", port); - return Err(anyhow!( - "Specified IDE_PORT={} is not responding correctly", - port - )); - } - - debug!( - "No IDE_PORT environment variable, scanning port range {}-{}", - PORT_RANGE_START, PORT_RANGE_END - ); - - // Scan port range - for port in PORT_RANGE_START..=PORT_RANGE_END { - let candidate_endpoint = format!("http://127.0.0.1:{}/api", port); - debug!("Testing port {}...", port); - - if self.test_list_tools(&candidate_endpoint).await? { - debug!("Found working IDE endpoint at {}", candidate_endpoint); - return Ok(candidate_endpoint); - } - } - - debug!("No working IDE endpoint found in port range"); - Err(anyhow!( - "No working IDE endpoint found in range {}-{}", - PORT_RANGE_START, - PORT_RANGE_END - )) - } - - async fn update_ide_endpoint(&self) { - debug!("Updating IDE endpoint..."); - match self.find_working_ide_endpoint().await { - Ok(endpoint) => { - let mut cached = self.cached_endpoint.write().await; - *cached = Some(endpoint.clone()); - debug!("Updated cached endpoint to: {}", endpoint); - } - Err(e) => { - debug!("Failed to update IDE endpoint: {}", e); - error!("Failed to update IDE endpoint: {}", e); - } - } - } - - pub async fn list_tools(&self) -> Result> { - debug!("Listing tools..."); - let endpoint = { - let cached = self.cached_endpoint.read().await; - match cached.as_ref() { - Some(ep) => { - debug!("Using cached endpoint: {}", ep); - ep.clone() - } - None => { - debug!("No cached endpoint available"); - return Ok(vec![]); - } - } - }; - - debug!("Sending list_tools request to {}/mcp/list_tools", endpoint); - let response = match self - .client - .get(format!("{}/mcp/list_tools", endpoint)) - .send() - .await - { - Ok(resp) => { - debug!("Got response with status: {}", resp.status()); - resp - } - Err(e) => { - debug!("Failed to send request: {}", e); - return Err(anyhow!("Failed to send request: {}", e)); - } - }; - - if !response.status().is_success() { - debug!("Request failed with status: {}", response.status()); - return Err(anyhow!( - "Failed to fetch tools with status {}", - response.status() - )); - } - - let response_text = response.text().await?; - debug!("Got response text: {}", response_text); - - let tools_response: Value = serde_json::from_str(&response_text).map_err(|e| { - debug!("Failed to parse response as JSON: {}", e); - anyhow!("Failed to parse response as JSON: {}", e) - })?; - - debug!("Parsed JSON response: {:?}", tools_response); - - let tools: Vec = tools_response - .as_array() - .ok_or_else(|| { - debug!("Response is not a JSON array"); - anyhow!("Invalid tools response format: not an array") - })? - .iter() - .filter_map(|t| { - if let (Some(name), Some(description)) = - (t["name"].as_str(), t["description"].as_str()) - { - // Get just the first sentence of the description - let first_sentence = description - .split('.') - .next() - .unwrap_or(description) - .trim() - .to_string() - + "."; - - // Handle input_schema as either a string or an object - let input_schema = match &t["inputSchema"] { - Value::String(s) => Value::String(s.clone()), - Value::Object(o) => Value::Object(o.clone()), - _ => { - debug!( - "Invalid inputSchema format for tool {}: {:?}", - name, t["inputSchema"] - ); - return None; - } - }; - - Some(Tool { - name: name.to_string(), - description: first_sentence, - input_schema, - annotations: None, - }) - } else { - debug!("Skipping invalid tool entry: {:?}", t); - None - } - }) - .collect(); - - debug!("Collected {} tools", tools.len()); - Ok(tools) - } - - pub async fn call_tool(&self, name: &str, args: Value) -> Result { - let endpoint = self - .cached_endpoint - .read() - .await - .clone() - .ok_or_else(|| anyhow!("No working IDE endpoint available"))?; - - debug!( - "ENDPOINT: {} | Tool name: {} | args: {}", - endpoint, name, args - ); - - let response = self - .client - .post(format!("{}/mcp/{}", endpoint, name)) - .json(&args) - .send() - .await?; - - if !response.status().is_success() { - debug!("Response failed with status: {}", response.status()); - return Err(anyhow!("Response failed: {}", response.status())); - } - - let ide_response: Value = response.json().await?; - let (is_error, text) = match ide_response { - Value::Object(map) => { - let status = map.get("status").and_then(|v| v.as_str()); - let error = map.get("error").and_then(|v| v.as_str()); - - match (status, error) { - (Some(s), None) => (false, s.to_string()), - (None, Some(e)) => (true, e.to_string()), - _ => { - debug!("Invalid response format from IDE"); - return Err(anyhow!("Invalid response format from IDE")); - } - } - } - _ => { - debug!("Unexpected response type from IDE"); - return Err(anyhow!("Unexpected response type from IDE")); - } - }; - - Ok(CallToolResult { - content: vec![Content::text(text)], - is_error, - }) - } - - async fn send_tools_changed(&self) { - debug!("Sending tools changed notification"); - // TODO: Implement notification mechanism when needed - } - - pub async fn start(&self) -> Result<()> { - debug!("Initializing JetBrains Proxy..."); - info!("Initializing JetBrains Proxy..."); - - // Initial endpoint check - debug!("Performing initial endpoint check..."); - self.update_ide_endpoint().await; - - // Schedule periodic endpoint checks - let proxy = self.clone(); - tokio::spawn(async move { - loop { - tokio::time::sleep(ENDPOINT_CHECK_INTERVAL).await; - debug!("Performing periodic endpoint check..."); - proxy.update_ide_endpoint().await; - } - }); - - debug!("JetBrains Proxy running"); - info!("JetBrains Proxy running"); - Ok(()) - } -} - -impl Clone for JetBrainsProxy { - fn clone(&self) -> Self { - Self { - cached_endpoint: Arc::clone(&self.cached_endpoint), - previous_response: Arc::clone(&self.previous_response), - client: Client::new(), - } - } -} diff --git a/crates/goose-mcp/src/lib.rs b/crates/goose-mcp/src/lib.rs index 472349f571fd..c112c8fee3e9 100644 --- a/crates/goose-mcp/src/lib.rs +++ b/crates/goose-mcp/src/lib.rs @@ -10,13 +10,11 @@ pub static APP_STRATEGY: Lazy = Lazy::new(|| AppStrategyArgs { pub mod computercontroller; mod developer; pub mod google_drive; -mod jetbrains; mod memory; mod tutorial; pub use computercontroller::ComputerControllerRouter; pub use developer::DeveloperRouter; pub use google_drive::GoogleDriveRouter; -pub use jetbrains::JetBrainsRouter; pub use memory::MemoryRouter; pub use tutorial::TutorialRouter; diff --git a/crates/goose-server/src/commands/mcp.rs b/crates/goose-server/src/commands/mcp.rs index 5a23339a76fb..85395352db89 100644 --- a/crates/goose-server/src/commands/mcp.rs +++ b/crates/goose-server/src/commands/mcp.rs @@ -1,7 +1,6 @@ use anyhow::Result; use goose_mcp::{ - ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, - TutorialRouter, + ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, MemoryRouter, TutorialRouter, }; use mcp_server::router::RouterService; use mcp_server::{BoundedService, ByteTransport, Server}; @@ -15,7 +14,6 @@ pub async fn run(name: &str) -> Result<()> { let router: Option> = match name { "developer" => Some(Box::new(RouterService(DeveloperRouter::new()))), "computercontroller" => Some(Box::new(RouterService(ComputerControllerRouter::new()))), - "jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))), "google_drive" | "googledrive" => { let router = GoogleDriveRouter::new().await; Some(Box::new(RouterService(router))) diff --git a/ui/desktop/openapi.json b/ui/desktop/openapi.json index d891d6536bf0..0461385c1b87 100644 --- a/ui/desktop/openapi.json +++ b/ui/desktop/openapi.json @@ -15,9 +15,7 @@ "paths": { "/agent/tools": { "get": { - "tags": [ - "super::routes::agent" - ], + "tags": ["super::routes::agent"], "operationId": "get_tools", "parameters": [ { @@ -59,9 +57,7 @@ }, "/config": { "get": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "read_all_config", "responses": { "200": { @@ -79,9 +75,7 @@ }, "/config/backup": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "backup_config", "responses": { "200": { @@ -102,9 +96,7 @@ }, "/config/extensions": { "get": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "get_extensions", "responses": { "200": { @@ -123,9 +115,7 @@ } }, "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "add_extension", "requestBody": { "content": { @@ -162,9 +152,7 @@ }, "/config/extensions/{name}": { "delete": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "remove_extension", "parameters": [ { @@ -198,9 +186,7 @@ }, "/config/init": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "init_config", "responses": { "200": { @@ -221,9 +207,7 @@ }, "/config/permissions": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "upsert_permissions", "requestBody": { "content": { @@ -254,9 +238,7 @@ }, "/config/providers": { "get": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "providers", "responses": { "200": { @@ -277,9 +259,7 @@ }, "/config/read": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "read_config", "requestBody": { "content": { @@ -308,9 +288,7 @@ }, "/config/recover": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "recover_config", "responses": { "200": { @@ -331,9 +309,7 @@ }, "/config/remove": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "remove_config", "requestBody": { "content": { @@ -367,9 +343,7 @@ }, "/config/upsert": { "post": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "upsert_config", "requestBody": { "content": { @@ -400,9 +374,7 @@ }, "/config/validate": { "get": { - "tags": [ - "super::routes::config_management" - ], + "tags": ["super::routes::config_management"], "operationId": "validate_config", "responses": { "200": { @@ -423,9 +395,7 @@ }, "/confirm": { "post": { - "tags": [ - "super::routes::reply" - ], + "tags": ["super::routes::reply"], "operationId": "confirm_permission", "requestBody": { "content": { @@ -457,9 +427,7 @@ }, "/context/manage": { "post": { - "tags": [ - "Context Management" - ], + "tags": ["Context Management"], "operationId": "manage_context", "requestBody": { "content": { @@ -501,9 +469,7 @@ }, "/schedule/create": { "post": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "create_schedule", "requestBody": { "content": { @@ -540,9 +506,7 @@ }, "/schedule/delete/{id}": { "delete": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "delete_schedule", "parameters": [ { @@ -570,9 +534,7 @@ }, "/schedule/list": { "get": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "list_schedules", "responses": { "200": { @@ -593,9 +555,7 @@ }, "/schedule/{id}": { "put": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "update_schedule", "parameters": [ { @@ -643,9 +603,7 @@ }, "/schedule/{id}/inspect": { "get": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "inspect_running_job", "parameters": [ { @@ -680,9 +638,7 @@ }, "/schedule/{id}/kill": { "post": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "kill_running_job", "parameters": [ { @@ -703,9 +659,7 @@ }, "/schedule/{id}/pause": { "post": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "pause_schedule", "parameters": [ { @@ -736,9 +690,7 @@ }, "/schedule/{id}/run_now": { "post": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "run_now_handler", "parameters": [ { @@ -773,9 +725,7 @@ }, "/schedule/{id}/sessions": { "get": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "sessions_handler", "parameters": [ { @@ -820,9 +770,7 @@ }, "/schedule/{id}/unpause": { "post": { - "tags": [ - "schedule" - ], + "tags": ["schedule"], "operationId": "unpause_schedule", "parameters": [ { @@ -850,9 +798,7 @@ }, "/sessions": { "get": { - "tags": [ - "Session Management" - ], + "tags": ["Session Management"], "operationId": "list_sessions", "responses": { "200": { @@ -881,9 +827,7 @@ }, "/sessions/{session_id}": { "get": { - "tags": [ - "Session Management" - ], + "tags": ["Session Management"], "operationId": "get_session_history", "parameters": [ { @@ -947,11 +891,7 @@ }, "ConfigKey": { "type": "object", - "required": [ - "name", - "required", - "secret" - ], + "required": ["name", "required", "secret"], "properties": { "default": { "type": "string", @@ -970,10 +910,7 @@ }, "ConfigKeyQuery": { "type": "object", - "required": [ - "key", - "is_secret" - ], + "required": ["key", "is_secret"], "properties": { "is_secret": { "type": "boolean" @@ -985,9 +922,7 @@ }, "ConfigResponse": { "type": "object", - "required": [ - "config" - ], + "required": ["config"], "properties": { "config": { "type": "object", @@ -999,10 +934,7 @@ "oneOf": [ { "type": "object", - "required": [ - "text", - "type" - ], + "required": ["text", "type"], "properties": { "text": { "type": "string" @@ -1014,11 +946,7 @@ }, { "type": "object", - "required": [ - "data", - "mimeType", - "type" - ], + "required": ["data", "mimeType", "type"], "properties": { "data": { "type": "string" @@ -1033,10 +961,7 @@ }, { "type": "object", - "required": [ - "resource", - "type" - ], + "required": ["resource", "type"], "properties": { "resource": { "$ref": "#/components/schemas/ResourceContents" @@ -1048,11 +973,7 @@ }, { "type": "object", - "required": [ - "data", - "mimeType", - "type" - ], + "required": ["data", "mimeType", "type"], "properties": { "annotations": { "allOf": [ @@ -1076,9 +997,7 @@ }, "ContextLengthExceeded": { "type": "object", - "required": [ - "msg" - ], + "required": ["msg"], "properties": { "msg": { "type": "string" @@ -1088,10 +1007,7 @@ "ContextManageRequest": { "type": "object", "description": "Request payload for context management operations", - "required": [ - "messages", - "manageAction" - ], + "required": ["messages", "manageAction"], "properties": { "manageAction": { "type": "string", @@ -1109,10 +1025,7 @@ "ContextManageResponse": { "type": "object", "description": "Response from context management operations", - "required": [ - "messages", - "tokenCounts" - ], + "required": ["messages", "tokenCounts"], "properties": { "messages": { "type": "array", @@ -1133,11 +1046,7 @@ }, "CreateScheduleRequest": { "type": "object", - "required": [ - "id", - "recipe_source", - "cron" - ], + "required": ["id", "recipe_source", "cron"], "properties": { "cron": { "type": "string" @@ -1156,9 +1065,7 @@ }, "EmbeddedResource": { "type": "object", - "required": [ - "resource" - ], + "required": ["resource"], "properties": { "annotations": { "allOf": [ @@ -1184,11 +1091,7 @@ { "type": "object", "description": "Server-sent events client with a URI endpoint", - "required": [ - "name", - "uri", - "type" - ], + "required": ["name", "uri", "type"], "properties": { "bundled": { "type": "boolean", @@ -1220,9 +1123,7 @@ }, "type": { "type": "string", - "enum": [ - "sse" - ] + "enum": ["sse"] }, "uri": { "type": "string" @@ -1232,12 +1133,7 @@ { "type": "object", "description": "Standard I/O client with command and arguments", - "required": [ - "name", - "cmd", - "args", - "type" - ], + "required": ["name", "cmd", "args", "type"], "properties": { "args": { "type": "array", @@ -1278,19 +1174,14 @@ }, "type": { "type": "string", - "enum": [ - "stdio" - ] + "enum": ["stdio"] } } }, { "type": "object", "description": "Built-in extension that is part of the goose binary", - "required": [ - "name", - "type" - ], + "required": ["name", "type"], "properties": { "bundled": { "type": "boolean", @@ -1313,20 +1204,14 @@ }, "type": { "type": "string", - "enum": [ - "builtin" - ] + "enum": ["builtin"] } } }, { "type": "object", "description": "Streamable HTTP client with a URI endpoint using MCP Streamable HTTP specification", - "required": [ - "name", - "uri", - "type" - ], + "required": ["name", "uri", "type"], "properties": { "bundled": { "type": "boolean", @@ -1364,9 +1249,7 @@ }, "type": { "type": "string", - "enum": [ - "streamable_http" - ] + "enum": ["streamable_http"] }, "uri": { "type": "string" @@ -1376,11 +1259,7 @@ { "type": "object", "description": "Frontend-provided tools that will be called through the frontend", - "required": [ - "name", - "tools", - "type" - ], + "required": ["name", "tools", "type"], "properties": { "bundled": { "type": "boolean", @@ -1405,9 +1284,7 @@ }, "type": { "type": "string", - "enum": [ - "frontend" - ] + "enum": ["frontend"] } } } @@ -1424,9 +1301,7 @@ }, { "type": "object", - "required": [ - "enabled" - ], + "required": ["enabled"], "properties": { "enabled": { "type": "boolean" @@ -1437,11 +1312,7 @@ }, "ExtensionQuery": { "type": "object", - "required": [ - "name", - "config", - "enabled" - ], + "required": ["name", "config", "enabled"], "properties": { "config": { "$ref": "#/components/schemas/ExtensionConfig" @@ -1456,9 +1327,7 @@ }, "ExtensionResponse": { "type": "object", - "required": [ - "extensions" - ], + "required": ["extensions"], "properties": { "extensions": { "type": "array", @@ -1470,10 +1339,7 @@ }, "FrontendToolRequest": { "type": "object", - "required": [ - "id", - "toolCall" - ], + "required": ["id", "toolCall"], "properties": { "id": { "type": "string" @@ -1485,10 +1351,7 @@ }, "ImageContent": { "type": "object", - "required": [ - "data", - "mimeType" - ], + "required": ["data", "mimeType"], "properties": { "annotations": { "allOf": [ @@ -1525,9 +1388,7 @@ }, "KillJobResponse": { "type": "object", - "required": [ - "message" - ], + "required": ["message"], "properties": { "message": { "type": "string" @@ -1536,9 +1397,7 @@ }, "ListSchedulesResponse": { "type": "object", - "required": [ - "jobs" - ], + "required": ["jobs"], "properties": { "jobs": { "type": "array", @@ -1551,11 +1410,7 @@ "Message": { "type": "object", "description": "A message to or from an LLM", - "required": [ - "role", - "created", - "content" - ], + "required": ["role", "created", "content"], "properties": { "content": { "type": "array", @@ -1585,15 +1440,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "text" - ] + "enum": ["text"] } } } @@ -1606,15 +1457,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "image" - ] + "enum": ["image"] } } } @@ -1627,15 +1474,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "toolRequest" - ] + "enum": ["toolRequest"] } } } @@ -1648,15 +1491,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "toolResponse" - ] + "enum": ["toolResponse"] } } } @@ -1669,15 +1508,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "toolConfirmationRequest" - ] + "enum": ["toolConfirmationRequest"] } } } @@ -1690,15 +1525,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "frontendToolRequest" - ] + "enum": ["frontendToolRequest"] } } } @@ -1711,15 +1542,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "thinking" - ] + "enum": ["thinking"] } } } @@ -1732,15 +1559,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "redactedThinking" - ] + "enum": ["redactedThinking"] } } } @@ -1753,15 +1576,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "contextLengthExceeded" - ] + "enum": ["contextLengthExceeded"] } } } @@ -1774,15 +1593,11 @@ }, { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "type": "string", - "enum": [ - "summarizationRequested" - ] + "enum": ["summarizationRequested"] } } } @@ -1797,10 +1612,7 @@ "ModelInfo": { "type": "object", "description": "Information about a model's capabilities", - "required": [ - "name", - "context_limit" - ], + "required": ["name", "context_limit"], "properties": { "context_limit": { "type": "integer", @@ -1832,10 +1644,7 @@ }, "PermissionConfirmationRequest": { "type": "object", - "required": [ - "id", - "action" - ], + "required": ["id", "action"], "properties": { "action": { "type": "string" @@ -1851,26 +1660,15 @@ "PermissionLevel": { "type": "string", "description": "Enum representing the possible permission levels for a tool.", - "enum": [ - "always_allow", - "ask_before", - "never_allow" - ] + "enum": ["always_allow", "ask_before", "never_allow"] }, "PrincipalType": { "type": "string", - "enum": [ - "Extension", - "Tool" - ] + "enum": ["Extension", "Tool"] }, "ProviderDetails": { "type": "object", - "required": [ - "name", - "metadata", - "is_configured" - ], + "required": ["name", "metadata", "is_configured"], "properties": { "is_configured": { "type": "boolean" @@ -1934,9 +1732,7 @@ }, "ProvidersResponse": { "type": "object", - "required": [ - "providers" - ], + "required": ["providers"], "properties": { "providers": { "type": "array", @@ -1948,9 +1744,7 @@ }, "RedactedThinkingContent": { "type": "object", - "required": [ - "data" - ], + "required": ["data"], "properties": { "data": { "type": "string" @@ -1961,10 +1755,7 @@ "oneOf": [ { "type": "object", - "required": [ - "uri", - "text" - ], + "required": ["uri", "text"], "properties": { "mime_type": { "type": "string", @@ -1980,10 +1771,7 @@ }, { "type": "object", - "required": [ - "uri", - "blob" - ], + "required": ["uri", "blob"], "properties": { "blob": { "type": "string" @@ -2011,9 +1799,7 @@ }, "RunNowResponse": { "type": "object", - "required": [ - "session_id" - ], + "required": ["session_id"], "properties": { "session_id": { "type": "string" @@ -2022,11 +1808,7 @@ }, "ScheduledJob": { "type": "object", - "required": [ - "id", - "source", - "cron" - ], + "required": ["id", "source", "cron"], "properties": { "cron": { "type": "string" @@ -2065,13 +1847,7 @@ }, "SessionDisplayInfo": { "type": "object", - "required": [ - "id", - "name", - "createdAt", - "workingDir", - "messageCount" - ], + "required": ["id", "name", "createdAt", "workingDir", "messageCount"], "properties": { "accumulatedInputTokens": { "type": "integer", @@ -2127,11 +1903,7 @@ }, "SessionHistoryResponse": { "type": "object", - "required": [ - "sessionId", - "metadata", - "messages" - ], + "required": ["sessionId", "metadata", "messages"], "properties": { "messages": { "type": "array", @@ -2151,12 +1923,7 @@ }, "SessionInfo": { "type": "object", - "required": [ - "id", - "path", - "modified", - "metadata" - ], + "required": ["id", "path", "modified", "metadata"], "properties": { "id": { "type": "string" @@ -2174,9 +1941,7 @@ }, "SessionListResponse": { "type": "object", - "required": [ - "sessions" - ], + "required": ["sessions"], "properties": { "sessions": { "type": "array", @@ -2190,11 +1955,7 @@ "SessionMetadata": { "type": "object", "description": "Metadata for a session, stored as the first line in the session file", - "required": [ - "working_dir", - "description", - "message_count" - ], + "required": ["working_dir", "description", "message_count"], "properties": { "accumulated_input_tokens": { "type": "integer", @@ -2270,9 +2031,7 @@ }, "SummarizationRequested": { "type": "object", - "required": [ - "msg" - ], + "required": ["msg"], "properties": { "msg": { "type": "string" @@ -2281,9 +2040,7 @@ }, "TextContent": { "type": "object", - "required": [ - "text" - ], + "required": ["text"], "properties": { "annotations": { "allOf": [ @@ -2299,10 +2056,7 @@ }, "ThinkingContent": { "type": "object", - "required": [ - "thinking", - "signature" - ], + "required": ["thinking", "signature"], "properties": { "signature": { "type": "string" @@ -2315,11 +2069,7 @@ "Tool": { "type": "object", "description": "A tool that can be used by a model.", - "required": [ - "name", - "description", - "inputSchema" - ], + "required": ["name", "description", "inputSchema"], "properties": { "annotations": { "allOf": [ @@ -2371,11 +2121,7 @@ }, "ToolConfirmationRequest": { "type": "object", - "required": [ - "id", - "toolName", - "arguments" - ], + "required": ["id", "toolName", "arguments"], "properties": { "arguments": {}, "id": { @@ -2393,11 +2139,7 @@ "ToolInfo": { "type": "object", "description": "Information about the tool used for building prompts", - "required": [ - "name", - "description", - "parameters" - ], + "required": ["name", "description", "parameters"], "properties": { "description": { "type": "string" @@ -2423,10 +2165,7 @@ }, "ToolPermission": { "type": "object", - "required": [ - "tool_name", - "permission" - ], + "required": ["tool_name", "permission"], "properties": { "permission": { "$ref": "#/components/schemas/PermissionLevel" @@ -2438,10 +2177,7 @@ }, "ToolRequest": { "type": "object", - "required": [ - "id", - "toolCall" - ], + "required": ["id", "toolCall"], "properties": { "id": { "type": "string" @@ -2453,10 +2189,7 @@ }, "ToolResponse": { "type": "object", - "required": [ - "id", - "toolResult" - ], + "required": ["id", "toolResult"], "properties": { "id": { "type": "string" @@ -2468,10 +2201,7 @@ }, "ToolResultSchema": { "type": "object", - "required": [ - "success", - "data" - ], + "required": ["success", "data"], "properties": { "data": { "type": "object" @@ -2493,9 +2223,7 @@ }, "UpdateScheduleRequest": { "type": "object", - "required": [ - "cron" - ], + "required": ["cron"], "properties": { "cron": { "type": "string" @@ -2504,11 +2232,7 @@ }, "UpsertConfigQuery": { "type": "object", - "required": [ - "key", - "value", - "is_secret" - ], + "required": ["key", "value", "is_secret"], "properties": { "is_secret": { "type": "boolean" @@ -2521,9 +2245,7 @@ }, "UpsertPermissionsQuery": { "type": "object", - "required": [ - "tool_permissions" - ], + "required": ["tool_permissions"], "properties": { "tool_permissions": { "type": "array", @@ -2535,4 +2257,4 @@ } } } -} \ No newline at end of file +} diff --git a/ui/desktop/src/built-in-extensions.json b/ui/desktop/src/built-in-extensions.json index ee620bf2420e..ea5755731452 100644 --- a/ui/desktop/src/built-in-extensions.json +++ b/ui/desktop/src/built-in-extensions.json @@ -26,15 +26,6 @@ "env_keys": [], "timeout": 300 }, - { - "id": "jetbrains", - "name": "Jetbrains", - "description": "Integration with any Jetbrains IDE", - "enabled": false, - "type": "builtin", - "env_keys": [], - "timeout": 300 - }, { "id": "tutorial", "name": "Tutorial", diff --git a/ui/desktop/src/components/settings/extensions/bundled-extensions.json b/ui/desktop/src/components/settings/extensions/bundled-extensions.json index 42a054591616..42392d2656bf 100644 --- a/ui/desktop/src/components/settings/extensions/bundled-extensions.json +++ b/ui/desktop/src/components/settings/extensions/bundled-extensions.json @@ -32,17 +32,6 @@ "timeout": 300, "bundled": true }, - { - "id": "jetbrains", - "display_name": "Jetbrains", - "name": "jetbrains", - "description": "Integration with any Jetbrains IDE", - "enabled": false, - "type": "builtin", - "env_keys": [], - "timeout": 300, - "bundled": true - }, { "id": "tutorial", "name": "tutorial", From a387189dcf916a9ab7baddd0d18010629b03e637 Mon Sep 17 00:00:00 2001 From: Yingjie He Date: Sat, 19 Jul 2025 12:48:29 -0700 Subject: [PATCH 2/2] refresh --- ui/desktop/openapi.json | 499 +++++++++++++++++++++++++++++++--------- 1 file changed, 391 insertions(+), 108 deletions(-) diff --git a/ui/desktop/openapi.json b/ui/desktop/openapi.json index 0461385c1b87..30ac193e3d0e 100644 --- a/ui/desktop/openapi.json +++ b/ui/desktop/openapi.json @@ -15,7 +15,9 @@ "paths": { "/agent/tools": { "get": { - "tags": ["super::routes::agent"], + "tags": [ + "super::routes::agent" + ], "operationId": "get_tools", "parameters": [ { @@ -57,7 +59,9 @@ }, "/config": { "get": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "read_all_config", "responses": { "200": { @@ -75,7 +79,9 @@ }, "/config/backup": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "backup_config", "responses": { "200": { @@ -96,7 +102,9 @@ }, "/config/extensions": { "get": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "get_extensions", "responses": { "200": { @@ -115,7 +123,9 @@ } }, "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "add_extension", "requestBody": { "content": { @@ -152,7 +162,9 @@ }, "/config/extensions/{name}": { "delete": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "remove_extension", "parameters": [ { @@ -186,7 +198,9 @@ }, "/config/init": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "init_config", "responses": { "200": { @@ -207,7 +221,9 @@ }, "/config/permissions": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "upsert_permissions", "requestBody": { "content": { @@ -238,7 +254,9 @@ }, "/config/providers": { "get": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "providers", "responses": { "200": { @@ -259,7 +277,9 @@ }, "/config/read": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "read_config", "requestBody": { "content": { @@ -288,7 +308,9 @@ }, "/config/recover": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "recover_config", "responses": { "200": { @@ -309,7 +331,9 @@ }, "/config/remove": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "remove_config", "requestBody": { "content": { @@ -343,7 +367,9 @@ }, "/config/upsert": { "post": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "upsert_config", "requestBody": { "content": { @@ -374,7 +400,9 @@ }, "/config/validate": { "get": { - "tags": ["super::routes::config_management"], + "tags": [ + "super::routes::config_management" + ], "operationId": "validate_config", "responses": { "200": { @@ -395,7 +423,9 @@ }, "/confirm": { "post": { - "tags": ["super::routes::reply"], + "tags": [ + "super::routes::reply" + ], "operationId": "confirm_permission", "requestBody": { "content": { @@ -427,7 +457,9 @@ }, "/context/manage": { "post": { - "tags": ["Context Management"], + "tags": [ + "Context Management" + ], "operationId": "manage_context", "requestBody": { "content": { @@ -469,7 +501,9 @@ }, "/schedule/create": { "post": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "create_schedule", "requestBody": { "content": { @@ -506,7 +540,9 @@ }, "/schedule/delete/{id}": { "delete": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "delete_schedule", "parameters": [ { @@ -534,7 +570,9 @@ }, "/schedule/list": { "get": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "list_schedules", "responses": { "200": { @@ -555,7 +593,9 @@ }, "/schedule/{id}": { "put": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "update_schedule", "parameters": [ { @@ -603,7 +643,9 @@ }, "/schedule/{id}/inspect": { "get": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "inspect_running_job", "parameters": [ { @@ -638,7 +680,9 @@ }, "/schedule/{id}/kill": { "post": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "kill_running_job", "parameters": [ { @@ -659,7 +703,9 @@ }, "/schedule/{id}/pause": { "post": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "pause_schedule", "parameters": [ { @@ -690,7 +736,9 @@ }, "/schedule/{id}/run_now": { "post": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "run_now_handler", "parameters": [ { @@ -725,7 +773,9 @@ }, "/schedule/{id}/sessions": { "get": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "sessions_handler", "parameters": [ { @@ -770,7 +820,9 @@ }, "/schedule/{id}/unpause": { "post": { - "tags": ["schedule"], + "tags": [ + "schedule" + ], "operationId": "unpause_schedule", "parameters": [ { @@ -798,7 +850,9 @@ }, "/sessions": { "get": { - "tags": ["Session Management"], + "tags": [ + "Session Management" + ], "operationId": "list_sessions", "responses": { "200": { @@ -827,7 +881,9 @@ }, "/sessions/{session_id}": { "get": { - "tags": ["Session Management"], + "tags": [ + "Session Management" + ], "operationId": "get_session_history", "parameters": [ { @@ -891,7 +947,11 @@ }, "ConfigKey": { "type": "object", - "required": ["name", "required", "secret"], + "required": [ + "name", + "required", + "secret" + ], "properties": { "default": { "type": "string", @@ -910,7 +970,10 @@ }, "ConfigKeyQuery": { "type": "object", - "required": ["key", "is_secret"], + "required": [ + "key", + "is_secret" + ], "properties": { "is_secret": { "type": "boolean" @@ -922,7 +985,9 @@ }, "ConfigResponse": { "type": "object", - "required": ["config"], + "required": [ + "config" + ], "properties": { "config": { "type": "object", @@ -934,7 +999,10 @@ "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { "text": { "type": "string" @@ -946,7 +1014,11 @@ }, { "type": "object", - "required": ["data", "mimeType", "type"], + "required": [ + "data", + "mimeType", + "type" + ], "properties": { "data": { "type": "string" @@ -961,7 +1033,10 @@ }, { "type": "object", - "required": ["resource", "type"], + "required": [ + "resource", + "type" + ], "properties": { "resource": { "$ref": "#/components/schemas/ResourceContents" @@ -973,7 +1048,11 @@ }, { "type": "object", - "required": ["data", "mimeType", "type"], + "required": [ + "data", + "mimeType", + "type" + ], "properties": { "annotations": { "allOf": [ @@ -997,7 +1076,9 @@ }, "ContextLengthExceeded": { "type": "object", - "required": ["msg"], + "required": [ + "msg" + ], "properties": { "msg": { "type": "string" @@ -1007,7 +1088,10 @@ "ContextManageRequest": { "type": "object", "description": "Request payload for context management operations", - "required": ["messages", "manageAction"], + "required": [ + "messages", + "manageAction" + ], "properties": { "manageAction": { "type": "string", @@ -1025,7 +1109,10 @@ "ContextManageResponse": { "type": "object", "description": "Response from context management operations", - "required": ["messages", "tokenCounts"], + "required": [ + "messages", + "tokenCounts" + ], "properties": { "messages": { "type": "array", @@ -1046,7 +1133,11 @@ }, "CreateScheduleRequest": { "type": "object", - "required": ["id", "recipe_source", "cron"], + "required": [ + "id", + "recipe_source", + "cron" + ], "properties": { "cron": { "type": "string" @@ -1065,7 +1156,9 @@ }, "EmbeddedResource": { "type": "object", - "required": ["resource"], + "required": [ + "resource" + ], "properties": { "annotations": { "allOf": [ @@ -1091,7 +1184,11 @@ { "type": "object", "description": "Server-sent events client with a URI endpoint", - "required": ["name", "uri", "type"], + "required": [ + "name", + "uri", + "type" + ], "properties": { "bundled": { "type": "boolean", @@ -1123,7 +1220,9 @@ }, "type": { "type": "string", - "enum": ["sse"] + "enum": [ + "sse" + ] }, "uri": { "type": "string" @@ -1133,7 +1232,12 @@ { "type": "object", "description": "Standard I/O client with command and arguments", - "required": ["name", "cmd", "args", "type"], + "required": [ + "name", + "cmd", + "args", + "type" + ], "properties": { "args": { "type": "array", @@ -1174,14 +1278,19 @@ }, "type": { "type": "string", - "enum": ["stdio"] + "enum": [ + "stdio" + ] } } }, { "type": "object", "description": "Built-in extension that is part of the goose binary", - "required": ["name", "type"], + "required": [ + "name", + "type" + ], "properties": { "bundled": { "type": "boolean", @@ -1204,14 +1313,20 @@ }, "type": { "type": "string", - "enum": ["builtin"] + "enum": [ + "builtin" + ] } } }, { "type": "object", "description": "Streamable HTTP client with a URI endpoint using MCP Streamable HTTP specification", - "required": ["name", "uri", "type"], + "required": [ + "name", + "uri", + "type" + ], "properties": { "bundled": { "type": "boolean", @@ -1249,7 +1364,9 @@ }, "type": { "type": "string", - "enum": ["streamable_http"] + "enum": [ + "streamable_http" + ] }, "uri": { "type": "string" @@ -1259,7 +1376,11 @@ { "type": "object", "description": "Frontend-provided tools that will be called through the frontend", - "required": ["name", "tools", "type"], + "required": [ + "name", + "tools", + "type" + ], "properties": { "bundled": { "type": "boolean", @@ -1284,7 +1405,9 @@ }, "type": { "type": "string", - "enum": ["frontend"] + "enum": [ + "frontend" + ] } } } @@ -1301,7 +1424,9 @@ }, { "type": "object", - "required": ["enabled"], + "required": [ + "enabled" + ], "properties": { "enabled": { "type": "boolean" @@ -1312,7 +1437,11 @@ }, "ExtensionQuery": { "type": "object", - "required": ["name", "config", "enabled"], + "required": [ + "name", + "config", + "enabled" + ], "properties": { "config": { "$ref": "#/components/schemas/ExtensionConfig" @@ -1327,7 +1456,9 @@ }, "ExtensionResponse": { "type": "object", - "required": ["extensions"], + "required": [ + "extensions" + ], "properties": { "extensions": { "type": "array", @@ -1339,7 +1470,10 @@ }, "FrontendToolRequest": { "type": "object", - "required": ["id", "toolCall"], + "required": [ + "id", + "toolCall" + ], "properties": { "id": { "type": "string" @@ -1351,7 +1485,10 @@ }, "ImageContent": { "type": "object", - "required": ["data", "mimeType"], + "required": [ + "data", + "mimeType" + ], "properties": { "annotations": { "allOf": [ @@ -1388,7 +1525,9 @@ }, "KillJobResponse": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { "message": { "type": "string" @@ -1397,7 +1536,9 @@ }, "ListSchedulesResponse": { "type": "object", - "required": ["jobs"], + "required": [ + "jobs" + ], "properties": { "jobs": { "type": "array", @@ -1410,7 +1551,11 @@ "Message": { "type": "object", "description": "A message to or from an LLM", - "required": ["role", "created", "content"], + "required": [ + "role", + "created", + "content" + ], "properties": { "content": { "type": "array", @@ -1440,11 +1585,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] } } } @@ -1457,11 +1606,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["image"] + "enum": [ + "image" + ] } } } @@ -1474,11 +1627,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["toolRequest"] + "enum": [ + "toolRequest" + ] } } } @@ -1491,11 +1648,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["toolResponse"] + "enum": [ + "toolResponse" + ] } } } @@ -1508,11 +1669,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["toolConfirmationRequest"] + "enum": [ + "toolConfirmationRequest" + ] } } } @@ -1525,11 +1690,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["frontendToolRequest"] + "enum": [ + "frontendToolRequest" + ] } } } @@ -1542,11 +1711,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["thinking"] + "enum": [ + "thinking" + ] } } } @@ -1559,11 +1732,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["redactedThinking"] + "enum": [ + "redactedThinking" + ] } } } @@ -1576,11 +1753,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["contextLengthExceeded"] + "enum": [ + "contextLengthExceeded" + ] } } } @@ -1593,11 +1774,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["summarizationRequested"] + "enum": [ + "summarizationRequested" + ] } } } @@ -1612,7 +1797,10 @@ "ModelInfo": { "type": "object", "description": "Information about a model's capabilities", - "required": ["name", "context_limit"], + "required": [ + "name", + "context_limit" + ], "properties": { "context_limit": { "type": "integer", @@ -1639,12 +1827,20 @@ "format": "double", "description": "Cost per token for output (optional)", "nullable": true + }, + "supports_cache_control": { + "type": "boolean", + "description": "Whether this model supports cache control", + "nullable": true } } }, "PermissionConfirmationRequest": { "type": "object", - "required": ["id", "action"], + "required": [ + "id", + "action" + ], "properties": { "action": { "type": "string" @@ -1660,15 +1856,26 @@ "PermissionLevel": { "type": "string", "description": "Enum representing the possible permission levels for a tool.", - "enum": ["always_allow", "ask_before", "never_allow"] + "enum": [ + "always_allow", + "ask_before", + "never_allow" + ] }, "PrincipalType": { "type": "string", - "enum": ["Extension", "Tool"] + "enum": [ + "Extension", + "Tool" + ] }, "ProviderDetails": { "type": "object", - "required": ["name", "metadata", "is_configured"], + "required": [ + "name", + "metadata", + "is_configured" + ], "properties": { "is_configured": { "type": "boolean" @@ -1732,7 +1939,9 @@ }, "ProvidersResponse": { "type": "object", - "required": ["providers"], + "required": [ + "providers" + ], "properties": { "providers": { "type": "array", @@ -1744,7 +1953,9 @@ }, "RedactedThinkingContent": { "type": "object", - "required": ["data"], + "required": [ + "data" + ], "properties": { "data": { "type": "string" @@ -1755,7 +1966,10 @@ "oneOf": [ { "type": "object", - "required": ["uri", "text"], + "required": [ + "uri", + "text" + ], "properties": { "mime_type": { "type": "string", @@ -1771,7 +1985,10 @@ }, { "type": "object", - "required": ["uri", "blob"], + "required": [ + "uri", + "blob" + ], "properties": { "blob": { "type": "string" @@ -1799,7 +2016,9 @@ }, "RunNowResponse": { "type": "object", - "required": ["session_id"], + "required": [ + "session_id" + ], "properties": { "session_id": { "type": "string" @@ -1808,7 +2027,11 @@ }, "ScheduledJob": { "type": "object", - "required": ["id", "source", "cron"], + "required": [ + "id", + "source", + "cron" + ], "properties": { "cron": { "type": "string" @@ -1847,7 +2070,13 @@ }, "SessionDisplayInfo": { "type": "object", - "required": ["id", "name", "createdAt", "workingDir", "messageCount"], + "required": [ + "id", + "name", + "createdAt", + "workingDir", + "messageCount" + ], "properties": { "accumulatedInputTokens": { "type": "integer", @@ -1903,7 +2132,11 @@ }, "SessionHistoryResponse": { "type": "object", - "required": ["sessionId", "metadata", "messages"], + "required": [ + "sessionId", + "metadata", + "messages" + ], "properties": { "messages": { "type": "array", @@ -1923,7 +2156,12 @@ }, "SessionInfo": { "type": "object", - "required": ["id", "path", "modified", "metadata"], + "required": [ + "id", + "path", + "modified", + "metadata" + ], "properties": { "id": { "type": "string" @@ -1941,7 +2179,9 @@ }, "SessionListResponse": { "type": "object", - "required": ["sessions"], + "required": [ + "sessions" + ], "properties": { "sessions": { "type": "array", @@ -1955,7 +2195,11 @@ "SessionMetadata": { "type": "object", "description": "Metadata for a session, stored as the first line in the session file", - "required": ["working_dir", "description", "message_count"], + "required": [ + "working_dir", + "description", + "message_count" + ], "properties": { "accumulated_input_tokens": { "type": "integer", @@ -2031,7 +2275,9 @@ }, "SummarizationRequested": { "type": "object", - "required": ["msg"], + "required": [ + "msg" + ], "properties": { "msg": { "type": "string" @@ -2040,7 +2286,9 @@ }, "TextContent": { "type": "object", - "required": ["text"], + "required": [ + "text" + ], "properties": { "annotations": { "allOf": [ @@ -2056,7 +2304,10 @@ }, "ThinkingContent": { "type": "object", - "required": ["thinking", "signature"], + "required": [ + "thinking", + "signature" + ], "properties": { "signature": { "type": "string" @@ -2069,7 +2320,11 @@ "Tool": { "type": "object", "description": "A tool that can be used by a model.", - "required": ["name", "description", "inputSchema"], + "required": [ + "name", + "description", + "inputSchema" + ], "properties": { "annotations": { "allOf": [ @@ -2121,7 +2376,11 @@ }, "ToolConfirmationRequest": { "type": "object", - "required": ["id", "toolName", "arguments"], + "required": [ + "id", + "toolName", + "arguments" + ], "properties": { "arguments": {}, "id": { @@ -2139,7 +2398,11 @@ "ToolInfo": { "type": "object", "description": "Information about the tool used for building prompts", - "required": ["name", "description", "parameters"], + "required": [ + "name", + "description", + "parameters" + ], "properties": { "description": { "type": "string" @@ -2165,7 +2428,10 @@ }, "ToolPermission": { "type": "object", - "required": ["tool_name", "permission"], + "required": [ + "tool_name", + "permission" + ], "properties": { "permission": { "$ref": "#/components/schemas/PermissionLevel" @@ -2177,7 +2443,10 @@ }, "ToolRequest": { "type": "object", - "required": ["id", "toolCall"], + "required": [ + "id", + "toolCall" + ], "properties": { "id": { "type": "string" @@ -2189,7 +2458,10 @@ }, "ToolResponse": { "type": "object", - "required": ["id", "toolResult"], + "required": [ + "id", + "toolResult" + ], "properties": { "id": { "type": "string" @@ -2201,7 +2473,10 @@ }, "ToolResultSchema": { "type": "object", - "required": ["success", "data"], + "required": [ + "success", + "data" + ], "properties": { "data": { "type": "object" @@ -2223,7 +2498,9 @@ }, "UpdateScheduleRequest": { "type": "object", - "required": ["cron"], + "required": [ + "cron" + ], "properties": { "cron": { "type": "string" @@ -2232,7 +2509,11 @@ }, "UpsertConfigQuery": { "type": "object", - "required": ["key", "value", "is_secret"], + "required": [ + "key", + "value", + "is_secret" + ], "properties": { "is_secret": { "type": "boolean" @@ -2245,7 +2526,9 @@ }, "UpsertPermissionsQuery": { "type": "object", - "required": ["tool_permissions"], + "required": [ + "tool_permissions" + ], "properties": { "tool_permissions": { "type": "array", @@ -2257,4 +2540,4 @@ } } } -} +} \ No newline at end of file