@miradorlabs/web-grpc 3.36.0 → 3.37.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": "3.36.0",
3
+ "version": "3.37.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",
@@ -1991,6 +1991,11 @@ export interface ModelActivityPrincipal {
1991
1991
  inputTokens: number;
1992
1992
  outputTokens: number;
1993
1993
  costUsd: number;
1994
+ /**
1995
+ * Subscription-facility slice of cost_usd, by each call's funding mode, so net = cost_usd − this per principal;
1996
+ * absent (an older backend) means unavailable.
1997
+ */
1998
+ subscriptionCostUsd?: number | undefined;
1994
1999
  }
1995
2000
 
1996
2001
  export interface SessionUsageTrendRequest {
@@ -2120,6 +2125,7 @@ export interface AIFileRow {
2120
2125
  lastPushedAt: Date | undefined;
2121
2126
  discardedAt: Date | undefined;
2122
2127
  discardReason: string;
2128
+ /** The kept checkout copies' stored edit counts summed; 4294967295 means at least that many. */
2123
2129
  editCount: number;
2124
2130
  /** unique, sorted by (source_system, session_id) */
2125
2131
  sessions: AISessionRef[];
@@ -2197,8 +2203,10 @@ export interface FileTiers {
2197
2203
  }
2198
2204
 
2199
2205
  export interface FileTierBucket {
2206
+ /** distinct (repository_key, ref, path) with a copy in the bucket */
2200
2207
  files: number;
2201
2208
  branches: number;
2209
+ /** distinct (source_system, session_id) across the bucket's copies */
2202
2210
  sessions: number;
2203
2211
  costUsd: number;
2204
2212
  outputTokens: number;
@@ -16498,7 +16506,17 @@ export const ModelActivity: MessageFns<ModelActivity> = {
16498
16506
  };
16499
16507
 
16500
16508
  function createBaseModelActivityPrincipal(): ModelActivityPrincipal {
16501
- return { kind: 0, id: "", sourceSystem: "", modelCalls: 0, sessions: 0, inputTokens: 0, outputTokens: 0, costUsd: 0 };
16509
+ return {
16510
+ kind: 0,
16511
+ id: "",
16512
+ sourceSystem: "",
16513
+ modelCalls: 0,
16514
+ sessions: 0,
16515
+ inputTokens: 0,
16516
+ outputTokens: 0,
16517
+ costUsd: 0,
16518
+ subscriptionCostUsd: undefined,
16519
+ };
16502
16520
  }
16503
16521
 
16504
16522
  export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
@@ -16527,6 +16545,9 @@ export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
16527
16545
  if (message.costUsd !== 0) {
16528
16546
  writer.uint32(65).double(message.costUsd);
16529
16547
  }
16548
+ if (message.subscriptionCostUsd !== undefined) {
16549
+ writer.uint32(73).double(message.subscriptionCostUsd);
16550
+ }
16530
16551
  return writer;
16531
16552
  },
16532
16553
 
@@ -16607,6 +16628,14 @@ export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
16607
16628
  message.costUsd = reader.double();
16608
16629
  continue;
16609
16630
  }
16631
+ case 9: {
16632
+ if (tag !== 73) {
16633
+ break;
16634
+ }
16635
+
16636
+ message.subscriptionCostUsd = reader.double();
16637
+ continue;
16638
+ }
16610
16639
  }
16611
16640
  if ((tag & 7) === 4 || tag === 0) {
16612
16641
  break;
@@ -16649,6 +16678,11 @@ export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
16649
16678
  : isSet(object.cost_usd)
16650
16679
  ? globalThis.Number(object.cost_usd)
16651
16680
  : 0,
16681
+ subscriptionCostUsd: isSet(object.subscriptionCostUsd)
16682
+ ? globalThis.Number(object.subscriptionCostUsd)
16683
+ : isSet(object.subscription_cost_usd)
16684
+ ? globalThis.Number(object.subscription_cost_usd)
16685
+ : undefined,
16652
16686
  };
16653
16687
  },
16654
16688
 
@@ -16678,6 +16712,9 @@ export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
16678
16712
  if (message.costUsd !== 0) {
16679
16713
  obj.costUsd = floatToJson(message.costUsd);
16680
16714
  }
16715
+ if (message.subscriptionCostUsd !== undefined) {
16716
+ obj.subscriptionCostUsd = floatToJson(message.subscriptionCostUsd);
16717
+ }
16681
16718
  return obj;
16682
16719
  },
16683
16720
 
@@ -16694,6 +16731,7 @@ export const ModelActivityPrincipal: MessageFns<ModelActivityPrincipal> = {
16694
16731
  message.inputTokens = object.inputTokens ?? 0;
16695
16732
  message.outputTokens = object.outputTokens ?? 0;
16696
16733
  message.costUsd = object.costUsd ?? 0;
16734
+ message.subscriptionCostUsd = object.subscriptionCostUsd ?? undefined;
16697
16735
  return message;
16698
16736
  },
16699
16737
  };
@@ -22738,8 +22776,8 @@ export interface AIGatewayService {
22738
22776
  StreamProjectSummaries(request: ProjectSummariesRequest, metadata?: Metadata): Observable<ProjectSummaries>;
22739
22777
  /**
22740
22778
  * Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel: one row per
22741
- * (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name), its
22742
- * most-edited checkout copy among those the filter keeps. Mirrors telemetry.api.v1.
22779
+ * (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name): its kept
22780
+ * checkout copies' edits, costs and tokens added up, its state from the most-edited copy. Mirrors telemetry.api.v1.
22743
22781
  */
22744
22782
  ListFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse>;
22745
22783
  /**
@@ -22749,7 +22787,8 @@ export interface AIGatewayService {
22749
22787
  ListFileDirectories(request: ListFileDirectoriesRequest, metadata?: Metadata): Promise<ListFileDirectoriesResponse>;
22750
22788
  /**
22751
22789
  * Live stream of the unlanded-work funnel: aging tiers + discarded (git-invisible churn), a complete
22752
- * snapshot re-derived each tick. Counts every checkout copy, edited or not.
22790
+ * snapshot re-derived each tick. Every checkout copy, edited or not, lands in its own bucket; files and
22791
+ * sessions are distinct counts, so they do not add up across buckets or groups. Mirrors telemetry.api.v1.
22753
22792
  */
22754
22793
  StreamFilesSummary(request: FilesSummaryRequest, metadata?: Metadata): Observable<FilesSummary>;
22755
22794
  /** Latest observed list price per catalog listing from the global catalog, under stored names. */
@@ -828,8 +828,8 @@ streamProjectSummaries: {
828
828
  responseDeserialize: deserialize_gateway_web_v1_ProjectSummaries,
829
829
  },
830
830
  // Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel: one row per
831
- // (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name), its
832
- // most-edited checkout copy among those the filter keeps. Mirrors telemetry.api.v1.
831
+ // (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name): its kept
832
+ // checkout copies' edits, costs and tokens added up, its state from the most-edited copy. Mirrors telemetry.api.v1.
833
833
  listFiles: {
834
834
  path: '/gateway.web.v1.AIGatewayService/ListFiles',
835
835
  requestStream: false,
@@ -855,7 +855,8 @@ listFileDirectories: {
855
855
  responseDeserialize: deserialize_gateway_web_v1_ListFileDirectoriesResponse,
856
856
  },
857
857
  // Live stream of the unlanded-work funnel: aging tiers + discarded (git-invisible churn), a complete
858
- // snapshot re-derived each tick. Counts every checkout copy, edited or not.
858
+ // snapshot re-derived each tick. Every checkout copy, edited or not, lands in its own bucket; files and
859
+ // sessions are distinct counts, so they do not add up across buckets or groups. Mirrors telemetry.api.v1.
859
860
  streamFilesSummary: {
860
861
  path: '/gateway.web.v1.AIGatewayService/StreamFilesSummary',
861
862
  requestStream: false,
@@ -29455,7 +29455,8 @@ modelCalls: jspb.Message.getFieldWithDefault(msg, 4, 0),
29455
29455
  sessions: jspb.Message.getFieldWithDefault(msg, 5, 0),
29456
29456
  inputTokens: jspb.Message.getFieldWithDefault(msg, 6, 0),
29457
29457
  outputTokens: jspb.Message.getFieldWithDefault(msg, 7, 0),
29458
- costUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0)
29458
+ costUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
29459
+ subscriptionCostUsd: (f = jspb.Message.getOptionalFloatingPointField(msg, 9)) == null ? undefined : f
29459
29460
  };
29460
29461
 
29461
29462
  if (includeInstance) {
@@ -29524,6 +29525,10 @@ proto.gateway.web.v1.ModelActivityPrincipal.deserializeBinaryFromReader = functi
29524
29525
  var value = /** @type {number} */ (reader.readDouble());
29525
29526
  msg.setCostUsd(value);
29526
29527
  break;
29528
+ case 9:
29529
+ var value = /** @type {number} */ (reader.readDouble());
29530
+ msg.setSubscriptionCostUsd(value);
29531
+ break;
29527
29532
  default:
29528
29533
  reader.skipField();
29529
29534
  break;
@@ -29609,6 +29614,13 @@ proto.gateway.web.v1.ModelActivityPrincipal.serializeBinaryToWriter = function(m
29609
29614
  f
29610
29615
  );
29611
29616
  }
29617
+ f = /** @type {number} */ (jspb.Message.getField(message, 9));
29618
+ if (f != null) {
29619
+ writer.writeDouble(
29620
+ 9,
29621
+ f
29622
+ );
29623
+ }
29612
29624
  };
29613
29625
 
29614
29626
 
@@ -29756,6 +29768,42 @@ proto.gateway.web.v1.ModelActivityPrincipal.prototype.setCostUsd = function(valu
29756
29768
  };
29757
29769
 
29758
29770
 
29771
+ /**
29772
+ * optional double subscription_cost_usd = 9;
29773
+ * @return {number}
29774
+ */
29775
+ proto.gateway.web.v1.ModelActivityPrincipal.prototype.getSubscriptionCostUsd = function() {
29776
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0));
29777
+ };
29778
+
29779
+
29780
+ /**
29781
+ * @param {number} value
29782
+ * @return {!proto.gateway.web.v1.ModelActivityPrincipal} returns this
29783
+ */
29784
+ proto.gateway.web.v1.ModelActivityPrincipal.prototype.setSubscriptionCostUsd = function(value) {
29785
+ return jspb.Message.setField(this, 9, value);
29786
+ };
29787
+
29788
+
29789
+ /**
29790
+ * Clears the field making it undefined.
29791
+ * @return {!proto.gateway.web.v1.ModelActivityPrincipal} returns this
29792
+ */
29793
+ proto.gateway.web.v1.ModelActivityPrincipal.prototype.clearSubscriptionCostUsd = function() {
29794
+ return jspb.Message.setField(this, 9, undefined);
29795
+ };
29796
+
29797
+
29798
+ /**
29799
+ * Returns whether this field is set.
29800
+ * @return {boolean}
29801
+ */
29802
+ proto.gateway.web.v1.ModelActivityPrincipal.prototype.hasSubscriptionCostUsd = function() {
29803
+ return jspb.Message.getField(this, 9) != null;
29804
+ };
29805
+
29806
+
29759
29807
 
29760
29808
  /**
29761
29809
  * List of repeated fields within this message type.