feat: add redis gateway protection and task recovery

This commit is contained in:
wlx committed 2026-09-08 18:02:45 +08:00
1 parent cbc7317aa8
commit 473479fc4c
17 files changed
+272 -10

No files matched your search

+12
View File
@@ -200,6 +200,18 @@ class HttpCatalogClient {
return payload.task
}
async listTasks(apiKey: string, limit = 50) {
const payload = await this.request<{ tasks: AsyncTaskResult[] }>(`/v1/tasks?limit=${Math.max(1, Math.min(limit, 100))}`, {
headers: { Authorization: `Bearer ${apiKey}` },
})
return payload.tasks
}
async listSessionTasks(limit = 50) {
const payload = await this.request<{ tasks: AsyncTaskResult[] }>(`/api/tasks?limit=${Math.max(1, Math.min(limit, 100))}`)
return payload.tasks
}
async listAdminModels() {
return this.request<{ models: CatalogModel[] }>('/api/admin/models')
}