feat(skills): hub sources + featured landing and security scan (#779) (#793)

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-03 22:13:28 +03:00
1 parent 00a0eedc77
commit 1870b375b1
7 files changed
+812 -304

No files matched your search

@@ -56,7 +56,39 @@ data class SkillHubUninstallRequest(
@Serializable
data class SkillScanResponse(
val identifier: String,
val passed: Boolean? = null,
val issues: List<String>? = null,
val warnings: List<String>? = null,
val name: String? = null,
val source: String? = null,
@SerialName("trust_level") val trustLevel: String? = null,
val verdict: String? = null,
val summary: String? = null,
val policy: String? = null,
@SerialName("policy_reason") val policyReason: String? = null,
val findings: List<SkillScanFinding> = emptyList(),
@SerialName("severity_counts") val severityCounts: Map<String, Int> = emptyMap(),
)
@Serializable
data class SkillScanFinding(
val severity: String,
val category: String,
val file: String? = null,
val line: Int? = null,
val description: String? = null,
)
@Serializable
data class SkillHubSource(
val id: String,
val label: String? = null,
@SerialName("rate_limited") val rateLimited: Boolean? = null,
val available: Boolean? = null,
val searchable: Boolean? = null,
)
@Serializable
data class SkillHubSourcesResponse(
val sources: List<SkillHubSource> = emptyList(),
@SerialName("index_available") val indexAvailable: Boolean? = null,
val featured: List<HubSkill> = emptyList(),
val installed: Map<String, SkillHubInstalledEntry>? = null,
)
@@ -88,7 +88,9 @@ import com.m57.hermescontrol.data.model.Skill
import com.m57.hermescontrol.data.model.SkillContentResponse
import com.m57.hermescontrol.data.model.SkillHubInstallRequest
import com.m57.hermescontrol.data.model.SkillHubSearchResponse
import com.m57.hermescontrol.data.model.SkillHubSourcesResponse
import com.m57.hermescontrol.data.model.SkillHubUninstallRequest
import com.m57.hermescontrol.data.model.SkillScanResponse
import com.m57.hermescontrol.data.model.StatusResponse
import com.m57.hermescontrol.data.model.SystemStatsResponse
import com.m57.hermescontrol.data.model.TelegramOnboardingApplyRequest
@@ -240,6 +242,11 @@ interface HermesApiService {
@Query("identifier") identifier: String,
): Response<SkillContentResponse>
@GET("api/skills/hub/scan")
suspend fun scanHubSkill(
@Query("identifier") identifier: String,
): Response<SkillScanResponse>
@POST("api/skills/hub/install")
suspend fun installHubSkill(
@Body body: SkillHubInstallRequest,
@@ -250,6 +257,9 @@ interface HermesApiService {
@Body body: SkillHubUninstallRequest,
): Response<ActionResponse>
@GET("api/skills/hub/sources")
suspend fun getSkillHubSources(): Response<SkillHubSourcesResponse>
@PUT("api/skills/toggle")
suspend fun toggleSkill(
@Body body: ToggleSkillRequest,