mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
[Feat] Gateway: add commands.list RPC method (#62656)
Merged via squash. Co-authored-by: samzong <samzong.lu@gmail.com> Co-authored-by: Frank Yang <frank.ekn@gmail.com> Reviewed-by: @frankekn
This commit is contained in:
@@ -2883,6 +2883,92 @@ public struct ModelsListResult: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandEntry: Codable, Sendable {
|
||||
public let name: String
|
||||
public let nativename: String?
|
||||
public let textaliases: [String]?
|
||||
public let description: String
|
||||
public let category: AnyCodable?
|
||||
public let source: AnyCodable
|
||||
public let scope: AnyCodable
|
||||
public let acceptsargs: Bool
|
||||
public let args: [[String: AnyCodable]]?
|
||||
|
||||
public init(
|
||||
name: String,
|
||||
nativename: String?,
|
||||
textaliases: [String]?,
|
||||
description: String,
|
||||
category: AnyCodable?,
|
||||
source: AnyCodable,
|
||||
scope: AnyCodable,
|
||||
acceptsargs: Bool,
|
||||
args: [[String: AnyCodable]]?)
|
||||
{
|
||||
self.name = name
|
||||
self.nativename = nativename
|
||||
self.textaliases = textaliases
|
||||
self.description = description
|
||||
self.category = category
|
||||
self.source = source
|
||||
self.scope = scope
|
||||
self.acceptsargs = acceptsargs
|
||||
self.args = args
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name
|
||||
case nativename = "nativeName"
|
||||
case textaliases = "textAliases"
|
||||
case description
|
||||
case category
|
||||
case source
|
||||
case scope
|
||||
case acceptsargs = "acceptsArgs"
|
||||
case args
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandsListParams: Codable, Sendable {
|
||||
public let agentid: String?
|
||||
public let provider: String?
|
||||
public let scope: AnyCodable?
|
||||
public let includeargs: Bool?
|
||||
|
||||
public init(
|
||||
agentid: String?,
|
||||
provider: String?,
|
||||
scope: AnyCodable?,
|
||||
includeargs: Bool?)
|
||||
{
|
||||
self.agentid = agentid
|
||||
self.provider = provider
|
||||
self.scope = scope
|
||||
self.includeargs = includeargs
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case agentid = "agentId"
|
||||
case provider
|
||||
case scope
|
||||
case includeargs = "includeArgs"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandsListResult: Codable, Sendable {
|
||||
public let commands: [CommandEntry]
|
||||
|
||||
public init(
|
||||
commands: [CommandEntry])
|
||||
{
|
||||
self.commands = commands
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case commands
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsStatusParams: Codable, Sendable {
|
||||
public let agentid: String?
|
||||
|
||||
|
||||
@@ -2883,6 +2883,92 @@ public struct ModelsListResult: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandEntry: Codable, Sendable {
|
||||
public let name: String
|
||||
public let nativename: String?
|
||||
public let textaliases: [String]?
|
||||
public let description: String
|
||||
public let category: AnyCodable?
|
||||
public let source: AnyCodable
|
||||
public let scope: AnyCodable
|
||||
public let acceptsargs: Bool
|
||||
public let args: [[String: AnyCodable]]?
|
||||
|
||||
public init(
|
||||
name: String,
|
||||
nativename: String?,
|
||||
textaliases: [String]?,
|
||||
description: String,
|
||||
category: AnyCodable?,
|
||||
source: AnyCodable,
|
||||
scope: AnyCodable,
|
||||
acceptsargs: Bool,
|
||||
args: [[String: AnyCodable]]?)
|
||||
{
|
||||
self.name = name
|
||||
self.nativename = nativename
|
||||
self.textaliases = textaliases
|
||||
self.description = description
|
||||
self.category = category
|
||||
self.source = source
|
||||
self.scope = scope
|
||||
self.acceptsargs = acceptsargs
|
||||
self.args = args
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name
|
||||
case nativename = "nativeName"
|
||||
case textaliases = "textAliases"
|
||||
case description
|
||||
case category
|
||||
case source
|
||||
case scope
|
||||
case acceptsargs = "acceptsArgs"
|
||||
case args
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandsListParams: Codable, Sendable {
|
||||
public let agentid: String?
|
||||
public let provider: String?
|
||||
public let scope: AnyCodable?
|
||||
public let includeargs: Bool?
|
||||
|
||||
public init(
|
||||
agentid: String?,
|
||||
provider: String?,
|
||||
scope: AnyCodable?,
|
||||
includeargs: Bool?)
|
||||
{
|
||||
self.agentid = agentid
|
||||
self.provider = provider
|
||||
self.scope = scope
|
||||
self.includeargs = includeargs
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case agentid = "agentId"
|
||||
case provider
|
||||
case scope
|
||||
case includeargs = "includeArgs"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandsListResult: Codable, Sendable {
|
||||
public let commands: [CommandEntry]
|
||||
|
||||
public init(
|
||||
commands: [CommandEntry])
|
||||
{
|
||||
self.commands = commands
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case commands
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsStatusParams: Codable, Sendable {
|
||||
public let agentid: String?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user