@miradorlabs/web-grpc 2.42.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.
- package/google/protobuf/timestamp.ts +1 -1
- package/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value.ts +1 -1
- package/proto/gateway/common/v1/status.ts +1 -1
- package/proto/gateway/common/v1/types.ts +1 -1
- package/proto/gateway/web/v1/account_gateway.ts +1 -1
- package/proto/gateway/web/v1/ai_gateway.ts +399 -2
- package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +40 -0
- package/proto/gateway/web/v1/ai_gateway_pb.js +855 -68
- package/proto/gateway/web/v1/attribute_value.ts +1 -1
- package/proto/gateway/web/v1/chain_gateway.ts +1 -1
- package/proto/gateway/web/v1/common.ts +1 -1
- package/proto/gateway/web/v1/derived_metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/integration_gateway.ts +1 -1
- package/proto/gateway/web/v1/log_gateway.ts +1 -1
- package/proto/gateway/web/v1/market_gateway.ts +1 -1
- package/proto/gateway/web/v1/metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
- package/proto/gateway/web/v1/plan_gateway.ts +1 -1
- package/proto/gateway/web/v1/rule_gateway.ts +1 -1
- package/proto/gateway/web/v1/slo_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_measure_gateway.ts +1 -1
package/package.json
CHANGED
|
@@ -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.
|
|
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,6 +312,34 @@ 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;
|
|
323
|
+
}
|
|
324
|
+
|
|
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 {
|
|
305
343
|
}
|
|
306
344
|
|
|
307
345
|
export interface ListSessionEventsRequest {
|
|
@@ -358,6 +396,7 @@ export interface AIContentPart {
|
|
|
358
396
|
export interface ListPrincipalsRequest {
|
|
359
397
|
organizationId: string;
|
|
360
398
|
projectId: string;
|
|
399
|
+
/** Structured filter (both optional, ANDed): kind and source_system, exact match. */
|
|
361
400
|
kind?: AIPrincipalKind | undefined;
|
|
362
401
|
sourceSystem: string;
|
|
363
402
|
pageSize: number;
|
|
@@ -368,6 +407,8 @@ export interface ListPrincipalsResponse {
|
|
|
368
407
|
status: ResponseStatus | undefined;
|
|
369
408
|
principals: AIPrincipal[];
|
|
370
409
|
nextPageToken: string;
|
|
410
|
+
/** Exact total for the filter, computed on the first page only. */
|
|
411
|
+
totalCount?: number | undefined;
|
|
371
412
|
}
|
|
372
413
|
|
|
373
414
|
export interface AIPrincipal {
|
|
@@ -940,6 +981,9 @@ function createBaseAISession(): AISession {
|
|
|
940
981
|
gitOrgs: [],
|
|
941
982
|
repositories: [],
|
|
942
983
|
filesTouched: 0,
|
|
984
|
+
sessionVersion: 0,
|
|
985
|
+
createdAt: undefined,
|
|
986
|
+
updatedAt: undefined,
|
|
943
987
|
};
|
|
944
988
|
}
|
|
945
989
|
|
|
@@ -1014,6 +1058,15 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1014
1058
|
if (message.filesTouched !== 0) {
|
|
1015
1059
|
writer.uint32(184).uint64(message.filesTouched);
|
|
1016
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
|
+
}
|
|
1017
1070
|
return writer;
|
|
1018
1071
|
},
|
|
1019
1072
|
|
|
@@ -1214,6 +1267,30 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1214
1267
|
message.filesTouched = longToNumber(reader.uint64());
|
|
1215
1268
|
continue;
|
|
1216
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
|
+
}
|
|
1217
1294
|
}
|
|
1218
1295
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1219
1296
|
break;
|
|
@@ -1325,6 +1402,21 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1325
1402
|
: isSet(object.files_touched)
|
|
1326
1403
|
? globalThis.Number(object.files_touched)
|
|
1327
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,
|
|
1328
1420
|
};
|
|
1329
1421
|
},
|
|
1330
1422
|
|
|
@@ -1399,6 +1491,15 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1399
1491
|
if (message.filesTouched !== 0) {
|
|
1400
1492
|
obj.filesTouched = Math.round(message.filesTouched);
|
|
1401
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
|
+
}
|
|
1402
1503
|
return obj;
|
|
1403
1504
|
},
|
|
1404
1505
|
|
|
@@ -1432,6 +1533,265 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1432
1533
|
message.gitOrgs = object.gitOrgs?.map((e) => e) || [];
|
|
1433
1534
|
message.repositories = object.repositories?.map((e) => e) || [];
|
|
1434
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;
|
|
1650
|
+
return message;
|
|
1651
|
+
},
|
|
1652
|
+
};
|
|
1653
|
+
|
|
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();
|
|
1435
1795
|
return message;
|
|
1436
1796
|
},
|
|
1437
1797
|
};
|
|
@@ -2554,7 +2914,7 @@ export const ListPrincipalsRequest: MessageFns<ListPrincipalsRequest> = {
|
|
|
2554
2914
|
};
|
|
2555
2915
|
|
|
2556
2916
|
function createBaseListPrincipalsResponse(): ListPrincipalsResponse {
|
|
2557
|
-
return { status: undefined, principals: [], nextPageToken: "" };
|
|
2917
|
+
return { status: undefined, principals: [], nextPageToken: "", totalCount: undefined };
|
|
2558
2918
|
}
|
|
2559
2919
|
|
|
2560
2920
|
export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
@@ -2568,6 +2928,9 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2568
2928
|
if (message.nextPageToken !== "") {
|
|
2569
2929
|
writer.uint32(26).string(message.nextPageToken);
|
|
2570
2930
|
}
|
|
2931
|
+
if (message.totalCount !== undefined) {
|
|
2932
|
+
writer.uint32(32).int64(message.totalCount);
|
|
2933
|
+
}
|
|
2571
2934
|
return writer;
|
|
2572
2935
|
},
|
|
2573
2936
|
|
|
@@ -2608,6 +2971,14 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2608
2971
|
message.nextPageToken = reader.string();
|
|
2609
2972
|
continue;
|
|
2610
2973
|
}
|
|
2974
|
+
case 4: {
|
|
2975
|
+
if (tag !== 32) {
|
|
2976
|
+
break;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
message.totalCount = longToNumber(reader.int64());
|
|
2980
|
+
continue;
|
|
2981
|
+
}
|
|
2611
2982
|
}
|
|
2612
2983
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2613
2984
|
break;
|
|
@@ -2631,6 +3002,11 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2631
3002
|
: isSet(object.next_page_token)
|
|
2632
3003
|
? globalThis.String(object.next_page_token)
|
|
2633
3004
|
: "",
|
|
3005
|
+
totalCount: isSet(object.totalCount)
|
|
3006
|
+
? globalThis.Number(object.totalCount)
|
|
3007
|
+
: isSet(object.total_count)
|
|
3008
|
+
? globalThis.Number(object.total_count)
|
|
3009
|
+
: undefined,
|
|
2634
3010
|
};
|
|
2635
3011
|
},
|
|
2636
3012
|
|
|
@@ -2645,6 +3021,9 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2645
3021
|
if (message.nextPageToken !== "") {
|
|
2646
3022
|
obj.nextPageToken = message.nextPageToken;
|
|
2647
3023
|
}
|
|
3024
|
+
if (message.totalCount !== undefined) {
|
|
3025
|
+
obj.totalCount = Math.round(message.totalCount);
|
|
3026
|
+
}
|
|
2648
3027
|
return obj;
|
|
2649
3028
|
},
|
|
2650
3029
|
|
|
@@ -2658,6 +3037,7 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2658
3037
|
: undefined;
|
|
2659
3038
|
message.principals = object.principals?.map((e) => AIPrincipal.fromPartial(e)) || [];
|
|
2660
3039
|
message.nextPageToken = object.nextPageToken ?? "";
|
|
3040
|
+
message.totalCount = object.totalCount ?? undefined;
|
|
2661
3041
|
return message;
|
|
2662
3042
|
},
|
|
2663
3043
|
};
|
|
@@ -4357,6 +4737,16 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4357
4737
|
*/
|
|
4358
4738
|
export interface AIGatewayService {
|
|
4359
4739
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse>;
|
|
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>;
|
|
4360
4750
|
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse>;
|
|
4361
4751
|
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
|
|
4362
4752
|
ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
|
|
@@ -4377,6 +4767,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4377
4767
|
this.service = opts?.service || AIGatewayServiceServiceName;
|
|
4378
4768
|
this.rpc = rpc;
|
|
4379
4769
|
this.ListSessions = this.ListSessions.bind(this);
|
|
4770
|
+
this.StreamSessions = this.StreamSessions.bind(this);
|
|
4380
4771
|
this.ListSessionEvents = this.ListSessionEvents.bind(this);
|
|
4381
4772
|
this.StreamSessionEvents = this.StreamSessionEvents.bind(this);
|
|
4382
4773
|
this.ListPrincipals = this.ListPrincipals.bind(this);
|
|
@@ -4390,6 +4781,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4390
4781
|
return promise.then((data) => ListSessionsResponse.decode(new BinaryReader(data)));
|
|
4391
4782
|
}
|
|
4392
4783
|
|
|
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
|
+
|
|
4393
4790
|
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse> {
|
|
4394
4791
|
const data = ListSessionEventsRequest.encode(request).finish();
|
|
4395
4792
|
const promise = this.rpc.request(this.service, "ListSessionEvents", data, metadata);
|
|
@@ -116,6 +116,17 @@ function deserialize_gateway_web_v1_ListSessionsResponse(buffer_arg) {
|
|
|
116
116
|
return proto_gateway_web_v1_ai_gateway_pb.ListSessionsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
function serialize_gateway_web_v1_SessionFrame(arg) {
|
|
120
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.SessionFrame)) {
|
|
121
|
+
throw new Error('Expected argument of type gateway.web.v1.SessionFrame');
|
|
122
|
+
}
|
|
123
|
+
return Buffer.from(arg.serializeBinary());
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function deserialize_gateway_web_v1_SessionFrame(buffer_arg) {
|
|
127
|
+
return proto_gateway_web_v1_ai_gateway_pb.SessionFrame.deserializeBinary(new Uint8Array(buffer_arg));
|
|
128
|
+
}
|
|
129
|
+
|
|
119
130
|
function serialize_gateway_web_v1_StreamGitActivitiesRequest(arg) {
|
|
120
131
|
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.StreamGitActivitiesRequest)) {
|
|
121
132
|
throw new Error('Expected argument of type gateway.web.v1.StreamGitActivitiesRequest');
|
|
@@ -138,6 +149,17 @@ function deserialize_gateway_web_v1_StreamSessionEventsRequest(buffer_arg) {
|
|
|
138
149
|
return proto_gateway_web_v1_ai_gateway_pb.StreamSessionEventsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
139
150
|
}
|
|
140
151
|
|
|
152
|
+
function serialize_gateway_web_v1_StreamSessionsRequest(arg) {
|
|
153
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.StreamSessionsRequest)) {
|
|
154
|
+
throw new Error('Expected argument of type gateway.web.v1.StreamSessionsRequest');
|
|
155
|
+
}
|
|
156
|
+
return Buffer.from(arg.serializeBinary());
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function deserialize_gateway_web_v1_StreamSessionsRequest(buffer_arg) {
|
|
160
|
+
return proto_gateway_web_v1_ai_gateway_pb.StreamSessionsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
161
|
+
}
|
|
162
|
+
|
|
141
163
|
function serialize_gateway_web_v1_UpdatePrincipalRequest(arg) {
|
|
142
164
|
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.UpdatePrincipalRequest)) {
|
|
143
165
|
throw new Error('Expected argument of type gateway.web.v1.UpdatePrincipalRequest');
|
|
@@ -179,6 +201,24 @@ var AIGatewayServiceService = exports.AIGatewayServiceService = {
|
|
|
179
201
|
responseSerialize: serialize_gateway_web_v1_ListSessionsResponse,
|
|
180
202
|
responseDeserialize: deserialize_gateway_web_v1_ListSessionsResponse,
|
|
181
203
|
},
|
|
204
|
+
// Live UPSERT catalog over the same slice as ListSessions (same filter): an
|
|
205
|
+
// UPSERT per session keyed by routing_key + source_system, a nonterminal
|
|
206
|
+
// SessionsSnapshotCompleted, then new sessions as created + rollup updates until
|
|
207
|
+
// cancel. UPSERT-only (no removal frame): a session whose rollup shifts out of the
|
|
208
|
+
// filter simply stops being re-sent, so this notifies about currently-matching rows
|
|
209
|
+
// rather than maintaining a filtered catalog. Best-effort live delta; ListSessions
|
|
210
|
+
// is the authoritative catalog.
|
|
211
|
+
streamSessions: {
|
|
212
|
+
path: '/gateway.web.v1.AIGatewayService/StreamSessions',
|
|
213
|
+
requestStream: false,
|
|
214
|
+
responseStream: true,
|
|
215
|
+
requestType: proto_gateway_web_v1_ai_gateway_pb.StreamSessionsRequest,
|
|
216
|
+
responseType: proto_gateway_web_v1_ai_gateway_pb.SessionFrame,
|
|
217
|
+
requestSerialize: serialize_gateway_web_v1_StreamSessionsRequest,
|
|
218
|
+
requestDeserialize: deserialize_gateway_web_v1_StreamSessionsRequest,
|
|
219
|
+
responseSerialize: serialize_gateway_web_v1_SessionFrame,
|
|
220
|
+
responseDeserialize: deserialize_gateway_web_v1_SessionFrame,
|
|
221
|
+
},
|
|
182
222
|
listSessionEvents: {
|
|
183
223
|
path: '/gateway.web.v1.AIGatewayService/ListSessionEvents',
|
|
184
224
|
requestStream: false,
|