* feat(#444): add MCP API endpoints and data models - Add McpServer.status and McpServer.error fields for diagnostics - Add AddMcpServerRequest, McpCatalogResponse/Entry/EnvVar models - Add McpServerTestResponse model - Add POST addMcpServer, PUT updateMcpServer, POST restartMcpServer - Add GET getMcpCatalog, POST installMcpCatalogEntry * feat(#444): add server form, enriched server cards, catalog section - Add HTTP/stdio inline server form with tabs - Enriched server cards with status badge, restart, env var editing - Add/edit/remove environment variables per server - Catalog section with search, result cards, install flow with env vars - Status badge colors: running=green, error=red, stopped/gray - Server diagnostics shown as error badges on cards - New string resources for all MCP UI elements * fix(#444): add missing McpServer import to HermesApiService * fix(#444): cleanup review issues — dead code, spinner, unused strings - Remove unused serverDiagnostics from UiState - Remove unused showDiagnostics local state in ServerCard - Remove unused McpServerTestResponse model - Remove redundant refreshDiagnostics() alias - Replace catalog loading text with CircularProgressIndicator - Remove unused string resources (action_restarting, diagnostics, catalog_load) * fix(#444): remove remaining showDiagnostics reference at line 348 --------- Co-authored-by: Hermes Agent <hermes@agent.local>
This commit is contained in:
1 parent
d181851670
commit
5be4075d95
5 files changed
+962
-145
No files matched your search
@@ -12,8 +12,44 @@ data class McpServer(
|
||||
val args: List<String>?,
|
||||
val env: Map<String, String>?,
|
||||
val enabled: Boolean,
|
||||
val status: String? = null,
|
||||
val error: String? = null,
|
||||
)
|
||||
|
||||
data class McpServerToggleRequest(
|
||||
val enabled: Boolean,
|
||||
)
|
||||
|
||||
data class AddMcpServerRequest(
|
||||
val name: String,
|
||||
val url: String? = null,
|
||||
val command: String? = null,
|
||||
val args: List<String>? = null,
|
||||
val env: Map<String, String>? = null,
|
||||
)
|
||||
|
||||
data class McpCatalogResponse(
|
||||
val entries: List<McpCatalogEntry>,
|
||||
)
|
||||
|
||||
data class McpCatalogEntry(
|
||||
val name: String,
|
||||
val description: String? = null,
|
||||
val source: String? = null,
|
||||
val url: String? = null,
|
||||
val command: String? = null,
|
||||
val args: List<String>? = null,
|
||||
val env: List<McpCatalogEnvVar>? = null,
|
||||
)
|
||||
|
||||
data class McpCatalogEnvVar(
|
||||
val key: String,
|
||||
val label: String? = null,
|
||||
val description: String? = null,
|
||||
val required: Boolean = false,
|
||||
)
|
||||
|
||||
data class McpCatalogInstallRequest(
|
||||
val name: String,
|
||||
val env: Map<String, String>? = null,
|
||||
)
|
||||
@@ -5,6 +5,7 @@ import com.m57.hermescontrol.data.model.AchievementsResponse
|
||||
import com.m57.hermescontrol.data.model.ActionResponse
|
||||
import com.m57.hermescontrol.data.model.ActionStatusResponse
|
||||
import com.m57.hermescontrol.data.model.ActiveProfileResponse
|
||||
import com.m57.hermescontrol.data.model.AddMcpServerRequest
|
||||
import com.m57.hermescontrol.data.model.AgentPluginInstallBody
|
||||
import com.m57.hermescontrol.data.model.AuxiliaryModelsResponse
|
||||
import com.m57.hermescontrol.data.model.BulkDeleteRequest
|
||||
@@ -32,6 +33,9 @@ import com.m57.hermescontrol.data.model.KanbanBoardResponse
|
||||
import com.m57.hermescontrol.data.model.KanbanBoardsResponse
|
||||
import com.m57.hermescontrol.data.model.KanbanTask
|
||||
import com.m57.hermescontrol.data.model.LogResponse
|
||||
import com.m57.hermescontrol.data.model.McpCatalogInstallRequest
|
||||
import com.m57.hermescontrol.data.model.McpCatalogResponse
|
||||
import com.m57.hermescontrol.data.model.McpServer
|
||||
import com.m57.hermescontrol.data.model.McpServerToggleRequest
|
||||
import com.m57.hermescontrol.data.model.McpServersResponse
|
||||
import com.m57.hermescontrol.data.model.MemoryResponse
|
||||
@@ -334,6 +338,30 @@ interface HermesApiService {
|
||||
@Path("name") name: String,
|
||||
): Response<Unit>
|
||||
|
||||
@POST("api/mcp/servers")
|
||||
suspend fun addMcpServer(
|
||||
@Body body: AddMcpServerRequest,
|
||||
): Response<McpServer>
|
||||
|
||||
@PUT("api/mcp/servers/{name}")
|
||||
suspend fun updateMcpServer(
|
||||
@Path("name") name: String,
|
||||
@Body body: Map<String, Any>,
|
||||
): Response<McpServer>
|
||||
|
||||
@POST("api/mcp/servers/{name}/restart")
|
||||
suspend fun restartMcpServer(
|
||||
@Path("name") name: String,
|
||||
): Response<Unit>
|
||||
|
||||
@GET("api/mcp/catalog")
|
||||
suspend fun getMcpCatalog(): Response<McpCatalogResponse>
|
||||
|
||||
@POST("api/mcp/catalog/install")
|
||||
suspend fun installMcpCatalogEntry(
|
||||
@Body body: McpCatalogInstallRequest,
|
||||
): Response<Map<String, Any>>
|
||||
|
||||
@GET("api/webhooks")
|
||||
suspend fun getWebhooks(): Response<WebhooksResponse>
|
||||
|
||||
|
||||
Reference in new issue
Block a user