@miradorlabs/web-grpc 2.66.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.
@@ -1330,6 +1330,17 @@ export interface BurnRate {
1330
1330
  currentGroups: BurnRateGroup[];
1331
1331
  sparkline: BurnRateSparkPoint[];
1332
1332
  groupBy: AITokenActivityDimension;
1333
+ /**
1334
+ * Every dimension's current-rate breakdown in one frame (model / provider / source_system / user /
1335
+ * api_key), computed from one scan — the burn card reads "by model" and "by user" from a single stream.
1336
+ */
1337
+ breakdowns: BurnRateBreakdown[];
1338
+ }
1339
+
1340
+ /** BurnRateBreakdown is one dimension's current-rate groups. */
1341
+ export interface BurnRateBreakdown {
1342
+ dimension: AITokenActivityDimension;
1343
+ groups: BurnRateGroup[];
1333
1344
  }
1334
1345
 
1335
1346
  export interface BurnRateGroup {
@@ -1496,7 +1507,11 @@ export interface ProjectOverviewTotals {
1496
1507
  commits: number;
1497
1508
  pushes: number;
1498
1509
  filesTouched: number;
1499
- lastActivityAt: Date | undefined;
1510
+ lastActivityAt:
1511
+ | Date
1512
+ | undefined;
1513
+ /** subscription-facility slice of cost_usd, so the dashboard renders net = cost_usd − subscription_cost_usd. */
1514
+ subscriptionCostUsd: number;
1500
1515
  }
1501
1516
 
1502
1517
  export interface ProjectOverviewSlice {
@@ -1505,6 +1520,7 @@ export interface ProjectOverviewSlice {
1505
1520
  inputTokens: number;
1506
1521
  outputTokens: number;
1507
1522
  costUsd: number;
1523
+ subscriptionCostUsd: number;
1508
1524
  }
1509
1525
 
1510
1526
  export interface ProjectSessionRef {
@@ -1597,6 +1613,31 @@ export interface AIFileRow {
1597
1613
  subscriptionUnlandedCostUsd: number;
1598
1614
  }
1599
1615
 
1616
+ export interface BurnMapRequest {
1617
+ organizationId: string;
1618
+ projectId: string;
1619
+ }
1620
+
1621
+ /**
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.
1626
+ */
1627
+ export interface BurnMapFile {
1628
+ repoId: string;
1629
+ repositoryKey: string;
1630
+ ref: string;
1631
+ path: string;
1632
+ state: string;
1633
+ edits: number;
1634
+ distinctSessions: number;
1635
+ unlandedCostUsd: number;
1636
+ subscriptionUnlandedCostUsd: number;
1637
+ totalCostUsd: number;
1638
+ subscriptionTotalCostUsd: number;
1639
+ }
1640
+
1600
1641
  export interface FilesSummaryRequest {
1601
1642
  organizationId: string;
1602
1643
  projectId: string;
@@ -9326,7 +9367,7 @@ export const BurnRateRequest: MessageFns<BurnRateRequest> = {
9326
9367
  };
9327
9368
 
9328
9369
  function createBaseBurnRate(): BurnRate {
9329
- return { asOf: undefined, current: undefined, currentGroups: [], sparkline: [], groupBy: 0 };
9370
+ return { asOf: undefined, current: undefined, currentGroups: [], sparkline: [], groupBy: 0, breakdowns: [] };
9330
9371
  }
9331
9372
 
9332
9373
  export const BurnRate: MessageFns<BurnRate> = {
@@ -9346,6 +9387,9 @@ export const BurnRate: MessageFns<BurnRate> = {
9346
9387
  if (message.groupBy !== 0) {
9347
9388
  writer.uint32(40).int32(message.groupBy);
9348
9389
  }
9390
+ for (const v of message.breakdowns) {
9391
+ BurnRateBreakdown.encode(v!, writer.uint32(50).fork()).join();
9392
+ }
9349
9393
  return writer;
9350
9394
  },
9351
9395
 
@@ -9402,6 +9446,14 @@ export const BurnRate: MessageFns<BurnRate> = {
9402
9446
  message.groupBy = reader.int32() as any;
9403
9447
  continue;
9404
9448
  }
9449
+ case 6: {
9450
+ if (tag !== 50) {
9451
+ break;
9452
+ }
9453
+
9454
+ message.breakdowns.push(BurnRateBreakdown.decode(reader, reader.uint32()));
9455
+ continue;
9456
+ }
9405
9457
  }
9406
9458
  if ((tag & 7) === 4 || tag === 0) {
9407
9459
  break;
@@ -9435,6 +9487,9 @@ export const BurnRate: MessageFns<BurnRate> = {
9435
9487
  : isSet(object.group_by)
9436
9488
  ? aITokenActivityDimensionFromJSON(object.group_by)
9437
9489
  : 0,
9490
+ breakdowns: globalThis.Array.isArray(object?.breakdowns)
9491
+ ? object.breakdowns.map((e: any) => BurnRateBreakdown.fromJSON(e))
9492
+ : [],
9438
9493
  };
9439
9494
  },
9440
9495
 
@@ -9455,6 +9510,9 @@ export const BurnRate: MessageFns<BurnRate> = {
9455
9510
  if (message.groupBy !== 0) {
9456
9511
  obj.groupBy = aITokenActivityDimensionToJSON(message.groupBy);
9457
9512
  }
9513
+ if (message.breakdowns?.length) {
9514
+ obj.breakdowns = message.breakdowns.map((e) => BurnRateBreakdown.toJSON(e));
9515
+ }
9458
9516
  return obj;
9459
9517
  },
9460
9518
 
@@ -9470,6 +9528,92 @@ export const BurnRate: MessageFns<BurnRate> = {
9470
9528
  message.currentGroups = object.currentGroups?.map((e) => BurnRateGroup.fromPartial(e)) || [];
9471
9529
  message.sparkline = object.sparkline?.map((e) => BurnRateSparkPoint.fromPartial(e)) || [];
9472
9530
  message.groupBy = object.groupBy ?? 0;
9531
+ message.breakdowns = object.breakdowns?.map((e) => BurnRateBreakdown.fromPartial(e)) || [];
9532
+ return message;
9533
+ },
9534
+ };
9535
+
9536
+ function createBaseBurnRateBreakdown(): BurnRateBreakdown {
9537
+ return { dimension: 0, groups: [] };
9538
+ }
9539
+
9540
+ export const BurnRateBreakdown: MessageFns<BurnRateBreakdown> = {
9541
+ encode(message: BurnRateBreakdown, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9542
+ if (message.dimension !== 0) {
9543
+ writer.uint32(8).int32(message.dimension);
9544
+ }
9545
+ for (const v of message.groups) {
9546
+ BurnRateGroup.encode(v!, writer.uint32(18).fork()).join();
9547
+ }
9548
+ return writer;
9549
+ },
9550
+
9551
+ decode(input: BinaryReader | Uint8Array, length?: number): BurnRateBreakdown {
9552
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9553
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9554
+ if (previousRecursionDepth >= 100) {
9555
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9556
+ }
9557
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9558
+ try {
9559
+ const end = length === undefined ? reader.len : reader.pos + length;
9560
+ const message = createBaseBurnRateBreakdown();
9561
+ while (reader.pos < end) {
9562
+ const tag = reader.uint32();
9563
+ switch (tag >>> 3) {
9564
+ case 1: {
9565
+ if (tag !== 8) {
9566
+ break;
9567
+ }
9568
+
9569
+ message.dimension = reader.int32() as any;
9570
+ continue;
9571
+ }
9572
+ case 2: {
9573
+ if (tag !== 18) {
9574
+ break;
9575
+ }
9576
+
9577
+ message.groups.push(BurnRateGroup.decode(reader, reader.uint32()));
9578
+ continue;
9579
+ }
9580
+ }
9581
+ if ((tag & 7) === 4 || tag === 0) {
9582
+ break;
9583
+ }
9584
+ reader.skip(tag & 7);
9585
+ }
9586
+ return message;
9587
+ } finally {
9588
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9589
+ }
9590
+ },
9591
+
9592
+ fromJSON(object: any): BurnRateBreakdown {
9593
+ return {
9594
+ dimension: isSet(object.dimension) ? aITokenActivityDimensionFromJSON(object.dimension) : 0,
9595
+ groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => BurnRateGroup.fromJSON(e)) : [],
9596
+ };
9597
+ },
9598
+
9599
+ toJSON(message: BurnRateBreakdown): unknown {
9600
+ const obj: any = {};
9601
+ if (message.dimension !== 0) {
9602
+ obj.dimension = aITokenActivityDimensionToJSON(message.dimension);
9603
+ }
9604
+ if (message.groups?.length) {
9605
+ obj.groups = message.groups.map((e) => BurnRateGroup.toJSON(e));
9606
+ }
9607
+ return obj;
9608
+ },
9609
+
9610
+ create<I extends Exact<DeepPartial<BurnRateBreakdown>, I>>(base?: I): BurnRateBreakdown {
9611
+ return BurnRateBreakdown.fromPartial(base ?? ({} as any));
9612
+ },
9613
+ fromPartial<I extends Exact<DeepPartial<BurnRateBreakdown>, I>>(object: I): BurnRateBreakdown {
9614
+ const message = createBaseBurnRateBreakdown();
9615
+ message.dimension = object.dimension ?? 0;
9616
+ message.groups = object.groups?.map((e) => BurnRateGroup.fromPartial(e)) || [];
9473
9617
  return message;
9474
9618
  },
9475
9619
  };
@@ -11633,6 +11777,7 @@ function createBaseProjectOverviewTotals(): ProjectOverviewTotals {
11633
11777
  pushes: 0,
11634
11778
  filesTouched: 0,
11635
11779
  lastActivityAt: undefined,
11780
+ subscriptionCostUsd: 0,
11636
11781
  };
11637
11782
  }
11638
11783
 
@@ -11680,6 +11825,9 @@ export const ProjectOverviewTotals: MessageFns<ProjectOverviewTotals> = {
11680
11825
  if (message.lastActivityAt !== undefined) {
11681
11826
  Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(114).fork()).join();
11682
11827
  }
11828
+ if (message.subscriptionCostUsd !== 0) {
11829
+ writer.uint32(121).double(message.subscriptionCostUsd);
11830
+ }
11683
11831
  return writer;
11684
11832
  },
11685
11833
 
@@ -11808,6 +11956,14 @@ export const ProjectOverviewTotals: MessageFns<ProjectOverviewTotals> = {
11808
11956
  message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
11809
11957
  continue;
11810
11958
  }
11959
+ case 15: {
11960
+ if (tag !== 121) {
11961
+ break;
11962
+ }
11963
+
11964
+ message.subscriptionCostUsd = reader.double();
11965
+ continue;
11966
+ }
11811
11967
  }
11812
11968
  if ((tag & 7) === 4 || tag === 0) {
11813
11969
  break;
@@ -11880,6 +12036,11 @@ export const ProjectOverviewTotals: MessageFns<ProjectOverviewTotals> = {
11880
12036
  : isSet(object.last_activity_at)
11881
12037
  ? fromJsonTimestamp(object.last_activity_at)
11882
12038
  : undefined,
12039
+ subscriptionCostUsd: isSet(object.subscriptionCostUsd)
12040
+ ? globalThis.Number(object.subscriptionCostUsd)
12041
+ : isSet(object.subscription_cost_usd)
12042
+ ? globalThis.Number(object.subscription_cost_usd)
12043
+ : 0,
11883
12044
  };
11884
12045
  },
11885
12046
 
@@ -11927,6 +12088,9 @@ export const ProjectOverviewTotals: MessageFns<ProjectOverviewTotals> = {
11927
12088
  if (message.lastActivityAt !== undefined) {
11928
12089
  obj.lastActivityAt = message.lastActivityAt.toISOString();
11929
12090
  }
12091
+ if (message.subscriptionCostUsd !== 0) {
12092
+ obj.subscriptionCostUsd = message.subscriptionCostUsd;
12093
+ }
11930
12094
  return obj;
11931
12095
  },
11932
12096
 
@@ -11949,12 +12113,13 @@ export const ProjectOverviewTotals: MessageFns<ProjectOverviewTotals> = {
11949
12113
  message.pushes = object.pushes ?? 0;
11950
12114
  message.filesTouched = object.filesTouched ?? 0;
11951
12115
  message.lastActivityAt = object.lastActivityAt ?? undefined;
12116
+ message.subscriptionCostUsd = object.subscriptionCostUsd ?? 0;
11952
12117
  return message;
11953
12118
  },
11954
12119
  };
11955
12120
 
11956
12121
  function createBaseProjectOverviewSlice(): ProjectOverviewSlice {
11957
- return { key: "", modelCalls: 0, inputTokens: 0, outputTokens: 0, costUsd: 0 };
12122
+ return { key: "", modelCalls: 0, inputTokens: 0, outputTokens: 0, costUsd: 0, subscriptionCostUsd: 0 };
11958
12123
  }
11959
12124
 
11960
12125
  export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
@@ -11974,6 +12139,9 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
11974
12139
  if (message.costUsd !== 0) {
11975
12140
  writer.uint32(41).double(message.costUsd);
11976
12141
  }
12142
+ if (message.subscriptionCostUsd !== 0) {
12143
+ writer.uint32(49).double(message.subscriptionCostUsd);
12144
+ }
11977
12145
  return writer;
11978
12146
  },
11979
12147
 
@@ -12030,6 +12198,14 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
12030
12198
  message.costUsd = reader.double();
12031
12199
  continue;
12032
12200
  }
12201
+ case 6: {
12202
+ if (tag !== 49) {
12203
+ break;
12204
+ }
12205
+
12206
+ message.subscriptionCostUsd = reader.double();
12207
+ continue;
12208
+ }
12033
12209
  }
12034
12210
  if ((tag & 7) === 4 || tag === 0) {
12035
12211
  break;
@@ -12065,6 +12241,11 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
12065
12241
  : isSet(object.cost_usd)
12066
12242
  ? globalThis.Number(object.cost_usd)
12067
12243
  : 0,
12244
+ subscriptionCostUsd: isSet(object.subscriptionCostUsd)
12245
+ ? globalThis.Number(object.subscriptionCostUsd)
12246
+ : isSet(object.subscription_cost_usd)
12247
+ ? globalThis.Number(object.subscription_cost_usd)
12248
+ : 0,
12068
12249
  };
12069
12250
  },
12070
12251
 
@@ -12085,6 +12266,9 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
12085
12266
  if (message.costUsd !== 0) {
12086
12267
  obj.costUsd = message.costUsd;
12087
12268
  }
12269
+ if (message.subscriptionCostUsd !== 0) {
12270
+ obj.subscriptionCostUsd = message.subscriptionCostUsd;
12271
+ }
12088
12272
  return obj;
12089
12273
  },
12090
12274
 
@@ -12098,6 +12282,7 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
12098
12282
  message.inputTokens = object.inputTokens ?? 0;
12099
12283
  message.outputTokens = object.outputTokens ?? 0;
12100
12284
  message.costUsd = object.costUsd ?? 0;
12285
+ message.subscriptionCostUsd = object.subscriptionCostUsd ?? 0;
12101
12286
  return message;
12102
12287
  },
12103
12288
  };
@@ -13732,6 +13917,368 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13732
13917
  },
13733
13918
  };
13734
13919
 
13920
+ function createBaseBurnMapRequest(): BurnMapRequest {
13921
+ return { organizationId: "", projectId: "" };
13922
+ }
13923
+
13924
+ export const BurnMapRequest: MessageFns<BurnMapRequest> = {
13925
+ encode(message: BurnMapRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
13926
+ if (message.organizationId !== "") {
13927
+ writer.uint32(10).string(message.organizationId);
13928
+ }
13929
+ if (message.projectId !== "") {
13930
+ writer.uint32(18).string(message.projectId);
13931
+ }
13932
+ return writer;
13933
+ },
13934
+
13935
+ decode(input: BinaryReader | Uint8Array, length?: number): BurnMapRequest {
13936
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
13937
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
13938
+ if (previousRecursionDepth >= 100) {
13939
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
13940
+ }
13941
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
13942
+ try {
13943
+ const end = length === undefined ? reader.len : reader.pos + length;
13944
+ const message = createBaseBurnMapRequest();
13945
+ while (reader.pos < end) {
13946
+ const tag = reader.uint32();
13947
+ switch (tag >>> 3) {
13948
+ case 1: {
13949
+ if (tag !== 10) {
13950
+ break;
13951
+ }
13952
+
13953
+ message.organizationId = reader.string();
13954
+ continue;
13955
+ }
13956
+ case 2: {
13957
+ if (tag !== 18) {
13958
+ break;
13959
+ }
13960
+
13961
+ message.projectId = reader.string();
13962
+ continue;
13963
+ }
13964
+ }
13965
+ if ((tag & 7) === 4 || tag === 0) {
13966
+ break;
13967
+ }
13968
+ reader.skip(tag & 7);
13969
+ }
13970
+ return message;
13971
+ } finally {
13972
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
13973
+ }
13974
+ },
13975
+
13976
+ fromJSON(object: any): BurnMapRequest {
13977
+ return {
13978
+ organizationId: isSet(object.organizationId)
13979
+ ? globalThis.String(object.organizationId)
13980
+ : isSet(object.organization_id)
13981
+ ? globalThis.String(object.organization_id)
13982
+ : "",
13983
+ projectId: isSet(object.projectId)
13984
+ ? globalThis.String(object.projectId)
13985
+ : isSet(object.project_id)
13986
+ ? globalThis.String(object.project_id)
13987
+ : "",
13988
+ };
13989
+ },
13990
+
13991
+ toJSON(message: BurnMapRequest): unknown {
13992
+ const obj: any = {};
13993
+ if (message.organizationId !== "") {
13994
+ obj.organizationId = message.organizationId;
13995
+ }
13996
+ if (message.projectId !== "") {
13997
+ obj.projectId = message.projectId;
13998
+ }
13999
+ return obj;
14000
+ },
14001
+
14002
+ create<I extends Exact<DeepPartial<BurnMapRequest>, I>>(base?: I): BurnMapRequest {
14003
+ return BurnMapRequest.fromPartial(base ?? ({} as any));
14004
+ },
14005
+ fromPartial<I extends Exact<DeepPartial<BurnMapRequest>, I>>(object: I): BurnMapRequest {
14006
+ const message = createBaseBurnMapRequest();
14007
+ message.organizationId = object.organizationId ?? "";
14008
+ message.projectId = object.projectId ?? "";
14009
+ return message;
14010
+ },
14011
+ };
14012
+
14013
+ function createBaseBurnMapFile(): BurnMapFile {
14014
+ return {
14015
+ repoId: "",
14016
+ repositoryKey: "",
14017
+ ref: "",
14018
+ path: "",
14019
+ state: "",
14020
+ edits: 0,
14021
+ distinctSessions: 0,
14022
+ unlandedCostUsd: 0,
14023
+ subscriptionUnlandedCostUsd: 0,
14024
+ totalCostUsd: 0,
14025
+ subscriptionTotalCostUsd: 0,
14026
+ };
14027
+ }
14028
+
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);
14033
+ }
14034
+ if (message.repositoryKey !== "") {
14035
+ writer.uint32(18).string(message.repositoryKey);
14036
+ }
14037
+ if (message.ref !== "") {
14038
+ writer.uint32(26).string(message.ref);
14039
+ }
14040
+ if (message.path !== "") {
14041
+ writer.uint32(34).string(message.path);
14042
+ }
14043
+ if (message.state !== "") {
14044
+ writer.uint32(42).string(message.state);
14045
+ }
14046
+ if (message.edits !== 0) {
14047
+ writer.uint32(48).uint64(message.edits);
14048
+ }
14049
+ if (message.distinctSessions !== 0) {
14050
+ writer.uint32(56).uint64(message.distinctSessions);
14051
+ }
14052
+ if (message.unlandedCostUsd !== 0) {
14053
+ writer.uint32(65).double(message.unlandedCostUsd);
14054
+ }
14055
+ if (message.subscriptionUnlandedCostUsd !== 0) {
14056
+ writer.uint32(73).double(message.subscriptionUnlandedCostUsd);
14057
+ }
14058
+ if (message.totalCostUsd !== 0) {
14059
+ writer.uint32(81).double(message.totalCostUsd);
14060
+ }
14061
+ if (message.subscriptionTotalCostUsd !== 0) {
14062
+ writer.uint32(89).double(message.subscriptionTotalCostUsd);
14063
+ }
14064
+ return writer;
14065
+ },
14066
+
14067
+ decode(input: BinaryReader | Uint8Array, length?: number): BurnMapFile {
14068
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
14069
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
14070
+ if (previousRecursionDepth >= 100) {
14071
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
14072
+ }
14073
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
14074
+ try {
14075
+ const end = length === undefined ? reader.len : reader.pos + length;
14076
+ const message = createBaseBurnMapFile();
14077
+ while (reader.pos < end) {
14078
+ const tag = reader.uint32();
14079
+ switch (tag >>> 3) {
14080
+ case 1: {
14081
+ if (tag !== 10) {
14082
+ break;
14083
+ }
14084
+
14085
+ message.repoId = reader.string();
14086
+ continue;
14087
+ }
14088
+ case 2: {
14089
+ if (tag !== 18) {
14090
+ break;
14091
+ }
14092
+
14093
+ message.repositoryKey = reader.string();
14094
+ continue;
14095
+ }
14096
+ case 3: {
14097
+ if (tag !== 26) {
14098
+ break;
14099
+ }
14100
+
14101
+ message.ref = reader.string();
14102
+ continue;
14103
+ }
14104
+ case 4: {
14105
+ if (tag !== 34) {
14106
+ break;
14107
+ }
14108
+
14109
+ message.path = reader.string();
14110
+ continue;
14111
+ }
14112
+ case 5: {
14113
+ if (tag !== 42) {
14114
+ break;
14115
+ }
14116
+
14117
+ message.state = reader.string();
14118
+ continue;
14119
+ }
14120
+ case 6: {
14121
+ if (tag !== 48) {
14122
+ break;
14123
+ }
14124
+
14125
+ message.edits = longToNumber(reader.uint64());
14126
+ continue;
14127
+ }
14128
+ case 7: {
14129
+ if (tag !== 56) {
14130
+ break;
14131
+ }
14132
+
14133
+ message.distinctSessions = longToNumber(reader.uint64());
14134
+ continue;
14135
+ }
14136
+ case 8: {
14137
+ if (tag !== 65) {
14138
+ break;
14139
+ }
14140
+
14141
+ message.unlandedCostUsd = reader.double();
14142
+ continue;
14143
+ }
14144
+ case 9: {
14145
+ if (tag !== 73) {
14146
+ break;
14147
+ }
14148
+
14149
+ message.subscriptionUnlandedCostUsd = reader.double();
14150
+ continue;
14151
+ }
14152
+ case 10: {
14153
+ if (tag !== 81) {
14154
+ break;
14155
+ }
14156
+
14157
+ message.totalCostUsd = reader.double();
14158
+ continue;
14159
+ }
14160
+ case 11: {
14161
+ if (tag !== 89) {
14162
+ break;
14163
+ }
14164
+
14165
+ message.subscriptionTotalCostUsd = reader.double();
14166
+ continue;
14167
+ }
14168
+ }
14169
+ if ((tag & 7) === 4 || tag === 0) {
14170
+ break;
14171
+ }
14172
+ reader.skip(tag & 7);
14173
+ }
14174
+ return message;
14175
+ } finally {
14176
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
14177
+ }
14178
+ },
14179
+
14180
+ fromJSON(object: any): BurnMapFile {
14181
+ return {
14182
+ repoId: isSet(object.repoId)
14183
+ ? globalThis.String(object.repoId)
14184
+ : isSet(object.repo_id)
14185
+ ? globalThis.String(object.repo_id)
14186
+ : "",
14187
+ repositoryKey: isSet(object.repositoryKey)
14188
+ ? globalThis.String(object.repositoryKey)
14189
+ : isSet(object.repository_key)
14190
+ ? globalThis.String(object.repository_key)
14191
+ : "",
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) : "",
14195
+ edits: isSet(object.edits) ? globalThis.Number(object.edits) : 0,
14196
+ distinctSessions: isSet(object.distinctSessions)
14197
+ ? globalThis.Number(object.distinctSessions)
14198
+ : isSet(object.distinct_sessions)
14199
+ ? globalThis.Number(object.distinct_sessions)
14200
+ : 0,
14201
+ unlandedCostUsd: isSet(object.unlandedCostUsd)
14202
+ ? globalThis.Number(object.unlandedCostUsd)
14203
+ : isSet(object.unlanded_cost_usd)
14204
+ ? globalThis.Number(object.unlanded_cost_usd)
14205
+ : 0,
14206
+ subscriptionUnlandedCostUsd: isSet(object.subscriptionUnlandedCostUsd)
14207
+ ? globalThis.Number(object.subscriptionUnlandedCostUsd)
14208
+ : isSet(object.subscription_unlanded_cost_usd)
14209
+ ? globalThis.Number(object.subscription_unlanded_cost_usd)
14210
+ : 0,
14211
+ totalCostUsd: isSet(object.totalCostUsd)
14212
+ ? globalThis.Number(object.totalCostUsd)
14213
+ : isSet(object.total_cost_usd)
14214
+ ? globalThis.Number(object.total_cost_usd)
14215
+ : 0,
14216
+ subscriptionTotalCostUsd: isSet(object.subscriptionTotalCostUsd)
14217
+ ? globalThis.Number(object.subscriptionTotalCostUsd)
14218
+ : isSet(object.subscription_total_cost_usd)
14219
+ ? globalThis.Number(object.subscription_total_cost_usd)
14220
+ : 0,
14221
+ };
14222
+ },
14223
+
14224
+ toJSON(message: BurnMapFile): unknown {
14225
+ const obj: any = {};
14226
+ if (message.repoId !== "") {
14227
+ obj.repoId = message.repoId;
14228
+ }
14229
+ if (message.repositoryKey !== "") {
14230
+ obj.repositoryKey = message.repositoryKey;
14231
+ }
14232
+ if (message.ref !== "") {
14233
+ obj.ref = message.ref;
14234
+ }
14235
+ if (message.path !== "") {
14236
+ obj.path = message.path;
14237
+ }
14238
+ if (message.state !== "") {
14239
+ obj.state = message.state;
14240
+ }
14241
+ if (message.edits !== 0) {
14242
+ obj.edits = Math.round(message.edits);
14243
+ }
14244
+ if (message.distinctSessions !== 0) {
14245
+ obj.distinctSessions = Math.round(message.distinctSessions);
14246
+ }
14247
+ if (message.unlandedCostUsd !== 0) {
14248
+ obj.unlandedCostUsd = message.unlandedCostUsd;
14249
+ }
14250
+ if (message.subscriptionUnlandedCostUsd !== 0) {
14251
+ obj.subscriptionUnlandedCostUsd = message.subscriptionUnlandedCostUsd;
14252
+ }
14253
+ if (message.totalCostUsd !== 0) {
14254
+ obj.totalCostUsd = message.totalCostUsd;
14255
+ }
14256
+ if (message.subscriptionTotalCostUsd !== 0) {
14257
+ obj.subscriptionTotalCostUsd = message.subscriptionTotalCostUsd;
14258
+ }
14259
+ return obj;
14260
+ },
14261
+
14262
+ create<I extends Exact<DeepPartial<BurnMapFile>, I>>(base?: I): BurnMapFile {
14263
+ return BurnMapFile.fromPartial(base ?? ({} as any));
14264
+ },
14265
+ fromPartial<I extends Exact<DeepPartial<BurnMapFile>, I>>(object: I): BurnMapFile {
14266
+ const message = createBaseBurnMapFile();
14267
+ message.repoId = object.repoId ?? "";
14268
+ message.repositoryKey = object.repositoryKey ?? "";
14269
+ message.ref = object.ref ?? "";
14270
+ message.path = object.path ?? "";
14271
+ message.state = object.state ?? "";
14272
+ message.edits = object.edits ?? 0;
14273
+ message.distinctSessions = object.distinctSessions ?? 0;
14274
+ message.unlandedCostUsd = object.unlandedCostUsd ?? 0;
14275
+ message.subscriptionUnlandedCostUsd = object.subscriptionUnlandedCostUsd ?? 0;
14276
+ message.totalCostUsd = object.totalCostUsd ?? 0;
14277
+ message.subscriptionTotalCostUsd = object.subscriptionTotalCostUsd ?? 0;
14278
+ return message;
14279
+ },
14280
+ };
14281
+
13735
14282
  function createBaseFilesSummaryRequest(): FilesSummaryRequest {
13736
14283
  return { organizationId: "", projectId: "", filter: undefined, abandonedHorizon: undefined, groupBy: 0 };
13737
14284
  }
@@ -16468,6 +17015,12 @@ export interface AIGatewayService {
16468
17015
  * unverified, a complete snapshot re-derived each tick.
16469
17016
  */
16470
17017
  StreamFilesSummary(request: FilesSummaryRequest, metadata?: Metadata): Observable<FilesSummary>;
17018
+ /**
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.
17022
+ */
17023
+ GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Observable<BurnMapFile>;
16471
17024
  /** Latest observed list price per (source, provider, model) from the global catalog. */
16472
17025
  ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse>;
16473
17026
  /**
@@ -16518,6 +17071,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
16518
17071
  this.StreamProjectOverview = this.StreamProjectOverview.bind(this);
16519
17072
  this.ListFiles = this.ListFiles.bind(this);
16520
17073
  this.StreamFilesSummary = this.StreamFilesSummary.bind(this);
17074
+ this.GetBurnMap = this.GetBurnMap.bind(this);
16521
17075
  this.ListModelPrices = this.ListModelPrices.bind(this);
16522
17076
  this.ListModelPriceHistory = this.ListModelPriceHistory.bind(this);
16523
17077
  this.ListResourceRankings = this.ListResourceRankings.bind(this);
@@ -16643,6 +17197,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
16643
17197
  return result.pipe(map((data) => FilesSummary.decode(new BinaryReader(data))));
16644
17198
  }
16645
17199
 
17200
+ GetBurnMap(request: BurnMapRequest, metadata?: Metadata): Observable<BurnMapFile> {
17201
+ const data = BurnMapRequest.encode(request).finish();
17202
+ const result = this.rpc.serverStreamingRequest(this.service, "GetBurnMap", data, metadata);
17203
+ return result.pipe(map((data) => BurnMapFile.decode(new BinaryReader(data))));
17204
+ }
17205
+
16646
17206
  ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse> {
16647
17207
  const data = ListModelPricesRequest.encode(request).finish();
16648
17208
  const promise = this.rpc.request(this.service, "ListModelPrices", data, metadata);