@miradorlabs/web-grpc 2.57.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.
package/package.json
CHANGED
|
@@ -1201,6 +1201,46 @@ export interface DailyActivityMeasures {
|
|
|
1201
1201
|
branchesCreated: number;
|
|
1202
1202
|
}
|
|
1203
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
|
+
|
|
1204
1244
|
export interface ProjectOverviewRequest {
|
|
1205
1245
|
organizationId: string;
|
|
1206
1246
|
projectId: string;
|
|
@@ -9518,6 +9558,573 @@ export const DailyActivityMeasures: MessageFns<DailyActivityMeasures> = {
|
|
|
9518
9558
|
},
|
|
9519
9559
|
};
|
|
9520
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
|
+
|
|
9521
10128
|
function createBaseProjectOverviewRequest(): ProjectOverviewRequest {
|
|
9522
10129
|
return { organizationId: "", projectId: "", activeAfter: undefined, topSessions: 0 };
|
|
9523
10130
|
}
|
|
@@ -13199,6 +13806,11 @@ export interface AIGatewayService {
|
|
|
13199
13806
|
* omitted; today is provisional.
|
|
13200
13807
|
*/
|
|
13201
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>;
|
|
13202
13814
|
/**
|
|
13203
13815
|
* Live stream of one project's dashboard bundle: headline totals, model/provider/source mix,
|
|
13204
13816
|
* and top sessions by cost.
|
|
@@ -13244,6 +13856,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
13244
13856
|
this.StreamGitActivitySummary = this.StreamGitActivitySummary.bind(this);
|
|
13245
13857
|
this.StreamTokenActivitySummary = this.StreamTokenActivitySummary.bind(this);
|
|
13246
13858
|
this.StreamDailyActivity = this.StreamDailyActivity.bind(this);
|
|
13859
|
+
this.StreamActivityRhythm = this.StreamActivityRhythm.bind(this);
|
|
13247
13860
|
this.StreamProjectOverview = this.StreamProjectOverview.bind(this);
|
|
13248
13861
|
this.ListFiles = this.ListFiles.bind(this);
|
|
13249
13862
|
this.StreamFilesSummary = this.StreamFilesSummary.bind(this);
|
|
@@ -13340,6 +13953,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
13340
13953
|
return result.pipe(map((data) => DailyActivity.decode(new BinaryReader(data))));
|
|
13341
13954
|
}
|
|
13342
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
|
+
|
|
13343
13962
|
StreamProjectOverview(request: ProjectOverviewRequest, metadata?: Metadata): Observable<ProjectOverview> {
|
|
13344
13963
|
const data = ProjectOverviewRequest.encode(request).finish();
|
|
13345
13964
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamProjectOverview", data, metadata);
|
|
@@ -30,6 +30,28 @@ function deserialize_gateway_web_v1_AISessionSummary(buffer_arg) {
|
|
|
30
30
|
return proto_gateway_web_v1_ai_gateway_pb.AISessionSummary.deserializeBinary(new Uint8Array(buffer_arg));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function serialize_gateway_web_v1_ActivityRhythm(arg) {
|
|
34
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ActivityRhythm)) {
|
|
35
|
+
throw new Error('Expected argument of type gateway.web.v1.ActivityRhythm');
|
|
36
|
+
}
|
|
37
|
+
return Buffer.from(arg.serializeBinary());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function deserialize_gateway_web_v1_ActivityRhythm(buffer_arg) {
|
|
41
|
+
return proto_gateway_web_v1_ai_gateway_pb.ActivityRhythm.deserializeBinary(new Uint8Array(buffer_arg));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function serialize_gateway_web_v1_ActivityRhythmRequest(arg) {
|
|
45
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ActivityRhythmRequest)) {
|
|
46
|
+
throw new Error('Expected argument of type gateway.web.v1.ActivityRhythmRequest');
|
|
47
|
+
}
|
|
48
|
+
return Buffer.from(arg.serializeBinary());
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function deserialize_gateway_web_v1_ActivityRhythmRequest(buffer_arg) {
|
|
52
|
+
return proto_gateway_web_v1_ai_gateway_pb.ActivityRhythmRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
53
|
+
}
|
|
54
|
+
|
|
33
55
|
function serialize_gateway_web_v1_DailyActivity(arg) {
|
|
34
56
|
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.DailyActivity)) {
|
|
35
57
|
throw new Error('Expected argument of type gateway.web.v1.DailyActivity');
|
|
@@ -603,6 +625,19 @@ streamDailyActivity: {
|
|
|
603
625
|
responseSerialize: serialize_gateway_web_v1_DailyActivity,
|
|
604
626
|
responseDeserialize: deserialize_gateway_web_v1_DailyActivity,
|
|
605
627
|
},
|
|
628
|
+
// Live weekly activity rhythm: a sparse (weekday, hour) heatmap over a bounded sliding window in an
|
|
629
|
+
// explicit IANA time zone. Every latest logical event counts; settled model calls add token/cost.
|
|
630
|
+
streamActivityRhythm: {
|
|
631
|
+
path: '/gateway.web.v1.AIGatewayService/StreamActivityRhythm',
|
|
632
|
+
requestStream: false,
|
|
633
|
+
responseStream: true,
|
|
634
|
+
requestType: proto_gateway_web_v1_ai_gateway_pb.ActivityRhythmRequest,
|
|
635
|
+
responseType: proto_gateway_web_v1_ai_gateway_pb.ActivityRhythm,
|
|
636
|
+
requestSerialize: serialize_gateway_web_v1_ActivityRhythmRequest,
|
|
637
|
+
requestDeserialize: deserialize_gateway_web_v1_ActivityRhythmRequest,
|
|
638
|
+
responseSerialize: serialize_gateway_web_v1_ActivityRhythm,
|
|
639
|
+
responseDeserialize: deserialize_gateway_web_v1_ActivityRhythm,
|
|
640
|
+
},
|
|
606
641
|
// Live stream of one project's dashboard bundle: headline totals, model/provider/source mix,
|
|
607
642
|
// and top sessions by cost.
|
|
608
643
|
streamProjectOverview: {
|