@mlhub/agents-ts-sdk 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +37 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/AgentsApi.d.ts +79 -0
- package/dist/apis/AgentsApi.js +281 -0
- package/dist/apis/HealthApi.d.ts +25 -0
- package/dist/apis/HealthApi.js +118 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Agent.d.ts +130 -0
- package/dist/models/Agent.js +76 -0
- package/dist/models/AgentArtifactType.d.ts +27 -0
- package/dist/models/AgentArtifactType.js +42 -0
- package/dist/models/AgentDeploymentModality.d.ts +23 -0
- package/dist/models/AgentDeploymentModality.js +38 -0
- package/dist/models/AgentLiveness.d.ts +23 -0
- package/dist/models/AgentLiveness.js +38 -0
- package/dist/models/AgentProvider.d.ts +33 -0
- package/dist/models/AgentProvider.js +42 -0
- package/dist/models/AgentRecord.d.ts +124 -0
- package/dist/models/AgentRecord.js +74 -0
- package/dist/models/AgentSkill.d.ts +51 -0
- package/dist/models/AgentSkill.js +48 -0
- package/dist/models/ArtifactLocator.d.ts +34 -0
- package/dist/models/ArtifactLocator.js +43 -0
- package/dist/models/Capabilities.d.ts +33 -0
- package/dist/models/Capabilities.js +42 -0
- package/dist/models/CreateAgentBody.d.ts +76 -0
- package/dist/models/CreateAgentBody.js +58 -0
- package/dist/models/CreateAgentRecordBody.d.ts +106 -0
- package/dist/models/CreateAgentRecordBody.js +68 -0
- package/dist/models/CreateAgentRecordResponse.d.ts +52 -0
- package/dist/models/CreateAgentRecordResponse.js +49 -0
- package/dist/models/CreateAgentResponse.d.ts +52 -0
- package/dist/models/CreateAgentResponse.js +49 -0
- package/dist/models/Endpoint.d.ts +57 -0
- package/dist/models/Endpoint.js +50 -0
- package/dist/models/ListAgentRecordsResponse.d.ts +52 -0
- package/dist/models/ListAgentRecordsResponse.js +49 -0
- package/dist/models/ListAgentsResponse.d.ts +52 -0
- package/dist/models/ListAgentsResponse.js +49 -0
- package/dist/models/MessageBinding.d.ts +24 -0
- package/dist/models/MessageBinding.js +39 -0
- package/dist/models/RestHttpAgentEndpoint.d.ts +46 -0
- package/dist/models/RestHttpAgentEndpoint.js +48 -0
- package/dist/models/RestHttpAgentInterface.d.ts +46 -0
- package/dist/models/RestHttpAgentInterface.js +48 -0
- package/dist/models/RestHttpLivenessProbe.d.ts +51 -0
- package/dist/models/RestHttpLivenessProbe.js +48 -0
- package/dist/models/RpcAgentEndpoint.d.ts +40 -0
- package/dist/models/RpcAgentEndpoint.js +46 -0
- package/dist/models/RpcAgentInterface.d.ts +40 -0
- package/dist/models/RpcAgentInterface.js +46 -0
- package/dist/models/StdioAgentEndpoint.d.ts +40 -0
- package/dist/models/StdioAgentEndpoint.js +46 -0
- package/dist/models/StdioAgentInterface.d.ts +40 -0
- package/dist/models/StdioAgentInterface.js +46 -0
- package/dist/models/Visibility.d.ts +23 -0
- package/dist/models/Visibility.js +38 -0
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +43 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.js +430 -0
- package/package.json +15 -0
- package/src/apis/AgentsApi.ts +207 -0
- package/src/apis/HealthApi.ts +48 -0
- package/src/apis/index.ts +4 -0
- package/src/index.ts +5 -0
- package/src/models/Agent.ts +223 -0
- package/src/models/AgentArtifactType.ts +40 -0
- package/src/models/AgentDeploymentModality.ts +36 -0
- package/src/models/AgentLiveness.ts +36 -0
- package/src/models/AgentProvider.ts +64 -0
- package/src/models/AgentRecord.ts +219 -0
- package/src/models/AgentSkill.ts +88 -0
- package/src/models/ArtifactLocator.ts +71 -0
- package/src/models/Capabilities.ts +64 -0
- package/src/models/CreateAgentBody.ts +143 -0
- package/src/models/CreateAgentRecordBody.ts +195 -0
- package/src/models/CreateAgentRecordResponse.ts +95 -0
- package/src/models/CreateAgentResponse.ts +95 -0
- package/src/models/Endpoint.ts +96 -0
- package/src/models/ListAgentRecordsResponse.ts +95 -0
- package/src/models/ListAgentsResponse.ts +95 -0
- package/src/models/MessageBinding.ts +37 -0
- package/src/models/RestHttpAgentEndpoint.ts +91 -0
- package/src/models/RestHttpAgentInterface.ts +91 -0
- package/src/models/RestHttpLivenessProbe.ts +88 -0
- package/src/models/RpcAgentEndpoint.ts +79 -0
- package/src/models/RpcAgentInterface.ts +79 -0
- package/src/models/StdioAgentEndpoint.ts +79 -0
- package/src/models/StdioAgentInterface.ts +79 -0
- package/src/models/Visibility.ts +36 -0
- package/src/models/index.ts +27 -0
- package/src/runtime.ts +320 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import {
|
|
18
|
+
CreateAgentBody,
|
|
19
|
+
CreateAgentBodyFromJSON,
|
|
20
|
+
CreateAgentBodyToJSON,
|
|
21
|
+
CreateAgentRecordBody,
|
|
22
|
+
CreateAgentRecordBodyFromJSON,
|
|
23
|
+
CreateAgentRecordBodyToJSON,
|
|
24
|
+
CreateAgentRecordResponse,
|
|
25
|
+
CreateAgentRecordResponseFromJSON,
|
|
26
|
+
CreateAgentRecordResponseToJSON,
|
|
27
|
+
CreateAgentResponse,
|
|
28
|
+
CreateAgentResponseFromJSON,
|
|
29
|
+
CreateAgentResponseToJSON,
|
|
30
|
+
ListAgentRecordsResponse,
|
|
31
|
+
ListAgentRecordsResponseFromJSON,
|
|
32
|
+
ListAgentRecordsResponseToJSON,
|
|
33
|
+
ListAgentsResponse,
|
|
34
|
+
ListAgentsResponseFromJSON,
|
|
35
|
+
ListAgentsResponseToJSON,
|
|
36
|
+
} from '../models';
|
|
37
|
+
|
|
38
|
+
export interface CreateAgentRequest {
|
|
39
|
+
createAgentBody: CreateAgentBody;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CreateAgentRecordRequest {
|
|
43
|
+
createAgentRecordBody: CreateAgentRecordBody;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ListAgentRecordsRequest {
|
|
47
|
+
scope: ListAgentRecordsScopeEnum;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ListAgentsRequest {
|
|
51
|
+
scope: ListAgentsScopeEnum;
|
|
52
|
+
includeEndpoints: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export class AgentsApi extends runtime.BaseAPI {
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Register an agent
|
|
62
|
+
*/
|
|
63
|
+
async createAgentRaw(requestParameters: CreateAgentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CreateAgentResponse>> {
|
|
64
|
+
if (requestParameters.createAgentBody === null || requestParameters.createAgentBody === undefined) {
|
|
65
|
+
throw new runtime.RequiredError('createAgentBody','Required parameter requestParameters.createAgentBody was null or undefined when calling createAgent.');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const queryParameters: any = {};
|
|
69
|
+
|
|
70
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
71
|
+
|
|
72
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
const response = await this.request({
|
|
75
|
+
path: `/agents-api/agents`,
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers: headerParameters,
|
|
78
|
+
query: queryParameters,
|
|
79
|
+
body: CreateAgentBodyToJSON(requestParameters.createAgentBody),
|
|
80
|
+
}, initOverrides);
|
|
81
|
+
|
|
82
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CreateAgentResponseFromJSON(jsonValue));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Register an agent
|
|
87
|
+
*/
|
|
88
|
+
async createAgent(requestParameters: CreateAgentRequest, initOverrides?: RequestInit): Promise<CreateAgentResponse> {
|
|
89
|
+
const response = await this.createAgentRaw(requestParameters, initOverrides);
|
|
90
|
+
return await response.value();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Create an agent record
|
|
95
|
+
*/
|
|
96
|
+
async createAgentRecordRaw(requestParameters: CreateAgentRecordRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CreateAgentRecordResponse>> {
|
|
97
|
+
if (requestParameters.createAgentRecordBody === null || requestParameters.createAgentRecordBody === undefined) {
|
|
98
|
+
throw new runtime.RequiredError('createAgentRecordBody','Required parameter requestParameters.createAgentRecordBody was null or undefined when calling createAgentRecord.');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const queryParameters: any = {};
|
|
102
|
+
|
|
103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
104
|
+
|
|
105
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
106
|
+
|
|
107
|
+
const response = await this.request({
|
|
108
|
+
path: `/agents-api/agent-records`,
|
|
109
|
+
method: 'POST',
|
|
110
|
+
headers: headerParameters,
|
|
111
|
+
query: queryParameters,
|
|
112
|
+
body: CreateAgentRecordBodyToJSON(requestParameters.createAgentRecordBody),
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CreateAgentRecordResponseFromJSON(jsonValue));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Create an agent record
|
|
120
|
+
*/
|
|
121
|
+
async createAgentRecord(requestParameters: CreateAgentRecordRequest, initOverrides?: RequestInit): Promise<CreateAgentRecordResponse> {
|
|
122
|
+
const response = await this.createAgentRecordRaw(requestParameters, initOverrides);
|
|
123
|
+
return await response.value();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* List agent records
|
|
128
|
+
*/
|
|
129
|
+
async listAgentRecordsRaw(requestParameters: ListAgentRecordsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListAgentRecordsResponse>> {
|
|
130
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
131
|
+
throw new runtime.RequiredError('scope','Required parameter requestParameters.scope was null or undefined when calling listAgentRecords.');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const queryParameters: any = {};
|
|
135
|
+
|
|
136
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
137
|
+
|
|
138
|
+
const response = await this.request({
|
|
139
|
+
path: `/agents-api/agent-records`.replace(`{${"scope"}}`, encodeURIComponent(String(requestParameters.scope))),
|
|
140
|
+
method: 'GET',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListAgentRecordsResponseFromJSON(jsonValue));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* List agent records
|
|
150
|
+
*/
|
|
151
|
+
async listAgentRecords(requestParameters: ListAgentRecordsRequest, initOverrides?: RequestInit): Promise<ListAgentRecordsResponse> {
|
|
152
|
+
const response = await this.listAgentRecordsRaw(requestParameters, initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* List agents
|
|
158
|
+
*/
|
|
159
|
+
async listAgentsRaw(requestParameters: ListAgentsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListAgentsResponse>> {
|
|
160
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
161
|
+
throw new runtime.RequiredError('scope','Required parameter requestParameters.scope was null or undefined when calling listAgents.');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (requestParameters.includeEndpoints === null || requestParameters.includeEndpoints === undefined) {
|
|
165
|
+
throw new runtime.RequiredError('includeEndpoints','Required parameter requestParameters.includeEndpoints was null or undefined when calling listAgents.');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const queryParameters: any = {};
|
|
169
|
+
|
|
170
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
171
|
+
|
|
172
|
+
const response = await this.request({
|
|
173
|
+
path: `/agents-api/agents`.replace(`{${"scope"}}`, encodeURIComponent(String(requestParameters.scope))).replace(`{${"include_endpoints"}}`, encodeURIComponent(String(requestParameters.includeEndpoints))),
|
|
174
|
+
method: 'GET',
|
|
175
|
+
headers: headerParameters,
|
|
176
|
+
query: queryParameters,
|
|
177
|
+
}, initOverrides);
|
|
178
|
+
|
|
179
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListAgentsResponseFromJSON(jsonValue));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* List agents
|
|
184
|
+
*/
|
|
185
|
+
async listAgents(requestParameters: ListAgentsRequest, initOverrides?: RequestInit): Promise<ListAgentsResponse> {
|
|
186
|
+
const response = await this.listAgentsRaw(requestParameters, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @export
|
|
194
|
+
* @enum {string}
|
|
195
|
+
*/
|
|
196
|
+
export enum ListAgentRecordsScopeEnum {
|
|
197
|
+
Owned = 'Owned',
|
|
198
|
+
Shared = 'Shared'
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @export
|
|
202
|
+
* @enum {string}
|
|
203
|
+
*/
|
|
204
|
+
export enum ListAgentsScopeEnum {
|
|
205
|
+
Owned = 'Owned',
|
|
206
|
+
Shared = 'Shared'
|
|
207
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export class HealthApi extends runtime.BaseAPI {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Check service health
|
|
25
|
+
*/
|
|
26
|
+
async healthcheckRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
|
27
|
+
const queryParameters: any = {};
|
|
28
|
+
|
|
29
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
30
|
+
|
|
31
|
+
const response = await this.request({
|
|
32
|
+
path: `/agents-api/healthcheck`,
|
|
33
|
+
method: 'GET',
|
|
34
|
+
headers: headerParameters,
|
|
35
|
+
query: queryParameters,
|
|
36
|
+
}, initOverrides);
|
|
37
|
+
|
|
38
|
+
return new runtime.VoidApiResponse(response);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check service health
|
|
43
|
+
*/
|
|
44
|
+
async healthcheck(initOverrides?: RequestInit): Promise<void> {
|
|
45
|
+
await this.healthcheckRaw(initOverrides);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
AgentDeploymentModality,
|
|
18
|
+
AgentDeploymentModalityFromJSON,
|
|
19
|
+
AgentDeploymentModalityFromJSONTyped,
|
|
20
|
+
AgentDeploymentModalityToJSON,
|
|
21
|
+
AgentLiveness,
|
|
22
|
+
AgentLivenessFromJSON,
|
|
23
|
+
AgentLivenessFromJSONTyped,
|
|
24
|
+
AgentLivenessToJSON,
|
|
25
|
+
Endpoint,
|
|
26
|
+
EndpointFromJSON,
|
|
27
|
+
EndpointFromJSONTyped,
|
|
28
|
+
EndpointToJSON,
|
|
29
|
+
RestHttpAgentEndpoint,
|
|
30
|
+
RestHttpAgentEndpointFromJSON,
|
|
31
|
+
RestHttpAgentEndpointFromJSONTyped,
|
|
32
|
+
RestHttpAgentEndpointToJSON,
|
|
33
|
+
RpcAgentEndpoint,
|
|
34
|
+
RpcAgentEndpointFromJSON,
|
|
35
|
+
RpcAgentEndpointFromJSONTyped,
|
|
36
|
+
RpcAgentEndpointToJSON,
|
|
37
|
+
StdioAgentEndpoint,
|
|
38
|
+
StdioAgentEndpointFromJSON,
|
|
39
|
+
StdioAgentEndpointFromJSONTyped,
|
|
40
|
+
StdioAgentEndpointToJSON,
|
|
41
|
+
Visibility,
|
|
42
|
+
VisibilityFromJSON,
|
|
43
|
+
VisibilityFromJSONTyped,
|
|
44
|
+
VisibilityToJSON,
|
|
45
|
+
} from './';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
* @interface Agent
|
|
51
|
+
*/
|
|
52
|
+
export interface Agent {
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof Agent
|
|
57
|
+
*/
|
|
58
|
+
agent_record_id?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof Agent
|
|
63
|
+
*/
|
|
64
|
+
consecutive_missed_heartbeats: number;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof Agent
|
|
69
|
+
*/
|
|
70
|
+
created_at: string;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {AgentDeploymentModality}
|
|
74
|
+
* @memberof Agent
|
|
75
|
+
*/
|
|
76
|
+
deployment_modality: AgentDeploymentModality;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof Agent
|
|
81
|
+
*/
|
|
82
|
+
description: string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Array<Endpoint>}
|
|
86
|
+
* @memberof Agent
|
|
87
|
+
*/
|
|
88
|
+
endpoints: Array<Endpoint>;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof Agent
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {string}
|
|
98
|
+
* @memberof Agent
|
|
99
|
+
*/
|
|
100
|
+
last_missed_heartbeat?: string | null;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof Agent
|
|
105
|
+
*/
|
|
106
|
+
last_modified: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {AgentLiveness}
|
|
110
|
+
* @memberof Agent
|
|
111
|
+
*/
|
|
112
|
+
liveness: AgentLiveness;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @type {string}
|
|
116
|
+
* @memberof Agent
|
|
117
|
+
*/
|
|
118
|
+
name: string;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @type {string}
|
|
122
|
+
* @memberof Agent
|
|
123
|
+
*/
|
|
124
|
+
owner: string;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @type {Array<RestHttpAgentEndpoint>}
|
|
128
|
+
* @memberof Agent
|
|
129
|
+
*/
|
|
130
|
+
rest_http_endpoints: Array<RestHttpAgentEndpoint>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @type {Array<RpcAgentEndpoint>}
|
|
134
|
+
* @memberof Agent
|
|
135
|
+
*/
|
|
136
|
+
rpc_endpoints: Array<RpcAgentEndpoint>;
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @type {Array<StdioAgentEndpoint>}
|
|
140
|
+
* @memberof Agent
|
|
141
|
+
*/
|
|
142
|
+
stdio_endpoints: Array<StdioAgentEndpoint>;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @type {Array<string>}
|
|
146
|
+
* @memberof Agent
|
|
147
|
+
*/
|
|
148
|
+
tags: Array<string>;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @type {string}
|
|
152
|
+
* @memberof Agent
|
|
153
|
+
*/
|
|
154
|
+
tenant_id: string;
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
* @type {Visibility}
|
|
158
|
+
* @memberof Agent
|
|
159
|
+
*/
|
|
160
|
+
visibility: Visibility;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function AgentFromJSON(json: any): Agent {
|
|
164
|
+
return AgentFromJSONTyped(json, false);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Agent {
|
|
168
|
+
if ((json === undefined) || (json === null)) {
|
|
169
|
+
return json;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
|
|
173
|
+
'agent_record_id': !exists(json, 'agent_record_id') ? undefined : json['agent_record_id'],
|
|
174
|
+
'consecutive_missed_heartbeats': json['consecutive_missed_heartbeats'],
|
|
175
|
+
'created_at': json['created_at'],
|
|
176
|
+
'deployment_modality': AgentDeploymentModalityFromJSON(json['deployment_modality']),
|
|
177
|
+
'description': json['description'],
|
|
178
|
+
'endpoints': ((json['endpoints'] as Array<any>).map(EndpointFromJSON)),
|
|
179
|
+
'id': json['id'],
|
|
180
|
+
'last_missed_heartbeat': !exists(json, 'last_missed_heartbeat') ? undefined : json['last_missed_heartbeat'],
|
|
181
|
+
'last_modified': json['last_modified'],
|
|
182
|
+
'liveness': AgentLivenessFromJSON(json['liveness']),
|
|
183
|
+
'name': json['name'],
|
|
184
|
+
'owner': json['owner'],
|
|
185
|
+
'rest_http_endpoints': ((json['rest_http_endpoints'] as Array<any>).map(RestHttpAgentEndpointFromJSON)),
|
|
186
|
+
'rpc_endpoints': ((json['rpc_endpoints'] as Array<any>).map(RpcAgentEndpointFromJSON)),
|
|
187
|
+
'stdio_endpoints': ((json['stdio_endpoints'] as Array<any>).map(StdioAgentEndpointFromJSON)),
|
|
188
|
+
'tags': json['tags'],
|
|
189
|
+
'tenant_id': json['tenant_id'],
|
|
190
|
+
'visibility': VisibilityFromJSON(json['visibility']),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function AgentToJSON(value?: Agent | null): any {
|
|
195
|
+
if (value === undefined) {
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
if (value === null) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
return {
|
|
202
|
+
|
|
203
|
+
'agent_record_id': value.agent_record_id,
|
|
204
|
+
'consecutive_missed_heartbeats': value.consecutive_missed_heartbeats,
|
|
205
|
+
'created_at': value.created_at,
|
|
206
|
+
'deployment_modality': AgentDeploymentModalityToJSON(value.deployment_modality),
|
|
207
|
+
'description': value.description,
|
|
208
|
+
'endpoints': ((value.endpoints as Array<any>).map(EndpointToJSON)),
|
|
209
|
+
'id': value.id,
|
|
210
|
+
'last_missed_heartbeat': value.last_missed_heartbeat,
|
|
211
|
+
'last_modified': value.last_modified,
|
|
212
|
+
'liveness': AgentLivenessToJSON(value.liveness),
|
|
213
|
+
'name': value.name,
|
|
214
|
+
'owner': value.owner,
|
|
215
|
+
'rest_http_endpoints': ((value.rest_http_endpoints as Array<any>).map(RestHttpAgentEndpointToJSON)),
|
|
216
|
+
'rpc_endpoints': ((value.rpc_endpoints as Array<any>).map(RpcAgentEndpointToJSON)),
|
|
217
|
+
'stdio_endpoints': ((value.stdio_endpoints as Array<any>).map(StdioAgentEndpointToJSON)),
|
|
218
|
+
'tags': value.tags,
|
|
219
|
+
'tenant_id': value.tenant_id,
|
|
220
|
+
'visibility': VisibilityToJSON(value.visibility),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum AgentArtifactType {
|
|
21
|
+
Binary = 'Binary',
|
|
22
|
+
DockerImage = 'DockerImage',
|
|
23
|
+
HelmChart = 'HelmChart',
|
|
24
|
+
PythonPackage = 'PythonPackage',
|
|
25
|
+
SourceCode = 'SourceCode',
|
|
26
|
+
Unspecified = 'Unspecified'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function AgentArtifactTypeFromJSON(json: any): AgentArtifactType {
|
|
30
|
+
return AgentArtifactTypeFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function AgentArtifactTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentArtifactType {
|
|
34
|
+
return json as AgentArtifactType;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function AgentArtifactTypeToJSON(value?: AgentArtifactType | null): any {
|
|
38
|
+
return value as any;
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum AgentDeploymentModality {
|
|
21
|
+
Persistent = 'Persistent',
|
|
22
|
+
OnDemand = 'OnDemand'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function AgentDeploymentModalityFromJSON(json: any): AgentDeploymentModality {
|
|
26
|
+
return AgentDeploymentModalityFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function AgentDeploymentModalityFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentDeploymentModality {
|
|
30
|
+
return json as AgentDeploymentModality;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function AgentDeploymentModalityToJSON(value?: AgentDeploymentModality | null): any {
|
|
34
|
+
return value as any;
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum AgentLiveness {
|
|
21
|
+
Alive = 'Alive',
|
|
22
|
+
Dead = 'Dead'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function AgentLivenessFromJSON(json: any): AgentLiveness {
|
|
26
|
+
return AgentLivenessFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function AgentLivenessFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentLiveness {
|
|
30
|
+
return json as AgentLiveness;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function AgentLivenessToJSON(value?: AgentLiveness | null): any {
|
|
34
|
+
return value as any;
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Agents API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AgentProvider
|
|
20
|
+
*/
|
|
21
|
+
export interface AgentProvider {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AgentProvider
|
|
26
|
+
*/
|
|
27
|
+
organization: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AgentProvider
|
|
32
|
+
*/
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function AgentProviderFromJSON(json: any): AgentProvider {
|
|
37
|
+
return AgentProviderFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function AgentProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentProvider {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'organization': json['organization'],
|
|
47
|
+
'url': json['url'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function AgentProviderToJSON(value?: AgentProvider | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'organization': value.organization,
|
|
61
|
+
'url': value.url,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|