@miradorlabs/web-grpc 4.15.0 → 4.17.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.15.0",
3
+ "version": "4.17.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",
@@ -4399,6 +4399,11 @@ export interface AIModelPrice {
4399
4399
  listingId: string;
4400
4400
  /** Normalized geography the price applies to (global, us, eu, ...), "" unscoped. */
4401
4401
  region: string;
4402
+ /**
4403
+ * The 1-hour prompt-cache write rate the catalog publishes; cache_write_usd_per_mtok is the 5-minute
4404
+ * rate. 0 when the catalog publishes none, and a 1-hour write is then priced at cache_write_usd_per_mtok.
4405
+ */
4406
+ cacheWrite1hUsdPerMtok: number;
4402
4407
  }
4403
4408
 
4404
4409
  export interface AITokenUsage {
@@ -5027,6 +5032,11 @@ export interface AIProjectInsight {
5027
5032
  | undefined;
5028
5033
  /** The events the card cites, in the model's order; each names a session of the project. */
5029
5034
  citations: AIProjectInsightCitation[];
5035
+ /**
5036
+ * Absent when this card has no catalog suggestion. The model chose it from its run's shortlist of public skills no
5037
+ * session of the project used in the window; its metadata is public reference text, not instructions.
5038
+ */
5039
+ skillSuggestion: AISkillSuggestion | undefined;
5030
5040
  }
5031
5041
 
5032
5042
  /**
@@ -28158,6 +28168,7 @@ function createBaseAIModelPrice(): AIModelPrice {
28158
28168
  effortRaw: "",
28159
28169
  listingId: "",
28160
28170
  region: "",
28171
+ cacheWrite1hUsdPerMtok: 0,
28161
28172
  };
28162
28173
  }
28163
28174
 
@@ -28199,6 +28210,9 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
28199
28210
  if (message.region !== "") {
28200
28211
  writer.uint32(98).string(message.region);
28201
28212
  }
28213
+ if (message.cacheWrite1hUsdPerMtok !== 0) {
28214
+ writer.uint32(105).double(message.cacheWrite1hUsdPerMtok);
28215
+ }
28202
28216
  return writer;
28203
28217
  },
28204
28218
 
@@ -28311,6 +28325,14 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
28311
28325
  message.region = reader.string();
28312
28326
  continue;
28313
28327
  }
28328
+ case 13: {
28329
+ if (tag !== 105) {
28330
+ break;
28331
+ }
28332
+
28333
+ message.cacheWrite1hUsdPerMtok = reader.double();
28334
+ continue;
28335
+ }
28314
28336
  }
28315
28337
  if ((tag & 7) === 4 || tag === 0) {
28316
28338
  break;
@@ -28373,6 +28395,11 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
28373
28395
  ? globalThis.String(object.listing_id)
28374
28396
  : "",
28375
28397
  region: isSet(object.region) ? globalThis.String(object.region) : "",
28398
+ cacheWrite1hUsdPerMtok: isSet(object.cacheWrite1hUsdPerMtok)
28399
+ ? globalThis.Number(object.cacheWrite1hUsdPerMtok)
28400
+ : isSet(object.cache_write_1h_usd_per_mtok)
28401
+ ? globalThis.Number(object.cache_write_1h_usd_per_mtok)
28402
+ : 0,
28376
28403
  };
28377
28404
  },
28378
28405
 
@@ -28414,6 +28441,9 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
28414
28441
  if (message.region !== "") {
28415
28442
  obj.region = message.region;
28416
28443
  }
28444
+ if (message.cacheWrite1hUsdPerMtok !== 0) {
28445
+ obj.cacheWrite1hUsdPerMtok = floatToJson(message.cacheWrite1hUsdPerMtok);
28446
+ }
28417
28447
  return obj;
28418
28448
  },
28419
28449
 
@@ -28434,6 +28464,7 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
28434
28464
  message.effortRaw = object.effortRaw ?? "";
28435
28465
  message.listingId = object.listingId ?? "";
28436
28466
  message.region = object.region ?? "";
28467
+ message.cacheWrite1hUsdPerMtok = object.cacheWrite1hUsdPerMtok ?? 0;
28437
28468
  return message;
28438
28469
  },
28439
28470
  };
@@ -33893,6 +33924,7 @@ function createBaseAIProjectInsight(): AIProjectInsight {
33893
33924
  personCount: 0,
33894
33925
  spendUsd: undefined,
33895
33926
  citations: [],
33927
+ skillSuggestion: undefined,
33896
33928
  };
33897
33929
  }
33898
33930
 
@@ -33934,6 +33966,9 @@ export const AIProjectInsight: MessageFns<AIProjectInsight> = {
33934
33966
  for (const v of message.citations) {
33935
33967
  AIProjectInsightCitation.encode(v!, writer.uint32(98).fork()).join();
33936
33968
  }
33969
+ if (message.skillSuggestion !== undefined) {
33970
+ AISkillSuggestion.encode(message.skillSuggestion, writer.uint32(106).fork()).join();
33971
+ }
33937
33972
  return writer;
33938
33973
  },
33939
33974
 
@@ -34046,6 +34081,14 @@ export const AIProjectInsight: MessageFns<AIProjectInsight> = {
34046
34081
  message.citations.push(AIProjectInsightCitation.decode(reader, reader.uint32()));
34047
34082
  continue;
34048
34083
  }
34084
+ case 13: {
34085
+ if (tag !== 106) {
34086
+ break;
34087
+ }
34088
+
34089
+ message.skillSuggestion = AISkillSuggestion.decode(reader, reader.uint32());
34090
+ continue;
34091
+ }
34049
34092
  }
34050
34093
  if ((tag & 7) === 4 || tag === 0) {
34051
34094
  break;
@@ -34086,6 +34129,11 @@ export const AIProjectInsight: MessageFns<AIProjectInsight> = {
34086
34129
  citations: globalThis.Array.isArray(object?.citations)
34087
34130
  ? object.citations.map((e: any) => AIProjectInsightCitation.fromJSON(e))
34088
34131
  : [],
34132
+ skillSuggestion: isSet(object.skillSuggestion)
34133
+ ? AISkillSuggestion.fromJSON(object.skillSuggestion)
34134
+ : isSet(object.skill_suggestion)
34135
+ ? AISkillSuggestion.fromJSON(object.skill_suggestion)
34136
+ : undefined,
34089
34137
  };
34090
34138
  },
34091
34139
 
@@ -34127,6 +34175,9 @@ export const AIProjectInsight: MessageFns<AIProjectInsight> = {
34127
34175
  if (message.citations?.length) {
34128
34176
  obj.citations = message.citations.map((e) => AIProjectInsightCitation.toJSON(e));
34129
34177
  }
34178
+ if (message.skillSuggestion !== undefined) {
34179
+ obj.skillSuggestion = AISkillSuggestion.toJSON(message.skillSuggestion);
34180
+ }
34130
34181
  return obj;
34131
34182
  },
34132
34183
 
@@ -34147,6 +34198,9 @@ export const AIProjectInsight: MessageFns<AIProjectInsight> = {
34147
34198
  message.personCount = object.personCount ?? 0;
34148
34199
  message.spendUsd = object.spendUsd ?? undefined;
34149
34200
  message.citations = object.citations?.map((e) => AIProjectInsightCitation.fromPartial(e)) || [];
34201
+ message.skillSuggestion = (object.skillSuggestion !== undefined && object.skillSuggestion !== null)
34202
+ ? AISkillSuggestion.fromPartial(object.skillSuggestion)
34203
+ : undefined;
34150
34204
  return message;
34151
34205
  },
34152
34206
  };
@@ -48633,7 +48633,8 @@ cacheWriteUsdPerMtok: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0)
48633
48633
  providerRaw: jspb.Message.getFieldWithDefault(msg, 9, ""),
48634
48634
  effortRaw: jspb.Message.getFieldWithDefault(msg, 10, ""),
48635
48635
  listingId: jspb.Message.getFieldWithDefault(msg, 11, ""),
48636
- region: jspb.Message.getFieldWithDefault(msg, 12, "")
48636
+ region: jspb.Message.getFieldWithDefault(msg, 12, ""),
48637
+ cacheWrite1hUsdPerMtok: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0)
48637
48638
  };
48638
48639
 
48639
48640
  if (includeInstance) {
@@ -48719,6 +48720,10 @@ proto.gateway.web.v1.AIModelPrice.deserializeBinaryFromReader = function(msg, re
48719
48720
  var value = /** @type {string} */ (reader.readStringRequireUtf8());
48720
48721
  msg.setRegion(value);
48721
48722
  break;
48723
+ case 13:
48724
+ var value = /** @type {number} */ (reader.readDouble());
48725
+ msg.setCacheWrite1hUsdPerMtok(value);
48726
+ break;
48722
48727
  default:
48723
48728
  reader.skipField();
48724
48729
  break;
@@ -48833,6 +48838,13 @@ proto.gateway.web.v1.AIModelPrice.serializeBinaryToWriter = function(message, wr
48833
48838
  f
48834
48839
  );
48835
48840
  }
48841
+ f = message.getCacheWrite1hUsdPerMtok();
48842
+ if (f !== 0.0) {
48843
+ writer.writeDouble(
48844
+ 13,
48845
+ f
48846
+ );
48847
+ }
48836
48848
  };
48837
48849
 
48838
48850
 
@@ -49071,6 +49083,24 @@ proto.gateway.web.v1.AIModelPrice.prototype.setRegion = function(value) {
49071
49083
  };
49072
49084
 
49073
49085
 
49086
+ /**
49087
+ * optional double cache_write_1h_usd_per_mtok = 13;
49088
+ * @return {number}
49089
+ */
49090
+ proto.gateway.web.v1.AIModelPrice.prototype.getCacheWrite1hUsdPerMtok = function() {
49091
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0));
49092
+ };
49093
+
49094
+
49095
+ /**
49096
+ * @param {number} value
49097
+ * @return {!proto.gateway.web.v1.AIModelPrice} returns this
49098
+ */
49099
+ proto.gateway.web.v1.AIModelPrice.prototype.setCacheWrite1hUsdPerMtok = function(value) {
49100
+ return jspb.Message.setProto3FloatField(this, 13, value);
49101
+ };
49102
+
49103
+
49074
49104
 
49075
49105
 
49076
49106
 
@@ -59296,7 +59326,8 @@ sessionCount: jspb.Message.getFieldWithDefault(msg, 9, 0),
59296
59326
  personCount: jspb.Message.getFieldWithDefault(msg, 10, 0),
59297
59327
  spendUsd: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f,
59298
59328
  citationsList: jspb.Message.toObjectList(msg.getCitationsList(),
59299
- proto.gateway.web.v1.AIProjectInsightCitation.toObject, includeInstance)
59329
+ proto.gateway.web.v1.AIProjectInsightCitation.toObject, includeInstance),
59330
+ skillSuggestion: (f = msg.getSkillSuggestion()) && proto.gateway.web.v1.AISkillSuggestion.toObject(includeInstance, f)
59300
59331
  };
59301
59332
 
59302
59333
  if (includeInstance) {
@@ -59382,6 +59413,11 @@ proto.gateway.web.v1.AIProjectInsight.deserializeBinaryFromReader = function(msg
59382
59413
  reader.readMessage(value,proto.gateway.web.v1.AIProjectInsightCitation.deserializeBinaryFromReader);
59383
59414
  msg.addCitations(value);
59384
59415
  break;
59416
+ case 13:
59417
+ var value = new proto.gateway.web.v1.AISkillSuggestion;
59418
+ reader.readMessage(value,proto.gateway.web.v1.AISkillSuggestion.deserializeBinaryFromReader);
59419
+ msg.setSkillSuggestion(value);
59420
+ break;
59385
59421
  default:
59386
59422
  reader.skipField();
59387
59423
  break;
@@ -59496,6 +59532,14 @@ proto.gateway.web.v1.AIProjectInsight.serializeBinaryToWriter = function(message
59496
59532
  proto.gateway.web.v1.AIProjectInsightCitation.serializeBinaryToWriter
59497
59533
  );
59498
59534
  }
59535
+ f = message.getSkillSuggestion();
59536
+ if (f != null) {
59537
+ writer.writeMessage(
59538
+ 13,
59539
+ f,
59540
+ proto.gateway.web.v1.AISkillSuggestion.serializeBinaryToWriter
59541
+ );
59542
+ }
59499
59543
  };
59500
59544
 
59501
59545
 
@@ -59753,6 +59797,43 @@ proto.gateway.web.v1.AIProjectInsight.prototype.clearCitationsList = function()
59753
59797
  };
59754
59798
 
59755
59799
 
59800
+ /**
59801
+ * optional AISkillSuggestion skill_suggestion = 13;
59802
+ * @return {?proto.gateway.web.v1.AISkillSuggestion}
59803
+ */
59804
+ proto.gateway.web.v1.AIProjectInsight.prototype.getSkillSuggestion = function() {
59805
+ return /** @type{?proto.gateway.web.v1.AISkillSuggestion} */ (
59806
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.AISkillSuggestion, 13));
59807
+ };
59808
+
59809
+
59810
+ /**
59811
+ * @param {?proto.gateway.web.v1.AISkillSuggestion|undefined} value
59812
+ * @return {!proto.gateway.web.v1.AIProjectInsight} returns this
59813
+ */
59814
+ proto.gateway.web.v1.AIProjectInsight.prototype.setSkillSuggestion = function(value) {
59815
+ return jspb.Message.setWrapperField(this, 13, value);
59816
+ };
59817
+
59818
+
59819
+ /**
59820
+ * Clears the message field making it undefined.
59821
+ * @return {!proto.gateway.web.v1.AIProjectInsight} returns this
59822
+ */
59823
+ proto.gateway.web.v1.AIProjectInsight.prototype.clearSkillSuggestion = function() {
59824
+ return this.setSkillSuggestion(undefined);
59825
+ };
59826
+
59827
+
59828
+ /**
59829
+ * Returns whether this field is set.
59830
+ * @return {boolean}
59831
+ */
59832
+ proto.gateway.web.v1.AIProjectInsight.prototype.hasSkillSuggestion = function() {
59833
+ return jspb.Message.getField(this, 13) != null;
59834
+ };
59835
+
59836
+
59756
59837
 
59757
59838
 
59758
59839