From 9a40aecf3eb4e63f044dabe5331416dce7d49791 Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Tue, 26 May 2026 14:33:35 -0400 Subject: [PATCH] Convert extension/MCP endpoints from goose-server to ACP server --- crates/goose-server/src/openapi.rs | 11 - crates/goose-server/src/routes/agent.rs | 94 +----- .../src/routes/config_management.rs | 86 +---- crates/goose-server/src/routes/session.rs | 48 +-- ui/desktop/openapi.json | 302 ------------------ ui/desktop/src/acp/extensions.ts | 93 +++++- ui/desktop/src/api/index.ts | 4 +- ui/desktop/src/api/sdk.gen.ts | 35 +- ui/desktop/src/api/types.gen.ts | 206 ------------ ui/desktop/src/components/ConfigContext.tsx | 27 +- .../BottomMenuExtensionSelection.tsx | 23 +- .../settings/extensions/agent-api.ts | 13 +- 12 files changed, 119 insertions(+), 823 deletions(-) diff --git a/crates/goose-server/src/openapi.rs b/crates/goose-server/src/openapi.rs index 79d2301b87..3874b9cdd7 100644 --- a/crates/goose-server/src/openapi.rs +++ b/crates/goose-server/src/openapi.rs @@ -392,9 +392,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::config_management::upsert_config, super::routes::config_management::remove_config, super::routes::config_management::read_config, - super::routes::config_management::add_extension, - super::routes::config_management::remove_extension, - super::routes::config_management::get_extensions, super::routes::config_management::read_all_config, super::routes::config_management::providers, super::routes::config_management::get_provider_models, @@ -428,8 +425,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::agent::export_app, super::routes::agent::import_app, super::routes::agent::update_from_session, - super::routes::agent::agent_add_extension, - super::routes::agent::agent_remove_extension, super::routes::agent::update_agent_provider, super::routes::agent::update_session, super::routes::action_required::confirm_tool_action, @@ -449,7 +444,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::session::import_session_nostr, super::routes::session::update_session_user_recipe_values, super::routes::session::fork_session, - super::routes::session::get_session_extensions, super::routes::schedule::create_schedule, super::routes::schedule::list_schedules, super::routes::schedule::delete_schedule, @@ -491,8 +485,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::config_management::SlashCommandsResponse, super::routes::config_management::SlashCommand, super::routes::config_management::CommandType, - super::routes::config_management::ExtensionResponse, - super::routes::config_management::ExtensionQuery, super::routes::config_management::ToolPermission, super::routes::config_management::UpsertPermissionsQuery, super::routes::config_management::UpdateCustomProviderRequest, @@ -525,7 +517,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::session::UpdateSessionUserRecipeValuesResponse, super::routes::session::ForkRequest, super::routes::session::ForkResponse, - super::routes::session::SessionExtensionsResponse, Message, MessageContent, MessageMetadata, @@ -644,8 +635,6 @@ derive_utoipa!(IconTheme as IconThemeSchema); super::routes::agent::RestartAgentRequest, super::routes::agent::UpdateWorkingDirRequest, super::routes::agent::UpdateFromSessionRequest, - super::routes::agent::AddExtensionRequest, - super::routes::agent::RemoveExtensionRequest, super::routes::agent::ResumeAgentResponse, super::routes::agent::RestartAgentResponse, goose::agents::ExtensionLoadResult, diff --git a/crates/goose-server/src/routes/agent.rs b/crates/goose-server/src/routes/agent.rs index f69f8a3866..be5793f1bb 100644 --- a/crates/goose-server/src/routes/agent.rs +++ b/crates/goose-server/src/routes/agent.rs @@ -99,18 +99,6 @@ pub struct ResumeAgentRequest { load_model_and_extensions: bool, } -#[derive(Deserialize, utoipa::ToSchema)] -pub struct AddExtensionRequest { - session_id: String, - config: ExtensionConfig, -} - -#[derive(Deserialize, utoipa::ToSchema)] -pub struct RemoveExtensionRequest { - name: String, - session_id: String, -} - #[derive(Deserialize, utoipa::ToSchema)] pub struct SetContainerRequest { session_id: String, @@ -693,72 +681,6 @@ async fn update_session( Ok(()) } -#[utoipa::path( - post, - path = "/agent/add_extension", - request_body = AddExtensionRequest, - responses( - (status = 200, description = "Extension added", body = String), - (status = 401, description = "Unauthorized - invalid secret key"), - (status = 424, description = "Agent not initialized"), - (status = 500, description = "Internal server error") - ) -)] -async fn agent_add_extension( - State(state): State>, - Json(request): Json, -) -> Result { - #[cfg(feature = "telemetry")] - let extension_name = request.config.name(); - - let agent = state.get_agent(request.session_id.clone()).await?; - - agent - .add_extension(request.config, &request.session_id) - .await - .map_err(|e| { - #[cfg(feature = "telemetry")] - goose::posthog::emit_error( - "extension_add_failed", - &format!("{}: {}", extension_name, e), - ); - ErrorResponse::internal(format!("Failed to add extension: {}", e)) - })?; - - Ok(StatusCode::OK) -} - -#[utoipa::path( - post, - path = "/agent/remove_extension", - request_body = RemoveExtensionRequest, - responses( - (status = 200, description = "Extension removed", body = String), - (status = 401, description = "Unauthorized - invalid secret key"), - (status = 424, description = "Agent not initialized"), - (status = 500, description = "Internal server error") - ) -)] -async fn agent_remove_extension( - State(state): State>, - Json(request): Json, -) -> Result { - let agent = state.get_agent(request.session_id.clone()).await?; - - agent - .remove_extension(&request.name, &request.session_id) - .await - .map_err(|e| { - error!("Failed to remove extension: {}", e); - ErrorResponse { - message: format!("Failed to remove extension: {}", e), - status: StatusCode::INTERNAL_SERVER_ERROR, - } - })?; - - Ok(StatusCode::OK) -} - #[utoipa::path( post, path = "/agent/set_container", @@ -1358,8 +1280,6 @@ pub fn routes(state: Arc) -> Router { .route("/agent/update_provider", post(update_agent_provider)) .route("/agent/update_session", post(update_session)) .route("/agent/update_from_session", post(update_from_session)) - .route("/agent/add_extension", post(agent_add_extension)) - .route("/agent/remove_extension", post(agent_remove_extension)) .route("/agent/set_container", post(set_container)) .route("/agent/stop", post(stop_agent)) .with_state(state) @@ -1408,15 +1328,11 @@ mod tests { .await .unwrap(); - agent_add_extension( - State(state.clone()), - Json(AddExtensionRequest { - session_id: session.id.clone(), - config: frontend_extension(), - }), - ) - .await - .unwrap(); + let agent = state.get_agent(session.id.clone()).await.unwrap(); + agent + .add_extension(frontend_extension(), &session.id) + .await + .unwrap(); let Json(tools) = get_tools( State(state.clone()), diff --git a/crates/goose-server/src/routes/config_management.rs b/crates/goose-server/src/routes/config_management.rs index 69ed487d64..a31f079b5f 100644 --- a/crates/goose-server/src/routes/config_management.rs +++ b/crates/goose-server/src/routes/config_management.rs @@ -9,7 +9,6 @@ use axum::{ }; use goose::config::declarative_providers::LoadedProvider; use goose::config::paths::Paths; -use goose::config::ExtensionEntry; use goose::config::{Config, ConfigError}; use goose::custom_requests::SourceType; use goose::model::ModelConfig; @@ -22,7 +21,7 @@ use goose::providers::catalog::{ use goose::providers::create_with_default_model; use goose::providers::providers as get_providers; use goose::{ - agents::execute_commands, agents::ExtensionConfig, config::permission::PermissionLevel, + agents::execute_commands, config::permission::PermissionLevel, slash_commands::recipe_slash_command, }; use serde::{Deserialize, Serialize}; @@ -31,20 +30,6 @@ use serde_yaml; use std::{collections::HashMap, sync::Arc}; use utoipa::ToSchema; -#[derive(Serialize, ToSchema)] -pub struct ExtensionResponse { - pub extensions: Vec, - #[serde(default)] - pub warnings: Vec, -} - -#[derive(Deserialize, ToSchema)] -pub struct ExtensionQuery { - pub name: String, - pub config: ExtensionConfig, - pub enabled: bool, -} - #[derive(Deserialize, ToSchema)] pub struct UpsertConfigQuery { pub key: String, @@ -299,72 +284,6 @@ pub async fn read_config( Ok(Json(response_value)) } -#[utoipa::path( - get, - path = "/config/extensions", - responses( - (status = 200, description = "All extensions retrieved successfully", body = ExtensionResponse), - (status = 500, description = "Internal server error") - ) -)] -pub async fn get_extensions() -> Result, ErrorResponse> { - let extensions = goose::config::get_all_extensions() - .into_iter() - .filter(|ext| !goose::agents::extension_manager::is_hidden_extension(&ext.config.name())) - .collect(); - let warnings = goose::config::get_warnings(); - Ok(Json(ExtensionResponse { - extensions, - warnings, - })) -} - -#[utoipa::path( - post, - path = "/config/extensions", - request_body = ExtensionQuery, - responses( - (status = 200, description = "Extension added or updated successfully", body = String), - (status = 400, description = "Invalid request"), - (status = 422, description = "Could not serialize config.yaml"), - (status = 500, description = "Internal server error") - ) -)] -pub async fn add_extension( - Json(extension_query): Json, -) -> Result, ErrorResponse> { - let extensions = goose::config::get_all_extensions(); - let key = goose::config::extensions::name_to_key(&extension_query.name); - - let is_update = extensions.iter().any(|e| e.config.key() == key); - - goose::config::set_extension(ExtensionEntry { - enabled: extension_query.enabled, - config: extension_query.config, - }); - - if is_update { - Ok(Json(format!("Updated extension {}", extension_query.name))) - } else { - Ok(Json(format!("Added extension {}", extension_query.name))) - } -} - -#[utoipa::path( - delete, - path = "/config/extensions/{name}", - responses( - (status = 200, description = "Extension removed successfully", body = String), - (status = 404, description = "Extension not found"), - (status = 500, description = "Internal server error") - ) -)] -pub async fn remove_extension(Path(name): Path) -> Result, ErrorResponse> { - let key = goose::config::extensions::name_to_key(&name); - goose::config::remove_extension(&key); - Ok(Json(format!("Removed extension {}", name))) -} - #[utoipa::path( get, path = "/config", @@ -989,9 +908,6 @@ pub fn routes(state: Arc) -> Router { .route("/config/upsert", post(upsert_config)) .route("/config/remove", post(remove_config)) .route("/config/read", post(read_config)) - .route("/config/extensions", get(get_extensions)) - .route("/config/extensions", post(add_extension)) - .route("/config/extensions/{name}", delete(remove_extension)) .route("/config/providers", get(providers)) .route("/config/providers/{name}/models", get(get_provider_models)) .route( diff --git a/crates/goose-server/src/routes/session.rs b/crates/goose-server/src/routes/session.rs index 96bbc9590c..408e800591 100644 --- a/crates/goose-server/src/routes/session.rs +++ b/crates/goose-server/src/routes/session.rs @@ -9,12 +9,11 @@ use axum::{ routing::{delete, get, put}, Json, Router, }; -use goose::agents::ExtensionConfig; use goose::recipe::Recipe; #[cfg(feature = "nostr")] use goose::session::nostr_share; use goose::session::session_manager::{SessionInsights, SessionType}; -use goose::session::{EnabledExtensionsState, Session}; +use goose::session::Session; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::sync::Arc; @@ -570,47 +569,6 @@ async fn fork_session( })) } -#[derive(Serialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub struct SessionExtensionsResponse { - extensions: Vec, -} - -#[utoipa::path( - get, - path = "/sessions/{session_id}/extensions", - params( - ("session_id" = String, Path, description = "Unique identifier for the session") - ), - responses( - (status = 200, description = "Session extensions retrieved successfully", body = SessionExtensionsResponse), - (status = 401, description = "Unauthorized - Invalid or missing API key"), - (status = 404, description = "Session not found"), - (status = 500, description = "Internal server error") - ), - security( - ("api_key" = []) - ), - tag = "Session Management" -)] -async fn get_session_extensions( - State(state): State>, - Path(session_id): Path, -) -> Result, StatusCode> { - let session = state - .session_manager() - .get_session(&session_id, false) - .await - .map_err(|_| StatusCode::NOT_FOUND)?; - - let extensions = EnabledExtensionsState::extensions_or_default( - Some(&session.extension_data), - goose::config::Config::global(), - ); - - Ok(Json(SessionExtensionsResponse { extensions })) -} - pub fn routes(state: Arc) -> Router { Router::new() .route("/sessions", get(list_sessions)) @@ -637,10 +595,6 @@ pub fn routes(state: Arc) -> Router { put(update_session_user_recipe_values), ) .route("/sessions/{session_id}/fork", post(fork_session)) - .route( - "/sessions/{session_id}/extensions", - get(get_session_extensions), - ) .with_state(state) } #[derive(Deserialize, ToSchema)] diff --git a/ui/desktop/openapi.json b/ui/desktop/openapi.json index 7e2f3bcd32..31fa1d544f 100644 --- a/ui/desktop/openapi.json +++ b/ui/desktop/openapi.json @@ -47,45 +47,6 @@ } } }, - "/agent/add_extension": { - "post": { - "tags": [ - "super::routes::agent" - ], - "operationId": "agent_add_extension", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddExtensionRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Extension added", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized - invalid secret key" - }, - "424": { - "description": "Agent not initialized" - }, - "500": { - "description": "Internal server error" - } - } - } - }, "/agent/call_tool": { "post": { "tags": [ @@ -368,45 +329,6 @@ } } }, - "/agent/remove_extension": { - "post": { - "tags": [ - "super::routes::agent" - ], - "operationId": "agent_remove_extension", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RemoveExtensionRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Extension removed", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized - invalid secret key" - }, - "424": { - "description": "Agent not initialized" - }, - "500": { - "description": "Internal server error" - } - } - } - }, "/agent/restart": { "post": { "tags": [ @@ -977,102 +899,6 @@ } } }, - "/config/extensions": { - "get": { - "tags": [ - "super::routes::config_management" - ], - "operationId": "get_extensions", - "responses": { - "200": { - "description": "All extensions retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtensionResponse" - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - }, - "post": { - "tags": [ - "super::routes::config_management" - ], - "operationId": "add_extension", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtensionQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Extension added or updated successfully", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Invalid request" - }, - "422": { - "description": "Could not serialize config.yaml" - }, - "500": { - "description": "Internal server error" - } - } - } - }, - "/config/extensions/{name}": { - "delete": { - "tags": [ - "super::routes::config_management" - ], - "operationId": "remove_extension", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Extension removed successfully", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Extension not found" - }, - "500": { - "description": "Internal server error" - } - } - } - }, "/config/permissions": { "post": { "tags": [ @@ -3596,51 +3422,6 @@ ] } }, - "/sessions/{session_id}/extensions": { - "get": { - "tags": [ - "Session Management" - ], - "operationId": "get_session_extensions", - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Unique identifier for the session", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Session extensions retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionExtensionsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized - Invalid or missing API key" - }, - "404": { - "description": "Session not found" - }, - "500": { - "description": "Internal server error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, "/sessions/{session_id}/fork": { "post": { "tags": [ @@ -4118,21 +3899,6 @@ "propertyName": "actionType" } }, - "AddExtensionRequest": { - "type": "object", - "required": [ - "session_id", - "config" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/ExtensionConfig" - }, - "session_id": { - "type": "string" - } - } - }, "Annotations": { "type": "object", "properties": { @@ -5425,45 +5191,6 @@ } } }, - "ExtensionQuery": { - "type": "object", - "required": [ - "name", - "config", - "enabled" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/ExtensionConfig" - }, - "enabled": { - "type": "boolean" - }, - "name": { - "type": "string" - } - } - }, - "ExtensionResponse": { - "type": "object", - "required": [ - "extensions" - ], - "properties": { - "extensions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExtensionEntry" - } - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "FeaturesResponse": { "type": "object", "required": [ @@ -7487,21 +7214,6 @@ } } }, - "RemoveExtensionRequest": { - "type": "object", - "required": [ - "name", - "session_id" - ], - "properties": { - "name": { - "type": "string" - }, - "session_id": { - "type": "string" - } - } - }, "RepoVariantsResponse": { "type": "object", "required": [ @@ -8156,20 +7868,6 @@ } } }, - "SessionExtensionsResponse": { - "type": "object", - "required": [ - "extensions" - ], - "properties": { - "extensions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExtensionConfig" - } - } - } - }, "SessionInsights": { "type": "object", "required": [ diff --git a/ui/desktop/src/acp/extensions.ts b/ui/desktop/src/acp/extensions.ts index 4edcff17c5..4825c4b09f 100644 --- a/ui/desktop/src/acp/extensions.ts +++ b/ui/desktop/src/acp/extensions.ts @@ -1,11 +1,96 @@ -import type { ExtensionResponse, ExtensionEntry } from '../api'; +import type { ExtensionEntry, ExtensionConfig } from '../api'; import { getAcpClient } from './acpConnection'; +import { nameToKey } from '../components/settings/extensions/utils'; -export async function getConfiguredExtensions(): Promise { +export interface ConfiguredExtensionsResponse { + extensions: ExtensionEntry[]; + warnings: string[]; +} + +/** + * Fetch all configured extensions via ACP (`_goose/config/extensions`). + */ +export async function getConfiguredExtensions(): Promise { const client = await getAcpClient(); - const response = await client.goose.configExtensionsList_unstable({}); + const response = await client.goose.GooseConfigExtensions({}); return { extensions: response.extensions as ExtensionEntry[], - warnings: response.warnings, + warnings: response.warnings ?? [], }; } + +/** + * Add (or update) an extension in the user's global goose config via ACP + * (`_goose/config/extensions/add`). + */ +export async function addConfiguredExtension( + name: string, + config: ExtensionConfig, + enabled: boolean +): Promise { + const client = await getAcpClient(); + // Server expects a JSON object matching one of the ExtensionConfig variants, + // and injects `name` itself. We strip `name` from the body to match that shape. + const extensionConfig = { ...config } as Record; + delete extensionConfig.name; + + await client.goose.GooseConfigExtensionsAdd({ + name, + extensionConfig, + enabled, + }); +} + +/** + * Remove an extension from the user's global goose config via ACP + * (`_goose/config/extensions/remove`). The server identifies the entry by + * `configKey`, which is derived from the extension name. + */ +export async function removeConfiguredExtension(name: string): Promise { + const client = await getAcpClient(); + await client.goose.GooseConfigExtensionsRemove({ + configKey: nameToKey(name), + }); +} + +/** + * Add an extension to a running session's agent via ACP + * (`_goose/extensions/add`). + */ +export async function addSessionExtension( + sessionId: string, + config: ExtensionConfig +): Promise { + const client = await getAcpClient(); + await client.goose.GooseExtensionsAdd({ + sessionId, + config, + }); +} + +/** + * Remove an extension from a running session's agent via ACP + * (`_goose/extensions/remove`). + */ +export async function removeSessionExtension( + sessionId: string, + name: string +): Promise { + const client = await getAcpClient(); + await client.goose.GooseExtensionsRemove({ + sessionId, + name, + }); +} + +/** + * Fetch the list of extensions associated with a given session via ACP + * (`_goose/session/extensions`). + */ +export async function getSessionExtensions( + sessionId: string +): Promise { + const client = await getAcpClient(); + const response = await client.goose.GooseSessionExtensions({ sessionId }); + return response.extensions as ExtensionEntry[]; +} diff --git a/ui/desktop/src/api/index.ts b/ui/desktop/src/api/index.ts index d42bc29fc7..13a76d3fd9 100644 --- a/ui/desktop/src/api/index.ts +++ b/ui/desktop/src/api/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { addExtension, agentAddExtension, agentRemoveExtension, callTool, cancelDownload, cancelLocalModelDownload, checkProvider, cleanupProviderCache, configureProviderOauth, confirmToolAction, createCustomProvider, createRecipe, createSchedule, decodeRecipe, deleteLocalModel, deleteModel, deleteRecipe, deleteSchedule, deleteSession, diagnostics, downloadHfModel, downloadModel, encodeRecipe, exportApp, exportSession, forkSession, getCanonicalModelInfo, getCustomProvider, getDictationConfig, getDownloadProgress, getExtensions, getFeatures, getLocalModelDownloadProgress, getModelSettings, getPrompt, getPrompts, getProviderCatalog, getProviderCatalogTemplate, getProviderModelInfo, getProviderModels, getRepoFiles, getSession, getSessionExtensions, getSessionInsights, getSlashCommands, getTools, getTunnelStatus, importApp, importSession, importSessionNostr, inspectRunningJob, killRunningJob, listApps, listLocalModels, listModels, listRecipes, listSchedules, listSessions, mcpUiProxy, type Options, parseRecipe, pauseSchedule, providers, readAllConfig, readConfig, readResource, recipeToYaml, removeConfig, removeCustomProvider, removeExtension, reply, resetPrompt, restartAgent, resumeAgent, runNowHandler, savePrompt, saveRecipe, scanRecipe, scheduleRecipe, searchHfModels, searchSessions, sendTelemetryEvent, sessionCancel, sessionEvents, sessionReply, sessionsHandler, setConfigProvider, setRecipeSlashCommand, shareSessionNostr, startAgent, startNanogptSetup, startOpenrouterSetup, startTetrateSetup, startTunnel, status, stopAgent, stopTunnel, syncFeaturedModels, systemInfo, transcribeDictation, unpauseSchedule, updateAgentProvider, updateCustomProvider, updateFromSession, updateModelSettings, updateSchedule, updateSession, updateSessionName, updateSessionUserRecipeValues, updateWorkingDir, upsertConfig, upsertPermissions, validateConfig } from './sdk.gen'; -export type { ActionRequired, ActionRequiredData, AddExtensionData, AddExtensionErrors, AddExtensionRequest, AddExtensionResponse, AddExtensionResponses, AgentAddExtensionData, AgentAddExtensionErrors, AgentAddExtensionResponse, AgentAddExtensionResponses, AgentRemoveExtensionData, AgentRemoveExtensionErrors, AgentRemoveExtensionResponse, AgentRemoveExtensionResponses, Annotations, Author, AuthorRequest, CallToolData, CallToolError, CallToolErrors, CallToolRequest, CallToolResponse, CallToolResponse2, CallToolResponses, CancelDownloadData, CancelDownloadErrors, CancelDownloadResponses, CancelLocalModelDownloadData, CancelLocalModelDownloadErrors, CancelLocalModelDownloadResponses, CancelRequest, ChatRequest, CheckProviderData, CheckProviderRequest, CleanupProviderCacheData, CleanupProviderCacheErrors, CleanupProviderCacheResponse, CleanupProviderCacheResponses, ClientOptions, CommandType, ConfigKey, ConfigKeyQuery, ConfigResponse, ConfigureProviderOauthData, ConfigureProviderOauthErrors, ConfigureProviderOauthResponses, ConfirmToolActionData, ConfirmToolActionErrors, ConfirmToolActionRequest, ConfirmToolActionResponses, Content, ContentBlock, Conversation, CreateCustomProviderData, CreateCustomProviderErrors, CreateCustomProviderResponse, CreateCustomProviderResponse2, CreateCustomProviderResponses, CreateRecipeData, CreateRecipeErrors, CreateRecipeRequest, CreateRecipeResponse, CreateRecipeResponse2, CreateRecipeResponses, CreateScheduleData, CreateScheduleErrors, CreateScheduleRequest, CreateScheduleResponse, CreateScheduleResponses, CspMetadata, DeclarativeProviderConfig, DecodeRecipeData, DecodeRecipeErrors, DecodeRecipeRequest, DecodeRecipeResponse, DecodeRecipeResponse2, DecodeRecipeResponses, DeleteLocalModelData, DeleteLocalModelErrors, DeleteLocalModelResponses, DeleteModelData, DeleteModelErrors, DeleteModelResponses, DeleteRecipeData, DeleteRecipeErrors, DeleteRecipeRequest, DeleteRecipeResponse, DeleteRecipeResponses, DeleteScheduleData, DeleteScheduleErrors, DeleteScheduleResponse, DeleteScheduleResponses, DeleteSessionData, DeleteSessionErrors, DeleteSessionResponses, DiagnosticsData, DiagnosticsErrors, DiagnosticsResponse, DiagnosticsResponses, DictationProvider, DictationProviderStatus, DownloadHfModelData, DownloadHfModelErrors, DownloadHfModelResponse, DownloadHfModelResponses, DownloadModelData, DownloadModelErrors, DownloadModelRequest, DownloadModelResponses, DownloadProgress, DownloadStatus, EmbeddedResource, EncodeRecipeData, EncodeRecipeErrors, EncodeRecipeRequest, EncodeRecipeResponse, EncodeRecipeResponse2, EncodeRecipeResponses, Envs, EnvVarConfig, ErrorResponse, ExportAppData, ExportAppError, ExportAppErrors, ExportAppResponse, ExportAppResponses, ExportSessionData, ExportSessionErrors, ExportSessionResponse, ExportSessionResponses, ExtensionConfig, ExtensionData, ExtensionEntry, ExtensionLoadResult, ExtensionQuery, ExtensionResponse, FeaturesResponse, ForkRequest, ForkResponse, ForkSessionData, ForkSessionErrors, ForkSessionResponse, ForkSessionResponses, FrontendToolRequest, GetCanonicalModelInfoData, GetCanonicalModelInfoResponse, GetCanonicalModelInfoResponses, GetCustomProviderData, GetCustomProviderErrors, GetCustomProviderResponse, GetCustomProviderResponses, GetDictationConfigData, GetDictationConfigResponse, GetDictationConfigResponses, GetDownloadProgressData, GetDownloadProgressErrors, GetDownloadProgressResponse, GetDownloadProgressResponses, GetExtensionsData, GetExtensionsErrors, GetExtensionsResponse, GetExtensionsResponses, GetFeaturesData, GetFeaturesResponse, GetFeaturesResponses, GetLocalModelDownloadProgressData, GetLocalModelDownloadProgressErrors, GetLocalModelDownloadProgressResponse, GetLocalModelDownloadProgressResponses, GetModelSettingsData, GetModelSettingsErrors, GetModelSettingsResponse, GetModelSettingsResponses, GetPromptData, GetPromptErrors, GetPromptResponse, GetPromptResponses, GetPromptsData, GetPromptsResponse, GetPromptsResponses, GetProviderCatalogData, GetProviderCatalogErrors, GetProviderCatalogResponse, GetProviderCatalogResponses, GetProviderCatalogTemplateData, GetProviderCatalogTemplateErrors, GetProviderCatalogTemplateResponse, GetProviderCatalogTemplateResponses, GetProviderModelInfoData, GetProviderModelInfoErrors, GetProviderModelInfoResponse, GetProviderModelInfoResponses, GetProviderModelsData, GetProviderModelsErrors, GetProviderModelsResponse, GetProviderModelsResponses, GetRepoFilesData, GetRepoFilesResponse, GetRepoFilesResponses, GetSessionData, GetSessionErrors, GetSessionExtensionsData, GetSessionExtensionsErrors, GetSessionExtensionsResponse, GetSessionExtensionsResponses, GetSessionInsightsData, GetSessionInsightsErrors, GetSessionInsightsResponse, GetSessionInsightsResponses, GetSessionResponse, GetSessionResponses, GetSlashCommandsData, GetSlashCommandsResponse, GetSlashCommandsResponses, GetToolsData, GetToolsErrors, GetToolsQuery, GetToolsResponse, GetToolsResponses, GetTunnelStatusData, GetTunnelStatusResponse, GetTunnelStatusResponses, GooseApp, GooseMode, HfGgufFile, HfModelInfo, HfQuantVariant, Icon, IconTheme, ImageContent, ImportAppData, ImportAppError, ImportAppErrors, ImportAppRequest, ImportAppResponse, ImportAppResponse2, ImportAppResponses, ImportSessionData, ImportSessionErrors, ImportSessionNostrData, ImportSessionNostrErrors, ImportSessionNostrRequest, ImportSessionNostrResponse, ImportSessionNostrResponses, ImportSessionRequest, ImportSessionResponse, ImportSessionResponses, InferenceMetadata, InspectJobResponse, InspectRunningJobData, InspectRunningJobErrors, InspectRunningJobResponse, InspectRunningJobResponses, JsonObject, KillJobResponse, KillRunningJobData, KillRunningJobResponses, ListAppsData, ListAppsError, ListAppsErrors, ListAppsRequest, ListAppsResponse, ListAppsResponse2, ListAppsResponses, ListLocalModelsData, ListLocalModelsResponse, ListLocalModelsResponses, ListModelsData, ListModelsResponse, ListModelsResponses, ListRecipeResponse, ListRecipesData, ListRecipesErrors, ListRecipesResponse, ListRecipesResponses, ListSchedulesData, ListSchedulesErrors, ListSchedulesResponse, ListSchedulesResponse2, ListSchedulesResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, LoadedProvider, LocalModelResponse, McpAppResource, McpUiProxyData, McpUiProxyErrors, McpUiProxyResponses, Message, MessageContent, MessageEvent, MessageMetadata, ModelCapabilities, ModelConfig, ModelDownloadStatus, ModelInfo, ModelInfoData, ModelInfoQuery, ModelInfoResponse, ModelSettings, ModelTemplate, ParseRecipeData, ParseRecipeError, ParseRecipeErrors, ParseRecipeRequest, ParseRecipeResponse, ParseRecipeResponse2, ParseRecipeResponses, PauseScheduleData, PauseScheduleErrors, PauseScheduleResponse, PauseScheduleResponses, Permission, PermissionLevel, PermissionsMetadata, PrincipalType, PromptContentResponse, PromptsListResponse, ProviderCatalogEntry, ProviderDetails, ProviderEngine, ProviderMetadata, ProviderModelInfoQuery, ProvidersData, ProvidersResponse, ProvidersResponse2, ProvidersResponses, ProviderTemplate, ProviderType, RawAudioContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent, ReadAllConfigData, ReadAllConfigResponse, ReadAllConfigResponses, ReadConfigData, ReadConfigErrors, ReadConfigResponses, ReadResourceData, ReadResourceErrors, ReadResourceRequest, ReadResourceResponse, ReadResourceResponse2, ReadResourceResponses, Recipe, RecipeManifest, RecipeParameter, RecipeParameterInputType, RecipeParameterRequirement, RecipeToYamlData, RecipeToYamlError, RecipeToYamlErrors, RecipeToYamlRequest, RecipeToYamlResponse, RecipeToYamlResponse2, RecipeToYamlResponses, RedactedThinkingContent, RemoveConfigData, RemoveConfigErrors, RemoveConfigResponse, RemoveConfigResponses, RemoveCustomProviderData, RemoveCustomProviderErrors, RemoveCustomProviderResponse, RemoveCustomProviderResponses, RemoveExtensionData, RemoveExtensionErrors, RemoveExtensionRequest, RemoveExtensionResponse, RemoveExtensionResponses, ReplyData, ReplyErrors, ReplyResponse, ReplyResponses, RepoVariantsResponse, ResetPromptData, ResetPromptErrors, ResetPromptResponse, ResetPromptResponses, ResourceContents, ResourceMetadata, Response, RestartAgentData, RestartAgentErrors, RestartAgentRequest, RestartAgentResponse, RestartAgentResponse2, RestartAgentResponses, ResumeAgentData, ResumeAgentErrors, ResumeAgentRequest, ResumeAgentResponse, ResumeAgentResponse2, ResumeAgentResponses, RetryConfig, Role, RunNowHandlerData, RunNowHandlerErrors, RunNowHandlerResponse, RunNowHandlerResponses, RunNowResponse, SamplingConfig, SavePromptData, SavePromptErrors, SavePromptRequest, SavePromptResponse, SavePromptResponses, SaveRecipeData, SaveRecipeError, SaveRecipeErrors, SaveRecipeRequest, SaveRecipeResponse, SaveRecipeResponse2, SaveRecipeResponses, ScanRecipeData, ScanRecipeRequest, ScanRecipeResponse, ScanRecipeResponse2, ScanRecipeResponses, ScheduledJob, ScheduleRecipeData, ScheduleRecipeErrors, ScheduleRecipeRequest, ScheduleRecipeResponses, SearchHfModelsData, SearchHfModelsErrors, SearchHfModelsResponse, SearchHfModelsResponses, SearchSessionsData, SearchSessionsErrors, SearchSessionsResponse, SearchSessionsResponses, SendTelemetryEventData, SendTelemetryEventResponses, Session, SessionCancelData, SessionCancelResponses, SessionDisplayInfo, SessionEventsData, SessionEventsErrors, SessionEventsResponse, SessionEventsResponses, SessionExtensionsResponse, SessionInsights, SessionListResponse, SessionReplyData, SessionReplyErrors, SessionReplyRequest, SessionReplyResponse, SessionReplyResponse2, SessionReplyResponses, SessionsHandlerData, SessionsHandlerErrors, SessionsHandlerResponse, SessionsHandlerResponses, SessionsQuery, SessionType, SetConfigProviderData, SetProviderRequest, SetRecipeSlashCommandData, SetRecipeSlashCommandErrors, SetRecipeSlashCommandResponses, SetSlashCommandRequest, Settings, SetupResponse, ShareSessionNostrData, ShareSessionNostrErrors, ShareSessionNostrRequest, ShareSessionNostrResponse, ShareSessionNostrResponse2, ShareSessionNostrResponses, SlashCommand, SlashCommandsResponse, StartAgentData, StartAgentError, StartAgentErrors, StartAgentRequest, StartAgentResponse, StartAgentResponses, StartNanogptSetupData, StartNanogptSetupResponse, StartNanogptSetupResponses, StartOpenrouterSetupData, StartOpenrouterSetupResponse, StartOpenrouterSetupResponses, StartTetrateSetupData, StartTetrateSetupResponse, StartTetrateSetupResponses, StartTunnelData, StartTunnelError, StartTunnelErrors, StartTunnelResponse, StartTunnelResponses, StatusData, StatusResponse, StatusResponses, StopAgentData, StopAgentErrors, StopAgentRequest, StopAgentResponse, StopAgentResponses, StopTunnelData, StopTunnelError, StopTunnelErrors, StopTunnelResponses, SubRecipe, SuccessCheck, SyncFeaturedModelsData, SyncFeaturedModelsResponses, SystemInfo, SystemInfoData, SystemInfoResponse, SystemInfoResponses, SystemNotificationContent, SystemNotificationType, TaskSupport, TelemetryEventRequest, Template, TextContent, ThinkingContent, ThinkingEffort, TokenState, Tool, ToolAnnotations, ToolConfirmationRequest, ToolExecution, ToolInfo, ToolPermission, ToolRequest, ToolResponse, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeRequest, TranscribeResponse, TunnelInfo, TunnelState, UiMetadata, UnpauseScheduleData, UnpauseScheduleErrors, UnpauseScheduleResponse, UnpauseScheduleResponses, UpdateAgentProviderData, UpdateAgentProviderErrors, UpdateAgentProviderResponses, UpdateCustomProviderData, UpdateCustomProviderErrors, UpdateCustomProviderRequest, UpdateCustomProviderResponse, UpdateCustomProviderResponses, UpdateFromSessionData, UpdateFromSessionErrors, UpdateFromSessionRequest, UpdateFromSessionResponses, UpdateModelSettingsData, UpdateModelSettingsErrors, UpdateModelSettingsResponse, UpdateModelSettingsResponses, UpdateProviderRequest, UpdateScheduleData, UpdateScheduleErrors, UpdateScheduleRequest, UpdateScheduleResponse, UpdateScheduleResponses, UpdateSessionData, UpdateSessionErrors, UpdateSessionNameData, UpdateSessionNameErrors, UpdateSessionNameRequest, UpdateSessionNameResponses, UpdateSessionRequest, UpdateSessionResponses, UpdateSessionUserRecipeValuesData, UpdateSessionUserRecipeValuesError, UpdateSessionUserRecipeValuesErrors, UpdateSessionUserRecipeValuesRequest, UpdateSessionUserRecipeValuesResponse, UpdateSessionUserRecipeValuesResponse2, UpdateSessionUserRecipeValuesResponses, UpdateWorkingDirData, UpdateWorkingDirErrors, UpdateWorkingDirRequest, UpdateWorkingDirResponses, UpsertConfigData, UpsertConfigErrors, UpsertConfigQuery, UpsertConfigResponse, UpsertConfigResponses, UpsertPermissionsData, UpsertPermissionsErrors, UpsertPermissionsQuery, UpsertPermissionsResponse, UpsertPermissionsResponses, ValidateConfigData, ValidateConfigErrors, ValidateConfigResponse, ValidateConfigResponses, WhisperModelResponse, WindowProps } from './types.gen'; +export { callTool, cancelDownload, cancelLocalModelDownload, checkProvider, cleanupProviderCache, configureProviderOauth, confirmToolAction, createCustomProvider, createRecipe, createSchedule, decodeRecipe, deleteLocalModel, deleteModel, deleteRecipe, deleteSchedule, deleteSession, diagnostics, downloadHfModel, downloadModel, encodeRecipe, exportApp, exportSession, forkSession, getCanonicalModelInfo, getCustomProvider, getDictationConfig, getDownloadProgress, getFeatures, getLocalModelDownloadProgress, getModelSettings, getPrompt, getPrompts, getProviderCatalog, getProviderCatalogTemplate, getProviderModelInfo, getProviderModels, getRepoFiles, getSession, getSessionInsights, getSlashCommands, getTools, getTunnelStatus, importApp, importSession, importSessionNostr, inspectRunningJob, killRunningJob, listApps, listLocalModels, listModels, listRecipes, listSchedules, listSessions, mcpUiProxy, type Options, parseRecipe, pauseSchedule, providers, readAllConfig, readConfig, readResource, recipeToYaml, removeConfig, removeCustomProvider, reply, resetPrompt, restartAgent, resumeAgent, runNowHandler, savePrompt, saveRecipe, scanRecipe, scheduleRecipe, searchHfModels, searchSessions, sendTelemetryEvent, sessionCancel, sessionEvents, sessionReply, sessionsHandler, setConfigProvider, setRecipeSlashCommand, shareSessionNostr, startAgent, startNanogptSetup, startOpenrouterSetup, startTetrateSetup, startTunnel, status, stopAgent, stopTunnel, syncFeaturedModels, systemInfo, transcribeDictation, unpauseSchedule, updateAgentProvider, updateCustomProvider, updateFromSession, updateModelSettings, updateSchedule, updateSession, updateSessionName, updateSessionUserRecipeValues, updateWorkingDir, upsertConfig, upsertPermissions, validateConfig } from './sdk.gen'; +export type { ActionRequired, ActionRequiredData, Annotations, Author, AuthorRequest, CallToolData, CallToolError, CallToolErrors, CallToolRequest, CallToolResponse, CallToolResponse2, CallToolResponses, CancelDownloadData, CancelDownloadErrors, CancelDownloadResponses, CancelLocalModelDownloadData, CancelLocalModelDownloadErrors, CancelLocalModelDownloadResponses, CancelRequest, ChatRequest, CheckProviderData, CheckProviderRequest, CleanupProviderCacheData, CleanupProviderCacheErrors, CleanupProviderCacheResponse, CleanupProviderCacheResponses, ClientOptions, CommandType, ConfigKey, ConfigKeyQuery, ConfigResponse, ConfigureProviderOauthData, ConfigureProviderOauthErrors, ConfigureProviderOauthResponses, ConfirmToolActionData, ConfirmToolActionErrors, ConfirmToolActionRequest, ConfirmToolActionResponses, Content, ContentBlock, Conversation, CreateCustomProviderData, CreateCustomProviderErrors, CreateCustomProviderResponse, CreateCustomProviderResponse2, CreateCustomProviderResponses, CreateRecipeData, CreateRecipeErrors, CreateRecipeRequest, CreateRecipeResponse, CreateRecipeResponse2, CreateRecipeResponses, CreateScheduleData, CreateScheduleErrors, CreateScheduleRequest, CreateScheduleResponse, CreateScheduleResponses, CspMetadata, DeclarativeProviderConfig, DecodeRecipeData, DecodeRecipeErrors, DecodeRecipeRequest, DecodeRecipeResponse, DecodeRecipeResponse2, DecodeRecipeResponses, DeleteLocalModelData, DeleteLocalModelErrors, DeleteLocalModelResponses, DeleteModelData, DeleteModelErrors, DeleteModelResponses, DeleteRecipeData, DeleteRecipeErrors, DeleteRecipeRequest, DeleteRecipeResponse, DeleteRecipeResponses, DeleteScheduleData, DeleteScheduleErrors, DeleteScheduleResponse, DeleteScheduleResponses, DeleteSessionData, DeleteSessionErrors, DeleteSessionResponses, DiagnosticsData, DiagnosticsErrors, DiagnosticsResponse, DiagnosticsResponses, DictationProvider, DictationProviderStatus, DownloadHfModelData, DownloadHfModelErrors, DownloadHfModelResponse, DownloadHfModelResponses, DownloadModelData, DownloadModelErrors, DownloadModelRequest, DownloadModelResponses, DownloadProgress, DownloadStatus, EmbeddedResource, EncodeRecipeData, EncodeRecipeErrors, EncodeRecipeRequest, EncodeRecipeResponse, EncodeRecipeResponse2, EncodeRecipeResponses, Envs, EnvVarConfig, ErrorResponse, ExportAppData, ExportAppError, ExportAppErrors, ExportAppResponse, ExportAppResponses, ExportSessionData, ExportSessionErrors, ExportSessionResponse, ExportSessionResponses, ExtensionConfig, ExtensionData, ExtensionEntry, ExtensionLoadResult, FeaturesResponse, ForkRequest, ForkResponse, ForkSessionData, ForkSessionErrors, ForkSessionResponse, ForkSessionResponses, FrontendToolRequest, GetCanonicalModelInfoData, GetCanonicalModelInfoResponse, GetCanonicalModelInfoResponses, GetCustomProviderData, GetCustomProviderErrors, GetCustomProviderResponse, GetCustomProviderResponses, GetDictationConfigData, GetDictationConfigResponse, GetDictationConfigResponses, GetDownloadProgressData, GetDownloadProgressErrors, GetDownloadProgressResponse, GetDownloadProgressResponses, GetFeaturesData, GetFeaturesResponse, GetFeaturesResponses, GetLocalModelDownloadProgressData, GetLocalModelDownloadProgressErrors, GetLocalModelDownloadProgressResponse, GetLocalModelDownloadProgressResponses, GetModelSettingsData, GetModelSettingsErrors, GetModelSettingsResponse, GetModelSettingsResponses, GetPromptData, GetPromptErrors, GetPromptResponse, GetPromptResponses, GetPromptsData, GetPromptsResponse, GetPromptsResponses, GetProviderCatalogData, GetProviderCatalogErrors, GetProviderCatalogResponse, GetProviderCatalogResponses, GetProviderCatalogTemplateData, GetProviderCatalogTemplateErrors, GetProviderCatalogTemplateResponse, GetProviderCatalogTemplateResponses, GetProviderModelInfoData, GetProviderModelInfoErrors, GetProviderModelInfoResponse, GetProviderModelInfoResponses, GetProviderModelsData, GetProviderModelsErrors, GetProviderModelsResponse, GetProviderModelsResponses, GetRepoFilesData, GetRepoFilesResponse, GetRepoFilesResponses, GetSessionData, GetSessionErrors, GetSessionInsightsData, GetSessionInsightsErrors, GetSessionInsightsResponse, GetSessionInsightsResponses, GetSessionResponse, GetSessionResponses, GetSlashCommandsData, GetSlashCommandsResponse, GetSlashCommandsResponses, GetToolsData, GetToolsErrors, GetToolsQuery, GetToolsResponse, GetToolsResponses, GetTunnelStatusData, GetTunnelStatusResponse, GetTunnelStatusResponses, GooseApp, GooseMode, HfGgufFile, HfModelInfo, HfQuantVariant, Icon, IconTheme, ImageContent, ImportAppData, ImportAppError, ImportAppErrors, ImportAppRequest, ImportAppResponse, ImportAppResponse2, ImportAppResponses, ImportSessionData, ImportSessionErrors, ImportSessionNostrData, ImportSessionNostrErrors, ImportSessionNostrRequest, ImportSessionNostrResponse, ImportSessionNostrResponses, ImportSessionRequest, ImportSessionResponse, ImportSessionResponses, InferenceMetadata, InspectJobResponse, InspectRunningJobData, InspectRunningJobErrors, InspectRunningJobResponse, InspectRunningJobResponses, JsonObject, KillJobResponse, KillRunningJobData, KillRunningJobResponses, ListAppsData, ListAppsError, ListAppsErrors, ListAppsRequest, ListAppsResponse, ListAppsResponse2, ListAppsResponses, ListLocalModelsData, ListLocalModelsResponse, ListLocalModelsResponses, ListModelsData, ListModelsResponse, ListModelsResponses, ListRecipeResponse, ListRecipesData, ListRecipesErrors, ListRecipesResponse, ListRecipesResponses, ListSchedulesData, ListSchedulesErrors, ListSchedulesResponse, ListSchedulesResponse2, ListSchedulesResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, LoadedProvider, LocalModelResponse, McpAppResource, McpUiProxyData, McpUiProxyErrors, McpUiProxyResponses, Message, MessageContent, MessageEvent, MessageMetadata, ModelCapabilities, ModelConfig, ModelDownloadStatus, ModelInfo, ModelInfoData, ModelInfoQuery, ModelInfoResponse, ModelSettings, ModelTemplate, ParseRecipeData, ParseRecipeError, ParseRecipeErrors, ParseRecipeRequest, ParseRecipeResponse, ParseRecipeResponse2, ParseRecipeResponses, PauseScheduleData, PauseScheduleErrors, PauseScheduleResponse, PauseScheduleResponses, Permission, PermissionLevel, PermissionsMetadata, PrincipalType, PromptContentResponse, PromptsListResponse, ProviderCatalogEntry, ProviderDetails, ProviderEngine, ProviderMetadata, ProviderModelInfoQuery, ProvidersData, ProvidersResponse, ProvidersResponse2, ProvidersResponses, ProviderTemplate, ProviderType, RawAudioContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent, ReadAllConfigData, ReadAllConfigResponse, ReadAllConfigResponses, ReadConfigData, ReadConfigErrors, ReadConfigResponses, ReadResourceData, ReadResourceErrors, ReadResourceRequest, ReadResourceResponse, ReadResourceResponse2, ReadResourceResponses, Recipe, RecipeManifest, RecipeParameter, RecipeParameterInputType, RecipeParameterRequirement, RecipeToYamlData, RecipeToYamlError, RecipeToYamlErrors, RecipeToYamlRequest, RecipeToYamlResponse, RecipeToYamlResponse2, RecipeToYamlResponses, RedactedThinkingContent, RemoveConfigData, RemoveConfigErrors, RemoveConfigResponse, RemoveConfigResponses, RemoveCustomProviderData, RemoveCustomProviderErrors, RemoveCustomProviderResponse, RemoveCustomProviderResponses, ReplyData, ReplyErrors, ReplyResponse, ReplyResponses, RepoVariantsResponse, ResetPromptData, ResetPromptErrors, ResetPromptResponse, ResetPromptResponses, ResourceContents, ResourceMetadata, Response, RestartAgentData, RestartAgentErrors, RestartAgentRequest, RestartAgentResponse, RestartAgentResponse2, RestartAgentResponses, ResumeAgentData, ResumeAgentErrors, ResumeAgentRequest, ResumeAgentResponse, ResumeAgentResponse2, ResumeAgentResponses, RetryConfig, Role, RunNowHandlerData, RunNowHandlerErrors, RunNowHandlerResponse, RunNowHandlerResponses, RunNowResponse, SamplingConfig, SavePromptData, SavePromptErrors, SavePromptRequest, SavePromptResponse, SavePromptResponses, SaveRecipeData, SaveRecipeError, SaveRecipeErrors, SaveRecipeRequest, SaveRecipeResponse, SaveRecipeResponse2, SaveRecipeResponses, ScanRecipeData, ScanRecipeRequest, ScanRecipeResponse, ScanRecipeResponse2, ScanRecipeResponses, ScheduledJob, ScheduleRecipeData, ScheduleRecipeErrors, ScheduleRecipeRequest, ScheduleRecipeResponses, SearchHfModelsData, SearchHfModelsErrors, SearchHfModelsResponse, SearchHfModelsResponses, SearchSessionsData, SearchSessionsErrors, SearchSessionsResponse, SearchSessionsResponses, SendTelemetryEventData, SendTelemetryEventResponses, Session, SessionCancelData, SessionCancelResponses, SessionDisplayInfo, SessionEventsData, SessionEventsErrors, SessionEventsResponse, SessionEventsResponses, SessionInsights, SessionListResponse, SessionReplyData, SessionReplyErrors, SessionReplyRequest, SessionReplyResponse, SessionReplyResponse2, SessionReplyResponses, SessionsHandlerData, SessionsHandlerErrors, SessionsHandlerResponse, SessionsHandlerResponses, SessionsQuery, SessionType, SetConfigProviderData, SetProviderRequest, SetRecipeSlashCommandData, SetRecipeSlashCommandErrors, SetRecipeSlashCommandResponses, SetSlashCommandRequest, Settings, SetupResponse, ShareSessionNostrData, ShareSessionNostrErrors, ShareSessionNostrRequest, ShareSessionNostrResponse, ShareSessionNostrResponse2, ShareSessionNostrResponses, SlashCommand, SlashCommandsResponse, StartAgentData, StartAgentError, StartAgentErrors, StartAgentRequest, StartAgentResponse, StartAgentResponses, StartNanogptSetupData, StartNanogptSetupResponse, StartNanogptSetupResponses, StartOpenrouterSetupData, StartOpenrouterSetupResponse, StartOpenrouterSetupResponses, StartTetrateSetupData, StartTetrateSetupResponse, StartTetrateSetupResponses, StartTunnelData, StartTunnelError, StartTunnelErrors, StartTunnelResponse, StartTunnelResponses, StatusData, StatusResponse, StatusResponses, StopAgentData, StopAgentErrors, StopAgentRequest, StopAgentResponse, StopAgentResponses, StopTunnelData, StopTunnelError, StopTunnelErrors, StopTunnelResponses, SubRecipe, SuccessCheck, SyncFeaturedModelsData, SyncFeaturedModelsResponses, SystemInfo, SystemInfoData, SystemInfoResponse, SystemInfoResponses, SystemNotificationContent, SystemNotificationType, TaskSupport, TelemetryEventRequest, Template, TextContent, ThinkingContent, ThinkingEffort, TokenState, Tool, ToolAnnotations, ToolConfirmationRequest, ToolExecution, ToolInfo, ToolPermission, ToolRequest, ToolResponse, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeRequest, TranscribeResponse, TunnelInfo, TunnelState, UiMetadata, UnpauseScheduleData, UnpauseScheduleErrors, UnpauseScheduleResponse, UnpauseScheduleResponses, UpdateAgentProviderData, UpdateAgentProviderErrors, UpdateAgentProviderResponses, UpdateCustomProviderData, UpdateCustomProviderErrors, UpdateCustomProviderRequest, UpdateCustomProviderResponse, UpdateCustomProviderResponses, UpdateFromSessionData, UpdateFromSessionErrors, UpdateFromSessionRequest, UpdateFromSessionResponses, UpdateModelSettingsData, UpdateModelSettingsErrors, UpdateModelSettingsResponse, UpdateModelSettingsResponses, UpdateProviderRequest, UpdateScheduleData, UpdateScheduleErrors, UpdateScheduleRequest, UpdateScheduleResponse, UpdateScheduleResponses, UpdateSessionData, UpdateSessionErrors, UpdateSessionNameData, UpdateSessionNameErrors, UpdateSessionNameRequest, UpdateSessionNameResponses, UpdateSessionRequest, UpdateSessionResponses, UpdateSessionUserRecipeValuesData, UpdateSessionUserRecipeValuesError, UpdateSessionUserRecipeValuesErrors, UpdateSessionUserRecipeValuesRequest, UpdateSessionUserRecipeValuesResponse, UpdateSessionUserRecipeValuesResponse2, UpdateSessionUserRecipeValuesResponses, UpdateWorkingDirData, UpdateWorkingDirErrors, UpdateWorkingDirRequest, UpdateWorkingDirResponses, UpsertConfigData, UpsertConfigErrors, UpsertConfigQuery, UpsertConfigResponse, UpsertConfigResponses, UpsertPermissionsData, UpsertPermissionsErrors, UpsertPermissionsQuery, UpsertPermissionsResponse, UpsertPermissionsResponses, ValidateConfigData, ValidateConfigErrors, ValidateConfigResponse, ValidateConfigResponses, WhisperModelResponse, WindowProps } from './types.gen'; diff --git a/ui/desktop/src/api/sdk.gen.ts b/ui/desktop/src/api/sdk.gen.ts index c98c916408..4fa05a439f 100644 --- a/ui/desktop/src/api/sdk.gen.ts +++ b/ui/desktop/src/api/sdk.gen.ts @@ -2,7 +2,7 @@ import type { Client, Options as Options2, TDataShape } from './client'; import { client } from './client.gen'; -import type { AddExtensionData, AddExtensionErrors, AddExtensionResponses, AgentAddExtensionData, AgentAddExtensionErrors, AgentAddExtensionResponses, AgentRemoveExtensionData, AgentRemoveExtensionErrors, AgentRemoveExtensionResponses, CallToolData, CallToolErrors, CallToolResponses, CancelDownloadData, CancelDownloadErrors, CancelDownloadResponses, CancelLocalModelDownloadData, CancelLocalModelDownloadErrors, CancelLocalModelDownloadResponses, CheckProviderData, CleanupProviderCacheData, CleanupProviderCacheErrors, CleanupProviderCacheResponses, ConfigureProviderOauthData, ConfigureProviderOauthErrors, ConfigureProviderOauthResponses, ConfirmToolActionData, ConfirmToolActionErrors, ConfirmToolActionResponses, CreateCustomProviderData, CreateCustomProviderErrors, CreateCustomProviderResponses, CreateRecipeData, CreateRecipeErrors, CreateRecipeResponses, CreateScheduleData, CreateScheduleErrors, CreateScheduleResponses, DecodeRecipeData, DecodeRecipeErrors, DecodeRecipeResponses, DeleteLocalModelData, DeleteLocalModelErrors, DeleteLocalModelResponses, DeleteModelData, DeleteModelErrors, DeleteModelResponses, DeleteRecipeData, DeleteRecipeErrors, DeleteRecipeResponses, DeleteScheduleData, DeleteScheduleErrors, DeleteScheduleResponses, DeleteSessionData, DeleteSessionErrors, DeleteSessionResponses, DiagnosticsData, DiagnosticsErrors, DiagnosticsResponses, DownloadHfModelData, DownloadHfModelErrors, DownloadHfModelResponses, DownloadModelData, DownloadModelErrors, DownloadModelResponses, EncodeRecipeData, EncodeRecipeErrors, EncodeRecipeResponses, ExportAppData, ExportAppErrors, ExportAppResponses, ExportSessionData, ExportSessionErrors, ExportSessionResponses, ForkSessionData, ForkSessionErrors, ForkSessionResponses, GetCanonicalModelInfoData, GetCanonicalModelInfoResponses, GetCustomProviderData, GetCustomProviderErrors, GetCustomProviderResponses, GetDictationConfigData, GetDictationConfigResponses, GetDownloadProgressData, GetDownloadProgressErrors, GetDownloadProgressResponses, GetExtensionsData, GetExtensionsErrors, GetExtensionsResponses, GetFeaturesData, GetFeaturesResponses, GetLocalModelDownloadProgressData, GetLocalModelDownloadProgressErrors, GetLocalModelDownloadProgressResponses, GetModelSettingsData, GetModelSettingsErrors, GetModelSettingsResponses, GetPromptData, GetPromptErrors, GetPromptResponses, GetPromptsData, GetPromptsResponses, GetProviderCatalogData, GetProviderCatalogErrors, GetProviderCatalogResponses, GetProviderCatalogTemplateData, GetProviderCatalogTemplateErrors, GetProviderCatalogTemplateResponses, GetProviderModelInfoData, GetProviderModelInfoErrors, GetProviderModelInfoResponses, GetProviderModelsData, GetProviderModelsErrors, GetProviderModelsResponses, GetRepoFilesData, GetRepoFilesResponses, GetSessionData, GetSessionErrors, GetSessionExtensionsData, GetSessionExtensionsErrors, GetSessionExtensionsResponses, GetSessionInsightsData, GetSessionInsightsErrors, GetSessionInsightsResponses, GetSessionResponses, GetSlashCommandsData, GetSlashCommandsResponses, GetToolsData, GetToolsErrors, GetToolsResponses, GetTunnelStatusData, GetTunnelStatusResponses, ImportAppData, ImportAppErrors, ImportAppResponses, ImportSessionData, ImportSessionErrors, ImportSessionNostrData, ImportSessionNostrErrors, ImportSessionNostrResponses, ImportSessionResponses, InspectRunningJobData, InspectRunningJobErrors, InspectRunningJobResponses, KillRunningJobData, KillRunningJobResponses, ListAppsData, ListAppsErrors, ListAppsResponses, ListLocalModelsData, ListLocalModelsResponses, ListModelsData, ListModelsResponses, ListRecipesData, ListRecipesErrors, ListRecipesResponses, ListSchedulesData, ListSchedulesErrors, ListSchedulesResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponses, McpUiProxyData, McpUiProxyErrors, McpUiProxyResponses, ParseRecipeData, ParseRecipeErrors, ParseRecipeResponses, PauseScheduleData, PauseScheduleErrors, PauseScheduleResponses, ProvidersData, ProvidersResponses, ReadAllConfigData, ReadAllConfigResponses, ReadConfigData, ReadConfigErrors, ReadConfigResponses, ReadResourceData, ReadResourceErrors, ReadResourceResponses, RecipeToYamlData, RecipeToYamlErrors, RecipeToYamlResponses, RemoveConfigData, RemoveConfigErrors, RemoveConfigResponses, RemoveCustomProviderData, RemoveCustomProviderErrors, RemoveCustomProviderResponses, RemoveExtensionData, RemoveExtensionErrors, RemoveExtensionResponses, ReplyData, ReplyErrors, ReplyResponses, ResetPromptData, ResetPromptErrors, ResetPromptResponses, RestartAgentData, RestartAgentErrors, RestartAgentResponses, ResumeAgentData, ResumeAgentErrors, ResumeAgentResponses, RunNowHandlerData, RunNowHandlerErrors, RunNowHandlerResponses, SavePromptData, SavePromptErrors, SavePromptResponses, SaveRecipeData, SaveRecipeErrors, SaveRecipeResponses, ScanRecipeData, ScanRecipeResponses, ScheduleRecipeData, ScheduleRecipeErrors, ScheduleRecipeResponses, SearchHfModelsData, SearchHfModelsErrors, SearchHfModelsResponses, SearchSessionsData, SearchSessionsErrors, SearchSessionsResponses, SendTelemetryEventData, SendTelemetryEventResponses, SessionCancelData, SessionCancelResponses, SessionEventsData, SessionEventsErrors, SessionEventsResponses, SessionReplyData, SessionReplyErrors, SessionReplyResponses, SessionsHandlerData, SessionsHandlerErrors, SessionsHandlerResponses, SetConfigProviderData, SetRecipeSlashCommandData, SetRecipeSlashCommandErrors, SetRecipeSlashCommandResponses, ShareSessionNostrData, ShareSessionNostrErrors, ShareSessionNostrResponses, StartAgentData, StartAgentErrors, StartAgentResponses, StartNanogptSetupData, StartNanogptSetupResponses, StartOpenrouterSetupData, StartOpenrouterSetupResponses, StartTetrateSetupData, StartTetrateSetupResponses, StartTunnelData, StartTunnelErrors, StartTunnelResponses, StatusData, StatusResponses, StopAgentData, StopAgentErrors, StopAgentResponses, StopTunnelData, StopTunnelErrors, StopTunnelResponses, SyncFeaturedModelsData, SyncFeaturedModelsResponses, SystemInfoData, SystemInfoResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, UnpauseScheduleData, UnpauseScheduleErrors, UnpauseScheduleResponses, UpdateAgentProviderData, UpdateAgentProviderErrors, UpdateAgentProviderResponses, UpdateCustomProviderData, UpdateCustomProviderErrors, UpdateCustomProviderResponses, UpdateFromSessionData, UpdateFromSessionErrors, UpdateFromSessionResponses, UpdateModelSettingsData, UpdateModelSettingsErrors, UpdateModelSettingsResponses, UpdateScheduleData, UpdateScheduleErrors, UpdateScheduleResponses, UpdateSessionData, UpdateSessionErrors, UpdateSessionNameData, UpdateSessionNameErrors, UpdateSessionNameResponses, UpdateSessionResponses, UpdateSessionUserRecipeValuesData, UpdateSessionUserRecipeValuesErrors, UpdateSessionUserRecipeValuesResponses, UpdateWorkingDirData, UpdateWorkingDirErrors, UpdateWorkingDirResponses, UpsertConfigData, UpsertConfigErrors, UpsertConfigResponses, UpsertPermissionsData, UpsertPermissionsErrors, UpsertPermissionsResponses, ValidateConfigData, ValidateConfigErrors, ValidateConfigResponses } from './types.gen'; +import type { CallToolData, CallToolErrors, CallToolResponses, CancelDownloadData, CancelDownloadErrors, CancelDownloadResponses, CancelLocalModelDownloadData, CancelLocalModelDownloadErrors, CancelLocalModelDownloadResponses, CheckProviderData, CleanupProviderCacheData, CleanupProviderCacheErrors, CleanupProviderCacheResponses, ConfigureProviderOauthData, ConfigureProviderOauthErrors, ConfigureProviderOauthResponses, ConfirmToolActionData, ConfirmToolActionErrors, ConfirmToolActionResponses, CreateCustomProviderData, CreateCustomProviderErrors, CreateCustomProviderResponses, CreateRecipeData, CreateRecipeErrors, CreateRecipeResponses, CreateScheduleData, CreateScheduleErrors, CreateScheduleResponses, DecodeRecipeData, DecodeRecipeErrors, DecodeRecipeResponses, DeleteLocalModelData, DeleteLocalModelErrors, DeleteLocalModelResponses, DeleteModelData, DeleteModelErrors, DeleteModelResponses, DeleteRecipeData, DeleteRecipeErrors, DeleteRecipeResponses, DeleteScheduleData, DeleteScheduleErrors, DeleteScheduleResponses, DeleteSessionData, DeleteSessionErrors, DeleteSessionResponses, DiagnosticsData, DiagnosticsErrors, DiagnosticsResponses, DownloadHfModelData, DownloadHfModelErrors, DownloadHfModelResponses, DownloadModelData, DownloadModelErrors, DownloadModelResponses, EncodeRecipeData, EncodeRecipeErrors, EncodeRecipeResponses, ExportAppData, ExportAppErrors, ExportAppResponses, ExportSessionData, ExportSessionErrors, ExportSessionResponses, ForkSessionData, ForkSessionErrors, ForkSessionResponses, GetCanonicalModelInfoData, GetCanonicalModelInfoResponses, GetCustomProviderData, GetCustomProviderErrors, GetCustomProviderResponses, GetDictationConfigData, GetDictationConfigResponses, GetDownloadProgressData, GetDownloadProgressErrors, GetDownloadProgressResponses, GetFeaturesData, GetFeaturesResponses, GetLocalModelDownloadProgressData, GetLocalModelDownloadProgressErrors, GetLocalModelDownloadProgressResponses, GetModelSettingsData, GetModelSettingsErrors, GetModelSettingsResponses, GetPromptData, GetPromptErrors, GetPromptResponses, GetPromptsData, GetPromptsResponses, GetProviderCatalogData, GetProviderCatalogErrors, GetProviderCatalogResponses, GetProviderCatalogTemplateData, GetProviderCatalogTemplateErrors, GetProviderCatalogTemplateResponses, GetProviderModelInfoData, GetProviderModelInfoErrors, GetProviderModelInfoResponses, GetProviderModelsData, GetProviderModelsErrors, GetProviderModelsResponses, GetRepoFilesData, GetRepoFilesResponses, GetSessionData, GetSessionErrors, GetSessionInsightsData, GetSessionInsightsErrors, GetSessionInsightsResponses, GetSessionResponses, GetSlashCommandsData, GetSlashCommandsResponses, GetToolsData, GetToolsErrors, GetToolsResponses, GetTunnelStatusData, GetTunnelStatusResponses, ImportAppData, ImportAppErrors, ImportAppResponses, ImportSessionData, ImportSessionErrors, ImportSessionNostrData, ImportSessionNostrErrors, ImportSessionNostrResponses, ImportSessionResponses, InspectRunningJobData, InspectRunningJobErrors, InspectRunningJobResponses, KillRunningJobData, KillRunningJobResponses, ListAppsData, ListAppsErrors, ListAppsResponses, ListLocalModelsData, ListLocalModelsResponses, ListModelsData, ListModelsResponses, ListRecipesData, ListRecipesErrors, ListRecipesResponses, ListSchedulesData, ListSchedulesErrors, ListSchedulesResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponses, McpUiProxyData, McpUiProxyErrors, McpUiProxyResponses, ParseRecipeData, ParseRecipeErrors, ParseRecipeResponses, PauseScheduleData, PauseScheduleErrors, PauseScheduleResponses, ProvidersData, ProvidersResponses, ReadAllConfigData, ReadAllConfigResponses, ReadConfigData, ReadConfigErrors, ReadConfigResponses, ReadResourceData, ReadResourceErrors, ReadResourceResponses, RecipeToYamlData, RecipeToYamlErrors, RecipeToYamlResponses, RemoveConfigData, RemoveConfigErrors, RemoveConfigResponses, RemoveCustomProviderData, RemoveCustomProviderErrors, RemoveCustomProviderResponses, ReplyData, ReplyErrors, ReplyResponses, ResetPromptData, ResetPromptErrors, ResetPromptResponses, RestartAgentData, RestartAgentErrors, RestartAgentResponses, ResumeAgentData, ResumeAgentErrors, ResumeAgentResponses, RunNowHandlerData, RunNowHandlerErrors, RunNowHandlerResponses, SavePromptData, SavePromptErrors, SavePromptResponses, SaveRecipeData, SaveRecipeErrors, SaveRecipeResponses, ScanRecipeData, ScanRecipeResponses, ScheduleRecipeData, ScheduleRecipeErrors, ScheduleRecipeResponses, SearchHfModelsData, SearchHfModelsErrors, SearchHfModelsResponses, SearchSessionsData, SearchSessionsErrors, SearchSessionsResponses, SendTelemetryEventData, SendTelemetryEventResponses, SessionCancelData, SessionCancelResponses, SessionEventsData, SessionEventsErrors, SessionEventsResponses, SessionReplyData, SessionReplyErrors, SessionReplyResponses, SessionsHandlerData, SessionsHandlerErrors, SessionsHandlerResponses, SetConfigProviderData, SetRecipeSlashCommandData, SetRecipeSlashCommandErrors, SetRecipeSlashCommandResponses, ShareSessionNostrData, ShareSessionNostrErrors, ShareSessionNostrResponses, StartAgentData, StartAgentErrors, StartAgentResponses, StartNanogptSetupData, StartNanogptSetupResponses, StartOpenrouterSetupData, StartOpenrouterSetupResponses, StartTetrateSetupData, StartTetrateSetupResponses, StartTunnelData, StartTunnelErrors, StartTunnelResponses, StatusData, StatusResponses, StopAgentData, StopAgentErrors, StopAgentResponses, StopTunnelData, StopTunnelErrors, StopTunnelResponses, SyncFeaturedModelsData, SyncFeaturedModelsResponses, SystemInfoData, SystemInfoResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, UnpauseScheduleData, UnpauseScheduleErrors, UnpauseScheduleResponses, UpdateAgentProviderData, UpdateAgentProviderErrors, UpdateAgentProviderResponses, UpdateCustomProviderData, UpdateCustomProviderErrors, UpdateCustomProviderResponses, UpdateFromSessionData, UpdateFromSessionErrors, UpdateFromSessionResponses, UpdateModelSettingsData, UpdateModelSettingsErrors, UpdateModelSettingsResponses, UpdateScheduleData, UpdateScheduleErrors, UpdateScheduleResponses, UpdateSessionData, UpdateSessionErrors, UpdateSessionNameData, UpdateSessionNameErrors, UpdateSessionNameResponses, UpdateSessionResponses, UpdateSessionUserRecipeValuesData, UpdateSessionUserRecipeValuesErrors, UpdateSessionUserRecipeValuesResponses, UpdateWorkingDirData, UpdateWorkingDirErrors, UpdateWorkingDirResponses, UpsertConfigData, UpsertConfigErrors, UpsertConfigResponses, UpsertPermissionsData, UpsertPermissionsErrors, UpsertPermissionsResponses, ValidateConfigData, ValidateConfigErrors, ValidateConfigResponses } from './types.gen'; export type Options = Options2 & { /** @@ -27,15 +27,6 @@ export const confirmToolAction = (options: } }); -export const agentAddExtension = (options: Options) => (options.client ?? client).post({ - url: '/agent/add_extension', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - export const callTool = (options: Options) => (options.client ?? client).post({ url: '/agent/call_tool', ...options, @@ -67,15 +58,6 @@ export const readResource = (options: Opti } }); -export const agentRemoveExtension = (options: Options) => (options.client ?? client).post({ - url: '/agent/remove_extension', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - export const restartAgent = (options: Options) => (options.client ?? client).post({ url: '/agent/restart', ...options, @@ -192,19 +174,6 @@ export const updateCustomProvider = (optio } }); -export const getExtensions = (options?: Options) => (options?.client ?? client).get({ url: '/config/extensions', ...options }); - -export const addExtension = (options: Options) => (options.client ?? client).post({ - url: '/config/extensions', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const removeExtension = (options: Options) => (options.client ?? client).delete({ url: '/config/extensions/{name}', ...options }); - export const upsertPermissions = (options: Options) => (options.client ?? client).post({ url: '/config/permissions', ...options, @@ -542,8 +511,6 @@ export const getSession = (options: Option export const exportSession = (options: Options) => (options.client ?? client).get({ url: '/sessions/{session_id}/export', ...options }); -export const getSessionExtensions = (options: Options) => (options.client ?? client).get({ url: '/sessions/{session_id}/extensions', ...options }); - export const forkSession = (options: Options) => (options.client ?? client).post({ url: '/sessions/{session_id}/fork', ...options, diff --git a/ui/desktop/src/api/types.gen.ts b/ui/desktop/src/api/types.gen.ts index b5535a239f..ad7ac3177e 100644 --- a/ui/desktop/src/api/types.gen.ts +++ b/ui/desktop/src/api/types.gen.ts @@ -25,11 +25,6 @@ export type ActionRequiredData = { user_data: unknown; }; -export type AddExtensionRequest = { - config: ExtensionConfig; - session_id: string; -}; - export type Annotations = { audience?: Array; lastModified?: string; @@ -483,17 +478,6 @@ export type ExtensionLoadResult = { success: boolean; }; -export type ExtensionQuery = { - config: ExtensionConfig; - enabled: boolean; - name: string; -}; - -export type ExtensionResponse = { - extensions: Array; - warnings?: Array; -}; - export type FeaturesResponse = { /** * Map of feature name to enabled status @@ -1142,11 +1126,6 @@ export type RedactedThinkingContent = { data: string; }; -export type RemoveExtensionRequest = { - name: string; - session_id: string; -}; - export type RepoVariantsResponse = { available_memory_bytes: number; downloaded_quants: Array; @@ -1338,10 +1317,6 @@ export type SessionDisplayInfo = { workingDir: string; }; -export type SessionExtensionsResponse = { - extensions: Array; -}; - export type SessionInsights = { totalSessions: number; totalTokens: number; @@ -1769,37 +1744,6 @@ export type ConfirmToolActionResponses = { 200: unknown; }; -export type AgentAddExtensionData = { - body: AddExtensionRequest; - path?: never; - query?: never; - url: '/agent/add_extension'; -}; - -export type AgentAddExtensionErrors = { - /** - * Unauthorized - invalid secret key - */ - 401: unknown; - /** - * Agent not initialized - */ - 424: unknown; - /** - * Internal server error - */ - 500: unknown; -}; - -export type AgentAddExtensionResponses = { - /** - * Extension added - */ - 200: string; -}; - -export type AgentAddExtensionResponse = AgentAddExtensionResponses[keyof AgentAddExtensionResponses]; - export type CallToolData = { body: CallToolRequest; path?: never; @@ -1970,37 +1914,6 @@ export type ReadResourceResponses = { export type ReadResourceResponse2 = ReadResourceResponses[keyof ReadResourceResponses]; -export type AgentRemoveExtensionData = { - body: RemoveExtensionRequest; - path?: never; - query?: never; - url: '/agent/remove_extension'; -}; - -export type AgentRemoveExtensionErrors = { - /** - * Unauthorized - invalid secret key - */ - 401: unknown; - /** - * Agent not initialized - */ - 424: unknown; - /** - * Internal server error - */ - 500: unknown; -}; - -export type AgentRemoveExtensionResponses = { - /** - * Extension removed - */ - 200: string; -}; - -export type AgentRemoveExtensionResponse = AgentRemoveExtensionResponses[keyof AgentRemoveExtensionResponses]; - export type RestartAgentData = { body: RestartAgentRequest; path?: never; @@ -2436,89 +2349,6 @@ export type UpdateCustomProviderResponses = { export type UpdateCustomProviderResponse = UpdateCustomProviderResponses[keyof UpdateCustomProviderResponses]; -export type GetExtensionsData = { - body?: never; - path?: never; - query?: never; - url: '/config/extensions'; -}; - -export type GetExtensionsErrors = { - /** - * Internal server error - */ - 500: unknown; -}; - -export type GetExtensionsResponses = { - /** - * All extensions retrieved successfully - */ - 200: ExtensionResponse; -}; - -export type GetExtensionsResponse = GetExtensionsResponses[keyof GetExtensionsResponses]; - -export type AddExtensionData = { - body: ExtensionQuery; - path?: never; - query?: never; - url: '/config/extensions'; -}; - -export type AddExtensionErrors = { - /** - * Invalid request - */ - 400: unknown; - /** - * Could not serialize config.yaml - */ - 422: unknown; - /** - * Internal server error - */ - 500: unknown; -}; - -export type AddExtensionResponses = { - /** - * Extension added or updated successfully - */ - 200: string; -}; - -export type AddExtensionResponse = AddExtensionResponses[keyof AddExtensionResponses]; - -export type RemoveExtensionData = { - body?: never; - path: { - name: string; - }; - query?: never; - url: '/config/extensions/{name}'; -}; - -export type RemoveExtensionErrors = { - /** - * Extension not found - */ - 404: unknown; - /** - * Internal server error - */ - 500: unknown; -}; - -export type RemoveExtensionResponses = { - /** - * Extension removed successfully - */ - 200: string; -}; - -export type RemoveExtensionResponse = RemoveExtensionResponses[keyof RemoveExtensionResponses]; - export type UpsertPermissionsData = { body: UpsertPermissionsQuery; path?: never; @@ -4468,42 +4298,6 @@ export type ExportSessionResponses = { export type ExportSessionResponse = ExportSessionResponses[keyof ExportSessionResponses]; -export type GetSessionExtensionsData = { - body?: never; - path: { - /** - * Unique identifier for the session - */ - session_id: string; - }; - query?: never; - url: '/sessions/{session_id}/extensions'; -}; - -export type GetSessionExtensionsErrors = { - /** - * Unauthorized - Invalid or missing API key - */ - 401: unknown; - /** - * Session not found - */ - 404: unknown; - /** - * Internal server error - */ - 500: unknown; -}; - -export type GetSessionExtensionsResponses = { - /** - * Session extensions retrieved successfully - */ - 200: SessionExtensionsResponse; -}; - -export type GetSessionExtensionsResponse = GetSessionExtensionsResponses[keyof GetSessionExtensionsResponses]; - export type ForkSessionData = { body: ForkRequest; path: { diff --git a/ui/desktop/src/components/ConfigContext.tsx b/ui/desktop/src/components/ConfigContext.tsx index 018f2f872e..df80183efd 100644 --- a/ui/desktop/src/components/ConfigContext.tsx +++ b/ui/desktop/src/components/ConfigContext.tsx @@ -1,21 +1,16 @@ import React, { createContext, useContext, useState, useEffect, useMemo, useCallback } from 'react'; +import { readAllConfig, readConfig, removeConfig, upsertConfig, providers } from '../api'; import { - readAllConfig, - readConfig, - removeConfig, - upsertConfig, - addExtension as apiAddExtension, - removeExtension as apiRemoveExtension, - providers, -} from '../api'; -import { getConfiguredExtensions } from '../acp/extensions'; + getConfiguredExtensions, + addConfiguredExtension, + removeConfiguredExtension, +} from '../acp/extensions'; import { pruneDeprecatedBundledExtensions, syncBundledExtensions } from './settings/extensions'; import type { ConfigResponse, UpsertConfigQuery, ConfigKeyQuery, ProviderDetails, - ExtensionQuery, ExtensionConfig, } from '../api'; @@ -113,10 +108,7 @@ export const ConfigProvider: React.FC = ({ children }) => { const addExtension = useCallback( async (name: string, config: ExtensionConfig, enabled: boolean) => { - const query: ExtensionQuery = { name, config, enabled }; - await apiAddExtension({ - body: query, - }); + await addConfiguredExtension(name, config, enabled); await reloadConfig(); // Refresh extensions list after successful addition await refreshExtensions(); @@ -126,7 +118,7 @@ export const ConfigProvider: React.FC = ({ children }) => { const removeExtension = useCallback( async (name: string) => { - await apiRemoveExtension({ path: { name: name } }); + await removeConfiguredExtension(name); await reloadConfig(); // Refresh extensions list after successful removal await refreshExtensions(); @@ -206,11 +198,10 @@ export const ConfigProvider: React.FC = ({ children }) => { config: ExtensionConfig, enabled: boolean ) => { - const query: ExtensionQuery = { name, config, enabled }; - await apiAddExtension({ body: query }); + await addConfiguredExtension(name, config, enabled); }; const removeExtensionForSync = async (name: string) => { - await apiRemoveExtension({ path: { name } }); + await removeConfiguredExtension(name); }; extensions = await pruneDeprecatedBundledExtensions(extensions, removeExtensionForSync); await syncBundledExtensions(extensions, addExtensionForSync); diff --git a/ui/desktop/src/components/bottom_menu/BottomMenuExtensionSelection.tsx b/ui/desktop/src/components/bottom_menu/BottomMenuExtensionSelection.tsx index 2128b13463..295ad9b20a 100644 --- a/ui/desktop/src/components/bottom_menu/BottomMenuExtensionSelection.tsx +++ b/ui/desktop/src/components/bottom_menu/BottomMenuExtensionSelection.tsx @@ -8,7 +8,8 @@ import { FixedExtensionEntry, useConfig } from '../ConfigContext'; import { toastService } from '../../toasts'; import { formatExtensionName } from '../settings/extensions/subcomponents/ExtensionList'; import { nameToKey } from '../settings/extensions/utils'; -import { ExtensionConfig, getSessionExtensions } from '../../api'; +import { ExtensionConfig } from '../../api'; +import { getSessionExtensions } from '../../acp/extensions'; import { addToAgent, removeFromAgent } from '../settings/extensions/agent-api'; import { setExtensionOverride, @@ -119,14 +120,9 @@ export const BottomMenuExtensionSelection = ({ sessionId }: BottomMenuExtensionS } try { - const response = await getSessionExtensions({ - path: { session_id: sessionId }, - }); - - if (response.data?.extensions) { - setSessionExtensions(response.data.extensions); - setIsSessionExtensionsLoaded(true); - } + const extensions = await getSessionExtensions(sessionId); + setSessionExtensions(extensions); + setIsSessionExtensionsLoaded(true); } catch (error) { console.error('Failed to fetch session extensions:', error); setIsSessionExtensionsLoaded(true); @@ -197,13 +193,8 @@ export const BottomMenuExtensionSelection = ({ sessionId }: BottomMenuExtensionS } sortTimeoutRef.current = setTimeout(async () => { - const response = await getSessionExtensions({ - path: { session_id: sessionId }, - }); - - if (response.data?.extensions) { - setSessionExtensions(response.data.extensions); - } + const extensions = await getSessionExtensions(sessionId); + setSessionExtensions(extensions); setPendingSort(false); setIsTransitioning(false); setTogglingExtension(null); diff --git a/ui/desktop/src/components/settings/extensions/agent-api.ts b/ui/desktop/src/components/settings/extensions/agent-api.ts index bd38284873..064491f58d 100644 --- a/ui/desktop/src/components/settings/extensions/agent-api.ts +++ b/ui/desktop/src/components/settings/extensions/agent-api.ts @@ -1,5 +1,6 @@ import { toastService } from '../../../toasts'; -import { agentAddExtension, ExtensionConfig, agentRemoveExtension } from '../../../api'; +import { ExtensionConfig } from '../../../api'; +import { addSessionExtension, removeSessionExtension } from '../../../acp/extensions'; import { errorMessage } from '../../../utils/conversionUtils'; import { createExtensionRecoverHints, @@ -20,10 +21,7 @@ export async function addToAgent( : 0; try { - await agentAddExtension({ - body: { session_id: sessionId, config: extensionConfig }, - throwOnError: true, - }); + await addSessionExtension(sessionId, extensionConfig); if (showToast) { toastService.dismiss(toastId); toastService.success({ @@ -61,10 +59,7 @@ export async function removeFromAgent( : 0; try { - await agentRemoveExtension({ - body: { session_id: sessionId, name: extensionName }, - throwOnError: true, - }); + await removeSessionExtension(sessionId, extensionName); if (showToast) { toastService.dismiss(toastId); toastService.success({