Gateway/UI: data-driven agents tools catalog with provenance (openclaw#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
Tak Hoffman
2026-02-22 23:55:59 -06:00
committed by GitHub
parent 1c753ea786
commit 9e1a13bf4c
31 changed files with 1548 additions and 185 deletions

View File

@@ -2170,6 +2170,132 @@ public struct SkillsStatusParams: Codable, Sendable {
}
}
public struct ToolsCatalogParams: Codable, Sendable {
public let agentid: String?
public let includeplugins: Bool?
public init(
agentid: String?,
includeplugins: Bool?)
{
self.agentid = agentid
self.includeplugins = includeplugins
}
private enum CodingKeys: String, CodingKey {
case agentid = "agentId"
case includeplugins = "includePlugins"
}
}
public struct ToolCatalogProfile: Codable, Sendable {
public let id: AnyCodable
public let label: String
public init(
id: AnyCodable,
label: String)
{
self.id = id
self.label = label
}
private enum CodingKeys: String, CodingKey {
case id
case label
}
}
public struct ToolCatalogEntry: Codable, Sendable {
public let id: String
public let label: String
public let description: String
public let source: AnyCodable
public let pluginid: String?
public let optional: Bool?
public let defaultprofiles: [AnyCodable]
public init(
id: String,
label: String,
description: String,
source: AnyCodable,
pluginid: String?,
optional: Bool?,
defaultprofiles: [AnyCodable])
{
self.id = id
self.label = label
self.description = description
self.source = source
self.pluginid = pluginid
self.optional = optional
self.defaultprofiles = defaultprofiles
}
private enum CodingKeys: String, CodingKey {
case id
case label
case description
case source
case pluginid = "pluginId"
case optional
case defaultprofiles = "defaultProfiles"
}
}
public struct ToolCatalogGroup: Codable, Sendable {
public let id: String
public let label: String
public let source: AnyCodable
public let pluginid: String?
public let tools: [ToolCatalogEntry]
public init(
id: String,
label: String,
source: AnyCodable,
pluginid: String?,
tools: [ToolCatalogEntry])
{
self.id = id
self.label = label
self.source = source
self.pluginid = pluginid
self.tools = tools
}
private enum CodingKeys: String, CodingKey {
case id
case label
case source
case pluginid = "pluginId"
case tools
}
}
public struct ToolsCatalogResult: Codable, Sendable {
public let agentid: String
public let profiles: [ToolCatalogProfile]
public let groups: [ToolCatalogGroup]
public init(
agentid: String,
profiles: [ToolCatalogProfile],
groups: [ToolCatalogGroup])
{
self.agentid = agentid
self.profiles = profiles
self.groups = groups
}
private enum CodingKeys: String, CodingKey {
case agentid = "agentId"
case profiles
case groups
}
}
public struct SkillsBinsParams: Codable, Sendable {}
public struct SkillsBinsResult: Codable, Sendable {
@@ -2306,15 +2432,39 @@ public struct CronJob: Codable, Sendable {
public struct CronListParams: Codable, Sendable {
public let includedisabled: Bool?
public let limit: Int?
public let offset: Int?
public let query: String?
public let enabled: AnyCodable?
public let sortby: AnyCodable?
public let sortdir: AnyCodable?
public init(
includedisabled: Bool?)
includedisabled: Bool?,
limit: Int?,
offset: Int?,
query: String?,
enabled: AnyCodable?,
sortby: AnyCodable?,
sortdir: AnyCodable?)
{
self.includedisabled = includedisabled
self.limit = limit
self.offset = offset
self.query = query
self.enabled = enabled
self.sortby = sortby
self.sortdir = sortdir
}
private enum CodingKeys: String, CodingKey {
case includedisabled = "includeDisabled"
case limit
case offset
case query
case enabled
case sortby = "sortBy"
case sortdir = "sortDir"
}
}
@@ -2374,6 +2524,60 @@ public struct CronAddParams: Codable, Sendable {
}
}
public struct CronRunsParams: Codable, Sendable {
public let scope: AnyCodable?
public let id: String?
public let jobid: String?
public let limit: Int?
public let offset: Int?
public let statuses: [AnyCodable]?
public let status: AnyCodable?
public let deliverystatuses: [AnyCodable]?
public let deliverystatus: AnyCodable?
public let query: String?
public let sortdir: AnyCodable?
public init(
scope: AnyCodable?,
id: String?,
jobid: String?,
limit: Int?,
offset: Int?,
statuses: [AnyCodable]?,
status: AnyCodable?,
deliverystatuses: [AnyCodable]?,
deliverystatus: AnyCodable?,
query: String?,
sortdir: AnyCodable?)
{
self.scope = scope
self.id = id
self.jobid = jobid
self.limit = limit
self.offset = offset
self.statuses = statuses
self.status = status
self.deliverystatuses = deliverystatuses
self.deliverystatus = deliverystatus
self.query = query
self.sortdir = sortdir
}
private enum CodingKeys: String, CodingKey {
case scope
case id
case jobid = "jobId"
case limit
case offset
case statuses
case status
case deliverystatuses = "deliveryStatuses"
case deliverystatus = "deliveryStatus"
case query
case sortdir = "sortDir"
}
}
public struct CronRunLogEntry: Codable, Sendable {
public let ts: Int
public let jobid: String
@@ -2389,6 +2593,10 @@ public struct CronRunLogEntry: Codable, Sendable {
public let runatms: Int?
public let durationms: Int?
public let nextrunatms: Int?
public let model: String?
public let provider: String?
public let usage: [String: AnyCodable]?
public let jobname: String?
public init(
ts: Int,
@@ -2404,7 +2612,11 @@ public struct CronRunLogEntry: Codable, Sendable {
sessionkey: String?,
runatms: Int?,
durationms: Int?,
nextrunatms: Int?)
nextrunatms: Int?,
model: String?,
provider: String?,
usage: [String: AnyCodable]?,
jobname: String?)
{
self.ts = ts
self.jobid = jobid
@@ -2420,6 +2632,10 @@ public struct CronRunLogEntry: Codable, Sendable {
self.runatms = runatms
self.durationms = durationms
self.nextrunatms = nextrunatms
self.model = model
self.provider = provider
self.usage = usage
self.jobname = jobname
}
private enum CodingKeys: String, CodingKey {
@@ -2437,6 +2653,10 @@ public struct CronRunLogEntry: Codable, Sendable {
case runatms = "runAtMs"
case durationms = "durationMs"
case nextrunatms = "nextRunAtMs"
case model
case provider
case usage
case jobname = "jobName"
}
}