@miradorlabs/web-grpc 2.55.0 → 2.58.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.
|
@@ -940,6 +940,8 @@ export interface AIPrincipal {
|
|
|
940
940
|
name: string;
|
|
941
941
|
sourceSystem: string;
|
|
942
942
|
alias: string;
|
|
943
|
+
/** Linked account user id (a seat) the frontend aggregates around; empty when unset. */
|
|
944
|
+
accountUserId: string;
|
|
943
945
|
}
|
|
944
946
|
|
|
945
947
|
export interface UpdatePrincipalRequest {
|
|
@@ -948,7 +950,15 @@ export interface UpdatePrincipalRequest {
|
|
|
948
950
|
kind: AIPrincipalKind;
|
|
949
951
|
id: string;
|
|
950
952
|
sourceSystem: string;
|
|
951
|
-
|
|
953
|
+
/**
|
|
954
|
+
* Presence semantics: a field set (even to empty) is written, empty clears it; a field
|
|
955
|
+
* left absent is untouched. At least one of alias / account_user_id must be present.
|
|
956
|
+
*/
|
|
957
|
+
alias?:
|
|
958
|
+
| string
|
|
959
|
+
| undefined;
|
|
960
|
+
/** Linked account user id (a seat). Must be a UUID when non-empty; empty clears it. */
|
|
961
|
+
accountUserId?: string | undefined;
|
|
952
962
|
}
|
|
953
963
|
|
|
954
964
|
export interface UpdatePrincipalResponse {
|
|
@@ -1191,6 +1201,46 @@ export interface DailyActivityMeasures {
|
|
|
1191
1201
|
branchesCreated: number;
|
|
1192
1202
|
}
|
|
1193
1203
|
|
|
1204
|
+
export interface ActivityRhythmRequest {
|
|
1205
|
+
organizationId: string;
|
|
1206
|
+
projectId: string;
|
|
1207
|
+
/** the range; UNSPECIFIED is rejected, capped at 30 days */
|
|
1208
|
+
timeWindow: AnalyticsTimeWindow;
|
|
1209
|
+
/** IANA zone (e.g. "America/New_York"); empty defaults to "UTC". Echoed on the response. */
|
|
1210
|
+
timeZone: string;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* ActivityRhythm mirrors telemetry.api.v1.ActivityRhythm: a sparse weekday/hour heatmap replaced wholesale
|
|
1215
|
+
* each tick (streams carry no ResponseStatus). Only slots with at least one event are present.
|
|
1216
|
+
*/
|
|
1217
|
+
export interface ActivityRhythm {
|
|
1218
|
+
buckets: ActivityRhythmBucket[];
|
|
1219
|
+
windowStart: Date | undefined;
|
|
1220
|
+
windowEnd: Date | undefined;
|
|
1221
|
+
asOf:
|
|
1222
|
+
| Date
|
|
1223
|
+
| undefined;
|
|
1224
|
+
/** resolved IANA zone */
|
|
1225
|
+
timeZone: string;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export interface ActivityRhythmBucket {
|
|
1229
|
+
/** 1 = Monday .. 7 = Sunday */
|
|
1230
|
+
dayOfWeek: number;
|
|
1231
|
+
/** 0 .. 23 */
|
|
1232
|
+
hourOfDay: number;
|
|
1233
|
+
eventCount: number;
|
|
1234
|
+
modelUsage: TokenActivityMeasures | undefined;
|
|
1235
|
+
usageUnavailableCount: number;
|
|
1236
|
+
costUnavailableCount: number;
|
|
1237
|
+
toolCalls: number;
|
|
1238
|
+
userMessages: number;
|
|
1239
|
+
sessions: number;
|
|
1240
|
+
activeUsers: number;
|
|
1241
|
+
topTool: string;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1194
1244
|
export interface ProjectOverviewRequest {
|
|
1195
1245
|
organizationId: string;
|
|
1196
1246
|
projectId: string;
|
|
@@ -5580,7 +5630,7 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
5580
5630
|
};
|
|
5581
5631
|
|
|
5582
5632
|
function createBaseAIPrincipal(): AIPrincipal {
|
|
5583
|
-
return { kind: 0, id: "", name: "", sourceSystem: "", alias: "" };
|
|
5633
|
+
return { kind: 0, id: "", name: "", sourceSystem: "", alias: "", accountUserId: "" };
|
|
5584
5634
|
}
|
|
5585
5635
|
|
|
5586
5636
|
export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
@@ -5600,6 +5650,9 @@ export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
|
5600
5650
|
if (message.alias !== "") {
|
|
5601
5651
|
writer.uint32(42).string(message.alias);
|
|
5602
5652
|
}
|
|
5653
|
+
if (message.accountUserId !== "") {
|
|
5654
|
+
writer.uint32(50).string(message.accountUserId);
|
|
5655
|
+
}
|
|
5603
5656
|
return writer;
|
|
5604
5657
|
},
|
|
5605
5658
|
|
|
@@ -5656,6 +5709,14 @@ export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
|
5656
5709
|
message.alias = reader.string();
|
|
5657
5710
|
continue;
|
|
5658
5711
|
}
|
|
5712
|
+
case 6: {
|
|
5713
|
+
if (tag !== 50) {
|
|
5714
|
+
break;
|
|
5715
|
+
}
|
|
5716
|
+
|
|
5717
|
+
message.accountUserId = reader.string();
|
|
5718
|
+
continue;
|
|
5719
|
+
}
|
|
5659
5720
|
}
|
|
5660
5721
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5661
5722
|
break;
|
|
@@ -5679,6 +5740,11 @@ export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
|
5679
5740
|
? globalThis.String(object.source_system)
|
|
5680
5741
|
: "",
|
|
5681
5742
|
alias: isSet(object.alias) ? globalThis.String(object.alias) : "",
|
|
5743
|
+
accountUserId: isSet(object.accountUserId)
|
|
5744
|
+
? globalThis.String(object.accountUserId)
|
|
5745
|
+
: isSet(object.account_user_id)
|
|
5746
|
+
? globalThis.String(object.account_user_id)
|
|
5747
|
+
: "",
|
|
5682
5748
|
};
|
|
5683
5749
|
},
|
|
5684
5750
|
|
|
@@ -5699,6 +5765,9 @@ export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
|
5699
5765
|
if (message.alias !== "") {
|
|
5700
5766
|
obj.alias = message.alias;
|
|
5701
5767
|
}
|
|
5768
|
+
if (message.accountUserId !== "") {
|
|
5769
|
+
obj.accountUserId = message.accountUserId;
|
|
5770
|
+
}
|
|
5702
5771
|
return obj;
|
|
5703
5772
|
},
|
|
5704
5773
|
|
|
@@ -5712,12 +5781,21 @@ export const AIPrincipal: MessageFns<AIPrincipal> = {
|
|
|
5712
5781
|
message.name = object.name ?? "";
|
|
5713
5782
|
message.sourceSystem = object.sourceSystem ?? "";
|
|
5714
5783
|
message.alias = object.alias ?? "";
|
|
5784
|
+
message.accountUserId = object.accountUserId ?? "";
|
|
5715
5785
|
return message;
|
|
5716
5786
|
},
|
|
5717
5787
|
};
|
|
5718
5788
|
|
|
5719
5789
|
function createBaseUpdatePrincipalRequest(): UpdatePrincipalRequest {
|
|
5720
|
-
return {
|
|
5790
|
+
return {
|
|
5791
|
+
organizationId: "",
|
|
5792
|
+
projectId: "",
|
|
5793
|
+
kind: 0,
|
|
5794
|
+
id: "",
|
|
5795
|
+
sourceSystem: "",
|
|
5796
|
+
alias: undefined,
|
|
5797
|
+
accountUserId: undefined,
|
|
5798
|
+
};
|
|
5721
5799
|
}
|
|
5722
5800
|
|
|
5723
5801
|
export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
@@ -5737,9 +5815,12 @@ export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
|
5737
5815
|
if (message.sourceSystem !== "") {
|
|
5738
5816
|
writer.uint32(42).string(message.sourceSystem);
|
|
5739
5817
|
}
|
|
5740
|
-
if (message.alias !==
|
|
5818
|
+
if (message.alias !== undefined) {
|
|
5741
5819
|
writer.uint32(50).string(message.alias);
|
|
5742
5820
|
}
|
|
5821
|
+
if (message.accountUserId !== undefined) {
|
|
5822
|
+
writer.uint32(58).string(message.accountUserId);
|
|
5823
|
+
}
|
|
5743
5824
|
return writer;
|
|
5744
5825
|
},
|
|
5745
5826
|
|
|
@@ -5804,6 +5885,14 @@ export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
|
5804
5885
|
message.alias = reader.string();
|
|
5805
5886
|
continue;
|
|
5806
5887
|
}
|
|
5888
|
+
case 7: {
|
|
5889
|
+
if (tag !== 58) {
|
|
5890
|
+
break;
|
|
5891
|
+
}
|
|
5892
|
+
|
|
5893
|
+
message.accountUserId = reader.string();
|
|
5894
|
+
continue;
|
|
5895
|
+
}
|
|
5807
5896
|
}
|
|
5808
5897
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5809
5898
|
break;
|
|
@@ -5835,7 +5924,12 @@ export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
|
5835
5924
|
: isSet(object.source_system)
|
|
5836
5925
|
? globalThis.String(object.source_system)
|
|
5837
5926
|
: "",
|
|
5838
|
-
alias: isSet(object.alias) ? globalThis.String(object.alias) :
|
|
5927
|
+
alias: isSet(object.alias) ? globalThis.String(object.alias) : undefined,
|
|
5928
|
+
accountUserId: isSet(object.accountUserId)
|
|
5929
|
+
? globalThis.String(object.accountUserId)
|
|
5930
|
+
: isSet(object.account_user_id)
|
|
5931
|
+
? globalThis.String(object.account_user_id)
|
|
5932
|
+
: undefined,
|
|
5839
5933
|
};
|
|
5840
5934
|
},
|
|
5841
5935
|
|
|
@@ -5856,9 +5950,12 @@ export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
|
5856
5950
|
if (message.sourceSystem !== "") {
|
|
5857
5951
|
obj.sourceSystem = message.sourceSystem;
|
|
5858
5952
|
}
|
|
5859
|
-
if (message.alias !==
|
|
5953
|
+
if (message.alias !== undefined) {
|
|
5860
5954
|
obj.alias = message.alias;
|
|
5861
5955
|
}
|
|
5956
|
+
if (message.accountUserId !== undefined) {
|
|
5957
|
+
obj.accountUserId = message.accountUserId;
|
|
5958
|
+
}
|
|
5862
5959
|
return obj;
|
|
5863
5960
|
},
|
|
5864
5961
|
|
|
@@ -5872,7 +5969,8 @@ export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
|
|
|
5872
5969
|
message.kind = object.kind ?? 0;
|
|
5873
5970
|
message.id = object.id ?? "";
|
|
5874
5971
|
message.sourceSystem = object.sourceSystem ?? "";
|
|
5875
|
-
message.alias = object.alias ??
|
|
5972
|
+
message.alias = object.alias ?? undefined;
|
|
5973
|
+
message.accountUserId = object.accountUserId ?? undefined;
|
|
5876
5974
|
return message;
|
|
5877
5975
|
},
|
|
5878
5976
|
};
|
|
@@ -9460,6 +9558,573 @@ export const DailyActivityMeasures: MessageFns<DailyActivityMeasures> = {
|
|
|
9460
9558
|
},
|
|
9461
9559
|
};
|
|
9462
9560
|
|
|
9561
|
+
function createBaseActivityRhythmRequest(): ActivityRhythmRequest {
|
|
9562
|
+
return { organizationId: "", projectId: "", timeWindow: 0, timeZone: "" };
|
|
9563
|
+
}
|
|
9564
|
+
|
|
9565
|
+
export const ActivityRhythmRequest: MessageFns<ActivityRhythmRequest> = {
|
|
9566
|
+
encode(message: ActivityRhythmRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9567
|
+
if (message.organizationId !== "") {
|
|
9568
|
+
writer.uint32(10).string(message.organizationId);
|
|
9569
|
+
}
|
|
9570
|
+
if (message.projectId !== "") {
|
|
9571
|
+
writer.uint32(18).string(message.projectId);
|
|
9572
|
+
}
|
|
9573
|
+
if (message.timeWindow !== 0) {
|
|
9574
|
+
writer.uint32(24).int32(message.timeWindow);
|
|
9575
|
+
}
|
|
9576
|
+
if (message.timeZone !== "") {
|
|
9577
|
+
writer.uint32(34).string(message.timeZone);
|
|
9578
|
+
}
|
|
9579
|
+
return writer;
|
|
9580
|
+
},
|
|
9581
|
+
|
|
9582
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ActivityRhythmRequest {
|
|
9583
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9584
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
9585
|
+
if (previousRecursionDepth >= 100) {
|
|
9586
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
9587
|
+
}
|
|
9588
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
9589
|
+
try {
|
|
9590
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9591
|
+
const message = createBaseActivityRhythmRequest();
|
|
9592
|
+
while (reader.pos < end) {
|
|
9593
|
+
const tag = reader.uint32();
|
|
9594
|
+
switch (tag >>> 3) {
|
|
9595
|
+
case 1: {
|
|
9596
|
+
if (tag !== 10) {
|
|
9597
|
+
break;
|
|
9598
|
+
}
|
|
9599
|
+
|
|
9600
|
+
message.organizationId = reader.string();
|
|
9601
|
+
continue;
|
|
9602
|
+
}
|
|
9603
|
+
case 2: {
|
|
9604
|
+
if (tag !== 18) {
|
|
9605
|
+
break;
|
|
9606
|
+
}
|
|
9607
|
+
|
|
9608
|
+
message.projectId = reader.string();
|
|
9609
|
+
continue;
|
|
9610
|
+
}
|
|
9611
|
+
case 3: {
|
|
9612
|
+
if (tag !== 24) {
|
|
9613
|
+
break;
|
|
9614
|
+
}
|
|
9615
|
+
|
|
9616
|
+
message.timeWindow = reader.int32() as any;
|
|
9617
|
+
continue;
|
|
9618
|
+
}
|
|
9619
|
+
case 4: {
|
|
9620
|
+
if (tag !== 34) {
|
|
9621
|
+
break;
|
|
9622
|
+
}
|
|
9623
|
+
|
|
9624
|
+
message.timeZone = reader.string();
|
|
9625
|
+
continue;
|
|
9626
|
+
}
|
|
9627
|
+
}
|
|
9628
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9629
|
+
break;
|
|
9630
|
+
}
|
|
9631
|
+
reader.skip(tag & 7);
|
|
9632
|
+
}
|
|
9633
|
+
return message;
|
|
9634
|
+
} finally {
|
|
9635
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
9636
|
+
}
|
|
9637
|
+
},
|
|
9638
|
+
|
|
9639
|
+
fromJSON(object: any): ActivityRhythmRequest {
|
|
9640
|
+
return {
|
|
9641
|
+
organizationId: isSet(object.organizationId)
|
|
9642
|
+
? globalThis.String(object.organizationId)
|
|
9643
|
+
: isSet(object.organization_id)
|
|
9644
|
+
? globalThis.String(object.organization_id)
|
|
9645
|
+
: "",
|
|
9646
|
+
projectId: isSet(object.projectId)
|
|
9647
|
+
? globalThis.String(object.projectId)
|
|
9648
|
+
: isSet(object.project_id)
|
|
9649
|
+
? globalThis.String(object.project_id)
|
|
9650
|
+
: "",
|
|
9651
|
+
timeWindow: isSet(object.timeWindow)
|
|
9652
|
+
? analyticsTimeWindowFromJSON(object.timeWindow)
|
|
9653
|
+
: isSet(object.time_window)
|
|
9654
|
+
? analyticsTimeWindowFromJSON(object.time_window)
|
|
9655
|
+
: 0,
|
|
9656
|
+
timeZone: isSet(object.timeZone)
|
|
9657
|
+
? globalThis.String(object.timeZone)
|
|
9658
|
+
: isSet(object.time_zone)
|
|
9659
|
+
? globalThis.String(object.time_zone)
|
|
9660
|
+
: "",
|
|
9661
|
+
};
|
|
9662
|
+
},
|
|
9663
|
+
|
|
9664
|
+
toJSON(message: ActivityRhythmRequest): unknown {
|
|
9665
|
+
const obj: any = {};
|
|
9666
|
+
if (message.organizationId !== "") {
|
|
9667
|
+
obj.organizationId = message.organizationId;
|
|
9668
|
+
}
|
|
9669
|
+
if (message.projectId !== "") {
|
|
9670
|
+
obj.projectId = message.projectId;
|
|
9671
|
+
}
|
|
9672
|
+
if (message.timeWindow !== 0) {
|
|
9673
|
+
obj.timeWindow = analyticsTimeWindowToJSON(message.timeWindow);
|
|
9674
|
+
}
|
|
9675
|
+
if (message.timeZone !== "") {
|
|
9676
|
+
obj.timeZone = message.timeZone;
|
|
9677
|
+
}
|
|
9678
|
+
return obj;
|
|
9679
|
+
},
|
|
9680
|
+
|
|
9681
|
+
create<I extends Exact<DeepPartial<ActivityRhythmRequest>, I>>(base?: I): ActivityRhythmRequest {
|
|
9682
|
+
return ActivityRhythmRequest.fromPartial(base ?? ({} as any));
|
|
9683
|
+
},
|
|
9684
|
+
fromPartial<I extends Exact<DeepPartial<ActivityRhythmRequest>, I>>(object: I): ActivityRhythmRequest {
|
|
9685
|
+
const message = createBaseActivityRhythmRequest();
|
|
9686
|
+
message.organizationId = object.organizationId ?? "";
|
|
9687
|
+
message.projectId = object.projectId ?? "";
|
|
9688
|
+
message.timeWindow = object.timeWindow ?? 0;
|
|
9689
|
+
message.timeZone = object.timeZone ?? "";
|
|
9690
|
+
return message;
|
|
9691
|
+
},
|
|
9692
|
+
};
|
|
9693
|
+
|
|
9694
|
+
function createBaseActivityRhythm(): ActivityRhythm {
|
|
9695
|
+
return { buckets: [], windowStart: undefined, windowEnd: undefined, asOf: undefined, timeZone: "" };
|
|
9696
|
+
}
|
|
9697
|
+
|
|
9698
|
+
export const ActivityRhythm: MessageFns<ActivityRhythm> = {
|
|
9699
|
+
encode(message: ActivityRhythm, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9700
|
+
for (const v of message.buckets) {
|
|
9701
|
+
ActivityRhythmBucket.encode(v!, writer.uint32(10).fork()).join();
|
|
9702
|
+
}
|
|
9703
|
+
if (message.windowStart !== undefined) {
|
|
9704
|
+
Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(18).fork()).join();
|
|
9705
|
+
}
|
|
9706
|
+
if (message.windowEnd !== undefined) {
|
|
9707
|
+
Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(26).fork()).join();
|
|
9708
|
+
}
|
|
9709
|
+
if (message.asOf !== undefined) {
|
|
9710
|
+
Timestamp.encode(toTimestamp(message.asOf), writer.uint32(34).fork()).join();
|
|
9711
|
+
}
|
|
9712
|
+
if (message.timeZone !== "") {
|
|
9713
|
+
writer.uint32(42).string(message.timeZone);
|
|
9714
|
+
}
|
|
9715
|
+
return writer;
|
|
9716
|
+
},
|
|
9717
|
+
|
|
9718
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ActivityRhythm {
|
|
9719
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9720
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
9721
|
+
if (previousRecursionDepth >= 100) {
|
|
9722
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
9723
|
+
}
|
|
9724
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
9725
|
+
try {
|
|
9726
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9727
|
+
const message = createBaseActivityRhythm();
|
|
9728
|
+
while (reader.pos < end) {
|
|
9729
|
+
const tag = reader.uint32();
|
|
9730
|
+
switch (tag >>> 3) {
|
|
9731
|
+
case 1: {
|
|
9732
|
+
if (tag !== 10) {
|
|
9733
|
+
break;
|
|
9734
|
+
}
|
|
9735
|
+
|
|
9736
|
+
message.buckets.push(ActivityRhythmBucket.decode(reader, reader.uint32()));
|
|
9737
|
+
continue;
|
|
9738
|
+
}
|
|
9739
|
+
case 2: {
|
|
9740
|
+
if (tag !== 18) {
|
|
9741
|
+
break;
|
|
9742
|
+
}
|
|
9743
|
+
|
|
9744
|
+
message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
9745
|
+
continue;
|
|
9746
|
+
}
|
|
9747
|
+
case 3: {
|
|
9748
|
+
if (tag !== 26) {
|
|
9749
|
+
break;
|
|
9750
|
+
}
|
|
9751
|
+
|
|
9752
|
+
message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
9753
|
+
continue;
|
|
9754
|
+
}
|
|
9755
|
+
case 4: {
|
|
9756
|
+
if (tag !== 34) {
|
|
9757
|
+
break;
|
|
9758
|
+
}
|
|
9759
|
+
|
|
9760
|
+
message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
9761
|
+
continue;
|
|
9762
|
+
}
|
|
9763
|
+
case 5: {
|
|
9764
|
+
if (tag !== 42) {
|
|
9765
|
+
break;
|
|
9766
|
+
}
|
|
9767
|
+
|
|
9768
|
+
message.timeZone = reader.string();
|
|
9769
|
+
continue;
|
|
9770
|
+
}
|
|
9771
|
+
}
|
|
9772
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9773
|
+
break;
|
|
9774
|
+
}
|
|
9775
|
+
reader.skip(tag & 7);
|
|
9776
|
+
}
|
|
9777
|
+
return message;
|
|
9778
|
+
} finally {
|
|
9779
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
9780
|
+
}
|
|
9781
|
+
},
|
|
9782
|
+
|
|
9783
|
+
fromJSON(object: any): ActivityRhythm {
|
|
9784
|
+
return {
|
|
9785
|
+
buckets: globalThis.Array.isArray(object?.buckets)
|
|
9786
|
+
? object.buckets.map((e: any) => ActivityRhythmBucket.fromJSON(e))
|
|
9787
|
+
: [],
|
|
9788
|
+
windowStart: isSet(object.windowStart)
|
|
9789
|
+
? fromJsonTimestamp(object.windowStart)
|
|
9790
|
+
: isSet(object.window_start)
|
|
9791
|
+
? fromJsonTimestamp(object.window_start)
|
|
9792
|
+
: undefined,
|
|
9793
|
+
windowEnd: isSet(object.windowEnd)
|
|
9794
|
+
? fromJsonTimestamp(object.windowEnd)
|
|
9795
|
+
: isSet(object.window_end)
|
|
9796
|
+
? fromJsonTimestamp(object.window_end)
|
|
9797
|
+
: undefined,
|
|
9798
|
+
asOf: isSet(object.asOf)
|
|
9799
|
+
? fromJsonTimestamp(object.asOf)
|
|
9800
|
+
: isSet(object.as_of)
|
|
9801
|
+
? fromJsonTimestamp(object.as_of)
|
|
9802
|
+
: undefined,
|
|
9803
|
+
timeZone: isSet(object.timeZone)
|
|
9804
|
+
? globalThis.String(object.timeZone)
|
|
9805
|
+
: isSet(object.time_zone)
|
|
9806
|
+
? globalThis.String(object.time_zone)
|
|
9807
|
+
: "",
|
|
9808
|
+
};
|
|
9809
|
+
},
|
|
9810
|
+
|
|
9811
|
+
toJSON(message: ActivityRhythm): unknown {
|
|
9812
|
+
const obj: any = {};
|
|
9813
|
+
if (message.buckets?.length) {
|
|
9814
|
+
obj.buckets = message.buckets.map((e) => ActivityRhythmBucket.toJSON(e));
|
|
9815
|
+
}
|
|
9816
|
+
if (message.windowStart !== undefined) {
|
|
9817
|
+
obj.windowStart = message.windowStart.toISOString();
|
|
9818
|
+
}
|
|
9819
|
+
if (message.windowEnd !== undefined) {
|
|
9820
|
+
obj.windowEnd = message.windowEnd.toISOString();
|
|
9821
|
+
}
|
|
9822
|
+
if (message.asOf !== undefined) {
|
|
9823
|
+
obj.asOf = message.asOf.toISOString();
|
|
9824
|
+
}
|
|
9825
|
+
if (message.timeZone !== "") {
|
|
9826
|
+
obj.timeZone = message.timeZone;
|
|
9827
|
+
}
|
|
9828
|
+
return obj;
|
|
9829
|
+
},
|
|
9830
|
+
|
|
9831
|
+
create<I extends Exact<DeepPartial<ActivityRhythm>, I>>(base?: I): ActivityRhythm {
|
|
9832
|
+
return ActivityRhythm.fromPartial(base ?? ({} as any));
|
|
9833
|
+
},
|
|
9834
|
+
fromPartial<I extends Exact<DeepPartial<ActivityRhythm>, I>>(object: I): ActivityRhythm {
|
|
9835
|
+
const message = createBaseActivityRhythm();
|
|
9836
|
+
message.buckets = object.buckets?.map((e) => ActivityRhythmBucket.fromPartial(e)) || [];
|
|
9837
|
+
message.windowStart = object.windowStart ?? undefined;
|
|
9838
|
+
message.windowEnd = object.windowEnd ?? undefined;
|
|
9839
|
+
message.asOf = object.asOf ?? undefined;
|
|
9840
|
+
message.timeZone = object.timeZone ?? "";
|
|
9841
|
+
return message;
|
|
9842
|
+
},
|
|
9843
|
+
};
|
|
9844
|
+
|
|
9845
|
+
function createBaseActivityRhythmBucket(): ActivityRhythmBucket {
|
|
9846
|
+
return {
|
|
9847
|
+
dayOfWeek: 0,
|
|
9848
|
+
hourOfDay: 0,
|
|
9849
|
+
eventCount: 0,
|
|
9850
|
+
modelUsage: undefined,
|
|
9851
|
+
usageUnavailableCount: 0,
|
|
9852
|
+
costUnavailableCount: 0,
|
|
9853
|
+
toolCalls: 0,
|
|
9854
|
+
userMessages: 0,
|
|
9855
|
+
sessions: 0,
|
|
9856
|
+
activeUsers: 0,
|
|
9857
|
+
topTool: "",
|
|
9858
|
+
};
|
|
9859
|
+
}
|
|
9860
|
+
|
|
9861
|
+
export const ActivityRhythmBucket: MessageFns<ActivityRhythmBucket> = {
|
|
9862
|
+
encode(message: ActivityRhythmBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9863
|
+
if (message.dayOfWeek !== 0) {
|
|
9864
|
+
writer.uint32(8).uint32(message.dayOfWeek);
|
|
9865
|
+
}
|
|
9866
|
+
if (message.hourOfDay !== 0) {
|
|
9867
|
+
writer.uint32(16).uint32(message.hourOfDay);
|
|
9868
|
+
}
|
|
9869
|
+
if (message.eventCount !== 0) {
|
|
9870
|
+
writer.uint32(24).uint64(message.eventCount);
|
|
9871
|
+
}
|
|
9872
|
+
if (message.modelUsage !== undefined) {
|
|
9873
|
+
TokenActivityMeasures.encode(message.modelUsage, writer.uint32(34).fork()).join();
|
|
9874
|
+
}
|
|
9875
|
+
if (message.usageUnavailableCount !== 0) {
|
|
9876
|
+
writer.uint32(40).uint64(message.usageUnavailableCount);
|
|
9877
|
+
}
|
|
9878
|
+
if (message.costUnavailableCount !== 0) {
|
|
9879
|
+
writer.uint32(48).uint64(message.costUnavailableCount);
|
|
9880
|
+
}
|
|
9881
|
+
if (message.toolCalls !== 0) {
|
|
9882
|
+
writer.uint32(56).uint64(message.toolCalls);
|
|
9883
|
+
}
|
|
9884
|
+
if (message.userMessages !== 0) {
|
|
9885
|
+
writer.uint32(64).uint64(message.userMessages);
|
|
9886
|
+
}
|
|
9887
|
+
if (message.sessions !== 0) {
|
|
9888
|
+
writer.uint32(72).uint64(message.sessions);
|
|
9889
|
+
}
|
|
9890
|
+
if (message.activeUsers !== 0) {
|
|
9891
|
+
writer.uint32(80).uint64(message.activeUsers);
|
|
9892
|
+
}
|
|
9893
|
+
if (message.topTool !== "") {
|
|
9894
|
+
writer.uint32(90).string(message.topTool);
|
|
9895
|
+
}
|
|
9896
|
+
return writer;
|
|
9897
|
+
},
|
|
9898
|
+
|
|
9899
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ActivityRhythmBucket {
|
|
9900
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9901
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
9902
|
+
if (previousRecursionDepth >= 100) {
|
|
9903
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
9904
|
+
}
|
|
9905
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
9906
|
+
try {
|
|
9907
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9908
|
+
const message = createBaseActivityRhythmBucket();
|
|
9909
|
+
while (reader.pos < end) {
|
|
9910
|
+
const tag = reader.uint32();
|
|
9911
|
+
switch (tag >>> 3) {
|
|
9912
|
+
case 1: {
|
|
9913
|
+
if (tag !== 8) {
|
|
9914
|
+
break;
|
|
9915
|
+
}
|
|
9916
|
+
|
|
9917
|
+
message.dayOfWeek = reader.uint32();
|
|
9918
|
+
continue;
|
|
9919
|
+
}
|
|
9920
|
+
case 2: {
|
|
9921
|
+
if (tag !== 16) {
|
|
9922
|
+
break;
|
|
9923
|
+
}
|
|
9924
|
+
|
|
9925
|
+
message.hourOfDay = reader.uint32();
|
|
9926
|
+
continue;
|
|
9927
|
+
}
|
|
9928
|
+
case 3: {
|
|
9929
|
+
if (tag !== 24) {
|
|
9930
|
+
break;
|
|
9931
|
+
}
|
|
9932
|
+
|
|
9933
|
+
message.eventCount = longToNumber(reader.uint64());
|
|
9934
|
+
continue;
|
|
9935
|
+
}
|
|
9936
|
+
case 4: {
|
|
9937
|
+
if (tag !== 34) {
|
|
9938
|
+
break;
|
|
9939
|
+
}
|
|
9940
|
+
|
|
9941
|
+
message.modelUsage = TokenActivityMeasures.decode(reader, reader.uint32());
|
|
9942
|
+
continue;
|
|
9943
|
+
}
|
|
9944
|
+
case 5: {
|
|
9945
|
+
if (tag !== 40) {
|
|
9946
|
+
break;
|
|
9947
|
+
}
|
|
9948
|
+
|
|
9949
|
+
message.usageUnavailableCount = longToNumber(reader.uint64());
|
|
9950
|
+
continue;
|
|
9951
|
+
}
|
|
9952
|
+
case 6: {
|
|
9953
|
+
if (tag !== 48) {
|
|
9954
|
+
break;
|
|
9955
|
+
}
|
|
9956
|
+
|
|
9957
|
+
message.costUnavailableCount = longToNumber(reader.uint64());
|
|
9958
|
+
continue;
|
|
9959
|
+
}
|
|
9960
|
+
case 7: {
|
|
9961
|
+
if (tag !== 56) {
|
|
9962
|
+
break;
|
|
9963
|
+
}
|
|
9964
|
+
|
|
9965
|
+
message.toolCalls = longToNumber(reader.uint64());
|
|
9966
|
+
continue;
|
|
9967
|
+
}
|
|
9968
|
+
case 8: {
|
|
9969
|
+
if (tag !== 64) {
|
|
9970
|
+
break;
|
|
9971
|
+
}
|
|
9972
|
+
|
|
9973
|
+
message.userMessages = longToNumber(reader.uint64());
|
|
9974
|
+
continue;
|
|
9975
|
+
}
|
|
9976
|
+
case 9: {
|
|
9977
|
+
if (tag !== 72) {
|
|
9978
|
+
break;
|
|
9979
|
+
}
|
|
9980
|
+
|
|
9981
|
+
message.sessions = longToNumber(reader.uint64());
|
|
9982
|
+
continue;
|
|
9983
|
+
}
|
|
9984
|
+
case 10: {
|
|
9985
|
+
if (tag !== 80) {
|
|
9986
|
+
break;
|
|
9987
|
+
}
|
|
9988
|
+
|
|
9989
|
+
message.activeUsers = longToNumber(reader.uint64());
|
|
9990
|
+
continue;
|
|
9991
|
+
}
|
|
9992
|
+
case 11: {
|
|
9993
|
+
if (tag !== 90) {
|
|
9994
|
+
break;
|
|
9995
|
+
}
|
|
9996
|
+
|
|
9997
|
+
message.topTool = reader.string();
|
|
9998
|
+
continue;
|
|
9999
|
+
}
|
|
10000
|
+
}
|
|
10001
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
10002
|
+
break;
|
|
10003
|
+
}
|
|
10004
|
+
reader.skip(tag & 7);
|
|
10005
|
+
}
|
|
10006
|
+
return message;
|
|
10007
|
+
} finally {
|
|
10008
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
10009
|
+
}
|
|
10010
|
+
},
|
|
10011
|
+
|
|
10012
|
+
fromJSON(object: any): ActivityRhythmBucket {
|
|
10013
|
+
return {
|
|
10014
|
+
dayOfWeek: isSet(object.dayOfWeek)
|
|
10015
|
+
? globalThis.Number(object.dayOfWeek)
|
|
10016
|
+
: isSet(object.day_of_week)
|
|
10017
|
+
? globalThis.Number(object.day_of_week)
|
|
10018
|
+
: 0,
|
|
10019
|
+
hourOfDay: isSet(object.hourOfDay)
|
|
10020
|
+
? globalThis.Number(object.hourOfDay)
|
|
10021
|
+
: isSet(object.hour_of_day)
|
|
10022
|
+
? globalThis.Number(object.hour_of_day)
|
|
10023
|
+
: 0,
|
|
10024
|
+
eventCount: isSet(object.eventCount)
|
|
10025
|
+
? globalThis.Number(object.eventCount)
|
|
10026
|
+
: isSet(object.event_count)
|
|
10027
|
+
? globalThis.Number(object.event_count)
|
|
10028
|
+
: 0,
|
|
10029
|
+
modelUsage: isSet(object.modelUsage)
|
|
10030
|
+
? TokenActivityMeasures.fromJSON(object.modelUsage)
|
|
10031
|
+
: isSet(object.model_usage)
|
|
10032
|
+
? TokenActivityMeasures.fromJSON(object.model_usage)
|
|
10033
|
+
: undefined,
|
|
10034
|
+
usageUnavailableCount: isSet(object.usageUnavailableCount)
|
|
10035
|
+
? globalThis.Number(object.usageUnavailableCount)
|
|
10036
|
+
: isSet(object.usage_unavailable_count)
|
|
10037
|
+
? globalThis.Number(object.usage_unavailable_count)
|
|
10038
|
+
: 0,
|
|
10039
|
+
costUnavailableCount: isSet(object.costUnavailableCount)
|
|
10040
|
+
? globalThis.Number(object.costUnavailableCount)
|
|
10041
|
+
: isSet(object.cost_unavailable_count)
|
|
10042
|
+
? globalThis.Number(object.cost_unavailable_count)
|
|
10043
|
+
: 0,
|
|
10044
|
+
toolCalls: isSet(object.toolCalls)
|
|
10045
|
+
? globalThis.Number(object.toolCalls)
|
|
10046
|
+
: isSet(object.tool_calls)
|
|
10047
|
+
? globalThis.Number(object.tool_calls)
|
|
10048
|
+
: 0,
|
|
10049
|
+
userMessages: isSet(object.userMessages)
|
|
10050
|
+
? globalThis.Number(object.userMessages)
|
|
10051
|
+
: isSet(object.user_messages)
|
|
10052
|
+
? globalThis.Number(object.user_messages)
|
|
10053
|
+
: 0,
|
|
10054
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
10055
|
+
activeUsers: isSet(object.activeUsers)
|
|
10056
|
+
? globalThis.Number(object.activeUsers)
|
|
10057
|
+
: isSet(object.active_users)
|
|
10058
|
+
? globalThis.Number(object.active_users)
|
|
10059
|
+
: 0,
|
|
10060
|
+
topTool: isSet(object.topTool)
|
|
10061
|
+
? globalThis.String(object.topTool)
|
|
10062
|
+
: isSet(object.top_tool)
|
|
10063
|
+
? globalThis.String(object.top_tool)
|
|
10064
|
+
: "",
|
|
10065
|
+
};
|
|
10066
|
+
},
|
|
10067
|
+
|
|
10068
|
+
toJSON(message: ActivityRhythmBucket): unknown {
|
|
10069
|
+
const obj: any = {};
|
|
10070
|
+
if (message.dayOfWeek !== 0) {
|
|
10071
|
+
obj.dayOfWeek = Math.round(message.dayOfWeek);
|
|
10072
|
+
}
|
|
10073
|
+
if (message.hourOfDay !== 0) {
|
|
10074
|
+
obj.hourOfDay = Math.round(message.hourOfDay);
|
|
10075
|
+
}
|
|
10076
|
+
if (message.eventCount !== 0) {
|
|
10077
|
+
obj.eventCount = Math.round(message.eventCount);
|
|
10078
|
+
}
|
|
10079
|
+
if (message.modelUsage !== undefined) {
|
|
10080
|
+
obj.modelUsage = TokenActivityMeasures.toJSON(message.modelUsage);
|
|
10081
|
+
}
|
|
10082
|
+
if (message.usageUnavailableCount !== 0) {
|
|
10083
|
+
obj.usageUnavailableCount = Math.round(message.usageUnavailableCount);
|
|
10084
|
+
}
|
|
10085
|
+
if (message.costUnavailableCount !== 0) {
|
|
10086
|
+
obj.costUnavailableCount = Math.round(message.costUnavailableCount);
|
|
10087
|
+
}
|
|
10088
|
+
if (message.toolCalls !== 0) {
|
|
10089
|
+
obj.toolCalls = Math.round(message.toolCalls);
|
|
10090
|
+
}
|
|
10091
|
+
if (message.userMessages !== 0) {
|
|
10092
|
+
obj.userMessages = Math.round(message.userMessages);
|
|
10093
|
+
}
|
|
10094
|
+
if (message.sessions !== 0) {
|
|
10095
|
+
obj.sessions = Math.round(message.sessions);
|
|
10096
|
+
}
|
|
10097
|
+
if (message.activeUsers !== 0) {
|
|
10098
|
+
obj.activeUsers = Math.round(message.activeUsers);
|
|
10099
|
+
}
|
|
10100
|
+
if (message.topTool !== "") {
|
|
10101
|
+
obj.topTool = message.topTool;
|
|
10102
|
+
}
|
|
10103
|
+
return obj;
|
|
10104
|
+
},
|
|
10105
|
+
|
|
10106
|
+
create<I extends Exact<DeepPartial<ActivityRhythmBucket>, I>>(base?: I): ActivityRhythmBucket {
|
|
10107
|
+
return ActivityRhythmBucket.fromPartial(base ?? ({} as any));
|
|
10108
|
+
},
|
|
10109
|
+
fromPartial<I extends Exact<DeepPartial<ActivityRhythmBucket>, I>>(object: I): ActivityRhythmBucket {
|
|
10110
|
+
const message = createBaseActivityRhythmBucket();
|
|
10111
|
+
message.dayOfWeek = object.dayOfWeek ?? 0;
|
|
10112
|
+
message.hourOfDay = object.hourOfDay ?? 0;
|
|
10113
|
+
message.eventCount = object.eventCount ?? 0;
|
|
10114
|
+
message.modelUsage = (object.modelUsage !== undefined && object.modelUsage !== null)
|
|
10115
|
+
? TokenActivityMeasures.fromPartial(object.modelUsage)
|
|
10116
|
+
: undefined;
|
|
10117
|
+
message.usageUnavailableCount = object.usageUnavailableCount ?? 0;
|
|
10118
|
+
message.costUnavailableCount = object.costUnavailableCount ?? 0;
|
|
10119
|
+
message.toolCalls = object.toolCalls ?? 0;
|
|
10120
|
+
message.userMessages = object.userMessages ?? 0;
|
|
10121
|
+
message.sessions = object.sessions ?? 0;
|
|
10122
|
+
message.activeUsers = object.activeUsers ?? 0;
|
|
10123
|
+
message.topTool = object.topTool ?? "";
|
|
10124
|
+
return message;
|
|
10125
|
+
},
|
|
10126
|
+
};
|
|
10127
|
+
|
|
9463
10128
|
function createBaseProjectOverviewRequest(): ProjectOverviewRequest {
|
|
9464
10129
|
return { organizationId: "", projectId: "", activeAfter: undefined, topSessions: 0 };
|
|
9465
10130
|
}
|
|
@@ -13141,6 +13806,11 @@ export interface AIGatewayService {
|
|
|
13141
13806
|
* omitted; today is provisional.
|
|
13142
13807
|
*/
|
|
13143
13808
|
StreamDailyActivity(request: DailyActivityRequest, metadata?: Metadata): Observable<DailyActivity>;
|
|
13809
|
+
/**
|
|
13810
|
+
* Live weekly activity rhythm: a sparse (weekday, hour) heatmap over a bounded sliding window in an
|
|
13811
|
+
* explicit IANA time zone. Every latest logical event counts; settled model calls add token/cost.
|
|
13812
|
+
*/
|
|
13813
|
+
StreamActivityRhythm(request: ActivityRhythmRequest, metadata?: Metadata): Observable<ActivityRhythm>;
|
|
13144
13814
|
/**
|
|
13145
13815
|
* Live stream of one project's dashboard bundle: headline totals, model/provider/source mix,
|
|
13146
13816
|
* and top sessions by cost.
|
|
@@ -13186,6 +13856,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
13186
13856
|
this.StreamGitActivitySummary = this.StreamGitActivitySummary.bind(this);
|
|
13187
13857
|
this.StreamTokenActivitySummary = this.StreamTokenActivitySummary.bind(this);
|
|
13188
13858
|
this.StreamDailyActivity = this.StreamDailyActivity.bind(this);
|
|
13859
|
+
this.StreamActivityRhythm = this.StreamActivityRhythm.bind(this);
|
|
13189
13860
|
this.StreamProjectOverview = this.StreamProjectOverview.bind(this);
|
|
13190
13861
|
this.ListFiles = this.ListFiles.bind(this);
|
|
13191
13862
|
this.StreamFilesSummary = this.StreamFilesSummary.bind(this);
|
|
@@ -13282,6 +13953,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
13282
13953
|
return result.pipe(map((data) => DailyActivity.decode(new BinaryReader(data))));
|
|
13283
13954
|
}
|
|
13284
13955
|
|
|
13956
|
+
StreamActivityRhythm(request: ActivityRhythmRequest, metadata?: Metadata): Observable<ActivityRhythm> {
|
|
13957
|
+
const data = ActivityRhythmRequest.encode(request).finish();
|
|
13958
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamActivityRhythm", data, metadata);
|
|
13959
|
+
return result.pipe(map((data) => ActivityRhythm.decode(new BinaryReader(data))));
|
|
13960
|
+
}
|
|
13961
|
+
|
|
13285
13962
|
StreamProjectOverview(request: ProjectOverviewRequest, metadata?: Metadata): Observable<ProjectOverview> {
|
|
13286
13963
|
const data = ProjectOverviewRequest.encode(request).finish();
|
|
13287
13964
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamProjectOverview", data, metadata);
|