@miradorlabs/web-grpc 4.30.0 → 4.31.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "4.30.0",
3
+ "version": "4.31.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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.
@@ -3455,7 +3460,14 @@ export interface AISessionScore {
3455
3460
  /** The session_version (AISessionSummary.session_version) the grading read. */
3456
3461
  inputSessionVersion: number;
3457
3462
  /** When the scoring run selected the session. */
3458
- scoredAt: Date | undefined;
3463
+ scoredAt:
3464
+ | Date
3465
+ | undefined;
3466
+ /**
3467
+ * The rubric template that graded it; UNSPECIFIED for a score graded before the scorer recorded its template (then
3468
+ * only rubric_version names it).
3469
+ */
3470
+ rubric: AISessionScoreRubric;
3459
3471
  }
3460
3472
 
3461
3473
  /**
@@ -5305,6 +5317,7 @@ function createBaseAISessionSummary(): AISessionSummary {
5305
5317
  workType: "",
5306
5318
  workSize: "",
5307
5319
  sessionScore: undefined,
5320
+ sessionScoreRubric: 0,
5308
5321
  promptLabelSummary: undefined,
5309
5322
  };
5310
5323
  }
@@ -5425,6 +5438,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
5425
5438
  if (message.sessionScore !== undefined) {
5426
5439
  writer.uint32(304).int32(message.sessionScore);
5427
5440
  }
5441
+ if (message.sessionScoreRubric !== 0) {
5442
+ writer.uint32(320).int32(message.sessionScoreRubric);
5443
+ }
5428
5444
  if (message.promptLabelSummary !== undefined) {
5429
5445
  AIPromptLabelSummary.encode(message.promptLabelSummary, writer.uint32(314).fork()).join();
5430
5446
  }
@@ -5748,6 +5764,14 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
5748
5764
  message.sessionScore = reader.int32();
5749
5765
  continue;
5750
5766
  }
5767
+ case 40: {
5768
+ if (tag !== 320) {
5769
+ break;
5770
+ }
5771
+
5772
+ message.sessionScoreRubric = reader.int32() as any;
5773
+ continue;
5774
+ }
5751
5775
  case 39: {
5752
5776
  if (tag !== 314) {
5753
5777
  break;
@@ -5920,6 +5944,11 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
5920
5944
  : isSet(object.session_score)
5921
5945
  ? globalThis.Number(object.session_score)
5922
5946
  : undefined,
5947
+ sessionScoreRubric: isSet(object.sessionScoreRubric)
5948
+ ? aISessionScoreRubricFromJSON(object.sessionScoreRubric)
5949
+ : isSet(object.session_score_rubric)
5950
+ ? aISessionScoreRubricFromJSON(object.session_score_rubric)
5951
+ : 0,
5923
5952
  promptLabelSummary: isSet(object.promptLabelSummary)
5924
5953
  ? AIPromptLabelSummary.fromJSON(object.promptLabelSummary)
5925
5954
  : isSet(object.prompt_label_summary)
@@ -6044,6 +6073,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6044
6073
  if (message.sessionScore !== undefined) {
6045
6074
  obj.sessionScore = Math.round(message.sessionScore);
6046
6075
  }
6076
+ if (message.sessionScoreRubric !== 0) {
6077
+ obj.sessionScoreRubric = aISessionScoreRubricToJSON(message.sessionScoreRubric);
6078
+ }
6047
6079
  if (message.promptLabelSummary !== undefined) {
6048
6080
  obj.promptLabelSummary = AIPromptLabelSummary.toJSON(message.promptLabelSummary);
6049
6081
  }
@@ -6095,6 +6127,7 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6095
6127
  message.workType = object.workType ?? "";
6096
6128
  message.workSize = object.workSize ?? "";
6097
6129
  message.sessionScore = object.sessionScore ?? undefined;
6130
+ message.sessionScoreRubric = object.sessionScoreRubric ?? 0;
6098
6131
  message.promptLabelSummary = (object.promptLabelSummary !== undefined && object.promptLabelSummary !== null)
6099
6132
  ? AIPromptLabelSummary.fromPartial(object.promptLabelSummary)
6100
6133
  : undefined;
@@ -25212,6 +25245,7 @@ function createBaseAISessionScore(): AISessionScore {
25212
25245
  scoreVersion: "",
25213
25246
  inputSessionVersion: 0,
25214
25247
  scoredAt: undefined,
25248
+ rubric: 0,
25215
25249
  };
25216
25250
  }
25217
25251
 
@@ -25241,6 +25275,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25241
25275
  if (message.scoredAt !== undefined) {
25242
25276
  Timestamp.encode(toTimestamp(message.scoredAt), writer.uint32(66).fork()).join();
25243
25277
  }
25278
+ if (message.rubric !== 0) {
25279
+ writer.uint32(72).int32(message.rubric);
25280
+ }
25244
25281
  return writer;
25245
25282
  },
25246
25283
 
@@ -25321,6 +25358,14 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25321
25358
  message.scoredAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
25322
25359
  continue;
25323
25360
  }
25361
+ case 9: {
25362
+ if (tag !== 72) {
25363
+ break;
25364
+ }
25365
+
25366
+ message.rubric = reader.int32() as any;
25367
+ continue;
25368
+ }
25324
25369
  }
25325
25370
  if ((tag & 7) === 4 || tag === 0) {
25326
25371
  break;
@@ -25361,6 +25406,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25361
25406
  : isSet(object.scored_at)
25362
25407
  ? fromJsonTimestamp(object.scored_at)
25363
25408
  : undefined,
25409
+ rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
25364
25410
  };
25365
25411
  },
25366
25412
 
@@ -25390,6 +25436,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25390
25436
  if (message.scoredAt !== undefined) {
25391
25437
  obj.scoredAt = message.scoredAt.toISOString();
25392
25438
  }
25439
+ if (message.rubric !== 0) {
25440
+ obj.rubric = aISessionScoreRubricToJSON(message.rubric);
25441
+ }
25393
25442
  return obj;
25394
25443
  },
25395
25444
 
@@ -25408,6 +25457,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25408
25457
  message.scoreVersion = object.scoreVersion ?? "";
25409
25458
  message.inputSessionVersion = object.inputSessionVersion ?? 0;
25410
25459
  message.scoredAt = object.scoredAt ?? undefined;
25460
+ message.rubric = object.rubric ?? 0;
25411
25461
  return message;
25412
25462
  },
25413
25463
  };
@@ -6411,6 +6411,7 @@ recap: jspb.Message.getFieldWithDefault(msg, 34, ""),
6411
6411
  workType: jspb.Message.getFieldWithDefault(msg, 36, ""),
6412
6412
  workSize: jspb.Message.getFieldWithDefault(msg, 37, ""),
6413
6413
  sessionScore: (f = jspb.Message.getField(msg, 38)) == null ? undefined : f,
6414
+ sessionScoreRubric: jspb.Message.getFieldWithDefault(msg, 40, 0),
6414
6415
  promptLabelSummary: (f = msg.getPromptLabelSummary()) && proto.gateway.web.v1.AIPromptLabelSummary.toObject(includeInstance, f)
6415
6416
  };
6416
6417
 
@@ -6603,6 +6604,10 @@ proto.gateway.web.v1.AISessionSummary.deserializeBinaryFromReader = function(msg
6603
6604
  var value = /** @type {number} */ (reader.readInt32());
6604
6605
  msg.setSessionScore(value);
6605
6606
  break;
6607
+ case 40:
6608
+ var value = /** @type {!proto.gateway.web.v1.AISessionScoreRubric} */ (reader.readEnum());
6609
+ msg.setSessionScoreRubric(value);
6610
+ break;
6606
6611
  case 39:
6607
6612
  var value = new proto.gateway.web.v1.AIPromptLabelSummary;
6608
6613
  reader.readMessage(value,proto.gateway.web.v1.AIPromptLabelSummary.deserializeBinaryFromReader);
@@ -6906,6 +6911,13 @@ proto.gateway.web.v1.AISessionSummary.serializeBinaryToWriter = function(message
6906
6911
  f
6907
6912
  );
6908
6913
  }
6914
+ f = message.getSessionScoreRubric();
6915
+ if (f !== 0.0) {
6916
+ writer.writeEnum(
6917
+ 40,
6918
+ f
6919
+ );
6920
+ }
6909
6921
  f = message.getPromptLabelSummary();
6910
6922
  if (f != null) {
6911
6923
  writer.writeMessage(
@@ -7885,6 +7897,24 @@ proto.gateway.web.v1.AISessionSummary.prototype.hasSessionScore = function() {
7885
7897
  };
7886
7898
 
7887
7899
 
7900
+ /**
7901
+ * optional AISessionScoreRubric session_score_rubric = 40;
7902
+ * @return {!proto.gateway.web.v1.AISessionScoreRubric}
7903
+ */
7904
+ proto.gateway.web.v1.AISessionSummary.prototype.getSessionScoreRubric = function() {
7905
+ return /** @type {!proto.gateway.web.v1.AISessionScoreRubric} */ (jspb.Message.getFieldWithDefault(this, 40, 0));
7906
+ };
7907
+
7908
+
7909
+ /**
7910
+ * @param {!proto.gateway.web.v1.AISessionScoreRubric} value
7911
+ * @return {!proto.gateway.web.v1.AISessionSummary} returns this
7912
+ */
7913
+ proto.gateway.web.v1.AISessionSummary.prototype.setSessionScoreRubric = function(value) {
7914
+ return jspb.Message.setProto3EnumField(this, 40, value);
7915
+ };
7916
+
7917
+
7888
7918
  /**
7889
7919
  * optional AIPromptLabelSummary prompt_label_summary = 39;
7890
7920
  * @return {?proto.gateway.web.v1.AIPromptLabelSummary}
@@ -44608,7 +44638,8 @@ summary: (f = msg.getSummary()) && proto.gateway.web.v1.AISessionScoreSummary.to
44608
44638
  model: jspb.Message.getFieldWithDefault(msg, 5, ""),
44609
44639
  scoreVersion: jspb.Message.getFieldWithDefault(msg, 6, ""),
44610
44640
  inputSessionVersion: jspb.Message.getFieldWithDefault(msg, 7, 0),
44611
- scoredAt: (f = msg.getScoredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
44641
+ scoredAt: (f = msg.getScoredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
44642
+ rubric: jspb.Message.getFieldWithDefault(msg, 9, 0)
44612
44643
  };
44613
44644
 
44614
44645
  if (includeInstance) {
@@ -44680,6 +44711,10 @@ proto.gateway.web.v1.AISessionScore.deserializeBinaryFromReader = function(msg,
44680
44711
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
44681
44712
  msg.setScoredAt(value);
44682
44713
  break;
44714
+ case 9:
44715
+ var value = /** @type {!proto.gateway.web.v1.AISessionScoreRubric} */ (reader.readEnum());
44716
+ msg.setRubric(value);
44717
+ break;
44683
44718
  default:
44684
44719
  reader.skipField();
44685
44720
  break;
@@ -44768,6 +44803,13 @@ proto.gateway.web.v1.AISessionScore.serializeBinaryToWriter = function(message,
44768
44803
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
44769
44804
  );
44770
44805
  }
44806
+ f = message.getRubric();
44807
+ if (f !== 0.0) {
44808
+ writer.writeEnum(
44809
+ 9,
44810
+ f
44811
+ );
44812
+ }
44771
44813
  };
44772
44814
 
44773
44815
 
@@ -44973,6 +45015,24 @@ proto.gateway.web.v1.AISessionScore.prototype.hasScoredAt = function() {
44973
45015
  };
44974
45016
 
44975
45017
 
45018
+ /**
45019
+ * optional AISessionScoreRubric rubric = 9;
45020
+ * @return {!proto.gateway.web.v1.AISessionScoreRubric}
45021
+ */
45022
+ proto.gateway.web.v1.AISessionScore.prototype.getRubric = function() {
45023
+ return /** @type {!proto.gateway.web.v1.AISessionScoreRubric} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
45024
+ };
45025
+
45026
+
45027
+ /**
45028
+ * @param {!proto.gateway.web.v1.AISessionScoreRubric} value
45029
+ * @return {!proto.gateway.web.v1.AISessionScore} returns this
45030
+ */
45031
+ proto.gateway.web.v1.AISessionScore.prototype.setRubric = function(value) {
45032
+ return jspb.Message.setProto3EnumField(this, 9, value);
45033
+ };
45034
+
45035
+
44976
45036
 
44977
45037
  /**
44978
45038
  * List of repeated fields within this message type.