@a2a-js/sdk 0.3.8 → 0.3.9
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-TS5RMC7F.js +56 -0
- package/dist/{chunk-DHC2REQH.js → chunk-U3QAVT4H.js} +218 -377
- package/dist/client/index.cjs +218 -257
- package/dist/client/index.d.cts +4 -415
- package/dist/client/index.d.ts +4 -415
- package/dist/client/index.js +20 -16
- 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 +28 -3
package/dist/client/index.cjs
CHANGED
|
@@ -1174,30 +1174,7 @@ var A2AError = class _A2AError extends Error {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
1176
|
|
|
1177
|
-
// src/types/pb/
|
|
1178
|
-
var Timestamp = {
|
|
1179
|
-
fromJSON(object) {
|
|
1180
|
-
return {
|
|
1181
|
-
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
1182
|
-
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0
|
|
1183
|
-
};
|
|
1184
|
-
},
|
|
1185
|
-
toJSON(message) {
|
|
1186
|
-
const obj = {};
|
|
1187
|
-
if (message.seconds !== 0) {
|
|
1188
|
-
obj.seconds = Math.round(message.seconds);
|
|
1189
|
-
}
|
|
1190
|
-
if (message.nanos !== 0) {
|
|
1191
|
-
obj.nanos = Math.round(message.nanos);
|
|
1192
|
-
}
|
|
1193
|
-
return obj;
|
|
1194
|
-
}
|
|
1195
|
-
};
|
|
1196
|
-
function isSet(value) {
|
|
1197
|
-
return value !== null && value !== void 0;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
// src/types/pb/a2a.ts
|
|
1177
|
+
// src/types/pb/a2a_types.ts
|
|
1201
1178
|
function taskStateFromJSON(object) {
|
|
1202
1179
|
switch (object) {
|
|
1203
1180
|
case 0:
|
|
@@ -1294,9 +1271,9 @@ var SendMessageConfiguration = {
|
|
|
1294
1271
|
acceptedOutputModes: globalThis.Array.isArray(object?.acceptedOutputModes) ? object.acceptedOutputModes.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.accepted_output_modes) ? object.accepted_output_modes.map(
|
|
1295
1272
|
(e) => globalThis.String(e)
|
|
1296
1273
|
) : [],
|
|
1297
|
-
pushNotification:
|
|
1298
|
-
historyLength:
|
|
1299
|
-
blocking:
|
|
1274
|
+
pushNotification: isSet(object.pushNotification) ? PushNotificationConfig.fromJSON(object.pushNotification) : isSet(object.push_notification) ? PushNotificationConfig.fromJSON(object.push_notification) : void 0,
|
|
1275
|
+
historyLength: isSet(object.historyLength) ? globalThis.Number(object.historyLength) : isSet(object.history_length) ? globalThis.Number(object.history_length) : 0,
|
|
1276
|
+
blocking: isSet(object.blocking) ? globalThis.Boolean(object.blocking) : false
|
|
1300
1277
|
};
|
|
1301
1278
|
},
|
|
1302
1279
|
toJSON(message) {
|
|
@@ -1307,10 +1284,10 @@ var SendMessageConfiguration = {
|
|
|
1307
1284
|
if (message.pushNotification !== void 0) {
|
|
1308
1285
|
obj.pushNotification = PushNotificationConfig.toJSON(message.pushNotification);
|
|
1309
1286
|
}
|
|
1310
|
-
if (message.historyLength !==
|
|
1287
|
+
if (message.historyLength !== 0) {
|
|
1311
1288
|
obj.historyLength = Math.round(message.historyLength);
|
|
1312
1289
|
}
|
|
1313
|
-
if (message.blocking !==
|
|
1290
|
+
if (message.blocking !== false) {
|
|
1314
1291
|
obj.blocking = message.blocking;
|
|
1315
1292
|
}
|
|
1316
1293
|
return obj;
|
|
@@ -1319,9 +1296,9 @@ var SendMessageConfiguration = {
|
|
|
1319
1296
|
var Task = {
|
|
1320
1297
|
fromJSON(object) {
|
|
1321
1298
|
return {
|
|
1322
|
-
id:
|
|
1323
|
-
contextId:
|
|
1324
|
-
status:
|
|
1299
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1300
|
+
contextId: isSet(object.contextId) ? globalThis.String(object.contextId) : isSet(object.context_id) ? globalThis.String(object.context_id) : "",
|
|
1301
|
+
status: isSet(object.status) ? TaskStatus.fromJSON(object.status) : void 0,
|
|
1325
1302
|
artifacts: globalThis.Array.isArray(object?.artifacts) ? object.artifacts.map((e) => Artifact.fromJSON(e)) : [],
|
|
1326
1303
|
history: globalThis.Array.isArray(object?.history) ? object.history.map((e) => Message.fromJSON(e)) : [],
|
|
1327
1304
|
metadata: isObject(object.metadata) ? object.metadata : void 0
|
|
@@ -1329,10 +1306,10 @@ var Task = {
|
|
|
1329
1306
|
},
|
|
1330
1307
|
toJSON(message) {
|
|
1331
1308
|
const obj = {};
|
|
1332
|
-
if (message.id !==
|
|
1309
|
+
if (message.id !== "") {
|
|
1333
1310
|
obj.id = message.id;
|
|
1334
1311
|
}
|
|
1335
|
-
if (message.contextId !==
|
|
1312
|
+
if (message.contextId !== "") {
|
|
1336
1313
|
obj.contextId = message.contextId;
|
|
1337
1314
|
}
|
|
1338
1315
|
if (message.status !== void 0) {
|
|
@@ -1353,21 +1330,21 @@ var Task = {
|
|
|
1353
1330
|
var TaskStatus = {
|
|
1354
1331
|
fromJSON(object) {
|
|
1355
1332
|
return {
|
|
1356
|
-
state:
|
|
1357
|
-
update:
|
|
1358
|
-
timestamp:
|
|
1333
|
+
state: isSet(object.state) ? taskStateFromJSON(object.state) : 0,
|
|
1334
|
+
update: isSet(object.message) ? Message.fromJSON(object.message) : isSet(object.update) ? Message.fromJSON(object.update) : void 0,
|
|
1335
|
+
timestamp: isSet(object.timestamp) ? globalThis.String(object.timestamp) : void 0
|
|
1359
1336
|
};
|
|
1360
1337
|
},
|
|
1361
1338
|
toJSON(message) {
|
|
1362
1339
|
const obj = {};
|
|
1363
|
-
if (message.state !==
|
|
1340
|
+
if (message.state !== 0) {
|
|
1364
1341
|
obj.state = taskStateToJSON(message.state);
|
|
1365
1342
|
}
|
|
1366
1343
|
if (message.update !== void 0) {
|
|
1367
1344
|
obj.message = Message.toJSON(message.update);
|
|
1368
1345
|
}
|
|
1369
1346
|
if (message.timestamp !== void 0) {
|
|
1370
|
-
obj.timestamp = message.timestamp
|
|
1347
|
+
obj.timestamp = message.timestamp;
|
|
1371
1348
|
}
|
|
1372
1349
|
return obj;
|
|
1373
1350
|
}
|
|
@@ -1375,7 +1352,7 @@ var TaskStatus = {
|
|
|
1375
1352
|
var Part = {
|
|
1376
1353
|
fromJSON(object) {
|
|
1377
1354
|
return {
|
|
1378
|
-
part:
|
|
1355
|
+
part: isSet(object.text) ? { $case: "text", value: globalThis.String(object.text) } : isSet(object.file) ? { $case: "file", value: FilePart.fromJSON(object.file) } : isSet(object.data) ? { $case: "data", value: DataPart.fromJSON(object.data) } : void 0
|
|
1379
1356
|
};
|
|
1380
1357
|
},
|
|
1381
1358
|
toJSON(message) {
|
|
@@ -1393,8 +1370,8 @@ var Part = {
|
|
|
1393
1370
|
var FilePart = {
|
|
1394
1371
|
fromJSON(object) {
|
|
1395
1372
|
return {
|
|
1396
|
-
file:
|
|
1397
|
-
mimeType:
|
|
1373
|
+
file: isSet(object.fileWithUri) ? { $case: "fileWithUri", value: globalThis.String(object.fileWithUri) } : isSet(object.file_with_uri) ? { $case: "fileWithUri", value: globalThis.String(object.file_with_uri) } : isSet(object.fileWithBytes) ? { $case: "fileWithBytes", value: Buffer.from(bytesFromBase64(object.fileWithBytes)) } : isSet(object.file_with_bytes) ? { $case: "fileWithBytes", value: Buffer.from(bytesFromBase64(object.file_with_bytes)) } : void 0,
|
|
1374
|
+
mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : isSet(object.mime_type) ? globalThis.String(object.mime_type) : ""
|
|
1398
1375
|
};
|
|
1399
1376
|
},
|
|
1400
1377
|
toJSON(message) {
|
|
@@ -1404,7 +1381,7 @@ var FilePart = {
|
|
|
1404
1381
|
} else if (message.file?.$case === "fileWithBytes") {
|
|
1405
1382
|
obj.fileWithBytes = base64FromBytes(message.file.value);
|
|
1406
1383
|
}
|
|
1407
|
-
if (message.mimeType !==
|
|
1384
|
+
if (message.mimeType !== "") {
|
|
1408
1385
|
obj.mimeType = message.mimeType;
|
|
1409
1386
|
}
|
|
1410
1387
|
return obj;
|
|
@@ -1425,10 +1402,10 @@ var DataPart = {
|
|
|
1425
1402
|
var Message = {
|
|
1426
1403
|
fromJSON(object) {
|
|
1427
1404
|
return {
|
|
1428
|
-
messageId:
|
|
1429
|
-
contextId:
|
|
1430
|
-
taskId:
|
|
1431
|
-
role:
|
|
1405
|
+
messageId: isSet(object.messageId) ? globalThis.String(object.messageId) : isSet(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
1406
|
+
contextId: isSet(object.contextId) ? globalThis.String(object.contextId) : isSet(object.context_id) ? globalThis.String(object.context_id) : "",
|
|
1407
|
+
taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : isSet(object.task_id) ? globalThis.String(object.task_id) : "",
|
|
1408
|
+
role: isSet(object.role) ? roleFromJSON(object.role) : 0,
|
|
1432
1409
|
content: globalThis.Array.isArray(object?.content) ? object.content.map((e) => Part.fromJSON(e)) : [],
|
|
1433
1410
|
metadata: isObject(object.metadata) ? object.metadata : void 0,
|
|
1434
1411
|
extensions: globalThis.Array.isArray(object?.extensions) ? object.extensions.map((e) => globalThis.String(e)) : []
|
|
@@ -1436,16 +1413,16 @@ var Message = {
|
|
|
1436
1413
|
},
|
|
1437
1414
|
toJSON(message) {
|
|
1438
1415
|
const obj = {};
|
|
1439
|
-
if (message.messageId !==
|
|
1416
|
+
if (message.messageId !== "") {
|
|
1440
1417
|
obj.messageId = message.messageId;
|
|
1441
1418
|
}
|
|
1442
|
-
if (message.contextId !==
|
|
1419
|
+
if (message.contextId !== "") {
|
|
1443
1420
|
obj.contextId = message.contextId;
|
|
1444
1421
|
}
|
|
1445
|
-
if (message.taskId !==
|
|
1422
|
+
if (message.taskId !== "") {
|
|
1446
1423
|
obj.taskId = message.taskId;
|
|
1447
1424
|
}
|
|
1448
|
-
if (message.role !==
|
|
1425
|
+
if (message.role !== 0) {
|
|
1449
1426
|
obj.role = roleToJSON(message.role);
|
|
1450
1427
|
}
|
|
1451
1428
|
if (message.content?.length) {
|
|
@@ -1463,9 +1440,9 @@ var Message = {
|
|
|
1463
1440
|
var Artifact = {
|
|
1464
1441
|
fromJSON(object) {
|
|
1465
1442
|
return {
|
|
1466
|
-
artifactId:
|
|
1467
|
-
name:
|
|
1468
|
-
description:
|
|
1443
|
+
artifactId: isSet(object.artifactId) ? globalThis.String(object.artifactId) : isSet(object.artifact_id) ? globalThis.String(object.artifact_id) : "",
|
|
1444
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1445
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1469
1446
|
parts: globalThis.Array.isArray(object?.parts) ? object.parts.map((e) => Part.fromJSON(e)) : [],
|
|
1470
1447
|
metadata: isObject(object.metadata) ? object.metadata : void 0,
|
|
1471
1448
|
extensions: globalThis.Array.isArray(object?.extensions) ? object.extensions.map((e) => globalThis.String(e)) : []
|
|
@@ -1473,13 +1450,13 @@ var Artifact = {
|
|
|
1473
1450
|
},
|
|
1474
1451
|
toJSON(message) {
|
|
1475
1452
|
const obj = {};
|
|
1476
|
-
if (message.artifactId !==
|
|
1453
|
+
if (message.artifactId !== "") {
|
|
1477
1454
|
obj.artifactId = message.artifactId;
|
|
1478
1455
|
}
|
|
1479
|
-
if (message.name !==
|
|
1456
|
+
if (message.name !== "") {
|
|
1480
1457
|
obj.name = message.name;
|
|
1481
1458
|
}
|
|
1482
|
-
if (message.description !==
|
|
1459
|
+
if (message.description !== "") {
|
|
1483
1460
|
obj.description = message.description;
|
|
1484
1461
|
}
|
|
1485
1462
|
if (message.parts?.length) {
|
|
@@ -1497,25 +1474,25 @@ var Artifact = {
|
|
|
1497
1474
|
var TaskStatusUpdateEvent = {
|
|
1498
1475
|
fromJSON(object) {
|
|
1499
1476
|
return {
|
|
1500
|
-
taskId:
|
|
1501
|
-
contextId:
|
|
1502
|
-
status:
|
|
1503
|
-
final:
|
|
1477
|
+
taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : isSet(object.task_id) ? globalThis.String(object.task_id) : "",
|
|
1478
|
+
contextId: isSet(object.contextId) ? globalThis.String(object.contextId) : isSet(object.context_id) ? globalThis.String(object.context_id) : "",
|
|
1479
|
+
status: isSet(object.status) ? TaskStatus.fromJSON(object.status) : void 0,
|
|
1480
|
+
final: isSet(object.final) ? globalThis.Boolean(object.final) : false,
|
|
1504
1481
|
metadata: isObject(object.metadata) ? object.metadata : void 0
|
|
1505
1482
|
};
|
|
1506
1483
|
},
|
|
1507
1484
|
toJSON(message) {
|
|
1508
1485
|
const obj = {};
|
|
1509
|
-
if (message.taskId !==
|
|
1486
|
+
if (message.taskId !== "") {
|
|
1510
1487
|
obj.taskId = message.taskId;
|
|
1511
1488
|
}
|
|
1512
|
-
if (message.contextId !==
|
|
1489
|
+
if (message.contextId !== "") {
|
|
1513
1490
|
obj.contextId = message.contextId;
|
|
1514
1491
|
}
|
|
1515
1492
|
if (message.status !== void 0) {
|
|
1516
1493
|
obj.status = TaskStatus.toJSON(message.status);
|
|
1517
1494
|
}
|
|
1518
|
-
if (message.final !==
|
|
1495
|
+
if (message.final !== false) {
|
|
1519
1496
|
obj.final = message.final;
|
|
1520
1497
|
}
|
|
1521
1498
|
if (message.metadata !== void 0) {
|
|
@@ -1527,29 +1504,29 @@ var TaskStatusUpdateEvent = {
|
|
|
1527
1504
|
var TaskArtifactUpdateEvent = {
|
|
1528
1505
|
fromJSON(object) {
|
|
1529
1506
|
return {
|
|
1530
|
-
taskId:
|
|
1531
|
-
contextId:
|
|
1532
|
-
artifact:
|
|
1533
|
-
append:
|
|
1534
|
-
lastChunk:
|
|
1507
|
+
taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : isSet(object.task_id) ? globalThis.String(object.task_id) : "",
|
|
1508
|
+
contextId: isSet(object.contextId) ? globalThis.String(object.contextId) : isSet(object.context_id) ? globalThis.String(object.context_id) : "",
|
|
1509
|
+
artifact: isSet(object.artifact) ? Artifact.fromJSON(object.artifact) : void 0,
|
|
1510
|
+
append: isSet(object.append) ? globalThis.Boolean(object.append) : false,
|
|
1511
|
+
lastChunk: isSet(object.lastChunk) ? globalThis.Boolean(object.lastChunk) : isSet(object.last_chunk) ? globalThis.Boolean(object.last_chunk) : false,
|
|
1535
1512
|
metadata: isObject(object.metadata) ? object.metadata : void 0
|
|
1536
1513
|
};
|
|
1537
1514
|
},
|
|
1538
1515
|
toJSON(message) {
|
|
1539
1516
|
const obj = {};
|
|
1540
|
-
if (message.taskId !==
|
|
1517
|
+
if (message.taskId !== "") {
|
|
1541
1518
|
obj.taskId = message.taskId;
|
|
1542
1519
|
}
|
|
1543
|
-
if (message.contextId !==
|
|
1520
|
+
if (message.contextId !== "") {
|
|
1544
1521
|
obj.contextId = message.contextId;
|
|
1545
1522
|
}
|
|
1546
1523
|
if (message.artifact !== void 0) {
|
|
1547
1524
|
obj.artifact = Artifact.toJSON(message.artifact);
|
|
1548
1525
|
}
|
|
1549
|
-
if (message.append !==
|
|
1526
|
+
if (message.append !== false) {
|
|
1550
1527
|
obj.append = message.append;
|
|
1551
1528
|
}
|
|
1552
|
-
if (message.lastChunk !==
|
|
1529
|
+
if (message.lastChunk !== false) {
|
|
1553
1530
|
obj.lastChunk = message.lastChunk;
|
|
1554
1531
|
}
|
|
1555
1532
|
if (message.metadata !== void 0) {
|
|
@@ -1561,21 +1538,21 @@ var TaskArtifactUpdateEvent = {
|
|
|
1561
1538
|
var PushNotificationConfig = {
|
|
1562
1539
|
fromJSON(object) {
|
|
1563
1540
|
return {
|
|
1564
|
-
id:
|
|
1565
|
-
url:
|
|
1566
|
-
token:
|
|
1567
|
-
authentication:
|
|
1541
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1542
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1543
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
1544
|
+
authentication: isSet(object.authentication) ? AuthenticationInfo.fromJSON(object.authentication) : void 0
|
|
1568
1545
|
};
|
|
1569
1546
|
},
|
|
1570
1547
|
toJSON(message) {
|
|
1571
1548
|
const obj = {};
|
|
1572
|
-
if (message.id !==
|
|
1549
|
+
if (message.id !== "") {
|
|
1573
1550
|
obj.id = message.id;
|
|
1574
1551
|
}
|
|
1575
|
-
if (message.url !==
|
|
1552
|
+
if (message.url !== "") {
|
|
1576
1553
|
obj.url = message.url;
|
|
1577
1554
|
}
|
|
1578
|
-
if (message.token !==
|
|
1555
|
+
if (message.token !== "") {
|
|
1579
1556
|
obj.token = message.token;
|
|
1580
1557
|
}
|
|
1581
1558
|
if (message.authentication !== void 0) {
|
|
@@ -1588,7 +1565,7 @@ var AuthenticationInfo = {
|
|
|
1588
1565
|
fromJSON(object) {
|
|
1589
1566
|
return {
|
|
1590
1567
|
schemes: globalThis.Array.isArray(object?.schemes) ? object.schemes.map((e) => globalThis.String(e)) : [],
|
|
1591
|
-
credentials:
|
|
1568
|
+
credentials: isSet(object.credentials) ? globalThis.String(object.credentials) : ""
|
|
1592
1569
|
};
|
|
1593
1570
|
},
|
|
1594
1571
|
toJSON(message) {
|
|
@@ -1596,7 +1573,7 @@ var AuthenticationInfo = {
|
|
|
1596
1573
|
if (message.schemes?.length) {
|
|
1597
1574
|
obj.schemes = message.schemes;
|
|
1598
1575
|
}
|
|
1599
|
-
if (message.credentials !==
|
|
1576
|
+
if (message.credentials !== "") {
|
|
1600
1577
|
obj.credentials = message.credentials;
|
|
1601
1578
|
}
|
|
1602
1579
|
return obj;
|
|
@@ -1605,16 +1582,16 @@ var AuthenticationInfo = {
|
|
|
1605
1582
|
var AgentInterface = {
|
|
1606
1583
|
fromJSON(object) {
|
|
1607
1584
|
return {
|
|
1608
|
-
url:
|
|
1609
|
-
transport:
|
|
1585
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1586
|
+
transport: isSet(object.transport) ? globalThis.String(object.transport) : ""
|
|
1610
1587
|
};
|
|
1611
1588
|
},
|
|
1612
1589
|
toJSON(message) {
|
|
1613
1590
|
const obj = {};
|
|
1614
|
-
if (message.url !==
|
|
1591
|
+
if (message.url !== "") {
|
|
1615
1592
|
obj.url = message.url;
|
|
1616
1593
|
}
|
|
1617
|
-
if (message.transport !==
|
|
1594
|
+
if (message.transport !== "") {
|
|
1618
1595
|
obj.transport = message.transport;
|
|
1619
1596
|
}
|
|
1620
1597
|
return obj;
|
|
@@ -1623,16 +1600,16 @@ var AgentInterface = {
|
|
|
1623
1600
|
var AgentCard = {
|
|
1624
1601
|
fromJSON(object) {
|
|
1625
1602
|
return {
|
|
1626
|
-
protocolVersion:
|
|
1627
|
-
name:
|
|
1628
|
-
description:
|
|
1629
|
-
url:
|
|
1630
|
-
preferredTransport:
|
|
1603
|
+
protocolVersion: isSet(object.protocolVersion) ? globalThis.String(object.protocolVersion) : isSet(object.protocol_version) ? globalThis.String(object.protocol_version) : "",
|
|
1604
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1605
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1606
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1607
|
+
preferredTransport: isSet(object.preferredTransport) ? globalThis.String(object.preferredTransport) : isSet(object.preferred_transport) ? globalThis.String(object.preferred_transport) : "",
|
|
1631
1608
|
additionalInterfaces: globalThis.Array.isArray(object?.additionalInterfaces) ? object.additionalInterfaces.map((e) => AgentInterface.fromJSON(e)) : globalThis.Array.isArray(object?.additional_interfaces) ? object.additional_interfaces.map((e) => AgentInterface.fromJSON(e)) : [],
|
|
1632
|
-
provider:
|
|
1633
|
-
version:
|
|
1634
|
-
documentationUrl:
|
|
1635
|
-
capabilities:
|
|
1609
|
+
provider: isSet(object.provider) ? AgentProvider.fromJSON(object.provider) : void 0,
|
|
1610
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
1611
|
+
documentationUrl: isSet(object.documentationUrl) ? globalThis.String(object.documentationUrl) : isSet(object.documentation_url) ? globalThis.String(object.documentation_url) : "",
|
|
1612
|
+
capabilities: isSet(object.capabilities) ? AgentCapabilities.fromJSON(object.capabilities) : void 0,
|
|
1636
1613
|
securitySchemes: isObject(object.securitySchemes) ? globalThis.Object.entries(object.securitySchemes).reduce(
|
|
1637
1614
|
(acc, [key, value]) => {
|
|
1638
1615
|
acc[key] = SecurityScheme.fromJSON(value);
|
|
@@ -1650,25 +1627,25 @@ var AgentCard = {
|
|
|
1650
1627
|
defaultInputModes: globalThis.Array.isArray(object?.defaultInputModes) ? object.defaultInputModes.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.default_input_modes) ? object.default_input_modes.map((e) => globalThis.String(e)) : [],
|
|
1651
1628
|
defaultOutputModes: globalThis.Array.isArray(object?.defaultOutputModes) ? object.defaultOutputModes.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.default_output_modes) ? object.default_output_modes.map((e) => globalThis.String(e)) : [],
|
|
1652
1629
|
skills: globalThis.Array.isArray(object?.skills) ? object.skills.map((e) => AgentSkill.fromJSON(e)) : [],
|
|
1653
|
-
supportsAuthenticatedExtendedCard:
|
|
1630
|
+
supportsAuthenticatedExtendedCard: isSet(object.supportsAuthenticatedExtendedCard) ? globalThis.Boolean(object.supportsAuthenticatedExtendedCard) : isSet(object.supports_authenticated_extended_card) ? globalThis.Boolean(object.supports_authenticated_extended_card) : false,
|
|
1654
1631
|
signatures: globalThis.Array.isArray(object?.signatures) ? object.signatures.map((e) => AgentCardSignature.fromJSON(e)) : []
|
|
1655
1632
|
};
|
|
1656
1633
|
},
|
|
1657
1634
|
toJSON(message) {
|
|
1658
1635
|
const obj = {};
|
|
1659
|
-
if (message.protocolVersion !==
|
|
1636
|
+
if (message.protocolVersion !== "") {
|
|
1660
1637
|
obj.protocolVersion = message.protocolVersion;
|
|
1661
1638
|
}
|
|
1662
|
-
if (message.name !==
|
|
1639
|
+
if (message.name !== "") {
|
|
1663
1640
|
obj.name = message.name;
|
|
1664
1641
|
}
|
|
1665
|
-
if (message.description !==
|
|
1642
|
+
if (message.description !== "") {
|
|
1666
1643
|
obj.description = message.description;
|
|
1667
1644
|
}
|
|
1668
|
-
if (message.url !==
|
|
1645
|
+
if (message.url !== "") {
|
|
1669
1646
|
obj.url = message.url;
|
|
1670
1647
|
}
|
|
1671
|
-
if (message.preferredTransport !==
|
|
1648
|
+
if (message.preferredTransport !== "") {
|
|
1672
1649
|
obj.preferredTransport = message.preferredTransport;
|
|
1673
1650
|
}
|
|
1674
1651
|
if (message.additionalInterfaces?.length) {
|
|
@@ -1677,10 +1654,10 @@ var AgentCard = {
|
|
|
1677
1654
|
if (message.provider !== void 0) {
|
|
1678
1655
|
obj.provider = AgentProvider.toJSON(message.provider);
|
|
1679
1656
|
}
|
|
1680
|
-
if (message.version !==
|
|
1657
|
+
if (message.version !== "") {
|
|
1681
1658
|
obj.version = message.version;
|
|
1682
1659
|
}
|
|
1683
|
-
if (message.documentationUrl !==
|
|
1660
|
+
if (message.documentationUrl !== "") {
|
|
1684
1661
|
obj.documentationUrl = message.documentationUrl;
|
|
1685
1662
|
}
|
|
1686
1663
|
if (message.capabilities !== void 0) {
|
|
@@ -1707,7 +1684,7 @@ var AgentCard = {
|
|
|
1707
1684
|
if (message.skills?.length) {
|
|
1708
1685
|
obj.skills = message.skills.map((e) => AgentSkill.toJSON(e));
|
|
1709
1686
|
}
|
|
1710
|
-
if (message.supportsAuthenticatedExtendedCard !==
|
|
1687
|
+
if (message.supportsAuthenticatedExtendedCard !== false) {
|
|
1711
1688
|
obj.supportsAuthenticatedExtendedCard = message.supportsAuthenticatedExtendedCard;
|
|
1712
1689
|
}
|
|
1713
1690
|
if (message.signatures?.length) {
|
|
@@ -1719,16 +1696,16 @@ var AgentCard = {
|
|
|
1719
1696
|
var AgentProvider = {
|
|
1720
1697
|
fromJSON(object) {
|
|
1721
1698
|
return {
|
|
1722
|
-
url:
|
|
1723
|
-
organization:
|
|
1699
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1700
|
+
organization: isSet(object.organization) ? globalThis.String(object.organization) : ""
|
|
1724
1701
|
};
|
|
1725
1702
|
},
|
|
1726
1703
|
toJSON(message) {
|
|
1727
1704
|
const obj = {};
|
|
1728
|
-
if (message.url !==
|
|
1705
|
+
if (message.url !== "") {
|
|
1729
1706
|
obj.url = message.url;
|
|
1730
1707
|
}
|
|
1731
|
-
if (message.organization !==
|
|
1708
|
+
if (message.organization !== "") {
|
|
1732
1709
|
obj.organization = message.organization;
|
|
1733
1710
|
}
|
|
1734
1711
|
return obj;
|
|
@@ -1737,17 +1714,17 @@ var AgentProvider = {
|
|
|
1737
1714
|
var AgentCapabilities = {
|
|
1738
1715
|
fromJSON(object) {
|
|
1739
1716
|
return {
|
|
1740
|
-
streaming:
|
|
1741
|
-
pushNotifications:
|
|
1717
|
+
streaming: isSet(object.streaming) ? globalThis.Boolean(object.streaming) : false,
|
|
1718
|
+
pushNotifications: isSet(object.pushNotifications) ? globalThis.Boolean(object.pushNotifications) : isSet(object.push_notifications) ? globalThis.Boolean(object.push_notifications) : false,
|
|
1742
1719
|
extensions: globalThis.Array.isArray(object?.extensions) ? object.extensions.map((e) => AgentExtension.fromJSON(e)) : []
|
|
1743
1720
|
};
|
|
1744
1721
|
},
|
|
1745
1722
|
toJSON(message) {
|
|
1746
1723
|
const obj = {};
|
|
1747
|
-
if (message.streaming !==
|
|
1724
|
+
if (message.streaming !== false) {
|
|
1748
1725
|
obj.streaming = message.streaming;
|
|
1749
1726
|
}
|
|
1750
|
-
if (message.pushNotifications !==
|
|
1727
|
+
if (message.pushNotifications !== false) {
|
|
1751
1728
|
obj.pushNotifications = message.pushNotifications;
|
|
1752
1729
|
}
|
|
1753
1730
|
if (message.extensions?.length) {
|
|
@@ -1759,21 +1736,21 @@ var AgentCapabilities = {
|
|
|
1759
1736
|
var AgentExtension = {
|
|
1760
1737
|
fromJSON(object) {
|
|
1761
1738
|
return {
|
|
1762
|
-
uri:
|
|
1763
|
-
description:
|
|
1764
|
-
required:
|
|
1739
|
+
uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
|
|
1740
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1741
|
+
required: isSet(object.required) ? globalThis.Boolean(object.required) : false,
|
|
1765
1742
|
params: isObject(object.params) ? object.params : void 0
|
|
1766
1743
|
};
|
|
1767
1744
|
},
|
|
1768
1745
|
toJSON(message) {
|
|
1769
1746
|
const obj = {};
|
|
1770
|
-
if (message.uri !==
|
|
1747
|
+
if (message.uri !== "") {
|
|
1771
1748
|
obj.uri = message.uri;
|
|
1772
1749
|
}
|
|
1773
|
-
if (message.description !==
|
|
1750
|
+
if (message.description !== "") {
|
|
1774
1751
|
obj.description = message.description;
|
|
1775
1752
|
}
|
|
1776
|
-
if (message.required !==
|
|
1753
|
+
if (message.required !== false) {
|
|
1777
1754
|
obj.required = message.required;
|
|
1778
1755
|
}
|
|
1779
1756
|
if (message.params !== void 0) {
|
|
@@ -1785,9 +1762,9 @@ var AgentExtension = {
|
|
|
1785
1762
|
var AgentSkill = {
|
|
1786
1763
|
fromJSON(object) {
|
|
1787
1764
|
return {
|
|
1788
|
-
id:
|
|
1789
|
-
name:
|
|
1790
|
-
description:
|
|
1765
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1766
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1767
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1791
1768
|
tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => globalThis.String(e)) : [],
|
|
1792
1769
|
examples: globalThis.Array.isArray(object?.examples) ? object.examples.map((e) => globalThis.String(e)) : [],
|
|
1793
1770
|
inputModes: globalThis.Array.isArray(object?.inputModes) ? object.inputModes.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.input_modes) ? object.input_modes.map((e) => globalThis.String(e)) : [],
|
|
@@ -1797,13 +1774,13 @@ var AgentSkill = {
|
|
|
1797
1774
|
},
|
|
1798
1775
|
toJSON(message) {
|
|
1799
1776
|
const obj = {};
|
|
1800
|
-
if (message.id !==
|
|
1777
|
+
if (message.id !== "") {
|
|
1801
1778
|
obj.id = message.id;
|
|
1802
1779
|
}
|
|
1803
|
-
if (message.name !==
|
|
1780
|
+
if (message.name !== "") {
|
|
1804
1781
|
obj.name = message.name;
|
|
1805
1782
|
}
|
|
1806
|
-
if (message.description !==
|
|
1783
|
+
if (message.description !== "") {
|
|
1807
1784
|
obj.description = message.description;
|
|
1808
1785
|
}
|
|
1809
1786
|
if (message.tags?.length) {
|
|
@@ -1827,17 +1804,17 @@ var AgentSkill = {
|
|
|
1827
1804
|
var AgentCardSignature = {
|
|
1828
1805
|
fromJSON(object) {
|
|
1829
1806
|
return {
|
|
1830
|
-
protected:
|
|
1831
|
-
signature:
|
|
1807
|
+
protected: isSet(object.protected) ? globalThis.String(object.protected) : "",
|
|
1808
|
+
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
1832
1809
|
header: isObject(object.header) ? object.header : void 0
|
|
1833
1810
|
};
|
|
1834
1811
|
},
|
|
1835
1812
|
toJSON(message) {
|
|
1836
1813
|
const obj = {};
|
|
1837
|
-
if (message.protected !==
|
|
1814
|
+
if (message.protected !== "") {
|
|
1838
1815
|
obj.protected = message.protected;
|
|
1839
1816
|
}
|
|
1840
|
-
if (message.signature !==
|
|
1817
|
+
if (message.signature !== "") {
|
|
1841
1818
|
obj.signature = message.signature;
|
|
1842
1819
|
}
|
|
1843
1820
|
if (message.header !== void 0) {
|
|
@@ -1849,13 +1826,13 @@ var AgentCardSignature = {
|
|
|
1849
1826
|
var TaskPushNotificationConfig = {
|
|
1850
1827
|
fromJSON(object) {
|
|
1851
1828
|
return {
|
|
1852
|
-
name:
|
|
1853
|
-
pushNotificationConfig:
|
|
1829
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1830
|
+
pushNotificationConfig: isSet(object.pushNotificationConfig) ? PushNotificationConfig.fromJSON(object.pushNotificationConfig) : isSet(object.push_notification_config) ? PushNotificationConfig.fromJSON(object.push_notification_config) : void 0
|
|
1854
1831
|
};
|
|
1855
1832
|
},
|
|
1856
1833
|
toJSON(message) {
|
|
1857
1834
|
const obj = {};
|
|
1858
|
-
if (message.name !==
|
|
1835
|
+
if (message.name !== "") {
|
|
1859
1836
|
obj.name = message.name;
|
|
1860
1837
|
}
|
|
1861
1838
|
if (message.pushNotificationConfig !== void 0) {
|
|
@@ -1905,13 +1882,13 @@ var Security = {
|
|
|
1905
1882
|
var SecurityScheme = {
|
|
1906
1883
|
fromJSON(object) {
|
|
1907
1884
|
return {
|
|
1908
|
-
scheme:
|
|
1885
|
+
scheme: isSet(object.apiKeySecurityScheme) ? { $case: "apiKeySecurityScheme", value: APIKeySecurityScheme.fromJSON(object.apiKeySecurityScheme) } : isSet(object.api_key_security_scheme) ? { $case: "apiKeySecurityScheme", value: APIKeySecurityScheme.fromJSON(object.api_key_security_scheme) } : isSet(object.httpAuthSecurityScheme) ? { $case: "httpAuthSecurityScheme", value: HTTPAuthSecurityScheme.fromJSON(object.httpAuthSecurityScheme) } : isSet(object.http_auth_security_scheme) ? { $case: "httpAuthSecurityScheme", value: HTTPAuthSecurityScheme.fromJSON(object.http_auth_security_scheme) } : isSet(object.oauth2SecurityScheme) ? { $case: "oauth2SecurityScheme", value: OAuth2SecurityScheme.fromJSON(object.oauth2SecurityScheme) } : isSet(object.oauth2_security_scheme) ? { $case: "oauth2SecurityScheme", value: OAuth2SecurityScheme.fromJSON(object.oauth2_security_scheme) } : isSet(object.openIdConnectSecurityScheme) ? {
|
|
1909
1886
|
$case: "openIdConnectSecurityScheme",
|
|
1910
1887
|
value: OpenIdConnectSecurityScheme.fromJSON(object.openIdConnectSecurityScheme)
|
|
1911
|
-
} :
|
|
1888
|
+
} : isSet(object.open_id_connect_security_scheme) ? {
|
|
1912
1889
|
$case: "openIdConnectSecurityScheme",
|
|
1913
1890
|
value: OpenIdConnectSecurityScheme.fromJSON(object.open_id_connect_security_scheme)
|
|
1914
|
-
} :
|
|
1891
|
+
} : isSet(object.mtlsSecurityScheme) ? { $case: "mtlsSecurityScheme", value: MutualTlsSecurityScheme.fromJSON(object.mtlsSecurityScheme) } : isSet(object.mtls_security_scheme) ? { $case: "mtlsSecurityScheme", value: MutualTlsSecurityScheme.fromJSON(object.mtls_security_scheme) } : void 0
|
|
1915
1892
|
};
|
|
1916
1893
|
},
|
|
1917
1894
|
toJSON(message) {
|
|
@@ -1933,20 +1910,20 @@ var SecurityScheme = {
|
|
|
1933
1910
|
var APIKeySecurityScheme = {
|
|
1934
1911
|
fromJSON(object) {
|
|
1935
1912
|
return {
|
|
1936
|
-
description:
|
|
1937
|
-
location:
|
|
1938
|
-
name:
|
|
1913
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1914
|
+
location: isSet(object.location) ? globalThis.String(object.location) : "",
|
|
1915
|
+
name: isSet(object.name) ? globalThis.String(object.name) : ""
|
|
1939
1916
|
};
|
|
1940
1917
|
},
|
|
1941
1918
|
toJSON(message) {
|
|
1942
1919
|
const obj = {};
|
|
1943
|
-
if (message.description !==
|
|
1920
|
+
if (message.description !== "") {
|
|
1944
1921
|
obj.description = message.description;
|
|
1945
1922
|
}
|
|
1946
|
-
if (message.location !==
|
|
1923
|
+
if (message.location !== "") {
|
|
1947
1924
|
obj.location = message.location;
|
|
1948
1925
|
}
|
|
1949
|
-
if (message.name !==
|
|
1926
|
+
if (message.name !== "") {
|
|
1950
1927
|
obj.name = message.name;
|
|
1951
1928
|
}
|
|
1952
1929
|
return obj;
|
|
@@ -1955,20 +1932,20 @@ var APIKeySecurityScheme = {
|
|
|
1955
1932
|
var HTTPAuthSecurityScheme = {
|
|
1956
1933
|
fromJSON(object) {
|
|
1957
1934
|
return {
|
|
1958
|
-
description:
|
|
1959
|
-
scheme:
|
|
1960
|
-
bearerFormat:
|
|
1935
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1936
|
+
scheme: isSet(object.scheme) ? globalThis.String(object.scheme) : "",
|
|
1937
|
+
bearerFormat: isSet(object.bearerFormat) ? globalThis.String(object.bearerFormat) : isSet(object.bearer_format) ? globalThis.String(object.bearer_format) : ""
|
|
1961
1938
|
};
|
|
1962
1939
|
},
|
|
1963
1940
|
toJSON(message) {
|
|
1964
1941
|
const obj = {};
|
|
1965
|
-
if (message.description !==
|
|
1942
|
+
if (message.description !== "") {
|
|
1966
1943
|
obj.description = message.description;
|
|
1967
1944
|
}
|
|
1968
|
-
if (message.scheme !==
|
|
1945
|
+
if (message.scheme !== "") {
|
|
1969
1946
|
obj.scheme = message.scheme;
|
|
1970
1947
|
}
|
|
1971
|
-
if (message.bearerFormat !==
|
|
1948
|
+
if (message.bearerFormat !== "") {
|
|
1972
1949
|
obj.bearerFormat = message.bearerFormat;
|
|
1973
1950
|
}
|
|
1974
1951
|
return obj;
|
|
@@ -1977,20 +1954,20 @@ var HTTPAuthSecurityScheme = {
|
|
|
1977
1954
|
var OAuth2SecurityScheme = {
|
|
1978
1955
|
fromJSON(object) {
|
|
1979
1956
|
return {
|
|
1980
|
-
description:
|
|
1981
|
-
flows:
|
|
1982
|
-
oauth2MetadataUrl:
|
|
1957
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1958
|
+
flows: isSet(object.flows) ? OAuthFlows.fromJSON(object.flows) : void 0,
|
|
1959
|
+
oauth2MetadataUrl: isSet(object.oauth2MetadataUrl) ? globalThis.String(object.oauth2MetadataUrl) : isSet(object.oauth2_metadata_url) ? globalThis.String(object.oauth2_metadata_url) : ""
|
|
1983
1960
|
};
|
|
1984
1961
|
},
|
|
1985
1962
|
toJSON(message) {
|
|
1986
1963
|
const obj = {};
|
|
1987
|
-
if (message.description !==
|
|
1964
|
+
if (message.description !== "") {
|
|
1988
1965
|
obj.description = message.description;
|
|
1989
1966
|
}
|
|
1990
1967
|
if (message.flows !== void 0) {
|
|
1991
1968
|
obj.flows = OAuthFlows.toJSON(message.flows);
|
|
1992
1969
|
}
|
|
1993
|
-
if (message.oauth2MetadataUrl !==
|
|
1970
|
+
if (message.oauth2MetadataUrl !== "") {
|
|
1994
1971
|
obj.oauth2MetadataUrl = message.oauth2MetadataUrl;
|
|
1995
1972
|
}
|
|
1996
1973
|
return obj;
|
|
@@ -1999,16 +1976,16 @@ var OAuth2SecurityScheme = {
|
|
|
1999
1976
|
var OpenIdConnectSecurityScheme = {
|
|
2000
1977
|
fromJSON(object) {
|
|
2001
1978
|
return {
|
|
2002
|
-
description:
|
|
2003
|
-
openIdConnectUrl:
|
|
1979
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1980
|
+
openIdConnectUrl: isSet(object.openIdConnectUrl) ? globalThis.String(object.openIdConnectUrl) : isSet(object.open_id_connect_url) ? globalThis.String(object.open_id_connect_url) : ""
|
|
2004
1981
|
};
|
|
2005
1982
|
},
|
|
2006
1983
|
toJSON(message) {
|
|
2007
1984
|
const obj = {};
|
|
2008
|
-
if (message.description !==
|
|
1985
|
+
if (message.description !== "") {
|
|
2009
1986
|
obj.description = message.description;
|
|
2010
1987
|
}
|
|
2011
|
-
if (message.openIdConnectUrl !==
|
|
1988
|
+
if (message.openIdConnectUrl !== "") {
|
|
2012
1989
|
obj.openIdConnectUrl = message.openIdConnectUrl;
|
|
2013
1990
|
}
|
|
2014
1991
|
return obj;
|
|
@@ -2016,11 +1993,11 @@ var OpenIdConnectSecurityScheme = {
|
|
|
2016
1993
|
};
|
|
2017
1994
|
var MutualTlsSecurityScheme = {
|
|
2018
1995
|
fromJSON(object) {
|
|
2019
|
-
return { description:
|
|
1996
|
+
return { description: isSet(object.description) ? globalThis.String(object.description) : "" };
|
|
2020
1997
|
},
|
|
2021
1998
|
toJSON(message) {
|
|
2022
1999
|
const obj = {};
|
|
2023
|
-
if (message.description !==
|
|
2000
|
+
if (message.description !== "") {
|
|
2024
2001
|
obj.description = message.description;
|
|
2025
2002
|
}
|
|
2026
2003
|
return obj;
|
|
@@ -2029,7 +2006,7 @@ var MutualTlsSecurityScheme = {
|
|
|
2029
2006
|
var OAuthFlows = {
|
|
2030
2007
|
fromJSON(object) {
|
|
2031
2008
|
return {
|
|
2032
|
-
flow:
|
|
2009
|
+
flow: isSet(object.authorizationCode) ? { $case: "authorizationCode", value: AuthorizationCodeOAuthFlow.fromJSON(object.authorizationCode) } : isSet(object.authorization_code) ? { $case: "authorizationCode", value: AuthorizationCodeOAuthFlow.fromJSON(object.authorization_code) } : isSet(object.clientCredentials) ? { $case: "clientCredentials", value: ClientCredentialsOAuthFlow.fromJSON(object.clientCredentials) } : isSet(object.client_credentials) ? { $case: "clientCredentials", value: ClientCredentialsOAuthFlow.fromJSON(object.client_credentials) } : isSet(object.implicit) ? { $case: "implicit", value: ImplicitOAuthFlow.fromJSON(object.implicit) } : isSet(object.password) ? { $case: "password", value: PasswordOAuthFlow.fromJSON(object.password) } : void 0
|
|
2033
2010
|
};
|
|
2034
2011
|
},
|
|
2035
2012
|
toJSON(message) {
|
|
@@ -2049,9 +2026,9 @@ var OAuthFlows = {
|
|
|
2049
2026
|
var AuthorizationCodeOAuthFlow = {
|
|
2050
2027
|
fromJSON(object) {
|
|
2051
2028
|
return {
|
|
2052
|
-
authorizationUrl:
|
|
2053
|
-
tokenUrl:
|
|
2054
|
-
refreshUrl:
|
|
2029
|
+
authorizationUrl: isSet(object.authorizationUrl) ? globalThis.String(object.authorizationUrl) : isSet(object.authorization_url) ? globalThis.String(object.authorization_url) : "",
|
|
2030
|
+
tokenUrl: isSet(object.tokenUrl) ? globalThis.String(object.tokenUrl) : isSet(object.token_url) ? globalThis.String(object.token_url) : "",
|
|
2031
|
+
refreshUrl: isSet(object.refreshUrl) ? globalThis.String(object.refreshUrl) : isSet(object.refresh_url) ? globalThis.String(object.refresh_url) : "",
|
|
2055
2032
|
scopes: isObject(object.scopes) ? globalThis.Object.entries(object.scopes).reduce(
|
|
2056
2033
|
(acc, [key, value]) => {
|
|
2057
2034
|
acc[key] = globalThis.String(value);
|
|
@@ -2063,13 +2040,13 @@ var AuthorizationCodeOAuthFlow = {
|
|
|
2063
2040
|
},
|
|
2064
2041
|
toJSON(message) {
|
|
2065
2042
|
const obj = {};
|
|
2066
|
-
if (message.authorizationUrl !==
|
|
2043
|
+
if (message.authorizationUrl !== "") {
|
|
2067
2044
|
obj.authorizationUrl = message.authorizationUrl;
|
|
2068
2045
|
}
|
|
2069
|
-
if (message.tokenUrl !==
|
|
2046
|
+
if (message.tokenUrl !== "") {
|
|
2070
2047
|
obj.tokenUrl = message.tokenUrl;
|
|
2071
2048
|
}
|
|
2072
|
-
if (message.refreshUrl !==
|
|
2049
|
+
if (message.refreshUrl !== "") {
|
|
2073
2050
|
obj.refreshUrl = message.refreshUrl;
|
|
2074
2051
|
}
|
|
2075
2052
|
if (message.scopes) {
|
|
@@ -2087,8 +2064,8 @@ var AuthorizationCodeOAuthFlow = {
|
|
|
2087
2064
|
var ClientCredentialsOAuthFlow = {
|
|
2088
2065
|
fromJSON(object) {
|
|
2089
2066
|
return {
|
|
2090
|
-
tokenUrl:
|
|
2091
|
-
refreshUrl:
|
|
2067
|
+
tokenUrl: isSet(object.tokenUrl) ? globalThis.String(object.tokenUrl) : isSet(object.token_url) ? globalThis.String(object.token_url) : "",
|
|
2068
|
+
refreshUrl: isSet(object.refreshUrl) ? globalThis.String(object.refreshUrl) : isSet(object.refresh_url) ? globalThis.String(object.refresh_url) : "",
|
|
2092
2069
|
scopes: isObject(object.scopes) ? globalThis.Object.entries(object.scopes).reduce(
|
|
2093
2070
|
(acc, [key, value]) => {
|
|
2094
2071
|
acc[key] = globalThis.String(value);
|
|
@@ -2100,10 +2077,10 @@ var ClientCredentialsOAuthFlow = {
|
|
|
2100
2077
|
},
|
|
2101
2078
|
toJSON(message) {
|
|
2102
2079
|
const obj = {};
|
|
2103
|
-
if (message.tokenUrl !==
|
|
2080
|
+
if (message.tokenUrl !== "") {
|
|
2104
2081
|
obj.tokenUrl = message.tokenUrl;
|
|
2105
2082
|
}
|
|
2106
|
-
if (message.refreshUrl !==
|
|
2083
|
+
if (message.refreshUrl !== "") {
|
|
2107
2084
|
obj.refreshUrl = message.refreshUrl;
|
|
2108
2085
|
}
|
|
2109
2086
|
if (message.scopes) {
|
|
@@ -2121,8 +2098,8 @@ var ClientCredentialsOAuthFlow = {
|
|
|
2121
2098
|
var ImplicitOAuthFlow = {
|
|
2122
2099
|
fromJSON(object) {
|
|
2123
2100
|
return {
|
|
2124
|
-
authorizationUrl:
|
|
2125
|
-
refreshUrl:
|
|
2101
|
+
authorizationUrl: isSet(object.authorizationUrl) ? globalThis.String(object.authorizationUrl) : isSet(object.authorization_url) ? globalThis.String(object.authorization_url) : "",
|
|
2102
|
+
refreshUrl: isSet(object.refreshUrl) ? globalThis.String(object.refreshUrl) : isSet(object.refresh_url) ? globalThis.String(object.refresh_url) : "",
|
|
2126
2103
|
scopes: isObject(object.scopes) ? globalThis.Object.entries(object.scopes).reduce(
|
|
2127
2104
|
(acc, [key, value]) => {
|
|
2128
2105
|
acc[key] = globalThis.String(value);
|
|
@@ -2134,10 +2111,10 @@ var ImplicitOAuthFlow = {
|
|
|
2134
2111
|
},
|
|
2135
2112
|
toJSON(message) {
|
|
2136
2113
|
const obj = {};
|
|
2137
|
-
if (message.authorizationUrl !==
|
|
2114
|
+
if (message.authorizationUrl !== "") {
|
|
2138
2115
|
obj.authorizationUrl = message.authorizationUrl;
|
|
2139
2116
|
}
|
|
2140
|
-
if (message.refreshUrl !==
|
|
2117
|
+
if (message.refreshUrl !== "") {
|
|
2141
2118
|
obj.refreshUrl = message.refreshUrl;
|
|
2142
2119
|
}
|
|
2143
2120
|
if (message.scopes) {
|
|
@@ -2155,8 +2132,8 @@ var ImplicitOAuthFlow = {
|
|
|
2155
2132
|
var PasswordOAuthFlow = {
|
|
2156
2133
|
fromJSON(object) {
|
|
2157
2134
|
return {
|
|
2158
|
-
tokenUrl:
|
|
2159
|
-
refreshUrl:
|
|
2135
|
+
tokenUrl: isSet(object.tokenUrl) ? globalThis.String(object.tokenUrl) : isSet(object.token_url) ? globalThis.String(object.token_url) : "",
|
|
2136
|
+
refreshUrl: isSet(object.refreshUrl) ? globalThis.String(object.refreshUrl) : isSet(object.refresh_url) ? globalThis.String(object.refresh_url) : "",
|
|
2160
2137
|
scopes: isObject(object.scopes) ? globalThis.Object.entries(object.scopes).reduce(
|
|
2161
2138
|
(acc, [key, value]) => {
|
|
2162
2139
|
acc[key] = globalThis.String(value);
|
|
@@ -2168,10 +2145,10 @@ var PasswordOAuthFlow = {
|
|
|
2168
2145
|
},
|
|
2169
2146
|
toJSON(message) {
|
|
2170
2147
|
const obj = {};
|
|
2171
|
-
if (message.tokenUrl !==
|
|
2148
|
+
if (message.tokenUrl !== "") {
|
|
2172
2149
|
obj.tokenUrl = message.tokenUrl;
|
|
2173
2150
|
}
|
|
2174
|
-
if (message.refreshUrl !==
|
|
2151
|
+
if (message.refreshUrl !== "") {
|
|
2175
2152
|
obj.refreshUrl = message.refreshUrl;
|
|
2176
2153
|
}
|
|
2177
2154
|
if (message.scopes) {
|
|
@@ -2189,8 +2166,8 @@ var PasswordOAuthFlow = {
|
|
|
2189
2166
|
var SendMessageRequest = {
|
|
2190
2167
|
fromJSON(object) {
|
|
2191
2168
|
return {
|
|
2192
|
-
request:
|
|
2193
|
-
configuration:
|
|
2169
|
+
request: isSet(object.message) ? Message.fromJSON(object.message) : isSet(object.request) ? Message.fromJSON(object.request) : void 0,
|
|
2170
|
+
configuration: isSet(object.configuration) ? SendMessageConfiguration.fromJSON(object.configuration) : void 0,
|
|
2194
2171
|
metadata: isObject(object.metadata) ? object.metadata : void 0
|
|
2195
2172
|
};
|
|
2196
2173
|
},
|
|
@@ -2211,7 +2188,7 @@ var SendMessageRequest = {
|
|
|
2211
2188
|
var SendMessageResponse = {
|
|
2212
2189
|
fromJSON(object) {
|
|
2213
2190
|
return {
|
|
2214
|
-
payload:
|
|
2191
|
+
payload: isSet(object.task) ? { $case: "task", value: Task.fromJSON(object.task) } : isSet(object.message) ? { $case: "msg", value: Message.fromJSON(object.message) } : isSet(object.msg) ? { $case: "msg", value: Message.fromJSON(object.msg) } : void 0
|
|
2215
2192
|
};
|
|
2216
2193
|
},
|
|
2217
2194
|
toJSON(message) {
|
|
@@ -2227,7 +2204,7 @@ var SendMessageResponse = {
|
|
|
2227
2204
|
var StreamResponse = {
|
|
2228
2205
|
fromJSON(object) {
|
|
2229
2206
|
return {
|
|
2230
|
-
payload:
|
|
2207
|
+
payload: isSet(object.task) ? { $case: "task", value: Task.fromJSON(object.task) } : isSet(object.message) ? { $case: "msg", value: Message.fromJSON(object.message) } : isSet(object.msg) ? { $case: "msg", value: Message.fromJSON(object.msg) } : isSet(object.statusUpdate) ? { $case: "statusUpdate", value: TaskStatusUpdateEvent.fromJSON(object.statusUpdate) } : isSet(object.status_update) ? { $case: "statusUpdate", value: TaskStatusUpdateEvent.fromJSON(object.status_update) } : isSet(object.artifactUpdate) ? { $case: "artifactUpdate", value: TaskArtifactUpdateEvent.fromJSON(object.artifactUpdate) } : isSet(object.artifact_update) ? { $case: "artifactUpdate", value: TaskArtifactUpdateEvent.fromJSON(object.artifact_update) } : void 0
|
|
2231
2208
|
};
|
|
2232
2209
|
},
|
|
2233
2210
|
toJSON(message) {
|
|
@@ -2248,7 +2225,7 @@ var ListTaskPushNotificationConfigResponse = {
|
|
|
2248
2225
|
fromJSON(object) {
|
|
2249
2226
|
return {
|
|
2250
2227
|
configs: globalThis.Array.isArray(object?.configs) ? object.configs.map((e) => TaskPushNotificationConfig.fromJSON(e)) : [],
|
|
2251
|
-
nextPageToken:
|
|
2228
|
+
nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : isSet(object.next_page_token) ? globalThis.String(object.next_page_token) : ""
|
|
2252
2229
|
};
|
|
2253
2230
|
},
|
|
2254
2231
|
toJSON(message) {
|
|
@@ -2256,7 +2233,7 @@ var ListTaskPushNotificationConfigResponse = {
|
|
|
2256
2233
|
if (message.configs?.length) {
|
|
2257
2234
|
obj.configs = message.configs.map((e) => TaskPushNotificationConfig.toJSON(e));
|
|
2258
2235
|
}
|
|
2259
|
-
if (message.nextPageToken !==
|
|
2236
|
+
if (message.nextPageToken !== "") {
|
|
2260
2237
|
obj.nextPageToken = message.nextPageToken;
|
|
2261
2238
|
}
|
|
2262
2239
|
return obj;
|
|
@@ -2268,24 +2245,10 @@ function bytesFromBase64(b64) {
|
|
|
2268
2245
|
function base64FromBytes(arr) {
|
|
2269
2246
|
return globalThis.Buffer.from(arr).toString("base64");
|
|
2270
2247
|
}
|
|
2271
|
-
function fromTimestamp(t) {
|
|
2272
|
-
let millis = (t.seconds || 0) * 1e3;
|
|
2273
|
-
millis += (t.nanos || 0) / 1e6;
|
|
2274
|
-
return new globalThis.Date(millis);
|
|
2275
|
-
}
|
|
2276
|
-
function fromJsonTimestamp(o) {
|
|
2277
|
-
if (o instanceof globalThis.Date) {
|
|
2278
|
-
return o;
|
|
2279
|
-
} else if (typeof o === "string") {
|
|
2280
|
-
return new globalThis.Date(o);
|
|
2281
|
-
} else {
|
|
2282
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
2248
|
function isObject(value) {
|
|
2286
2249
|
return typeof value === "object" && value !== null;
|
|
2287
2250
|
}
|
|
2288
|
-
function
|
|
2251
|
+
function isSet(value) {
|
|
2289
2252
|
return value !== null && value !== void 0;
|
|
2290
2253
|
}
|
|
2291
2254
|
|
|
@@ -2321,11 +2284,11 @@ var ToProto = class _ToProto {
|
|
|
2321
2284
|
name: agentCard.name,
|
|
2322
2285
|
description: agentCard.description,
|
|
2323
2286
|
url: agentCard.url,
|
|
2324
|
-
preferredTransport: agentCard.preferredTransport,
|
|
2287
|
+
preferredTransport: agentCard.preferredTransport ?? "",
|
|
2325
2288
|
additionalInterfaces: agentCard.additionalInterfaces?.map((i) => _ToProto.agentInterface(i)) ?? [],
|
|
2326
2289
|
provider: _ToProto.agentProvider(agentCard.provider),
|
|
2327
2290
|
version: agentCard.version,
|
|
2328
|
-
documentationUrl: agentCard.documentationUrl,
|
|
2291
|
+
documentationUrl: agentCard.documentationUrl ?? "",
|
|
2329
2292
|
capabilities: _ToProto.agentCapabilities(agentCard.capabilities),
|
|
2330
2293
|
securitySchemes: agentCard.securitySchemes ? Object.fromEntries(
|
|
2331
2294
|
Object.entries(agentCard.securitySchemes).map(([key, value]) => [
|
|
@@ -2378,7 +2341,7 @@ var ToProto = class _ToProto {
|
|
|
2378
2341
|
value: {
|
|
2379
2342
|
name: scheme.name,
|
|
2380
2343
|
location: scheme.in,
|
|
2381
|
-
description: scheme.description
|
|
2344
|
+
description: scheme.description ?? ""
|
|
2382
2345
|
}
|
|
2383
2346
|
}
|
|
2384
2347
|
};
|
|
@@ -2387,9 +2350,9 @@ var ToProto = class _ToProto {
|
|
|
2387
2350
|
scheme: {
|
|
2388
2351
|
$case: "httpAuthSecurityScheme",
|
|
2389
2352
|
value: {
|
|
2390
|
-
description: scheme.description,
|
|
2353
|
+
description: scheme.description ?? "",
|
|
2391
2354
|
scheme: scheme.scheme,
|
|
2392
|
-
bearerFormat: scheme.bearerFormat
|
|
2355
|
+
bearerFormat: scheme.bearerFormat ?? ""
|
|
2393
2356
|
}
|
|
2394
2357
|
}
|
|
2395
2358
|
};
|
|
@@ -2398,7 +2361,7 @@ var ToProto = class _ToProto {
|
|
|
2398
2361
|
scheme: {
|
|
2399
2362
|
$case: "mtlsSecurityScheme",
|
|
2400
2363
|
value: {
|
|
2401
|
-
description: scheme.description
|
|
2364
|
+
description: scheme.description ?? ""
|
|
2402
2365
|
}
|
|
2403
2366
|
}
|
|
2404
2367
|
};
|
|
@@ -2407,9 +2370,9 @@ var ToProto = class _ToProto {
|
|
|
2407
2370
|
scheme: {
|
|
2408
2371
|
$case: "oauth2SecurityScheme",
|
|
2409
2372
|
value: {
|
|
2410
|
-
description: scheme.description,
|
|
2373
|
+
description: scheme.description ?? "",
|
|
2411
2374
|
flows: _ToProto.oauthFlows(scheme.flows),
|
|
2412
|
-
oauth2MetadataUrl: scheme.oauth2MetadataUrl
|
|
2375
|
+
oauth2MetadataUrl: scheme.oauth2MetadataUrl ?? ""
|
|
2413
2376
|
}
|
|
2414
2377
|
}
|
|
2415
2378
|
};
|
|
@@ -2418,7 +2381,7 @@ var ToProto = class _ToProto {
|
|
|
2418
2381
|
scheme: {
|
|
2419
2382
|
$case: "openIdConnectSecurityScheme",
|
|
2420
2383
|
value: {
|
|
2421
|
-
description: scheme.description,
|
|
2384
|
+
description: scheme.description ?? "",
|
|
2422
2385
|
openIdConnectUrl: scheme.openIdConnectUrl
|
|
2423
2386
|
}
|
|
2424
2387
|
}
|
|
@@ -2435,7 +2398,7 @@ var ToProto = class _ToProto {
|
|
|
2435
2398
|
value: {
|
|
2436
2399
|
authorizationUrl: flows.implicit.authorizationUrl,
|
|
2437
2400
|
scopes: flows.implicit.scopes,
|
|
2438
|
-
refreshUrl: flows.implicit.refreshUrl
|
|
2401
|
+
refreshUrl: flows.implicit.refreshUrl ?? ""
|
|
2439
2402
|
}
|
|
2440
2403
|
}
|
|
2441
2404
|
};
|
|
@@ -2446,7 +2409,7 @@ var ToProto = class _ToProto {
|
|
|
2446
2409
|
value: {
|
|
2447
2410
|
tokenUrl: flows.password.tokenUrl,
|
|
2448
2411
|
scopes: flows.password.scopes,
|
|
2449
|
-
refreshUrl: flows.password.refreshUrl
|
|
2412
|
+
refreshUrl: flows.password.refreshUrl ?? ""
|
|
2450
2413
|
}
|
|
2451
2414
|
}
|
|
2452
2415
|
};
|
|
@@ -2457,7 +2420,7 @@ var ToProto = class _ToProto {
|
|
|
2457
2420
|
value: {
|
|
2458
2421
|
tokenUrl: flows.clientCredentials.tokenUrl,
|
|
2459
2422
|
scopes: flows.clientCredentials.scopes,
|
|
2460
|
-
refreshUrl: flows.clientCredentials.refreshUrl
|
|
2423
|
+
refreshUrl: flows.clientCredentials.refreshUrl ?? ""
|
|
2461
2424
|
}
|
|
2462
2425
|
}
|
|
2463
2426
|
};
|
|
@@ -2469,7 +2432,7 @@ var ToProto = class _ToProto {
|
|
|
2469
2432
|
authorizationUrl: flows.authorizationCode.authorizationUrl,
|
|
2470
2433
|
tokenUrl: flows.authorizationCode.tokenUrl,
|
|
2471
2434
|
scopes: flows.authorizationCode.scopes,
|
|
2472
|
-
refreshUrl: flows.authorizationCode.refreshUrl
|
|
2435
|
+
refreshUrl: flows.authorizationCode.refreshUrl ?? ""
|
|
2473
2436
|
}
|
|
2474
2437
|
}
|
|
2475
2438
|
};
|
|
@@ -2502,8 +2465,8 @@ var ToProto = class _ToProto {
|
|
|
2502
2465
|
static agentExtension(extension) {
|
|
2503
2466
|
return {
|
|
2504
2467
|
uri: extension.uri,
|
|
2505
|
-
description: extension.description,
|
|
2506
|
-
required: extension.required,
|
|
2468
|
+
description: extension.description ?? "",
|
|
2469
|
+
required: extension.required ?? false,
|
|
2507
2470
|
params: extension.params
|
|
2508
2471
|
};
|
|
2509
2472
|
}
|
|
@@ -2551,9 +2514,9 @@ var ToProto = class _ToProto {
|
|
|
2551
2514
|
return void 0;
|
|
2552
2515
|
}
|
|
2553
2516
|
return {
|
|
2554
|
-
id: config.id,
|
|
2517
|
+
id: config.id ?? "",
|
|
2555
2518
|
url: config.url,
|
|
2556
|
-
token: config.token,
|
|
2519
|
+
token: config.token ?? "",
|
|
2557
2520
|
authentication: _ToProto.pushNotificationAuthenticationInfo(config.authentication)
|
|
2558
2521
|
};
|
|
2559
2522
|
}
|
|
@@ -2563,7 +2526,7 @@ var ToProto = class _ToProto {
|
|
|
2563
2526
|
}
|
|
2564
2527
|
return {
|
|
2565
2528
|
schemes: authInfo.schemes,
|
|
2566
|
-
credentials: authInfo.credentials
|
|
2529
|
+
credentials: authInfo.credentials ?? ""
|
|
2567
2530
|
};
|
|
2568
2531
|
}
|
|
2569
2532
|
static messageStreamResult(event) {
|
|
@@ -2641,9 +2604,9 @@ var ToProto = class _ToProto {
|
|
|
2641
2604
|
}
|
|
2642
2605
|
return {
|
|
2643
2606
|
messageId: message.messageId,
|
|
2644
|
-
content: message.parts.map((p) => _ToProto.
|
|
2645
|
-
contextId: message.contextId,
|
|
2646
|
-
taskId: message.taskId,
|
|
2607
|
+
content: message.parts.map((p) => _ToProto.part(p)),
|
|
2608
|
+
contextId: message.contextId ?? "",
|
|
2609
|
+
taskId: message.taskId ?? "",
|
|
2647
2610
|
role: _ToProto.role(message.role),
|
|
2648
2611
|
metadata: message.metadata,
|
|
2649
2612
|
extensions: message.extensions ?? []
|
|
@@ -2673,15 +2636,15 @@ var ToProto = class _ToProto {
|
|
|
2673
2636
|
return {
|
|
2674
2637
|
state: _ToProto.taskState(status.state),
|
|
2675
2638
|
update: _ToProto.message(status.message),
|
|
2676
|
-
timestamp: status.timestamp
|
|
2639
|
+
timestamp: status.timestamp
|
|
2677
2640
|
};
|
|
2678
2641
|
}
|
|
2679
2642
|
static artifact(artifact) {
|
|
2680
2643
|
return {
|
|
2681
2644
|
artifactId: artifact.artifactId,
|
|
2682
|
-
name: artifact.name,
|
|
2683
|
-
description: artifact.description,
|
|
2684
|
-
parts: artifact.parts.map((p) => _ToProto.
|
|
2645
|
+
name: artifact.name ?? "",
|
|
2646
|
+
description: artifact.description ?? "",
|
|
2647
|
+
parts: artifact.parts.map((p) => _ToProto.part(p)),
|
|
2685
2648
|
metadata: artifact.metadata,
|
|
2686
2649
|
extensions: artifact.extensions ? artifact.extensions : []
|
|
2687
2650
|
};
|
|
@@ -2710,7 +2673,7 @@ var ToProto = class _ToProto {
|
|
|
2710
2673
|
return -1 /* UNRECOGNIZED */;
|
|
2711
2674
|
}
|
|
2712
2675
|
}
|
|
2713
|
-
static
|
|
2676
|
+
static part(part) {
|
|
2714
2677
|
if (part.kind === "text") {
|
|
2715
2678
|
return {
|
|
2716
2679
|
part: { $case: "text", value: part.text }
|
|
@@ -2776,6 +2739,9 @@ var ToProto = class _ToProto {
|
|
|
2776
2739
|
name: generateTaskName(params.id)
|
|
2777
2740
|
};
|
|
2778
2741
|
}
|
|
2742
|
+
static getAgentCardRequest() {
|
|
2743
|
+
return {};
|
|
2744
|
+
}
|
|
2779
2745
|
};
|
|
2780
2746
|
|
|
2781
2747
|
// src/types/converters/from_proto.ts
|
|
@@ -2830,9 +2796,9 @@ var FromProto = class _FromProto {
|
|
|
2830
2796
|
return {
|
|
2831
2797
|
kind: "message",
|
|
2832
2798
|
messageId: message.messageId,
|
|
2833
|
-
parts: message.content.map((p) => _FromProto.
|
|
2834
|
-
contextId: message.contextId,
|
|
2835
|
-
taskId: message.taskId,
|
|
2799
|
+
parts: message.content.map((p) => _FromProto.part(p)),
|
|
2800
|
+
contextId: message.contextId || void 0,
|
|
2801
|
+
taskId: message.taskId || void 0,
|
|
2836
2802
|
role: _FromProto.role(message.role),
|
|
2837
2803
|
metadata: message.metadata,
|
|
2838
2804
|
extensions: message.extensions
|
|
@@ -2865,7 +2831,7 @@ var FromProto = class _FromProto {
|
|
|
2865
2831
|
return {
|
|
2866
2832
|
id: config.id,
|
|
2867
2833
|
url: config.url,
|
|
2868
|
-
token: config.token,
|
|
2834
|
+
token: config.token || void 0,
|
|
2869
2835
|
authentication: _FromProto.pushNotificationAuthenticationInfo(config.authentication)
|
|
2870
2836
|
};
|
|
2871
2837
|
}
|
|
@@ -2878,7 +2844,7 @@ var FromProto = class _FromProto {
|
|
|
2878
2844
|
credentials: authInfo.credentials
|
|
2879
2845
|
};
|
|
2880
2846
|
}
|
|
2881
|
-
static
|
|
2847
|
+
static part(part) {
|
|
2882
2848
|
if (part.part?.$case === "text") {
|
|
2883
2849
|
return {
|
|
2884
2850
|
kind: "text",
|
|
@@ -2944,7 +2910,7 @@ var FromProto = class _FromProto {
|
|
|
2944
2910
|
return {
|
|
2945
2911
|
message: _FromProto.message(status.update),
|
|
2946
2912
|
state: _FromProto.taskState(status.state),
|
|
2947
|
-
timestamp: status.timestamp
|
|
2913
|
+
timestamp: status.timestamp
|
|
2948
2914
|
};
|
|
2949
2915
|
}
|
|
2950
2916
|
static taskState(state) {
|
|
@@ -2974,9 +2940,9 @@ var FromProto = class _FromProto {
|
|
|
2974
2940
|
static artifact(artifact) {
|
|
2975
2941
|
return {
|
|
2976
2942
|
artifactId: artifact.artifactId,
|
|
2977
|
-
name: artifact.name,
|
|
2978
|
-
description: artifact.description,
|
|
2979
|
-
parts: artifact.parts.map((p) => _FromProto.
|
|
2943
|
+
name: artifact.name || void 0,
|
|
2944
|
+
description: artifact.description || void 0,
|
|
2945
|
+
parts: artifact.parts.map((p) => _FromProto.part(p)),
|
|
2980
2946
|
metadata: artifact.metadata
|
|
2981
2947
|
};
|
|
2982
2948
|
}
|
|
@@ -2996,7 +2962,7 @@ var FromProto = class _FromProto {
|
|
|
2996
2962
|
defaultInputModes: agentCard.defaultInputModes,
|
|
2997
2963
|
defaultOutputModes: agentCard.defaultOutputModes,
|
|
2998
2964
|
description: agentCard.description,
|
|
2999
|
-
documentationUrl: agentCard.documentationUrl,
|
|
2965
|
+
documentationUrl: agentCard.documentationUrl || void 0,
|
|
3000
2966
|
name: agentCard.name,
|
|
3001
2967
|
preferredTransport: agentCard.preferredTransport,
|
|
3002
2968
|
provider: agentCard.provider ? _FromProto.agentProvider(agentCard.provider) : void 0,
|
|
@@ -3024,22 +2990,22 @@ var FromProto = class _FromProto {
|
|
|
3024
2990
|
}
|
|
3025
2991
|
static agentExtension(extension) {
|
|
3026
2992
|
return {
|
|
3027
|
-
uri: extension.uri
|
|
3028
|
-
description: extension.description,
|
|
2993
|
+
uri: extension.uri,
|
|
2994
|
+
description: extension.description || void 0,
|
|
3029
2995
|
required: extension.required,
|
|
3030
2996
|
params: extension.params
|
|
3031
2997
|
};
|
|
3032
2998
|
}
|
|
3033
2999
|
static agentInterface(intf) {
|
|
3034
3000
|
return {
|
|
3035
|
-
transport: intf.transport
|
|
3036
|
-
url: intf.url
|
|
3001
|
+
transport: intf.transport,
|
|
3002
|
+
url: intf.url
|
|
3037
3003
|
};
|
|
3038
3004
|
}
|
|
3039
3005
|
static agentProvider(provider) {
|
|
3040
3006
|
return {
|
|
3041
|
-
organization: provider.organization
|
|
3042
|
-
url: provider.url
|
|
3007
|
+
organization: provider.organization,
|
|
3008
|
+
url: provider.url
|
|
3043
3009
|
};
|
|
3044
3010
|
}
|
|
3045
3011
|
static security(security) {
|
|
@@ -3054,31 +3020,31 @@ var FromProto = class _FromProto {
|
|
|
3054
3020
|
type: "apiKey",
|
|
3055
3021
|
name: securitySchemes.scheme.value.name,
|
|
3056
3022
|
in: securitySchemes.scheme.value.location,
|
|
3057
|
-
description: securitySchemes.scheme.value.description
|
|
3023
|
+
description: securitySchemes.scheme.value.description || void 0
|
|
3058
3024
|
};
|
|
3059
3025
|
case "httpAuthSecurityScheme":
|
|
3060
3026
|
return {
|
|
3061
3027
|
type: "http",
|
|
3062
3028
|
scheme: securitySchemes.scheme.value.scheme,
|
|
3063
|
-
bearerFormat: securitySchemes.scheme.value.bearerFormat,
|
|
3064
|
-
description: securitySchemes.scheme.value.description
|
|
3029
|
+
bearerFormat: securitySchemes.scheme.value.bearerFormat || void 0,
|
|
3030
|
+
description: securitySchemes.scheme.value.description || void 0
|
|
3065
3031
|
};
|
|
3066
3032
|
case "mtlsSecurityScheme":
|
|
3067
3033
|
return {
|
|
3068
3034
|
type: "mutualTLS",
|
|
3069
|
-
description: securitySchemes.scheme.value.description
|
|
3035
|
+
description: securitySchemes.scheme.value.description || void 0
|
|
3070
3036
|
};
|
|
3071
3037
|
case "oauth2SecurityScheme":
|
|
3072
3038
|
return {
|
|
3073
3039
|
type: "oauth2",
|
|
3074
|
-
description: securitySchemes.scheme.value.description,
|
|
3040
|
+
description: securitySchemes.scheme.value.description || void 0,
|
|
3075
3041
|
flows: _FromProto.oauthFlows(securitySchemes.scheme.value.flows),
|
|
3076
|
-
oauth2MetadataUrl: securitySchemes.scheme.value.oauth2MetadataUrl
|
|
3042
|
+
oauth2MetadataUrl: securitySchemes.scheme.value.oauth2MetadataUrl || void 0
|
|
3077
3043
|
};
|
|
3078
3044
|
case "openIdConnectSecurityScheme":
|
|
3079
3045
|
return {
|
|
3080
3046
|
type: "openIdConnect",
|
|
3081
|
-
description: securitySchemes.scheme.value.description,
|
|
3047
|
+
description: securitySchemes.scheme.value.description || void 0,
|
|
3082
3048
|
openIdConnectUrl: securitySchemes.scheme.value.openIdConnectUrl
|
|
3083
3049
|
};
|
|
3084
3050
|
default:
|
|
@@ -3092,13 +3058,13 @@ var FromProto = class _FromProto {
|
|
|
3092
3058
|
implicit: {
|
|
3093
3059
|
authorizationUrl: flows.flow.value.authorizationUrl,
|
|
3094
3060
|
scopes: flows.flow.value.scopes,
|
|
3095
|
-
refreshUrl: flows.flow.value.refreshUrl
|
|
3061
|
+
refreshUrl: flows.flow.value.refreshUrl || void 0
|
|
3096
3062
|
}
|
|
3097
3063
|
};
|
|
3098
3064
|
case "password":
|
|
3099
3065
|
return {
|
|
3100
3066
|
password: {
|
|
3101
|
-
refreshUrl: flows.flow.value.refreshUrl,
|
|
3067
|
+
refreshUrl: flows.flow.value.refreshUrl || void 0,
|
|
3102
3068
|
scopes: flows.flow.value.scopes,
|
|
3103
3069
|
tokenUrl: flows.flow.value.tokenUrl
|
|
3104
3070
|
}
|
|
@@ -3106,7 +3072,7 @@ var FromProto = class _FromProto {
|
|
|
3106
3072
|
case "authorizationCode":
|
|
3107
3073
|
return {
|
|
3108
3074
|
authorizationCode: {
|
|
3109
|
-
refreshUrl: flows.flow.value.refreshUrl,
|
|
3075
|
+
refreshUrl: flows.flow.value.refreshUrl || void 0,
|
|
3110
3076
|
authorizationUrl: flows.flow.value.authorizationUrl,
|
|
3111
3077
|
scopes: flows.flow.value.scopes,
|
|
3112
3078
|
tokenUrl: flows.flow.value.tokenUrl
|
|
@@ -3115,7 +3081,7 @@ var FromProto = class _FromProto {
|
|
|
3115
3081
|
case "clientCredentials":
|
|
3116
3082
|
return {
|
|
3117
3083
|
clientCredentials: {
|
|
3118
|
-
refreshUrl: flows.flow.value.refreshUrl,
|
|
3084
|
+
refreshUrl: flows.flow.value.refreshUrl || void 0,
|
|
3119
3085
|
scopes: flows.flow.value.scopes,
|
|
3120
3086
|
tokenUrl: flows.flow.value.tokenUrl
|
|
3121
3087
|
}
|
|
@@ -3165,13 +3131,8 @@ var FromProto = class _FromProto {
|
|
|
3165
3131
|
}
|
|
3166
3132
|
static messageStreamResult(event) {
|
|
3167
3133
|
switch (event.payload?.$case) {
|
|
3168
|
-
case "msg":
|
|
3169
|
-
|
|
3170
|
-
if (!message) {
|
|
3171
|
-
throw A2AError.internalError("Invalid message in StreamResponse");
|
|
3172
|
-
}
|
|
3173
|
-
return message;
|
|
3174
|
-
}
|
|
3134
|
+
case "msg":
|
|
3135
|
+
return _FromProto.message(event.payload.value);
|
|
3175
3136
|
case "task":
|
|
3176
3137
|
return _FromProto.task(event.payload.value);
|
|
3177
3138
|
case "statusUpdate":
|