@miradorlabs/web-grpc 2.68.0 → 2.70.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": "2.68.0",
3
+ "version": "2.70.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",
@@ -1618,21 +1618,18 @@ export interface BurnMapRequest {
1618
1618
  projectId: string;
1619
1619
  }
1620
1620
 
1621
- export interface BurnMapResponse {
1622
- status: ResponseStatus | undefined;
1623
- nodes: BurnMapNode[];
1624
- }
1625
-
1626
1621
  /**
1627
- * BurnMapNode is one (repository, directory) tile, pre-aggregated. Net = notional − subscription on either
1628
- * axis; the client derives landed = total − unlanded and picks the tile metric.
1622
+ * BurnMapFile is one file's burn-map tile — the per-file working state the treemap renders and drills into.
1623
+ * repo_id is the checkout root; (repo_id, path) uniquely keys a tile (repository_key is display enrichment,
1624
+ * shared when one repo/ref is checked out at several roots). Net = notional − subscription on either axis; the
1625
+ * client derives landed = total − unlanded, its family from state, and picks the tile metric.
1629
1626
  */
1630
- export interface BurnMapNode {
1627
+ export interface BurnMapFile {
1628
+ repoId: string;
1631
1629
  repositoryKey: string;
1632
- directory: string;
1633
- files: number;
1634
- landedFiles: number;
1635
- discardedFiles: number;
1630
+ ref: string;
1631
+ path: string;
1632
+ state: string;
1636
1633
  edits: number;
1637
1634
  distinctSessions: number;
1638
1635
  unlandedCostUsd: number;
@@ -14013,100 +14010,13 @@ export const BurnMapRequest: MessageFns<BurnMapRequest> = {
14013
14010
  },
14014
14011
  };
14015
14012
 
14016
- function createBaseBurnMapResponse(): BurnMapResponse {
14017
- return { status: undefined, nodes: [] };
14018
- }
14019
-
14020
- export const BurnMapResponse: MessageFns<BurnMapResponse> = {
14021
- encode(message: BurnMapResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
14022
- if (message.status !== undefined) {
14023
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
14024
- }
14025
- for (const v of message.nodes) {
14026
- BurnMapNode.encode(v!, writer.uint32(18).fork()).join();
14027
- }
14028
- return writer;
14029
- },
14030
-
14031
- decode(input: BinaryReader | Uint8Array, length?: number): BurnMapResponse {
14032
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
14033
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
14034
- if (previousRecursionDepth >= 100) {
14035
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
14036
- }
14037
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
14038
- try {
14039
- const end = length === undefined ? reader.len : reader.pos + length;
14040
- const message = createBaseBurnMapResponse();
14041
- while (reader.pos < end) {
14042
- const tag = reader.uint32();
14043
- switch (tag >>> 3) {
14044
- case 1: {
14045
- if (tag !== 10) {
14046
- break;
14047
- }
14048
-
14049
- message.status = ResponseStatus.decode(reader, reader.uint32());
14050
- continue;
14051
- }
14052
- case 2: {
14053
- if (tag !== 18) {
14054
- break;
14055
- }
14056
-
14057
- message.nodes.push(BurnMapNode.decode(reader, reader.uint32()));
14058
- continue;
14059
- }
14060
- }
14061
- if ((tag & 7) === 4 || tag === 0) {
14062
- break;
14063
- }
14064
- reader.skip(tag & 7);
14065
- }
14066
- return message;
14067
- } finally {
14068
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
14069
- }
14070
- },
14071
-
14072
- fromJSON(object: any): BurnMapResponse {
14073
- return {
14074
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
14075
- nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => BurnMapNode.fromJSON(e)) : [],
14076
- };
14077
- },
14078
-
14079
- toJSON(message: BurnMapResponse): unknown {
14080
- const obj: any = {};
14081
- if (message.status !== undefined) {
14082
- obj.status = ResponseStatus.toJSON(message.status);
14083
- }
14084
- if (message.nodes?.length) {
14085
- obj.nodes = message.nodes.map((e) => BurnMapNode.toJSON(e));
14086
- }
14087
- return obj;
14088
- },
14089
-
14090
- create<I extends Exact<DeepPartial<BurnMapResponse>, I>>(base?: I): BurnMapResponse {
14091
- return BurnMapResponse.fromPartial(base ?? ({} as any));
14092
- },
14093
- fromPartial<I extends Exact<DeepPartial<BurnMapResponse>, I>>(object: I): BurnMapResponse {
14094
- const message = createBaseBurnMapResponse();
14095
- message.status = (object.status !== undefined && object.status !== null)
14096
- ? ResponseStatus.fromPartial(object.status)
14097
- : undefined;
14098
- message.nodes = object.nodes?.map((e) => BurnMapNode.fromPartial(e)) || [];
14099
- return message;
14100
- },
14101
- };
14102
-
14103
- function createBaseBurnMapNode(): BurnMapNode {
14013
+ function createBaseBurnMapFile(): BurnMapFile {
14104
14014
  return {
14015
+ repoId: "",
14105
14016
  repositoryKey: "",
14106
- directory: "",
14107
- files: 0,
14108
- landedFiles: 0,
14109
- discardedFiles: 0,
14017
+ ref: "",
14018
+ path: "",
14019
+ state: "",
14110
14020
  edits: 0,
14111
14021
  distinctSessions: 0,
14112
14022
  unlandedCostUsd: 0,
@@ -14116,22 +14026,22 @@ function createBaseBurnMapNode(): BurnMapNode {
14116
14026
  };
14117
14027
  }
14118
14028
 
14119
- export const BurnMapNode: MessageFns<BurnMapNode> = {
14120
- encode(message: BurnMapNode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
14121
- if (message.repositoryKey !== "") {
14122
- writer.uint32(10).string(message.repositoryKey);
14029
+ export const BurnMapFile: MessageFns<BurnMapFile> = {
14030
+ encode(message: BurnMapFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
14031
+ if (message.repoId !== "") {
14032
+ writer.uint32(10).string(message.repoId);
14123
14033
  }
14124
- if (message.directory !== "") {
14125
- writer.uint32(18).string(message.directory);
14034
+ if (message.repositoryKey !== "") {
14035
+ writer.uint32(18).string(message.repositoryKey);
14126
14036
  }
14127
- if (message.files !== 0) {
14128
- writer.uint32(24).uint64(message.files);
14037
+ if (message.ref !== "") {
14038
+ writer.uint32(26).string(message.ref);
14129
14039
  }
14130
- if (message.landedFiles !== 0) {
14131
- writer.uint32(32).uint64(message.landedFiles);
14040
+ if (message.path !== "") {
14041
+ writer.uint32(34).string(message.path);
14132
14042
  }
14133
- if (message.discardedFiles !== 0) {
14134
- writer.uint32(40).uint64(message.discardedFiles);
14043
+ if (message.state !== "") {
14044
+ writer.uint32(42).string(message.state);
14135
14045
  }
14136
14046
  if (message.edits !== 0) {
14137
14047
  writer.uint32(48).uint64(message.edits);
@@ -14154,7 +14064,7 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14154
14064
  return writer;
14155
14065
  },
14156
14066
 
14157
- decode(input: BinaryReader | Uint8Array, length?: number): BurnMapNode {
14067
+ decode(input: BinaryReader | Uint8Array, length?: number): BurnMapFile {
14158
14068
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
14159
14069
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
14160
14070
  if (previousRecursionDepth >= 100) {
@@ -14163,7 +14073,7 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14163
14073
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
14164
14074
  try {
14165
14075
  const end = length === undefined ? reader.len : reader.pos + length;
14166
- const message = createBaseBurnMapNode();
14076
+ const message = createBaseBurnMapFile();
14167
14077
  while (reader.pos < end) {
14168
14078
  const tag = reader.uint32();
14169
14079
  switch (tag >>> 3) {
@@ -14172,7 +14082,7 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14172
14082
  break;
14173
14083
  }
14174
14084
 
14175
- message.repositoryKey = reader.string();
14085
+ message.repoId = reader.string();
14176
14086
  continue;
14177
14087
  }
14178
14088
  case 2: {
@@ -14180,31 +14090,31 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14180
14090
  break;
14181
14091
  }
14182
14092
 
14183
- message.directory = reader.string();
14093
+ message.repositoryKey = reader.string();
14184
14094
  continue;
14185
14095
  }
14186
14096
  case 3: {
14187
- if (tag !== 24) {
14097
+ if (tag !== 26) {
14188
14098
  break;
14189
14099
  }
14190
14100
 
14191
- message.files = longToNumber(reader.uint64());
14101
+ message.ref = reader.string();
14192
14102
  continue;
14193
14103
  }
14194
14104
  case 4: {
14195
- if (tag !== 32) {
14105
+ if (tag !== 34) {
14196
14106
  break;
14197
14107
  }
14198
14108
 
14199
- message.landedFiles = longToNumber(reader.uint64());
14109
+ message.path = reader.string();
14200
14110
  continue;
14201
14111
  }
14202
14112
  case 5: {
14203
- if (tag !== 40) {
14113
+ if (tag !== 42) {
14204
14114
  break;
14205
14115
  }
14206
14116
 
14207
- message.discardedFiles = longToNumber(reader.uint64());
14117
+ message.state = reader.string();
14208
14118
  continue;
14209
14119
  }
14210
14120
  case 6: {
@@ -14267,25 +14177,21 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14267
14177
  }
14268
14178
  },
14269
14179
 
14270
- fromJSON(object: any): BurnMapNode {
14180
+ fromJSON(object: any): BurnMapFile {
14271
14181
  return {
14182
+ repoId: isSet(object.repoId)
14183
+ ? globalThis.String(object.repoId)
14184
+ : isSet(object.repo_id)
14185
+ ? globalThis.String(object.repo_id)
14186
+ : "",
14272
14187
  repositoryKey: isSet(object.repositoryKey)
14273
14188
  ? globalThis.String(object.repositoryKey)
14274
14189
  : isSet(object.repository_key)
14275
14190
  ? globalThis.String(object.repository_key)
14276
14191
  : "",
14277
- directory: isSet(object.directory) ? globalThis.String(object.directory) : "",
14278
- files: isSet(object.files) ? globalThis.Number(object.files) : 0,
14279
- landedFiles: isSet(object.landedFiles)
14280
- ? globalThis.Number(object.landedFiles)
14281
- : isSet(object.landed_files)
14282
- ? globalThis.Number(object.landed_files)
14283
- : 0,
14284
- discardedFiles: isSet(object.discardedFiles)
14285
- ? globalThis.Number(object.discardedFiles)
14286
- : isSet(object.discarded_files)
14287
- ? globalThis.Number(object.discarded_files)
14288
- : 0,
14192
+ ref: isSet(object.ref) ? globalThis.String(object.ref) : "",
14193
+ path: isSet(object.path) ? globalThis.String(object.path) : "",
14194
+ state: isSet(object.state) ? globalThis.String(object.state) : "",
14289
14195
  edits: isSet(object.edits) ? globalThis.Number(object.edits) : 0,
14290
14196
  distinctSessions: isSet(object.distinctSessions)
14291
14197
  ? globalThis.Number(object.distinctSessions)
@@ -14315,22 +14221,22 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14315
14221
  };
14316
14222
  },
14317
14223
 
14318
- toJSON(message: BurnMapNode): unknown {
14224
+ toJSON(message: BurnMapFile): unknown {
14319
14225
  const obj: any = {};
14226
+ if (message.repoId !== "") {
14227
+ obj.repoId = message.repoId;
14228
+ }
14320
14229
  if (message.repositoryKey !== "") {
14321
14230
  obj.repositoryKey = message.repositoryKey;
14322
14231
  }
14323
- if (message.directory !== "") {
14324
- obj.directory = message.directory;
14325
- }
14326
- if (message.files !== 0) {
14327
- obj.files = Math.round(message.files);
14232
+ if (message.ref !== "") {
14233
+ obj.ref = message.ref;
14328
14234
  }
14329
- if (message.landedFiles !== 0) {
14330
- obj.landedFiles = Math.round(message.landedFiles);
14235
+ if (message.path !== "") {
14236
+ obj.path = message.path;
14331
14237
  }
14332
- if (message.discardedFiles !== 0) {
14333
- obj.discardedFiles = Math.round(message.discardedFiles);
14238
+ if (message.state !== "") {
14239
+ obj.state = message.state;
14334
14240
  }
14335
14241
  if (message.edits !== 0) {
14336
14242
  obj.edits = Math.round(message.edits);
@@ -14353,16 +14259,16 @@ export const BurnMapNode: MessageFns<BurnMapNode> = {
14353
14259
  return obj;
14354
14260
  },
14355
14261
 
14356
- create<I extends Exact<DeepPartial<BurnMapNode>, I>>(base?: I): BurnMapNode {
14357
- return BurnMapNode.fromPartial(base ?? ({} as any));
14262
+ create<I extends Exact<DeepPartial<BurnMapFile>, I>>(base?: I): BurnMapFile {
14263
+ return BurnMapFile.fromPartial(base ?? ({} as any));
14358
14264
  },
14359
- fromPartial<I extends Exact<DeepPartial<BurnMapNode>, I>>(object: I): BurnMapNode {
14360
- const message = createBaseBurnMapNode();
14265
+ fromPartial<I extends Exact<DeepPartial<BurnMapFile>, I>>(object: I): BurnMapFile {
14266
+ const message = createBaseBurnMapFile();
14267
+ message.repoId = object.repoId ?? "";
14361
14268
  message.repositoryKey = object.repositoryKey ?? "";
14362
- message.directory = object.directory ?? "";
14363
- message.files = object.files ?? 0;
14364
- message.landedFiles = object.landedFiles ?? 0;
14365
- message.discardedFiles = object.discardedFiles ?? 0;
14269
+ message.ref = object.ref ?? "";
14270
+ message.path = object.path ?? "";
14271
+ message.state = object.state ?? "";
14366
14272
  message.edits = object.edits ?? 0;
14367
14273
  message.distinctSessions = object.distinctSessions ?? 0;
14368
14274
  message.unlandedCostUsd = object.unlandedCostUsd ?? 0;
@@ -17110,10 +17016,11 @@ export interface AIGatewayService {
17110
17016
  */
17111
17017
  StreamFilesSummary(request: FilesSummaryRequest, metadata?: Metadata): Observable<FilesSummary>;
17112
17018
  /**
17113
- * GetBurnMap returns the burn-map treemap pre-aggregated by (repository, directory) so the client no
17114
- * longer pulls every file row to group in the browser. Squarify geometry stays client-side.
17019
+ * GetBurnMap streams the burn-map treemap's per-file tiles so the client no longer pages every file row to
17020
+ * build them. Hottest by unlanded cost first; server-streaming so a large project never exceeds the message
17021
+ * size limit. Squarify geometry stays client-side.
17115
17022
  */
17116
- GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Promise<BurnMapResponse>;
17023
+ GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Observable<BurnMapFile>;
17117
17024
  /** Latest observed list price per (source, provider, model) from the global catalog. */
17118
17025
  ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse>;
17119
17026
  /**
@@ -17290,10 +17197,10 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
17290
17197
  return result.pipe(map((data) => FilesSummary.decode(new BinaryReader(data))));
17291
17198
  }
17292
17199
 
17293
- GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Promise<BurnMapResponse> {
17200
+ GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Observable<BurnMapFile> {
17294
17201
  const data = BurnMapRequest.encode(request).finish();
17295
- const promise = this.rpc.request(this.service, "GetBurnMap", data, metadata);
17296
- return promise.then((data) => BurnMapResponse.decode(new BinaryReader(data)));
17202
+ const result = this.rpc.serverStreamingRequest(this.service, "GetBurnMap", data, metadata);
17203
+ return result.pipe(map((data) => BurnMapFile.decode(new BinaryReader(data))));
17297
17204
  }
17298
17205
 
17299
17206
  ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse> {
@@ -52,26 +52,26 @@ function deserialize_gateway_web_v1_ActivityRhythmRequest(buffer_arg) {
52
52
  return proto_gateway_web_v1_ai_gateway_pb.ActivityRhythmRequest.deserializeBinary(new Uint8Array(buffer_arg));
53
53
  }
54
54
 
55
- function serialize_gateway_web_v1_BurnMapRequest(arg) {
56
- if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.BurnMapRequest)) {
57
- throw new Error('Expected argument of type gateway.web.v1.BurnMapRequest');
55
+ function serialize_gateway_web_v1_BurnMapFile(arg) {
56
+ if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.BurnMapFile)) {
57
+ throw new Error('Expected argument of type gateway.web.v1.BurnMapFile');
58
58
  }
59
59
  return Buffer.from(arg.serializeBinary());
60
60
  }
61
61
 
62
- function deserialize_gateway_web_v1_BurnMapRequest(buffer_arg) {
63
- return proto_gateway_web_v1_ai_gateway_pb.BurnMapRequest.deserializeBinary(new Uint8Array(buffer_arg));
62
+ function deserialize_gateway_web_v1_BurnMapFile(buffer_arg) {
63
+ return proto_gateway_web_v1_ai_gateway_pb.BurnMapFile.deserializeBinary(new Uint8Array(buffer_arg));
64
64
  }
65
65
 
66
- function serialize_gateway_web_v1_BurnMapResponse(arg) {
67
- if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.BurnMapResponse)) {
68
- throw new Error('Expected argument of type gateway.web.v1.BurnMapResponse');
66
+ function serialize_gateway_web_v1_BurnMapRequest(arg) {
67
+ if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.BurnMapRequest)) {
68
+ throw new Error('Expected argument of type gateway.web.v1.BurnMapRequest');
69
69
  }
70
70
  return Buffer.from(arg.serializeBinary());
71
71
  }
72
72
 
73
- function deserialize_gateway_web_v1_BurnMapResponse(buffer_arg) {
74
- return proto_gateway_web_v1_ai_gateway_pb.BurnMapResponse.deserializeBinary(new Uint8Array(buffer_arg));
73
+ function deserialize_gateway_web_v1_BurnMapRequest(buffer_arg) {
74
+ return proto_gateway_web_v1_ai_gateway_pb.BurnMapRequest.deserializeBinary(new Uint8Array(buffer_arg));
75
75
  }
76
76
 
77
77
  function serialize_gateway_web_v1_BurnRate(arg) {
@@ -778,18 +778,19 @@ streamFilesSummary: {
778
778
  responseSerialize: serialize_gateway_web_v1_FilesSummary,
779
779
  responseDeserialize: deserialize_gateway_web_v1_FilesSummary,
780
780
  },
781
- // GetBurnMap returns the burn-map treemap pre-aggregated by (repository, directory) so the client no
782
- // longer pulls every file row to group in the browser. Squarify geometry stays client-side.
781
+ // GetBurnMap streams the burn-map treemap's per-file tiles so the client no longer pages every file row to
782
+ // build them. Hottest by unlanded cost first; server-streaming so a large project never exceeds the message
783
+ // size limit. Squarify geometry stays client-side.
783
784
  getBurnMap: {
784
785
  path: '/gateway.web.v1.AIGatewayService/GetBurnMap',
785
786
  requestStream: false,
786
- responseStream: false,
787
+ responseStream: true,
787
788
  requestType: proto_gateway_web_v1_ai_gateway_pb.BurnMapRequest,
788
- responseType: proto_gateway_web_v1_ai_gateway_pb.BurnMapResponse,
789
+ responseType: proto_gateway_web_v1_ai_gateway_pb.BurnMapFile,
789
790
  requestSerialize: serialize_gateway_web_v1_BurnMapRequest,
790
791
  requestDeserialize: deserialize_gateway_web_v1_BurnMapRequest,
791
- responseSerialize: serialize_gateway_web_v1_BurnMapResponse,
792
- responseDeserialize: deserialize_gateway_web_v1_BurnMapResponse,
792
+ responseSerialize: serialize_gateway_web_v1_BurnMapFile,
793
+ responseDeserialize: deserialize_gateway_web_v1_BurnMapFile,
793
794
  },
794
795
  // Latest observed list price per (source, provider, model) from the global catalog.
795
796
  listModelPrices: {