@miradorlabs/web-grpc 4.30.0 → 4.32.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.
|
@@ -1863,6 +1863,11 @@ export interface AISessionSummary {
|
|
|
1863
1863
|
sessionScore?:
|
|
1864
1864
|
| number
|
|
1865
1865
|
| undefined;
|
|
1866
|
+
/**
|
|
1867
|
+
* The rubric template the session_score was graded on (AISessionScore.rubric); UNSPECIFIED when session_score is
|
|
1868
|
+
* absent, or when the score predates the scorer recording its template.
|
|
1869
|
+
*/
|
|
1870
|
+
sessionScoreRubric: AISessionScoreRubric;
|
|
1866
1871
|
/**
|
|
1867
1872
|
* The session's prompt labels rolled up (MIR-469), on StreamSessionSummary only, never on ListSessions or
|
|
1868
1873
|
* StreamSessions. Absent when no prompt is labelled or the labels could not be read: not available, never zero.
|
|
@@ -3251,6 +3256,68 @@ export interface SessionGitBucket {
|
|
|
3251
3256
|
count: number;
|
|
3252
3257
|
}
|
|
3253
3258
|
|
|
3259
|
+
export interface GetSessionTotalsTrendRequest {
|
|
3260
|
+
organizationId: string;
|
|
3261
|
+
projectId: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* The window's start, which is this request's scope (it has no filter): the sessions last active at or after it,
|
|
3264
|
+
* the set ListSessions keeps for the same filter.active_after. At most 35 days before the server's clock, else
|
|
3265
|
+
* INVALID_ARGUMENT; a start in the future answers no buckets.
|
|
3266
|
+
*/
|
|
3267
|
+
activeAfter:
|
|
3268
|
+
| Date
|
|
3269
|
+
| undefined;
|
|
3270
|
+
/**
|
|
3271
|
+
* Bucket width: ANALYTICS_TIME_INTERVAL_1_HOUR (a clock hour in time_zone) or ANALYTICS_TIME_INTERVAL_1_DAY (a
|
|
3272
|
+
* calendar day in time_zone). This RPC derives none: unspecified and every other value are INVALID_ARGUMENT.
|
|
3273
|
+
*/
|
|
3274
|
+
timeInterval: AnalyticsTimeInterval;
|
|
3275
|
+
/**
|
|
3276
|
+
* IANA zone name the buckets start in (e.g. "America/New_York"); empty is "UTC". Any other name is
|
|
3277
|
+
* INVALID_ARGUMENT. Echoed on the response.
|
|
3278
|
+
*/
|
|
3279
|
+
timeZone: string;
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
export interface GetSessionTotalsTrendResponse {
|
|
3283
|
+
status:
|
|
3284
|
+
| ResponseStatus
|
|
3285
|
+
| undefined;
|
|
3286
|
+
/**
|
|
3287
|
+
* One row per (bucket, source system) with at least one session, ordered by bucket_start then source_system. A
|
|
3288
|
+
* bucket or source with no session has no row, so no rows means no session was last active in the window.
|
|
3289
|
+
*/
|
|
3290
|
+
buckets: SessionTotalsBucket[];
|
|
3291
|
+
/** The resolved IANA zone the buckets start in ("UTC" when the request named none). */
|
|
3292
|
+
timeZone: string;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* SessionTotalsBucket is one source system's sessions whose last activity fell in one bucket, with their
|
|
3297
|
+
* whole-session totals. input_tokens is cache-inclusive. A source that reports no usage has zero tokens and cost
|
|
3298
|
+
* here: unknown, not none, which the caller decides by source, as for AISessionSummary.usage.
|
|
3299
|
+
*/
|
|
3300
|
+
export interface SessionTotalsBucket {
|
|
3301
|
+
/**
|
|
3302
|
+
* The instant the hour or calendar day holding the sessions' last activity starts in the response's time_zone.
|
|
3303
|
+
* Across a daylight-saving change a day is 23 or 25 hours long.
|
|
3304
|
+
*/
|
|
3305
|
+
bucketStart: Date | undefined;
|
|
3306
|
+
sourceSystem: string;
|
|
3307
|
+
/**
|
|
3308
|
+
* Sessions as ListSessions lists them, one per (source_system, session_id): over all rows they add up to
|
|
3309
|
+
* ListSessions' pagination.total_count for the same filter.active_after.
|
|
3310
|
+
*/
|
|
3311
|
+
sessions: number;
|
|
3312
|
+
modelCalls: number;
|
|
3313
|
+
inputTokens: number;
|
|
3314
|
+
outputTokens: number;
|
|
3315
|
+
/** AITokenUsage.provider_cost_usd, summed. */
|
|
3316
|
+
providerCostUsd: number;
|
|
3317
|
+
/** AIFacilityCostBreakdown.subscription_facility_usd, summed: a facility lens, never reconciled billing. */
|
|
3318
|
+
subscriptionFacilityUsd: number;
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3254
3321
|
export interface GetSessionAnalysisRequest {
|
|
3255
3322
|
organizationId: string;
|
|
3256
3323
|
projectId: string;
|
|
@@ -3455,7 +3522,14 @@ export interface AISessionScore {
|
|
|
3455
3522
|
/** The session_version (AISessionSummary.session_version) the grading read. */
|
|
3456
3523
|
inputSessionVersion: number;
|
|
3457
3524
|
/** When the scoring run selected the session. */
|
|
3458
|
-
scoredAt:
|
|
3525
|
+
scoredAt:
|
|
3526
|
+
| Date
|
|
3527
|
+
| undefined;
|
|
3528
|
+
/**
|
|
3529
|
+
* The rubric template that graded it; UNSPECIFIED for a score graded before the scorer recorded its template (then
|
|
3530
|
+
* only rubric_version names it).
|
|
3531
|
+
*/
|
|
3532
|
+
rubric: AISessionScoreRubric;
|
|
3459
3533
|
}
|
|
3460
3534
|
|
|
3461
3535
|
/**
|
|
@@ -5305,6 +5379,7 @@ function createBaseAISessionSummary(): AISessionSummary {
|
|
|
5305
5379
|
workType: "",
|
|
5306
5380
|
workSize: "",
|
|
5307
5381
|
sessionScore: undefined,
|
|
5382
|
+
sessionScoreRubric: 0,
|
|
5308
5383
|
promptLabelSummary: undefined,
|
|
5309
5384
|
};
|
|
5310
5385
|
}
|
|
@@ -5425,6 +5500,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
5425
5500
|
if (message.sessionScore !== undefined) {
|
|
5426
5501
|
writer.uint32(304).int32(message.sessionScore);
|
|
5427
5502
|
}
|
|
5503
|
+
if (message.sessionScoreRubric !== 0) {
|
|
5504
|
+
writer.uint32(320).int32(message.sessionScoreRubric);
|
|
5505
|
+
}
|
|
5428
5506
|
if (message.promptLabelSummary !== undefined) {
|
|
5429
5507
|
AIPromptLabelSummary.encode(message.promptLabelSummary, writer.uint32(314).fork()).join();
|
|
5430
5508
|
}
|
|
@@ -5748,6 +5826,14 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
5748
5826
|
message.sessionScore = reader.int32();
|
|
5749
5827
|
continue;
|
|
5750
5828
|
}
|
|
5829
|
+
case 40: {
|
|
5830
|
+
if (tag !== 320) {
|
|
5831
|
+
break;
|
|
5832
|
+
}
|
|
5833
|
+
|
|
5834
|
+
message.sessionScoreRubric = reader.int32() as any;
|
|
5835
|
+
continue;
|
|
5836
|
+
}
|
|
5751
5837
|
case 39: {
|
|
5752
5838
|
if (tag !== 314) {
|
|
5753
5839
|
break;
|
|
@@ -5920,6 +6006,11 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
5920
6006
|
: isSet(object.session_score)
|
|
5921
6007
|
? globalThis.Number(object.session_score)
|
|
5922
6008
|
: undefined,
|
|
6009
|
+
sessionScoreRubric: isSet(object.sessionScoreRubric)
|
|
6010
|
+
? aISessionScoreRubricFromJSON(object.sessionScoreRubric)
|
|
6011
|
+
: isSet(object.session_score_rubric)
|
|
6012
|
+
? aISessionScoreRubricFromJSON(object.session_score_rubric)
|
|
6013
|
+
: 0,
|
|
5923
6014
|
promptLabelSummary: isSet(object.promptLabelSummary)
|
|
5924
6015
|
? AIPromptLabelSummary.fromJSON(object.promptLabelSummary)
|
|
5925
6016
|
: isSet(object.prompt_label_summary)
|
|
@@ -6044,6 +6135,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
6044
6135
|
if (message.sessionScore !== undefined) {
|
|
6045
6136
|
obj.sessionScore = Math.round(message.sessionScore);
|
|
6046
6137
|
}
|
|
6138
|
+
if (message.sessionScoreRubric !== 0) {
|
|
6139
|
+
obj.sessionScoreRubric = aISessionScoreRubricToJSON(message.sessionScoreRubric);
|
|
6140
|
+
}
|
|
6047
6141
|
if (message.promptLabelSummary !== undefined) {
|
|
6048
6142
|
obj.promptLabelSummary = AIPromptLabelSummary.toJSON(message.promptLabelSummary);
|
|
6049
6143
|
}
|
|
@@ -6095,6 +6189,7 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
6095
6189
|
message.workType = object.workType ?? "";
|
|
6096
6190
|
message.workSize = object.workSize ?? "";
|
|
6097
6191
|
message.sessionScore = object.sessionScore ?? undefined;
|
|
6192
|
+
message.sessionScoreRubric = object.sessionScoreRubric ?? 0;
|
|
6098
6193
|
message.promptLabelSummary = (object.promptLabelSummary !== undefined && object.promptLabelSummary !== null)
|
|
6099
6194
|
? AIPromptLabelSummary.fromPartial(object.promptLabelSummary)
|
|
6100
6195
|
: undefined;
|
|
@@ -23623,6 +23718,488 @@ export const SessionGitBucket: MessageFns<SessionGitBucket> = {
|
|
|
23623
23718
|
},
|
|
23624
23719
|
};
|
|
23625
23720
|
|
|
23721
|
+
function createBaseGetSessionTotalsTrendRequest(): GetSessionTotalsTrendRequest {
|
|
23722
|
+
return { organizationId: "", projectId: "", activeAfter: undefined, timeInterval: 0, timeZone: "" };
|
|
23723
|
+
}
|
|
23724
|
+
|
|
23725
|
+
export const GetSessionTotalsTrendRequest: MessageFns<GetSessionTotalsTrendRequest> = {
|
|
23726
|
+
encode(message: GetSessionTotalsTrendRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
23727
|
+
if (message.organizationId !== "") {
|
|
23728
|
+
writer.uint32(10).string(message.organizationId);
|
|
23729
|
+
}
|
|
23730
|
+
if (message.projectId !== "") {
|
|
23731
|
+
writer.uint32(18).string(message.projectId);
|
|
23732
|
+
}
|
|
23733
|
+
if (message.activeAfter !== undefined) {
|
|
23734
|
+
Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(26).fork()).join();
|
|
23735
|
+
}
|
|
23736
|
+
if (message.timeInterval !== 0) {
|
|
23737
|
+
writer.uint32(32).int32(message.timeInterval);
|
|
23738
|
+
}
|
|
23739
|
+
if (message.timeZone !== "") {
|
|
23740
|
+
writer.uint32(42).string(message.timeZone);
|
|
23741
|
+
}
|
|
23742
|
+
return writer;
|
|
23743
|
+
},
|
|
23744
|
+
|
|
23745
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSessionTotalsTrendRequest {
|
|
23746
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
23747
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
23748
|
+
if (previousRecursionDepth >= 100) {
|
|
23749
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
23750
|
+
}
|
|
23751
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
23752
|
+
try {
|
|
23753
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
23754
|
+
const message = createBaseGetSessionTotalsTrendRequest();
|
|
23755
|
+
while (reader.pos < end) {
|
|
23756
|
+
const tag = reader.uint32();
|
|
23757
|
+
switch (tag >>> 3) {
|
|
23758
|
+
case 1: {
|
|
23759
|
+
if (tag !== 10) {
|
|
23760
|
+
break;
|
|
23761
|
+
}
|
|
23762
|
+
|
|
23763
|
+
message.organizationId = reader.string();
|
|
23764
|
+
continue;
|
|
23765
|
+
}
|
|
23766
|
+
case 2: {
|
|
23767
|
+
if (tag !== 18) {
|
|
23768
|
+
break;
|
|
23769
|
+
}
|
|
23770
|
+
|
|
23771
|
+
message.projectId = reader.string();
|
|
23772
|
+
continue;
|
|
23773
|
+
}
|
|
23774
|
+
case 3: {
|
|
23775
|
+
if (tag !== 26) {
|
|
23776
|
+
break;
|
|
23777
|
+
}
|
|
23778
|
+
|
|
23779
|
+
message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
23780
|
+
continue;
|
|
23781
|
+
}
|
|
23782
|
+
case 4: {
|
|
23783
|
+
if (tag !== 32) {
|
|
23784
|
+
break;
|
|
23785
|
+
}
|
|
23786
|
+
|
|
23787
|
+
message.timeInterval = reader.int32() as any;
|
|
23788
|
+
continue;
|
|
23789
|
+
}
|
|
23790
|
+
case 5: {
|
|
23791
|
+
if (tag !== 42) {
|
|
23792
|
+
break;
|
|
23793
|
+
}
|
|
23794
|
+
|
|
23795
|
+
message.timeZone = reader.string();
|
|
23796
|
+
continue;
|
|
23797
|
+
}
|
|
23798
|
+
}
|
|
23799
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
23800
|
+
break;
|
|
23801
|
+
}
|
|
23802
|
+
reader.skip(tag & 7);
|
|
23803
|
+
}
|
|
23804
|
+
return message;
|
|
23805
|
+
} finally {
|
|
23806
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
23807
|
+
}
|
|
23808
|
+
},
|
|
23809
|
+
|
|
23810
|
+
fromJSON(object: any): GetSessionTotalsTrendRequest {
|
|
23811
|
+
return {
|
|
23812
|
+
organizationId: isSet(object.organizationId)
|
|
23813
|
+
? globalThis.String(object.organizationId)
|
|
23814
|
+
: isSet(object.organization_id)
|
|
23815
|
+
? globalThis.String(object.organization_id)
|
|
23816
|
+
: "",
|
|
23817
|
+
projectId: isSet(object.projectId)
|
|
23818
|
+
? globalThis.String(object.projectId)
|
|
23819
|
+
: isSet(object.project_id)
|
|
23820
|
+
? globalThis.String(object.project_id)
|
|
23821
|
+
: "",
|
|
23822
|
+
activeAfter: isSet(object.activeAfter)
|
|
23823
|
+
? fromJsonTimestamp(object.activeAfter)
|
|
23824
|
+
: isSet(object.active_after)
|
|
23825
|
+
? fromJsonTimestamp(object.active_after)
|
|
23826
|
+
: undefined,
|
|
23827
|
+
timeInterval: isSet(object.timeInterval)
|
|
23828
|
+
? analyticsTimeIntervalFromJSON(object.timeInterval)
|
|
23829
|
+
: isSet(object.time_interval)
|
|
23830
|
+
? analyticsTimeIntervalFromJSON(object.time_interval)
|
|
23831
|
+
: 0,
|
|
23832
|
+
timeZone: isSet(object.timeZone)
|
|
23833
|
+
? globalThis.String(object.timeZone)
|
|
23834
|
+
: isSet(object.time_zone)
|
|
23835
|
+
? globalThis.String(object.time_zone)
|
|
23836
|
+
: "",
|
|
23837
|
+
};
|
|
23838
|
+
},
|
|
23839
|
+
|
|
23840
|
+
toJSON(message: GetSessionTotalsTrendRequest): unknown {
|
|
23841
|
+
const obj: any = {};
|
|
23842
|
+
if (message.organizationId !== "") {
|
|
23843
|
+
obj.organizationId = message.organizationId;
|
|
23844
|
+
}
|
|
23845
|
+
if (message.projectId !== "") {
|
|
23846
|
+
obj.projectId = message.projectId;
|
|
23847
|
+
}
|
|
23848
|
+
if (message.activeAfter !== undefined) {
|
|
23849
|
+
obj.activeAfter = message.activeAfter.toISOString();
|
|
23850
|
+
}
|
|
23851
|
+
if (message.timeInterval !== 0) {
|
|
23852
|
+
obj.timeInterval = analyticsTimeIntervalToJSON(message.timeInterval);
|
|
23853
|
+
}
|
|
23854
|
+
if (message.timeZone !== "") {
|
|
23855
|
+
obj.timeZone = message.timeZone;
|
|
23856
|
+
}
|
|
23857
|
+
return obj;
|
|
23858
|
+
},
|
|
23859
|
+
|
|
23860
|
+
create<I extends Exact<DeepPartial<GetSessionTotalsTrendRequest>, I>>(base?: I): GetSessionTotalsTrendRequest {
|
|
23861
|
+
return GetSessionTotalsTrendRequest.fromPartial(base ?? ({} as any));
|
|
23862
|
+
},
|
|
23863
|
+
fromPartial<I extends Exact<DeepPartial<GetSessionTotalsTrendRequest>, I>>(object: I): GetSessionTotalsTrendRequest {
|
|
23864
|
+
const message = createBaseGetSessionTotalsTrendRequest();
|
|
23865
|
+
message.organizationId = object.organizationId ?? "";
|
|
23866
|
+
message.projectId = object.projectId ?? "";
|
|
23867
|
+
message.activeAfter = object.activeAfter ?? undefined;
|
|
23868
|
+
message.timeInterval = object.timeInterval ?? 0;
|
|
23869
|
+
message.timeZone = object.timeZone ?? "";
|
|
23870
|
+
return message;
|
|
23871
|
+
},
|
|
23872
|
+
};
|
|
23873
|
+
|
|
23874
|
+
function createBaseGetSessionTotalsTrendResponse(): GetSessionTotalsTrendResponse {
|
|
23875
|
+
return { status: undefined, buckets: [], timeZone: "" };
|
|
23876
|
+
}
|
|
23877
|
+
|
|
23878
|
+
export const GetSessionTotalsTrendResponse: MessageFns<GetSessionTotalsTrendResponse> = {
|
|
23879
|
+
encode(message: GetSessionTotalsTrendResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
23880
|
+
if (message.status !== undefined) {
|
|
23881
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
23882
|
+
}
|
|
23883
|
+
for (const v of message.buckets) {
|
|
23884
|
+
SessionTotalsBucket.encode(v!, writer.uint32(18).fork()).join();
|
|
23885
|
+
}
|
|
23886
|
+
if (message.timeZone !== "") {
|
|
23887
|
+
writer.uint32(26).string(message.timeZone);
|
|
23888
|
+
}
|
|
23889
|
+
return writer;
|
|
23890
|
+
},
|
|
23891
|
+
|
|
23892
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSessionTotalsTrendResponse {
|
|
23893
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
23894
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
23895
|
+
if (previousRecursionDepth >= 100) {
|
|
23896
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
23897
|
+
}
|
|
23898
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
23899
|
+
try {
|
|
23900
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
23901
|
+
const message = createBaseGetSessionTotalsTrendResponse();
|
|
23902
|
+
while (reader.pos < end) {
|
|
23903
|
+
const tag = reader.uint32();
|
|
23904
|
+
switch (tag >>> 3) {
|
|
23905
|
+
case 1: {
|
|
23906
|
+
if (tag !== 10) {
|
|
23907
|
+
break;
|
|
23908
|
+
}
|
|
23909
|
+
|
|
23910
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
23911
|
+
continue;
|
|
23912
|
+
}
|
|
23913
|
+
case 2: {
|
|
23914
|
+
if (tag !== 18) {
|
|
23915
|
+
break;
|
|
23916
|
+
}
|
|
23917
|
+
|
|
23918
|
+
message.buckets.push(SessionTotalsBucket.decode(reader, reader.uint32()));
|
|
23919
|
+
continue;
|
|
23920
|
+
}
|
|
23921
|
+
case 3: {
|
|
23922
|
+
if (tag !== 26) {
|
|
23923
|
+
break;
|
|
23924
|
+
}
|
|
23925
|
+
|
|
23926
|
+
message.timeZone = reader.string();
|
|
23927
|
+
continue;
|
|
23928
|
+
}
|
|
23929
|
+
}
|
|
23930
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
23931
|
+
break;
|
|
23932
|
+
}
|
|
23933
|
+
reader.skip(tag & 7);
|
|
23934
|
+
}
|
|
23935
|
+
return message;
|
|
23936
|
+
} finally {
|
|
23937
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
23938
|
+
}
|
|
23939
|
+
},
|
|
23940
|
+
|
|
23941
|
+
fromJSON(object: any): GetSessionTotalsTrendResponse {
|
|
23942
|
+
return {
|
|
23943
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
23944
|
+
buckets: globalThis.Array.isArray(object?.buckets)
|
|
23945
|
+
? object.buckets.map((e: any) => SessionTotalsBucket.fromJSON(e))
|
|
23946
|
+
: [],
|
|
23947
|
+
timeZone: isSet(object.timeZone)
|
|
23948
|
+
? globalThis.String(object.timeZone)
|
|
23949
|
+
: isSet(object.time_zone)
|
|
23950
|
+
? globalThis.String(object.time_zone)
|
|
23951
|
+
: "",
|
|
23952
|
+
};
|
|
23953
|
+
},
|
|
23954
|
+
|
|
23955
|
+
toJSON(message: GetSessionTotalsTrendResponse): unknown {
|
|
23956
|
+
const obj: any = {};
|
|
23957
|
+
if (message.status !== undefined) {
|
|
23958
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
23959
|
+
}
|
|
23960
|
+
if (message.buckets?.length) {
|
|
23961
|
+
obj.buckets = message.buckets.map((e) => SessionTotalsBucket.toJSON(e));
|
|
23962
|
+
}
|
|
23963
|
+
if (message.timeZone !== "") {
|
|
23964
|
+
obj.timeZone = message.timeZone;
|
|
23965
|
+
}
|
|
23966
|
+
return obj;
|
|
23967
|
+
},
|
|
23968
|
+
|
|
23969
|
+
create<I extends Exact<DeepPartial<GetSessionTotalsTrendResponse>, I>>(base?: I): GetSessionTotalsTrendResponse {
|
|
23970
|
+
return GetSessionTotalsTrendResponse.fromPartial(base ?? ({} as any));
|
|
23971
|
+
},
|
|
23972
|
+
fromPartial<I extends Exact<DeepPartial<GetSessionTotalsTrendResponse>, I>>(
|
|
23973
|
+
object: I,
|
|
23974
|
+
): GetSessionTotalsTrendResponse {
|
|
23975
|
+
const message = createBaseGetSessionTotalsTrendResponse();
|
|
23976
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
23977
|
+
? ResponseStatus.fromPartial(object.status)
|
|
23978
|
+
: undefined;
|
|
23979
|
+
message.buckets = object.buckets?.map((e) => SessionTotalsBucket.fromPartial(e)) || [];
|
|
23980
|
+
message.timeZone = object.timeZone ?? "";
|
|
23981
|
+
return message;
|
|
23982
|
+
},
|
|
23983
|
+
};
|
|
23984
|
+
|
|
23985
|
+
function createBaseSessionTotalsBucket(): SessionTotalsBucket {
|
|
23986
|
+
return {
|
|
23987
|
+
bucketStart: undefined,
|
|
23988
|
+
sourceSystem: "",
|
|
23989
|
+
sessions: 0,
|
|
23990
|
+
modelCalls: 0,
|
|
23991
|
+
inputTokens: 0,
|
|
23992
|
+
outputTokens: 0,
|
|
23993
|
+
providerCostUsd: 0,
|
|
23994
|
+
subscriptionFacilityUsd: 0,
|
|
23995
|
+
};
|
|
23996
|
+
}
|
|
23997
|
+
|
|
23998
|
+
export const SessionTotalsBucket: MessageFns<SessionTotalsBucket> = {
|
|
23999
|
+
encode(message: SessionTotalsBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24000
|
+
if (message.bucketStart !== undefined) {
|
|
24001
|
+
Timestamp.encode(toTimestamp(message.bucketStart), writer.uint32(10).fork()).join();
|
|
24002
|
+
}
|
|
24003
|
+
if (message.sourceSystem !== "") {
|
|
24004
|
+
writer.uint32(18).string(message.sourceSystem);
|
|
24005
|
+
}
|
|
24006
|
+
if (message.sessions !== 0) {
|
|
24007
|
+
writer.uint32(24).uint64(message.sessions);
|
|
24008
|
+
}
|
|
24009
|
+
if (message.modelCalls !== 0) {
|
|
24010
|
+
writer.uint32(32).uint64(message.modelCalls);
|
|
24011
|
+
}
|
|
24012
|
+
if (message.inputTokens !== 0) {
|
|
24013
|
+
writer.uint32(40).uint64(message.inputTokens);
|
|
24014
|
+
}
|
|
24015
|
+
if (message.outputTokens !== 0) {
|
|
24016
|
+
writer.uint32(48).uint64(message.outputTokens);
|
|
24017
|
+
}
|
|
24018
|
+
if (message.providerCostUsd !== 0) {
|
|
24019
|
+
writer.uint32(57).double(message.providerCostUsd);
|
|
24020
|
+
}
|
|
24021
|
+
if (message.subscriptionFacilityUsd !== 0) {
|
|
24022
|
+
writer.uint32(65).double(message.subscriptionFacilityUsd);
|
|
24023
|
+
}
|
|
24024
|
+
return writer;
|
|
24025
|
+
},
|
|
24026
|
+
|
|
24027
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SessionTotalsBucket {
|
|
24028
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24029
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24030
|
+
if (previousRecursionDepth >= 100) {
|
|
24031
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24032
|
+
}
|
|
24033
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24034
|
+
try {
|
|
24035
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24036
|
+
const message = createBaseSessionTotalsBucket();
|
|
24037
|
+
while (reader.pos < end) {
|
|
24038
|
+
const tag = reader.uint32();
|
|
24039
|
+
switch (tag >>> 3) {
|
|
24040
|
+
case 1: {
|
|
24041
|
+
if (tag !== 10) {
|
|
24042
|
+
break;
|
|
24043
|
+
}
|
|
24044
|
+
|
|
24045
|
+
message.bucketStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
24046
|
+
continue;
|
|
24047
|
+
}
|
|
24048
|
+
case 2: {
|
|
24049
|
+
if (tag !== 18) {
|
|
24050
|
+
break;
|
|
24051
|
+
}
|
|
24052
|
+
|
|
24053
|
+
message.sourceSystem = reader.string();
|
|
24054
|
+
continue;
|
|
24055
|
+
}
|
|
24056
|
+
case 3: {
|
|
24057
|
+
if (tag !== 24) {
|
|
24058
|
+
break;
|
|
24059
|
+
}
|
|
24060
|
+
|
|
24061
|
+
message.sessions = longToNumber(reader.uint64());
|
|
24062
|
+
continue;
|
|
24063
|
+
}
|
|
24064
|
+
case 4: {
|
|
24065
|
+
if (tag !== 32) {
|
|
24066
|
+
break;
|
|
24067
|
+
}
|
|
24068
|
+
|
|
24069
|
+
message.modelCalls = longToNumber(reader.uint64());
|
|
24070
|
+
continue;
|
|
24071
|
+
}
|
|
24072
|
+
case 5: {
|
|
24073
|
+
if (tag !== 40) {
|
|
24074
|
+
break;
|
|
24075
|
+
}
|
|
24076
|
+
|
|
24077
|
+
message.inputTokens = longToNumber(reader.uint64());
|
|
24078
|
+
continue;
|
|
24079
|
+
}
|
|
24080
|
+
case 6: {
|
|
24081
|
+
if (tag !== 48) {
|
|
24082
|
+
break;
|
|
24083
|
+
}
|
|
24084
|
+
|
|
24085
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
24086
|
+
continue;
|
|
24087
|
+
}
|
|
24088
|
+
case 7: {
|
|
24089
|
+
if (tag !== 57) {
|
|
24090
|
+
break;
|
|
24091
|
+
}
|
|
24092
|
+
|
|
24093
|
+
message.providerCostUsd = reader.double();
|
|
24094
|
+
continue;
|
|
24095
|
+
}
|
|
24096
|
+
case 8: {
|
|
24097
|
+
if (tag !== 65) {
|
|
24098
|
+
break;
|
|
24099
|
+
}
|
|
24100
|
+
|
|
24101
|
+
message.subscriptionFacilityUsd = reader.double();
|
|
24102
|
+
continue;
|
|
24103
|
+
}
|
|
24104
|
+
}
|
|
24105
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24106
|
+
break;
|
|
24107
|
+
}
|
|
24108
|
+
reader.skip(tag & 7);
|
|
24109
|
+
}
|
|
24110
|
+
return message;
|
|
24111
|
+
} finally {
|
|
24112
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24113
|
+
}
|
|
24114
|
+
},
|
|
24115
|
+
|
|
24116
|
+
fromJSON(object: any): SessionTotalsBucket {
|
|
24117
|
+
return {
|
|
24118
|
+
bucketStart: isSet(object.bucketStart)
|
|
24119
|
+
? fromJsonTimestamp(object.bucketStart)
|
|
24120
|
+
: isSet(object.bucket_start)
|
|
24121
|
+
? fromJsonTimestamp(object.bucket_start)
|
|
24122
|
+
: undefined,
|
|
24123
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
24124
|
+
? globalThis.String(object.sourceSystem)
|
|
24125
|
+
: isSet(object.source_system)
|
|
24126
|
+
? globalThis.String(object.source_system)
|
|
24127
|
+
: "",
|
|
24128
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
24129
|
+
modelCalls: isSet(object.modelCalls)
|
|
24130
|
+
? globalThis.Number(object.modelCalls)
|
|
24131
|
+
: isSet(object.model_calls)
|
|
24132
|
+
? globalThis.Number(object.model_calls)
|
|
24133
|
+
: 0,
|
|
24134
|
+
inputTokens: isSet(object.inputTokens)
|
|
24135
|
+
? globalThis.Number(object.inputTokens)
|
|
24136
|
+
: isSet(object.input_tokens)
|
|
24137
|
+
? globalThis.Number(object.input_tokens)
|
|
24138
|
+
: 0,
|
|
24139
|
+
outputTokens: isSet(object.outputTokens)
|
|
24140
|
+
? globalThis.Number(object.outputTokens)
|
|
24141
|
+
: isSet(object.output_tokens)
|
|
24142
|
+
? globalThis.Number(object.output_tokens)
|
|
24143
|
+
: 0,
|
|
24144
|
+
providerCostUsd: isSet(object.providerCostUsd)
|
|
24145
|
+
? globalThis.Number(object.providerCostUsd)
|
|
24146
|
+
: isSet(object.provider_cost_usd)
|
|
24147
|
+
? globalThis.Number(object.provider_cost_usd)
|
|
24148
|
+
: 0,
|
|
24149
|
+
subscriptionFacilityUsd: isSet(object.subscriptionFacilityUsd)
|
|
24150
|
+
? globalThis.Number(object.subscriptionFacilityUsd)
|
|
24151
|
+
: isSet(object.subscription_facility_usd)
|
|
24152
|
+
? globalThis.Number(object.subscription_facility_usd)
|
|
24153
|
+
: 0,
|
|
24154
|
+
};
|
|
24155
|
+
},
|
|
24156
|
+
|
|
24157
|
+
toJSON(message: SessionTotalsBucket): unknown {
|
|
24158
|
+
const obj: any = {};
|
|
24159
|
+
if (message.bucketStart !== undefined) {
|
|
24160
|
+
obj.bucketStart = message.bucketStart.toISOString();
|
|
24161
|
+
}
|
|
24162
|
+
if (message.sourceSystem !== "") {
|
|
24163
|
+
obj.sourceSystem = message.sourceSystem;
|
|
24164
|
+
}
|
|
24165
|
+
if (message.sessions !== 0) {
|
|
24166
|
+
obj.sessions = Math.round(message.sessions);
|
|
24167
|
+
}
|
|
24168
|
+
if (message.modelCalls !== 0) {
|
|
24169
|
+
obj.modelCalls = Math.round(message.modelCalls);
|
|
24170
|
+
}
|
|
24171
|
+
if (message.inputTokens !== 0) {
|
|
24172
|
+
obj.inputTokens = Math.round(message.inputTokens);
|
|
24173
|
+
}
|
|
24174
|
+
if (message.outputTokens !== 0) {
|
|
24175
|
+
obj.outputTokens = Math.round(message.outputTokens);
|
|
24176
|
+
}
|
|
24177
|
+
if (message.providerCostUsd !== 0) {
|
|
24178
|
+
obj.providerCostUsd = floatToJson(message.providerCostUsd);
|
|
24179
|
+
}
|
|
24180
|
+
if (message.subscriptionFacilityUsd !== 0) {
|
|
24181
|
+
obj.subscriptionFacilityUsd = floatToJson(message.subscriptionFacilityUsd);
|
|
24182
|
+
}
|
|
24183
|
+
return obj;
|
|
24184
|
+
},
|
|
24185
|
+
|
|
24186
|
+
create<I extends Exact<DeepPartial<SessionTotalsBucket>, I>>(base?: I): SessionTotalsBucket {
|
|
24187
|
+
return SessionTotalsBucket.fromPartial(base ?? ({} as any));
|
|
24188
|
+
},
|
|
24189
|
+
fromPartial<I extends Exact<DeepPartial<SessionTotalsBucket>, I>>(object: I): SessionTotalsBucket {
|
|
24190
|
+
const message = createBaseSessionTotalsBucket();
|
|
24191
|
+
message.bucketStart = object.bucketStart ?? undefined;
|
|
24192
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
24193
|
+
message.sessions = object.sessions ?? 0;
|
|
24194
|
+
message.modelCalls = object.modelCalls ?? 0;
|
|
24195
|
+
message.inputTokens = object.inputTokens ?? 0;
|
|
24196
|
+
message.outputTokens = object.outputTokens ?? 0;
|
|
24197
|
+
message.providerCostUsd = object.providerCostUsd ?? 0;
|
|
24198
|
+
message.subscriptionFacilityUsd = object.subscriptionFacilityUsd ?? 0;
|
|
24199
|
+
return message;
|
|
24200
|
+
},
|
|
24201
|
+
};
|
|
24202
|
+
|
|
23626
24203
|
function createBaseGetSessionAnalysisRequest(): GetSessionAnalysisRequest {
|
|
23627
24204
|
return { organizationId: "", projectId: "", sourceSystem: "", sessionId: "" };
|
|
23628
24205
|
}
|
|
@@ -25212,6 +25789,7 @@ function createBaseAISessionScore(): AISessionScore {
|
|
|
25212
25789
|
scoreVersion: "",
|
|
25213
25790
|
inputSessionVersion: 0,
|
|
25214
25791
|
scoredAt: undefined,
|
|
25792
|
+
rubric: 0,
|
|
25215
25793
|
};
|
|
25216
25794
|
}
|
|
25217
25795
|
|
|
@@ -25241,6 +25819,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
|
|
|
25241
25819
|
if (message.scoredAt !== undefined) {
|
|
25242
25820
|
Timestamp.encode(toTimestamp(message.scoredAt), writer.uint32(66).fork()).join();
|
|
25243
25821
|
}
|
|
25822
|
+
if (message.rubric !== 0) {
|
|
25823
|
+
writer.uint32(72).int32(message.rubric);
|
|
25824
|
+
}
|
|
25244
25825
|
return writer;
|
|
25245
25826
|
},
|
|
25246
25827
|
|
|
@@ -25321,6 +25902,14 @@ export const AISessionScore: MessageFns<AISessionScore> = {
|
|
|
25321
25902
|
message.scoredAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
25322
25903
|
continue;
|
|
25323
25904
|
}
|
|
25905
|
+
case 9: {
|
|
25906
|
+
if (tag !== 72) {
|
|
25907
|
+
break;
|
|
25908
|
+
}
|
|
25909
|
+
|
|
25910
|
+
message.rubric = reader.int32() as any;
|
|
25911
|
+
continue;
|
|
25912
|
+
}
|
|
25324
25913
|
}
|
|
25325
25914
|
if ((tag & 7) === 4 || tag === 0) {
|
|
25326
25915
|
break;
|
|
@@ -25361,6 +25950,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
|
|
|
25361
25950
|
: isSet(object.scored_at)
|
|
25362
25951
|
? fromJsonTimestamp(object.scored_at)
|
|
25363
25952
|
: undefined,
|
|
25953
|
+
rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
|
|
25364
25954
|
};
|
|
25365
25955
|
},
|
|
25366
25956
|
|
|
@@ -25390,6 +25980,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
|
|
|
25390
25980
|
if (message.scoredAt !== undefined) {
|
|
25391
25981
|
obj.scoredAt = message.scoredAt.toISOString();
|
|
25392
25982
|
}
|
|
25983
|
+
if (message.rubric !== 0) {
|
|
25984
|
+
obj.rubric = aISessionScoreRubricToJSON(message.rubric);
|
|
25985
|
+
}
|
|
25393
25986
|
return obj;
|
|
25394
25987
|
},
|
|
25395
25988
|
|
|
@@ -25408,6 +26001,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
|
|
|
25408
26001
|
message.scoreVersion = object.scoreVersion ?? "";
|
|
25409
26002
|
message.inputSessionVersion = object.inputSessionVersion ?? 0;
|
|
25410
26003
|
message.scoredAt = object.scoredAt ?? undefined;
|
|
26004
|
+
message.rubric = object.rubric ?? 0;
|
|
25411
26005
|
return message;
|
|
25412
26006
|
},
|
|
25413
26007
|
};
|
|
@@ -35496,6 +36090,15 @@ export interface AIGatewayService {
|
|
|
35496
36090
|
* calls, tokens and cost, and each git action's count. Mirrors telemetry.api.v1.
|
|
35497
36091
|
*/
|
|
35498
36092
|
GetSessionUsageTrend(request: SessionUsageTrendRequest, metadata?: Metadata): Promise<SessionUsageTrendResponse>;
|
|
36093
|
+
/**
|
|
36094
|
+
* The sessions ListSessions lists with filter.active_after, per hour or calendar day of each session's last activity
|
|
36095
|
+
* and source system: how many sessions, and their whole-session model calls, tokens and cost. Each session's
|
|
36096
|
+
* lifetime totals land in the bucket of its last activity. Unpaged, bounded by its window. Mirrors ai.api.v1.
|
|
36097
|
+
*/
|
|
36098
|
+
GetSessionTotalsTrend(
|
|
36099
|
+
request: GetSessionTotalsTrendRequest,
|
|
36100
|
+
metadata?: Metadata,
|
|
36101
|
+
): Promise<GetSessionTotalsTrendResponse>;
|
|
35499
36102
|
/**
|
|
35500
36103
|
* One session's latest score against the scorer's rubric, with each criterion's assessment and improvement, and
|
|
35501
36104
|
* its latest insights with their cause and action; each part absent until its job has run. Mirrors ai.api.v1.
|
|
@@ -35634,6 +36237,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
35634
36237
|
this.GetReasoningTrendContribution = this.GetReasoningTrendContribution.bind(this);
|
|
35635
36238
|
this.SetReasoningTrendContribution = this.SetReasoningTrendContribution.bind(this);
|
|
35636
36239
|
this.GetSessionUsageTrend = this.GetSessionUsageTrend.bind(this);
|
|
36240
|
+
this.GetSessionTotalsTrend = this.GetSessionTotalsTrend.bind(this);
|
|
35637
36241
|
this.GetSessionAnalysis = this.GetSessionAnalysis.bind(this);
|
|
35638
36242
|
this.ListSessionInsights = this.ListSessionInsights.bind(this);
|
|
35639
36243
|
this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
|
|
@@ -35841,6 +36445,15 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
35841
36445
|
return promise.then((data) => SessionUsageTrendResponse.decode(new BinaryReader(data)));
|
|
35842
36446
|
}
|
|
35843
36447
|
|
|
36448
|
+
GetSessionTotalsTrend(
|
|
36449
|
+
request: GetSessionTotalsTrendRequest,
|
|
36450
|
+
metadata?: Metadata,
|
|
36451
|
+
): Promise<GetSessionTotalsTrendResponse> {
|
|
36452
|
+
const data = GetSessionTotalsTrendRequest.encode(request).finish();
|
|
36453
|
+
const promise = this.rpc.request(this.service, "GetSessionTotalsTrend", data, metadata);
|
|
36454
|
+
return promise.then((data) => GetSessionTotalsTrendResponse.decode(new BinaryReader(data)));
|
|
36455
|
+
}
|
|
36456
|
+
|
|
35844
36457
|
GetSessionAnalysis(request: GetSessionAnalysisRequest, metadata?: Metadata): Promise<GetSessionAnalysisResponse> {
|
|
35845
36458
|
const data = GetSessionAnalysisRequest.encode(request).finish();
|
|
35846
36459
|
const promise = this.rpc.request(this.service, "GetSessionAnalysis", data, metadata);
|