@a2a-js/sdk 0.3.8 → 0.3.10
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/README.md +61 -1
- package/dist/chunk-EGOOH5HP.js +68 -0
- package/dist/chunk-F6ACNKFR.js +41 -0
- package/dist/chunk-QQCCX2KH.js +3338 -0
- package/dist/{chunk-NUQQPJNY.js → chunk-S53FFHPM.js} +1 -39
- package/dist/{chunk-DHC2REQH.js → chunk-U3QAVT4H.js} +218 -377
- package/dist/chunk-WMQQYH7W.js +71 -0
- package/dist/client/index.cjs +236 -259
- package/dist/client/index.d.cts +4 -415
- package/dist/client/index.d.ts +4 -415
- package/dist/client/index.js +22 -17
- package/dist/client/transports/grpc/index.cjs +4601 -0
- package/dist/client/transports/grpc/index.d.cts +42 -0
- package/dist/client/transports/grpc/index.d.ts +42 -0
- package/dist/client/transports/grpc/index.js +262 -0
- package/dist/core-BAzQJfA2.d.ts +416 -0
- package/dist/core-Ci-lR0jz.d.cts +416 -0
- package/dist/server/express/index.cjs +229 -268
- package/dist/server/express/index.js +23 -17
- package/dist/server/grpc/index.cjs +4560 -0
- package/dist/server/grpc/index.d.cts +1053 -0
- package/dist/server/grpc/index.d.ts +1053 -0
- package/dist/server/grpc/index.js +186 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +6 -4
- package/package.json +29 -4
|
@@ -0,0 +1,3338 @@
|
|
|
1
|
+
// src/grpc/pb/a2a_services.ts
|
|
2
|
+
import { BinaryReader as BinaryReader4, BinaryWriter as BinaryWriter4 } from "@bufbuild/protobuf/wire";
|
|
3
|
+
import {
|
|
4
|
+
makeGenericClientConstructor
|
|
5
|
+
} from "@grpc/grpc-js";
|
|
6
|
+
|
|
7
|
+
// src/grpc/pb/google/protobuf/empty.ts
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
function createBaseEmpty() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
var Empty = {
|
|
13
|
+
encode(_, writer = new BinaryWriter()) {
|
|
14
|
+
return writer;
|
|
15
|
+
},
|
|
16
|
+
decode(input, length) {
|
|
17
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
19
|
+
const message = createBaseEmpty();
|
|
20
|
+
while (reader.pos < end) {
|
|
21
|
+
const tag = reader.uint32();
|
|
22
|
+
switch (tag >>> 3) {
|
|
23
|
+
}
|
|
24
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
reader.skip(tag & 7);
|
|
28
|
+
}
|
|
29
|
+
return message;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/grpc/pb/google/protobuf/struct.ts
|
|
34
|
+
import { BinaryReader as BinaryReader2, BinaryWriter as BinaryWriter2 } from "@bufbuild/protobuf/wire";
|
|
35
|
+
function createBaseStruct() {
|
|
36
|
+
return { fields: {} };
|
|
37
|
+
}
|
|
38
|
+
var Struct = {
|
|
39
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
40
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
|
41
|
+
if (value !== void 0) {
|
|
42
|
+
Struct_FieldsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return writer;
|
|
46
|
+
},
|
|
47
|
+
decode(input, length) {
|
|
48
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
49
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
50
|
+
const message = createBaseStruct();
|
|
51
|
+
while (reader.pos < end) {
|
|
52
|
+
const tag = reader.uint32();
|
|
53
|
+
switch (tag >>> 3) {
|
|
54
|
+
case 1: {
|
|
55
|
+
if (tag !== 10) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
59
|
+
if (entry1.value !== void 0) {
|
|
60
|
+
message.fields[entry1.key] = entry1.value;
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
reader.skip(tag & 7);
|
|
69
|
+
}
|
|
70
|
+
return message;
|
|
71
|
+
},
|
|
72
|
+
wrap(object) {
|
|
73
|
+
const struct = createBaseStruct();
|
|
74
|
+
if (object !== void 0) {
|
|
75
|
+
for (const key of Object.keys(object)) {
|
|
76
|
+
struct.fields[key] = object[key];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return struct;
|
|
80
|
+
},
|
|
81
|
+
unwrap(message) {
|
|
82
|
+
const object = {};
|
|
83
|
+
if (message.fields) {
|
|
84
|
+
for (const key of Object.keys(message.fields)) {
|
|
85
|
+
object[key] = message.fields[key];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return object;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
function createBaseStruct_FieldsEntry() {
|
|
92
|
+
return { key: "", value: void 0 };
|
|
93
|
+
}
|
|
94
|
+
var Struct_FieldsEntry = {
|
|
95
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
96
|
+
if (message.key !== "") {
|
|
97
|
+
writer.uint32(10).string(message.key);
|
|
98
|
+
}
|
|
99
|
+
if (message.value !== void 0) {
|
|
100
|
+
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
101
|
+
}
|
|
102
|
+
return writer;
|
|
103
|
+
},
|
|
104
|
+
decode(input, length) {
|
|
105
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
106
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
107
|
+
const message = createBaseStruct_FieldsEntry();
|
|
108
|
+
while (reader.pos < end) {
|
|
109
|
+
const tag = reader.uint32();
|
|
110
|
+
switch (tag >>> 3) {
|
|
111
|
+
case 1: {
|
|
112
|
+
if (tag !== 10) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
message.key = reader.string();
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
case 2: {
|
|
119
|
+
if (tag !== 18) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
reader.skip(tag & 7);
|
|
130
|
+
}
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function createBaseValue() {
|
|
135
|
+
return { kind: void 0 };
|
|
136
|
+
}
|
|
137
|
+
var Value = {
|
|
138
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
139
|
+
switch (message.kind?.$case) {
|
|
140
|
+
case "nullValue":
|
|
141
|
+
writer.uint32(8).int32(message.kind.value);
|
|
142
|
+
break;
|
|
143
|
+
case "numberValue":
|
|
144
|
+
writer.uint32(17).double(message.kind.value);
|
|
145
|
+
break;
|
|
146
|
+
case "stringValue":
|
|
147
|
+
writer.uint32(26).string(message.kind.value);
|
|
148
|
+
break;
|
|
149
|
+
case "boolValue":
|
|
150
|
+
writer.uint32(32).bool(message.kind.value);
|
|
151
|
+
break;
|
|
152
|
+
case "structValue":
|
|
153
|
+
Struct.encode(Struct.wrap(message.kind.value), writer.uint32(42).fork()).join();
|
|
154
|
+
break;
|
|
155
|
+
case "listValue":
|
|
156
|
+
ListValue.encode(ListValue.wrap(message.kind.value), writer.uint32(50).fork()).join();
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
return writer;
|
|
160
|
+
},
|
|
161
|
+
decode(input, length) {
|
|
162
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
163
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
164
|
+
const message = createBaseValue();
|
|
165
|
+
while (reader.pos < end) {
|
|
166
|
+
const tag = reader.uint32();
|
|
167
|
+
switch (tag >>> 3) {
|
|
168
|
+
case 1: {
|
|
169
|
+
if (tag !== 8) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
message.kind = { $case: "nullValue", value: reader.int32() };
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
case 2: {
|
|
176
|
+
if (tag !== 17) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
message.kind = { $case: "numberValue", value: reader.double() };
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
case 3: {
|
|
183
|
+
if (tag !== 26) {
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
message.kind = { $case: "stringValue", value: reader.string() };
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
case 4: {
|
|
190
|
+
if (tag !== 32) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
message.kind = { $case: "boolValue", value: reader.bool() };
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
case 5: {
|
|
197
|
+
if (tag !== 42) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
message.kind = { $case: "structValue", value: Struct.unwrap(Struct.decode(reader, reader.uint32())) };
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
case 6: {
|
|
204
|
+
if (tag !== 50) {
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
message.kind = { $case: "listValue", value: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) };
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
reader.skip(tag & 7);
|
|
215
|
+
}
|
|
216
|
+
return message;
|
|
217
|
+
},
|
|
218
|
+
wrap(value) {
|
|
219
|
+
const result = createBaseValue();
|
|
220
|
+
if (value === null) {
|
|
221
|
+
result.kind = { $case: "nullValue", value };
|
|
222
|
+
} else if (typeof value === "boolean") {
|
|
223
|
+
result.kind = { $case: "boolValue", value };
|
|
224
|
+
} else if (typeof value === "number") {
|
|
225
|
+
result.kind = { $case: "numberValue", value };
|
|
226
|
+
} else if (typeof value === "string") {
|
|
227
|
+
result.kind = { $case: "stringValue", value };
|
|
228
|
+
} else if (globalThis.Array.isArray(value)) {
|
|
229
|
+
result.kind = { $case: "listValue", value };
|
|
230
|
+
} else if (typeof value === "object") {
|
|
231
|
+
result.kind = { $case: "structValue", value };
|
|
232
|
+
} else if (typeof value !== "undefined") {
|
|
233
|
+
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
234
|
+
}
|
|
235
|
+
return result;
|
|
236
|
+
},
|
|
237
|
+
unwrap(message) {
|
|
238
|
+
return message.kind?.value;
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
function createBaseListValue() {
|
|
242
|
+
return { values: [] };
|
|
243
|
+
}
|
|
244
|
+
var ListValue = {
|
|
245
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
246
|
+
for (const v of message.values) {
|
|
247
|
+
Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
|
|
248
|
+
}
|
|
249
|
+
return writer;
|
|
250
|
+
},
|
|
251
|
+
decode(input, length) {
|
|
252
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
253
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
254
|
+
const message = createBaseListValue();
|
|
255
|
+
while (reader.pos < end) {
|
|
256
|
+
const tag = reader.uint32();
|
|
257
|
+
switch (tag >>> 3) {
|
|
258
|
+
case 1: {
|
|
259
|
+
if (tag !== 10) {
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
reader.skip(tag & 7);
|
|
270
|
+
}
|
|
271
|
+
return message;
|
|
272
|
+
},
|
|
273
|
+
wrap(array) {
|
|
274
|
+
const result = createBaseListValue();
|
|
275
|
+
result.values = array ?? [];
|
|
276
|
+
return result;
|
|
277
|
+
},
|
|
278
|
+
unwrap(message) {
|
|
279
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
|
|
280
|
+
return message.values;
|
|
281
|
+
} else {
|
|
282
|
+
return message;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// src/grpc/pb/google/protobuf/timestamp.ts
|
|
288
|
+
import { BinaryReader as BinaryReader3, BinaryWriter as BinaryWriter3 } from "@bufbuild/protobuf/wire";
|
|
289
|
+
function createBaseTimestamp() {
|
|
290
|
+
return { seconds: 0, nanos: 0 };
|
|
291
|
+
}
|
|
292
|
+
var Timestamp = {
|
|
293
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
294
|
+
if (message.seconds !== 0) {
|
|
295
|
+
writer.uint32(8).int64(message.seconds);
|
|
296
|
+
}
|
|
297
|
+
if (message.nanos !== 0) {
|
|
298
|
+
writer.uint32(16).int32(message.nanos);
|
|
299
|
+
}
|
|
300
|
+
return writer;
|
|
301
|
+
},
|
|
302
|
+
decode(input, length) {
|
|
303
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
304
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
305
|
+
const message = createBaseTimestamp();
|
|
306
|
+
while (reader.pos < end) {
|
|
307
|
+
const tag = reader.uint32();
|
|
308
|
+
switch (tag >>> 3) {
|
|
309
|
+
case 1: {
|
|
310
|
+
if (tag !== 8) {
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
message.seconds = longToNumber(reader.int64());
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
case 2: {
|
|
317
|
+
if (tag !== 16) {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
message.nanos = reader.int32();
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
reader.skip(tag & 7);
|
|
328
|
+
}
|
|
329
|
+
return message;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
function longToNumber(int64) {
|
|
333
|
+
const num = globalThis.Number(int64.toString());
|
|
334
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
335
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
336
|
+
}
|
|
337
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
338
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
339
|
+
}
|
|
340
|
+
return num;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// src/grpc/pb/a2a_services.ts
|
|
344
|
+
function createBaseSendMessageConfiguration() {
|
|
345
|
+
return { acceptedOutputModes: [], pushNotification: void 0, historyLength: 0, blocking: false };
|
|
346
|
+
}
|
|
347
|
+
var SendMessageConfiguration = {
|
|
348
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
349
|
+
for (const v of message.acceptedOutputModes) {
|
|
350
|
+
writer.uint32(10).string(v);
|
|
351
|
+
}
|
|
352
|
+
if (message.pushNotification !== void 0) {
|
|
353
|
+
PushNotificationConfig.encode(message.pushNotification, writer.uint32(18).fork()).join();
|
|
354
|
+
}
|
|
355
|
+
if (message.historyLength !== 0) {
|
|
356
|
+
writer.uint32(24).int32(message.historyLength);
|
|
357
|
+
}
|
|
358
|
+
if (message.blocking !== false) {
|
|
359
|
+
writer.uint32(32).bool(message.blocking);
|
|
360
|
+
}
|
|
361
|
+
return writer;
|
|
362
|
+
},
|
|
363
|
+
decode(input, length) {
|
|
364
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
365
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
366
|
+
const message = createBaseSendMessageConfiguration();
|
|
367
|
+
while (reader.pos < end) {
|
|
368
|
+
const tag = reader.uint32();
|
|
369
|
+
switch (tag >>> 3) {
|
|
370
|
+
case 1: {
|
|
371
|
+
if (tag !== 10) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.acceptedOutputModes.push(reader.string());
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 2: {
|
|
378
|
+
if (tag !== 18) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.pushNotification = PushNotificationConfig.decode(reader, reader.uint32());
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
case 3: {
|
|
385
|
+
if (tag !== 24) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
message.historyLength = reader.int32();
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
case 4: {
|
|
392
|
+
if (tag !== 32) {
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
message.blocking = reader.bool();
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
reader.skip(tag & 7);
|
|
403
|
+
}
|
|
404
|
+
return message;
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
function createBaseTask() {
|
|
408
|
+
return { id: "", contextId: "", status: void 0, artifacts: [], history: [], metadata: void 0 };
|
|
409
|
+
}
|
|
410
|
+
var Task = {
|
|
411
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
412
|
+
if (message.id !== "") {
|
|
413
|
+
writer.uint32(10).string(message.id);
|
|
414
|
+
}
|
|
415
|
+
if (message.contextId !== "") {
|
|
416
|
+
writer.uint32(18).string(message.contextId);
|
|
417
|
+
}
|
|
418
|
+
if (message.status !== void 0) {
|
|
419
|
+
TaskStatus.encode(message.status, writer.uint32(26).fork()).join();
|
|
420
|
+
}
|
|
421
|
+
for (const v of message.artifacts) {
|
|
422
|
+
Artifact.encode(v, writer.uint32(34).fork()).join();
|
|
423
|
+
}
|
|
424
|
+
for (const v of message.history) {
|
|
425
|
+
Message.encode(v, writer.uint32(42).fork()).join();
|
|
426
|
+
}
|
|
427
|
+
if (message.metadata !== void 0) {
|
|
428
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(50).fork()).join();
|
|
429
|
+
}
|
|
430
|
+
return writer;
|
|
431
|
+
},
|
|
432
|
+
decode(input, length) {
|
|
433
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
434
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
435
|
+
const message = createBaseTask();
|
|
436
|
+
while (reader.pos < end) {
|
|
437
|
+
const tag = reader.uint32();
|
|
438
|
+
switch (tag >>> 3) {
|
|
439
|
+
case 1: {
|
|
440
|
+
if (tag !== 10) {
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
message.id = reader.string();
|
|
444
|
+
continue;
|
|
445
|
+
}
|
|
446
|
+
case 2: {
|
|
447
|
+
if (tag !== 18) {
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
message.contextId = reader.string();
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
case 3: {
|
|
454
|
+
if (tag !== 26) {
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
message.status = TaskStatus.decode(reader, reader.uint32());
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
case 4: {
|
|
461
|
+
if (tag !== 34) {
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
message.artifacts.push(Artifact.decode(reader, reader.uint32()));
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
case 5: {
|
|
468
|
+
if (tag !== 42) {
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
message.history.push(Message.decode(reader, reader.uint32()));
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
case 6: {
|
|
475
|
+
if (tag !== 50) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
reader.skip(tag & 7);
|
|
486
|
+
}
|
|
487
|
+
return message;
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
function createBaseTaskStatus() {
|
|
491
|
+
return { state: 0, update: void 0, timestamp: void 0 };
|
|
492
|
+
}
|
|
493
|
+
var TaskStatus = {
|
|
494
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
495
|
+
if (message.state !== 0) {
|
|
496
|
+
writer.uint32(8).int32(message.state);
|
|
497
|
+
}
|
|
498
|
+
if (message.update !== void 0) {
|
|
499
|
+
Message.encode(message.update, writer.uint32(18).fork()).join();
|
|
500
|
+
}
|
|
501
|
+
if (message.timestamp !== void 0) {
|
|
502
|
+
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).join();
|
|
503
|
+
}
|
|
504
|
+
return writer;
|
|
505
|
+
},
|
|
506
|
+
decode(input, length) {
|
|
507
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
508
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
509
|
+
const message = createBaseTaskStatus();
|
|
510
|
+
while (reader.pos < end) {
|
|
511
|
+
const tag = reader.uint32();
|
|
512
|
+
switch (tag >>> 3) {
|
|
513
|
+
case 1: {
|
|
514
|
+
if (tag !== 8) {
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
message.state = reader.int32();
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
case 2: {
|
|
521
|
+
if (tag !== 18) {
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
message.update = Message.decode(reader, reader.uint32());
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
case 3: {
|
|
528
|
+
if (tag !== 26) {
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
reader.skip(tag & 7);
|
|
539
|
+
}
|
|
540
|
+
return message;
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
function createBasePart() {
|
|
544
|
+
return { part: void 0 };
|
|
545
|
+
}
|
|
546
|
+
var Part = {
|
|
547
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
548
|
+
switch (message.part?.$case) {
|
|
549
|
+
case "text":
|
|
550
|
+
writer.uint32(10).string(message.part.value);
|
|
551
|
+
break;
|
|
552
|
+
case "file":
|
|
553
|
+
FilePart.encode(message.part.value, writer.uint32(18).fork()).join();
|
|
554
|
+
break;
|
|
555
|
+
case "data":
|
|
556
|
+
DataPart.encode(message.part.value, writer.uint32(26).fork()).join();
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
return writer;
|
|
560
|
+
},
|
|
561
|
+
decode(input, length) {
|
|
562
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
563
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
564
|
+
const message = createBasePart();
|
|
565
|
+
while (reader.pos < end) {
|
|
566
|
+
const tag = reader.uint32();
|
|
567
|
+
switch (tag >>> 3) {
|
|
568
|
+
case 1: {
|
|
569
|
+
if (tag !== 10) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
message.part = { $case: "text", value: reader.string() };
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
case 2: {
|
|
576
|
+
if (tag !== 18) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
message.part = { $case: "file", value: FilePart.decode(reader, reader.uint32()) };
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
case 3: {
|
|
583
|
+
if (tag !== 26) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
message.part = { $case: "data", value: DataPart.decode(reader, reader.uint32()) };
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
reader.skip(tag & 7);
|
|
594
|
+
}
|
|
595
|
+
return message;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
function createBaseFilePart() {
|
|
599
|
+
return { file: void 0, mimeType: "" };
|
|
600
|
+
}
|
|
601
|
+
var FilePart = {
|
|
602
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
603
|
+
switch (message.file?.$case) {
|
|
604
|
+
case "fileWithUri":
|
|
605
|
+
writer.uint32(10).string(message.file.value);
|
|
606
|
+
break;
|
|
607
|
+
case "fileWithBytes":
|
|
608
|
+
writer.uint32(18).bytes(message.file.value);
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
if (message.mimeType !== "") {
|
|
612
|
+
writer.uint32(26).string(message.mimeType);
|
|
613
|
+
}
|
|
614
|
+
return writer;
|
|
615
|
+
},
|
|
616
|
+
decode(input, length) {
|
|
617
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
618
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
619
|
+
const message = createBaseFilePart();
|
|
620
|
+
while (reader.pos < end) {
|
|
621
|
+
const tag = reader.uint32();
|
|
622
|
+
switch (tag >>> 3) {
|
|
623
|
+
case 1: {
|
|
624
|
+
if (tag !== 10) {
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
message.file = { $case: "fileWithUri", value: reader.string() };
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
case 2: {
|
|
631
|
+
if (tag !== 18) {
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
message.file = { $case: "fileWithBytes", value: Buffer.from(reader.bytes()) };
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
case 3: {
|
|
638
|
+
if (tag !== 26) {
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
message.mimeType = reader.string();
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
reader.skip(tag & 7);
|
|
649
|
+
}
|
|
650
|
+
return message;
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
function createBaseDataPart() {
|
|
654
|
+
return { data: void 0 };
|
|
655
|
+
}
|
|
656
|
+
var DataPart = {
|
|
657
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
658
|
+
if (message.data !== void 0) {
|
|
659
|
+
Struct.encode(Struct.wrap(message.data), writer.uint32(10).fork()).join();
|
|
660
|
+
}
|
|
661
|
+
return writer;
|
|
662
|
+
},
|
|
663
|
+
decode(input, length) {
|
|
664
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
665
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
666
|
+
const message = createBaseDataPart();
|
|
667
|
+
while (reader.pos < end) {
|
|
668
|
+
const tag = reader.uint32();
|
|
669
|
+
switch (tag >>> 3) {
|
|
670
|
+
case 1: {
|
|
671
|
+
if (tag !== 10) {
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
message.data = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
reader.skip(tag & 7);
|
|
682
|
+
}
|
|
683
|
+
return message;
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
function createBaseMessage() {
|
|
687
|
+
return { messageId: "", contextId: "", taskId: "", role: 0, content: [], metadata: void 0, extensions: [] };
|
|
688
|
+
}
|
|
689
|
+
var Message = {
|
|
690
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
691
|
+
if (message.messageId !== "") {
|
|
692
|
+
writer.uint32(10).string(message.messageId);
|
|
693
|
+
}
|
|
694
|
+
if (message.contextId !== "") {
|
|
695
|
+
writer.uint32(18).string(message.contextId);
|
|
696
|
+
}
|
|
697
|
+
if (message.taskId !== "") {
|
|
698
|
+
writer.uint32(26).string(message.taskId);
|
|
699
|
+
}
|
|
700
|
+
if (message.role !== 0) {
|
|
701
|
+
writer.uint32(32).int32(message.role);
|
|
702
|
+
}
|
|
703
|
+
for (const v of message.content) {
|
|
704
|
+
Part.encode(v, writer.uint32(42).fork()).join();
|
|
705
|
+
}
|
|
706
|
+
if (message.metadata !== void 0) {
|
|
707
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(50).fork()).join();
|
|
708
|
+
}
|
|
709
|
+
for (const v of message.extensions) {
|
|
710
|
+
writer.uint32(58).string(v);
|
|
711
|
+
}
|
|
712
|
+
return writer;
|
|
713
|
+
},
|
|
714
|
+
decode(input, length) {
|
|
715
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
716
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
717
|
+
const message = createBaseMessage();
|
|
718
|
+
while (reader.pos < end) {
|
|
719
|
+
const tag = reader.uint32();
|
|
720
|
+
switch (tag >>> 3) {
|
|
721
|
+
case 1: {
|
|
722
|
+
if (tag !== 10) {
|
|
723
|
+
break;
|
|
724
|
+
}
|
|
725
|
+
message.messageId = reader.string();
|
|
726
|
+
continue;
|
|
727
|
+
}
|
|
728
|
+
case 2: {
|
|
729
|
+
if (tag !== 18) {
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
message.contextId = reader.string();
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
735
|
+
case 3: {
|
|
736
|
+
if (tag !== 26) {
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
message.taskId = reader.string();
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
case 4: {
|
|
743
|
+
if (tag !== 32) {
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
message.role = reader.int32();
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
case 5: {
|
|
750
|
+
if (tag !== 42) {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
message.content.push(Part.decode(reader, reader.uint32()));
|
|
754
|
+
continue;
|
|
755
|
+
}
|
|
756
|
+
case 6: {
|
|
757
|
+
if (tag !== 50) {
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
760
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
761
|
+
continue;
|
|
762
|
+
}
|
|
763
|
+
case 7: {
|
|
764
|
+
if (tag !== 58) {
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
message.extensions.push(reader.string());
|
|
768
|
+
continue;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
reader.skip(tag & 7);
|
|
775
|
+
}
|
|
776
|
+
return message;
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
function createBaseArtifact() {
|
|
780
|
+
return { artifactId: "", name: "", description: "", parts: [], metadata: void 0, extensions: [] };
|
|
781
|
+
}
|
|
782
|
+
var Artifact = {
|
|
783
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
784
|
+
if (message.artifactId !== "") {
|
|
785
|
+
writer.uint32(10).string(message.artifactId);
|
|
786
|
+
}
|
|
787
|
+
if (message.name !== "") {
|
|
788
|
+
writer.uint32(26).string(message.name);
|
|
789
|
+
}
|
|
790
|
+
if (message.description !== "") {
|
|
791
|
+
writer.uint32(34).string(message.description);
|
|
792
|
+
}
|
|
793
|
+
for (const v of message.parts) {
|
|
794
|
+
Part.encode(v, writer.uint32(42).fork()).join();
|
|
795
|
+
}
|
|
796
|
+
if (message.metadata !== void 0) {
|
|
797
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(50).fork()).join();
|
|
798
|
+
}
|
|
799
|
+
for (const v of message.extensions) {
|
|
800
|
+
writer.uint32(58).string(v);
|
|
801
|
+
}
|
|
802
|
+
return writer;
|
|
803
|
+
},
|
|
804
|
+
decode(input, length) {
|
|
805
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
806
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
807
|
+
const message = createBaseArtifact();
|
|
808
|
+
while (reader.pos < end) {
|
|
809
|
+
const tag = reader.uint32();
|
|
810
|
+
switch (tag >>> 3) {
|
|
811
|
+
case 1: {
|
|
812
|
+
if (tag !== 10) {
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
message.artifactId = reader.string();
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
818
|
+
case 3: {
|
|
819
|
+
if (tag !== 26) {
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
message.name = reader.string();
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
case 4: {
|
|
826
|
+
if (tag !== 34) {
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
829
|
+
message.description = reader.string();
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
case 5: {
|
|
833
|
+
if (tag !== 42) {
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
message.parts.push(Part.decode(reader, reader.uint32()));
|
|
837
|
+
continue;
|
|
838
|
+
}
|
|
839
|
+
case 6: {
|
|
840
|
+
if (tag !== 50) {
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
844
|
+
continue;
|
|
845
|
+
}
|
|
846
|
+
case 7: {
|
|
847
|
+
if (tag !== 58) {
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
message.extensions.push(reader.string());
|
|
851
|
+
continue;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
reader.skip(tag & 7);
|
|
858
|
+
}
|
|
859
|
+
return message;
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
function createBaseTaskStatusUpdateEvent() {
|
|
863
|
+
return { taskId: "", contextId: "", status: void 0, final: false, metadata: void 0 };
|
|
864
|
+
}
|
|
865
|
+
var TaskStatusUpdateEvent = {
|
|
866
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
867
|
+
if (message.taskId !== "") {
|
|
868
|
+
writer.uint32(10).string(message.taskId);
|
|
869
|
+
}
|
|
870
|
+
if (message.contextId !== "") {
|
|
871
|
+
writer.uint32(18).string(message.contextId);
|
|
872
|
+
}
|
|
873
|
+
if (message.status !== void 0) {
|
|
874
|
+
TaskStatus.encode(message.status, writer.uint32(26).fork()).join();
|
|
875
|
+
}
|
|
876
|
+
if (message.final !== false) {
|
|
877
|
+
writer.uint32(32).bool(message.final);
|
|
878
|
+
}
|
|
879
|
+
if (message.metadata !== void 0) {
|
|
880
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(42).fork()).join();
|
|
881
|
+
}
|
|
882
|
+
return writer;
|
|
883
|
+
},
|
|
884
|
+
decode(input, length) {
|
|
885
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
886
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
887
|
+
const message = createBaseTaskStatusUpdateEvent();
|
|
888
|
+
while (reader.pos < end) {
|
|
889
|
+
const tag = reader.uint32();
|
|
890
|
+
switch (tag >>> 3) {
|
|
891
|
+
case 1: {
|
|
892
|
+
if (tag !== 10) {
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
message.taskId = reader.string();
|
|
896
|
+
continue;
|
|
897
|
+
}
|
|
898
|
+
case 2: {
|
|
899
|
+
if (tag !== 18) {
|
|
900
|
+
break;
|
|
901
|
+
}
|
|
902
|
+
message.contextId = reader.string();
|
|
903
|
+
continue;
|
|
904
|
+
}
|
|
905
|
+
case 3: {
|
|
906
|
+
if (tag !== 26) {
|
|
907
|
+
break;
|
|
908
|
+
}
|
|
909
|
+
message.status = TaskStatus.decode(reader, reader.uint32());
|
|
910
|
+
continue;
|
|
911
|
+
}
|
|
912
|
+
case 4: {
|
|
913
|
+
if (tag !== 32) {
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
916
|
+
message.final = reader.bool();
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
case 5: {
|
|
920
|
+
if (tag !== 42) {
|
|
921
|
+
break;
|
|
922
|
+
}
|
|
923
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
924
|
+
continue;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
reader.skip(tag & 7);
|
|
931
|
+
}
|
|
932
|
+
return message;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
function createBaseTaskArtifactUpdateEvent() {
|
|
936
|
+
return { taskId: "", contextId: "", artifact: void 0, append: false, lastChunk: false, metadata: void 0 };
|
|
937
|
+
}
|
|
938
|
+
var TaskArtifactUpdateEvent = {
|
|
939
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
940
|
+
if (message.taskId !== "") {
|
|
941
|
+
writer.uint32(10).string(message.taskId);
|
|
942
|
+
}
|
|
943
|
+
if (message.contextId !== "") {
|
|
944
|
+
writer.uint32(18).string(message.contextId);
|
|
945
|
+
}
|
|
946
|
+
if (message.artifact !== void 0) {
|
|
947
|
+
Artifact.encode(message.artifact, writer.uint32(26).fork()).join();
|
|
948
|
+
}
|
|
949
|
+
if (message.append !== false) {
|
|
950
|
+
writer.uint32(32).bool(message.append);
|
|
951
|
+
}
|
|
952
|
+
if (message.lastChunk !== false) {
|
|
953
|
+
writer.uint32(40).bool(message.lastChunk);
|
|
954
|
+
}
|
|
955
|
+
if (message.metadata !== void 0) {
|
|
956
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(50).fork()).join();
|
|
957
|
+
}
|
|
958
|
+
return writer;
|
|
959
|
+
},
|
|
960
|
+
decode(input, length) {
|
|
961
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
962
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
963
|
+
const message = createBaseTaskArtifactUpdateEvent();
|
|
964
|
+
while (reader.pos < end) {
|
|
965
|
+
const tag = reader.uint32();
|
|
966
|
+
switch (tag >>> 3) {
|
|
967
|
+
case 1: {
|
|
968
|
+
if (tag !== 10) {
|
|
969
|
+
break;
|
|
970
|
+
}
|
|
971
|
+
message.taskId = reader.string();
|
|
972
|
+
continue;
|
|
973
|
+
}
|
|
974
|
+
case 2: {
|
|
975
|
+
if (tag !== 18) {
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
message.contextId = reader.string();
|
|
979
|
+
continue;
|
|
980
|
+
}
|
|
981
|
+
case 3: {
|
|
982
|
+
if (tag !== 26) {
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
message.artifact = Artifact.decode(reader, reader.uint32());
|
|
986
|
+
continue;
|
|
987
|
+
}
|
|
988
|
+
case 4: {
|
|
989
|
+
if (tag !== 32) {
|
|
990
|
+
break;
|
|
991
|
+
}
|
|
992
|
+
message.append = reader.bool();
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
case 5: {
|
|
996
|
+
if (tag !== 40) {
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
999
|
+
message.lastChunk = reader.bool();
|
|
1000
|
+
continue;
|
|
1001
|
+
}
|
|
1002
|
+
case 6: {
|
|
1003
|
+
if (tag !== 50) {
|
|
1004
|
+
break;
|
|
1005
|
+
}
|
|
1006
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1007
|
+
continue;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1011
|
+
break;
|
|
1012
|
+
}
|
|
1013
|
+
reader.skip(tag & 7);
|
|
1014
|
+
}
|
|
1015
|
+
return message;
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
function createBasePushNotificationConfig() {
|
|
1019
|
+
return { id: "", url: "", token: "", authentication: void 0 };
|
|
1020
|
+
}
|
|
1021
|
+
var PushNotificationConfig = {
|
|
1022
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1023
|
+
if (message.id !== "") {
|
|
1024
|
+
writer.uint32(10).string(message.id);
|
|
1025
|
+
}
|
|
1026
|
+
if (message.url !== "") {
|
|
1027
|
+
writer.uint32(18).string(message.url);
|
|
1028
|
+
}
|
|
1029
|
+
if (message.token !== "") {
|
|
1030
|
+
writer.uint32(26).string(message.token);
|
|
1031
|
+
}
|
|
1032
|
+
if (message.authentication !== void 0) {
|
|
1033
|
+
AuthenticationInfo.encode(message.authentication, writer.uint32(34).fork()).join();
|
|
1034
|
+
}
|
|
1035
|
+
return writer;
|
|
1036
|
+
},
|
|
1037
|
+
decode(input, length) {
|
|
1038
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1039
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1040
|
+
const message = createBasePushNotificationConfig();
|
|
1041
|
+
while (reader.pos < end) {
|
|
1042
|
+
const tag = reader.uint32();
|
|
1043
|
+
switch (tag >>> 3) {
|
|
1044
|
+
case 1: {
|
|
1045
|
+
if (tag !== 10) {
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
message.id = reader.string();
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1051
|
+
case 2: {
|
|
1052
|
+
if (tag !== 18) {
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
message.url = reader.string();
|
|
1056
|
+
continue;
|
|
1057
|
+
}
|
|
1058
|
+
case 3: {
|
|
1059
|
+
if (tag !== 26) {
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1062
|
+
message.token = reader.string();
|
|
1063
|
+
continue;
|
|
1064
|
+
}
|
|
1065
|
+
case 4: {
|
|
1066
|
+
if (tag !== 34) {
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
message.authentication = AuthenticationInfo.decode(reader, reader.uint32());
|
|
1070
|
+
continue;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
reader.skip(tag & 7);
|
|
1077
|
+
}
|
|
1078
|
+
return message;
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
function createBaseAuthenticationInfo() {
|
|
1082
|
+
return { schemes: [], credentials: "" };
|
|
1083
|
+
}
|
|
1084
|
+
var AuthenticationInfo = {
|
|
1085
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1086
|
+
for (const v of message.schemes) {
|
|
1087
|
+
writer.uint32(10).string(v);
|
|
1088
|
+
}
|
|
1089
|
+
if (message.credentials !== "") {
|
|
1090
|
+
writer.uint32(18).string(message.credentials);
|
|
1091
|
+
}
|
|
1092
|
+
return writer;
|
|
1093
|
+
},
|
|
1094
|
+
decode(input, length) {
|
|
1095
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1096
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1097
|
+
const message = createBaseAuthenticationInfo();
|
|
1098
|
+
while (reader.pos < end) {
|
|
1099
|
+
const tag = reader.uint32();
|
|
1100
|
+
switch (tag >>> 3) {
|
|
1101
|
+
case 1: {
|
|
1102
|
+
if (tag !== 10) {
|
|
1103
|
+
break;
|
|
1104
|
+
}
|
|
1105
|
+
message.schemes.push(reader.string());
|
|
1106
|
+
continue;
|
|
1107
|
+
}
|
|
1108
|
+
case 2: {
|
|
1109
|
+
if (tag !== 18) {
|
|
1110
|
+
break;
|
|
1111
|
+
}
|
|
1112
|
+
message.credentials = reader.string();
|
|
1113
|
+
continue;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
1119
|
+
reader.skip(tag & 7);
|
|
1120
|
+
}
|
|
1121
|
+
return message;
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
function createBaseAgentInterface() {
|
|
1125
|
+
return { url: "", transport: "" };
|
|
1126
|
+
}
|
|
1127
|
+
var AgentInterface = {
|
|
1128
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1129
|
+
if (message.url !== "") {
|
|
1130
|
+
writer.uint32(10).string(message.url);
|
|
1131
|
+
}
|
|
1132
|
+
if (message.transport !== "") {
|
|
1133
|
+
writer.uint32(18).string(message.transport);
|
|
1134
|
+
}
|
|
1135
|
+
return writer;
|
|
1136
|
+
},
|
|
1137
|
+
decode(input, length) {
|
|
1138
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1139
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1140
|
+
const message = createBaseAgentInterface();
|
|
1141
|
+
while (reader.pos < end) {
|
|
1142
|
+
const tag = reader.uint32();
|
|
1143
|
+
switch (tag >>> 3) {
|
|
1144
|
+
case 1: {
|
|
1145
|
+
if (tag !== 10) {
|
|
1146
|
+
break;
|
|
1147
|
+
}
|
|
1148
|
+
message.url = reader.string();
|
|
1149
|
+
continue;
|
|
1150
|
+
}
|
|
1151
|
+
case 2: {
|
|
1152
|
+
if (tag !== 18) {
|
|
1153
|
+
break;
|
|
1154
|
+
}
|
|
1155
|
+
message.transport = reader.string();
|
|
1156
|
+
continue;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1160
|
+
break;
|
|
1161
|
+
}
|
|
1162
|
+
reader.skip(tag & 7);
|
|
1163
|
+
}
|
|
1164
|
+
return message;
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
function createBaseAgentCard() {
|
|
1168
|
+
return {
|
|
1169
|
+
protocolVersion: "",
|
|
1170
|
+
name: "",
|
|
1171
|
+
description: "",
|
|
1172
|
+
url: "",
|
|
1173
|
+
preferredTransport: "",
|
|
1174
|
+
additionalInterfaces: [],
|
|
1175
|
+
provider: void 0,
|
|
1176
|
+
version: "",
|
|
1177
|
+
documentationUrl: "",
|
|
1178
|
+
capabilities: void 0,
|
|
1179
|
+
securitySchemes: {},
|
|
1180
|
+
security: [],
|
|
1181
|
+
defaultInputModes: [],
|
|
1182
|
+
defaultOutputModes: [],
|
|
1183
|
+
skills: [],
|
|
1184
|
+
supportsAuthenticatedExtendedCard: false,
|
|
1185
|
+
signatures: []
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
var AgentCard = {
|
|
1189
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1190
|
+
if (message.protocolVersion !== "") {
|
|
1191
|
+
writer.uint32(130).string(message.protocolVersion);
|
|
1192
|
+
}
|
|
1193
|
+
if (message.name !== "") {
|
|
1194
|
+
writer.uint32(10).string(message.name);
|
|
1195
|
+
}
|
|
1196
|
+
if (message.description !== "") {
|
|
1197
|
+
writer.uint32(18).string(message.description);
|
|
1198
|
+
}
|
|
1199
|
+
if (message.url !== "") {
|
|
1200
|
+
writer.uint32(26).string(message.url);
|
|
1201
|
+
}
|
|
1202
|
+
if (message.preferredTransport !== "") {
|
|
1203
|
+
writer.uint32(114).string(message.preferredTransport);
|
|
1204
|
+
}
|
|
1205
|
+
for (const v of message.additionalInterfaces) {
|
|
1206
|
+
AgentInterface.encode(v, writer.uint32(122).fork()).join();
|
|
1207
|
+
}
|
|
1208
|
+
if (message.provider !== void 0) {
|
|
1209
|
+
AgentProvider.encode(message.provider, writer.uint32(34).fork()).join();
|
|
1210
|
+
}
|
|
1211
|
+
if (message.version !== "") {
|
|
1212
|
+
writer.uint32(42).string(message.version);
|
|
1213
|
+
}
|
|
1214
|
+
if (message.documentationUrl !== "") {
|
|
1215
|
+
writer.uint32(50).string(message.documentationUrl);
|
|
1216
|
+
}
|
|
1217
|
+
if (message.capabilities !== void 0) {
|
|
1218
|
+
AgentCapabilities.encode(message.capabilities, writer.uint32(58).fork()).join();
|
|
1219
|
+
}
|
|
1220
|
+
Object.entries(message.securitySchemes).forEach(([key, value]) => {
|
|
1221
|
+
AgentCard_SecuritySchemesEntry.encode({ key, value }, writer.uint32(66).fork()).join();
|
|
1222
|
+
});
|
|
1223
|
+
for (const v of message.security) {
|
|
1224
|
+
Security.encode(v, writer.uint32(74).fork()).join();
|
|
1225
|
+
}
|
|
1226
|
+
for (const v of message.defaultInputModes) {
|
|
1227
|
+
writer.uint32(82).string(v);
|
|
1228
|
+
}
|
|
1229
|
+
for (const v of message.defaultOutputModes) {
|
|
1230
|
+
writer.uint32(90).string(v);
|
|
1231
|
+
}
|
|
1232
|
+
for (const v of message.skills) {
|
|
1233
|
+
AgentSkill.encode(v, writer.uint32(98).fork()).join();
|
|
1234
|
+
}
|
|
1235
|
+
if (message.supportsAuthenticatedExtendedCard !== false) {
|
|
1236
|
+
writer.uint32(104).bool(message.supportsAuthenticatedExtendedCard);
|
|
1237
|
+
}
|
|
1238
|
+
for (const v of message.signatures) {
|
|
1239
|
+
AgentCardSignature.encode(v, writer.uint32(138).fork()).join();
|
|
1240
|
+
}
|
|
1241
|
+
return writer;
|
|
1242
|
+
},
|
|
1243
|
+
decode(input, length) {
|
|
1244
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1245
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1246
|
+
const message = createBaseAgentCard();
|
|
1247
|
+
while (reader.pos < end) {
|
|
1248
|
+
const tag = reader.uint32();
|
|
1249
|
+
switch (tag >>> 3) {
|
|
1250
|
+
case 16: {
|
|
1251
|
+
if (tag !== 130) {
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
message.protocolVersion = reader.string();
|
|
1255
|
+
continue;
|
|
1256
|
+
}
|
|
1257
|
+
case 1: {
|
|
1258
|
+
if (tag !== 10) {
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1261
|
+
message.name = reader.string();
|
|
1262
|
+
continue;
|
|
1263
|
+
}
|
|
1264
|
+
case 2: {
|
|
1265
|
+
if (tag !== 18) {
|
|
1266
|
+
break;
|
|
1267
|
+
}
|
|
1268
|
+
message.description = reader.string();
|
|
1269
|
+
continue;
|
|
1270
|
+
}
|
|
1271
|
+
case 3: {
|
|
1272
|
+
if (tag !== 26) {
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
message.url = reader.string();
|
|
1276
|
+
continue;
|
|
1277
|
+
}
|
|
1278
|
+
case 14: {
|
|
1279
|
+
if (tag !== 114) {
|
|
1280
|
+
break;
|
|
1281
|
+
}
|
|
1282
|
+
message.preferredTransport = reader.string();
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
case 15: {
|
|
1286
|
+
if (tag !== 122) {
|
|
1287
|
+
break;
|
|
1288
|
+
}
|
|
1289
|
+
message.additionalInterfaces.push(AgentInterface.decode(reader, reader.uint32()));
|
|
1290
|
+
continue;
|
|
1291
|
+
}
|
|
1292
|
+
case 4: {
|
|
1293
|
+
if (tag !== 34) {
|
|
1294
|
+
break;
|
|
1295
|
+
}
|
|
1296
|
+
message.provider = AgentProvider.decode(reader, reader.uint32());
|
|
1297
|
+
continue;
|
|
1298
|
+
}
|
|
1299
|
+
case 5: {
|
|
1300
|
+
if (tag !== 42) {
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
message.version = reader.string();
|
|
1304
|
+
continue;
|
|
1305
|
+
}
|
|
1306
|
+
case 6: {
|
|
1307
|
+
if (tag !== 50) {
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
message.documentationUrl = reader.string();
|
|
1311
|
+
continue;
|
|
1312
|
+
}
|
|
1313
|
+
case 7: {
|
|
1314
|
+
if (tag !== 58) {
|
|
1315
|
+
break;
|
|
1316
|
+
}
|
|
1317
|
+
message.capabilities = AgentCapabilities.decode(reader, reader.uint32());
|
|
1318
|
+
continue;
|
|
1319
|
+
}
|
|
1320
|
+
case 8: {
|
|
1321
|
+
if (tag !== 66) {
|
|
1322
|
+
break;
|
|
1323
|
+
}
|
|
1324
|
+
const entry8 = AgentCard_SecuritySchemesEntry.decode(reader, reader.uint32());
|
|
1325
|
+
if (entry8.value !== void 0) {
|
|
1326
|
+
message.securitySchemes[entry8.key] = entry8.value;
|
|
1327
|
+
}
|
|
1328
|
+
continue;
|
|
1329
|
+
}
|
|
1330
|
+
case 9: {
|
|
1331
|
+
if (tag !== 74) {
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
message.security.push(Security.decode(reader, reader.uint32()));
|
|
1335
|
+
continue;
|
|
1336
|
+
}
|
|
1337
|
+
case 10: {
|
|
1338
|
+
if (tag !== 82) {
|
|
1339
|
+
break;
|
|
1340
|
+
}
|
|
1341
|
+
message.defaultInputModes.push(reader.string());
|
|
1342
|
+
continue;
|
|
1343
|
+
}
|
|
1344
|
+
case 11: {
|
|
1345
|
+
if (tag !== 90) {
|
|
1346
|
+
break;
|
|
1347
|
+
}
|
|
1348
|
+
message.defaultOutputModes.push(reader.string());
|
|
1349
|
+
continue;
|
|
1350
|
+
}
|
|
1351
|
+
case 12: {
|
|
1352
|
+
if (tag !== 98) {
|
|
1353
|
+
break;
|
|
1354
|
+
}
|
|
1355
|
+
message.skills.push(AgentSkill.decode(reader, reader.uint32()));
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
case 13: {
|
|
1359
|
+
if (tag !== 104) {
|
|
1360
|
+
break;
|
|
1361
|
+
}
|
|
1362
|
+
message.supportsAuthenticatedExtendedCard = reader.bool();
|
|
1363
|
+
continue;
|
|
1364
|
+
}
|
|
1365
|
+
case 17: {
|
|
1366
|
+
if (tag !== 138) {
|
|
1367
|
+
break;
|
|
1368
|
+
}
|
|
1369
|
+
message.signatures.push(AgentCardSignature.decode(reader, reader.uint32()));
|
|
1370
|
+
continue;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
reader.skip(tag & 7);
|
|
1377
|
+
}
|
|
1378
|
+
return message;
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
function createBaseAgentCard_SecuritySchemesEntry() {
|
|
1382
|
+
return { key: "", value: void 0 };
|
|
1383
|
+
}
|
|
1384
|
+
var AgentCard_SecuritySchemesEntry = {
|
|
1385
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1386
|
+
if (message.key !== "") {
|
|
1387
|
+
writer.uint32(10).string(message.key);
|
|
1388
|
+
}
|
|
1389
|
+
if (message.value !== void 0) {
|
|
1390
|
+
SecurityScheme.encode(message.value, writer.uint32(18).fork()).join();
|
|
1391
|
+
}
|
|
1392
|
+
return writer;
|
|
1393
|
+
},
|
|
1394
|
+
decode(input, length) {
|
|
1395
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1396
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1397
|
+
const message = createBaseAgentCard_SecuritySchemesEntry();
|
|
1398
|
+
while (reader.pos < end) {
|
|
1399
|
+
const tag = reader.uint32();
|
|
1400
|
+
switch (tag >>> 3) {
|
|
1401
|
+
case 1: {
|
|
1402
|
+
if (tag !== 10) {
|
|
1403
|
+
break;
|
|
1404
|
+
}
|
|
1405
|
+
message.key = reader.string();
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
case 2: {
|
|
1409
|
+
if (tag !== 18) {
|
|
1410
|
+
break;
|
|
1411
|
+
}
|
|
1412
|
+
message.value = SecurityScheme.decode(reader, reader.uint32());
|
|
1413
|
+
continue;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1417
|
+
break;
|
|
1418
|
+
}
|
|
1419
|
+
reader.skip(tag & 7);
|
|
1420
|
+
}
|
|
1421
|
+
return message;
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
function createBaseAgentProvider() {
|
|
1425
|
+
return { url: "", organization: "" };
|
|
1426
|
+
}
|
|
1427
|
+
var AgentProvider = {
|
|
1428
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1429
|
+
if (message.url !== "") {
|
|
1430
|
+
writer.uint32(10).string(message.url);
|
|
1431
|
+
}
|
|
1432
|
+
if (message.organization !== "") {
|
|
1433
|
+
writer.uint32(18).string(message.organization);
|
|
1434
|
+
}
|
|
1435
|
+
return writer;
|
|
1436
|
+
},
|
|
1437
|
+
decode(input, length) {
|
|
1438
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1439
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1440
|
+
const message = createBaseAgentProvider();
|
|
1441
|
+
while (reader.pos < end) {
|
|
1442
|
+
const tag = reader.uint32();
|
|
1443
|
+
switch (tag >>> 3) {
|
|
1444
|
+
case 1: {
|
|
1445
|
+
if (tag !== 10) {
|
|
1446
|
+
break;
|
|
1447
|
+
}
|
|
1448
|
+
message.url = reader.string();
|
|
1449
|
+
continue;
|
|
1450
|
+
}
|
|
1451
|
+
case 2: {
|
|
1452
|
+
if (tag !== 18) {
|
|
1453
|
+
break;
|
|
1454
|
+
}
|
|
1455
|
+
message.organization = reader.string();
|
|
1456
|
+
continue;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1460
|
+
break;
|
|
1461
|
+
}
|
|
1462
|
+
reader.skip(tag & 7);
|
|
1463
|
+
}
|
|
1464
|
+
return message;
|
|
1465
|
+
}
|
|
1466
|
+
};
|
|
1467
|
+
function createBaseAgentCapabilities() {
|
|
1468
|
+
return { streaming: false, pushNotifications: false, extensions: [] };
|
|
1469
|
+
}
|
|
1470
|
+
var AgentCapabilities = {
|
|
1471
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1472
|
+
if (message.streaming !== false) {
|
|
1473
|
+
writer.uint32(8).bool(message.streaming);
|
|
1474
|
+
}
|
|
1475
|
+
if (message.pushNotifications !== false) {
|
|
1476
|
+
writer.uint32(16).bool(message.pushNotifications);
|
|
1477
|
+
}
|
|
1478
|
+
for (const v of message.extensions) {
|
|
1479
|
+
AgentExtension.encode(v, writer.uint32(26).fork()).join();
|
|
1480
|
+
}
|
|
1481
|
+
return writer;
|
|
1482
|
+
},
|
|
1483
|
+
decode(input, length) {
|
|
1484
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1485
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1486
|
+
const message = createBaseAgentCapabilities();
|
|
1487
|
+
while (reader.pos < end) {
|
|
1488
|
+
const tag = reader.uint32();
|
|
1489
|
+
switch (tag >>> 3) {
|
|
1490
|
+
case 1: {
|
|
1491
|
+
if (tag !== 8) {
|
|
1492
|
+
break;
|
|
1493
|
+
}
|
|
1494
|
+
message.streaming = reader.bool();
|
|
1495
|
+
continue;
|
|
1496
|
+
}
|
|
1497
|
+
case 2: {
|
|
1498
|
+
if (tag !== 16) {
|
|
1499
|
+
break;
|
|
1500
|
+
}
|
|
1501
|
+
message.pushNotifications = reader.bool();
|
|
1502
|
+
continue;
|
|
1503
|
+
}
|
|
1504
|
+
case 3: {
|
|
1505
|
+
if (tag !== 26) {
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
message.extensions.push(AgentExtension.decode(reader, reader.uint32()));
|
|
1509
|
+
continue;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1513
|
+
break;
|
|
1514
|
+
}
|
|
1515
|
+
reader.skip(tag & 7);
|
|
1516
|
+
}
|
|
1517
|
+
return message;
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
function createBaseAgentExtension() {
|
|
1521
|
+
return { uri: "", description: "", required: false, params: void 0 };
|
|
1522
|
+
}
|
|
1523
|
+
var AgentExtension = {
|
|
1524
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1525
|
+
if (message.uri !== "") {
|
|
1526
|
+
writer.uint32(10).string(message.uri);
|
|
1527
|
+
}
|
|
1528
|
+
if (message.description !== "") {
|
|
1529
|
+
writer.uint32(18).string(message.description);
|
|
1530
|
+
}
|
|
1531
|
+
if (message.required !== false) {
|
|
1532
|
+
writer.uint32(24).bool(message.required);
|
|
1533
|
+
}
|
|
1534
|
+
if (message.params !== void 0) {
|
|
1535
|
+
Struct.encode(Struct.wrap(message.params), writer.uint32(34).fork()).join();
|
|
1536
|
+
}
|
|
1537
|
+
return writer;
|
|
1538
|
+
},
|
|
1539
|
+
decode(input, length) {
|
|
1540
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1541
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1542
|
+
const message = createBaseAgentExtension();
|
|
1543
|
+
while (reader.pos < end) {
|
|
1544
|
+
const tag = reader.uint32();
|
|
1545
|
+
switch (tag >>> 3) {
|
|
1546
|
+
case 1: {
|
|
1547
|
+
if (tag !== 10) {
|
|
1548
|
+
break;
|
|
1549
|
+
}
|
|
1550
|
+
message.uri = reader.string();
|
|
1551
|
+
continue;
|
|
1552
|
+
}
|
|
1553
|
+
case 2: {
|
|
1554
|
+
if (tag !== 18) {
|
|
1555
|
+
break;
|
|
1556
|
+
}
|
|
1557
|
+
message.description = reader.string();
|
|
1558
|
+
continue;
|
|
1559
|
+
}
|
|
1560
|
+
case 3: {
|
|
1561
|
+
if (tag !== 24) {
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
message.required = reader.bool();
|
|
1565
|
+
continue;
|
|
1566
|
+
}
|
|
1567
|
+
case 4: {
|
|
1568
|
+
if (tag !== 34) {
|
|
1569
|
+
break;
|
|
1570
|
+
}
|
|
1571
|
+
message.params = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1572
|
+
continue;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
reader.skip(tag & 7);
|
|
1579
|
+
}
|
|
1580
|
+
return message;
|
|
1581
|
+
}
|
|
1582
|
+
};
|
|
1583
|
+
function createBaseAgentSkill() {
|
|
1584
|
+
return { id: "", name: "", description: "", tags: [], examples: [], inputModes: [], outputModes: [], security: [] };
|
|
1585
|
+
}
|
|
1586
|
+
var AgentSkill = {
|
|
1587
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1588
|
+
if (message.id !== "") {
|
|
1589
|
+
writer.uint32(10).string(message.id);
|
|
1590
|
+
}
|
|
1591
|
+
if (message.name !== "") {
|
|
1592
|
+
writer.uint32(18).string(message.name);
|
|
1593
|
+
}
|
|
1594
|
+
if (message.description !== "") {
|
|
1595
|
+
writer.uint32(26).string(message.description);
|
|
1596
|
+
}
|
|
1597
|
+
for (const v of message.tags) {
|
|
1598
|
+
writer.uint32(34).string(v);
|
|
1599
|
+
}
|
|
1600
|
+
for (const v of message.examples) {
|
|
1601
|
+
writer.uint32(42).string(v);
|
|
1602
|
+
}
|
|
1603
|
+
for (const v of message.inputModes) {
|
|
1604
|
+
writer.uint32(50).string(v);
|
|
1605
|
+
}
|
|
1606
|
+
for (const v of message.outputModes) {
|
|
1607
|
+
writer.uint32(58).string(v);
|
|
1608
|
+
}
|
|
1609
|
+
for (const v of message.security) {
|
|
1610
|
+
Security.encode(v, writer.uint32(66).fork()).join();
|
|
1611
|
+
}
|
|
1612
|
+
return writer;
|
|
1613
|
+
},
|
|
1614
|
+
decode(input, length) {
|
|
1615
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1616
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1617
|
+
const message = createBaseAgentSkill();
|
|
1618
|
+
while (reader.pos < end) {
|
|
1619
|
+
const tag = reader.uint32();
|
|
1620
|
+
switch (tag >>> 3) {
|
|
1621
|
+
case 1: {
|
|
1622
|
+
if (tag !== 10) {
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
message.id = reader.string();
|
|
1626
|
+
continue;
|
|
1627
|
+
}
|
|
1628
|
+
case 2: {
|
|
1629
|
+
if (tag !== 18) {
|
|
1630
|
+
break;
|
|
1631
|
+
}
|
|
1632
|
+
message.name = reader.string();
|
|
1633
|
+
continue;
|
|
1634
|
+
}
|
|
1635
|
+
case 3: {
|
|
1636
|
+
if (tag !== 26) {
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
message.description = reader.string();
|
|
1640
|
+
continue;
|
|
1641
|
+
}
|
|
1642
|
+
case 4: {
|
|
1643
|
+
if (tag !== 34) {
|
|
1644
|
+
break;
|
|
1645
|
+
}
|
|
1646
|
+
message.tags.push(reader.string());
|
|
1647
|
+
continue;
|
|
1648
|
+
}
|
|
1649
|
+
case 5: {
|
|
1650
|
+
if (tag !== 42) {
|
|
1651
|
+
break;
|
|
1652
|
+
}
|
|
1653
|
+
message.examples.push(reader.string());
|
|
1654
|
+
continue;
|
|
1655
|
+
}
|
|
1656
|
+
case 6: {
|
|
1657
|
+
if (tag !== 50) {
|
|
1658
|
+
break;
|
|
1659
|
+
}
|
|
1660
|
+
message.inputModes.push(reader.string());
|
|
1661
|
+
continue;
|
|
1662
|
+
}
|
|
1663
|
+
case 7: {
|
|
1664
|
+
if (tag !== 58) {
|
|
1665
|
+
break;
|
|
1666
|
+
}
|
|
1667
|
+
message.outputModes.push(reader.string());
|
|
1668
|
+
continue;
|
|
1669
|
+
}
|
|
1670
|
+
case 8: {
|
|
1671
|
+
if (tag !== 66) {
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
message.security.push(Security.decode(reader, reader.uint32()));
|
|
1675
|
+
continue;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1679
|
+
break;
|
|
1680
|
+
}
|
|
1681
|
+
reader.skip(tag & 7);
|
|
1682
|
+
}
|
|
1683
|
+
return message;
|
|
1684
|
+
}
|
|
1685
|
+
};
|
|
1686
|
+
function createBaseAgentCardSignature() {
|
|
1687
|
+
return { protected: "", signature: "", header: void 0 };
|
|
1688
|
+
}
|
|
1689
|
+
var AgentCardSignature = {
|
|
1690
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1691
|
+
if (message.protected !== "") {
|
|
1692
|
+
writer.uint32(10).string(message.protected);
|
|
1693
|
+
}
|
|
1694
|
+
if (message.signature !== "") {
|
|
1695
|
+
writer.uint32(18).string(message.signature);
|
|
1696
|
+
}
|
|
1697
|
+
if (message.header !== void 0) {
|
|
1698
|
+
Struct.encode(Struct.wrap(message.header), writer.uint32(26).fork()).join();
|
|
1699
|
+
}
|
|
1700
|
+
return writer;
|
|
1701
|
+
},
|
|
1702
|
+
decode(input, length) {
|
|
1703
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1704
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1705
|
+
const message = createBaseAgentCardSignature();
|
|
1706
|
+
while (reader.pos < end) {
|
|
1707
|
+
const tag = reader.uint32();
|
|
1708
|
+
switch (tag >>> 3) {
|
|
1709
|
+
case 1: {
|
|
1710
|
+
if (tag !== 10) {
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
message.protected = reader.string();
|
|
1714
|
+
continue;
|
|
1715
|
+
}
|
|
1716
|
+
case 2: {
|
|
1717
|
+
if (tag !== 18) {
|
|
1718
|
+
break;
|
|
1719
|
+
}
|
|
1720
|
+
message.signature = reader.string();
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
case 3: {
|
|
1724
|
+
if (tag !== 26) {
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1727
|
+
message.header = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1728
|
+
continue;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1732
|
+
break;
|
|
1733
|
+
}
|
|
1734
|
+
reader.skip(tag & 7);
|
|
1735
|
+
}
|
|
1736
|
+
return message;
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
function createBaseTaskPushNotificationConfig() {
|
|
1740
|
+
return { name: "", pushNotificationConfig: void 0 };
|
|
1741
|
+
}
|
|
1742
|
+
var TaskPushNotificationConfig = {
|
|
1743
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1744
|
+
if (message.name !== "") {
|
|
1745
|
+
writer.uint32(10).string(message.name);
|
|
1746
|
+
}
|
|
1747
|
+
if (message.pushNotificationConfig !== void 0) {
|
|
1748
|
+
PushNotificationConfig.encode(message.pushNotificationConfig, writer.uint32(18).fork()).join();
|
|
1749
|
+
}
|
|
1750
|
+
return writer;
|
|
1751
|
+
},
|
|
1752
|
+
decode(input, length) {
|
|
1753
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1754
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1755
|
+
const message = createBaseTaskPushNotificationConfig();
|
|
1756
|
+
while (reader.pos < end) {
|
|
1757
|
+
const tag = reader.uint32();
|
|
1758
|
+
switch (tag >>> 3) {
|
|
1759
|
+
case 1: {
|
|
1760
|
+
if (tag !== 10) {
|
|
1761
|
+
break;
|
|
1762
|
+
}
|
|
1763
|
+
message.name = reader.string();
|
|
1764
|
+
continue;
|
|
1765
|
+
}
|
|
1766
|
+
case 2: {
|
|
1767
|
+
if (tag !== 18) {
|
|
1768
|
+
break;
|
|
1769
|
+
}
|
|
1770
|
+
message.pushNotificationConfig = PushNotificationConfig.decode(reader, reader.uint32());
|
|
1771
|
+
continue;
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1775
|
+
break;
|
|
1776
|
+
}
|
|
1777
|
+
reader.skip(tag & 7);
|
|
1778
|
+
}
|
|
1779
|
+
return message;
|
|
1780
|
+
}
|
|
1781
|
+
};
|
|
1782
|
+
function createBaseStringList() {
|
|
1783
|
+
return { list: [] };
|
|
1784
|
+
}
|
|
1785
|
+
var StringList = {
|
|
1786
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1787
|
+
for (const v of message.list) {
|
|
1788
|
+
writer.uint32(10).string(v);
|
|
1789
|
+
}
|
|
1790
|
+
return writer;
|
|
1791
|
+
},
|
|
1792
|
+
decode(input, length) {
|
|
1793
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1794
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1795
|
+
const message = createBaseStringList();
|
|
1796
|
+
while (reader.pos < end) {
|
|
1797
|
+
const tag = reader.uint32();
|
|
1798
|
+
switch (tag >>> 3) {
|
|
1799
|
+
case 1: {
|
|
1800
|
+
if (tag !== 10) {
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
message.list.push(reader.string());
|
|
1804
|
+
continue;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
reader.skip(tag & 7);
|
|
1811
|
+
}
|
|
1812
|
+
return message;
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
function createBaseSecurity() {
|
|
1816
|
+
return { schemes: {} };
|
|
1817
|
+
}
|
|
1818
|
+
var Security = {
|
|
1819
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1820
|
+
Object.entries(message.schemes).forEach(([key, value]) => {
|
|
1821
|
+
Security_SchemesEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
1822
|
+
});
|
|
1823
|
+
return writer;
|
|
1824
|
+
},
|
|
1825
|
+
decode(input, length) {
|
|
1826
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1827
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1828
|
+
const message = createBaseSecurity();
|
|
1829
|
+
while (reader.pos < end) {
|
|
1830
|
+
const tag = reader.uint32();
|
|
1831
|
+
switch (tag >>> 3) {
|
|
1832
|
+
case 1: {
|
|
1833
|
+
if (tag !== 10) {
|
|
1834
|
+
break;
|
|
1835
|
+
}
|
|
1836
|
+
const entry1 = Security_SchemesEntry.decode(reader, reader.uint32());
|
|
1837
|
+
if (entry1.value !== void 0) {
|
|
1838
|
+
message.schemes[entry1.key] = entry1.value;
|
|
1839
|
+
}
|
|
1840
|
+
continue;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
reader.skip(tag & 7);
|
|
1847
|
+
}
|
|
1848
|
+
return message;
|
|
1849
|
+
}
|
|
1850
|
+
};
|
|
1851
|
+
function createBaseSecurity_SchemesEntry() {
|
|
1852
|
+
return { key: "", value: void 0 };
|
|
1853
|
+
}
|
|
1854
|
+
var Security_SchemesEntry = {
|
|
1855
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1856
|
+
if (message.key !== "") {
|
|
1857
|
+
writer.uint32(10).string(message.key);
|
|
1858
|
+
}
|
|
1859
|
+
if (message.value !== void 0) {
|
|
1860
|
+
StringList.encode(message.value, writer.uint32(18).fork()).join();
|
|
1861
|
+
}
|
|
1862
|
+
return writer;
|
|
1863
|
+
},
|
|
1864
|
+
decode(input, length) {
|
|
1865
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1866
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1867
|
+
const message = createBaseSecurity_SchemesEntry();
|
|
1868
|
+
while (reader.pos < end) {
|
|
1869
|
+
const tag = reader.uint32();
|
|
1870
|
+
switch (tag >>> 3) {
|
|
1871
|
+
case 1: {
|
|
1872
|
+
if (tag !== 10) {
|
|
1873
|
+
break;
|
|
1874
|
+
}
|
|
1875
|
+
message.key = reader.string();
|
|
1876
|
+
continue;
|
|
1877
|
+
}
|
|
1878
|
+
case 2: {
|
|
1879
|
+
if (tag !== 18) {
|
|
1880
|
+
break;
|
|
1881
|
+
}
|
|
1882
|
+
message.value = StringList.decode(reader, reader.uint32());
|
|
1883
|
+
continue;
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1887
|
+
break;
|
|
1888
|
+
}
|
|
1889
|
+
reader.skip(tag & 7);
|
|
1890
|
+
}
|
|
1891
|
+
return message;
|
|
1892
|
+
}
|
|
1893
|
+
};
|
|
1894
|
+
function createBaseSecurityScheme() {
|
|
1895
|
+
return { scheme: void 0 };
|
|
1896
|
+
}
|
|
1897
|
+
var SecurityScheme = {
|
|
1898
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1899
|
+
switch (message.scheme?.$case) {
|
|
1900
|
+
case "apiKeySecurityScheme":
|
|
1901
|
+
APIKeySecurityScheme.encode(message.scheme.value, writer.uint32(10).fork()).join();
|
|
1902
|
+
break;
|
|
1903
|
+
case "httpAuthSecurityScheme":
|
|
1904
|
+
HTTPAuthSecurityScheme.encode(message.scheme.value, writer.uint32(18).fork()).join();
|
|
1905
|
+
break;
|
|
1906
|
+
case "oauth2SecurityScheme":
|
|
1907
|
+
OAuth2SecurityScheme.encode(message.scheme.value, writer.uint32(26).fork()).join();
|
|
1908
|
+
break;
|
|
1909
|
+
case "openIdConnectSecurityScheme":
|
|
1910
|
+
OpenIdConnectSecurityScheme.encode(message.scheme.value, writer.uint32(34).fork()).join();
|
|
1911
|
+
break;
|
|
1912
|
+
case "mtlsSecurityScheme":
|
|
1913
|
+
MutualTlsSecurityScheme.encode(message.scheme.value, writer.uint32(42).fork()).join();
|
|
1914
|
+
break;
|
|
1915
|
+
}
|
|
1916
|
+
return writer;
|
|
1917
|
+
},
|
|
1918
|
+
decode(input, length) {
|
|
1919
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
1920
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
1921
|
+
const message = createBaseSecurityScheme();
|
|
1922
|
+
while (reader.pos < end) {
|
|
1923
|
+
const tag = reader.uint32();
|
|
1924
|
+
switch (tag >>> 3) {
|
|
1925
|
+
case 1: {
|
|
1926
|
+
if (tag !== 10) {
|
|
1927
|
+
break;
|
|
1928
|
+
}
|
|
1929
|
+
message.scheme = {
|
|
1930
|
+
$case: "apiKeySecurityScheme",
|
|
1931
|
+
value: APIKeySecurityScheme.decode(reader, reader.uint32())
|
|
1932
|
+
};
|
|
1933
|
+
continue;
|
|
1934
|
+
}
|
|
1935
|
+
case 2: {
|
|
1936
|
+
if (tag !== 18) {
|
|
1937
|
+
break;
|
|
1938
|
+
}
|
|
1939
|
+
message.scheme = {
|
|
1940
|
+
$case: "httpAuthSecurityScheme",
|
|
1941
|
+
value: HTTPAuthSecurityScheme.decode(reader, reader.uint32())
|
|
1942
|
+
};
|
|
1943
|
+
continue;
|
|
1944
|
+
}
|
|
1945
|
+
case 3: {
|
|
1946
|
+
if (tag !== 26) {
|
|
1947
|
+
break;
|
|
1948
|
+
}
|
|
1949
|
+
message.scheme = {
|
|
1950
|
+
$case: "oauth2SecurityScheme",
|
|
1951
|
+
value: OAuth2SecurityScheme.decode(reader, reader.uint32())
|
|
1952
|
+
};
|
|
1953
|
+
continue;
|
|
1954
|
+
}
|
|
1955
|
+
case 4: {
|
|
1956
|
+
if (tag !== 34) {
|
|
1957
|
+
break;
|
|
1958
|
+
}
|
|
1959
|
+
message.scheme = {
|
|
1960
|
+
$case: "openIdConnectSecurityScheme",
|
|
1961
|
+
value: OpenIdConnectSecurityScheme.decode(reader, reader.uint32())
|
|
1962
|
+
};
|
|
1963
|
+
continue;
|
|
1964
|
+
}
|
|
1965
|
+
case 5: {
|
|
1966
|
+
if (tag !== 42) {
|
|
1967
|
+
break;
|
|
1968
|
+
}
|
|
1969
|
+
message.scheme = {
|
|
1970
|
+
$case: "mtlsSecurityScheme",
|
|
1971
|
+
value: MutualTlsSecurityScheme.decode(reader, reader.uint32())
|
|
1972
|
+
};
|
|
1973
|
+
continue;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1977
|
+
break;
|
|
1978
|
+
}
|
|
1979
|
+
reader.skip(tag & 7);
|
|
1980
|
+
}
|
|
1981
|
+
return message;
|
|
1982
|
+
}
|
|
1983
|
+
};
|
|
1984
|
+
function createBaseAPIKeySecurityScheme() {
|
|
1985
|
+
return { description: "", location: "", name: "" };
|
|
1986
|
+
}
|
|
1987
|
+
var APIKeySecurityScheme = {
|
|
1988
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
1989
|
+
if (message.description !== "") {
|
|
1990
|
+
writer.uint32(10).string(message.description);
|
|
1991
|
+
}
|
|
1992
|
+
if (message.location !== "") {
|
|
1993
|
+
writer.uint32(18).string(message.location);
|
|
1994
|
+
}
|
|
1995
|
+
if (message.name !== "") {
|
|
1996
|
+
writer.uint32(26).string(message.name);
|
|
1997
|
+
}
|
|
1998
|
+
return writer;
|
|
1999
|
+
},
|
|
2000
|
+
decode(input, length) {
|
|
2001
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2002
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2003
|
+
const message = createBaseAPIKeySecurityScheme();
|
|
2004
|
+
while (reader.pos < end) {
|
|
2005
|
+
const tag = reader.uint32();
|
|
2006
|
+
switch (tag >>> 3) {
|
|
2007
|
+
case 1: {
|
|
2008
|
+
if (tag !== 10) {
|
|
2009
|
+
break;
|
|
2010
|
+
}
|
|
2011
|
+
message.description = reader.string();
|
|
2012
|
+
continue;
|
|
2013
|
+
}
|
|
2014
|
+
case 2: {
|
|
2015
|
+
if (tag !== 18) {
|
|
2016
|
+
break;
|
|
2017
|
+
}
|
|
2018
|
+
message.location = reader.string();
|
|
2019
|
+
continue;
|
|
2020
|
+
}
|
|
2021
|
+
case 3: {
|
|
2022
|
+
if (tag !== 26) {
|
|
2023
|
+
break;
|
|
2024
|
+
}
|
|
2025
|
+
message.name = reader.string();
|
|
2026
|
+
continue;
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2030
|
+
break;
|
|
2031
|
+
}
|
|
2032
|
+
reader.skip(tag & 7);
|
|
2033
|
+
}
|
|
2034
|
+
return message;
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
function createBaseHTTPAuthSecurityScheme() {
|
|
2038
|
+
return { description: "", scheme: "", bearerFormat: "" };
|
|
2039
|
+
}
|
|
2040
|
+
var HTTPAuthSecurityScheme = {
|
|
2041
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2042
|
+
if (message.description !== "") {
|
|
2043
|
+
writer.uint32(10).string(message.description);
|
|
2044
|
+
}
|
|
2045
|
+
if (message.scheme !== "") {
|
|
2046
|
+
writer.uint32(18).string(message.scheme);
|
|
2047
|
+
}
|
|
2048
|
+
if (message.bearerFormat !== "") {
|
|
2049
|
+
writer.uint32(26).string(message.bearerFormat);
|
|
2050
|
+
}
|
|
2051
|
+
return writer;
|
|
2052
|
+
},
|
|
2053
|
+
decode(input, length) {
|
|
2054
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2055
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2056
|
+
const message = createBaseHTTPAuthSecurityScheme();
|
|
2057
|
+
while (reader.pos < end) {
|
|
2058
|
+
const tag = reader.uint32();
|
|
2059
|
+
switch (tag >>> 3) {
|
|
2060
|
+
case 1: {
|
|
2061
|
+
if (tag !== 10) {
|
|
2062
|
+
break;
|
|
2063
|
+
}
|
|
2064
|
+
message.description = reader.string();
|
|
2065
|
+
continue;
|
|
2066
|
+
}
|
|
2067
|
+
case 2: {
|
|
2068
|
+
if (tag !== 18) {
|
|
2069
|
+
break;
|
|
2070
|
+
}
|
|
2071
|
+
message.scheme = reader.string();
|
|
2072
|
+
continue;
|
|
2073
|
+
}
|
|
2074
|
+
case 3: {
|
|
2075
|
+
if (tag !== 26) {
|
|
2076
|
+
break;
|
|
2077
|
+
}
|
|
2078
|
+
message.bearerFormat = reader.string();
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2083
|
+
break;
|
|
2084
|
+
}
|
|
2085
|
+
reader.skip(tag & 7);
|
|
2086
|
+
}
|
|
2087
|
+
return message;
|
|
2088
|
+
}
|
|
2089
|
+
};
|
|
2090
|
+
function createBaseOAuth2SecurityScheme() {
|
|
2091
|
+
return { description: "", flows: void 0, oauth2MetadataUrl: "" };
|
|
2092
|
+
}
|
|
2093
|
+
var OAuth2SecurityScheme = {
|
|
2094
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2095
|
+
if (message.description !== "") {
|
|
2096
|
+
writer.uint32(10).string(message.description);
|
|
2097
|
+
}
|
|
2098
|
+
if (message.flows !== void 0) {
|
|
2099
|
+
OAuthFlows.encode(message.flows, writer.uint32(18).fork()).join();
|
|
2100
|
+
}
|
|
2101
|
+
if (message.oauth2MetadataUrl !== "") {
|
|
2102
|
+
writer.uint32(26).string(message.oauth2MetadataUrl);
|
|
2103
|
+
}
|
|
2104
|
+
return writer;
|
|
2105
|
+
},
|
|
2106
|
+
decode(input, length) {
|
|
2107
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2108
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2109
|
+
const message = createBaseOAuth2SecurityScheme();
|
|
2110
|
+
while (reader.pos < end) {
|
|
2111
|
+
const tag = reader.uint32();
|
|
2112
|
+
switch (tag >>> 3) {
|
|
2113
|
+
case 1: {
|
|
2114
|
+
if (tag !== 10) {
|
|
2115
|
+
break;
|
|
2116
|
+
}
|
|
2117
|
+
message.description = reader.string();
|
|
2118
|
+
continue;
|
|
2119
|
+
}
|
|
2120
|
+
case 2: {
|
|
2121
|
+
if (tag !== 18) {
|
|
2122
|
+
break;
|
|
2123
|
+
}
|
|
2124
|
+
message.flows = OAuthFlows.decode(reader, reader.uint32());
|
|
2125
|
+
continue;
|
|
2126
|
+
}
|
|
2127
|
+
case 3: {
|
|
2128
|
+
if (tag !== 26) {
|
|
2129
|
+
break;
|
|
2130
|
+
}
|
|
2131
|
+
message.oauth2MetadataUrl = reader.string();
|
|
2132
|
+
continue;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2136
|
+
break;
|
|
2137
|
+
}
|
|
2138
|
+
reader.skip(tag & 7);
|
|
2139
|
+
}
|
|
2140
|
+
return message;
|
|
2141
|
+
}
|
|
2142
|
+
};
|
|
2143
|
+
function createBaseOpenIdConnectSecurityScheme() {
|
|
2144
|
+
return { description: "", openIdConnectUrl: "" };
|
|
2145
|
+
}
|
|
2146
|
+
var OpenIdConnectSecurityScheme = {
|
|
2147
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2148
|
+
if (message.description !== "") {
|
|
2149
|
+
writer.uint32(10).string(message.description);
|
|
2150
|
+
}
|
|
2151
|
+
if (message.openIdConnectUrl !== "") {
|
|
2152
|
+
writer.uint32(18).string(message.openIdConnectUrl);
|
|
2153
|
+
}
|
|
2154
|
+
return writer;
|
|
2155
|
+
},
|
|
2156
|
+
decode(input, length) {
|
|
2157
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2158
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2159
|
+
const message = createBaseOpenIdConnectSecurityScheme();
|
|
2160
|
+
while (reader.pos < end) {
|
|
2161
|
+
const tag = reader.uint32();
|
|
2162
|
+
switch (tag >>> 3) {
|
|
2163
|
+
case 1: {
|
|
2164
|
+
if (tag !== 10) {
|
|
2165
|
+
break;
|
|
2166
|
+
}
|
|
2167
|
+
message.description = reader.string();
|
|
2168
|
+
continue;
|
|
2169
|
+
}
|
|
2170
|
+
case 2: {
|
|
2171
|
+
if (tag !== 18) {
|
|
2172
|
+
break;
|
|
2173
|
+
}
|
|
2174
|
+
message.openIdConnectUrl = reader.string();
|
|
2175
|
+
continue;
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2179
|
+
break;
|
|
2180
|
+
}
|
|
2181
|
+
reader.skip(tag & 7);
|
|
2182
|
+
}
|
|
2183
|
+
return message;
|
|
2184
|
+
}
|
|
2185
|
+
};
|
|
2186
|
+
function createBaseMutualTlsSecurityScheme() {
|
|
2187
|
+
return { description: "" };
|
|
2188
|
+
}
|
|
2189
|
+
var MutualTlsSecurityScheme = {
|
|
2190
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2191
|
+
if (message.description !== "") {
|
|
2192
|
+
writer.uint32(10).string(message.description);
|
|
2193
|
+
}
|
|
2194
|
+
return writer;
|
|
2195
|
+
},
|
|
2196
|
+
decode(input, length) {
|
|
2197
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2198
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2199
|
+
const message = createBaseMutualTlsSecurityScheme();
|
|
2200
|
+
while (reader.pos < end) {
|
|
2201
|
+
const tag = reader.uint32();
|
|
2202
|
+
switch (tag >>> 3) {
|
|
2203
|
+
case 1: {
|
|
2204
|
+
if (tag !== 10) {
|
|
2205
|
+
break;
|
|
2206
|
+
}
|
|
2207
|
+
message.description = reader.string();
|
|
2208
|
+
continue;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2212
|
+
break;
|
|
2213
|
+
}
|
|
2214
|
+
reader.skip(tag & 7);
|
|
2215
|
+
}
|
|
2216
|
+
return message;
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
function createBaseOAuthFlows() {
|
|
2220
|
+
return { flow: void 0 };
|
|
2221
|
+
}
|
|
2222
|
+
var OAuthFlows = {
|
|
2223
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2224
|
+
switch (message.flow?.$case) {
|
|
2225
|
+
case "authorizationCode":
|
|
2226
|
+
AuthorizationCodeOAuthFlow.encode(message.flow.value, writer.uint32(10).fork()).join();
|
|
2227
|
+
break;
|
|
2228
|
+
case "clientCredentials":
|
|
2229
|
+
ClientCredentialsOAuthFlow.encode(message.flow.value, writer.uint32(18).fork()).join();
|
|
2230
|
+
break;
|
|
2231
|
+
case "implicit":
|
|
2232
|
+
ImplicitOAuthFlow.encode(message.flow.value, writer.uint32(26).fork()).join();
|
|
2233
|
+
break;
|
|
2234
|
+
case "password":
|
|
2235
|
+
PasswordOAuthFlow.encode(message.flow.value, writer.uint32(34).fork()).join();
|
|
2236
|
+
break;
|
|
2237
|
+
}
|
|
2238
|
+
return writer;
|
|
2239
|
+
},
|
|
2240
|
+
decode(input, length) {
|
|
2241
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2242
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2243
|
+
const message = createBaseOAuthFlows();
|
|
2244
|
+
while (reader.pos < end) {
|
|
2245
|
+
const tag = reader.uint32();
|
|
2246
|
+
switch (tag >>> 3) {
|
|
2247
|
+
case 1: {
|
|
2248
|
+
if (tag !== 10) {
|
|
2249
|
+
break;
|
|
2250
|
+
}
|
|
2251
|
+
message.flow = {
|
|
2252
|
+
$case: "authorizationCode",
|
|
2253
|
+
value: AuthorizationCodeOAuthFlow.decode(reader, reader.uint32())
|
|
2254
|
+
};
|
|
2255
|
+
continue;
|
|
2256
|
+
}
|
|
2257
|
+
case 2: {
|
|
2258
|
+
if (tag !== 18) {
|
|
2259
|
+
break;
|
|
2260
|
+
}
|
|
2261
|
+
message.flow = {
|
|
2262
|
+
$case: "clientCredentials",
|
|
2263
|
+
value: ClientCredentialsOAuthFlow.decode(reader, reader.uint32())
|
|
2264
|
+
};
|
|
2265
|
+
continue;
|
|
2266
|
+
}
|
|
2267
|
+
case 3: {
|
|
2268
|
+
if (tag !== 26) {
|
|
2269
|
+
break;
|
|
2270
|
+
}
|
|
2271
|
+
message.flow = { $case: "implicit", value: ImplicitOAuthFlow.decode(reader, reader.uint32()) };
|
|
2272
|
+
continue;
|
|
2273
|
+
}
|
|
2274
|
+
case 4: {
|
|
2275
|
+
if (tag !== 34) {
|
|
2276
|
+
break;
|
|
2277
|
+
}
|
|
2278
|
+
message.flow = { $case: "password", value: PasswordOAuthFlow.decode(reader, reader.uint32()) };
|
|
2279
|
+
continue;
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2283
|
+
break;
|
|
2284
|
+
}
|
|
2285
|
+
reader.skip(tag & 7);
|
|
2286
|
+
}
|
|
2287
|
+
return message;
|
|
2288
|
+
}
|
|
2289
|
+
};
|
|
2290
|
+
function createBaseAuthorizationCodeOAuthFlow() {
|
|
2291
|
+
return { authorizationUrl: "", tokenUrl: "", refreshUrl: "", scopes: {} };
|
|
2292
|
+
}
|
|
2293
|
+
var AuthorizationCodeOAuthFlow = {
|
|
2294
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2295
|
+
if (message.authorizationUrl !== "") {
|
|
2296
|
+
writer.uint32(10).string(message.authorizationUrl);
|
|
2297
|
+
}
|
|
2298
|
+
if (message.tokenUrl !== "") {
|
|
2299
|
+
writer.uint32(18).string(message.tokenUrl);
|
|
2300
|
+
}
|
|
2301
|
+
if (message.refreshUrl !== "") {
|
|
2302
|
+
writer.uint32(26).string(message.refreshUrl);
|
|
2303
|
+
}
|
|
2304
|
+
Object.entries(message.scopes).forEach(([key, value]) => {
|
|
2305
|
+
AuthorizationCodeOAuthFlow_ScopesEntry.encode({ key, value }, writer.uint32(34).fork()).join();
|
|
2306
|
+
});
|
|
2307
|
+
return writer;
|
|
2308
|
+
},
|
|
2309
|
+
decode(input, length) {
|
|
2310
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2311
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2312
|
+
const message = createBaseAuthorizationCodeOAuthFlow();
|
|
2313
|
+
while (reader.pos < end) {
|
|
2314
|
+
const tag = reader.uint32();
|
|
2315
|
+
switch (tag >>> 3) {
|
|
2316
|
+
case 1: {
|
|
2317
|
+
if (tag !== 10) {
|
|
2318
|
+
break;
|
|
2319
|
+
}
|
|
2320
|
+
message.authorizationUrl = reader.string();
|
|
2321
|
+
continue;
|
|
2322
|
+
}
|
|
2323
|
+
case 2: {
|
|
2324
|
+
if (tag !== 18) {
|
|
2325
|
+
break;
|
|
2326
|
+
}
|
|
2327
|
+
message.tokenUrl = reader.string();
|
|
2328
|
+
continue;
|
|
2329
|
+
}
|
|
2330
|
+
case 3: {
|
|
2331
|
+
if (tag !== 26) {
|
|
2332
|
+
break;
|
|
2333
|
+
}
|
|
2334
|
+
message.refreshUrl = reader.string();
|
|
2335
|
+
continue;
|
|
2336
|
+
}
|
|
2337
|
+
case 4: {
|
|
2338
|
+
if (tag !== 34) {
|
|
2339
|
+
break;
|
|
2340
|
+
}
|
|
2341
|
+
const entry4 = AuthorizationCodeOAuthFlow_ScopesEntry.decode(reader, reader.uint32());
|
|
2342
|
+
if (entry4.value !== void 0) {
|
|
2343
|
+
message.scopes[entry4.key] = entry4.value;
|
|
2344
|
+
}
|
|
2345
|
+
continue;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2349
|
+
break;
|
|
2350
|
+
}
|
|
2351
|
+
reader.skip(tag & 7);
|
|
2352
|
+
}
|
|
2353
|
+
return message;
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
function createBaseAuthorizationCodeOAuthFlow_ScopesEntry() {
|
|
2357
|
+
return { key: "", value: "" };
|
|
2358
|
+
}
|
|
2359
|
+
var AuthorizationCodeOAuthFlow_ScopesEntry = {
|
|
2360
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2361
|
+
if (message.key !== "") {
|
|
2362
|
+
writer.uint32(10).string(message.key);
|
|
2363
|
+
}
|
|
2364
|
+
if (message.value !== "") {
|
|
2365
|
+
writer.uint32(18).string(message.value);
|
|
2366
|
+
}
|
|
2367
|
+
return writer;
|
|
2368
|
+
},
|
|
2369
|
+
decode(input, length) {
|
|
2370
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2371
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2372
|
+
const message = createBaseAuthorizationCodeOAuthFlow_ScopesEntry();
|
|
2373
|
+
while (reader.pos < end) {
|
|
2374
|
+
const tag = reader.uint32();
|
|
2375
|
+
switch (tag >>> 3) {
|
|
2376
|
+
case 1: {
|
|
2377
|
+
if (tag !== 10) {
|
|
2378
|
+
break;
|
|
2379
|
+
}
|
|
2380
|
+
message.key = reader.string();
|
|
2381
|
+
continue;
|
|
2382
|
+
}
|
|
2383
|
+
case 2: {
|
|
2384
|
+
if (tag !== 18) {
|
|
2385
|
+
break;
|
|
2386
|
+
}
|
|
2387
|
+
message.value = reader.string();
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2392
|
+
break;
|
|
2393
|
+
}
|
|
2394
|
+
reader.skip(tag & 7);
|
|
2395
|
+
}
|
|
2396
|
+
return message;
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
function createBaseClientCredentialsOAuthFlow() {
|
|
2400
|
+
return { tokenUrl: "", refreshUrl: "", scopes: {} };
|
|
2401
|
+
}
|
|
2402
|
+
var ClientCredentialsOAuthFlow = {
|
|
2403
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2404
|
+
if (message.tokenUrl !== "") {
|
|
2405
|
+
writer.uint32(10).string(message.tokenUrl);
|
|
2406
|
+
}
|
|
2407
|
+
if (message.refreshUrl !== "") {
|
|
2408
|
+
writer.uint32(18).string(message.refreshUrl);
|
|
2409
|
+
}
|
|
2410
|
+
Object.entries(message.scopes).forEach(([key, value]) => {
|
|
2411
|
+
ClientCredentialsOAuthFlow_ScopesEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
2412
|
+
});
|
|
2413
|
+
return writer;
|
|
2414
|
+
},
|
|
2415
|
+
decode(input, length) {
|
|
2416
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2417
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2418
|
+
const message = createBaseClientCredentialsOAuthFlow();
|
|
2419
|
+
while (reader.pos < end) {
|
|
2420
|
+
const tag = reader.uint32();
|
|
2421
|
+
switch (tag >>> 3) {
|
|
2422
|
+
case 1: {
|
|
2423
|
+
if (tag !== 10) {
|
|
2424
|
+
break;
|
|
2425
|
+
}
|
|
2426
|
+
message.tokenUrl = reader.string();
|
|
2427
|
+
continue;
|
|
2428
|
+
}
|
|
2429
|
+
case 2: {
|
|
2430
|
+
if (tag !== 18) {
|
|
2431
|
+
break;
|
|
2432
|
+
}
|
|
2433
|
+
message.refreshUrl = reader.string();
|
|
2434
|
+
continue;
|
|
2435
|
+
}
|
|
2436
|
+
case 3: {
|
|
2437
|
+
if (tag !== 26) {
|
|
2438
|
+
break;
|
|
2439
|
+
}
|
|
2440
|
+
const entry3 = ClientCredentialsOAuthFlow_ScopesEntry.decode(reader, reader.uint32());
|
|
2441
|
+
if (entry3.value !== void 0) {
|
|
2442
|
+
message.scopes[entry3.key] = entry3.value;
|
|
2443
|
+
}
|
|
2444
|
+
continue;
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2448
|
+
break;
|
|
2449
|
+
}
|
|
2450
|
+
reader.skip(tag & 7);
|
|
2451
|
+
}
|
|
2452
|
+
return message;
|
|
2453
|
+
}
|
|
2454
|
+
};
|
|
2455
|
+
function createBaseClientCredentialsOAuthFlow_ScopesEntry() {
|
|
2456
|
+
return { key: "", value: "" };
|
|
2457
|
+
}
|
|
2458
|
+
var ClientCredentialsOAuthFlow_ScopesEntry = {
|
|
2459
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2460
|
+
if (message.key !== "") {
|
|
2461
|
+
writer.uint32(10).string(message.key);
|
|
2462
|
+
}
|
|
2463
|
+
if (message.value !== "") {
|
|
2464
|
+
writer.uint32(18).string(message.value);
|
|
2465
|
+
}
|
|
2466
|
+
return writer;
|
|
2467
|
+
},
|
|
2468
|
+
decode(input, length) {
|
|
2469
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2470
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2471
|
+
const message = createBaseClientCredentialsOAuthFlow_ScopesEntry();
|
|
2472
|
+
while (reader.pos < end) {
|
|
2473
|
+
const tag = reader.uint32();
|
|
2474
|
+
switch (tag >>> 3) {
|
|
2475
|
+
case 1: {
|
|
2476
|
+
if (tag !== 10) {
|
|
2477
|
+
break;
|
|
2478
|
+
}
|
|
2479
|
+
message.key = reader.string();
|
|
2480
|
+
continue;
|
|
2481
|
+
}
|
|
2482
|
+
case 2: {
|
|
2483
|
+
if (tag !== 18) {
|
|
2484
|
+
break;
|
|
2485
|
+
}
|
|
2486
|
+
message.value = reader.string();
|
|
2487
|
+
continue;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2491
|
+
break;
|
|
2492
|
+
}
|
|
2493
|
+
reader.skip(tag & 7);
|
|
2494
|
+
}
|
|
2495
|
+
return message;
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2498
|
+
function createBaseImplicitOAuthFlow() {
|
|
2499
|
+
return { authorizationUrl: "", refreshUrl: "", scopes: {} };
|
|
2500
|
+
}
|
|
2501
|
+
var ImplicitOAuthFlow = {
|
|
2502
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2503
|
+
if (message.authorizationUrl !== "") {
|
|
2504
|
+
writer.uint32(10).string(message.authorizationUrl);
|
|
2505
|
+
}
|
|
2506
|
+
if (message.refreshUrl !== "") {
|
|
2507
|
+
writer.uint32(18).string(message.refreshUrl);
|
|
2508
|
+
}
|
|
2509
|
+
Object.entries(message.scopes).forEach(([key, value]) => {
|
|
2510
|
+
ImplicitOAuthFlow_ScopesEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
2511
|
+
});
|
|
2512
|
+
return writer;
|
|
2513
|
+
},
|
|
2514
|
+
decode(input, length) {
|
|
2515
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2516
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2517
|
+
const message = createBaseImplicitOAuthFlow();
|
|
2518
|
+
while (reader.pos < end) {
|
|
2519
|
+
const tag = reader.uint32();
|
|
2520
|
+
switch (tag >>> 3) {
|
|
2521
|
+
case 1: {
|
|
2522
|
+
if (tag !== 10) {
|
|
2523
|
+
break;
|
|
2524
|
+
}
|
|
2525
|
+
message.authorizationUrl = reader.string();
|
|
2526
|
+
continue;
|
|
2527
|
+
}
|
|
2528
|
+
case 2: {
|
|
2529
|
+
if (tag !== 18) {
|
|
2530
|
+
break;
|
|
2531
|
+
}
|
|
2532
|
+
message.refreshUrl = reader.string();
|
|
2533
|
+
continue;
|
|
2534
|
+
}
|
|
2535
|
+
case 3: {
|
|
2536
|
+
if (tag !== 26) {
|
|
2537
|
+
break;
|
|
2538
|
+
}
|
|
2539
|
+
const entry3 = ImplicitOAuthFlow_ScopesEntry.decode(reader, reader.uint32());
|
|
2540
|
+
if (entry3.value !== void 0) {
|
|
2541
|
+
message.scopes[entry3.key] = entry3.value;
|
|
2542
|
+
}
|
|
2543
|
+
continue;
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2547
|
+
break;
|
|
2548
|
+
}
|
|
2549
|
+
reader.skip(tag & 7);
|
|
2550
|
+
}
|
|
2551
|
+
return message;
|
|
2552
|
+
}
|
|
2553
|
+
};
|
|
2554
|
+
function createBaseImplicitOAuthFlow_ScopesEntry() {
|
|
2555
|
+
return { key: "", value: "" };
|
|
2556
|
+
}
|
|
2557
|
+
var ImplicitOAuthFlow_ScopesEntry = {
|
|
2558
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2559
|
+
if (message.key !== "") {
|
|
2560
|
+
writer.uint32(10).string(message.key);
|
|
2561
|
+
}
|
|
2562
|
+
if (message.value !== "") {
|
|
2563
|
+
writer.uint32(18).string(message.value);
|
|
2564
|
+
}
|
|
2565
|
+
return writer;
|
|
2566
|
+
},
|
|
2567
|
+
decode(input, length) {
|
|
2568
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2569
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2570
|
+
const message = createBaseImplicitOAuthFlow_ScopesEntry();
|
|
2571
|
+
while (reader.pos < end) {
|
|
2572
|
+
const tag = reader.uint32();
|
|
2573
|
+
switch (tag >>> 3) {
|
|
2574
|
+
case 1: {
|
|
2575
|
+
if (tag !== 10) {
|
|
2576
|
+
break;
|
|
2577
|
+
}
|
|
2578
|
+
message.key = reader.string();
|
|
2579
|
+
continue;
|
|
2580
|
+
}
|
|
2581
|
+
case 2: {
|
|
2582
|
+
if (tag !== 18) {
|
|
2583
|
+
break;
|
|
2584
|
+
}
|
|
2585
|
+
message.value = reader.string();
|
|
2586
|
+
continue;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2590
|
+
break;
|
|
2591
|
+
}
|
|
2592
|
+
reader.skip(tag & 7);
|
|
2593
|
+
}
|
|
2594
|
+
return message;
|
|
2595
|
+
}
|
|
2596
|
+
};
|
|
2597
|
+
function createBasePasswordOAuthFlow() {
|
|
2598
|
+
return { tokenUrl: "", refreshUrl: "", scopes: {} };
|
|
2599
|
+
}
|
|
2600
|
+
var PasswordOAuthFlow = {
|
|
2601
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2602
|
+
if (message.tokenUrl !== "") {
|
|
2603
|
+
writer.uint32(10).string(message.tokenUrl);
|
|
2604
|
+
}
|
|
2605
|
+
if (message.refreshUrl !== "") {
|
|
2606
|
+
writer.uint32(18).string(message.refreshUrl);
|
|
2607
|
+
}
|
|
2608
|
+
Object.entries(message.scopes).forEach(([key, value]) => {
|
|
2609
|
+
PasswordOAuthFlow_ScopesEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
2610
|
+
});
|
|
2611
|
+
return writer;
|
|
2612
|
+
},
|
|
2613
|
+
decode(input, length) {
|
|
2614
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2615
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2616
|
+
const message = createBasePasswordOAuthFlow();
|
|
2617
|
+
while (reader.pos < end) {
|
|
2618
|
+
const tag = reader.uint32();
|
|
2619
|
+
switch (tag >>> 3) {
|
|
2620
|
+
case 1: {
|
|
2621
|
+
if (tag !== 10) {
|
|
2622
|
+
break;
|
|
2623
|
+
}
|
|
2624
|
+
message.tokenUrl = reader.string();
|
|
2625
|
+
continue;
|
|
2626
|
+
}
|
|
2627
|
+
case 2: {
|
|
2628
|
+
if (tag !== 18) {
|
|
2629
|
+
break;
|
|
2630
|
+
}
|
|
2631
|
+
message.refreshUrl = reader.string();
|
|
2632
|
+
continue;
|
|
2633
|
+
}
|
|
2634
|
+
case 3: {
|
|
2635
|
+
if (tag !== 26) {
|
|
2636
|
+
break;
|
|
2637
|
+
}
|
|
2638
|
+
const entry3 = PasswordOAuthFlow_ScopesEntry.decode(reader, reader.uint32());
|
|
2639
|
+
if (entry3.value !== void 0) {
|
|
2640
|
+
message.scopes[entry3.key] = entry3.value;
|
|
2641
|
+
}
|
|
2642
|
+
continue;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2646
|
+
break;
|
|
2647
|
+
}
|
|
2648
|
+
reader.skip(tag & 7);
|
|
2649
|
+
}
|
|
2650
|
+
return message;
|
|
2651
|
+
}
|
|
2652
|
+
};
|
|
2653
|
+
function createBasePasswordOAuthFlow_ScopesEntry() {
|
|
2654
|
+
return { key: "", value: "" };
|
|
2655
|
+
}
|
|
2656
|
+
var PasswordOAuthFlow_ScopesEntry = {
|
|
2657
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2658
|
+
if (message.key !== "") {
|
|
2659
|
+
writer.uint32(10).string(message.key);
|
|
2660
|
+
}
|
|
2661
|
+
if (message.value !== "") {
|
|
2662
|
+
writer.uint32(18).string(message.value);
|
|
2663
|
+
}
|
|
2664
|
+
return writer;
|
|
2665
|
+
},
|
|
2666
|
+
decode(input, length) {
|
|
2667
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2668
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2669
|
+
const message = createBasePasswordOAuthFlow_ScopesEntry();
|
|
2670
|
+
while (reader.pos < end) {
|
|
2671
|
+
const tag = reader.uint32();
|
|
2672
|
+
switch (tag >>> 3) {
|
|
2673
|
+
case 1: {
|
|
2674
|
+
if (tag !== 10) {
|
|
2675
|
+
break;
|
|
2676
|
+
}
|
|
2677
|
+
message.key = reader.string();
|
|
2678
|
+
continue;
|
|
2679
|
+
}
|
|
2680
|
+
case 2: {
|
|
2681
|
+
if (tag !== 18) {
|
|
2682
|
+
break;
|
|
2683
|
+
}
|
|
2684
|
+
message.value = reader.string();
|
|
2685
|
+
continue;
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2689
|
+
break;
|
|
2690
|
+
}
|
|
2691
|
+
reader.skip(tag & 7);
|
|
2692
|
+
}
|
|
2693
|
+
return message;
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
function createBaseSendMessageRequest() {
|
|
2697
|
+
return { request: void 0, configuration: void 0, metadata: void 0 };
|
|
2698
|
+
}
|
|
2699
|
+
var SendMessageRequest = {
|
|
2700
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2701
|
+
if (message.request !== void 0) {
|
|
2702
|
+
Message.encode(message.request, writer.uint32(10).fork()).join();
|
|
2703
|
+
}
|
|
2704
|
+
if (message.configuration !== void 0) {
|
|
2705
|
+
SendMessageConfiguration.encode(message.configuration, writer.uint32(18).fork()).join();
|
|
2706
|
+
}
|
|
2707
|
+
if (message.metadata !== void 0) {
|
|
2708
|
+
Struct.encode(Struct.wrap(message.metadata), writer.uint32(26).fork()).join();
|
|
2709
|
+
}
|
|
2710
|
+
return writer;
|
|
2711
|
+
},
|
|
2712
|
+
decode(input, length) {
|
|
2713
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2714
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2715
|
+
const message = createBaseSendMessageRequest();
|
|
2716
|
+
while (reader.pos < end) {
|
|
2717
|
+
const tag = reader.uint32();
|
|
2718
|
+
switch (tag >>> 3) {
|
|
2719
|
+
case 1: {
|
|
2720
|
+
if (tag !== 10) {
|
|
2721
|
+
break;
|
|
2722
|
+
}
|
|
2723
|
+
message.request = Message.decode(reader, reader.uint32());
|
|
2724
|
+
continue;
|
|
2725
|
+
}
|
|
2726
|
+
case 2: {
|
|
2727
|
+
if (tag !== 18) {
|
|
2728
|
+
break;
|
|
2729
|
+
}
|
|
2730
|
+
message.configuration = SendMessageConfiguration.decode(reader, reader.uint32());
|
|
2731
|
+
continue;
|
|
2732
|
+
}
|
|
2733
|
+
case 3: {
|
|
2734
|
+
if (tag !== 26) {
|
|
2735
|
+
break;
|
|
2736
|
+
}
|
|
2737
|
+
message.metadata = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
2738
|
+
continue;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2742
|
+
break;
|
|
2743
|
+
}
|
|
2744
|
+
reader.skip(tag & 7);
|
|
2745
|
+
}
|
|
2746
|
+
return message;
|
|
2747
|
+
}
|
|
2748
|
+
};
|
|
2749
|
+
function createBaseGetTaskRequest() {
|
|
2750
|
+
return { name: "", historyLength: 0 };
|
|
2751
|
+
}
|
|
2752
|
+
var GetTaskRequest = {
|
|
2753
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2754
|
+
if (message.name !== "") {
|
|
2755
|
+
writer.uint32(10).string(message.name);
|
|
2756
|
+
}
|
|
2757
|
+
if (message.historyLength !== 0) {
|
|
2758
|
+
writer.uint32(16).int32(message.historyLength);
|
|
2759
|
+
}
|
|
2760
|
+
return writer;
|
|
2761
|
+
},
|
|
2762
|
+
decode(input, length) {
|
|
2763
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2764
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2765
|
+
const message = createBaseGetTaskRequest();
|
|
2766
|
+
while (reader.pos < end) {
|
|
2767
|
+
const tag = reader.uint32();
|
|
2768
|
+
switch (tag >>> 3) {
|
|
2769
|
+
case 1: {
|
|
2770
|
+
if (tag !== 10) {
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
message.name = reader.string();
|
|
2774
|
+
continue;
|
|
2775
|
+
}
|
|
2776
|
+
case 2: {
|
|
2777
|
+
if (tag !== 16) {
|
|
2778
|
+
break;
|
|
2779
|
+
}
|
|
2780
|
+
message.historyLength = reader.int32();
|
|
2781
|
+
continue;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2785
|
+
break;
|
|
2786
|
+
}
|
|
2787
|
+
reader.skip(tag & 7);
|
|
2788
|
+
}
|
|
2789
|
+
return message;
|
|
2790
|
+
}
|
|
2791
|
+
};
|
|
2792
|
+
function createBaseCancelTaskRequest() {
|
|
2793
|
+
return { name: "" };
|
|
2794
|
+
}
|
|
2795
|
+
var CancelTaskRequest = {
|
|
2796
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2797
|
+
if (message.name !== "") {
|
|
2798
|
+
writer.uint32(10).string(message.name);
|
|
2799
|
+
}
|
|
2800
|
+
return writer;
|
|
2801
|
+
},
|
|
2802
|
+
decode(input, length) {
|
|
2803
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2804
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2805
|
+
const message = createBaseCancelTaskRequest();
|
|
2806
|
+
while (reader.pos < end) {
|
|
2807
|
+
const tag = reader.uint32();
|
|
2808
|
+
switch (tag >>> 3) {
|
|
2809
|
+
case 1: {
|
|
2810
|
+
if (tag !== 10) {
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
message.name = reader.string();
|
|
2814
|
+
continue;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2818
|
+
break;
|
|
2819
|
+
}
|
|
2820
|
+
reader.skip(tag & 7);
|
|
2821
|
+
}
|
|
2822
|
+
return message;
|
|
2823
|
+
}
|
|
2824
|
+
};
|
|
2825
|
+
function createBaseGetTaskPushNotificationConfigRequest() {
|
|
2826
|
+
return { name: "" };
|
|
2827
|
+
}
|
|
2828
|
+
var GetTaskPushNotificationConfigRequest = {
|
|
2829
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2830
|
+
if (message.name !== "") {
|
|
2831
|
+
writer.uint32(10).string(message.name);
|
|
2832
|
+
}
|
|
2833
|
+
return writer;
|
|
2834
|
+
},
|
|
2835
|
+
decode(input, length) {
|
|
2836
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2837
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2838
|
+
const message = createBaseGetTaskPushNotificationConfigRequest();
|
|
2839
|
+
while (reader.pos < end) {
|
|
2840
|
+
const tag = reader.uint32();
|
|
2841
|
+
switch (tag >>> 3) {
|
|
2842
|
+
case 1: {
|
|
2843
|
+
if (tag !== 10) {
|
|
2844
|
+
break;
|
|
2845
|
+
}
|
|
2846
|
+
message.name = reader.string();
|
|
2847
|
+
continue;
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2851
|
+
break;
|
|
2852
|
+
}
|
|
2853
|
+
reader.skip(tag & 7);
|
|
2854
|
+
}
|
|
2855
|
+
return message;
|
|
2856
|
+
}
|
|
2857
|
+
};
|
|
2858
|
+
function createBaseDeleteTaskPushNotificationConfigRequest() {
|
|
2859
|
+
return { name: "" };
|
|
2860
|
+
}
|
|
2861
|
+
var DeleteTaskPushNotificationConfigRequest = {
|
|
2862
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2863
|
+
if (message.name !== "") {
|
|
2864
|
+
writer.uint32(10).string(message.name);
|
|
2865
|
+
}
|
|
2866
|
+
return writer;
|
|
2867
|
+
},
|
|
2868
|
+
decode(input, length) {
|
|
2869
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2870
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2871
|
+
const message = createBaseDeleteTaskPushNotificationConfigRequest();
|
|
2872
|
+
while (reader.pos < end) {
|
|
2873
|
+
const tag = reader.uint32();
|
|
2874
|
+
switch (tag >>> 3) {
|
|
2875
|
+
case 1: {
|
|
2876
|
+
if (tag !== 10) {
|
|
2877
|
+
break;
|
|
2878
|
+
}
|
|
2879
|
+
message.name = reader.string();
|
|
2880
|
+
continue;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2884
|
+
break;
|
|
2885
|
+
}
|
|
2886
|
+
reader.skip(tag & 7);
|
|
2887
|
+
}
|
|
2888
|
+
return message;
|
|
2889
|
+
}
|
|
2890
|
+
};
|
|
2891
|
+
function createBaseCreateTaskPushNotificationConfigRequest() {
|
|
2892
|
+
return { parent: "", configId: "", config: void 0 };
|
|
2893
|
+
}
|
|
2894
|
+
var CreateTaskPushNotificationConfigRequest = {
|
|
2895
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2896
|
+
if (message.parent !== "") {
|
|
2897
|
+
writer.uint32(10).string(message.parent);
|
|
2898
|
+
}
|
|
2899
|
+
if (message.configId !== "") {
|
|
2900
|
+
writer.uint32(18).string(message.configId);
|
|
2901
|
+
}
|
|
2902
|
+
if (message.config !== void 0) {
|
|
2903
|
+
TaskPushNotificationConfig.encode(message.config, writer.uint32(26).fork()).join();
|
|
2904
|
+
}
|
|
2905
|
+
return writer;
|
|
2906
|
+
},
|
|
2907
|
+
decode(input, length) {
|
|
2908
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2909
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2910
|
+
const message = createBaseCreateTaskPushNotificationConfigRequest();
|
|
2911
|
+
while (reader.pos < end) {
|
|
2912
|
+
const tag = reader.uint32();
|
|
2913
|
+
switch (tag >>> 3) {
|
|
2914
|
+
case 1: {
|
|
2915
|
+
if (tag !== 10) {
|
|
2916
|
+
break;
|
|
2917
|
+
}
|
|
2918
|
+
message.parent = reader.string();
|
|
2919
|
+
continue;
|
|
2920
|
+
}
|
|
2921
|
+
case 2: {
|
|
2922
|
+
if (tag !== 18) {
|
|
2923
|
+
break;
|
|
2924
|
+
}
|
|
2925
|
+
message.configId = reader.string();
|
|
2926
|
+
continue;
|
|
2927
|
+
}
|
|
2928
|
+
case 3: {
|
|
2929
|
+
if (tag !== 26) {
|
|
2930
|
+
break;
|
|
2931
|
+
}
|
|
2932
|
+
message.config = TaskPushNotificationConfig.decode(reader, reader.uint32());
|
|
2933
|
+
continue;
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2937
|
+
break;
|
|
2938
|
+
}
|
|
2939
|
+
reader.skip(tag & 7);
|
|
2940
|
+
}
|
|
2941
|
+
return message;
|
|
2942
|
+
}
|
|
2943
|
+
};
|
|
2944
|
+
function createBaseTaskSubscriptionRequest() {
|
|
2945
|
+
return { name: "" };
|
|
2946
|
+
}
|
|
2947
|
+
var TaskSubscriptionRequest = {
|
|
2948
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2949
|
+
if (message.name !== "") {
|
|
2950
|
+
writer.uint32(10).string(message.name);
|
|
2951
|
+
}
|
|
2952
|
+
return writer;
|
|
2953
|
+
},
|
|
2954
|
+
decode(input, length) {
|
|
2955
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2956
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2957
|
+
const message = createBaseTaskSubscriptionRequest();
|
|
2958
|
+
while (reader.pos < end) {
|
|
2959
|
+
const tag = reader.uint32();
|
|
2960
|
+
switch (tag >>> 3) {
|
|
2961
|
+
case 1: {
|
|
2962
|
+
if (tag !== 10) {
|
|
2963
|
+
break;
|
|
2964
|
+
}
|
|
2965
|
+
message.name = reader.string();
|
|
2966
|
+
continue;
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2970
|
+
break;
|
|
2971
|
+
}
|
|
2972
|
+
reader.skip(tag & 7);
|
|
2973
|
+
}
|
|
2974
|
+
return message;
|
|
2975
|
+
}
|
|
2976
|
+
};
|
|
2977
|
+
function createBaseListTaskPushNotificationConfigRequest() {
|
|
2978
|
+
return { parent: "", pageSize: 0, pageToken: "" };
|
|
2979
|
+
}
|
|
2980
|
+
var ListTaskPushNotificationConfigRequest = {
|
|
2981
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
2982
|
+
if (message.parent !== "") {
|
|
2983
|
+
writer.uint32(10).string(message.parent);
|
|
2984
|
+
}
|
|
2985
|
+
if (message.pageSize !== 0) {
|
|
2986
|
+
writer.uint32(16).int32(message.pageSize);
|
|
2987
|
+
}
|
|
2988
|
+
if (message.pageToken !== "") {
|
|
2989
|
+
writer.uint32(26).string(message.pageToken);
|
|
2990
|
+
}
|
|
2991
|
+
return writer;
|
|
2992
|
+
},
|
|
2993
|
+
decode(input, length) {
|
|
2994
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
2995
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2996
|
+
const message = createBaseListTaskPushNotificationConfigRequest();
|
|
2997
|
+
while (reader.pos < end) {
|
|
2998
|
+
const tag = reader.uint32();
|
|
2999
|
+
switch (tag >>> 3) {
|
|
3000
|
+
case 1: {
|
|
3001
|
+
if (tag !== 10) {
|
|
3002
|
+
break;
|
|
3003
|
+
}
|
|
3004
|
+
message.parent = reader.string();
|
|
3005
|
+
continue;
|
|
3006
|
+
}
|
|
3007
|
+
case 2: {
|
|
3008
|
+
if (tag !== 16) {
|
|
3009
|
+
break;
|
|
3010
|
+
}
|
|
3011
|
+
message.pageSize = reader.int32();
|
|
3012
|
+
continue;
|
|
3013
|
+
}
|
|
3014
|
+
case 3: {
|
|
3015
|
+
if (tag !== 26) {
|
|
3016
|
+
break;
|
|
3017
|
+
}
|
|
3018
|
+
message.pageToken = reader.string();
|
|
3019
|
+
continue;
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3023
|
+
break;
|
|
3024
|
+
}
|
|
3025
|
+
reader.skip(tag & 7);
|
|
3026
|
+
}
|
|
3027
|
+
return message;
|
|
3028
|
+
}
|
|
3029
|
+
};
|
|
3030
|
+
function createBaseGetAgentCardRequest() {
|
|
3031
|
+
return {};
|
|
3032
|
+
}
|
|
3033
|
+
var GetAgentCardRequest = {
|
|
3034
|
+
encode(_, writer = new BinaryWriter4()) {
|
|
3035
|
+
return writer;
|
|
3036
|
+
},
|
|
3037
|
+
decode(input, length) {
|
|
3038
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
3039
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3040
|
+
const message = createBaseGetAgentCardRequest();
|
|
3041
|
+
while (reader.pos < end) {
|
|
3042
|
+
const tag = reader.uint32();
|
|
3043
|
+
switch (tag >>> 3) {
|
|
3044
|
+
}
|
|
3045
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3046
|
+
break;
|
|
3047
|
+
}
|
|
3048
|
+
reader.skip(tag & 7);
|
|
3049
|
+
}
|
|
3050
|
+
return message;
|
|
3051
|
+
}
|
|
3052
|
+
};
|
|
3053
|
+
function createBaseSendMessageResponse() {
|
|
3054
|
+
return { payload: void 0 };
|
|
3055
|
+
}
|
|
3056
|
+
var SendMessageResponse = {
|
|
3057
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
3058
|
+
switch (message.payload?.$case) {
|
|
3059
|
+
case "task":
|
|
3060
|
+
Task.encode(message.payload.value, writer.uint32(10).fork()).join();
|
|
3061
|
+
break;
|
|
3062
|
+
case "msg":
|
|
3063
|
+
Message.encode(message.payload.value, writer.uint32(18).fork()).join();
|
|
3064
|
+
break;
|
|
3065
|
+
}
|
|
3066
|
+
return writer;
|
|
3067
|
+
},
|
|
3068
|
+
decode(input, length) {
|
|
3069
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
3070
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3071
|
+
const message = createBaseSendMessageResponse();
|
|
3072
|
+
while (reader.pos < end) {
|
|
3073
|
+
const tag = reader.uint32();
|
|
3074
|
+
switch (tag >>> 3) {
|
|
3075
|
+
case 1: {
|
|
3076
|
+
if (tag !== 10) {
|
|
3077
|
+
break;
|
|
3078
|
+
}
|
|
3079
|
+
message.payload = { $case: "task", value: Task.decode(reader, reader.uint32()) };
|
|
3080
|
+
continue;
|
|
3081
|
+
}
|
|
3082
|
+
case 2: {
|
|
3083
|
+
if (tag !== 18) {
|
|
3084
|
+
break;
|
|
3085
|
+
}
|
|
3086
|
+
message.payload = { $case: "msg", value: Message.decode(reader, reader.uint32()) };
|
|
3087
|
+
continue;
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3091
|
+
break;
|
|
3092
|
+
}
|
|
3093
|
+
reader.skip(tag & 7);
|
|
3094
|
+
}
|
|
3095
|
+
return message;
|
|
3096
|
+
}
|
|
3097
|
+
};
|
|
3098
|
+
function createBaseStreamResponse() {
|
|
3099
|
+
return { payload: void 0 };
|
|
3100
|
+
}
|
|
3101
|
+
var StreamResponse = {
|
|
3102
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
3103
|
+
switch (message.payload?.$case) {
|
|
3104
|
+
case "task":
|
|
3105
|
+
Task.encode(message.payload.value, writer.uint32(10).fork()).join();
|
|
3106
|
+
break;
|
|
3107
|
+
case "msg":
|
|
3108
|
+
Message.encode(message.payload.value, writer.uint32(18).fork()).join();
|
|
3109
|
+
break;
|
|
3110
|
+
case "statusUpdate":
|
|
3111
|
+
TaskStatusUpdateEvent.encode(message.payload.value, writer.uint32(26).fork()).join();
|
|
3112
|
+
break;
|
|
3113
|
+
case "artifactUpdate":
|
|
3114
|
+
TaskArtifactUpdateEvent.encode(message.payload.value, writer.uint32(34).fork()).join();
|
|
3115
|
+
break;
|
|
3116
|
+
}
|
|
3117
|
+
return writer;
|
|
3118
|
+
},
|
|
3119
|
+
decode(input, length) {
|
|
3120
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
3121
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3122
|
+
const message = createBaseStreamResponse();
|
|
3123
|
+
while (reader.pos < end) {
|
|
3124
|
+
const tag = reader.uint32();
|
|
3125
|
+
switch (tag >>> 3) {
|
|
3126
|
+
case 1: {
|
|
3127
|
+
if (tag !== 10) {
|
|
3128
|
+
break;
|
|
3129
|
+
}
|
|
3130
|
+
message.payload = { $case: "task", value: Task.decode(reader, reader.uint32()) };
|
|
3131
|
+
continue;
|
|
3132
|
+
}
|
|
3133
|
+
case 2: {
|
|
3134
|
+
if (tag !== 18) {
|
|
3135
|
+
break;
|
|
3136
|
+
}
|
|
3137
|
+
message.payload = { $case: "msg", value: Message.decode(reader, reader.uint32()) };
|
|
3138
|
+
continue;
|
|
3139
|
+
}
|
|
3140
|
+
case 3: {
|
|
3141
|
+
if (tag !== 26) {
|
|
3142
|
+
break;
|
|
3143
|
+
}
|
|
3144
|
+
message.payload = { $case: "statusUpdate", value: TaskStatusUpdateEvent.decode(reader, reader.uint32()) };
|
|
3145
|
+
continue;
|
|
3146
|
+
}
|
|
3147
|
+
case 4: {
|
|
3148
|
+
if (tag !== 34) {
|
|
3149
|
+
break;
|
|
3150
|
+
}
|
|
3151
|
+
message.payload = { $case: "artifactUpdate", value: TaskArtifactUpdateEvent.decode(reader, reader.uint32()) };
|
|
3152
|
+
continue;
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3156
|
+
break;
|
|
3157
|
+
}
|
|
3158
|
+
reader.skip(tag & 7);
|
|
3159
|
+
}
|
|
3160
|
+
return message;
|
|
3161
|
+
}
|
|
3162
|
+
};
|
|
3163
|
+
function createBaseListTaskPushNotificationConfigResponse() {
|
|
3164
|
+
return { configs: [], nextPageToken: "" };
|
|
3165
|
+
}
|
|
3166
|
+
var ListTaskPushNotificationConfigResponse = {
|
|
3167
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
3168
|
+
for (const v of message.configs) {
|
|
3169
|
+
TaskPushNotificationConfig.encode(v, writer.uint32(10).fork()).join();
|
|
3170
|
+
}
|
|
3171
|
+
if (message.nextPageToken !== "") {
|
|
3172
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
3173
|
+
}
|
|
3174
|
+
return writer;
|
|
3175
|
+
},
|
|
3176
|
+
decode(input, length) {
|
|
3177
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
3178
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3179
|
+
const message = createBaseListTaskPushNotificationConfigResponse();
|
|
3180
|
+
while (reader.pos < end) {
|
|
3181
|
+
const tag = reader.uint32();
|
|
3182
|
+
switch (tag >>> 3) {
|
|
3183
|
+
case 1: {
|
|
3184
|
+
if (tag !== 10) {
|
|
3185
|
+
break;
|
|
3186
|
+
}
|
|
3187
|
+
message.configs.push(TaskPushNotificationConfig.decode(reader, reader.uint32()));
|
|
3188
|
+
continue;
|
|
3189
|
+
}
|
|
3190
|
+
case 2: {
|
|
3191
|
+
if (tag !== 18) {
|
|
3192
|
+
break;
|
|
3193
|
+
}
|
|
3194
|
+
message.nextPageToken = reader.string();
|
|
3195
|
+
continue;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3199
|
+
break;
|
|
3200
|
+
}
|
|
3201
|
+
reader.skip(tag & 7);
|
|
3202
|
+
}
|
|
3203
|
+
return message;
|
|
3204
|
+
}
|
|
3205
|
+
};
|
|
3206
|
+
var A2AServiceService = {
|
|
3207
|
+
/**
|
|
3208
|
+
* Send a message to the agent. This is a blocking call that will return the
|
|
3209
|
+
* task once it is completed, or a LRO if requested.
|
|
3210
|
+
*/
|
|
3211
|
+
sendMessage: {
|
|
3212
|
+
path: "/a2a.v1.A2AService/SendMessage",
|
|
3213
|
+
requestStream: false,
|
|
3214
|
+
responseStream: false,
|
|
3215
|
+
requestSerialize: (value) => Buffer.from(SendMessageRequest.encode(value).finish()),
|
|
3216
|
+
requestDeserialize: (value) => SendMessageRequest.decode(value),
|
|
3217
|
+
responseSerialize: (value) => Buffer.from(SendMessageResponse.encode(value).finish()),
|
|
3218
|
+
responseDeserialize: (value) => SendMessageResponse.decode(value)
|
|
3219
|
+
},
|
|
3220
|
+
/**
|
|
3221
|
+
* SendStreamingMessage is a streaming call that will return a stream of
|
|
3222
|
+
* task update events until the Task is in an interrupted or terminal state.
|
|
3223
|
+
*/
|
|
3224
|
+
sendStreamingMessage: {
|
|
3225
|
+
path: "/a2a.v1.A2AService/SendStreamingMessage",
|
|
3226
|
+
requestStream: false,
|
|
3227
|
+
responseStream: true,
|
|
3228
|
+
requestSerialize: (value) => Buffer.from(SendMessageRequest.encode(value).finish()),
|
|
3229
|
+
requestDeserialize: (value) => SendMessageRequest.decode(value),
|
|
3230
|
+
responseSerialize: (value) => Buffer.from(StreamResponse.encode(value).finish()),
|
|
3231
|
+
responseDeserialize: (value) => StreamResponse.decode(value)
|
|
3232
|
+
},
|
|
3233
|
+
/** Get the current state of a task from the agent. */
|
|
3234
|
+
getTask: {
|
|
3235
|
+
path: "/a2a.v1.A2AService/GetTask",
|
|
3236
|
+
requestStream: false,
|
|
3237
|
+
responseStream: false,
|
|
3238
|
+
requestSerialize: (value) => Buffer.from(GetTaskRequest.encode(value).finish()),
|
|
3239
|
+
requestDeserialize: (value) => GetTaskRequest.decode(value),
|
|
3240
|
+
responseSerialize: (value) => Buffer.from(Task.encode(value).finish()),
|
|
3241
|
+
responseDeserialize: (value) => Task.decode(value)
|
|
3242
|
+
},
|
|
3243
|
+
/**
|
|
3244
|
+
* Cancel a task from the agent. If supported one should expect no
|
|
3245
|
+
* more task updates for the task.
|
|
3246
|
+
*/
|
|
3247
|
+
cancelTask: {
|
|
3248
|
+
path: "/a2a.v1.A2AService/CancelTask",
|
|
3249
|
+
requestStream: false,
|
|
3250
|
+
responseStream: false,
|
|
3251
|
+
requestSerialize: (value) => Buffer.from(CancelTaskRequest.encode(value).finish()),
|
|
3252
|
+
requestDeserialize: (value) => CancelTaskRequest.decode(value),
|
|
3253
|
+
responseSerialize: (value) => Buffer.from(Task.encode(value).finish()),
|
|
3254
|
+
responseDeserialize: (value) => Task.decode(value)
|
|
3255
|
+
},
|
|
3256
|
+
/**
|
|
3257
|
+
* TaskSubscription is a streaming call that will return a stream of task
|
|
3258
|
+
* update events. This attaches the stream to an existing in process task.
|
|
3259
|
+
* If the task is complete the stream will return the completed task (like
|
|
3260
|
+
* GetTask) and close the stream.
|
|
3261
|
+
*/
|
|
3262
|
+
taskSubscription: {
|
|
3263
|
+
path: "/a2a.v1.A2AService/TaskSubscription",
|
|
3264
|
+
requestStream: false,
|
|
3265
|
+
responseStream: true,
|
|
3266
|
+
requestSerialize: (value) => Buffer.from(TaskSubscriptionRequest.encode(value).finish()),
|
|
3267
|
+
requestDeserialize: (value) => TaskSubscriptionRequest.decode(value),
|
|
3268
|
+
responseSerialize: (value) => Buffer.from(StreamResponse.encode(value).finish()),
|
|
3269
|
+
responseDeserialize: (value) => StreamResponse.decode(value)
|
|
3270
|
+
},
|
|
3271
|
+
/** Set a push notification config for a task. */
|
|
3272
|
+
createTaskPushNotificationConfig: {
|
|
3273
|
+
path: "/a2a.v1.A2AService/CreateTaskPushNotificationConfig",
|
|
3274
|
+
requestStream: false,
|
|
3275
|
+
responseStream: false,
|
|
3276
|
+
requestSerialize: (value) => Buffer.from(CreateTaskPushNotificationConfigRequest.encode(value).finish()),
|
|
3277
|
+
requestDeserialize: (value) => CreateTaskPushNotificationConfigRequest.decode(value),
|
|
3278
|
+
responseSerialize: (value) => Buffer.from(TaskPushNotificationConfig.encode(value).finish()),
|
|
3279
|
+
responseDeserialize: (value) => TaskPushNotificationConfig.decode(value)
|
|
3280
|
+
},
|
|
3281
|
+
/** Get a push notification config for a task. */
|
|
3282
|
+
getTaskPushNotificationConfig: {
|
|
3283
|
+
path: "/a2a.v1.A2AService/GetTaskPushNotificationConfig",
|
|
3284
|
+
requestStream: false,
|
|
3285
|
+
responseStream: false,
|
|
3286
|
+
requestSerialize: (value) => Buffer.from(GetTaskPushNotificationConfigRequest.encode(value).finish()),
|
|
3287
|
+
requestDeserialize: (value) => GetTaskPushNotificationConfigRequest.decode(value),
|
|
3288
|
+
responseSerialize: (value) => Buffer.from(TaskPushNotificationConfig.encode(value).finish()),
|
|
3289
|
+
responseDeserialize: (value) => TaskPushNotificationConfig.decode(value)
|
|
3290
|
+
},
|
|
3291
|
+
/** Get a list of push notifications configured for a task. */
|
|
3292
|
+
listTaskPushNotificationConfig: {
|
|
3293
|
+
path: "/a2a.v1.A2AService/ListTaskPushNotificationConfig",
|
|
3294
|
+
requestStream: false,
|
|
3295
|
+
responseStream: false,
|
|
3296
|
+
requestSerialize: (value) => Buffer.from(ListTaskPushNotificationConfigRequest.encode(value).finish()),
|
|
3297
|
+
requestDeserialize: (value) => ListTaskPushNotificationConfigRequest.decode(value),
|
|
3298
|
+
responseSerialize: (value) => Buffer.from(ListTaskPushNotificationConfigResponse.encode(value).finish()),
|
|
3299
|
+
responseDeserialize: (value) => ListTaskPushNotificationConfigResponse.decode(value)
|
|
3300
|
+
},
|
|
3301
|
+
/** GetAgentCard returns the agent card for the agent. */
|
|
3302
|
+
getAgentCard: {
|
|
3303
|
+
path: "/a2a.v1.A2AService/GetAgentCard",
|
|
3304
|
+
requestStream: false,
|
|
3305
|
+
responseStream: false,
|
|
3306
|
+
requestSerialize: (value) => Buffer.from(GetAgentCardRequest.encode(value).finish()),
|
|
3307
|
+
requestDeserialize: (value) => GetAgentCardRequest.decode(value),
|
|
3308
|
+
responseSerialize: (value) => Buffer.from(AgentCard.encode(value).finish()),
|
|
3309
|
+
responseDeserialize: (value) => AgentCard.decode(value)
|
|
3310
|
+
},
|
|
3311
|
+
/** Delete a push notification config for a task. */
|
|
3312
|
+
deleteTaskPushNotificationConfig: {
|
|
3313
|
+
path: "/a2a.v1.A2AService/DeleteTaskPushNotificationConfig",
|
|
3314
|
+
requestStream: false,
|
|
3315
|
+
responseStream: false,
|
|
3316
|
+
requestSerialize: (value) => Buffer.from(DeleteTaskPushNotificationConfigRequest.encode(value).finish()),
|
|
3317
|
+
requestDeserialize: (value) => DeleteTaskPushNotificationConfigRequest.decode(value),
|
|
3318
|
+
responseSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
|
|
3319
|
+
responseDeserialize: (value) => Empty.decode(value)
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
var A2AServiceClient = makeGenericClientConstructor(A2AServiceService, "a2a.v1.A2AService");
|
|
3323
|
+
function toTimestamp(dateStr) {
|
|
3324
|
+
const date = new globalThis.Date(dateStr);
|
|
3325
|
+
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
3326
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
3327
|
+
return { seconds, nanos };
|
|
3328
|
+
}
|
|
3329
|
+
function fromTimestamp(t) {
|
|
3330
|
+
let millis = (t.seconds || 0) * 1e3;
|
|
3331
|
+
millis += (t.nanos || 0) / 1e6;
|
|
3332
|
+
return new globalThis.Date(millis).toISOString();
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
export {
|
|
3336
|
+
A2AServiceService,
|
|
3337
|
+
A2AServiceClient
|
|
3338
|
+
};
|