Files
goose/ui/desktop/openapi.json

585 lines
14 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "goose-server",
"description": "An AI agent",
"contact": {
"name": "Block",
"email": "ai-oss-tools@block.xyz"
},
"license": {
"name": "Apache-2.0"
},
"version": "1.0.16"
},
"paths": {
"/config": {
"get": {
"tags": [
"super::routes::config_management"
],
"operationId": "read_all_config",
"responses": {
"200": {
"description": "All configuration values retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
}
}
}
},
"/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"
},
"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/providers": {
"get": {
"tags": [
"super::routes::config_management"
],
"operationId": "providers",
"responses": {
"200": {
"description": "All configuration values retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProviderDetails"
}
}
}
}
}
}
}
},
"/config/read": {
"post": {
"tags": [
"super::routes::config_management"
],
"operationId": "read_config",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigKeyQuery"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Configuration value retrieved successfully",
"content": {
"application/json": {
"schema": {}
}
}
},
"404": {
"description": "Configuration key not found"
}
}
}
},
"/config/remove": {
"post": {
"tags": [
"super::routes::config_management"
],
"operationId": "remove_config",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigKeyQuery"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Configuration value removed successfully",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Configuration key not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/config/upsert": {
"post": {
"tags": [
"super::routes::config_management"
],
"operationId": "upsert_config",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpsertConfigQuery"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Configuration value upserted successfully",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
}
},
"components": {
"schemas": {
"ConfigKey": {
"type": "object",
"required": [
"name",
"required",
"secret"
],
"properties": {
"default": {
"type": "string",
"nullable": true
},
"name": {
"type": "string"
},
"required": {
"type": "boolean"
},
"secret": {
"type": "boolean"
}
}
},
"ConfigKeyQuery": {
"type": "object",
"required": [
"key",
"is_secret"
],
"properties": {
"is_secret": {
"type": "boolean"
},
"key": {
"type": "string"
}
}
},
"ConfigResponse": {
"type": "object",
"required": [
"config"
],
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
}
}
},
"Envs": {
"type": "object",
"additionalProperties": {
"type": "string",
"description": "A map of environment variables to set, e.g. API_KEY -> some_secret, HOST -> host"
}
},
"ExtensionConfig": {
"oneOf": [
{
"type": "object",
"description": "Server-sent events client with a URI endpoint",
"required": [
"name",
"uri",
"type"
],
"properties": {
"description": {
"type": "string",
"nullable": true
},
"envs": {
"$ref": "#/components/schemas/Envs"
},
"name": {
"type": "string",
"description": "The name used to identify this extension"
},
"timeout": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"sse"
]
},
"uri": {
"type": "string"
}
}
},
{
"type": "object",
"description": "Standard I/O client with command and arguments",
"required": [
"name",
"cmd",
"args",
"type"
],
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"cmd": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"envs": {
"$ref": "#/components/schemas/Envs"
},
"name": {
"type": "string",
"description": "The name used to identify this extension"
},
"timeout": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"stdio"
]
}
}
},
{
"type": "object",
"description": "Built-in extension that is part of the goose binary",
"required": [
"name",
"type"
],
"properties": {
"display_name": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"description": "The name used to identify this extension"
},
"timeout": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"builtin"
]
}
}
}
],
"description": "Represents the different types of MCP extensions that can be added to the manager",
"discriminator": {
"propertyName": "type"
}
},
"ExtensionEntry": {
"allOf": [
{
"$ref": "#/components/schemas/ExtensionConfig"
},
{
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean"
}
}
}
]
},
"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"
}
}
}
},
"ProviderDetails": {
"type": "object",
"required": [
"name",
"metadata",
"is_configured"
],
"properties": {
"is_configured": {
"type": "boolean",
"description": "Indicates whether the provider is fully configured"
},
"metadata": {
"$ref": "#/components/schemas/ProviderMetadata"
},
"name": {
"type": "string",
"description": "Unique identifier and name of the provider"
}
}
},
"ProviderMetadata": {
"type": "object",
"description": "Metadata about a provider's configuration requirements and capabilities",
"required": [
"name",
"display_name",
"description",
"default_model",
"known_models",
"model_doc_link",
"config_keys"
],
"properties": {
"config_keys": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConfigKey"
},
"description": "Required configuration keys"
},
"default_model": {
"type": "string",
"description": "The default/recommended model for this provider"
},
"description": {
"type": "string",
"description": "Description of the provider's capabilities"
},
"display_name": {
"type": "string",
"description": "Display name for the provider in UIs"
},
"known_models": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of currently known models\nTODO: eventually query the apis directly"
},
"model_doc_link": {
"type": "string",
"description": "Link to the docs where models can be found"
},
"name": {
"type": "string",
"description": "The unique identifier for this provider"
}
}
},
"ProvidersResponse": {
"type": "object",
"required": [
"providers"
],
"properties": {
"providers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProviderDetails"
}
}
}
},
"UpsertConfigQuery": {
"type": "object",
"required": [
"key",
"value",
"is_secret"
],
"properties": {
"is_secret": {
"type": "boolean"
},
"key": {
"type": "string"
},
"value": {}
}
}
}
}
}