You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
839 lines
24 KiB
839 lines
24 KiB
export namespace controlplane {
|
|
|
|
export class Agent {
|
|
id: string;
|
|
name: string;
|
|
status: string;
|
|
lastSeenAt: string;
|
|
restartStatus: string;
|
|
restartFailure: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Agent(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.status = source["status"];
|
|
this.lastSeenAt = source["lastSeenAt"];
|
|
this.restartStatus = source["restartStatus"];
|
|
this.restartFailure = source["restartFailure"];
|
|
}
|
|
}
|
|
export class AgentDirectoryFilter {
|
|
page: number;
|
|
pageSize: number;
|
|
name: string;
|
|
connectionStatus: string;
|
|
mcpStatus: string;
|
|
llmStatus: string;
|
|
skillStatus: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentDirectoryFilter(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.page = source["page"];
|
|
this.pageSize = source["pageSize"];
|
|
this.name = source["name"];
|
|
this.connectionStatus = source["connectionStatus"];
|
|
this.mcpStatus = source["mcpStatus"];
|
|
this.llmStatus = source["llmStatus"];
|
|
this.skillStatus = source["skillStatus"];
|
|
}
|
|
}
|
|
export class AgentDirectoryItem {
|
|
id: string;
|
|
name: string;
|
|
status: string;
|
|
lastSeenAt: string;
|
|
llmProfile: string;
|
|
llmStatus: string;
|
|
llmFailure: string;
|
|
skillTotal: number;
|
|
skillApplied: number;
|
|
skillStatus: string;
|
|
skillFailure: string;
|
|
mcpStatus: string;
|
|
mcpFailure: string;
|
|
lastDeploymentAt: string;
|
|
restartStatus: string;
|
|
restartFailure: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentDirectoryItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.status = source["status"];
|
|
this.lastSeenAt = source["lastSeenAt"];
|
|
this.llmProfile = source["llmProfile"];
|
|
this.llmStatus = source["llmStatus"];
|
|
this.llmFailure = source["llmFailure"];
|
|
this.skillTotal = source["skillTotal"];
|
|
this.skillApplied = source["skillApplied"];
|
|
this.skillStatus = source["skillStatus"];
|
|
this.skillFailure = source["skillFailure"];
|
|
this.mcpStatus = source["mcpStatus"];
|
|
this.mcpFailure = source["mcpFailure"];
|
|
this.lastDeploymentAt = source["lastDeploymentAt"];
|
|
this.restartStatus = source["restartStatus"];
|
|
this.restartFailure = source["restartFailure"];
|
|
}
|
|
}
|
|
export class AgentDirectoryPage {
|
|
items: AgentDirectoryItem[];
|
|
page: number;
|
|
pageSize: number;
|
|
totalItems: number;
|
|
totalPages: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentDirectoryPage(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.items = this.convertValues(source["items"], AgentDirectoryItem);
|
|
this.page = source["page"];
|
|
this.pageSize = source["pageSize"];
|
|
this.totalItems = source["totalItems"];
|
|
this.totalPages = source["totalPages"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class AgentLLMStatus {
|
|
agentID: string;
|
|
agentName: string;
|
|
profileID: string;
|
|
profileName: string;
|
|
configVersion: number;
|
|
applyStatus: string;
|
|
lastError: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentLLMStatus(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agentID = source["agentID"];
|
|
this.agentName = source["agentName"];
|
|
this.profileID = source["profileID"];
|
|
this.profileName = source["profileName"];
|
|
this.configVersion = source["configVersion"];
|
|
this.applyStatus = source["applyStatus"];
|
|
this.lastError = source["lastError"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class AgentMCPStatus {
|
|
agentID: string;
|
|
agentName: string;
|
|
toolID: string;
|
|
toolName: string;
|
|
kind: string;
|
|
endpoint: string;
|
|
command: string;
|
|
version: string;
|
|
deployVersion: number;
|
|
applyStatus: string;
|
|
lastError: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentMCPStatus(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agentID = source["agentID"];
|
|
this.agentName = source["agentName"];
|
|
this.toolID = source["toolID"];
|
|
this.toolName = source["toolName"];
|
|
this.kind = source["kind"];
|
|
this.endpoint = source["endpoint"];
|
|
this.command = source["command"];
|
|
this.version = source["version"];
|
|
this.deployVersion = source["deployVersion"];
|
|
this.applyStatus = source["applyStatus"];
|
|
this.lastError = source["lastError"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class DeploymentFailure {
|
|
resource: string;
|
|
reason: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DeploymentFailure(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.resource = source["resource"];
|
|
this.reason = source["reason"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class AuditEvent {
|
|
id: number;
|
|
createdAt: string;
|
|
operator: string;
|
|
targetAgentID: string;
|
|
resourceType: string;
|
|
action: string;
|
|
result: string;
|
|
securityDetail: string;
|
|
actor: string;
|
|
target: string;
|
|
outcome: string;
|
|
detail: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AuditEvent(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.createdAt = source["createdAt"];
|
|
this.operator = source["operator"];
|
|
this.targetAgentID = source["targetAgentID"];
|
|
this.resourceType = source["resourceType"];
|
|
this.action = source["action"];
|
|
this.result = source["result"];
|
|
this.securityDetail = source["securityDetail"];
|
|
this.actor = source["actor"];
|
|
this.target = source["target"];
|
|
this.outcome = source["outcome"];
|
|
this.detail = source["detail"];
|
|
}
|
|
}
|
|
export class Task {
|
|
id: string;
|
|
agentID: string;
|
|
agentName: string;
|
|
instruction: string;
|
|
status: string;
|
|
createdAt: string;
|
|
startedAt: string;
|
|
finishedAt: string;
|
|
deadlineAt: string;
|
|
attempt: number;
|
|
retryOf: string;
|
|
output: string;
|
|
error: string;
|
|
execution: string;
|
|
attachmentCount: number;
|
|
sessionID: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Task(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.agentID = source["agentID"];
|
|
this.agentName = source["agentName"];
|
|
this.instruction = source["instruction"];
|
|
this.status = source["status"];
|
|
this.createdAt = source["createdAt"];
|
|
this.startedAt = source["startedAt"];
|
|
this.finishedAt = source["finishedAt"];
|
|
this.deadlineAt = source["deadlineAt"];
|
|
this.attempt = source["attempt"];
|
|
this.retryOf = source["retryOf"];
|
|
this.output = source["output"];
|
|
this.error = source["error"];
|
|
this.execution = source["execution"];
|
|
this.attachmentCount = source["attachmentCount"];
|
|
this.sessionID = source["sessionID"];
|
|
}
|
|
}
|
|
export class AgentOperationalDetail {
|
|
agent: Agent;
|
|
deployment: AgentDirectoryItem;
|
|
recentTasks: Task[];
|
|
recentAudit: AuditEvent[];
|
|
deploymentHistory: AuditEvent[];
|
|
failures: DeploymentFailure[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentOperationalDetail(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agent = this.convertValues(source["agent"], Agent);
|
|
this.deployment = this.convertValues(source["deployment"], AgentDirectoryItem);
|
|
this.recentTasks = this.convertValues(source["recentTasks"], Task);
|
|
this.recentAudit = this.convertValues(source["recentAudit"], AuditEvent);
|
|
this.deploymentHistory = this.convertValues(source["deploymentHistory"], AuditEvent);
|
|
this.failures = this.convertValues(source["failures"], DeploymentFailure);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class AgentRestart {
|
|
requestID: string;
|
|
agentID: string;
|
|
status: string;
|
|
requestedAt: string;
|
|
confirmedAt: string;
|
|
failure: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentRestart(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.requestID = source["requestID"];
|
|
this.agentID = source["agentID"];
|
|
this.status = source["status"];
|
|
this.requestedAt = source["requestedAt"];
|
|
this.confirmedAt = source["confirmedAt"];
|
|
this.failure = source["failure"];
|
|
}
|
|
}
|
|
export class AgentSkillStatus {
|
|
agentID: string;
|
|
agentName: string;
|
|
skillID: string;
|
|
skillName: string;
|
|
version: string;
|
|
applyStatus: string;
|
|
lastError: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AgentSkillStatus(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agentID = source["agentID"];
|
|
this.agentName = source["agentName"];
|
|
this.skillID = source["skillID"];
|
|
this.skillName = source["skillName"];
|
|
this.version = source["version"];
|
|
this.applyStatus = source["applyStatus"];
|
|
this.lastError = source["lastError"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
|
|
export class AuditFilter {
|
|
page: number;
|
|
pageSize: number;
|
|
agentID: string;
|
|
resourceType: string;
|
|
result: string;
|
|
fromAt: string;
|
|
toAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AuditFilter(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.page = source["page"];
|
|
this.pageSize = source["pageSize"];
|
|
this.agentID = source["agentID"];
|
|
this.resourceType = source["resourceType"];
|
|
this.result = source["result"];
|
|
this.fromAt = source["fromAt"];
|
|
this.toAt = source["toAt"];
|
|
}
|
|
}
|
|
export class AuditPage {
|
|
items: AuditEvent[];
|
|
page: number;
|
|
pageSize: number;
|
|
totalItems: number;
|
|
totalPages: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AuditPage(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.items = this.convertValues(source["items"], AuditEvent);
|
|
this.page = source["page"];
|
|
this.pageSize = source["pageSize"];
|
|
this.totalItems = source["totalItems"];
|
|
this.totalPages = source["totalPages"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class CreateTaskSessionResult {
|
|
taskID: string;
|
|
sessionID: string;
|
|
turns: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CreateTaskSessionResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.taskID = source["taskID"];
|
|
this.sessionID = source["sessionID"];
|
|
this.turns = source["turns"];
|
|
}
|
|
}
|
|
|
|
export class LLMProfile {
|
|
id: string;
|
|
name: string;
|
|
provider: string;
|
|
baseURL: string;
|
|
model: string;
|
|
supportsImages: boolean;
|
|
hasAPIKey: boolean;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new LLMProfile(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.provider = source["provider"];
|
|
this.baseURL = source["baseURL"];
|
|
this.model = source["model"];
|
|
this.supportsImages = source["supportsImages"];
|
|
this.hasAPIKey = source["hasAPIKey"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class LLMProfileInput {
|
|
id: string;
|
|
name: string;
|
|
provider: string;
|
|
baseURL: string;
|
|
model: string;
|
|
supportsImages: boolean;
|
|
apiKey: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new LLMProfileInput(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.provider = source["provider"];
|
|
this.baseURL = source["baseURL"];
|
|
this.model = source["model"];
|
|
this.supportsImages = source["supportsImages"];
|
|
this.apiKey = source["apiKey"];
|
|
}
|
|
}
|
|
export class MCPTool {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
kind: string;
|
|
endpoint: string;
|
|
command: string;
|
|
args: string[];
|
|
version: string;
|
|
updatedAt: string;
|
|
agentCount: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MCPTool(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.description = source["description"];
|
|
this.kind = source["kind"];
|
|
this.endpoint = source["endpoint"];
|
|
this.command = source["command"];
|
|
this.args = source["args"];
|
|
this.version = source["version"];
|
|
this.updatedAt = source["updatedAt"];
|
|
this.agentCount = source["agentCount"];
|
|
}
|
|
}
|
|
export class MCPToolInput {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
kind: string;
|
|
endpoint: string;
|
|
command: string;
|
|
args: string[];
|
|
version: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MCPToolInput(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.description = source["description"];
|
|
this.kind = source["kind"];
|
|
this.endpoint = source["endpoint"];
|
|
this.command = source["command"];
|
|
this.args = source["args"];
|
|
this.version = source["version"];
|
|
}
|
|
}
|
|
export class MentionTask {
|
|
line: number;
|
|
mention: string;
|
|
agentID: string;
|
|
agentName: string;
|
|
instruction: string;
|
|
taskID: string;
|
|
error: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MentionTask(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.line = source["line"];
|
|
this.mention = source["mention"];
|
|
this.agentID = source["agentID"];
|
|
this.agentName = source["agentName"];
|
|
this.instruction = source["instruction"];
|
|
this.taskID = source["taskID"];
|
|
this.error = source["error"];
|
|
}
|
|
}
|
|
export class MentionDispatchResponse {
|
|
tasks: MentionTask[];
|
|
issues: string[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MentionDispatchResponse(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.tasks = this.convertValues(source["tasks"], MentionTask);
|
|
this.issues = source["issues"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
export class Skill {
|
|
id: string;
|
|
name: string;
|
|
version: string;
|
|
checksum: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Skill(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.version = source["version"];
|
|
this.checksum = source["checksum"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class SkillDocument {
|
|
id: string;
|
|
name: string;
|
|
version: string;
|
|
content: string;
|
|
updatedAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SkillDocument(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.version = source["version"];
|
|
this.content = source["content"];
|
|
this.updatedAt = source["updatedAt"];
|
|
}
|
|
}
|
|
export class SkillInput {
|
|
name: string;
|
|
version: string;
|
|
content: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SkillInput(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.version = source["version"];
|
|
this.content = source["content"];
|
|
}
|
|
}
|
|
export class Snapshot {
|
|
onlineAgents: number;
|
|
runningTasks: number;
|
|
listener: string;
|
|
localIP: string;
|
|
agentURL: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Snapshot(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.onlineAgents = source["onlineAgents"];
|
|
this.runningTasks = source["runningTasks"];
|
|
this.listener = source["listener"];
|
|
this.localIP = source["localIP"];
|
|
this.agentURL = source["agentURL"];
|
|
}
|
|
}
|
|
|
|
export class TaskAttachment {
|
|
name: string;
|
|
mediaType: string;
|
|
dataURL: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskAttachment(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.mediaType = source["mediaType"];
|
|
this.dataURL = source["dataURL"];
|
|
}
|
|
}
|
|
export class TaskEvent {
|
|
type: string;
|
|
message: string;
|
|
createdAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskEvent(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.type = source["type"];
|
|
this.message = source["message"];
|
|
this.createdAt = source["createdAt"];
|
|
}
|
|
}
|
|
export class TaskDetail {
|
|
task: Task;
|
|
events: TaskEvent[];
|
|
attachments: TaskAttachment[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskDetail(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.task = this.convertValues(source["task"], Task);
|
|
this.events = this.convertValues(source["events"], TaskEvent);
|
|
this.attachments = this.convertValues(source["attachments"], TaskAttachment);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class TaskDispatchResult {
|
|
agentID: string;
|
|
taskID: string;
|
|
error: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskDispatchResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agentID = source["agentID"];
|
|
this.taskID = source["taskID"];
|
|
this.error = source["error"];
|
|
}
|
|
}
|
|
|
|
export class TaskImageInput {
|
|
name: string;
|
|
dataURL: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskImageInput(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.dataURL = source["dataURL"];
|
|
}
|
|
}
|
|
export class TaskRequest {
|
|
agentID: string;
|
|
instruction: string;
|
|
timeoutSeconds: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskRequest(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.agentID = source["agentID"];
|
|
this.instruction = source["instruction"];
|
|
this.timeoutSeconds = source["timeoutSeconds"];
|
|
}
|
|
}
|
|
export class TaskSessionTurn {
|
|
instruction: string;
|
|
answer: string;
|
|
createdAt: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TaskSessionTurn(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.instruction = source["instruction"];
|
|
this.answer = source["answer"];
|
|
this.createdAt = source["createdAt"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace main {
|
|
|
|
export class SkillImportResult {
|
|
imported: number;
|
|
notes: string[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SkillImportResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.imported = source["imported"];
|
|
this.notes = source["notes"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|