@miradorlabs/web-grpc 2.40.0 → 2.42.0
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.
|
@@ -304,7 +304,19 @@ export interface AISession {
|
|
|
304
304
|
filesTouched: number;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
export interface
|
|
307
|
+
export interface ListSessionEventsRequest {
|
|
308
|
+
organizationId: string;
|
|
309
|
+
projectId: string;
|
|
310
|
+
routingKey: string;
|
|
311
|
+
sourceSystem: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface ListSessionEventsResponse {
|
|
315
|
+
status: ResponseStatus | undefined;
|
|
316
|
+
events: AISessionEvent[];
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface StreamSessionEventsRequest {
|
|
308
320
|
organizationId: string;
|
|
309
321
|
projectId: string;
|
|
310
322
|
routingKey: string;
|
|
@@ -392,6 +404,27 @@ export interface ListGitActivitiesResponse {
|
|
|
392
404
|
activities: AIGitActivity[];
|
|
393
405
|
}
|
|
394
406
|
|
|
407
|
+
export interface StreamGitActivitiesRequest {
|
|
408
|
+
organizationId: string;
|
|
409
|
+
projectId: string;
|
|
410
|
+
routingKey: string;
|
|
411
|
+
sourceSystem: string;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* GitActivityFrame mirrors telemetry.api.v1.GitActivityFrame: an UPSERT of one
|
|
416
|
+
* activity's latest coalesced state (replace by activity_id, re-sort by
|
|
417
|
+
* event_time) or a nonterminal GitActivitiesSnapshotCompleted. Streams carry no
|
|
418
|
+
* ResponseStatus.
|
|
419
|
+
*/
|
|
420
|
+
export interface GitActivityFrame {
|
|
421
|
+
upsert?: AIGitActivity | undefined;
|
|
422
|
+
snapshotCompleted?: GitActivitiesSnapshotCompleted | undefined;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface GitActivitiesSnapshotCompleted {
|
|
426
|
+
}
|
|
427
|
+
|
|
395
428
|
export interface AIGitActivity {
|
|
396
429
|
eventTime: Date | undefined;
|
|
397
430
|
sourceSystem: string;
|
|
@@ -421,6 +454,8 @@ export interface AIGitActivity {
|
|
|
421
454
|
prBaseRef: string;
|
|
422
455
|
prHeadRef: string;
|
|
423
456
|
mergeCommitSha: string;
|
|
457
|
+
/** UPSERT key for StreamGitActivities; clients replace by it */
|
|
458
|
+
activityId: string;
|
|
424
459
|
}
|
|
425
460
|
|
|
426
461
|
export interface AITokenUsage {
|
|
@@ -1401,12 +1436,232 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1401
1436
|
},
|
|
1402
1437
|
};
|
|
1403
1438
|
|
|
1404
|
-
function
|
|
1439
|
+
function createBaseListSessionEventsRequest(): ListSessionEventsRequest {
|
|
1440
|
+
return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
1444
|
+
encode(message: ListSessionEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1445
|
+
if (message.organizationId !== "") {
|
|
1446
|
+
writer.uint32(10).string(message.organizationId);
|
|
1447
|
+
}
|
|
1448
|
+
if (message.projectId !== "") {
|
|
1449
|
+
writer.uint32(18).string(message.projectId);
|
|
1450
|
+
}
|
|
1451
|
+
if (message.routingKey !== "") {
|
|
1452
|
+
writer.uint32(26).string(message.routingKey);
|
|
1453
|
+
}
|
|
1454
|
+
if (message.sourceSystem !== "") {
|
|
1455
|
+
writer.uint32(34).string(message.sourceSystem);
|
|
1456
|
+
}
|
|
1457
|
+
return writer;
|
|
1458
|
+
},
|
|
1459
|
+
|
|
1460
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListSessionEventsRequest {
|
|
1461
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1462
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1463
|
+
if (previousRecursionDepth >= 100) {
|
|
1464
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1465
|
+
}
|
|
1466
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1467
|
+
try {
|
|
1468
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1469
|
+
const message = createBaseListSessionEventsRequest();
|
|
1470
|
+
while (reader.pos < end) {
|
|
1471
|
+
const tag = reader.uint32();
|
|
1472
|
+
switch (tag >>> 3) {
|
|
1473
|
+
case 1: {
|
|
1474
|
+
if (tag !== 10) {
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
message.organizationId = reader.string();
|
|
1479
|
+
continue;
|
|
1480
|
+
}
|
|
1481
|
+
case 2: {
|
|
1482
|
+
if (tag !== 18) {
|
|
1483
|
+
break;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
message.projectId = reader.string();
|
|
1487
|
+
continue;
|
|
1488
|
+
}
|
|
1489
|
+
case 3: {
|
|
1490
|
+
if (tag !== 26) {
|
|
1491
|
+
break;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
message.routingKey = reader.string();
|
|
1495
|
+
continue;
|
|
1496
|
+
}
|
|
1497
|
+
case 4: {
|
|
1498
|
+
if (tag !== 34) {
|
|
1499
|
+
break;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
message.sourceSystem = reader.string();
|
|
1503
|
+
continue;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
reader.skip(tag & 7);
|
|
1510
|
+
}
|
|
1511
|
+
return message;
|
|
1512
|
+
} finally {
|
|
1513
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
|
|
1517
|
+
fromJSON(object: any): ListSessionEventsRequest {
|
|
1518
|
+
return {
|
|
1519
|
+
organizationId: isSet(object.organizationId)
|
|
1520
|
+
? globalThis.String(object.organizationId)
|
|
1521
|
+
: isSet(object.organization_id)
|
|
1522
|
+
? globalThis.String(object.organization_id)
|
|
1523
|
+
: "",
|
|
1524
|
+
projectId: isSet(object.projectId)
|
|
1525
|
+
? globalThis.String(object.projectId)
|
|
1526
|
+
: isSet(object.project_id)
|
|
1527
|
+
? globalThis.String(object.project_id)
|
|
1528
|
+
: "",
|
|
1529
|
+
routingKey: isSet(object.routingKey)
|
|
1530
|
+
? globalThis.String(object.routingKey)
|
|
1531
|
+
: isSet(object.routing_key)
|
|
1532
|
+
? globalThis.String(object.routing_key)
|
|
1533
|
+
: "",
|
|
1534
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
1535
|
+
? globalThis.String(object.sourceSystem)
|
|
1536
|
+
: isSet(object.source_system)
|
|
1537
|
+
? globalThis.String(object.source_system)
|
|
1538
|
+
: "",
|
|
1539
|
+
};
|
|
1540
|
+
},
|
|
1541
|
+
|
|
1542
|
+
toJSON(message: ListSessionEventsRequest): unknown {
|
|
1543
|
+
const obj: any = {};
|
|
1544
|
+
if (message.organizationId !== "") {
|
|
1545
|
+
obj.organizationId = message.organizationId;
|
|
1546
|
+
}
|
|
1547
|
+
if (message.projectId !== "") {
|
|
1548
|
+
obj.projectId = message.projectId;
|
|
1549
|
+
}
|
|
1550
|
+
if (message.routingKey !== "") {
|
|
1551
|
+
obj.routingKey = message.routingKey;
|
|
1552
|
+
}
|
|
1553
|
+
if (message.sourceSystem !== "") {
|
|
1554
|
+
obj.sourceSystem = message.sourceSystem;
|
|
1555
|
+
}
|
|
1556
|
+
return obj;
|
|
1557
|
+
},
|
|
1558
|
+
|
|
1559
|
+
create<I extends Exact<DeepPartial<ListSessionEventsRequest>, I>>(base?: I): ListSessionEventsRequest {
|
|
1560
|
+
return ListSessionEventsRequest.fromPartial(base ?? ({} as any));
|
|
1561
|
+
},
|
|
1562
|
+
fromPartial<I extends Exact<DeepPartial<ListSessionEventsRequest>, I>>(object: I): ListSessionEventsRequest {
|
|
1563
|
+
const message = createBaseListSessionEventsRequest();
|
|
1564
|
+
message.organizationId = object.organizationId ?? "";
|
|
1565
|
+
message.projectId = object.projectId ?? "";
|
|
1566
|
+
message.routingKey = object.routingKey ?? "";
|
|
1567
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
1568
|
+
return message;
|
|
1569
|
+
},
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1572
|
+
function createBaseListSessionEventsResponse(): ListSessionEventsResponse {
|
|
1573
|
+
return { status: undefined, events: [] };
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
export const ListSessionEventsResponse: MessageFns<ListSessionEventsResponse> = {
|
|
1577
|
+
encode(message: ListSessionEventsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1578
|
+
if (message.status !== undefined) {
|
|
1579
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1580
|
+
}
|
|
1581
|
+
for (const v of message.events) {
|
|
1582
|
+
AISessionEvent.encode(v!, writer.uint32(18).fork()).join();
|
|
1583
|
+
}
|
|
1584
|
+
return writer;
|
|
1585
|
+
},
|
|
1586
|
+
|
|
1587
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListSessionEventsResponse {
|
|
1588
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1589
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1590
|
+
if (previousRecursionDepth >= 100) {
|
|
1591
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1592
|
+
}
|
|
1593
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1594
|
+
try {
|
|
1595
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1596
|
+
const message = createBaseListSessionEventsResponse();
|
|
1597
|
+
while (reader.pos < end) {
|
|
1598
|
+
const tag = reader.uint32();
|
|
1599
|
+
switch (tag >>> 3) {
|
|
1600
|
+
case 1: {
|
|
1601
|
+
if (tag !== 10) {
|
|
1602
|
+
break;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
case 2: {
|
|
1609
|
+
if (tag !== 18) {
|
|
1610
|
+
break;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
message.events.push(AISessionEvent.decode(reader, reader.uint32()));
|
|
1614
|
+
continue;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1618
|
+
break;
|
|
1619
|
+
}
|
|
1620
|
+
reader.skip(tag & 7);
|
|
1621
|
+
}
|
|
1622
|
+
return message;
|
|
1623
|
+
} finally {
|
|
1624
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
|
|
1628
|
+
fromJSON(object: any): ListSessionEventsResponse {
|
|
1629
|
+
return {
|
|
1630
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1631
|
+
events: globalThis.Array.isArray(object?.events) ? object.events.map((e: any) => AISessionEvent.fromJSON(e)) : [],
|
|
1632
|
+
};
|
|
1633
|
+
},
|
|
1634
|
+
|
|
1635
|
+
toJSON(message: ListSessionEventsResponse): unknown {
|
|
1636
|
+
const obj: any = {};
|
|
1637
|
+
if (message.status !== undefined) {
|
|
1638
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1639
|
+
}
|
|
1640
|
+
if (message.events?.length) {
|
|
1641
|
+
obj.events = message.events.map((e) => AISessionEvent.toJSON(e));
|
|
1642
|
+
}
|
|
1643
|
+
return obj;
|
|
1644
|
+
},
|
|
1645
|
+
|
|
1646
|
+
create<I extends Exact<DeepPartial<ListSessionEventsResponse>, I>>(base?: I): ListSessionEventsResponse {
|
|
1647
|
+
return ListSessionEventsResponse.fromPartial(base ?? ({} as any));
|
|
1648
|
+
},
|
|
1649
|
+
fromPartial<I extends Exact<DeepPartial<ListSessionEventsResponse>, I>>(object: I): ListSessionEventsResponse {
|
|
1650
|
+
const message = createBaseListSessionEventsResponse();
|
|
1651
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1652
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1653
|
+
: undefined;
|
|
1654
|
+
message.events = object.events?.map((e) => AISessionEvent.fromPartial(e)) || [];
|
|
1655
|
+
return message;
|
|
1656
|
+
},
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
function createBaseStreamSessionEventsRequest(): StreamSessionEventsRequest {
|
|
1405
1660
|
return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
|
|
1406
1661
|
}
|
|
1407
1662
|
|
|
1408
|
-
export const
|
|
1409
|
-
encode(message:
|
|
1663
|
+
export const StreamSessionEventsRequest: MessageFns<StreamSessionEventsRequest> = {
|
|
1664
|
+
encode(message: StreamSessionEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1410
1665
|
if (message.organizationId !== "") {
|
|
1411
1666
|
writer.uint32(10).string(message.organizationId);
|
|
1412
1667
|
}
|
|
@@ -1422,7 +1677,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
|
|
|
1422
1677
|
return writer;
|
|
1423
1678
|
},
|
|
1424
1679
|
|
|
1425
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
1680
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamSessionEventsRequest {
|
|
1426
1681
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1427
1682
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1428
1683
|
if (previousRecursionDepth >= 100) {
|
|
@@ -1431,7 +1686,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
|
|
|
1431
1686
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1432
1687
|
try {
|
|
1433
1688
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1434
|
-
const message =
|
|
1689
|
+
const message = createBaseStreamSessionEventsRequest();
|
|
1435
1690
|
while (reader.pos < end) {
|
|
1436
1691
|
const tag = reader.uint32();
|
|
1437
1692
|
switch (tag >>> 3) {
|
|
@@ -1479,7 +1734,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
|
|
|
1479
1734
|
}
|
|
1480
1735
|
},
|
|
1481
1736
|
|
|
1482
|
-
fromJSON(object: any):
|
|
1737
|
+
fromJSON(object: any): StreamSessionEventsRequest {
|
|
1483
1738
|
return {
|
|
1484
1739
|
organizationId: isSet(object.organizationId)
|
|
1485
1740
|
? globalThis.String(object.organizationId)
|
|
@@ -1504,7 +1759,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
|
|
|
1504
1759
|
};
|
|
1505
1760
|
},
|
|
1506
1761
|
|
|
1507
|
-
toJSON(message:
|
|
1762
|
+
toJSON(message: StreamSessionEventsRequest): unknown {
|
|
1508
1763
|
const obj: any = {};
|
|
1509
1764
|
if (message.organizationId !== "") {
|
|
1510
1765
|
obj.organizationId = message.organizationId;
|
|
@@ -1521,11 +1776,11 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
|
|
|
1521
1776
|
return obj;
|
|
1522
1777
|
},
|
|
1523
1778
|
|
|
1524
|
-
create<I extends Exact<DeepPartial<
|
|
1525
|
-
return
|
|
1779
|
+
create<I extends Exact<DeepPartial<StreamSessionEventsRequest>, I>>(base?: I): StreamSessionEventsRequest {
|
|
1780
|
+
return StreamSessionEventsRequest.fromPartial(base ?? ({} as any));
|
|
1526
1781
|
},
|
|
1527
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
1528
|
-
const message =
|
|
1782
|
+
fromPartial<I extends Exact<DeepPartial<StreamSessionEventsRequest>, I>>(object: I): StreamSessionEventsRequest {
|
|
1783
|
+
const message = createBaseStreamSessionEventsRequest();
|
|
1529
1784
|
message.organizationId = object.organizationId ?? "";
|
|
1530
1785
|
message.projectId = object.projectId ?? "";
|
|
1531
1786
|
message.routingKey = object.routingKey ?? "";
|
|
@@ -3016,6 +3271,284 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3016
3271
|
},
|
|
3017
3272
|
};
|
|
3018
3273
|
|
|
3274
|
+
function createBaseStreamGitActivitiesRequest(): StreamGitActivitiesRequest {
|
|
3275
|
+
return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest> = {
|
|
3279
|
+
encode(message: StreamGitActivitiesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3280
|
+
if (message.organizationId !== "") {
|
|
3281
|
+
writer.uint32(10).string(message.organizationId);
|
|
3282
|
+
}
|
|
3283
|
+
if (message.projectId !== "") {
|
|
3284
|
+
writer.uint32(18).string(message.projectId);
|
|
3285
|
+
}
|
|
3286
|
+
if (message.routingKey !== "") {
|
|
3287
|
+
writer.uint32(26).string(message.routingKey);
|
|
3288
|
+
}
|
|
3289
|
+
if (message.sourceSystem !== "") {
|
|
3290
|
+
writer.uint32(34).string(message.sourceSystem);
|
|
3291
|
+
}
|
|
3292
|
+
return writer;
|
|
3293
|
+
},
|
|
3294
|
+
|
|
3295
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamGitActivitiesRequest {
|
|
3296
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3297
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3298
|
+
if (previousRecursionDepth >= 100) {
|
|
3299
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3300
|
+
}
|
|
3301
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3302
|
+
try {
|
|
3303
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3304
|
+
const message = createBaseStreamGitActivitiesRequest();
|
|
3305
|
+
while (reader.pos < end) {
|
|
3306
|
+
const tag = reader.uint32();
|
|
3307
|
+
switch (tag >>> 3) {
|
|
3308
|
+
case 1: {
|
|
3309
|
+
if (tag !== 10) {
|
|
3310
|
+
break;
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
message.organizationId = reader.string();
|
|
3314
|
+
continue;
|
|
3315
|
+
}
|
|
3316
|
+
case 2: {
|
|
3317
|
+
if (tag !== 18) {
|
|
3318
|
+
break;
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
message.projectId = reader.string();
|
|
3322
|
+
continue;
|
|
3323
|
+
}
|
|
3324
|
+
case 3: {
|
|
3325
|
+
if (tag !== 26) {
|
|
3326
|
+
break;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
message.routingKey = reader.string();
|
|
3330
|
+
continue;
|
|
3331
|
+
}
|
|
3332
|
+
case 4: {
|
|
3333
|
+
if (tag !== 34) {
|
|
3334
|
+
break;
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
message.sourceSystem = reader.string();
|
|
3338
|
+
continue;
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3342
|
+
break;
|
|
3343
|
+
}
|
|
3344
|
+
reader.skip(tag & 7);
|
|
3345
|
+
}
|
|
3346
|
+
return message;
|
|
3347
|
+
} finally {
|
|
3348
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3349
|
+
}
|
|
3350
|
+
},
|
|
3351
|
+
|
|
3352
|
+
fromJSON(object: any): StreamGitActivitiesRequest {
|
|
3353
|
+
return {
|
|
3354
|
+
organizationId: isSet(object.organizationId)
|
|
3355
|
+
? globalThis.String(object.organizationId)
|
|
3356
|
+
: isSet(object.organization_id)
|
|
3357
|
+
? globalThis.String(object.organization_id)
|
|
3358
|
+
: "",
|
|
3359
|
+
projectId: isSet(object.projectId)
|
|
3360
|
+
? globalThis.String(object.projectId)
|
|
3361
|
+
: isSet(object.project_id)
|
|
3362
|
+
? globalThis.String(object.project_id)
|
|
3363
|
+
: "",
|
|
3364
|
+
routingKey: isSet(object.routingKey)
|
|
3365
|
+
? globalThis.String(object.routingKey)
|
|
3366
|
+
: isSet(object.routing_key)
|
|
3367
|
+
? globalThis.String(object.routing_key)
|
|
3368
|
+
: "",
|
|
3369
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
3370
|
+
? globalThis.String(object.sourceSystem)
|
|
3371
|
+
: isSet(object.source_system)
|
|
3372
|
+
? globalThis.String(object.source_system)
|
|
3373
|
+
: "",
|
|
3374
|
+
};
|
|
3375
|
+
},
|
|
3376
|
+
|
|
3377
|
+
toJSON(message: StreamGitActivitiesRequest): unknown {
|
|
3378
|
+
const obj: any = {};
|
|
3379
|
+
if (message.organizationId !== "") {
|
|
3380
|
+
obj.organizationId = message.organizationId;
|
|
3381
|
+
}
|
|
3382
|
+
if (message.projectId !== "") {
|
|
3383
|
+
obj.projectId = message.projectId;
|
|
3384
|
+
}
|
|
3385
|
+
if (message.routingKey !== "") {
|
|
3386
|
+
obj.routingKey = message.routingKey;
|
|
3387
|
+
}
|
|
3388
|
+
if (message.sourceSystem !== "") {
|
|
3389
|
+
obj.sourceSystem = message.sourceSystem;
|
|
3390
|
+
}
|
|
3391
|
+
return obj;
|
|
3392
|
+
},
|
|
3393
|
+
|
|
3394
|
+
create<I extends Exact<DeepPartial<StreamGitActivitiesRequest>, I>>(base?: I): StreamGitActivitiesRequest {
|
|
3395
|
+
return StreamGitActivitiesRequest.fromPartial(base ?? ({} as any));
|
|
3396
|
+
},
|
|
3397
|
+
fromPartial<I extends Exact<DeepPartial<StreamGitActivitiesRequest>, I>>(object: I): StreamGitActivitiesRequest {
|
|
3398
|
+
const message = createBaseStreamGitActivitiesRequest();
|
|
3399
|
+
message.organizationId = object.organizationId ?? "";
|
|
3400
|
+
message.projectId = object.projectId ?? "";
|
|
3401
|
+
message.routingKey = object.routingKey ?? "";
|
|
3402
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
3403
|
+
return message;
|
|
3404
|
+
},
|
|
3405
|
+
};
|
|
3406
|
+
|
|
3407
|
+
function createBaseGitActivityFrame(): GitActivityFrame {
|
|
3408
|
+
return { upsert: undefined, snapshotCompleted: undefined };
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
export const GitActivityFrame: MessageFns<GitActivityFrame> = {
|
|
3412
|
+
encode(message: GitActivityFrame, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3413
|
+
if (message.upsert !== undefined) {
|
|
3414
|
+
AIGitActivity.encode(message.upsert, writer.uint32(10).fork()).join();
|
|
3415
|
+
}
|
|
3416
|
+
if (message.snapshotCompleted !== undefined) {
|
|
3417
|
+
GitActivitiesSnapshotCompleted.encode(message.snapshotCompleted, writer.uint32(18).fork()).join();
|
|
3418
|
+
}
|
|
3419
|
+
return writer;
|
|
3420
|
+
},
|
|
3421
|
+
|
|
3422
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivityFrame {
|
|
3423
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3424
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3425
|
+
if (previousRecursionDepth >= 100) {
|
|
3426
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3427
|
+
}
|
|
3428
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3429
|
+
try {
|
|
3430
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3431
|
+
const message = createBaseGitActivityFrame();
|
|
3432
|
+
while (reader.pos < end) {
|
|
3433
|
+
const tag = reader.uint32();
|
|
3434
|
+
switch (tag >>> 3) {
|
|
3435
|
+
case 1: {
|
|
3436
|
+
if (tag !== 10) {
|
|
3437
|
+
break;
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
message.upsert = AIGitActivity.decode(reader, reader.uint32());
|
|
3441
|
+
continue;
|
|
3442
|
+
}
|
|
3443
|
+
case 2: {
|
|
3444
|
+
if (tag !== 18) {
|
|
3445
|
+
break;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
message.snapshotCompleted = GitActivitiesSnapshotCompleted.decode(reader, reader.uint32());
|
|
3449
|
+
continue;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3453
|
+
break;
|
|
3454
|
+
}
|
|
3455
|
+
reader.skip(tag & 7);
|
|
3456
|
+
}
|
|
3457
|
+
return message;
|
|
3458
|
+
} finally {
|
|
3459
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3460
|
+
}
|
|
3461
|
+
},
|
|
3462
|
+
|
|
3463
|
+
fromJSON(object: any): GitActivityFrame {
|
|
3464
|
+
return {
|
|
3465
|
+
upsert: isSet(object.upsert) ? AIGitActivity.fromJSON(object.upsert) : undefined,
|
|
3466
|
+
snapshotCompleted: isSet(object.snapshotCompleted)
|
|
3467
|
+
? GitActivitiesSnapshotCompleted.fromJSON(object.snapshotCompleted)
|
|
3468
|
+
: isSet(object.snapshot_completed)
|
|
3469
|
+
? GitActivitiesSnapshotCompleted.fromJSON(object.snapshot_completed)
|
|
3470
|
+
: undefined,
|
|
3471
|
+
};
|
|
3472
|
+
},
|
|
3473
|
+
|
|
3474
|
+
toJSON(message: GitActivityFrame): unknown {
|
|
3475
|
+
const obj: any = {};
|
|
3476
|
+
if (message.upsert !== undefined) {
|
|
3477
|
+
obj.upsert = AIGitActivity.toJSON(message.upsert);
|
|
3478
|
+
}
|
|
3479
|
+
if (message.snapshotCompleted !== undefined) {
|
|
3480
|
+
obj.snapshotCompleted = GitActivitiesSnapshotCompleted.toJSON(message.snapshotCompleted);
|
|
3481
|
+
}
|
|
3482
|
+
return obj;
|
|
3483
|
+
},
|
|
3484
|
+
|
|
3485
|
+
create<I extends Exact<DeepPartial<GitActivityFrame>, I>>(base?: I): GitActivityFrame {
|
|
3486
|
+
return GitActivityFrame.fromPartial(base ?? ({} as any));
|
|
3487
|
+
},
|
|
3488
|
+
fromPartial<I extends Exact<DeepPartial<GitActivityFrame>, I>>(object: I): GitActivityFrame {
|
|
3489
|
+
const message = createBaseGitActivityFrame();
|
|
3490
|
+
message.upsert = (object.upsert !== undefined && object.upsert !== null)
|
|
3491
|
+
? AIGitActivity.fromPartial(object.upsert)
|
|
3492
|
+
: undefined;
|
|
3493
|
+
message.snapshotCompleted = (object.snapshotCompleted !== undefined && object.snapshotCompleted !== null)
|
|
3494
|
+
? GitActivitiesSnapshotCompleted.fromPartial(object.snapshotCompleted)
|
|
3495
|
+
: undefined;
|
|
3496
|
+
return message;
|
|
3497
|
+
},
|
|
3498
|
+
};
|
|
3499
|
+
|
|
3500
|
+
function createBaseGitActivitiesSnapshotCompleted(): GitActivitiesSnapshotCompleted {
|
|
3501
|
+
return {};
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
export const GitActivitiesSnapshotCompleted: MessageFns<GitActivitiesSnapshotCompleted> = {
|
|
3505
|
+
encode(_: GitActivitiesSnapshotCompleted, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3506
|
+
return writer;
|
|
3507
|
+
},
|
|
3508
|
+
|
|
3509
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitiesSnapshotCompleted {
|
|
3510
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3511
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3512
|
+
if (previousRecursionDepth >= 100) {
|
|
3513
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3514
|
+
}
|
|
3515
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3516
|
+
try {
|
|
3517
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3518
|
+
const message = createBaseGitActivitiesSnapshotCompleted();
|
|
3519
|
+
while (reader.pos < end) {
|
|
3520
|
+
const tag = reader.uint32();
|
|
3521
|
+
switch (tag >>> 3) {
|
|
3522
|
+
}
|
|
3523
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3524
|
+
break;
|
|
3525
|
+
}
|
|
3526
|
+
reader.skip(tag & 7);
|
|
3527
|
+
}
|
|
3528
|
+
return message;
|
|
3529
|
+
} finally {
|
|
3530
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3531
|
+
}
|
|
3532
|
+
},
|
|
3533
|
+
|
|
3534
|
+
fromJSON(_: any): GitActivitiesSnapshotCompleted {
|
|
3535
|
+
return {};
|
|
3536
|
+
},
|
|
3537
|
+
|
|
3538
|
+
toJSON(_: GitActivitiesSnapshotCompleted): unknown {
|
|
3539
|
+
const obj: any = {};
|
|
3540
|
+
return obj;
|
|
3541
|
+
},
|
|
3542
|
+
|
|
3543
|
+
create<I extends Exact<DeepPartial<GitActivitiesSnapshotCompleted>, I>>(base?: I): GitActivitiesSnapshotCompleted {
|
|
3544
|
+
return GitActivitiesSnapshotCompleted.fromPartial(base ?? ({} as any));
|
|
3545
|
+
},
|
|
3546
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitiesSnapshotCompleted>, I>>(_: I): GitActivitiesSnapshotCompleted {
|
|
3547
|
+
const message = createBaseGitActivitiesSnapshotCompleted();
|
|
3548
|
+
return message;
|
|
3549
|
+
},
|
|
3550
|
+
};
|
|
3551
|
+
|
|
3019
3552
|
function createBaseAIGitActivity(): AIGitActivity {
|
|
3020
3553
|
return {
|
|
3021
3554
|
eventTime: undefined,
|
|
@@ -3046,6 +3579,7 @@ function createBaseAIGitActivity(): AIGitActivity {
|
|
|
3046
3579
|
prBaseRef: "",
|
|
3047
3580
|
prHeadRef: "",
|
|
3048
3581
|
mergeCommitSha: "",
|
|
3582
|
+
activityId: "",
|
|
3049
3583
|
};
|
|
3050
3584
|
}
|
|
3051
3585
|
|
|
@@ -3135,6 +3669,9 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
3135
3669
|
if (message.mergeCommitSha !== "") {
|
|
3136
3670
|
writer.uint32(226).string(message.mergeCommitSha);
|
|
3137
3671
|
}
|
|
3672
|
+
if (message.activityId !== "") {
|
|
3673
|
+
writer.uint32(234).string(message.activityId);
|
|
3674
|
+
}
|
|
3138
3675
|
return writer;
|
|
3139
3676
|
},
|
|
3140
3677
|
|
|
@@ -3375,6 +3912,14 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
3375
3912
|
message.mergeCommitSha = reader.string();
|
|
3376
3913
|
continue;
|
|
3377
3914
|
}
|
|
3915
|
+
case 29: {
|
|
3916
|
+
if (tag !== 234) {
|
|
3917
|
+
break;
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
message.activityId = reader.string();
|
|
3921
|
+
continue;
|
|
3922
|
+
}
|
|
3378
3923
|
}
|
|
3379
3924
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3380
3925
|
break;
|
|
@@ -3511,6 +4056,11 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
3511
4056
|
: isSet(object.merge_commit_sha)
|
|
3512
4057
|
? globalThis.String(object.merge_commit_sha)
|
|
3513
4058
|
: "",
|
|
4059
|
+
activityId: isSet(object.activityId)
|
|
4060
|
+
? globalThis.String(object.activityId)
|
|
4061
|
+
: isSet(object.activity_id)
|
|
4062
|
+
? globalThis.String(object.activity_id)
|
|
4063
|
+
: "",
|
|
3514
4064
|
};
|
|
3515
4065
|
},
|
|
3516
4066
|
|
|
@@ -3600,6 +4150,9 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
3600
4150
|
if (message.mergeCommitSha !== "") {
|
|
3601
4151
|
obj.mergeCommitSha = message.mergeCommitSha;
|
|
3602
4152
|
}
|
|
4153
|
+
if (message.activityId !== "") {
|
|
4154
|
+
obj.activityId = message.activityId;
|
|
4155
|
+
}
|
|
3603
4156
|
return obj;
|
|
3604
4157
|
},
|
|
3605
4158
|
|
|
@@ -3636,6 +4189,7 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
3636
4189
|
message.prBaseRef = object.prBaseRef ?? "";
|
|
3637
4190
|
message.prHeadRef = object.prHeadRef ?? "";
|
|
3638
4191
|
message.mergeCommitSha = object.mergeCommitSha ?? "";
|
|
4192
|
+
message.activityId = object.activityId ?? "";
|
|
3639
4193
|
return message;
|
|
3640
4194
|
},
|
|
3641
4195
|
};
|
|
@@ -3803,10 +4357,16 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
3803
4357
|
*/
|
|
3804
4358
|
export interface AIGatewayService {
|
|
3805
4359
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse>;
|
|
3806
|
-
|
|
4360
|
+
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse>;
|
|
4361
|
+
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
|
|
3807
4362
|
ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
|
|
3808
4363
|
UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
|
|
3809
4364
|
ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
|
|
4365
|
+
/**
|
|
4366
|
+
* Live stream of one session's git/GitHub actions (UPSERT per activity keyed by
|
|
4367
|
+
* activity_id, a nonterminal GitActivitiesSnapshotCompleted, then open until cancel).
|
|
4368
|
+
*/
|
|
4369
|
+
StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame>;
|
|
3810
4370
|
}
|
|
3811
4371
|
|
|
3812
4372
|
export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
|
|
@@ -3817,10 +4377,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
3817
4377
|
this.service = opts?.service || AIGatewayServiceServiceName;
|
|
3818
4378
|
this.rpc = rpc;
|
|
3819
4379
|
this.ListSessions = this.ListSessions.bind(this);
|
|
3820
|
-
this.
|
|
4380
|
+
this.ListSessionEvents = this.ListSessionEvents.bind(this);
|
|
4381
|
+
this.StreamSessionEvents = this.StreamSessionEvents.bind(this);
|
|
3821
4382
|
this.ListPrincipals = this.ListPrincipals.bind(this);
|
|
3822
4383
|
this.UpdatePrincipal = this.UpdatePrincipal.bind(this);
|
|
3823
4384
|
this.ListGitActivities = this.ListGitActivities.bind(this);
|
|
4385
|
+
this.StreamGitActivities = this.StreamGitActivities.bind(this);
|
|
3824
4386
|
}
|
|
3825
4387
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
|
|
3826
4388
|
const data = ListSessionsRequest.encode(request).finish();
|
|
@@ -3828,9 +4390,15 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
3828
4390
|
return promise.then((data) => ListSessionsResponse.decode(new BinaryReader(data)));
|
|
3829
4391
|
}
|
|
3830
4392
|
|
|
3831
|
-
|
|
3832
|
-
const data =
|
|
3833
|
-
const
|
|
4393
|
+
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse> {
|
|
4394
|
+
const data = ListSessionEventsRequest.encode(request).finish();
|
|
4395
|
+
const promise = this.rpc.request(this.service, "ListSessionEvents", data, metadata);
|
|
4396
|
+
return promise.then((data) => ListSessionEventsResponse.decode(new BinaryReader(data)));
|
|
4397
|
+
}
|
|
4398
|
+
|
|
4399
|
+
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope> {
|
|
4400
|
+
const data = StreamSessionEventsRequest.encode(request).finish();
|
|
4401
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamSessionEvents", data, metadata);
|
|
3834
4402
|
return result.pipe(map((data) => AISessionEventEnvelope.decode(new BinaryReader(data))));
|
|
3835
4403
|
}
|
|
3836
4404
|
|
|
@@ -3851,6 +4419,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
3851
4419
|
const promise = this.rpc.request(this.service, "ListGitActivities", data, metadata);
|
|
3852
4420
|
return promise.then((data) => ListGitActivitiesResponse.decode(new BinaryReader(data)));
|
|
3853
4421
|
}
|
|
4422
|
+
|
|
4423
|
+
StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame> {
|
|
4424
|
+
const data = StreamGitActivitiesRequest.encode(request).finish();
|
|
4425
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivities", data, metadata);
|
|
4426
|
+
return result.pipe(map((data) => GitActivityFrame.decode(new BinaryReader(data))));
|
|
4427
|
+
}
|
|
3854
4428
|
}
|
|
3855
4429
|
|
|
3856
4430
|
interface Rpc {
|