@miradorlabs/web-grpc 2.40.0 → 2.45.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.
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.12.2
3
+ // protoc-gen-ts_proto v2.12.3
4
4
  // protoc v3.21.12
5
5
  // source: proto/gateway/web/v1/ai_gateway.proto
6
6
 
@@ -257,11 +257,21 @@ export function aIGitOutcomeToJSON(object: AIGitOutcome): string {
257
257
  export interface ListSessionsRequest {
258
258
  organizationId: string;
259
259
  projectId: string;
260
+ /**
261
+ * Structured filter, built directly by the frontend (AIP-160 is a REST
262
+ * api-gateway concern and never reaches this proto).
263
+ */
260
264
  filter: AISessionFilter | undefined;
261
265
  pageSize: number;
262
266
  pageToken: string;
263
267
  }
264
268
 
269
+ /**
270
+ * AISessionFilter selects sessions. Non-empty fields are ANDed; within a repeated
271
+ * field the values are ORed (any-of). id fields match by equality; model is
272
+ * membership. started_after/started_before are a half-open window over the
273
+ * session start time.
274
+ */
265
275
  export interface AISessionFilter {
266
276
  sourceSystem: string[];
267
277
  userId: string[];
@@ -302,9 +312,49 @@ export interface AISession {
302
312
  gitOrgs: string[];
303
313
  repositories: string[];
304
314
  filesTouched: number;
315
+ /** Content-derived rollup version; stale-frame guard for StreamSessions clients. */
316
+ sessionVersion: number;
317
+ /**
318
+ * Ingest-time creation (frozen) / latest ingest time — gateway wall-clock, not
319
+ * provider event time.
320
+ */
321
+ createdAt: Date | undefined;
322
+ updatedAt: Date | undefined;
305
323
  }
306
324
 
307
- export interface StreamSessionRequest {
325
+ export interface StreamSessionsRequest {
326
+ organizationId: string;
327
+ projectId: string;
328
+ /** Same structured filter as ListSessions (started_after/before live inside it). */
329
+ filter: AISessionFilter | undefined;
330
+ }
331
+
332
+ /**
333
+ * SessionFrame mirrors telemetry.api.v1.SessionFrame: an UPSERT of one session
334
+ * (keyed by routing_key + source_system) or a nonterminal
335
+ * SessionsSnapshotCompleted. Streams carry no ResponseStatus.
336
+ */
337
+ export interface SessionFrame {
338
+ upsert?: AISession | undefined;
339
+ snapshotCompleted?: SessionsSnapshotCompleted | undefined;
340
+ }
341
+
342
+ export interface SessionsSnapshotCompleted {
343
+ }
344
+
345
+ export interface ListSessionEventsRequest {
346
+ organizationId: string;
347
+ projectId: string;
348
+ routingKey: string;
349
+ sourceSystem: string;
350
+ }
351
+
352
+ export interface ListSessionEventsResponse {
353
+ status: ResponseStatus | undefined;
354
+ events: AISessionEvent[];
355
+ }
356
+
357
+ export interface StreamSessionEventsRequest {
308
358
  organizationId: string;
309
359
  projectId: string;
310
360
  routingKey: string;
@@ -346,6 +396,7 @@ export interface AIContentPart {
346
396
  export interface ListPrincipalsRequest {
347
397
  organizationId: string;
348
398
  projectId: string;
399
+ /** Structured filter (both optional, ANDed): kind and source_system, exact match. */
349
400
  kind?: AIPrincipalKind | undefined;
350
401
  sourceSystem: string;
351
402
  pageSize: number;
@@ -356,6 +407,8 @@ export interface ListPrincipalsResponse {
356
407
  status: ResponseStatus | undefined;
357
408
  principals: AIPrincipal[];
358
409
  nextPageToken: string;
410
+ /** Exact total for the filter, computed on the first page only. */
411
+ totalCount?: number | undefined;
359
412
  }
360
413
 
361
414
  export interface AIPrincipal {
@@ -392,6 +445,27 @@ export interface ListGitActivitiesResponse {
392
445
  activities: AIGitActivity[];
393
446
  }
394
447
 
448
+ export interface StreamGitActivitiesRequest {
449
+ organizationId: string;
450
+ projectId: string;
451
+ routingKey: string;
452
+ sourceSystem: string;
453
+ }
454
+
455
+ /**
456
+ * GitActivityFrame mirrors telemetry.api.v1.GitActivityFrame: an UPSERT of one
457
+ * activity's latest coalesced state (replace by activity_id, re-sort by
458
+ * event_time) or a nonterminal GitActivitiesSnapshotCompleted. Streams carry no
459
+ * ResponseStatus.
460
+ */
461
+ export interface GitActivityFrame {
462
+ upsert?: AIGitActivity | undefined;
463
+ snapshotCompleted?: GitActivitiesSnapshotCompleted | undefined;
464
+ }
465
+
466
+ export interface GitActivitiesSnapshotCompleted {
467
+ }
468
+
395
469
  export interface AIGitActivity {
396
470
  eventTime: Date | undefined;
397
471
  sourceSystem: string;
@@ -421,6 +495,8 @@ export interface AIGitActivity {
421
495
  prBaseRef: string;
422
496
  prHeadRef: string;
423
497
  mergeCommitSha: string;
498
+ /** UPSERT key for StreamGitActivities; clients replace by it */
499
+ activityId: string;
424
500
  }
425
501
 
426
502
  export interface AITokenUsage {
@@ -905,6 +981,9 @@ function createBaseAISession(): AISession {
905
981
  gitOrgs: [],
906
982
  repositories: [],
907
983
  filesTouched: 0,
984
+ sessionVersion: 0,
985
+ createdAt: undefined,
986
+ updatedAt: undefined,
908
987
  };
909
988
  }
910
989
 
@@ -979,6 +1058,15 @@ export const AISession: MessageFns<AISession> = {
979
1058
  if (message.filesTouched !== 0) {
980
1059
  writer.uint32(184).uint64(message.filesTouched);
981
1060
  }
1061
+ if (message.sessionVersion !== 0) {
1062
+ writer.uint32(192).uint64(message.sessionVersion);
1063
+ }
1064
+ if (message.createdAt !== undefined) {
1065
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(202).fork()).join();
1066
+ }
1067
+ if (message.updatedAt !== undefined) {
1068
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(210).fork()).join();
1069
+ }
982
1070
  return writer;
983
1071
  },
984
1072
 
@@ -1179,6 +1267,30 @@ export const AISession: MessageFns<AISession> = {
1179
1267
  message.filesTouched = longToNumber(reader.uint64());
1180
1268
  continue;
1181
1269
  }
1270
+ case 24: {
1271
+ if (tag !== 192) {
1272
+ break;
1273
+ }
1274
+
1275
+ message.sessionVersion = longToNumber(reader.uint64());
1276
+ continue;
1277
+ }
1278
+ case 25: {
1279
+ if (tag !== 202) {
1280
+ break;
1281
+ }
1282
+
1283
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1284
+ continue;
1285
+ }
1286
+ case 26: {
1287
+ if (tag !== 210) {
1288
+ break;
1289
+ }
1290
+
1291
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1292
+ continue;
1293
+ }
1182
1294
  }
1183
1295
  if ((tag & 7) === 4 || tag === 0) {
1184
1296
  break;
@@ -1290,6 +1402,21 @@ export const AISession: MessageFns<AISession> = {
1290
1402
  : isSet(object.files_touched)
1291
1403
  ? globalThis.Number(object.files_touched)
1292
1404
  : 0,
1405
+ sessionVersion: isSet(object.sessionVersion)
1406
+ ? globalThis.Number(object.sessionVersion)
1407
+ : isSet(object.session_version)
1408
+ ? globalThis.Number(object.session_version)
1409
+ : 0,
1410
+ createdAt: isSet(object.createdAt)
1411
+ ? fromJsonTimestamp(object.createdAt)
1412
+ : isSet(object.created_at)
1413
+ ? fromJsonTimestamp(object.created_at)
1414
+ : undefined,
1415
+ updatedAt: isSet(object.updatedAt)
1416
+ ? fromJsonTimestamp(object.updatedAt)
1417
+ : isSet(object.updated_at)
1418
+ ? fromJsonTimestamp(object.updated_at)
1419
+ : undefined,
1293
1420
  };
1294
1421
  },
1295
1422
 
@@ -1364,6 +1491,15 @@ export const AISession: MessageFns<AISession> = {
1364
1491
  if (message.filesTouched !== 0) {
1365
1492
  obj.filesTouched = Math.round(message.filesTouched);
1366
1493
  }
1494
+ if (message.sessionVersion !== 0) {
1495
+ obj.sessionVersion = Math.round(message.sessionVersion);
1496
+ }
1497
+ if (message.createdAt !== undefined) {
1498
+ obj.createdAt = message.createdAt.toISOString();
1499
+ }
1500
+ if (message.updatedAt !== undefined) {
1501
+ obj.updatedAt = message.updatedAt.toISOString();
1502
+ }
1367
1503
  return obj;
1368
1504
  },
1369
1505
 
@@ -1397,16 +1533,275 @@ export const AISession: MessageFns<AISession> = {
1397
1533
  message.gitOrgs = object.gitOrgs?.map((e) => e) || [];
1398
1534
  message.repositories = object.repositories?.map((e) => e) || [];
1399
1535
  message.filesTouched = object.filesTouched ?? 0;
1536
+ message.sessionVersion = object.sessionVersion ?? 0;
1537
+ message.createdAt = object.createdAt ?? undefined;
1538
+ message.updatedAt = object.updatedAt ?? undefined;
1539
+ return message;
1540
+ },
1541
+ };
1542
+
1543
+ function createBaseStreamSessionsRequest(): StreamSessionsRequest {
1544
+ return { organizationId: "", projectId: "", filter: undefined };
1545
+ }
1546
+
1547
+ export const StreamSessionsRequest: MessageFns<StreamSessionsRequest> = {
1548
+ encode(message: StreamSessionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1549
+ if (message.organizationId !== "") {
1550
+ writer.uint32(10).string(message.organizationId);
1551
+ }
1552
+ if (message.projectId !== "") {
1553
+ writer.uint32(18).string(message.projectId);
1554
+ }
1555
+ if (message.filter !== undefined) {
1556
+ AISessionFilter.encode(message.filter, writer.uint32(26).fork()).join();
1557
+ }
1558
+ return writer;
1559
+ },
1560
+
1561
+ decode(input: BinaryReader | Uint8Array, length?: number): StreamSessionsRequest {
1562
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1563
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1564
+ if (previousRecursionDepth >= 100) {
1565
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1566
+ }
1567
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1568
+ try {
1569
+ const end = length === undefined ? reader.len : reader.pos + length;
1570
+ const message = createBaseStreamSessionsRequest();
1571
+ while (reader.pos < end) {
1572
+ const tag = reader.uint32();
1573
+ switch (tag >>> 3) {
1574
+ case 1: {
1575
+ if (tag !== 10) {
1576
+ break;
1577
+ }
1578
+
1579
+ message.organizationId = reader.string();
1580
+ continue;
1581
+ }
1582
+ case 2: {
1583
+ if (tag !== 18) {
1584
+ break;
1585
+ }
1586
+
1587
+ message.projectId = reader.string();
1588
+ continue;
1589
+ }
1590
+ case 3: {
1591
+ if (tag !== 26) {
1592
+ break;
1593
+ }
1594
+
1595
+ message.filter = AISessionFilter.decode(reader, reader.uint32());
1596
+ continue;
1597
+ }
1598
+ }
1599
+ if ((tag & 7) === 4 || tag === 0) {
1600
+ break;
1601
+ }
1602
+ reader.skip(tag & 7);
1603
+ }
1604
+ return message;
1605
+ } finally {
1606
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1607
+ }
1608
+ },
1609
+
1610
+ fromJSON(object: any): StreamSessionsRequest {
1611
+ return {
1612
+ organizationId: isSet(object.organizationId)
1613
+ ? globalThis.String(object.organizationId)
1614
+ : isSet(object.organization_id)
1615
+ ? globalThis.String(object.organization_id)
1616
+ : "",
1617
+ projectId: isSet(object.projectId)
1618
+ ? globalThis.String(object.projectId)
1619
+ : isSet(object.project_id)
1620
+ ? globalThis.String(object.project_id)
1621
+ : "",
1622
+ filter: isSet(object.filter) ? AISessionFilter.fromJSON(object.filter) : undefined,
1623
+ };
1624
+ },
1625
+
1626
+ toJSON(message: StreamSessionsRequest): unknown {
1627
+ const obj: any = {};
1628
+ if (message.organizationId !== "") {
1629
+ obj.organizationId = message.organizationId;
1630
+ }
1631
+ if (message.projectId !== "") {
1632
+ obj.projectId = message.projectId;
1633
+ }
1634
+ if (message.filter !== undefined) {
1635
+ obj.filter = AISessionFilter.toJSON(message.filter);
1636
+ }
1637
+ return obj;
1638
+ },
1639
+
1640
+ create<I extends Exact<DeepPartial<StreamSessionsRequest>, I>>(base?: I): StreamSessionsRequest {
1641
+ return StreamSessionsRequest.fromPartial(base ?? ({} as any));
1642
+ },
1643
+ fromPartial<I extends Exact<DeepPartial<StreamSessionsRequest>, I>>(object: I): StreamSessionsRequest {
1644
+ const message = createBaseStreamSessionsRequest();
1645
+ message.organizationId = object.organizationId ?? "";
1646
+ message.projectId = object.projectId ?? "";
1647
+ message.filter = (object.filter !== undefined && object.filter !== null)
1648
+ ? AISessionFilter.fromPartial(object.filter)
1649
+ : undefined;
1400
1650
  return message;
1401
1651
  },
1402
1652
  };
1403
1653
 
1404
- function createBaseStreamSessionRequest(): StreamSessionRequest {
1654
+ function createBaseSessionFrame(): SessionFrame {
1655
+ return { upsert: undefined, snapshotCompleted: undefined };
1656
+ }
1657
+
1658
+ export const SessionFrame: MessageFns<SessionFrame> = {
1659
+ encode(message: SessionFrame, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1660
+ if (message.upsert !== undefined) {
1661
+ AISession.encode(message.upsert, writer.uint32(10).fork()).join();
1662
+ }
1663
+ if (message.snapshotCompleted !== undefined) {
1664
+ SessionsSnapshotCompleted.encode(message.snapshotCompleted, writer.uint32(18).fork()).join();
1665
+ }
1666
+ return writer;
1667
+ },
1668
+
1669
+ decode(input: BinaryReader | Uint8Array, length?: number): SessionFrame {
1670
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1671
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1672
+ if (previousRecursionDepth >= 100) {
1673
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1674
+ }
1675
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1676
+ try {
1677
+ const end = length === undefined ? reader.len : reader.pos + length;
1678
+ const message = createBaseSessionFrame();
1679
+ while (reader.pos < end) {
1680
+ const tag = reader.uint32();
1681
+ switch (tag >>> 3) {
1682
+ case 1: {
1683
+ if (tag !== 10) {
1684
+ break;
1685
+ }
1686
+
1687
+ message.upsert = AISession.decode(reader, reader.uint32());
1688
+ continue;
1689
+ }
1690
+ case 2: {
1691
+ if (tag !== 18) {
1692
+ break;
1693
+ }
1694
+
1695
+ message.snapshotCompleted = SessionsSnapshotCompleted.decode(reader, reader.uint32());
1696
+ continue;
1697
+ }
1698
+ }
1699
+ if ((tag & 7) === 4 || tag === 0) {
1700
+ break;
1701
+ }
1702
+ reader.skip(tag & 7);
1703
+ }
1704
+ return message;
1705
+ } finally {
1706
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1707
+ }
1708
+ },
1709
+
1710
+ fromJSON(object: any): SessionFrame {
1711
+ return {
1712
+ upsert: isSet(object.upsert) ? AISession.fromJSON(object.upsert) : undefined,
1713
+ snapshotCompleted: isSet(object.snapshotCompleted)
1714
+ ? SessionsSnapshotCompleted.fromJSON(object.snapshotCompleted)
1715
+ : isSet(object.snapshot_completed)
1716
+ ? SessionsSnapshotCompleted.fromJSON(object.snapshot_completed)
1717
+ : undefined,
1718
+ };
1719
+ },
1720
+
1721
+ toJSON(message: SessionFrame): unknown {
1722
+ const obj: any = {};
1723
+ if (message.upsert !== undefined) {
1724
+ obj.upsert = AISession.toJSON(message.upsert);
1725
+ }
1726
+ if (message.snapshotCompleted !== undefined) {
1727
+ obj.snapshotCompleted = SessionsSnapshotCompleted.toJSON(message.snapshotCompleted);
1728
+ }
1729
+ return obj;
1730
+ },
1731
+
1732
+ create<I extends Exact<DeepPartial<SessionFrame>, I>>(base?: I): SessionFrame {
1733
+ return SessionFrame.fromPartial(base ?? ({} as any));
1734
+ },
1735
+ fromPartial<I extends Exact<DeepPartial<SessionFrame>, I>>(object: I): SessionFrame {
1736
+ const message = createBaseSessionFrame();
1737
+ message.upsert = (object.upsert !== undefined && object.upsert !== null)
1738
+ ? AISession.fromPartial(object.upsert)
1739
+ : undefined;
1740
+ message.snapshotCompleted = (object.snapshotCompleted !== undefined && object.snapshotCompleted !== null)
1741
+ ? SessionsSnapshotCompleted.fromPartial(object.snapshotCompleted)
1742
+ : undefined;
1743
+ return message;
1744
+ },
1745
+ };
1746
+
1747
+ function createBaseSessionsSnapshotCompleted(): SessionsSnapshotCompleted {
1748
+ return {};
1749
+ }
1750
+
1751
+ export const SessionsSnapshotCompleted: MessageFns<SessionsSnapshotCompleted> = {
1752
+ encode(_: SessionsSnapshotCompleted, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1753
+ return writer;
1754
+ },
1755
+
1756
+ decode(input: BinaryReader | Uint8Array, length?: number): SessionsSnapshotCompleted {
1757
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1758
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1759
+ if (previousRecursionDepth >= 100) {
1760
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1761
+ }
1762
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1763
+ try {
1764
+ const end = length === undefined ? reader.len : reader.pos + length;
1765
+ const message = createBaseSessionsSnapshotCompleted();
1766
+ while (reader.pos < end) {
1767
+ const tag = reader.uint32();
1768
+ switch (tag >>> 3) {
1769
+ }
1770
+ if ((tag & 7) === 4 || tag === 0) {
1771
+ break;
1772
+ }
1773
+ reader.skip(tag & 7);
1774
+ }
1775
+ return message;
1776
+ } finally {
1777
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1778
+ }
1779
+ },
1780
+
1781
+ fromJSON(_: any): SessionsSnapshotCompleted {
1782
+ return {};
1783
+ },
1784
+
1785
+ toJSON(_: SessionsSnapshotCompleted): unknown {
1786
+ const obj: any = {};
1787
+ return obj;
1788
+ },
1789
+
1790
+ create<I extends Exact<DeepPartial<SessionsSnapshotCompleted>, I>>(base?: I): SessionsSnapshotCompleted {
1791
+ return SessionsSnapshotCompleted.fromPartial(base ?? ({} as any));
1792
+ },
1793
+ fromPartial<I extends Exact<DeepPartial<SessionsSnapshotCompleted>, I>>(_: I): SessionsSnapshotCompleted {
1794
+ const message = createBaseSessionsSnapshotCompleted();
1795
+ return message;
1796
+ },
1797
+ };
1798
+
1799
+ function createBaseListSessionEventsRequest(): ListSessionEventsRequest {
1405
1800
  return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
1406
1801
  }
1407
1802
 
1408
- export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1409
- encode(message: StreamSessionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1803
+ export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
1804
+ encode(message: ListSessionEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1410
1805
  if (message.organizationId !== "") {
1411
1806
  writer.uint32(10).string(message.organizationId);
1412
1807
  }
@@ -1422,7 +1817,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1422
1817
  return writer;
1423
1818
  },
1424
1819
 
1425
- decode(input: BinaryReader | Uint8Array, length?: number): StreamSessionRequest {
1820
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSessionEventsRequest {
1426
1821
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1427
1822
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1428
1823
  if (previousRecursionDepth >= 100) {
@@ -1431,7 +1826,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1431
1826
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1432
1827
  try {
1433
1828
  const end = length === undefined ? reader.len : reader.pos + length;
1434
- const message = createBaseStreamSessionRequest();
1829
+ const message = createBaseListSessionEventsRequest();
1435
1830
  while (reader.pos < end) {
1436
1831
  const tag = reader.uint32();
1437
1832
  switch (tag >>> 3) {
@@ -1479,7 +1874,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1479
1874
  }
1480
1875
  },
1481
1876
 
1482
- fromJSON(object: any): StreamSessionRequest {
1877
+ fromJSON(object: any): ListSessionEventsRequest {
1483
1878
  return {
1484
1879
  organizationId: isSet(object.organizationId)
1485
1880
  ? globalThis.String(object.organizationId)
@@ -1504,7 +1899,7 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1504
1899
  };
1505
1900
  },
1506
1901
 
1507
- toJSON(message: StreamSessionRequest): unknown {
1902
+ toJSON(message: ListSessionEventsRequest): unknown {
1508
1903
  const obj: any = {};
1509
1904
  if (message.organizationId !== "") {
1510
1905
  obj.organizationId = message.organizationId;
@@ -1521,11 +1916,231 @@ export const StreamSessionRequest: MessageFns<StreamSessionRequest> = {
1521
1916
  return obj;
1522
1917
  },
1523
1918
 
1524
- create<I extends Exact<DeepPartial<StreamSessionRequest>, I>>(base?: I): StreamSessionRequest {
1525
- return StreamSessionRequest.fromPartial(base ?? ({} as any));
1919
+ create<I extends Exact<DeepPartial<ListSessionEventsRequest>, I>>(base?: I): ListSessionEventsRequest {
1920
+ return ListSessionEventsRequest.fromPartial(base ?? ({} as any));
1526
1921
  },
1527
- fromPartial<I extends Exact<DeepPartial<StreamSessionRequest>, I>>(object: I): StreamSessionRequest {
1528
- const message = createBaseStreamSessionRequest();
1922
+ fromPartial<I extends Exact<DeepPartial<ListSessionEventsRequest>, I>>(object: I): ListSessionEventsRequest {
1923
+ const message = createBaseListSessionEventsRequest();
1924
+ message.organizationId = object.organizationId ?? "";
1925
+ message.projectId = object.projectId ?? "";
1926
+ message.routingKey = object.routingKey ?? "";
1927
+ message.sourceSystem = object.sourceSystem ?? "";
1928
+ return message;
1929
+ },
1930
+ };
1931
+
1932
+ function createBaseListSessionEventsResponse(): ListSessionEventsResponse {
1933
+ return { status: undefined, events: [] };
1934
+ }
1935
+
1936
+ export const ListSessionEventsResponse: MessageFns<ListSessionEventsResponse> = {
1937
+ encode(message: ListSessionEventsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1938
+ if (message.status !== undefined) {
1939
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1940
+ }
1941
+ for (const v of message.events) {
1942
+ AISessionEvent.encode(v!, writer.uint32(18).fork()).join();
1943
+ }
1944
+ return writer;
1945
+ },
1946
+
1947
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSessionEventsResponse {
1948
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1949
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1950
+ if (previousRecursionDepth >= 100) {
1951
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1952
+ }
1953
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1954
+ try {
1955
+ const end = length === undefined ? reader.len : reader.pos + length;
1956
+ const message = createBaseListSessionEventsResponse();
1957
+ while (reader.pos < end) {
1958
+ const tag = reader.uint32();
1959
+ switch (tag >>> 3) {
1960
+ case 1: {
1961
+ if (tag !== 10) {
1962
+ break;
1963
+ }
1964
+
1965
+ message.status = ResponseStatus.decode(reader, reader.uint32());
1966
+ continue;
1967
+ }
1968
+ case 2: {
1969
+ if (tag !== 18) {
1970
+ break;
1971
+ }
1972
+
1973
+ message.events.push(AISessionEvent.decode(reader, reader.uint32()));
1974
+ continue;
1975
+ }
1976
+ }
1977
+ if ((tag & 7) === 4 || tag === 0) {
1978
+ break;
1979
+ }
1980
+ reader.skip(tag & 7);
1981
+ }
1982
+ return message;
1983
+ } finally {
1984
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1985
+ }
1986
+ },
1987
+
1988
+ fromJSON(object: any): ListSessionEventsResponse {
1989
+ return {
1990
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1991
+ events: globalThis.Array.isArray(object?.events) ? object.events.map((e: any) => AISessionEvent.fromJSON(e)) : [],
1992
+ };
1993
+ },
1994
+
1995
+ toJSON(message: ListSessionEventsResponse): unknown {
1996
+ const obj: any = {};
1997
+ if (message.status !== undefined) {
1998
+ obj.status = ResponseStatus.toJSON(message.status);
1999
+ }
2000
+ if (message.events?.length) {
2001
+ obj.events = message.events.map((e) => AISessionEvent.toJSON(e));
2002
+ }
2003
+ return obj;
2004
+ },
2005
+
2006
+ create<I extends Exact<DeepPartial<ListSessionEventsResponse>, I>>(base?: I): ListSessionEventsResponse {
2007
+ return ListSessionEventsResponse.fromPartial(base ?? ({} as any));
2008
+ },
2009
+ fromPartial<I extends Exact<DeepPartial<ListSessionEventsResponse>, I>>(object: I): ListSessionEventsResponse {
2010
+ const message = createBaseListSessionEventsResponse();
2011
+ message.status = (object.status !== undefined && object.status !== null)
2012
+ ? ResponseStatus.fromPartial(object.status)
2013
+ : undefined;
2014
+ message.events = object.events?.map((e) => AISessionEvent.fromPartial(e)) || [];
2015
+ return message;
2016
+ },
2017
+ };
2018
+
2019
+ function createBaseStreamSessionEventsRequest(): StreamSessionEventsRequest {
2020
+ return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
2021
+ }
2022
+
2023
+ export const StreamSessionEventsRequest: MessageFns<StreamSessionEventsRequest> = {
2024
+ encode(message: StreamSessionEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2025
+ if (message.organizationId !== "") {
2026
+ writer.uint32(10).string(message.organizationId);
2027
+ }
2028
+ if (message.projectId !== "") {
2029
+ writer.uint32(18).string(message.projectId);
2030
+ }
2031
+ if (message.routingKey !== "") {
2032
+ writer.uint32(26).string(message.routingKey);
2033
+ }
2034
+ if (message.sourceSystem !== "") {
2035
+ writer.uint32(34).string(message.sourceSystem);
2036
+ }
2037
+ return writer;
2038
+ },
2039
+
2040
+ decode(input: BinaryReader | Uint8Array, length?: number): StreamSessionEventsRequest {
2041
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2042
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2043
+ if (previousRecursionDepth >= 100) {
2044
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2045
+ }
2046
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2047
+ try {
2048
+ const end = length === undefined ? reader.len : reader.pos + length;
2049
+ const message = createBaseStreamSessionEventsRequest();
2050
+ while (reader.pos < end) {
2051
+ const tag = reader.uint32();
2052
+ switch (tag >>> 3) {
2053
+ case 1: {
2054
+ if (tag !== 10) {
2055
+ break;
2056
+ }
2057
+
2058
+ message.organizationId = reader.string();
2059
+ continue;
2060
+ }
2061
+ case 2: {
2062
+ if (tag !== 18) {
2063
+ break;
2064
+ }
2065
+
2066
+ message.projectId = reader.string();
2067
+ continue;
2068
+ }
2069
+ case 3: {
2070
+ if (tag !== 26) {
2071
+ break;
2072
+ }
2073
+
2074
+ message.routingKey = reader.string();
2075
+ continue;
2076
+ }
2077
+ case 4: {
2078
+ if (tag !== 34) {
2079
+ break;
2080
+ }
2081
+
2082
+ message.sourceSystem = reader.string();
2083
+ continue;
2084
+ }
2085
+ }
2086
+ if ((tag & 7) === 4 || tag === 0) {
2087
+ break;
2088
+ }
2089
+ reader.skip(tag & 7);
2090
+ }
2091
+ return message;
2092
+ } finally {
2093
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2094
+ }
2095
+ },
2096
+
2097
+ fromJSON(object: any): StreamSessionEventsRequest {
2098
+ return {
2099
+ organizationId: isSet(object.organizationId)
2100
+ ? globalThis.String(object.organizationId)
2101
+ : isSet(object.organization_id)
2102
+ ? globalThis.String(object.organization_id)
2103
+ : "",
2104
+ projectId: isSet(object.projectId)
2105
+ ? globalThis.String(object.projectId)
2106
+ : isSet(object.project_id)
2107
+ ? globalThis.String(object.project_id)
2108
+ : "",
2109
+ routingKey: isSet(object.routingKey)
2110
+ ? globalThis.String(object.routingKey)
2111
+ : isSet(object.routing_key)
2112
+ ? globalThis.String(object.routing_key)
2113
+ : "",
2114
+ sourceSystem: isSet(object.sourceSystem)
2115
+ ? globalThis.String(object.sourceSystem)
2116
+ : isSet(object.source_system)
2117
+ ? globalThis.String(object.source_system)
2118
+ : "",
2119
+ };
2120
+ },
2121
+
2122
+ toJSON(message: StreamSessionEventsRequest): unknown {
2123
+ const obj: any = {};
2124
+ if (message.organizationId !== "") {
2125
+ obj.organizationId = message.organizationId;
2126
+ }
2127
+ if (message.projectId !== "") {
2128
+ obj.projectId = message.projectId;
2129
+ }
2130
+ if (message.routingKey !== "") {
2131
+ obj.routingKey = message.routingKey;
2132
+ }
2133
+ if (message.sourceSystem !== "") {
2134
+ obj.sourceSystem = message.sourceSystem;
2135
+ }
2136
+ return obj;
2137
+ },
2138
+
2139
+ create<I extends Exact<DeepPartial<StreamSessionEventsRequest>, I>>(base?: I): StreamSessionEventsRequest {
2140
+ return StreamSessionEventsRequest.fromPartial(base ?? ({} as any));
2141
+ },
2142
+ fromPartial<I extends Exact<DeepPartial<StreamSessionEventsRequest>, I>>(object: I): StreamSessionEventsRequest {
2143
+ const message = createBaseStreamSessionEventsRequest();
1529
2144
  message.organizationId = object.organizationId ?? "";
1530
2145
  message.projectId = object.projectId ?? "";
1531
2146
  message.routingKey = object.routingKey ?? "";
@@ -2299,7 +2914,7 @@ export const ListPrincipalsRequest: MessageFns<ListPrincipalsRequest> = {
2299
2914
  };
2300
2915
 
2301
2916
  function createBaseListPrincipalsResponse(): ListPrincipalsResponse {
2302
- return { status: undefined, principals: [], nextPageToken: "" };
2917
+ return { status: undefined, principals: [], nextPageToken: "", totalCount: undefined };
2303
2918
  }
2304
2919
 
2305
2920
  export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
@@ -2313,6 +2928,9 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
2313
2928
  if (message.nextPageToken !== "") {
2314
2929
  writer.uint32(26).string(message.nextPageToken);
2315
2930
  }
2931
+ if (message.totalCount !== undefined) {
2932
+ writer.uint32(32).int64(message.totalCount);
2933
+ }
2316
2934
  return writer;
2317
2935
  },
2318
2936
 
@@ -2353,6 +2971,14 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
2353
2971
  message.nextPageToken = reader.string();
2354
2972
  continue;
2355
2973
  }
2974
+ case 4: {
2975
+ if (tag !== 32) {
2976
+ break;
2977
+ }
2978
+
2979
+ message.totalCount = longToNumber(reader.int64());
2980
+ continue;
2981
+ }
2356
2982
  }
2357
2983
  if ((tag & 7) === 4 || tag === 0) {
2358
2984
  break;
@@ -2376,6 +3002,11 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
2376
3002
  : isSet(object.next_page_token)
2377
3003
  ? globalThis.String(object.next_page_token)
2378
3004
  : "",
3005
+ totalCount: isSet(object.totalCount)
3006
+ ? globalThis.Number(object.totalCount)
3007
+ : isSet(object.total_count)
3008
+ ? globalThis.Number(object.total_count)
3009
+ : undefined,
2379
3010
  };
2380
3011
  },
2381
3012
 
@@ -2390,6 +3021,9 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
2390
3021
  if (message.nextPageToken !== "") {
2391
3022
  obj.nextPageToken = message.nextPageToken;
2392
3023
  }
3024
+ if (message.totalCount !== undefined) {
3025
+ obj.totalCount = Math.round(message.totalCount);
3026
+ }
2393
3027
  return obj;
2394
3028
  },
2395
3029
 
@@ -2403,6 +3037,7 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
2403
3037
  : undefined;
2404
3038
  message.principals = object.principals?.map((e) => AIPrincipal.fromPartial(e)) || [];
2405
3039
  message.nextPageToken = object.nextPageToken ?? "";
3040
+ message.totalCount = object.totalCount ?? undefined;
2406
3041
  return message;
2407
3042
  },
2408
3043
  };
@@ -3016,6 +3651,284 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
3016
3651
  },
3017
3652
  };
3018
3653
 
3654
+ function createBaseStreamGitActivitiesRequest(): StreamGitActivitiesRequest {
3655
+ return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
3656
+ }
3657
+
3658
+ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest> = {
3659
+ encode(message: StreamGitActivitiesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3660
+ if (message.organizationId !== "") {
3661
+ writer.uint32(10).string(message.organizationId);
3662
+ }
3663
+ if (message.projectId !== "") {
3664
+ writer.uint32(18).string(message.projectId);
3665
+ }
3666
+ if (message.routingKey !== "") {
3667
+ writer.uint32(26).string(message.routingKey);
3668
+ }
3669
+ if (message.sourceSystem !== "") {
3670
+ writer.uint32(34).string(message.sourceSystem);
3671
+ }
3672
+ return writer;
3673
+ },
3674
+
3675
+ decode(input: BinaryReader | Uint8Array, length?: number): StreamGitActivitiesRequest {
3676
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3677
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3678
+ if (previousRecursionDepth >= 100) {
3679
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3680
+ }
3681
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3682
+ try {
3683
+ const end = length === undefined ? reader.len : reader.pos + length;
3684
+ const message = createBaseStreamGitActivitiesRequest();
3685
+ while (reader.pos < end) {
3686
+ const tag = reader.uint32();
3687
+ switch (tag >>> 3) {
3688
+ case 1: {
3689
+ if (tag !== 10) {
3690
+ break;
3691
+ }
3692
+
3693
+ message.organizationId = reader.string();
3694
+ continue;
3695
+ }
3696
+ case 2: {
3697
+ if (tag !== 18) {
3698
+ break;
3699
+ }
3700
+
3701
+ message.projectId = reader.string();
3702
+ continue;
3703
+ }
3704
+ case 3: {
3705
+ if (tag !== 26) {
3706
+ break;
3707
+ }
3708
+
3709
+ message.routingKey = reader.string();
3710
+ continue;
3711
+ }
3712
+ case 4: {
3713
+ if (tag !== 34) {
3714
+ break;
3715
+ }
3716
+
3717
+ message.sourceSystem = reader.string();
3718
+ continue;
3719
+ }
3720
+ }
3721
+ if ((tag & 7) === 4 || tag === 0) {
3722
+ break;
3723
+ }
3724
+ reader.skip(tag & 7);
3725
+ }
3726
+ return message;
3727
+ } finally {
3728
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3729
+ }
3730
+ },
3731
+
3732
+ fromJSON(object: any): StreamGitActivitiesRequest {
3733
+ return {
3734
+ organizationId: isSet(object.organizationId)
3735
+ ? globalThis.String(object.organizationId)
3736
+ : isSet(object.organization_id)
3737
+ ? globalThis.String(object.organization_id)
3738
+ : "",
3739
+ projectId: isSet(object.projectId)
3740
+ ? globalThis.String(object.projectId)
3741
+ : isSet(object.project_id)
3742
+ ? globalThis.String(object.project_id)
3743
+ : "",
3744
+ routingKey: isSet(object.routingKey)
3745
+ ? globalThis.String(object.routingKey)
3746
+ : isSet(object.routing_key)
3747
+ ? globalThis.String(object.routing_key)
3748
+ : "",
3749
+ sourceSystem: isSet(object.sourceSystem)
3750
+ ? globalThis.String(object.sourceSystem)
3751
+ : isSet(object.source_system)
3752
+ ? globalThis.String(object.source_system)
3753
+ : "",
3754
+ };
3755
+ },
3756
+
3757
+ toJSON(message: StreamGitActivitiesRequest): unknown {
3758
+ const obj: any = {};
3759
+ if (message.organizationId !== "") {
3760
+ obj.organizationId = message.organizationId;
3761
+ }
3762
+ if (message.projectId !== "") {
3763
+ obj.projectId = message.projectId;
3764
+ }
3765
+ if (message.routingKey !== "") {
3766
+ obj.routingKey = message.routingKey;
3767
+ }
3768
+ if (message.sourceSystem !== "") {
3769
+ obj.sourceSystem = message.sourceSystem;
3770
+ }
3771
+ return obj;
3772
+ },
3773
+
3774
+ create<I extends Exact<DeepPartial<StreamGitActivitiesRequest>, I>>(base?: I): StreamGitActivitiesRequest {
3775
+ return StreamGitActivitiesRequest.fromPartial(base ?? ({} as any));
3776
+ },
3777
+ fromPartial<I extends Exact<DeepPartial<StreamGitActivitiesRequest>, I>>(object: I): StreamGitActivitiesRequest {
3778
+ const message = createBaseStreamGitActivitiesRequest();
3779
+ message.organizationId = object.organizationId ?? "";
3780
+ message.projectId = object.projectId ?? "";
3781
+ message.routingKey = object.routingKey ?? "";
3782
+ message.sourceSystem = object.sourceSystem ?? "";
3783
+ return message;
3784
+ },
3785
+ };
3786
+
3787
+ function createBaseGitActivityFrame(): GitActivityFrame {
3788
+ return { upsert: undefined, snapshotCompleted: undefined };
3789
+ }
3790
+
3791
+ export const GitActivityFrame: MessageFns<GitActivityFrame> = {
3792
+ encode(message: GitActivityFrame, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3793
+ if (message.upsert !== undefined) {
3794
+ AIGitActivity.encode(message.upsert, writer.uint32(10).fork()).join();
3795
+ }
3796
+ if (message.snapshotCompleted !== undefined) {
3797
+ GitActivitiesSnapshotCompleted.encode(message.snapshotCompleted, writer.uint32(18).fork()).join();
3798
+ }
3799
+ return writer;
3800
+ },
3801
+
3802
+ decode(input: BinaryReader | Uint8Array, length?: number): GitActivityFrame {
3803
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3804
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3805
+ if (previousRecursionDepth >= 100) {
3806
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3807
+ }
3808
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3809
+ try {
3810
+ const end = length === undefined ? reader.len : reader.pos + length;
3811
+ const message = createBaseGitActivityFrame();
3812
+ while (reader.pos < end) {
3813
+ const tag = reader.uint32();
3814
+ switch (tag >>> 3) {
3815
+ case 1: {
3816
+ if (tag !== 10) {
3817
+ break;
3818
+ }
3819
+
3820
+ message.upsert = AIGitActivity.decode(reader, reader.uint32());
3821
+ continue;
3822
+ }
3823
+ case 2: {
3824
+ if (tag !== 18) {
3825
+ break;
3826
+ }
3827
+
3828
+ message.snapshotCompleted = GitActivitiesSnapshotCompleted.decode(reader, reader.uint32());
3829
+ continue;
3830
+ }
3831
+ }
3832
+ if ((tag & 7) === 4 || tag === 0) {
3833
+ break;
3834
+ }
3835
+ reader.skip(tag & 7);
3836
+ }
3837
+ return message;
3838
+ } finally {
3839
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3840
+ }
3841
+ },
3842
+
3843
+ fromJSON(object: any): GitActivityFrame {
3844
+ return {
3845
+ upsert: isSet(object.upsert) ? AIGitActivity.fromJSON(object.upsert) : undefined,
3846
+ snapshotCompleted: isSet(object.snapshotCompleted)
3847
+ ? GitActivitiesSnapshotCompleted.fromJSON(object.snapshotCompleted)
3848
+ : isSet(object.snapshot_completed)
3849
+ ? GitActivitiesSnapshotCompleted.fromJSON(object.snapshot_completed)
3850
+ : undefined,
3851
+ };
3852
+ },
3853
+
3854
+ toJSON(message: GitActivityFrame): unknown {
3855
+ const obj: any = {};
3856
+ if (message.upsert !== undefined) {
3857
+ obj.upsert = AIGitActivity.toJSON(message.upsert);
3858
+ }
3859
+ if (message.snapshotCompleted !== undefined) {
3860
+ obj.snapshotCompleted = GitActivitiesSnapshotCompleted.toJSON(message.snapshotCompleted);
3861
+ }
3862
+ return obj;
3863
+ },
3864
+
3865
+ create<I extends Exact<DeepPartial<GitActivityFrame>, I>>(base?: I): GitActivityFrame {
3866
+ return GitActivityFrame.fromPartial(base ?? ({} as any));
3867
+ },
3868
+ fromPartial<I extends Exact<DeepPartial<GitActivityFrame>, I>>(object: I): GitActivityFrame {
3869
+ const message = createBaseGitActivityFrame();
3870
+ message.upsert = (object.upsert !== undefined && object.upsert !== null)
3871
+ ? AIGitActivity.fromPartial(object.upsert)
3872
+ : undefined;
3873
+ message.snapshotCompleted = (object.snapshotCompleted !== undefined && object.snapshotCompleted !== null)
3874
+ ? GitActivitiesSnapshotCompleted.fromPartial(object.snapshotCompleted)
3875
+ : undefined;
3876
+ return message;
3877
+ },
3878
+ };
3879
+
3880
+ function createBaseGitActivitiesSnapshotCompleted(): GitActivitiesSnapshotCompleted {
3881
+ return {};
3882
+ }
3883
+
3884
+ export const GitActivitiesSnapshotCompleted: MessageFns<GitActivitiesSnapshotCompleted> = {
3885
+ encode(_: GitActivitiesSnapshotCompleted, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3886
+ return writer;
3887
+ },
3888
+
3889
+ decode(input: BinaryReader | Uint8Array, length?: number): GitActivitiesSnapshotCompleted {
3890
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3891
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3892
+ if (previousRecursionDepth >= 100) {
3893
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3894
+ }
3895
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3896
+ try {
3897
+ const end = length === undefined ? reader.len : reader.pos + length;
3898
+ const message = createBaseGitActivitiesSnapshotCompleted();
3899
+ while (reader.pos < end) {
3900
+ const tag = reader.uint32();
3901
+ switch (tag >>> 3) {
3902
+ }
3903
+ if ((tag & 7) === 4 || tag === 0) {
3904
+ break;
3905
+ }
3906
+ reader.skip(tag & 7);
3907
+ }
3908
+ return message;
3909
+ } finally {
3910
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3911
+ }
3912
+ },
3913
+
3914
+ fromJSON(_: any): GitActivitiesSnapshotCompleted {
3915
+ return {};
3916
+ },
3917
+
3918
+ toJSON(_: GitActivitiesSnapshotCompleted): unknown {
3919
+ const obj: any = {};
3920
+ return obj;
3921
+ },
3922
+
3923
+ create<I extends Exact<DeepPartial<GitActivitiesSnapshotCompleted>, I>>(base?: I): GitActivitiesSnapshotCompleted {
3924
+ return GitActivitiesSnapshotCompleted.fromPartial(base ?? ({} as any));
3925
+ },
3926
+ fromPartial<I extends Exact<DeepPartial<GitActivitiesSnapshotCompleted>, I>>(_: I): GitActivitiesSnapshotCompleted {
3927
+ const message = createBaseGitActivitiesSnapshotCompleted();
3928
+ return message;
3929
+ },
3930
+ };
3931
+
3019
3932
  function createBaseAIGitActivity(): AIGitActivity {
3020
3933
  return {
3021
3934
  eventTime: undefined,
@@ -3046,6 +3959,7 @@ function createBaseAIGitActivity(): AIGitActivity {
3046
3959
  prBaseRef: "",
3047
3960
  prHeadRef: "",
3048
3961
  mergeCommitSha: "",
3962
+ activityId: "",
3049
3963
  };
3050
3964
  }
3051
3965
 
@@ -3135,6 +4049,9 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
3135
4049
  if (message.mergeCommitSha !== "") {
3136
4050
  writer.uint32(226).string(message.mergeCommitSha);
3137
4051
  }
4052
+ if (message.activityId !== "") {
4053
+ writer.uint32(234).string(message.activityId);
4054
+ }
3138
4055
  return writer;
3139
4056
  },
3140
4057
 
@@ -3375,6 +4292,14 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
3375
4292
  message.mergeCommitSha = reader.string();
3376
4293
  continue;
3377
4294
  }
4295
+ case 29: {
4296
+ if (tag !== 234) {
4297
+ break;
4298
+ }
4299
+
4300
+ message.activityId = reader.string();
4301
+ continue;
4302
+ }
3378
4303
  }
3379
4304
  if ((tag & 7) === 4 || tag === 0) {
3380
4305
  break;
@@ -3511,6 +4436,11 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
3511
4436
  : isSet(object.merge_commit_sha)
3512
4437
  ? globalThis.String(object.merge_commit_sha)
3513
4438
  : "",
4439
+ activityId: isSet(object.activityId)
4440
+ ? globalThis.String(object.activityId)
4441
+ : isSet(object.activity_id)
4442
+ ? globalThis.String(object.activity_id)
4443
+ : "",
3514
4444
  };
3515
4445
  },
3516
4446
 
@@ -3600,6 +4530,9 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
3600
4530
  if (message.mergeCommitSha !== "") {
3601
4531
  obj.mergeCommitSha = message.mergeCommitSha;
3602
4532
  }
4533
+ if (message.activityId !== "") {
4534
+ obj.activityId = message.activityId;
4535
+ }
3603
4536
  return obj;
3604
4537
  },
3605
4538
 
@@ -3636,6 +4569,7 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
3636
4569
  message.prBaseRef = object.prBaseRef ?? "";
3637
4570
  message.prHeadRef = object.prHeadRef ?? "";
3638
4571
  message.mergeCommitSha = object.mergeCommitSha ?? "";
4572
+ message.activityId = object.activityId ?? "";
3639
4573
  return message;
3640
4574
  },
3641
4575
  };
@@ -3803,10 +4737,26 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
3803
4737
  */
3804
4738
  export interface AIGatewayService {
3805
4739
  ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse>;
3806
- StreamSession(request: StreamSessionRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
4740
+ /**
4741
+ * Live UPSERT catalog over the same slice as ListSessions (same filter): an
4742
+ * UPSERT per session keyed by routing_key + source_system, a nonterminal
4743
+ * SessionsSnapshotCompleted, then new sessions as created + rollup updates until
4744
+ * cancel. UPSERT-only (no removal frame): a session whose rollup shifts out of the
4745
+ * filter simply stops being re-sent, so this notifies about currently-matching rows
4746
+ * rather than maintaining a filtered catalog. Best-effort live delta; ListSessions
4747
+ * is the authoritative catalog.
4748
+ */
4749
+ StreamSessions(request: StreamSessionsRequest, metadata?: Metadata): Observable<SessionFrame>;
4750
+ ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse>;
4751
+ StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
3807
4752
  ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
3808
4753
  UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
3809
4754
  ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
4755
+ /**
4756
+ * Live stream of one session's git/GitHub actions (UPSERT per activity keyed by
4757
+ * activity_id, a nonterminal GitActivitiesSnapshotCompleted, then open until cancel).
4758
+ */
4759
+ StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame>;
3810
4760
  }
3811
4761
 
3812
4762
  export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
@@ -3817,10 +4767,13 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
3817
4767
  this.service = opts?.service || AIGatewayServiceServiceName;
3818
4768
  this.rpc = rpc;
3819
4769
  this.ListSessions = this.ListSessions.bind(this);
3820
- this.StreamSession = this.StreamSession.bind(this);
4770
+ this.StreamSessions = this.StreamSessions.bind(this);
4771
+ this.ListSessionEvents = this.ListSessionEvents.bind(this);
4772
+ this.StreamSessionEvents = this.StreamSessionEvents.bind(this);
3821
4773
  this.ListPrincipals = this.ListPrincipals.bind(this);
3822
4774
  this.UpdatePrincipal = this.UpdatePrincipal.bind(this);
3823
4775
  this.ListGitActivities = this.ListGitActivities.bind(this);
4776
+ this.StreamGitActivities = this.StreamGitActivities.bind(this);
3824
4777
  }
3825
4778
  ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
3826
4779
  const data = ListSessionsRequest.encode(request).finish();
@@ -3828,9 +4781,21 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
3828
4781
  return promise.then((data) => ListSessionsResponse.decode(new BinaryReader(data)));
3829
4782
  }
3830
4783
 
3831
- StreamSession(request: StreamSessionRequest, metadata?: Metadata): Observable<AISessionEventEnvelope> {
3832
- const data = StreamSessionRequest.encode(request).finish();
3833
- const result = this.rpc.serverStreamingRequest(this.service, "StreamSession", data, metadata);
4784
+ StreamSessions(request: StreamSessionsRequest, metadata?: Metadata): Observable<SessionFrame> {
4785
+ const data = StreamSessionsRequest.encode(request).finish();
4786
+ const result = this.rpc.serverStreamingRequest(this.service, "StreamSessions", data, metadata);
4787
+ return result.pipe(map((data) => SessionFrame.decode(new BinaryReader(data))));
4788
+ }
4789
+
4790
+ ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse> {
4791
+ const data = ListSessionEventsRequest.encode(request).finish();
4792
+ const promise = this.rpc.request(this.service, "ListSessionEvents", data, metadata);
4793
+ return promise.then((data) => ListSessionEventsResponse.decode(new BinaryReader(data)));
4794
+ }
4795
+
4796
+ StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope> {
4797
+ const data = StreamSessionEventsRequest.encode(request).finish();
4798
+ const result = this.rpc.serverStreamingRequest(this.service, "StreamSessionEvents", data, metadata);
3834
4799
  return result.pipe(map((data) => AISessionEventEnvelope.decode(new BinaryReader(data))));
3835
4800
  }
3836
4801
 
@@ -3851,6 +4816,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
3851
4816
  const promise = this.rpc.request(this.service, "ListGitActivities", data, metadata);
3852
4817
  return promise.then((data) => ListGitActivitiesResponse.decode(new BinaryReader(data)));
3853
4818
  }
4819
+
4820
+ StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame> {
4821
+ const data = StreamGitActivitiesRequest.encode(request).finish();
4822
+ const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivities", data, metadata);
4823
+ return result.pipe(map((data) => GitActivityFrame.decode(new BinaryReader(data))));
4824
+ }
3854
4825
  }
3855
4826
 
3856
4827
  interface Rpc {