@nacos-group/sdk-proto 1.0.0-beta.2
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 +21 -0
- package/src/ai/agentcapabilities.ts +104 -0
- package/src/ai/agentcard.ts +292 -0
- package/src/ai/agentcarddetailinfo.ts +308 -0
- package/src/ai/agentendpoint.ts +134 -0
- package/src/ai/agentextension.ts +152 -0
- package/src/ai/agentinterface.ts +93 -0
- package/src/ai/agentprovider.ts +75 -0
- package/src/ai/agentskill.ts +109 -0
- package/src/ai/ai_request.ts +608 -0
- package/src/ai/ai_response.ts +466 -0
- package/src/ai/argument.ts +58 -0
- package/src/ai/encryptobject.ts +142 -0
- package/src/ai/frontendpointconfig.ts +93 -0
- package/src/ai/icon.ts +87 -0
- package/src/ai/input.ts +120 -0
- package/src/ai/keyvalueinput.ts +200 -0
- package/src/ai/mcpendpointinfo.ts +87 -0
- package/src/ai/mcpendpointspec.ts +140 -0
- package/src/ai/mcpresourcespecification.ts +165 -0
- package/src/ai/mcpserverbasicinfo.ts +268 -0
- package/src/ai/mcpserverdetailinfo.ts +316 -0
- package/src/ai/mcpserverremoteserviceconfig.ts +88 -0
- package/src/ai/mcpserviceref.ts +87 -0
- package/src/ai/mcptool.ts +289 -0
- package/src/ai/mcptoolannotations.ts +93 -0
- package/src/ai/mcptoolmeta.ts +209 -0
- package/src/ai/mcptoolspecification.ts +250 -0
- package/src/ai/package.ts +142 -0
- package/src/ai/prompt.ts +96 -0
- package/src/ai/promptvariable.ts +81 -0
- package/src/ai/repository.ts +87 -0
- package/src/ai/securityscheme.ts +142 -0
- package/src/ai/serverversiondetail.ts +89 -0
- package/src/common/common.ts +1166 -0
- package/src/config/config_request.ts +887 -0
- package/src/config/config_response.ts +781 -0
- package/src/google/protobuf/struct.ts +415 -0
- package/src/index.ts +42 -0
- package/src/lock/lock.ts +264 -0
- package/src/naming/instance.ts +199 -0
- package/src/naming/naming_request.ts +768 -0
- package/src/naming/naming_response.ts +574 -0
- package/src/naming/serviceinfo.ts +130 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc v5.28.3
|
|
5
|
+
// source: ai/ai_request.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { AgentCard } from "./agentcard";
|
|
9
|
+
import { AgentEndpoint } from "./agentendpoint";
|
|
10
|
+
import { McpEndpointSpec } from "./mcpendpointspec";
|
|
11
|
+
import { McpResourceSpecification } from "./mcpresourcespecification";
|
|
12
|
+
import { McpServerBasicInfo } from "./mcpserverbasicinfo";
|
|
13
|
+
import { McpToolSpecification } from "./mcptoolspecification";
|
|
14
|
+
|
|
15
|
+
/** Auto-generated by proto-generator. DO NOT EDIT. */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* metadata.type = "AgentEndpointRequest"
|
|
19
|
+
* Flattened from: AgentEndpointRequest -> AbstractAgentRequest -> Request
|
|
20
|
+
*/
|
|
21
|
+
export interface AgentEndpointRequest {
|
|
22
|
+
requestId: string;
|
|
23
|
+
namespaceId: string;
|
|
24
|
+
agentName: string;
|
|
25
|
+
endpoint: AgentEndpoint | undefined;
|
|
26
|
+
type: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* metadata.type = "BatchAgentEndpointRequest"
|
|
31
|
+
* Flattened from: BatchAgentEndpointRequest -> AbstractAgentRequest -> Request
|
|
32
|
+
*/
|
|
33
|
+
export interface BatchAgentEndpointRequest {
|
|
34
|
+
requestId: string;
|
|
35
|
+
namespaceId: string;
|
|
36
|
+
agentName: string;
|
|
37
|
+
endpoints: AgentEndpoint[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* metadata.type = "McpServerEndpointRequest"
|
|
42
|
+
* Flattened from: McpServerEndpointRequest -> AbstractMcpRequest -> Request
|
|
43
|
+
*/
|
|
44
|
+
export interface McpServerEndpointRequest {
|
|
45
|
+
requestId: string;
|
|
46
|
+
namespaceId: string;
|
|
47
|
+
mcpId: string;
|
|
48
|
+
mcpName: string;
|
|
49
|
+
address: string;
|
|
50
|
+
port: number;
|
|
51
|
+
version: string;
|
|
52
|
+
type: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* metadata.type = "QueryAgentCardRequest"
|
|
57
|
+
* Flattened from: QueryAgentCardRequest -> AbstractAgentRequest -> Request
|
|
58
|
+
*/
|
|
59
|
+
export interface QueryAgentCardRequest {
|
|
60
|
+
requestId: string;
|
|
61
|
+
namespaceId: string;
|
|
62
|
+
agentName: string;
|
|
63
|
+
version: string;
|
|
64
|
+
registrationType: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* metadata.type = "QueryMcpServerRequest"
|
|
69
|
+
* Flattened from: QueryMcpServerRequest -> AbstractMcpRequest -> Request
|
|
70
|
+
*/
|
|
71
|
+
export interface QueryMcpServerRequest {
|
|
72
|
+
requestId: string;
|
|
73
|
+
namespaceId: string;
|
|
74
|
+
mcpId: string;
|
|
75
|
+
mcpName: string;
|
|
76
|
+
version: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* metadata.type = "QueryPromptRequest"
|
|
81
|
+
* Flattened from: QueryPromptRequest -> AbstractPromptRequest -> Request
|
|
82
|
+
*/
|
|
83
|
+
export interface QueryPromptRequest {
|
|
84
|
+
requestId: string;
|
|
85
|
+
namespaceId: string;
|
|
86
|
+
promptKey: string;
|
|
87
|
+
version: string;
|
|
88
|
+
label: string;
|
|
89
|
+
md5: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* metadata.type = "ReleaseAgentCardRequest"
|
|
94
|
+
* Flattened from: ReleaseAgentCardRequest -> AbstractAgentRequest -> Request
|
|
95
|
+
*/
|
|
96
|
+
export interface ReleaseAgentCardRequest {
|
|
97
|
+
requestId: string;
|
|
98
|
+
namespaceId: string;
|
|
99
|
+
agentName: string;
|
|
100
|
+
agentCard: AgentCard | undefined;
|
|
101
|
+
registrationType: string;
|
|
102
|
+
setAsLatest: boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* metadata.type = "ReleaseMcpServerRequest"
|
|
107
|
+
* Flattened from: ReleaseMcpServerRequest -> AbstractMcpRequest -> Request
|
|
108
|
+
*/
|
|
109
|
+
export interface ReleaseMcpServerRequest {
|
|
110
|
+
requestId: string;
|
|
111
|
+
namespaceId: string;
|
|
112
|
+
mcpId: string;
|
|
113
|
+
mcpName: string;
|
|
114
|
+
serverSpecification: McpServerBasicInfo | undefined;
|
|
115
|
+
toolSpecification: McpToolSpecification | undefined;
|
|
116
|
+
resourceSpecification: McpResourceSpecification | undefined;
|
|
117
|
+
endpointSpecification: McpEndpointSpec | undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function createBaseAgentEndpointRequest(): AgentEndpointRequest {
|
|
121
|
+
return { requestId: "", namespaceId: "", agentName: "", endpoint: undefined, type: "" };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const AgentEndpointRequest: MessageFns<AgentEndpointRequest> = {
|
|
125
|
+
fromJSON(object: any): AgentEndpointRequest {
|
|
126
|
+
return {
|
|
127
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
128
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
129
|
+
agentName: isSet(object.agentName) ? globalThis.String(object.agentName) : "",
|
|
130
|
+
endpoint: isSet(object.endpoint) ? AgentEndpoint.fromJSON(object.endpoint) : undefined,
|
|
131
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
toJSON(message: AgentEndpointRequest): unknown {
|
|
136
|
+
const obj: any = {};
|
|
137
|
+
if (message.requestId !== "") {
|
|
138
|
+
obj.requestId = message.requestId;
|
|
139
|
+
}
|
|
140
|
+
if (message.namespaceId !== "") {
|
|
141
|
+
obj.namespaceId = message.namespaceId;
|
|
142
|
+
}
|
|
143
|
+
if (message.agentName !== "") {
|
|
144
|
+
obj.agentName = message.agentName;
|
|
145
|
+
}
|
|
146
|
+
if (message.endpoint !== undefined) {
|
|
147
|
+
obj.endpoint = AgentEndpoint.toJSON(message.endpoint);
|
|
148
|
+
}
|
|
149
|
+
if (message.type !== "") {
|
|
150
|
+
obj.type = message.type;
|
|
151
|
+
}
|
|
152
|
+
return obj;
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
create<I extends Exact<DeepPartial<AgentEndpointRequest>, I>>(base?: I): AgentEndpointRequest {
|
|
156
|
+
return AgentEndpointRequest.fromPartial(base ?? ({} as any));
|
|
157
|
+
},
|
|
158
|
+
fromPartial<I extends Exact<DeepPartial<AgentEndpointRequest>, I>>(object: I): AgentEndpointRequest {
|
|
159
|
+
const message = createBaseAgentEndpointRequest();
|
|
160
|
+
message.requestId = object.requestId ?? "";
|
|
161
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
162
|
+
message.agentName = object.agentName ?? "";
|
|
163
|
+
message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
|
|
164
|
+
? AgentEndpoint.fromPartial(object.endpoint)
|
|
165
|
+
: undefined;
|
|
166
|
+
message.type = object.type ?? "";
|
|
167
|
+
return message;
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
function createBaseBatchAgentEndpointRequest(): BatchAgentEndpointRequest {
|
|
172
|
+
return { requestId: "", namespaceId: "", agentName: "", endpoints: [] };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export const BatchAgentEndpointRequest: MessageFns<BatchAgentEndpointRequest> = {
|
|
176
|
+
fromJSON(object: any): BatchAgentEndpointRequest {
|
|
177
|
+
return {
|
|
178
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
179
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
180
|
+
agentName: isSet(object.agentName) ? globalThis.String(object.agentName) : "",
|
|
181
|
+
endpoints: globalThis.Array.isArray(object?.endpoints)
|
|
182
|
+
? object.endpoints.map((e: any) => AgentEndpoint.fromJSON(e))
|
|
183
|
+
: [],
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
toJSON(message: BatchAgentEndpointRequest): unknown {
|
|
188
|
+
const obj: any = {};
|
|
189
|
+
if (message.requestId !== "") {
|
|
190
|
+
obj.requestId = message.requestId;
|
|
191
|
+
}
|
|
192
|
+
if (message.namespaceId !== "") {
|
|
193
|
+
obj.namespaceId = message.namespaceId;
|
|
194
|
+
}
|
|
195
|
+
if (message.agentName !== "") {
|
|
196
|
+
obj.agentName = message.agentName;
|
|
197
|
+
}
|
|
198
|
+
if (message.endpoints?.length) {
|
|
199
|
+
obj.endpoints = message.endpoints.map((e) => AgentEndpoint.toJSON(e));
|
|
200
|
+
}
|
|
201
|
+
return obj;
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
create<I extends Exact<DeepPartial<BatchAgentEndpointRequest>, I>>(base?: I): BatchAgentEndpointRequest {
|
|
205
|
+
return BatchAgentEndpointRequest.fromPartial(base ?? ({} as any));
|
|
206
|
+
},
|
|
207
|
+
fromPartial<I extends Exact<DeepPartial<BatchAgentEndpointRequest>, I>>(object: I): BatchAgentEndpointRequest {
|
|
208
|
+
const message = createBaseBatchAgentEndpointRequest();
|
|
209
|
+
message.requestId = object.requestId ?? "";
|
|
210
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
211
|
+
message.agentName = object.agentName ?? "";
|
|
212
|
+
message.endpoints = object.endpoints?.map((e) => AgentEndpoint.fromPartial(e)) || [];
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
function createBaseMcpServerEndpointRequest(): McpServerEndpointRequest {
|
|
218
|
+
return { requestId: "", namespaceId: "", mcpId: "", mcpName: "", address: "", port: 0, version: "", type: "" };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const McpServerEndpointRequest: MessageFns<McpServerEndpointRequest> = {
|
|
222
|
+
fromJSON(object: any): McpServerEndpointRequest {
|
|
223
|
+
return {
|
|
224
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
225
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
226
|
+
mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "",
|
|
227
|
+
mcpName: isSet(object.mcpName) ? globalThis.String(object.mcpName) : "",
|
|
228
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
229
|
+
port: isSet(object.port) ? globalThis.Number(object.port) : 0,
|
|
230
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
231
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
232
|
+
};
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
toJSON(message: McpServerEndpointRequest): unknown {
|
|
236
|
+
const obj: any = {};
|
|
237
|
+
if (message.requestId !== "") {
|
|
238
|
+
obj.requestId = message.requestId;
|
|
239
|
+
}
|
|
240
|
+
if (message.namespaceId !== "") {
|
|
241
|
+
obj.namespaceId = message.namespaceId;
|
|
242
|
+
}
|
|
243
|
+
if (message.mcpId !== "") {
|
|
244
|
+
obj.mcpId = message.mcpId;
|
|
245
|
+
}
|
|
246
|
+
if (message.mcpName !== "") {
|
|
247
|
+
obj.mcpName = message.mcpName;
|
|
248
|
+
}
|
|
249
|
+
if (message.address !== "") {
|
|
250
|
+
obj.address = message.address;
|
|
251
|
+
}
|
|
252
|
+
if (message.port !== 0) {
|
|
253
|
+
obj.port = Math.round(message.port);
|
|
254
|
+
}
|
|
255
|
+
if (message.version !== "") {
|
|
256
|
+
obj.version = message.version;
|
|
257
|
+
}
|
|
258
|
+
if (message.type !== "") {
|
|
259
|
+
obj.type = message.type;
|
|
260
|
+
}
|
|
261
|
+
return obj;
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
create<I extends Exact<DeepPartial<McpServerEndpointRequest>, I>>(base?: I): McpServerEndpointRequest {
|
|
265
|
+
return McpServerEndpointRequest.fromPartial(base ?? ({} as any));
|
|
266
|
+
},
|
|
267
|
+
fromPartial<I extends Exact<DeepPartial<McpServerEndpointRequest>, I>>(object: I): McpServerEndpointRequest {
|
|
268
|
+
const message = createBaseMcpServerEndpointRequest();
|
|
269
|
+
message.requestId = object.requestId ?? "";
|
|
270
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
271
|
+
message.mcpId = object.mcpId ?? "";
|
|
272
|
+
message.mcpName = object.mcpName ?? "";
|
|
273
|
+
message.address = object.address ?? "";
|
|
274
|
+
message.port = object.port ?? 0;
|
|
275
|
+
message.version = object.version ?? "";
|
|
276
|
+
message.type = object.type ?? "";
|
|
277
|
+
return message;
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
function createBaseQueryAgentCardRequest(): QueryAgentCardRequest {
|
|
282
|
+
return { requestId: "", namespaceId: "", agentName: "", version: "", registrationType: "" };
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export const QueryAgentCardRequest: MessageFns<QueryAgentCardRequest> = {
|
|
286
|
+
fromJSON(object: any): QueryAgentCardRequest {
|
|
287
|
+
return {
|
|
288
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
289
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
290
|
+
agentName: isSet(object.agentName) ? globalThis.String(object.agentName) : "",
|
|
291
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
292
|
+
registrationType: isSet(object.registrationType) ? globalThis.String(object.registrationType) : "",
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
toJSON(message: QueryAgentCardRequest): unknown {
|
|
297
|
+
const obj: any = {};
|
|
298
|
+
if (message.requestId !== "") {
|
|
299
|
+
obj.requestId = message.requestId;
|
|
300
|
+
}
|
|
301
|
+
if (message.namespaceId !== "") {
|
|
302
|
+
obj.namespaceId = message.namespaceId;
|
|
303
|
+
}
|
|
304
|
+
if (message.agentName !== "") {
|
|
305
|
+
obj.agentName = message.agentName;
|
|
306
|
+
}
|
|
307
|
+
if (message.version !== "") {
|
|
308
|
+
obj.version = message.version;
|
|
309
|
+
}
|
|
310
|
+
if (message.registrationType !== "") {
|
|
311
|
+
obj.registrationType = message.registrationType;
|
|
312
|
+
}
|
|
313
|
+
return obj;
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
create<I extends Exact<DeepPartial<QueryAgentCardRequest>, I>>(base?: I): QueryAgentCardRequest {
|
|
317
|
+
return QueryAgentCardRequest.fromPartial(base ?? ({} as any));
|
|
318
|
+
},
|
|
319
|
+
fromPartial<I extends Exact<DeepPartial<QueryAgentCardRequest>, I>>(object: I): QueryAgentCardRequest {
|
|
320
|
+
const message = createBaseQueryAgentCardRequest();
|
|
321
|
+
message.requestId = object.requestId ?? "";
|
|
322
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
323
|
+
message.agentName = object.agentName ?? "";
|
|
324
|
+
message.version = object.version ?? "";
|
|
325
|
+
message.registrationType = object.registrationType ?? "";
|
|
326
|
+
return message;
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
function createBaseQueryMcpServerRequest(): QueryMcpServerRequest {
|
|
331
|
+
return { requestId: "", namespaceId: "", mcpId: "", mcpName: "", version: "" };
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export const QueryMcpServerRequest: MessageFns<QueryMcpServerRequest> = {
|
|
335
|
+
fromJSON(object: any): QueryMcpServerRequest {
|
|
336
|
+
return {
|
|
337
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
338
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
339
|
+
mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "",
|
|
340
|
+
mcpName: isSet(object.mcpName) ? globalThis.String(object.mcpName) : "",
|
|
341
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
342
|
+
};
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
toJSON(message: QueryMcpServerRequest): unknown {
|
|
346
|
+
const obj: any = {};
|
|
347
|
+
if (message.requestId !== "") {
|
|
348
|
+
obj.requestId = message.requestId;
|
|
349
|
+
}
|
|
350
|
+
if (message.namespaceId !== "") {
|
|
351
|
+
obj.namespaceId = message.namespaceId;
|
|
352
|
+
}
|
|
353
|
+
if (message.mcpId !== "") {
|
|
354
|
+
obj.mcpId = message.mcpId;
|
|
355
|
+
}
|
|
356
|
+
if (message.mcpName !== "") {
|
|
357
|
+
obj.mcpName = message.mcpName;
|
|
358
|
+
}
|
|
359
|
+
if (message.version !== "") {
|
|
360
|
+
obj.version = message.version;
|
|
361
|
+
}
|
|
362
|
+
return obj;
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
create<I extends Exact<DeepPartial<QueryMcpServerRequest>, I>>(base?: I): QueryMcpServerRequest {
|
|
366
|
+
return QueryMcpServerRequest.fromPartial(base ?? ({} as any));
|
|
367
|
+
},
|
|
368
|
+
fromPartial<I extends Exact<DeepPartial<QueryMcpServerRequest>, I>>(object: I): QueryMcpServerRequest {
|
|
369
|
+
const message = createBaseQueryMcpServerRequest();
|
|
370
|
+
message.requestId = object.requestId ?? "";
|
|
371
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
372
|
+
message.mcpId = object.mcpId ?? "";
|
|
373
|
+
message.mcpName = object.mcpName ?? "";
|
|
374
|
+
message.version = object.version ?? "";
|
|
375
|
+
return message;
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
function createBaseQueryPromptRequest(): QueryPromptRequest {
|
|
380
|
+
return { requestId: "", namespaceId: "", promptKey: "", version: "", label: "", md5: "" };
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export const QueryPromptRequest: MessageFns<QueryPromptRequest> = {
|
|
384
|
+
fromJSON(object: any): QueryPromptRequest {
|
|
385
|
+
return {
|
|
386
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
387
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
388
|
+
promptKey: isSet(object.promptKey) ? globalThis.String(object.promptKey) : "",
|
|
389
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
390
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
391
|
+
md5: isSet(object.md5) ? globalThis.String(object.md5) : "",
|
|
392
|
+
};
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
toJSON(message: QueryPromptRequest): unknown {
|
|
396
|
+
const obj: any = {};
|
|
397
|
+
if (message.requestId !== "") {
|
|
398
|
+
obj.requestId = message.requestId;
|
|
399
|
+
}
|
|
400
|
+
if (message.namespaceId !== "") {
|
|
401
|
+
obj.namespaceId = message.namespaceId;
|
|
402
|
+
}
|
|
403
|
+
if (message.promptKey !== "") {
|
|
404
|
+
obj.promptKey = message.promptKey;
|
|
405
|
+
}
|
|
406
|
+
if (message.version !== "") {
|
|
407
|
+
obj.version = message.version;
|
|
408
|
+
}
|
|
409
|
+
if (message.label !== "") {
|
|
410
|
+
obj.label = message.label;
|
|
411
|
+
}
|
|
412
|
+
if (message.md5 !== "") {
|
|
413
|
+
obj.md5 = message.md5;
|
|
414
|
+
}
|
|
415
|
+
return obj;
|
|
416
|
+
},
|
|
417
|
+
|
|
418
|
+
create<I extends Exact<DeepPartial<QueryPromptRequest>, I>>(base?: I): QueryPromptRequest {
|
|
419
|
+
return QueryPromptRequest.fromPartial(base ?? ({} as any));
|
|
420
|
+
},
|
|
421
|
+
fromPartial<I extends Exact<DeepPartial<QueryPromptRequest>, I>>(object: I): QueryPromptRequest {
|
|
422
|
+
const message = createBaseQueryPromptRequest();
|
|
423
|
+
message.requestId = object.requestId ?? "";
|
|
424
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
425
|
+
message.promptKey = object.promptKey ?? "";
|
|
426
|
+
message.version = object.version ?? "";
|
|
427
|
+
message.label = object.label ?? "";
|
|
428
|
+
message.md5 = object.md5 ?? "";
|
|
429
|
+
return message;
|
|
430
|
+
},
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
function createBaseReleaseAgentCardRequest(): ReleaseAgentCardRequest {
|
|
434
|
+
return {
|
|
435
|
+
requestId: "",
|
|
436
|
+
namespaceId: "",
|
|
437
|
+
agentName: "",
|
|
438
|
+
agentCard: undefined,
|
|
439
|
+
registrationType: "",
|
|
440
|
+
setAsLatest: false,
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export const ReleaseAgentCardRequest: MessageFns<ReleaseAgentCardRequest> = {
|
|
445
|
+
fromJSON(object: any): ReleaseAgentCardRequest {
|
|
446
|
+
return {
|
|
447
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
448
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
449
|
+
agentName: isSet(object.agentName) ? globalThis.String(object.agentName) : "",
|
|
450
|
+
agentCard: isSet(object.agentCard) ? AgentCard.fromJSON(object.agentCard) : undefined,
|
|
451
|
+
registrationType: isSet(object.registrationType) ? globalThis.String(object.registrationType) : "",
|
|
452
|
+
setAsLatest: isSet(object.setAsLatest) ? globalThis.Boolean(object.setAsLatest) : false,
|
|
453
|
+
};
|
|
454
|
+
},
|
|
455
|
+
|
|
456
|
+
toJSON(message: ReleaseAgentCardRequest): unknown {
|
|
457
|
+
const obj: any = {};
|
|
458
|
+
if (message.requestId !== "") {
|
|
459
|
+
obj.requestId = message.requestId;
|
|
460
|
+
}
|
|
461
|
+
if (message.namespaceId !== "") {
|
|
462
|
+
obj.namespaceId = message.namespaceId;
|
|
463
|
+
}
|
|
464
|
+
if (message.agentName !== "") {
|
|
465
|
+
obj.agentName = message.agentName;
|
|
466
|
+
}
|
|
467
|
+
if (message.agentCard !== undefined) {
|
|
468
|
+
obj.agentCard = AgentCard.toJSON(message.agentCard);
|
|
469
|
+
}
|
|
470
|
+
if (message.registrationType !== "") {
|
|
471
|
+
obj.registrationType = message.registrationType;
|
|
472
|
+
}
|
|
473
|
+
if (message.setAsLatest !== false) {
|
|
474
|
+
obj.setAsLatest = message.setAsLatest;
|
|
475
|
+
}
|
|
476
|
+
return obj;
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
create<I extends Exact<DeepPartial<ReleaseAgentCardRequest>, I>>(base?: I): ReleaseAgentCardRequest {
|
|
480
|
+
return ReleaseAgentCardRequest.fromPartial(base ?? ({} as any));
|
|
481
|
+
},
|
|
482
|
+
fromPartial<I extends Exact<DeepPartial<ReleaseAgentCardRequest>, I>>(object: I): ReleaseAgentCardRequest {
|
|
483
|
+
const message = createBaseReleaseAgentCardRequest();
|
|
484
|
+
message.requestId = object.requestId ?? "";
|
|
485
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
486
|
+
message.agentName = object.agentName ?? "";
|
|
487
|
+
message.agentCard = (object.agentCard !== undefined && object.agentCard !== null)
|
|
488
|
+
? AgentCard.fromPartial(object.agentCard)
|
|
489
|
+
: undefined;
|
|
490
|
+
message.registrationType = object.registrationType ?? "";
|
|
491
|
+
message.setAsLatest = object.setAsLatest ?? false;
|
|
492
|
+
return message;
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
function createBaseReleaseMcpServerRequest(): ReleaseMcpServerRequest {
|
|
497
|
+
return {
|
|
498
|
+
requestId: "",
|
|
499
|
+
namespaceId: "",
|
|
500
|
+
mcpId: "",
|
|
501
|
+
mcpName: "",
|
|
502
|
+
serverSpecification: undefined,
|
|
503
|
+
toolSpecification: undefined,
|
|
504
|
+
resourceSpecification: undefined,
|
|
505
|
+
endpointSpecification: undefined,
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export const ReleaseMcpServerRequest: MessageFns<ReleaseMcpServerRequest> = {
|
|
510
|
+
fromJSON(object: any): ReleaseMcpServerRequest {
|
|
511
|
+
return {
|
|
512
|
+
requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
|
|
513
|
+
namespaceId: isSet(object.namespaceId) ? globalThis.String(object.namespaceId) : "",
|
|
514
|
+
mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "",
|
|
515
|
+
mcpName: isSet(object.mcpName) ? globalThis.String(object.mcpName) : "",
|
|
516
|
+
serverSpecification: isSet(object.serverSpecification)
|
|
517
|
+
? McpServerBasicInfo.fromJSON(object.serverSpecification)
|
|
518
|
+
: undefined,
|
|
519
|
+
toolSpecification: isSet(object.toolSpecification)
|
|
520
|
+
? McpToolSpecification.fromJSON(object.toolSpecification)
|
|
521
|
+
: undefined,
|
|
522
|
+
resourceSpecification: isSet(object.resourceSpecification)
|
|
523
|
+
? McpResourceSpecification.fromJSON(object.resourceSpecification)
|
|
524
|
+
: undefined,
|
|
525
|
+
endpointSpecification: isSet(object.endpointSpecification)
|
|
526
|
+
? McpEndpointSpec.fromJSON(object.endpointSpecification)
|
|
527
|
+
: undefined,
|
|
528
|
+
};
|
|
529
|
+
},
|
|
530
|
+
|
|
531
|
+
toJSON(message: ReleaseMcpServerRequest): unknown {
|
|
532
|
+
const obj: any = {};
|
|
533
|
+
if (message.requestId !== "") {
|
|
534
|
+
obj.requestId = message.requestId;
|
|
535
|
+
}
|
|
536
|
+
if (message.namespaceId !== "") {
|
|
537
|
+
obj.namespaceId = message.namespaceId;
|
|
538
|
+
}
|
|
539
|
+
if (message.mcpId !== "") {
|
|
540
|
+
obj.mcpId = message.mcpId;
|
|
541
|
+
}
|
|
542
|
+
if (message.mcpName !== "") {
|
|
543
|
+
obj.mcpName = message.mcpName;
|
|
544
|
+
}
|
|
545
|
+
if (message.serverSpecification !== undefined) {
|
|
546
|
+
obj.serverSpecification = McpServerBasicInfo.toJSON(message.serverSpecification);
|
|
547
|
+
}
|
|
548
|
+
if (message.toolSpecification !== undefined) {
|
|
549
|
+
obj.toolSpecification = McpToolSpecification.toJSON(message.toolSpecification);
|
|
550
|
+
}
|
|
551
|
+
if (message.resourceSpecification !== undefined) {
|
|
552
|
+
obj.resourceSpecification = McpResourceSpecification.toJSON(message.resourceSpecification);
|
|
553
|
+
}
|
|
554
|
+
if (message.endpointSpecification !== undefined) {
|
|
555
|
+
obj.endpointSpecification = McpEndpointSpec.toJSON(message.endpointSpecification);
|
|
556
|
+
}
|
|
557
|
+
return obj;
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
create<I extends Exact<DeepPartial<ReleaseMcpServerRequest>, I>>(base?: I): ReleaseMcpServerRequest {
|
|
561
|
+
return ReleaseMcpServerRequest.fromPartial(base ?? ({} as any));
|
|
562
|
+
},
|
|
563
|
+
fromPartial<I extends Exact<DeepPartial<ReleaseMcpServerRequest>, I>>(object: I): ReleaseMcpServerRequest {
|
|
564
|
+
const message = createBaseReleaseMcpServerRequest();
|
|
565
|
+
message.requestId = object.requestId ?? "";
|
|
566
|
+
message.namespaceId = object.namespaceId ?? "";
|
|
567
|
+
message.mcpId = object.mcpId ?? "";
|
|
568
|
+
message.mcpName = object.mcpName ?? "";
|
|
569
|
+
message.serverSpecification = (object.serverSpecification !== undefined && object.serverSpecification !== null)
|
|
570
|
+
? McpServerBasicInfo.fromPartial(object.serverSpecification)
|
|
571
|
+
: undefined;
|
|
572
|
+
message.toolSpecification = (object.toolSpecification !== undefined && object.toolSpecification !== null)
|
|
573
|
+
? McpToolSpecification.fromPartial(object.toolSpecification)
|
|
574
|
+
: undefined;
|
|
575
|
+
message.resourceSpecification =
|
|
576
|
+
(object.resourceSpecification !== undefined && object.resourceSpecification !== null)
|
|
577
|
+
? McpResourceSpecification.fromPartial(object.resourceSpecification)
|
|
578
|
+
: undefined;
|
|
579
|
+
message.endpointSpecification =
|
|
580
|
+
(object.endpointSpecification !== undefined && object.endpointSpecification !== null)
|
|
581
|
+
? McpEndpointSpec.fromPartial(object.endpointSpecification)
|
|
582
|
+
: undefined;
|
|
583
|
+
return message;
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
588
|
+
|
|
589
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
590
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
591
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
592
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
593
|
+
: Partial<T>;
|
|
594
|
+
|
|
595
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
596
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
597
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
598
|
+
|
|
599
|
+
function isSet(value: any): boolean {
|
|
600
|
+
return value !== null && value !== undefined;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
interface MessageFns<T> {
|
|
604
|
+
fromJSON(object: any): T;
|
|
605
|
+
toJSON(message: T): unknown;
|
|
606
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
607
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
608
|
+
}
|