@daocloud-proto/agentclaw 0.1.1 → 0.2.0-1-g4ae2961

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/agentclaw",
3
- "version":"0.1.1",
3
+ "version":"0.2.0-1-g4ae2961",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,161 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../fetch.pb"
8
+ import * as GoogleProtobufEmpty from "../../google/api/empty.pb"
9
+ import * as AgentclawV1alpha1TypesTypes from "../types/types.pb"
10
+
11
+ export enum AgentImagePortName {
12
+ AGENT_IMAGE_PORT_NAME_UNSPECIFIED = "AGENT_IMAGE_PORT_NAME_UNSPECIFIED",
13
+ AGENT_IMAGE_PORT_NAME_OPENCLAW = "AGENT_IMAGE_PORT_NAME_OPENCLAW",
14
+ AGENT_IMAGE_PORT_NAME_NOVNC = "AGENT_IMAGE_PORT_NAME_NOVNC",
15
+ }
16
+
17
+ export type ListWorkspaceAgentInstancesRequest = {
18
+ workspaceId?: number
19
+ fuzzyName?: string
20
+ page?: number
21
+ pageSize?: number
22
+ }
23
+
24
+ export type ListWorkspaceAgentInstancesResponse = {
25
+ items?: AgentclawV1alpha1TypesTypes.AgentInstance[]
26
+ pagination?: AgentclawV1alpha1TypesTypes.Pagination
27
+ }
28
+
29
+ export type GetWorkspaceAgentInstanceRequest = {
30
+ workspaceId?: number
31
+ cluster?: string
32
+ namespace?: string
33
+ name?: string
34
+ }
35
+
36
+ export type GetWorkspaceAgentInstanceResponse = {
37
+ item?: AgentclawV1alpha1TypesTypes.AgentInstance
38
+ }
39
+
40
+ export type AgentInstanceSpec = {
41
+ name?: string
42
+ image?: string
43
+ networkConfig?: NetworkConfig
44
+ feishu?: AgentclawV1alpha1TypesTypes.FeishuConfig
45
+ modelConfig?: AgentclawV1alpha1TypesTypes.ModelConfig
46
+ resources?: AgentclawV1alpha1TypesTypes.ResourceConfig
47
+ }
48
+
49
+ export type NetworkConfig = {
50
+ openclaw?: ServiceConfig
51
+ novnc?: ServiceConfig
52
+ }
53
+
54
+ export type ServiceConfig = {
55
+ type?: AgentclawV1alpha1TypesTypes.ServiceType
56
+ port?: number
57
+ nodeportConfig?: NodePortConfig
58
+ }
59
+
60
+ export type NodePortConfig = {
61
+ nodePort?: number
62
+ }
63
+
64
+ export type CreateWorkspaceAgentInstanceRequest = {
65
+ workspaceId?: number
66
+ cluster?: string
67
+ namespace?: string
68
+ spec?: AgentInstanceSpec
69
+ }
70
+
71
+ export type CreateWorkspaceAgentInstanceResponse = {
72
+ item?: AgentclawV1alpha1TypesTypes.AgentInstance
73
+ }
74
+
75
+ export type UpdateWorkspaceAgentInstanceRequest = {
76
+ workspaceId?: number
77
+ cluster?: string
78
+ namespace?: string
79
+ name?: string
80
+ spec?: AgentInstanceSpec
81
+ }
82
+
83
+ export type UpdateWorkspaceAgentInstanceResponse = {
84
+ item?: AgentclawV1alpha1TypesTypes.AgentInstance
85
+ }
86
+
87
+ export type DeleteWorkspaceAgentInstanceRequest = {
88
+ workspaceId?: number
89
+ cluster?: string
90
+ namespace?: string
91
+ name?: string
92
+ }
93
+
94
+ export type StopWorkspaceAgentInstanceRequest = {
95
+ workspaceId?: number
96
+ cluster?: string
97
+ namespace?: string
98
+ name?: string
99
+ }
100
+
101
+ export type StartWorkspaceAgentInstanceRequest = {
102
+ workspaceId?: number
103
+ cluster?: string
104
+ namespace?: string
105
+ name?: string
106
+ }
107
+
108
+ export type RestartWorkspaceAgentInstanceRequest = {
109
+ workspaceId?: number
110
+ cluster?: string
111
+ namespace?: string
112
+ name?: string
113
+ }
114
+
115
+ export type ListWorkspaceAgentImageRequest = {
116
+ workspace?: number
117
+ }
118
+
119
+ export type ListWorkspaceAgentImageResponse = {
120
+ items?: AgentImage[]
121
+ }
122
+
123
+ export type AgentImagePort = {
124
+ name?: AgentImagePortName
125
+ port?: number
126
+ }
127
+
128
+ export type AgentImage = {
129
+ image?: string
130
+ ports?: AgentImagePort[]
131
+ }
132
+
133
+ export class AgentService {
134
+ static ListWorkspaceAgentInstances(req: ListWorkspaceAgentInstancesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceAgentInstancesResponse> {
135
+ return fm.fetchReq<ListWorkspaceAgentInstancesRequest, ListWorkspaceAgentInstancesResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/agent-instances?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
136
+ }
137
+ static GetWorkspaceAgentInstance(req: GetWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceAgentInstanceResponse> {
138
+ return fm.fetchReq<GetWorkspaceAgentInstanceRequest, GetWorkspaceAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
139
+ }
140
+ static CreateWorkspaceAgentInstance(req: CreateWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<CreateWorkspaceAgentInstanceResponse> {
141
+ return fm.fetchReq<CreateWorkspaceAgentInstanceRequest, CreateWorkspaceAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/agent-instances`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
142
+ }
143
+ static UpdateWorkspaceAgentInstance(req: UpdateWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<UpdateWorkspaceAgentInstanceResponse> {
144
+ return fm.fetchReq<UpdateWorkspaceAgentInstanceRequest, UpdateWorkspaceAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
145
+ }
146
+ static DeleteWorkspaceAgentInstance(req: DeleteWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
147
+ return fm.fetchReq<DeleteWorkspaceAgentInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}`, {...initReq, method: "DELETE"})
148
+ }
149
+ static StopWorkspaceAgentInstance(req: StopWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
150
+ return fm.fetchReq<StopWorkspaceAgentInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/stop`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
151
+ }
152
+ static StartWorkspaceAgentInstance(req: StartWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
153
+ return fm.fetchReq<StartWorkspaceAgentInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/start`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
154
+ }
155
+ static RestartWorkspaceAgentInstance(req: RestartWorkspaceAgentInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
156
+ return fm.fetchReq<RestartWorkspaceAgentInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
157
+ }
158
+ static ListWorkspaceAgentImage(req: ListWorkspaceAgentImageRequest, initReq?: fm.InitReq): Promise<ListWorkspaceAgentImageResponse> {
159
+ return fm.fetchReq<ListWorkspaceAgentImageRequest, ListWorkspaceAgentImageResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/agent-images?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
160
+ }
161
+ }
@@ -0,0 +1,43 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../fetch.pb"
8
+ export type ListModelRequest = {
9
+ workspace?: number
10
+ search?: string
11
+ }
12
+
13
+ export type ModelSummary = {
14
+ modelId?: string
15
+ modelName?: string
16
+ }
17
+
18
+ export type ListModelResponse = {
19
+ items?: ModelSummary[]
20
+ }
21
+
22
+ export type ListAPIKeyRequest = {
23
+ workspace?: number
24
+ sort?: string
25
+ }
26
+
27
+ export type APIKeySummary = {
28
+ id?: string
29
+ name?: string
30
+ }
31
+
32
+ export type ListAPIKeyResponse = {
33
+ items?: APIKeySummary[]
34
+ }
35
+
36
+ export class ModelService {
37
+ static ListModels(req: ListModelRequest, initReq?: fm.InitReq): Promise<ListModelResponse> {
38
+ return fm.fetchReq<ListModelRequest, ListModelResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
39
+ }
40
+ static ListAPIKey(req: ListAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
41
+ return fm.fetchReq<ListAPIKeyRequest, ListAPIKeyResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/apikeys?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
42
+ }
43
+ }
@@ -0,0 +1,88 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ export enum InstanceStatus {
8
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
9
+ STARTING = "STARTING",
10
+ RUNNING = "RUNNING",
11
+ STOPPED = "STOPPED",
12
+ }
13
+
14
+ export enum ServiceType {
15
+ SERVICE_TYPE_UNSPECIFIED = "SERVICE_TYPE_UNSPECIFIED",
16
+ NODE_PORT = "NODE_PORT",
17
+ }
18
+
19
+ export type AgentInstance = {
20
+ name?: string
21
+ workspaceId?: number
22
+ cluster?: string
23
+ namespace?: string
24
+ image?: string
25
+ status?: InstanceStatus
26
+ creationTimestamp?: string
27
+ feishu?: FeishuConfig
28
+ networkConfig?: NetworkConfig
29
+ modelConfig?: ModelConfig
30
+ resources?: ResourceConfig
31
+ gatewayToken?: string
32
+ }
33
+
34
+ export type NetworkConfig = {
35
+ openclaw?: ServiceConfig
36
+ novnc?: ServiceConfig
37
+ }
38
+
39
+ export type ServiceConfig = {
40
+ type?: ServiceType
41
+ port?: number
42
+ nodeportConfig?: NodePortConfig
43
+ url?: string
44
+ }
45
+
46
+ export type NodePortConfig = {
47
+ nodePort?: number
48
+ }
49
+
50
+ export type EnvVar = {
51
+ key?: string
52
+ value?: string
53
+ }
54
+
55
+ export type Volume = {
56
+ name?: string
57
+ mountPath?: string
58
+ size?: string
59
+ storageClass?: string
60
+ }
61
+
62
+ export type FeishuConfig = {
63
+ appId?: string
64
+ appSecret?: string
65
+ }
66
+
67
+ export type ModelConfig = {
68
+ modelId?: string
69
+ apiKeyId?: string
70
+ modelName?: string
71
+ }
72
+
73
+ export type ResourceConfig = {
74
+ requests?: ResourceSpec
75
+ limits?: ResourceSpec
76
+ }
77
+
78
+ export type ResourceSpec = {
79
+ cpu?: string
80
+ memory?: string
81
+ }
82
+
83
+ export type Pagination = {
84
+ total?: number
85
+ page?: number
86
+ pageSize?: number
87
+ pages?: number
88
+ }
@@ -0,0 +1,17 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../fetch.pb"
8
+ import * as GoogleProtobufEmpty from "../../google/api/empty.pb"
9
+ export type GetCurrentUserResponse = {
10
+ isAdmin?: boolean
11
+ }
12
+
13
+ export class UserService {
14
+ static GetCurrentUser(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<GetCurrentUserResponse> {
15
+ return fm.fetchReq<GoogleProtobufEmpty.Empty, GetCurrentUserResponse>(`/apis/agentclaw.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
16
+ }
17
+ }
@@ -0,0 +1,59 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../fetch.pb"
8
+
9
+ export enum ClusterStatus {
10
+ CLUSTER_STATUS_UNSPECIFIED = "CLUSTER_STATUS_UNSPECIFIED",
11
+ CLUSTER_STATUS_READY = "CLUSTER_STATUS_READY",
12
+ CLUSTER_STATUS_NOT_READY = "CLUSTER_STATUS_NOT_READY",
13
+ }
14
+
15
+ export type ListWorkspacesRequest = {
16
+ }
17
+
18
+ export type ListWorkspacesResponse = {
19
+ items?: Workspace[]
20
+ }
21
+
22
+ export type Workspace = {
23
+ workspace?: number
24
+ alias?: string
25
+ }
26
+
27
+ export type ListClusterSummaryRequest = {
28
+ workspace?: number
29
+ }
30
+
31
+ export type ListClusterSummaryResponse = {
32
+ items?: Cluster[]
33
+ }
34
+
35
+ export type Cluster = {
36
+ name?: string
37
+ status?: ClusterStatus
38
+ }
39
+
40
+ export type ListNamespaceSummaryRequest = {
41
+ workspace?: number
42
+ cluster?: string
43
+ }
44
+
45
+ export type ListNamespaceSummaryResponse = {
46
+ items?: string[]
47
+ }
48
+
49
+ export class WorkspaceService {
50
+ static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
51
+ return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/agentclaw.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
52
+ }
53
+ static ListClusterSummary(req: ListClusterSummaryRequest, initReq?: fm.InitReq): Promise<ListClusterSummaryResponse> {
54
+ return fm.fetchReq<ListClusterSummaryRequest, ListClusterSummaryResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/clustersummary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
55
+ }
56
+ static ListNamespaceSummary(req: ListNamespaceSummaryRequest, initReq?: fm.InitReq): Promise<ListNamespaceSummaryResponse> {
57
+ return fm.fetchReq<ListNamespaceSummaryRequest, ListNamespaceSummaryResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespacesummary?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
58
+ }
59
+ }
@@ -1,250 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- /*
4
- * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
- */
6
-
7
- import * as fm from "../fetch.pb"
8
- import * as GoogleProtobufEmpty from "../google/api/empty.pb"
9
- import * as AgentclawV1alpha1Page from "./page.pb"
10
-
11
- export enum RegionStorageStatus {
12
- unspecified = "unspecified",
13
- uninitialized = "uninitialized",
14
- created = "created",
15
- initializing = "initializing",
16
- initialFailed = "initialFailed",
17
- }
18
-
19
- export enum InstanceStatus {
20
- STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
21
- RUNNING = "RUNNING",
22
- PENDING = "PENDING",
23
- STOPPING = "STOPPING",
24
- DELETING = "DELETING",
25
- STOPPED = "STOPPED",
26
- DELETED = "DELETED",
27
- CREATING = "CREATING",
28
- }
29
-
30
- export enum StorageType {
31
- StorageTypeUnspecified = "StorageTypeUnspecified",
32
- LocalStorage = "LocalStorage",
33
- FileStorage = "FileStorage",
34
- }
35
-
36
- export enum ImageType {
37
- IMAGE_TYPE_UNSPECIFIED = "IMAGE_TYPE_UNSPECIFIED",
38
- IMAGE_OFFICIAL = "IMAGE_OFFICIAL",
39
- IMAGE_APPLICATION = "IMAGE_APPLICATION",
40
- IMAGE_CUSTOM = "IMAGE_CUSTOM",
41
- IMAGE_PRIVATE = "IMAGE_PRIVATE",
42
- }
43
-
44
- export enum InstanceType {
45
- INSTANCE_TYPE_UNSPECIFIED = "INSTANCE_TYPE_UNSPECIFIED",
46
- POD = "POD",
47
- VM = "VM",
48
- }
49
-
50
- export enum NetworkType {
51
- NETWORK_TYPE_UNSPECIFIED = "NETWORK_TYPE_UNSPECIFIED",
52
- SSH = "SSH",
53
- JUPYTER = "JUPYTER",
54
- VSCODE = "VSCODE",
55
- CUSTOM = "CUSTOM",
56
- SYSTEM = "SYSTEM",
57
- }
58
-
59
- export enum NetworkProtocol {
60
- PROTOCOL_UNSPECIFIED = "PROTOCOL_UNSPECIFIED",
61
- HTTP = "HTTP",
62
- HTTPS = "HTTPS",
63
- TCP = "TCP",
64
- UDP = "UDP",
65
- }
66
-
67
- export enum SaveImageStatus {
68
- SAVE_IMAGE_STATUS_UNSPECIFIED = "SAVE_IMAGE_STATUS_UNSPECIFIED",
69
- SAVE_IMAGE_STATUS_SUCCESS = "SAVE_IMAGE_STATUS_SUCCESS",
70
- SAVE_IMAGE_STATUS_FAILED = "SAVE_IMAGE_STATUS_FAILED",
71
- SAVE_IMAGE_STATUS_SAVING = "SAVE_IMAGE_STATUS_SAVING",
72
- }
73
-
74
- export enum StartMode {
75
- GPU = "GPU",
76
- CPU = "CPU",
77
- }
78
-
79
- export type ListAgentInstanceRequest = {
80
- name?: string
81
- page?: number
82
- pageSize?: number
83
- }
84
-
85
- export type ListAgentInstanceResponse = {
86
- items?: ContainerInstance[]
87
- pagination?: AgentclawV1alpha1Page.Pagination
88
- }
89
-
90
- export type GetAgentInstanceRequest = {
91
- instanceId?: string
92
- }
93
-
94
- export type GetAgentInstanceResponse = {
95
- item?: ContainerInstance
96
- }
97
-
98
- export type CreateAgentInstanceRequest = {
99
- name?: string
100
- volumeSpec?: VolumeSpec[]
101
- feishu?: FeishuConfig
102
- }
103
-
104
- export type CreateAgentInstanceResponse = {
105
- item?: ContainerInstance
106
- }
107
-
108
- export type DeleteAgentInstanceRequest = {
109
- instanceId?: string
110
- }
111
-
112
- export type GetUserInfoRequest = {
113
- }
114
-
115
- export type GetUserInfoResponse = {
116
- balance?: string
117
- isVerified?: boolean
118
- isMain?: boolean
119
- enableSub?: boolean
120
- }
121
-
122
- export type GetStorageDetailsRequest = {
123
- excludeCurrentUsage?: boolean
124
- }
125
-
126
- export type GetStorageDetailsResponse = {
127
- status?: RegionStorageStatus
128
- currentUsage?: string
129
- quota?: string
130
- userMaxQuota?: string
131
- userDefaultQuota?: string
132
- freeSize?: string
133
- mountPath?: string
134
- initializedAt?: string
135
- }
136
-
137
- export type FeishuConfig = {
138
- appId?: string
139
- appSecret?: string
140
- }
141
-
142
- export type ContainerInstance = {
143
- instanceName?: string
144
- namespace?: string
145
- creationTimestamp?: string
146
- instanceId?: string
147
- status?: InstanceStatus
148
- volumeSpec?: VolumeSpec[]
149
- image?: Image
150
- instanceSpec?: InstanceSpec
151
- regionId?: string
152
- networks?: ContainerInstanceNetwork[]
153
- saveImage?: SaveImage
154
- ssh?: SSHInfo
155
- schedule?: Schedule
156
- serviceEnable?: ServiceEnable
157
- enableDockerInDocker?: boolean
158
- enablePersistentRootfs?: boolean
159
- startMode?: StartMode
160
- agentInfo?: AgentInfo
161
- feishu?: FeishuConfig
162
- }
163
-
164
- export type VolumeSpec = {
165
- sourcePath?: string
166
- mountPath?: string
167
- size?: string
168
- storageType?: StorageType
169
- }
170
-
171
- export type Image = {
172
- imageType?: ImageType
173
- name?: string
174
- username?: string
175
- password?: string
176
- command?: Command
177
- }
178
-
179
- export type Command = {
180
- commands?: string[]
181
- args?: string[]
182
- envs?: EnvVar[]
183
- }
184
-
185
- export type EnvVar = {
186
- key?: string
187
- value?: string
188
- }
189
-
190
- export type InstanceSpec = {
191
- instanceType?: InstanceType
192
- skuId?: string
193
- specName?: string
194
- }
195
-
196
- export type ContainerInstanceNetwork = {
197
- networkType?: NetworkType
198
- name?: string
199
- url?: string
200
- containerPort?: number
201
- protocol?: NetworkProtocol
202
- externalPort?: number
203
- }
204
-
205
- export type SaveImage = {
206
- status?: SaveImageStatus
207
- failReason?: string
208
- }
209
-
210
- export type SSHInfo = {
211
- username?: string
212
- password?: string
213
- host?: string
214
- port?: number
215
- }
216
-
217
- export type Schedule = {
218
- shutdownTime?: string
219
- }
220
-
221
- export type ServiceEnable = {
222
- ssh?: boolean
223
- jupyter?: boolean
224
- vscode?: boolean
225
- }
226
-
227
- export type AgentInfo = {
228
- gatewayToken?: string
229
- }
230
-
231
- export class Agents {
232
- static ListAgentInstances(req: ListAgentInstanceRequest, initReq?: fm.InitReq): Promise<ListAgentInstanceResponse> {
233
- return fm.fetchReq<ListAgentInstanceRequest, ListAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/agent-instances?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
234
- }
235
- static GetAgentInstance(req: GetAgentInstanceRequest, initReq?: fm.InitReq): Promise<GetAgentInstanceResponse> {
236
- return fm.fetchReq<GetAgentInstanceRequest, GetAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/agent-instances/${req["instanceId"]}?${fm.renderURLSearchParams(req, ["instanceId"])}`, {...initReq, method: "GET"})
237
- }
238
- static CreateAgentInstance(req: CreateAgentInstanceRequest, initReq?: fm.InitReq): Promise<CreateAgentInstanceResponse> {
239
- return fm.fetchReq<CreateAgentInstanceRequest, CreateAgentInstanceResponse>(`/apis/agentclaw.io/v1alpha1/agent-instances`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
240
- }
241
- static DeleteAgentInstance(req: DeleteAgentInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
242
- return fm.fetchReq<DeleteAgentInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/agent-instances/${req["instanceId"]}`, {...initReq, method: "DELETE"})
243
- }
244
- static GetUserInfo(req: GetUserInfoRequest, initReq?: fm.InitReq): Promise<GetUserInfoResponse> {
245
- return fm.fetchReq<GetUserInfoRequest, GetUserInfoResponse>(`/apis/agentclaw.io/v1alpha1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
246
- }
247
- static GetStorageDetails(req: GetStorageDetailsRequest, initReq?: fm.InitReq): Promise<GetStorageDetailsResponse> {
248
- return fm.fetchReq<GetStorageDetailsRequest, GetStorageDetailsResponse>(`/apis/agentclaw.io/v1alpha1/filestorage/details?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
249
- }
250
- }