6 files changed
+247
-16
No files matched your search
@@ -81,6 +81,26 @@ data class PluginsHubResponse(
|
||||
val providers: PluginsHubProviders? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PluginUpdateRequest(
|
||||
@SerialName("accept_capabilities") val acceptCapabilities: Boolean,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PluginUpdateResult(
|
||||
val ok: Boolean = false,
|
||||
val unchanged: Boolean = false,
|
||||
@SerialName("consent_required") val consentRequired: Boolean = false,
|
||||
val delta: Map<String, List<String>>? = null,
|
||||
@SerialName("delta_lines") val deltaLines: List<String>? = null,
|
||||
val error: String? = null,
|
||||
) {
|
||||
val capabilityDelta: List<String>
|
||||
get() =
|
||||
deltaLines?.takeIf { it.isNotEmpty() }
|
||||
?: delta.orEmpty().map { (surface, added) -> "$surface: ${added.joinToString() }" }
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class AgentPluginInstallBody(
|
||||
val identifier: String = "",
|
||||
|
||||
@@ -670,7 +670,8 @@ interface HermesApiService : KanbanApiService {
|
||||
@POST("api/dashboard/agent-plugins/{name}/update")
|
||||
suspend fun updatePlugin(
|
||||
@Path("name", encoded = true) name: String,
|
||||
): Response<Unit>
|
||||
@Body body: com.m57.hermescontrol.data.model.PluginUpdateRequest,
|
||||
): Response<com.m57.hermescontrol.data.model.PluginUpdateResult>
|
||||
|
||||
@POST("api/dashboard/agent-plugins/{name}/enable")
|
||||
suspend fun enablePlugin(
|
||||
|
||||
Reference in new issue
Block a user