@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.
Files changed (45) hide show
  1. package/package.json +21 -0
  2. package/src/ai/agentcapabilities.ts +104 -0
  3. package/src/ai/agentcard.ts +292 -0
  4. package/src/ai/agentcarddetailinfo.ts +308 -0
  5. package/src/ai/agentendpoint.ts +134 -0
  6. package/src/ai/agentextension.ts +152 -0
  7. package/src/ai/agentinterface.ts +93 -0
  8. package/src/ai/agentprovider.ts +75 -0
  9. package/src/ai/agentskill.ts +109 -0
  10. package/src/ai/ai_request.ts +608 -0
  11. package/src/ai/ai_response.ts +466 -0
  12. package/src/ai/argument.ts +58 -0
  13. package/src/ai/encryptobject.ts +142 -0
  14. package/src/ai/frontendpointconfig.ts +93 -0
  15. package/src/ai/icon.ts +87 -0
  16. package/src/ai/input.ts +120 -0
  17. package/src/ai/keyvalueinput.ts +200 -0
  18. package/src/ai/mcpendpointinfo.ts +87 -0
  19. package/src/ai/mcpendpointspec.ts +140 -0
  20. package/src/ai/mcpresourcespecification.ts +165 -0
  21. package/src/ai/mcpserverbasicinfo.ts +268 -0
  22. package/src/ai/mcpserverdetailinfo.ts +316 -0
  23. package/src/ai/mcpserverremoteserviceconfig.ts +88 -0
  24. package/src/ai/mcpserviceref.ts +87 -0
  25. package/src/ai/mcptool.ts +289 -0
  26. package/src/ai/mcptoolannotations.ts +93 -0
  27. package/src/ai/mcptoolmeta.ts +209 -0
  28. package/src/ai/mcptoolspecification.ts +250 -0
  29. package/src/ai/package.ts +142 -0
  30. package/src/ai/prompt.ts +96 -0
  31. package/src/ai/promptvariable.ts +81 -0
  32. package/src/ai/repository.ts +87 -0
  33. package/src/ai/securityscheme.ts +142 -0
  34. package/src/ai/serverversiondetail.ts +89 -0
  35. package/src/common/common.ts +1166 -0
  36. package/src/config/config_request.ts +887 -0
  37. package/src/config/config_response.ts +781 -0
  38. package/src/google/protobuf/struct.ts +415 -0
  39. package/src/index.ts +42 -0
  40. package/src/lock/lock.ts +264 -0
  41. package/src/naming/instance.ts +199 -0
  42. package/src/naming/naming_request.ts +768 -0
  43. package/src/naming/naming_response.ts +574 -0
  44. package/src/naming/serviceinfo.ts +130 -0
  45. package/tsconfig.json +11 -0
@@ -0,0 +1,308 @@
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/agentcarddetailinfo.proto
6
+
7
+ /* eslint-disable */
8
+ import { AgentCapabilities } from "./agentcapabilities";
9
+ import { AgentInterface } from "./agentinterface";
10
+ import { AgentProvider } from "./agentprovider";
11
+ import { AgentSkill } from "./agentskill";
12
+ import { SecurityScheme } from "./securityscheme";
13
+
14
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
15
+
16
+ /**
17
+ * metadata.type = "AgentCardDetailInfo"
18
+ * Flattened from: AgentCardDetailInfo -> AgentCard -> AgentCardBasicInfo
19
+ */
20
+ export interface AgentCardDetailInfo {
21
+ protocolVersion: string;
22
+ name: string;
23
+ description: string;
24
+ version: string;
25
+ iconUrl: string;
26
+ capabilities: AgentCapabilities | undefined;
27
+ skills: AgentSkill[];
28
+ url: string;
29
+ preferredTransport: string;
30
+ additionalInterfaces: AgentInterface[];
31
+ supportedInterfaces: AgentInterface[];
32
+ provider: AgentProvider | undefined;
33
+ documentationUrl: string;
34
+ securitySchemes: { [key: string]: SecurityScheme };
35
+ security: any[];
36
+ securityRequirements: any[];
37
+ defaultInputModes: string[];
38
+ defaultOutputModes: string[];
39
+ supportsAuthenticatedExtendedCard: boolean;
40
+ signatures: any[];
41
+ registrationType: string;
42
+ latestVersion: boolean;
43
+ }
44
+
45
+ export interface AgentCardDetailInfo_SecuritySchemesEntry {
46
+ key: string;
47
+ value: SecurityScheme | undefined;
48
+ }
49
+
50
+ function createBaseAgentCardDetailInfo(): AgentCardDetailInfo {
51
+ return {
52
+ protocolVersion: "",
53
+ name: "",
54
+ description: "",
55
+ version: "",
56
+ iconUrl: "",
57
+ capabilities: undefined,
58
+ skills: [],
59
+ url: "",
60
+ preferredTransport: "",
61
+ additionalInterfaces: [],
62
+ supportedInterfaces: [],
63
+ provider: undefined,
64
+ documentationUrl: "",
65
+ securitySchemes: {},
66
+ security: [],
67
+ securityRequirements: [],
68
+ defaultInputModes: [],
69
+ defaultOutputModes: [],
70
+ supportsAuthenticatedExtendedCard: false,
71
+ signatures: [],
72
+ registrationType: "",
73
+ latestVersion: false,
74
+ };
75
+ }
76
+
77
+ export const AgentCardDetailInfo: MessageFns<AgentCardDetailInfo> = {
78
+ fromJSON(object: any): AgentCardDetailInfo {
79
+ return {
80
+ protocolVersion: isSet(object.protocolVersion) ? globalThis.String(object.protocolVersion) : "",
81
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
82
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
83
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
84
+ iconUrl: isSet(object.iconUrl) ? globalThis.String(object.iconUrl) : "",
85
+ capabilities: isSet(object.capabilities) ? AgentCapabilities.fromJSON(object.capabilities) : undefined,
86
+ skills: globalThis.Array.isArray(object?.skills) ? object.skills.map((e: any) => AgentSkill.fromJSON(e)) : [],
87
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
88
+ preferredTransport: isSet(object.preferredTransport) ? globalThis.String(object.preferredTransport) : "",
89
+ additionalInterfaces: globalThis.Array.isArray(object?.additionalInterfaces)
90
+ ? object.additionalInterfaces.map((e: any) => AgentInterface.fromJSON(e))
91
+ : [],
92
+ supportedInterfaces: globalThis.Array.isArray(object?.supportedInterfaces)
93
+ ? object.supportedInterfaces.map((e: any) => AgentInterface.fromJSON(e))
94
+ : [],
95
+ provider: isSet(object.provider) ? AgentProvider.fromJSON(object.provider) : undefined,
96
+ documentationUrl: isSet(object.documentationUrl) ? globalThis.String(object.documentationUrl) : "",
97
+ securitySchemes: isObject(object.securitySchemes)
98
+ ? (globalThis.Object.entries(object.securitySchemes) as [string, any][]).reduce(
99
+ (acc: { [key: string]: SecurityScheme }, [key, value]: [string, any]) => {
100
+ acc[key] = SecurityScheme.fromJSON(value);
101
+ return acc;
102
+ },
103
+ {},
104
+ )
105
+ : {},
106
+ security: globalThis.Array.isArray(object?.security) ? [...object.security] : [],
107
+ securityRequirements: globalThis.Array.isArray(object?.securityRequirements)
108
+ ? [...object.securityRequirements]
109
+ : [],
110
+ defaultInputModes: globalThis.Array.isArray(object?.defaultInputModes)
111
+ ? object.defaultInputModes.map((e: any) => globalThis.String(e))
112
+ : [],
113
+ defaultOutputModes: globalThis.Array.isArray(object?.defaultOutputModes)
114
+ ? object.defaultOutputModes.map((e: any) => globalThis.String(e))
115
+ : [],
116
+ supportsAuthenticatedExtendedCard: isSet(object.supportsAuthenticatedExtendedCard)
117
+ ? globalThis.Boolean(object.supportsAuthenticatedExtendedCard)
118
+ : false,
119
+ signatures: globalThis.Array.isArray(object?.signatures) ? [...object.signatures] : [],
120
+ registrationType: isSet(object.registrationType) ? globalThis.String(object.registrationType) : "",
121
+ latestVersion: isSet(object.latestVersion) ? globalThis.Boolean(object.latestVersion) : false,
122
+ };
123
+ },
124
+
125
+ toJSON(message: AgentCardDetailInfo): unknown {
126
+ const obj: any = {};
127
+ if (message.protocolVersion !== "") {
128
+ obj.protocolVersion = message.protocolVersion;
129
+ }
130
+ if (message.name !== "") {
131
+ obj.name = message.name;
132
+ }
133
+ if (message.description !== "") {
134
+ obj.description = message.description;
135
+ }
136
+ if (message.version !== "") {
137
+ obj.version = message.version;
138
+ }
139
+ if (message.iconUrl !== "") {
140
+ obj.iconUrl = message.iconUrl;
141
+ }
142
+ if (message.capabilities !== undefined) {
143
+ obj.capabilities = AgentCapabilities.toJSON(message.capabilities);
144
+ }
145
+ if (message.skills?.length) {
146
+ obj.skills = message.skills.map((e) => AgentSkill.toJSON(e));
147
+ }
148
+ if (message.url !== "") {
149
+ obj.url = message.url;
150
+ }
151
+ if (message.preferredTransport !== "") {
152
+ obj.preferredTransport = message.preferredTransport;
153
+ }
154
+ if (message.additionalInterfaces?.length) {
155
+ obj.additionalInterfaces = message.additionalInterfaces.map((e) => AgentInterface.toJSON(e));
156
+ }
157
+ if (message.supportedInterfaces?.length) {
158
+ obj.supportedInterfaces = message.supportedInterfaces.map((e) => AgentInterface.toJSON(e));
159
+ }
160
+ if (message.provider !== undefined) {
161
+ obj.provider = AgentProvider.toJSON(message.provider);
162
+ }
163
+ if (message.documentationUrl !== "") {
164
+ obj.documentationUrl = message.documentationUrl;
165
+ }
166
+ if (message.securitySchemes) {
167
+ const entries = globalThis.Object.entries(message.securitySchemes) as [string, SecurityScheme][];
168
+ if (entries.length > 0) {
169
+ obj.securitySchemes = {};
170
+ entries.forEach(([k, v]) => {
171
+ obj.securitySchemes[k] = SecurityScheme.toJSON(v);
172
+ });
173
+ }
174
+ }
175
+ if (message.security?.length) {
176
+ obj.security = message.security;
177
+ }
178
+ if (message.securityRequirements?.length) {
179
+ obj.securityRequirements = message.securityRequirements;
180
+ }
181
+ if (message.defaultInputModes?.length) {
182
+ obj.defaultInputModes = message.defaultInputModes;
183
+ }
184
+ if (message.defaultOutputModes?.length) {
185
+ obj.defaultOutputModes = message.defaultOutputModes;
186
+ }
187
+ if (message.supportsAuthenticatedExtendedCard !== false) {
188
+ obj.supportsAuthenticatedExtendedCard = message.supportsAuthenticatedExtendedCard;
189
+ }
190
+ if (message.signatures?.length) {
191
+ obj.signatures = message.signatures;
192
+ }
193
+ if (message.registrationType !== "") {
194
+ obj.registrationType = message.registrationType;
195
+ }
196
+ if (message.latestVersion !== false) {
197
+ obj.latestVersion = message.latestVersion;
198
+ }
199
+ return obj;
200
+ },
201
+
202
+ create<I extends Exact<DeepPartial<AgentCardDetailInfo>, I>>(base?: I): AgentCardDetailInfo {
203
+ return AgentCardDetailInfo.fromPartial(base ?? ({} as any));
204
+ },
205
+ fromPartial<I extends Exact<DeepPartial<AgentCardDetailInfo>, I>>(object: I): AgentCardDetailInfo {
206
+ const message = createBaseAgentCardDetailInfo();
207
+ message.protocolVersion = object.protocolVersion ?? "";
208
+ message.name = object.name ?? "";
209
+ message.description = object.description ?? "";
210
+ message.version = object.version ?? "";
211
+ message.iconUrl = object.iconUrl ?? "";
212
+ message.capabilities = (object.capabilities !== undefined && object.capabilities !== null)
213
+ ? AgentCapabilities.fromPartial(object.capabilities)
214
+ : undefined;
215
+ message.skills = object.skills?.map((e) => AgentSkill.fromPartial(e)) || [];
216
+ message.url = object.url ?? "";
217
+ message.preferredTransport = object.preferredTransport ?? "";
218
+ message.additionalInterfaces = object.additionalInterfaces?.map((e) => AgentInterface.fromPartial(e)) || [];
219
+ message.supportedInterfaces = object.supportedInterfaces?.map((e) => AgentInterface.fromPartial(e)) || [];
220
+ message.provider = (object.provider !== undefined && object.provider !== null)
221
+ ? AgentProvider.fromPartial(object.provider)
222
+ : undefined;
223
+ message.documentationUrl = object.documentationUrl ?? "";
224
+ message.securitySchemes = (globalThis.Object.entries(object.securitySchemes ?? {}) as [string, SecurityScheme][])
225
+ .reduce((acc: { [key: string]: SecurityScheme }, [key, value]: [string, SecurityScheme]) => {
226
+ if (value !== undefined) {
227
+ acc[key] = SecurityScheme.fromPartial(value);
228
+ }
229
+ return acc;
230
+ }, {});
231
+ message.security = object.security?.map((e) => e) || [];
232
+ message.securityRequirements = object.securityRequirements?.map((e) => e) || [];
233
+ message.defaultInputModes = object.defaultInputModes?.map((e) => e) || [];
234
+ message.defaultOutputModes = object.defaultOutputModes?.map((e) => e) || [];
235
+ message.supportsAuthenticatedExtendedCard = object.supportsAuthenticatedExtendedCard ?? false;
236
+ message.signatures = object.signatures?.map((e) => e) || [];
237
+ message.registrationType = object.registrationType ?? "";
238
+ message.latestVersion = object.latestVersion ?? false;
239
+ return message;
240
+ },
241
+ };
242
+
243
+ function createBaseAgentCardDetailInfo_SecuritySchemesEntry(): AgentCardDetailInfo_SecuritySchemesEntry {
244
+ return { key: "", value: undefined };
245
+ }
246
+
247
+ export const AgentCardDetailInfo_SecuritySchemesEntry: MessageFns<AgentCardDetailInfo_SecuritySchemesEntry> = {
248
+ fromJSON(object: any): AgentCardDetailInfo_SecuritySchemesEntry {
249
+ return {
250
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
251
+ value: isSet(object.value) ? SecurityScheme.fromJSON(object.value) : undefined,
252
+ };
253
+ },
254
+
255
+ toJSON(message: AgentCardDetailInfo_SecuritySchemesEntry): unknown {
256
+ const obj: any = {};
257
+ if (message.key !== "") {
258
+ obj.key = message.key;
259
+ }
260
+ if (message.value !== undefined) {
261
+ obj.value = SecurityScheme.toJSON(message.value);
262
+ }
263
+ return obj;
264
+ },
265
+
266
+ create<I extends Exact<DeepPartial<AgentCardDetailInfo_SecuritySchemesEntry>, I>>(
267
+ base?: I,
268
+ ): AgentCardDetailInfo_SecuritySchemesEntry {
269
+ return AgentCardDetailInfo_SecuritySchemesEntry.fromPartial(base ?? ({} as any));
270
+ },
271
+ fromPartial<I extends Exact<DeepPartial<AgentCardDetailInfo_SecuritySchemesEntry>, I>>(
272
+ object: I,
273
+ ): AgentCardDetailInfo_SecuritySchemesEntry {
274
+ const message = createBaseAgentCardDetailInfo_SecuritySchemesEntry();
275
+ message.key = object.key ?? "";
276
+ message.value = (object.value !== undefined && object.value !== null)
277
+ ? SecurityScheme.fromPartial(object.value)
278
+ : undefined;
279
+ return message;
280
+ },
281
+ };
282
+
283
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
284
+
285
+ type DeepPartial<T> = T extends Builtin ? T
286
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
287
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
288
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
289
+ : Partial<T>;
290
+
291
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
292
+ type Exact<P, I extends P> = P extends Builtin ? P
293
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
294
+
295
+ function isObject(value: any): boolean {
296
+ return typeof value === "object" && value !== null;
297
+ }
298
+
299
+ function isSet(value: any): boolean {
300
+ return value !== null && value !== undefined;
301
+ }
302
+
303
+ interface MessageFns<T> {
304
+ fromJSON(object: any): T;
305
+ toJSON(message: T): unknown;
306
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
307
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
308
+ }
@@ -0,0 +1,134 @@
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/agentendpoint.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
10
+
11
+ /**
12
+ * metadata.type = "AgentEndpoint"
13
+ * Flattened from: AgentEndpoint
14
+ */
15
+ export interface AgentEndpoint {
16
+ transport: string;
17
+ address: string;
18
+ port: number;
19
+ path: string;
20
+ supportTls: boolean;
21
+ version: string;
22
+ protocolVersion: string;
23
+ tenant: string;
24
+ protocol: string;
25
+ query: string;
26
+ }
27
+
28
+ function createBaseAgentEndpoint(): AgentEndpoint {
29
+ return {
30
+ transport: "",
31
+ address: "",
32
+ port: 0,
33
+ path: "",
34
+ supportTls: false,
35
+ version: "",
36
+ protocolVersion: "",
37
+ tenant: "",
38
+ protocol: "",
39
+ query: "",
40
+ };
41
+ }
42
+
43
+ export const AgentEndpoint: MessageFns<AgentEndpoint> = {
44
+ fromJSON(object: any): AgentEndpoint {
45
+ return {
46
+ transport: isSet(object.transport) ? globalThis.String(object.transport) : "",
47
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
48
+ port: isSet(object.port) ? globalThis.Number(object.port) : 0,
49
+ path: isSet(object.path) ? globalThis.String(object.path) : "",
50
+ supportTls: isSet(object.supportTls) ? globalThis.Boolean(object.supportTls) : false,
51
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
52
+ protocolVersion: isSet(object.protocolVersion) ? globalThis.String(object.protocolVersion) : "",
53
+ tenant: isSet(object.tenant) ? globalThis.String(object.tenant) : "",
54
+ protocol: isSet(object.protocol) ? globalThis.String(object.protocol) : "",
55
+ query: isSet(object.query) ? globalThis.String(object.query) : "",
56
+ };
57
+ },
58
+
59
+ toJSON(message: AgentEndpoint): unknown {
60
+ const obj: any = {};
61
+ if (message.transport !== "") {
62
+ obj.transport = message.transport;
63
+ }
64
+ if (message.address !== "") {
65
+ obj.address = message.address;
66
+ }
67
+ if (message.port !== 0) {
68
+ obj.port = Math.round(message.port);
69
+ }
70
+ if (message.path !== "") {
71
+ obj.path = message.path;
72
+ }
73
+ if (message.supportTls !== false) {
74
+ obj.supportTls = message.supportTls;
75
+ }
76
+ if (message.version !== "") {
77
+ obj.version = message.version;
78
+ }
79
+ if (message.protocolVersion !== "") {
80
+ obj.protocolVersion = message.protocolVersion;
81
+ }
82
+ if (message.tenant !== "") {
83
+ obj.tenant = message.tenant;
84
+ }
85
+ if (message.protocol !== "") {
86
+ obj.protocol = message.protocol;
87
+ }
88
+ if (message.query !== "") {
89
+ obj.query = message.query;
90
+ }
91
+ return obj;
92
+ },
93
+
94
+ create<I extends Exact<DeepPartial<AgentEndpoint>, I>>(base?: I): AgentEndpoint {
95
+ return AgentEndpoint.fromPartial(base ?? ({} as any));
96
+ },
97
+ fromPartial<I extends Exact<DeepPartial<AgentEndpoint>, I>>(object: I): AgentEndpoint {
98
+ const message = createBaseAgentEndpoint();
99
+ message.transport = object.transport ?? "";
100
+ message.address = object.address ?? "";
101
+ message.port = object.port ?? 0;
102
+ message.path = object.path ?? "";
103
+ message.supportTls = object.supportTls ?? false;
104
+ message.version = object.version ?? "";
105
+ message.protocolVersion = object.protocolVersion ?? "";
106
+ message.tenant = object.tenant ?? "";
107
+ message.protocol = object.protocol ?? "";
108
+ message.query = object.query ?? "";
109
+ return message;
110
+ },
111
+ };
112
+
113
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
114
+
115
+ type DeepPartial<T> = T extends Builtin ? T
116
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
117
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
118
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
119
+ : Partial<T>;
120
+
121
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
122
+ type Exact<P, I extends P> = P extends Builtin ? P
123
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
124
+
125
+ function isSet(value: any): boolean {
126
+ return value !== null && value !== undefined;
127
+ }
128
+
129
+ interface MessageFns<T> {
130
+ fromJSON(object: any): T;
131
+ toJSON(message: T): unknown;
132
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
133
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
134
+ }
@@ -0,0 +1,152 @@
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/agentextension.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
10
+
11
+ /**
12
+ * metadata.type = "AgentExtension"
13
+ * Flattened from: AgentExtension
14
+ */
15
+ export interface AgentExtension {
16
+ uri: string;
17
+ description: string;
18
+ required: boolean;
19
+ params: { [key: string]: any | undefined };
20
+ }
21
+
22
+ export interface AgentExtension_ParamsEntry {
23
+ key: string;
24
+ value: any | undefined;
25
+ }
26
+
27
+ function createBaseAgentExtension(): AgentExtension {
28
+ return { uri: "", description: "", required: false, params: {} };
29
+ }
30
+
31
+ export const AgentExtension: MessageFns<AgentExtension> = {
32
+ fromJSON(object: any): AgentExtension {
33
+ return {
34
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
35
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
36
+ required: isSet(object.required) ? globalThis.Boolean(object.required) : false,
37
+ params: isObject(object.params)
38
+ ? (globalThis.Object.entries(object.params) as [string, any][]).reduce(
39
+ (acc: { [key: string]: any | undefined }, [key, value]: [string, any]) => {
40
+ acc[key] = value as any | undefined;
41
+ return acc;
42
+ },
43
+ {},
44
+ )
45
+ : {},
46
+ };
47
+ },
48
+
49
+ toJSON(message: AgentExtension): unknown {
50
+ const obj: any = {};
51
+ if (message.uri !== "") {
52
+ obj.uri = message.uri;
53
+ }
54
+ if (message.description !== "") {
55
+ obj.description = message.description;
56
+ }
57
+ if (message.required !== false) {
58
+ obj.required = message.required;
59
+ }
60
+ if (message.params) {
61
+ const entries = globalThis.Object.entries(message.params) as [string, any | undefined][];
62
+ if (entries.length > 0) {
63
+ obj.params = {};
64
+ entries.forEach(([k, v]) => {
65
+ obj.params[k] = v;
66
+ });
67
+ }
68
+ }
69
+ return obj;
70
+ },
71
+
72
+ create<I extends Exact<DeepPartial<AgentExtension>, I>>(base?: I): AgentExtension {
73
+ return AgentExtension.fromPartial(base ?? ({} as any));
74
+ },
75
+ fromPartial<I extends Exact<DeepPartial<AgentExtension>, I>>(object: I): AgentExtension {
76
+ const message = createBaseAgentExtension();
77
+ message.uri = object.uri ?? "";
78
+ message.description = object.description ?? "";
79
+ message.required = object.required ?? false;
80
+ message.params = (globalThis.Object.entries(object.params ?? {}) as [string, any | undefined][]).reduce(
81
+ (acc: { [key: string]: any | undefined }, [key, value]: [string, any | undefined]) => {
82
+ if (value !== undefined) {
83
+ acc[key] = value;
84
+ }
85
+ return acc;
86
+ },
87
+ {},
88
+ );
89
+ return message;
90
+ },
91
+ };
92
+
93
+ function createBaseAgentExtension_ParamsEntry(): AgentExtension_ParamsEntry {
94
+ return { key: "", value: undefined };
95
+ }
96
+
97
+ export const AgentExtension_ParamsEntry: MessageFns<AgentExtension_ParamsEntry> = {
98
+ fromJSON(object: any): AgentExtension_ParamsEntry {
99
+ return {
100
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
101
+ value: isSet(object?.value) ? object.value : undefined,
102
+ };
103
+ },
104
+
105
+ toJSON(message: AgentExtension_ParamsEntry): unknown {
106
+ const obj: any = {};
107
+ if (message.key !== "") {
108
+ obj.key = message.key;
109
+ }
110
+ if (message.value !== undefined) {
111
+ obj.value = message.value;
112
+ }
113
+ return obj;
114
+ },
115
+
116
+ create<I extends Exact<DeepPartial<AgentExtension_ParamsEntry>, I>>(base?: I): AgentExtension_ParamsEntry {
117
+ return AgentExtension_ParamsEntry.fromPartial(base ?? ({} as any));
118
+ },
119
+ fromPartial<I extends Exact<DeepPartial<AgentExtension_ParamsEntry>, I>>(object: I): AgentExtension_ParamsEntry {
120
+ const message = createBaseAgentExtension_ParamsEntry();
121
+ message.key = object.key ?? "";
122
+ message.value = object.value ?? undefined;
123
+ return message;
124
+ },
125
+ };
126
+
127
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
128
+
129
+ type DeepPartial<T> = T extends Builtin ? T
130
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
131
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
132
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
133
+ : Partial<T>;
134
+
135
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
136
+ type Exact<P, I extends P> = P extends Builtin ? P
137
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
138
+
139
+ function isObject(value: any): boolean {
140
+ return typeof value === "object" && value !== null;
141
+ }
142
+
143
+ function isSet(value: any): boolean {
144
+ return value !== null && value !== undefined;
145
+ }
146
+
147
+ interface MessageFns<T> {
148
+ fromJSON(object: any): T;
149
+ toJSON(message: T): unknown;
150
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
151
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
152
+ }
@@ -0,0 +1,93 @@
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/agentinterface.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
10
+
11
+ /**
12
+ * metadata.type = "AgentInterface"
13
+ * Flattened from: AgentInterface
14
+ */
15
+ export interface AgentInterface {
16
+ url: string;
17
+ transport: string;
18
+ protocolBinding: string;
19
+ protocolVersion: string;
20
+ tenant: string;
21
+ }
22
+
23
+ function createBaseAgentInterface(): AgentInterface {
24
+ return { url: "", transport: "", protocolBinding: "", protocolVersion: "", tenant: "" };
25
+ }
26
+
27
+ export const AgentInterface: MessageFns<AgentInterface> = {
28
+ fromJSON(object: any): AgentInterface {
29
+ return {
30
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
31
+ transport: isSet(object.transport) ? globalThis.String(object.transport) : "",
32
+ protocolBinding: isSet(object.protocolBinding) ? globalThis.String(object.protocolBinding) : "",
33
+ protocolVersion: isSet(object.protocolVersion) ? globalThis.String(object.protocolVersion) : "",
34
+ tenant: isSet(object.tenant) ? globalThis.String(object.tenant) : "",
35
+ };
36
+ },
37
+
38
+ toJSON(message: AgentInterface): unknown {
39
+ const obj: any = {};
40
+ if (message.url !== "") {
41
+ obj.url = message.url;
42
+ }
43
+ if (message.transport !== "") {
44
+ obj.transport = message.transport;
45
+ }
46
+ if (message.protocolBinding !== "") {
47
+ obj.protocolBinding = message.protocolBinding;
48
+ }
49
+ if (message.protocolVersion !== "") {
50
+ obj.protocolVersion = message.protocolVersion;
51
+ }
52
+ if (message.tenant !== "") {
53
+ obj.tenant = message.tenant;
54
+ }
55
+ return obj;
56
+ },
57
+
58
+ create<I extends Exact<DeepPartial<AgentInterface>, I>>(base?: I): AgentInterface {
59
+ return AgentInterface.fromPartial(base ?? ({} as any));
60
+ },
61
+ fromPartial<I extends Exact<DeepPartial<AgentInterface>, I>>(object: I): AgentInterface {
62
+ const message = createBaseAgentInterface();
63
+ message.url = object.url ?? "";
64
+ message.transport = object.transport ?? "";
65
+ message.protocolBinding = object.protocolBinding ?? "";
66
+ message.protocolVersion = object.protocolVersion ?? "";
67
+ message.tenant = object.tenant ?? "";
68
+ return message;
69
+ },
70
+ };
71
+
72
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
73
+
74
+ type DeepPartial<T> = T extends Builtin ? T
75
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
76
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
77
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
78
+ : Partial<T>;
79
+
80
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
81
+ type Exact<P, I extends P> = P extends Builtin ? P
82
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
83
+
84
+ function isSet(value: any): boolean {
85
+ return value !== null && value !== undefined;
86
+ }
87
+
88
+ interface MessageFns<T> {
89
+ fromJSON(object: any): T;
90
+ toJSON(message: T): unknown;
91
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
92
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
93
+ }