@miradorlabs/web-grpc 4.29.0 → 4.30.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.
@@ -72,6 +72,75 @@ export function aILabelRatingToJSON(object: AILabelRating): string {
72
72
  }
73
73
  }
74
74
 
75
+ /**
76
+ * AISessionScoreRubric is a rubric template a team's sessions are scored on. A wire copy of the stored
77
+ * ai.common.v1.AISessionScoreRubric (the npm stubs carry only gateway protos), held to it by a parity test.
78
+ */
79
+ export enum AISessionScoreRubric {
80
+ AI_SESSION_SCORE_RUBRIC_UNSPECIFIED = 0,
81
+ /** AI_SESSION_SCORE_RUBRIC_CUSTOM - A team's own uploaded template. Reserved: not built yet, so it is never served or accepted. */
82
+ AI_SESSION_SCORE_RUBRIC_CUSTOM = 1,
83
+ /** AI_SESSION_SCORE_RUBRIC_STANDARD - Balanced best practice: prompts, checking and steering. Every team's default. */
84
+ AI_SESSION_SCORE_RUBRIC_STANDARD = 2,
85
+ AI_SESSION_SCORE_RUBRIC_TOKEN_EFFICIENCY = 3,
86
+ AI_SESSION_SCORE_RUBRIC_SKILLED_USE = 4,
87
+ AI_SESSION_SCORE_RUBRIC_QUALITY = 5,
88
+ AI_SESSION_SCORE_RUBRIC_OWNERSHIP = 6,
89
+ UNRECOGNIZED = -1,
90
+ }
91
+
92
+ export function aISessionScoreRubricFromJSON(object: any): AISessionScoreRubric {
93
+ switch (object) {
94
+ case 0:
95
+ case "AI_SESSION_SCORE_RUBRIC_UNSPECIFIED":
96
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_UNSPECIFIED;
97
+ case 1:
98
+ case "AI_SESSION_SCORE_RUBRIC_CUSTOM":
99
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_CUSTOM;
100
+ case 2:
101
+ case "AI_SESSION_SCORE_RUBRIC_STANDARD":
102
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_STANDARD;
103
+ case 3:
104
+ case "AI_SESSION_SCORE_RUBRIC_TOKEN_EFFICIENCY":
105
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_TOKEN_EFFICIENCY;
106
+ case 4:
107
+ case "AI_SESSION_SCORE_RUBRIC_SKILLED_USE":
108
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_SKILLED_USE;
109
+ case 5:
110
+ case "AI_SESSION_SCORE_RUBRIC_QUALITY":
111
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_QUALITY;
112
+ case 6:
113
+ case "AI_SESSION_SCORE_RUBRIC_OWNERSHIP":
114
+ return AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_OWNERSHIP;
115
+ case -1:
116
+ case "UNRECOGNIZED":
117
+ default:
118
+ return AISessionScoreRubric.UNRECOGNIZED;
119
+ }
120
+ }
121
+
122
+ export function aISessionScoreRubricToJSON(object: AISessionScoreRubric): string {
123
+ switch (object) {
124
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_UNSPECIFIED:
125
+ return "AI_SESSION_SCORE_RUBRIC_UNSPECIFIED";
126
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_CUSTOM:
127
+ return "AI_SESSION_SCORE_RUBRIC_CUSTOM";
128
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_STANDARD:
129
+ return "AI_SESSION_SCORE_RUBRIC_STANDARD";
130
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_TOKEN_EFFICIENCY:
131
+ return "AI_SESSION_SCORE_RUBRIC_TOKEN_EFFICIENCY";
132
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_SKILLED_USE:
133
+ return "AI_SESSION_SCORE_RUBRIC_SKILLED_USE";
134
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_QUALITY:
135
+ return "AI_SESSION_SCORE_RUBRIC_QUALITY";
136
+ case AISessionScoreRubric.AI_SESSION_SCORE_RUBRIC_OWNERSHIP:
137
+ return "AI_SESSION_SCORE_RUBRIC_OWNERSHIP";
138
+ case AISessionScoreRubric.UNRECOGNIZED:
139
+ default:
140
+ return "UNRECOGNIZED";
141
+ }
142
+ }
143
+
75
144
  /** SessionInsightSort orders a page of insights. */
76
145
  export enum SessionInsightSort {
77
146
  SESSION_INSIGHT_SORT_UNSPECIFIED = 0,
@@ -2086,6 +2155,86 @@ export interface AILabelValue {
2086
2155
  rating: AILabelRating;
2087
2156
  }
2088
2157
 
2158
+ export interface GetSessionScoreRubricCatalogRequest {
2159
+ organizationId: string;
2160
+ projectId: string;
2161
+ }
2162
+
2163
+ export interface GetSessionScoreRubricCatalogResponse {
2164
+ status:
2165
+ | ResponseStatus
2166
+ | undefined;
2167
+ /** Every active template, in AISessionScoreRubric order. */
2168
+ rubrics: AISessionScoreRubricTemplate[];
2169
+ }
2170
+
2171
+ /** AISessionScoreRubricTemplate is one rubric template a team can pick. */
2172
+ export interface AISessionScoreRubricTemplate {
2173
+ rubric: AISessionScoreRubric;
2174
+ /** "Token efficiency". */
2175
+ name: string;
2176
+ /** One or two plain-language sentences on what the template weighs. */
2177
+ description: string;
2178
+ /** The template's version label and content hash, as a score made on it records it. */
2179
+ version: string;
2180
+ /** The graded criteria in order; their weights add up to 100. */
2181
+ criteria: AISessionScoreRubricCriterion[];
2182
+ /**
2183
+ * The goal the template sets the team's sessions, in one line for people (at most 100 characters): the headline a
2184
+ * client shows when a team picks it, above the description.
2185
+ */
2186
+ aim: string;
2187
+ }
2188
+
2189
+ /** AISessionScoreRubricCriterion is one graded part of a template. */
2190
+ export interface AISessionScoreRubricCriterion {
2191
+ /**
2192
+ * The key a score made on the template records the criterion under (AISessionRubricResult.criterion_key). Unique
2193
+ * across every template, so a client finds a graded criterion's name and tooltip by this key alone.
2194
+ */
2195
+ key: string;
2196
+ name: string;
2197
+ /** Points out of 100. */
2198
+ weight: number;
2199
+ /**
2200
+ * One plain-language sentence for people on what the criterion measures (at most 160 characters). The scorer's own
2201
+ * grading text never leaves the job.
2202
+ */
2203
+ tooltip: string;
2204
+ }
2205
+
2206
+ export interface GetProjectSessionScoreRubricRequest {
2207
+ organizationId: string;
2208
+ projectId: string;
2209
+ }
2210
+
2211
+ export interface GetProjectSessionScoreRubricResponse {
2212
+ status: ResponseStatus | undefined;
2213
+ projectRubric: ProjectSessionScoreRubric | undefined;
2214
+ }
2215
+
2216
+ export interface UpdateProjectSessionScoreRubricRequest {
2217
+ organizationId: string;
2218
+ projectId: string;
2219
+ /** UNSPECIFIED, CUSTOM (not built yet), an unknown or a retired value is INVALID_ARGUMENT. */
2220
+ rubric: AISessionScoreRubric;
2221
+ }
2222
+
2223
+ export interface UpdateProjectSessionScoreRubricResponse {
2224
+ status: ResponseStatus | undefined;
2225
+ projectRubric: ProjectSessionScoreRubric | undefined;
2226
+ }
2227
+
2228
+ /** ProjectSessionScoreRubric is the template a team's sessions are scored on. */
2229
+ export interface ProjectSessionScoreRubric {
2230
+ /** The template an org admin picked; STANDARD when none did. */
2231
+ rubric: AISessionScoreRubric;
2232
+ /** Account's user id of the admin who picked it; empty when none did. */
2233
+ updateUserId: string;
2234
+ /** When it was picked; unset when none was. */
2235
+ updateTime: Date | undefined;
2236
+ }
2237
+
2089
2238
  export interface SessionTokenTimelineRequest {
2090
2239
  organizationId: string;
2091
2240
  projectId: string;
@@ -9044,6 +9193,979 @@ export const AILabelValue: MessageFns<AILabelValue> = {
9044
9193
  },
9045
9194
  };
9046
9195
 
9196
+ function createBaseGetSessionScoreRubricCatalogRequest(): GetSessionScoreRubricCatalogRequest {
9197
+ return { organizationId: "", projectId: "" };
9198
+ }
9199
+
9200
+ export const GetSessionScoreRubricCatalogRequest: MessageFns<GetSessionScoreRubricCatalogRequest> = {
9201
+ encode(message: GetSessionScoreRubricCatalogRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9202
+ if (message.organizationId !== "") {
9203
+ writer.uint32(10).string(message.organizationId);
9204
+ }
9205
+ if (message.projectId !== "") {
9206
+ writer.uint32(18).string(message.projectId);
9207
+ }
9208
+ return writer;
9209
+ },
9210
+
9211
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSessionScoreRubricCatalogRequest {
9212
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9213
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9214
+ if (previousRecursionDepth >= 100) {
9215
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9216
+ }
9217
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9218
+ try {
9219
+ const end = length === undefined ? reader.len : reader.pos + length;
9220
+ const message = createBaseGetSessionScoreRubricCatalogRequest();
9221
+ while (reader.pos < end) {
9222
+ const tag = reader.uint32();
9223
+ switch (tag >>> 3) {
9224
+ case 1: {
9225
+ if (tag !== 10) {
9226
+ break;
9227
+ }
9228
+
9229
+ message.organizationId = reader.string();
9230
+ continue;
9231
+ }
9232
+ case 2: {
9233
+ if (tag !== 18) {
9234
+ break;
9235
+ }
9236
+
9237
+ message.projectId = reader.string();
9238
+ continue;
9239
+ }
9240
+ }
9241
+ if ((tag & 7) === 4 || tag === 0) {
9242
+ break;
9243
+ }
9244
+ reader.skip(tag & 7);
9245
+ }
9246
+ return message;
9247
+ } finally {
9248
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9249
+ }
9250
+ },
9251
+
9252
+ fromJSON(object: any): GetSessionScoreRubricCatalogRequest {
9253
+ return {
9254
+ organizationId: isSet(object.organizationId)
9255
+ ? globalThis.String(object.organizationId)
9256
+ : isSet(object.organization_id)
9257
+ ? globalThis.String(object.organization_id)
9258
+ : "",
9259
+ projectId: isSet(object.projectId)
9260
+ ? globalThis.String(object.projectId)
9261
+ : isSet(object.project_id)
9262
+ ? globalThis.String(object.project_id)
9263
+ : "",
9264
+ };
9265
+ },
9266
+
9267
+ toJSON(message: GetSessionScoreRubricCatalogRequest): unknown {
9268
+ const obj: any = {};
9269
+ if (message.organizationId !== "") {
9270
+ obj.organizationId = message.organizationId;
9271
+ }
9272
+ if (message.projectId !== "") {
9273
+ obj.projectId = message.projectId;
9274
+ }
9275
+ return obj;
9276
+ },
9277
+
9278
+ create<I extends Exact<DeepPartial<GetSessionScoreRubricCatalogRequest>, I>>(
9279
+ base?: I,
9280
+ ): GetSessionScoreRubricCatalogRequest {
9281
+ return GetSessionScoreRubricCatalogRequest.fromPartial(base ?? ({} as any));
9282
+ },
9283
+ fromPartial<I extends Exact<DeepPartial<GetSessionScoreRubricCatalogRequest>, I>>(
9284
+ object: I,
9285
+ ): GetSessionScoreRubricCatalogRequest {
9286
+ const message = createBaseGetSessionScoreRubricCatalogRequest();
9287
+ message.organizationId = object.organizationId ?? "";
9288
+ message.projectId = object.projectId ?? "";
9289
+ return message;
9290
+ },
9291
+ };
9292
+
9293
+ function createBaseGetSessionScoreRubricCatalogResponse(): GetSessionScoreRubricCatalogResponse {
9294
+ return { status: undefined, rubrics: [] };
9295
+ }
9296
+
9297
+ export const GetSessionScoreRubricCatalogResponse: MessageFns<GetSessionScoreRubricCatalogResponse> = {
9298
+ encode(message: GetSessionScoreRubricCatalogResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9299
+ if (message.status !== undefined) {
9300
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
9301
+ }
9302
+ for (const v of message.rubrics) {
9303
+ AISessionScoreRubricTemplate.encode(v!, writer.uint32(18).fork()).join();
9304
+ }
9305
+ return writer;
9306
+ },
9307
+
9308
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSessionScoreRubricCatalogResponse {
9309
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9310
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9311
+ if (previousRecursionDepth >= 100) {
9312
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9313
+ }
9314
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9315
+ try {
9316
+ const end = length === undefined ? reader.len : reader.pos + length;
9317
+ const message = createBaseGetSessionScoreRubricCatalogResponse();
9318
+ while (reader.pos < end) {
9319
+ const tag = reader.uint32();
9320
+ switch (tag >>> 3) {
9321
+ case 1: {
9322
+ if (tag !== 10) {
9323
+ break;
9324
+ }
9325
+
9326
+ message.status = ResponseStatus.decode(reader, reader.uint32());
9327
+ continue;
9328
+ }
9329
+ case 2: {
9330
+ if (tag !== 18) {
9331
+ break;
9332
+ }
9333
+
9334
+ message.rubrics.push(AISessionScoreRubricTemplate.decode(reader, reader.uint32()));
9335
+ continue;
9336
+ }
9337
+ }
9338
+ if ((tag & 7) === 4 || tag === 0) {
9339
+ break;
9340
+ }
9341
+ reader.skip(tag & 7);
9342
+ }
9343
+ return message;
9344
+ } finally {
9345
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9346
+ }
9347
+ },
9348
+
9349
+ fromJSON(object: any): GetSessionScoreRubricCatalogResponse {
9350
+ return {
9351
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
9352
+ rubrics: globalThis.Array.isArray(object?.rubrics)
9353
+ ? object.rubrics.map((e: any) => AISessionScoreRubricTemplate.fromJSON(e))
9354
+ : [],
9355
+ };
9356
+ },
9357
+
9358
+ toJSON(message: GetSessionScoreRubricCatalogResponse): unknown {
9359
+ const obj: any = {};
9360
+ if (message.status !== undefined) {
9361
+ obj.status = ResponseStatus.toJSON(message.status);
9362
+ }
9363
+ if (message.rubrics?.length) {
9364
+ obj.rubrics = message.rubrics.map((e) => AISessionScoreRubricTemplate.toJSON(e));
9365
+ }
9366
+ return obj;
9367
+ },
9368
+
9369
+ create<I extends Exact<DeepPartial<GetSessionScoreRubricCatalogResponse>, I>>(
9370
+ base?: I,
9371
+ ): GetSessionScoreRubricCatalogResponse {
9372
+ return GetSessionScoreRubricCatalogResponse.fromPartial(base ?? ({} as any));
9373
+ },
9374
+ fromPartial<I extends Exact<DeepPartial<GetSessionScoreRubricCatalogResponse>, I>>(
9375
+ object: I,
9376
+ ): GetSessionScoreRubricCatalogResponse {
9377
+ const message = createBaseGetSessionScoreRubricCatalogResponse();
9378
+ message.status = (object.status !== undefined && object.status !== null)
9379
+ ? ResponseStatus.fromPartial(object.status)
9380
+ : undefined;
9381
+ message.rubrics = object.rubrics?.map((e) => AISessionScoreRubricTemplate.fromPartial(e)) || [];
9382
+ return message;
9383
+ },
9384
+ };
9385
+
9386
+ function createBaseAISessionScoreRubricTemplate(): AISessionScoreRubricTemplate {
9387
+ return { rubric: 0, name: "", description: "", version: "", criteria: [], aim: "" };
9388
+ }
9389
+
9390
+ export const AISessionScoreRubricTemplate: MessageFns<AISessionScoreRubricTemplate> = {
9391
+ encode(message: AISessionScoreRubricTemplate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9392
+ if (message.rubric !== 0) {
9393
+ writer.uint32(8).int32(message.rubric);
9394
+ }
9395
+ if (message.name !== "") {
9396
+ writer.uint32(18).string(message.name);
9397
+ }
9398
+ if (message.description !== "") {
9399
+ writer.uint32(26).string(message.description);
9400
+ }
9401
+ if (message.version !== "") {
9402
+ writer.uint32(34).string(message.version);
9403
+ }
9404
+ for (const v of message.criteria) {
9405
+ AISessionScoreRubricCriterion.encode(v!, writer.uint32(42).fork()).join();
9406
+ }
9407
+ if (message.aim !== "") {
9408
+ writer.uint32(50).string(message.aim);
9409
+ }
9410
+ return writer;
9411
+ },
9412
+
9413
+ decode(input: BinaryReader | Uint8Array, length?: number): AISessionScoreRubricTemplate {
9414
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9415
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9416
+ if (previousRecursionDepth >= 100) {
9417
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9418
+ }
9419
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9420
+ try {
9421
+ const end = length === undefined ? reader.len : reader.pos + length;
9422
+ const message = createBaseAISessionScoreRubricTemplate();
9423
+ while (reader.pos < end) {
9424
+ const tag = reader.uint32();
9425
+ switch (tag >>> 3) {
9426
+ case 1: {
9427
+ if (tag !== 8) {
9428
+ break;
9429
+ }
9430
+
9431
+ message.rubric = reader.int32() as any;
9432
+ continue;
9433
+ }
9434
+ case 2: {
9435
+ if (tag !== 18) {
9436
+ break;
9437
+ }
9438
+
9439
+ message.name = reader.string();
9440
+ continue;
9441
+ }
9442
+ case 3: {
9443
+ if (tag !== 26) {
9444
+ break;
9445
+ }
9446
+
9447
+ message.description = reader.string();
9448
+ continue;
9449
+ }
9450
+ case 4: {
9451
+ if (tag !== 34) {
9452
+ break;
9453
+ }
9454
+
9455
+ message.version = reader.string();
9456
+ continue;
9457
+ }
9458
+ case 5: {
9459
+ if (tag !== 42) {
9460
+ break;
9461
+ }
9462
+
9463
+ message.criteria.push(AISessionScoreRubricCriterion.decode(reader, reader.uint32()));
9464
+ continue;
9465
+ }
9466
+ case 6: {
9467
+ if (tag !== 50) {
9468
+ break;
9469
+ }
9470
+
9471
+ message.aim = reader.string();
9472
+ continue;
9473
+ }
9474
+ }
9475
+ if ((tag & 7) === 4 || tag === 0) {
9476
+ break;
9477
+ }
9478
+ reader.skip(tag & 7);
9479
+ }
9480
+ return message;
9481
+ } finally {
9482
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9483
+ }
9484
+ },
9485
+
9486
+ fromJSON(object: any): AISessionScoreRubricTemplate {
9487
+ return {
9488
+ rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
9489
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
9490
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
9491
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
9492
+ criteria: globalThis.Array.isArray(object?.criteria)
9493
+ ? object.criteria.map((e: any) => AISessionScoreRubricCriterion.fromJSON(e))
9494
+ : [],
9495
+ aim: isSet(object.aim) ? globalThis.String(object.aim) : "",
9496
+ };
9497
+ },
9498
+
9499
+ toJSON(message: AISessionScoreRubricTemplate): unknown {
9500
+ const obj: any = {};
9501
+ if (message.rubric !== 0) {
9502
+ obj.rubric = aISessionScoreRubricToJSON(message.rubric);
9503
+ }
9504
+ if (message.name !== "") {
9505
+ obj.name = message.name;
9506
+ }
9507
+ if (message.description !== "") {
9508
+ obj.description = message.description;
9509
+ }
9510
+ if (message.version !== "") {
9511
+ obj.version = message.version;
9512
+ }
9513
+ if (message.criteria?.length) {
9514
+ obj.criteria = message.criteria.map((e) => AISessionScoreRubricCriterion.toJSON(e));
9515
+ }
9516
+ if (message.aim !== "") {
9517
+ obj.aim = message.aim;
9518
+ }
9519
+ return obj;
9520
+ },
9521
+
9522
+ create<I extends Exact<DeepPartial<AISessionScoreRubricTemplate>, I>>(base?: I): AISessionScoreRubricTemplate {
9523
+ return AISessionScoreRubricTemplate.fromPartial(base ?? ({} as any));
9524
+ },
9525
+ fromPartial<I extends Exact<DeepPartial<AISessionScoreRubricTemplate>, I>>(object: I): AISessionScoreRubricTemplate {
9526
+ const message = createBaseAISessionScoreRubricTemplate();
9527
+ message.rubric = object.rubric ?? 0;
9528
+ message.name = object.name ?? "";
9529
+ message.description = object.description ?? "";
9530
+ message.version = object.version ?? "";
9531
+ message.criteria = object.criteria?.map((e) => AISessionScoreRubricCriterion.fromPartial(e)) || [];
9532
+ message.aim = object.aim ?? "";
9533
+ return message;
9534
+ },
9535
+ };
9536
+
9537
+ function createBaseAISessionScoreRubricCriterion(): AISessionScoreRubricCriterion {
9538
+ return { key: "", name: "", weight: 0, tooltip: "" };
9539
+ }
9540
+
9541
+ export const AISessionScoreRubricCriterion: MessageFns<AISessionScoreRubricCriterion> = {
9542
+ encode(message: AISessionScoreRubricCriterion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9543
+ if (message.key !== "") {
9544
+ writer.uint32(10).string(message.key);
9545
+ }
9546
+ if (message.name !== "") {
9547
+ writer.uint32(18).string(message.name);
9548
+ }
9549
+ if (message.weight !== 0) {
9550
+ writer.uint32(24).uint32(message.weight);
9551
+ }
9552
+ if (message.tooltip !== "") {
9553
+ writer.uint32(34).string(message.tooltip);
9554
+ }
9555
+ return writer;
9556
+ },
9557
+
9558
+ decode(input: BinaryReader | Uint8Array, length?: number): AISessionScoreRubricCriterion {
9559
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9560
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9561
+ if (previousRecursionDepth >= 100) {
9562
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9563
+ }
9564
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9565
+ try {
9566
+ const end = length === undefined ? reader.len : reader.pos + length;
9567
+ const message = createBaseAISessionScoreRubricCriterion();
9568
+ while (reader.pos < end) {
9569
+ const tag = reader.uint32();
9570
+ switch (tag >>> 3) {
9571
+ case 1: {
9572
+ if (tag !== 10) {
9573
+ break;
9574
+ }
9575
+
9576
+ message.key = reader.string();
9577
+ continue;
9578
+ }
9579
+ case 2: {
9580
+ if (tag !== 18) {
9581
+ break;
9582
+ }
9583
+
9584
+ message.name = reader.string();
9585
+ continue;
9586
+ }
9587
+ case 3: {
9588
+ if (tag !== 24) {
9589
+ break;
9590
+ }
9591
+
9592
+ message.weight = reader.uint32();
9593
+ continue;
9594
+ }
9595
+ case 4: {
9596
+ if (tag !== 34) {
9597
+ break;
9598
+ }
9599
+
9600
+ message.tooltip = reader.string();
9601
+ continue;
9602
+ }
9603
+ }
9604
+ if ((tag & 7) === 4 || tag === 0) {
9605
+ break;
9606
+ }
9607
+ reader.skip(tag & 7);
9608
+ }
9609
+ return message;
9610
+ } finally {
9611
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9612
+ }
9613
+ },
9614
+
9615
+ fromJSON(object: any): AISessionScoreRubricCriterion {
9616
+ return {
9617
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
9618
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
9619
+ weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
9620
+ tooltip: isSet(object.tooltip) ? globalThis.String(object.tooltip) : "",
9621
+ };
9622
+ },
9623
+
9624
+ toJSON(message: AISessionScoreRubricCriterion): unknown {
9625
+ const obj: any = {};
9626
+ if (message.key !== "") {
9627
+ obj.key = message.key;
9628
+ }
9629
+ if (message.name !== "") {
9630
+ obj.name = message.name;
9631
+ }
9632
+ if (message.weight !== 0) {
9633
+ obj.weight = Math.round(message.weight);
9634
+ }
9635
+ if (message.tooltip !== "") {
9636
+ obj.tooltip = message.tooltip;
9637
+ }
9638
+ return obj;
9639
+ },
9640
+
9641
+ create<I extends Exact<DeepPartial<AISessionScoreRubricCriterion>, I>>(base?: I): AISessionScoreRubricCriterion {
9642
+ return AISessionScoreRubricCriterion.fromPartial(base ?? ({} as any));
9643
+ },
9644
+ fromPartial<I extends Exact<DeepPartial<AISessionScoreRubricCriterion>, I>>(
9645
+ object: I,
9646
+ ): AISessionScoreRubricCriterion {
9647
+ const message = createBaseAISessionScoreRubricCriterion();
9648
+ message.key = object.key ?? "";
9649
+ message.name = object.name ?? "";
9650
+ message.weight = object.weight ?? 0;
9651
+ message.tooltip = object.tooltip ?? "";
9652
+ return message;
9653
+ },
9654
+ };
9655
+
9656
+ function createBaseGetProjectSessionScoreRubricRequest(): GetProjectSessionScoreRubricRequest {
9657
+ return { organizationId: "", projectId: "" };
9658
+ }
9659
+
9660
+ export const GetProjectSessionScoreRubricRequest: MessageFns<GetProjectSessionScoreRubricRequest> = {
9661
+ encode(message: GetProjectSessionScoreRubricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9662
+ if (message.organizationId !== "") {
9663
+ writer.uint32(10).string(message.organizationId);
9664
+ }
9665
+ if (message.projectId !== "") {
9666
+ writer.uint32(18).string(message.projectId);
9667
+ }
9668
+ return writer;
9669
+ },
9670
+
9671
+ decode(input: BinaryReader | Uint8Array, length?: number): GetProjectSessionScoreRubricRequest {
9672
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9673
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9674
+ if (previousRecursionDepth >= 100) {
9675
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9676
+ }
9677
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9678
+ try {
9679
+ const end = length === undefined ? reader.len : reader.pos + length;
9680
+ const message = createBaseGetProjectSessionScoreRubricRequest();
9681
+ while (reader.pos < end) {
9682
+ const tag = reader.uint32();
9683
+ switch (tag >>> 3) {
9684
+ case 1: {
9685
+ if (tag !== 10) {
9686
+ break;
9687
+ }
9688
+
9689
+ message.organizationId = reader.string();
9690
+ continue;
9691
+ }
9692
+ case 2: {
9693
+ if (tag !== 18) {
9694
+ break;
9695
+ }
9696
+
9697
+ message.projectId = reader.string();
9698
+ continue;
9699
+ }
9700
+ }
9701
+ if ((tag & 7) === 4 || tag === 0) {
9702
+ break;
9703
+ }
9704
+ reader.skip(tag & 7);
9705
+ }
9706
+ return message;
9707
+ } finally {
9708
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9709
+ }
9710
+ },
9711
+
9712
+ fromJSON(object: any): GetProjectSessionScoreRubricRequest {
9713
+ return {
9714
+ organizationId: isSet(object.organizationId)
9715
+ ? globalThis.String(object.organizationId)
9716
+ : isSet(object.organization_id)
9717
+ ? globalThis.String(object.organization_id)
9718
+ : "",
9719
+ projectId: isSet(object.projectId)
9720
+ ? globalThis.String(object.projectId)
9721
+ : isSet(object.project_id)
9722
+ ? globalThis.String(object.project_id)
9723
+ : "",
9724
+ };
9725
+ },
9726
+
9727
+ toJSON(message: GetProjectSessionScoreRubricRequest): unknown {
9728
+ const obj: any = {};
9729
+ if (message.organizationId !== "") {
9730
+ obj.organizationId = message.organizationId;
9731
+ }
9732
+ if (message.projectId !== "") {
9733
+ obj.projectId = message.projectId;
9734
+ }
9735
+ return obj;
9736
+ },
9737
+
9738
+ create<I extends Exact<DeepPartial<GetProjectSessionScoreRubricRequest>, I>>(
9739
+ base?: I,
9740
+ ): GetProjectSessionScoreRubricRequest {
9741
+ return GetProjectSessionScoreRubricRequest.fromPartial(base ?? ({} as any));
9742
+ },
9743
+ fromPartial<I extends Exact<DeepPartial<GetProjectSessionScoreRubricRequest>, I>>(
9744
+ object: I,
9745
+ ): GetProjectSessionScoreRubricRequest {
9746
+ const message = createBaseGetProjectSessionScoreRubricRequest();
9747
+ message.organizationId = object.organizationId ?? "";
9748
+ message.projectId = object.projectId ?? "";
9749
+ return message;
9750
+ },
9751
+ };
9752
+
9753
+ function createBaseGetProjectSessionScoreRubricResponse(): GetProjectSessionScoreRubricResponse {
9754
+ return { status: undefined, projectRubric: undefined };
9755
+ }
9756
+
9757
+ export const GetProjectSessionScoreRubricResponse: MessageFns<GetProjectSessionScoreRubricResponse> = {
9758
+ encode(message: GetProjectSessionScoreRubricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9759
+ if (message.status !== undefined) {
9760
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
9761
+ }
9762
+ if (message.projectRubric !== undefined) {
9763
+ ProjectSessionScoreRubric.encode(message.projectRubric, writer.uint32(18).fork()).join();
9764
+ }
9765
+ return writer;
9766
+ },
9767
+
9768
+ decode(input: BinaryReader | Uint8Array, length?: number): GetProjectSessionScoreRubricResponse {
9769
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9770
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9771
+ if (previousRecursionDepth >= 100) {
9772
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9773
+ }
9774
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9775
+ try {
9776
+ const end = length === undefined ? reader.len : reader.pos + length;
9777
+ const message = createBaseGetProjectSessionScoreRubricResponse();
9778
+ while (reader.pos < end) {
9779
+ const tag = reader.uint32();
9780
+ switch (tag >>> 3) {
9781
+ case 1: {
9782
+ if (tag !== 10) {
9783
+ break;
9784
+ }
9785
+
9786
+ message.status = ResponseStatus.decode(reader, reader.uint32());
9787
+ continue;
9788
+ }
9789
+ case 2: {
9790
+ if (tag !== 18) {
9791
+ break;
9792
+ }
9793
+
9794
+ message.projectRubric = ProjectSessionScoreRubric.decode(reader, reader.uint32());
9795
+ continue;
9796
+ }
9797
+ }
9798
+ if ((tag & 7) === 4 || tag === 0) {
9799
+ break;
9800
+ }
9801
+ reader.skip(tag & 7);
9802
+ }
9803
+ return message;
9804
+ } finally {
9805
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9806
+ }
9807
+ },
9808
+
9809
+ fromJSON(object: any): GetProjectSessionScoreRubricResponse {
9810
+ return {
9811
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
9812
+ projectRubric: isSet(object.projectRubric)
9813
+ ? ProjectSessionScoreRubric.fromJSON(object.projectRubric)
9814
+ : isSet(object.project_rubric)
9815
+ ? ProjectSessionScoreRubric.fromJSON(object.project_rubric)
9816
+ : undefined,
9817
+ };
9818
+ },
9819
+
9820
+ toJSON(message: GetProjectSessionScoreRubricResponse): unknown {
9821
+ const obj: any = {};
9822
+ if (message.status !== undefined) {
9823
+ obj.status = ResponseStatus.toJSON(message.status);
9824
+ }
9825
+ if (message.projectRubric !== undefined) {
9826
+ obj.projectRubric = ProjectSessionScoreRubric.toJSON(message.projectRubric);
9827
+ }
9828
+ return obj;
9829
+ },
9830
+
9831
+ create<I extends Exact<DeepPartial<GetProjectSessionScoreRubricResponse>, I>>(
9832
+ base?: I,
9833
+ ): GetProjectSessionScoreRubricResponse {
9834
+ return GetProjectSessionScoreRubricResponse.fromPartial(base ?? ({} as any));
9835
+ },
9836
+ fromPartial<I extends Exact<DeepPartial<GetProjectSessionScoreRubricResponse>, I>>(
9837
+ object: I,
9838
+ ): GetProjectSessionScoreRubricResponse {
9839
+ const message = createBaseGetProjectSessionScoreRubricResponse();
9840
+ message.status = (object.status !== undefined && object.status !== null)
9841
+ ? ResponseStatus.fromPartial(object.status)
9842
+ : undefined;
9843
+ message.projectRubric = (object.projectRubric !== undefined && object.projectRubric !== null)
9844
+ ? ProjectSessionScoreRubric.fromPartial(object.projectRubric)
9845
+ : undefined;
9846
+ return message;
9847
+ },
9848
+ };
9849
+
9850
+ function createBaseUpdateProjectSessionScoreRubricRequest(): UpdateProjectSessionScoreRubricRequest {
9851
+ return { organizationId: "", projectId: "", rubric: 0 };
9852
+ }
9853
+
9854
+ export const UpdateProjectSessionScoreRubricRequest: MessageFns<UpdateProjectSessionScoreRubricRequest> = {
9855
+ encode(message: UpdateProjectSessionScoreRubricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9856
+ if (message.organizationId !== "") {
9857
+ writer.uint32(10).string(message.organizationId);
9858
+ }
9859
+ if (message.projectId !== "") {
9860
+ writer.uint32(18).string(message.projectId);
9861
+ }
9862
+ if (message.rubric !== 0) {
9863
+ writer.uint32(24).int32(message.rubric);
9864
+ }
9865
+ return writer;
9866
+ },
9867
+
9868
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateProjectSessionScoreRubricRequest {
9869
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9870
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9871
+ if (previousRecursionDepth >= 100) {
9872
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9873
+ }
9874
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9875
+ try {
9876
+ const end = length === undefined ? reader.len : reader.pos + length;
9877
+ const message = createBaseUpdateProjectSessionScoreRubricRequest();
9878
+ while (reader.pos < end) {
9879
+ const tag = reader.uint32();
9880
+ switch (tag >>> 3) {
9881
+ case 1: {
9882
+ if (tag !== 10) {
9883
+ break;
9884
+ }
9885
+
9886
+ message.organizationId = reader.string();
9887
+ continue;
9888
+ }
9889
+ case 2: {
9890
+ if (tag !== 18) {
9891
+ break;
9892
+ }
9893
+
9894
+ message.projectId = reader.string();
9895
+ continue;
9896
+ }
9897
+ case 3: {
9898
+ if (tag !== 24) {
9899
+ break;
9900
+ }
9901
+
9902
+ message.rubric = reader.int32() as any;
9903
+ continue;
9904
+ }
9905
+ }
9906
+ if ((tag & 7) === 4 || tag === 0) {
9907
+ break;
9908
+ }
9909
+ reader.skip(tag & 7);
9910
+ }
9911
+ return message;
9912
+ } finally {
9913
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9914
+ }
9915
+ },
9916
+
9917
+ fromJSON(object: any): UpdateProjectSessionScoreRubricRequest {
9918
+ return {
9919
+ organizationId: isSet(object.organizationId)
9920
+ ? globalThis.String(object.organizationId)
9921
+ : isSet(object.organization_id)
9922
+ ? globalThis.String(object.organization_id)
9923
+ : "",
9924
+ projectId: isSet(object.projectId)
9925
+ ? globalThis.String(object.projectId)
9926
+ : isSet(object.project_id)
9927
+ ? globalThis.String(object.project_id)
9928
+ : "",
9929
+ rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
9930
+ };
9931
+ },
9932
+
9933
+ toJSON(message: UpdateProjectSessionScoreRubricRequest): unknown {
9934
+ const obj: any = {};
9935
+ if (message.organizationId !== "") {
9936
+ obj.organizationId = message.organizationId;
9937
+ }
9938
+ if (message.projectId !== "") {
9939
+ obj.projectId = message.projectId;
9940
+ }
9941
+ if (message.rubric !== 0) {
9942
+ obj.rubric = aISessionScoreRubricToJSON(message.rubric);
9943
+ }
9944
+ return obj;
9945
+ },
9946
+
9947
+ create<I extends Exact<DeepPartial<UpdateProjectSessionScoreRubricRequest>, I>>(
9948
+ base?: I,
9949
+ ): UpdateProjectSessionScoreRubricRequest {
9950
+ return UpdateProjectSessionScoreRubricRequest.fromPartial(base ?? ({} as any));
9951
+ },
9952
+ fromPartial<I extends Exact<DeepPartial<UpdateProjectSessionScoreRubricRequest>, I>>(
9953
+ object: I,
9954
+ ): UpdateProjectSessionScoreRubricRequest {
9955
+ const message = createBaseUpdateProjectSessionScoreRubricRequest();
9956
+ message.organizationId = object.organizationId ?? "";
9957
+ message.projectId = object.projectId ?? "";
9958
+ message.rubric = object.rubric ?? 0;
9959
+ return message;
9960
+ },
9961
+ };
9962
+
9963
+ function createBaseUpdateProjectSessionScoreRubricResponse(): UpdateProjectSessionScoreRubricResponse {
9964
+ return { status: undefined, projectRubric: undefined };
9965
+ }
9966
+
9967
+ export const UpdateProjectSessionScoreRubricResponse: MessageFns<UpdateProjectSessionScoreRubricResponse> = {
9968
+ encode(message: UpdateProjectSessionScoreRubricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9969
+ if (message.status !== undefined) {
9970
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
9971
+ }
9972
+ if (message.projectRubric !== undefined) {
9973
+ ProjectSessionScoreRubric.encode(message.projectRubric, writer.uint32(18).fork()).join();
9974
+ }
9975
+ return writer;
9976
+ },
9977
+
9978
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateProjectSessionScoreRubricResponse {
9979
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9980
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9981
+ if (previousRecursionDepth >= 100) {
9982
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9983
+ }
9984
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9985
+ try {
9986
+ const end = length === undefined ? reader.len : reader.pos + length;
9987
+ const message = createBaseUpdateProjectSessionScoreRubricResponse();
9988
+ while (reader.pos < end) {
9989
+ const tag = reader.uint32();
9990
+ switch (tag >>> 3) {
9991
+ case 1: {
9992
+ if (tag !== 10) {
9993
+ break;
9994
+ }
9995
+
9996
+ message.status = ResponseStatus.decode(reader, reader.uint32());
9997
+ continue;
9998
+ }
9999
+ case 2: {
10000
+ if (tag !== 18) {
10001
+ break;
10002
+ }
10003
+
10004
+ message.projectRubric = ProjectSessionScoreRubric.decode(reader, reader.uint32());
10005
+ continue;
10006
+ }
10007
+ }
10008
+ if ((tag & 7) === 4 || tag === 0) {
10009
+ break;
10010
+ }
10011
+ reader.skip(tag & 7);
10012
+ }
10013
+ return message;
10014
+ } finally {
10015
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
10016
+ }
10017
+ },
10018
+
10019
+ fromJSON(object: any): UpdateProjectSessionScoreRubricResponse {
10020
+ return {
10021
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
10022
+ projectRubric: isSet(object.projectRubric)
10023
+ ? ProjectSessionScoreRubric.fromJSON(object.projectRubric)
10024
+ : isSet(object.project_rubric)
10025
+ ? ProjectSessionScoreRubric.fromJSON(object.project_rubric)
10026
+ : undefined,
10027
+ };
10028
+ },
10029
+
10030
+ toJSON(message: UpdateProjectSessionScoreRubricResponse): unknown {
10031
+ const obj: any = {};
10032
+ if (message.status !== undefined) {
10033
+ obj.status = ResponseStatus.toJSON(message.status);
10034
+ }
10035
+ if (message.projectRubric !== undefined) {
10036
+ obj.projectRubric = ProjectSessionScoreRubric.toJSON(message.projectRubric);
10037
+ }
10038
+ return obj;
10039
+ },
10040
+
10041
+ create<I extends Exact<DeepPartial<UpdateProjectSessionScoreRubricResponse>, I>>(
10042
+ base?: I,
10043
+ ): UpdateProjectSessionScoreRubricResponse {
10044
+ return UpdateProjectSessionScoreRubricResponse.fromPartial(base ?? ({} as any));
10045
+ },
10046
+ fromPartial<I extends Exact<DeepPartial<UpdateProjectSessionScoreRubricResponse>, I>>(
10047
+ object: I,
10048
+ ): UpdateProjectSessionScoreRubricResponse {
10049
+ const message = createBaseUpdateProjectSessionScoreRubricResponse();
10050
+ message.status = (object.status !== undefined && object.status !== null)
10051
+ ? ResponseStatus.fromPartial(object.status)
10052
+ : undefined;
10053
+ message.projectRubric = (object.projectRubric !== undefined && object.projectRubric !== null)
10054
+ ? ProjectSessionScoreRubric.fromPartial(object.projectRubric)
10055
+ : undefined;
10056
+ return message;
10057
+ },
10058
+ };
10059
+
10060
+ function createBaseProjectSessionScoreRubric(): ProjectSessionScoreRubric {
10061
+ return { rubric: 0, updateUserId: "", updateTime: undefined };
10062
+ }
10063
+
10064
+ export const ProjectSessionScoreRubric: MessageFns<ProjectSessionScoreRubric> = {
10065
+ encode(message: ProjectSessionScoreRubric, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
10066
+ if (message.rubric !== 0) {
10067
+ writer.uint32(8).int32(message.rubric);
10068
+ }
10069
+ if (message.updateUserId !== "") {
10070
+ writer.uint32(18).string(message.updateUserId);
10071
+ }
10072
+ if (message.updateTime !== undefined) {
10073
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(26).fork()).join();
10074
+ }
10075
+ return writer;
10076
+ },
10077
+
10078
+ decode(input: BinaryReader | Uint8Array, length?: number): ProjectSessionScoreRubric {
10079
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10080
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
10081
+ if (previousRecursionDepth >= 100) {
10082
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
10083
+ }
10084
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
10085
+ try {
10086
+ const end = length === undefined ? reader.len : reader.pos + length;
10087
+ const message = createBaseProjectSessionScoreRubric();
10088
+ while (reader.pos < end) {
10089
+ const tag = reader.uint32();
10090
+ switch (tag >>> 3) {
10091
+ case 1: {
10092
+ if (tag !== 8) {
10093
+ break;
10094
+ }
10095
+
10096
+ message.rubric = reader.int32() as any;
10097
+ continue;
10098
+ }
10099
+ case 2: {
10100
+ if (tag !== 18) {
10101
+ break;
10102
+ }
10103
+
10104
+ message.updateUserId = reader.string();
10105
+ continue;
10106
+ }
10107
+ case 3: {
10108
+ if (tag !== 26) {
10109
+ break;
10110
+ }
10111
+
10112
+ message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
10113
+ continue;
10114
+ }
10115
+ }
10116
+ if ((tag & 7) === 4 || tag === 0) {
10117
+ break;
10118
+ }
10119
+ reader.skip(tag & 7);
10120
+ }
10121
+ return message;
10122
+ } finally {
10123
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
10124
+ }
10125
+ },
10126
+
10127
+ fromJSON(object: any): ProjectSessionScoreRubric {
10128
+ return {
10129
+ rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
10130
+ updateUserId: isSet(object.updateUserId)
10131
+ ? globalThis.String(object.updateUserId)
10132
+ : isSet(object.update_user_id)
10133
+ ? globalThis.String(object.update_user_id)
10134
+ : "",
10135
+ updateTime: isSet(object.updateTime)
10136
+ ? fromJsonTimestamp(object.updateTime)
10137
+ : isSet(object.update_time)
10138
+ ? fromJsonTimestamp(object.update_time)
10139
+ : undefined,
10140
+ };
10141
+ },
10142
+
10143
+ toJSON(message: ProjectSessionScoreRubric): unknown {
10144
+ const obj: any = {};
10145
+ if (message.rubric !== 0) {
10146
+ obj.rubric = aISessionScoreRubricToJSON(message.rubric);
10147
+ }
10148
+ if (message.updateUserId !== "") {
10149
+ obj.updateUserId = message.updateUserId;
10150
+ }
10151
+ if (message.updateTime !== undefined) {
10152
+ obj.updateTime = message.updateTime.toISOString();
10153
+ }
10154
+ return obj;
10155
+ },
10156
+
10157
+ create<I extends Exact<DeepPartial<ProjectSessionScoreRubric>, I>>(base?: I): ProjectSessionScoreRubric {
10158
+ return ProjectSessionScoreRubric.fromPartial(base ?? ({} as any));
10159
+ },
10160
+ fromPartial<I extends Exact<DeepPartial<ProjectSessionScoreRubric>, I>>(object: I): ProjectSessionScoreRubric {
10161
+ const message = createBaseProjectSessionScoreRubric();
10162
+ message.rubric = object.rubric ?? 0;
10163
+ message.updateUserId = object.updateUserId ?? "";
10164
+ message.updateTime = object.updateTime ?? undefined;
10165
+ return message;
10166
+ },
10167
+ };
10168
+
9047
10169
  function createBaseSessionTokenTimelineRequest(): SessionTokenTimelineRequest {
9048
10170
  return { organizationId: "", projectId: "", sessionId: "", sourceSystem: "" };
9049
10171
  }
@@ -34403,6 +35525,27 @@ export interface AIGatewayService {
34403
35525
  * the key. Mirrors ai.api.v1.
34404
35526
  */
34405
35527
  GetLabelCatalog(request: GetLabelCatalogRequest, metadata?: Metadata): Promise<GetLabelCatalogResponse>;
35528
+ /**
35529
+ * The rubric templates a team can score its sessions on (STANDARD, the default, first): each one's name,
35530
+ * description, version and criteria. Mirrors ai.api.v1.
35531
+ */
35532
+ GetSessionScoreRubricCatalog(
35533
+ request: GetSessionScoreRubricCatalogRequest,
35534
+ metadata?: Metadata,
35535
+ ): Promise<GetSessionScoreRubricCatalogResponse>;
35536
+ /** The template the team's sessions are scored on: the one an org admin picked, or STANDARD. Mirrors ai.api.v1. */
35537
+ GetProjectSessionScoreRubric(
35538
+ request: GetProjectSessionScoreRubricRequest,
35539
+ metadata?: Metadata,
35540
+ ): Promise<GetProjectSessionScoreRubricResponse>;
35541
+ /**
35542
+ * Set the template the team's sessions are scored on. Org admins only. Sessions are graded on it from the scorer's
35543
+ * next run; one already scored only when it next changes. Mirrors ai.api.v1.
35544
+ */
35545
+ UpdateProjectSessionScoreRubric(
35546
+ request: UpdateProjectSessionScoreRubricRequest,
35547
+ metadata?: Metadata,
35548
+ ): Promise<UpdateProjectSessionScoreRubricResponse>;
34406
35549
  /**
34407
35550
  * Per-seat entitlement usage board: every entitlement owner's latest observed funding facility and
34408
35551
  * per-harness usage % windows. Stream-first (first frame = full snapshot), seat-scoped. Mirrors
@@ -34496,6 +35639,9 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
34496
35639
  this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
34497
35640
  this.GetPromptLabelTrend = this.GetPromptLabelTrend.bind(this);
34498
35641
  this.GetLabelCatalog = this.GetLabelCatalog.bind(this);
35642
+ this.GetSessionScoreRubricCatalog = this.GetSessionScoreRubricCatalog.bind(this);
35643
+ this.GetProjectSessionScoreRubric = this.GetProjectSessionScoreRubric.bind(this);
35644
+ this.UpdateProjectSessionScoreRubric = this.UpdateProjectSessionScoreRubric.bind(this);
34499
35645
  this.StreamEntitlements = this.StreamEntitlements.bind(this);
34500
35646
  this.ListRelayHeartbeats = this.ListRelayHeartbeats.bind(this);
34501
35647
  this.ListIssueCosts = this.ListIssueCosts.bind(this);
@@ -34728,6 +35874,33 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
34728
35874
  return promise.then((data) => GetLabelCatalogResponse.decode(new BinaryReader(data)));
34729
35875
  }
34730
35876
 
35877
+ GetSessionScoreRubricCatalog(
35878
+ request: GetSessionScoreRubricCatalogRequest,
35879
+ metadata?: Metadata,
35880
+ ): Promise<GetSessionScoreRubricCatalogResponse> {
35881
+ const data = GetSessionScoreRubricCatalogRequest.encode(request).finish();
35882
+ const promise = this.rpc.request(this.service, "GetSessionScoreRubricCatalog", data, metadata);
35883
+ return promise.then((data) => GetSessionScoreRubricCatalogResponse.decode(new BinaryReader(data)));
35884
+ }
35885
+
35886
+ GetProjectSessionScoreRubric(
35887
+ request: GetProjectSessionScoreRubricRequest,
35888
+ metadata?: Metadata,
35889
+ ): Promise<GetProjectSessionScoreRubricResponse> {
35890
+ const data = GetProjectSessionScoreRubricRequest.encode(request).finish();
35891
+ const promise = this.rpc.request(this.service, "GetProjectSessionScoreRubric", data, metadata);
35892
+ return promise.then((data) => GetProjectSessionScoreRubricResponse.decode(new BinaryReader(data)));
35893
+ }
35894
+
35895
+ UpdateProjectSessionScoreRubric(
35896
+ request: UpdateProjectSessionScoreRubricRequest,
35897
+ metadata?: Metadata,
35898
+ ): Promise<UpdateProjectSessionScoreRubricResponse> {
35899
+ const data = UpdateProjectSessionScoreRubricRequest.encode(request).finish();
35900
+ const promise = this.rpc.request(this.service, "UpdateProjectSessionScoreRubric", data, metadata);
35901
+ return promise.then((data) => UpdateProjectSessionScoreRubricResponse.decode(new BinaryReader(data)));
35902
+ }
35903
+
34731
35904
  StreamEntitlements(request: StreamEntitlementsRequest, metadata?: Metadata): Observable<EntitlementsSnapshot> {
34732
35905
  const data = StreamEntitlementsRequest.encode(request).finish();
34733
35906
  const result = this.rpc.serverStreamingRequest(this.service, "StreamEntitlements", data, metadata);