@miradorlabs/web-grpc 2.77.0 → 3.1.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.
@@ -172,45 +172,6 @@ export function aISessionEventKindToJSON(object: AISessionEventKind): string {
172
172
  }
173
173
  }
174
174
 
175
- export enum AIPrincipalKind {
176
- AI_PRINCIPAL_KIND_UNSPECIFIED = 0,
177
- AI_PRINCIPAL_KIND_USER = 1,
178
- AI_PRINCIPAL_KIND_API_KEY = 2,
179
- UNRECOGNIZED = -1,
180
- }
181
-
182
- export function aIPrincipalKindFromJSON(object: any): AIPrincipalKind {
183
- switch (object) {
184
- case 0:
185
- case "AI_PRINCIPAL_KIND_UNSPECIFIED":
186
- return AIPrincipalKind.AI_PRINCIPAL_KIND_UNSPECIFIED;
187
- case 1:
188
- case "AI_PRINCIPAL_KIND_USER":
189
- return AIPrincipalKind.AI_PRINCIPAL_KIND_USER;
190
- case 2:
191
- case "AI_PRINCIPAL_KIND_API_KEY":
192
- return AIPrincipalKind.AI_PRINCIPAL_KIND_API_KEY;
193
- case -1:
194
- case "UNRECOGNIZED":
195
- default:
196
- return AIPrincipalKind.UNRECOGNIZED;
197
- }
198
- }
199
-
200
- export function aIPrincipalKindToJSON(object: AIPrincipalKind): string {
201
- switch (object) {
202
- case AIPrincipalKind.AI_PRINCIPAL_KIND_UNSPECIFIED:
203
- return "AI_PRINCIPAL_KIND_UNSPECIFIED";
204
- case AIPrincipalKind.AI_PRINCIPAL_KIND_USER:
205
- return "AI_PRINCIPAL_KIND_USER";
206
- case AIPrincipalKind.AI_PRINCIPAL_KIND_API_KEY:
207
- return "AI_PRINCIPAL_KIND_API_KEY";
208
- case AIPrincipalKind.UNRECOGNIZED:
209
- default:
210
- return "UNRECOGNIZED";
211
- }
212
- }
213
-
214
175
  export enum AIGitAction {
215
176
  AI_GIT_ACTION_UNSPECIFIED = 0,
216
177
  AI_GIT_ACTION_BRANCH_CREATE = 1,
@@ -389,6 +350,7 @@ export enum AITokenActivityDimension {
389
350
  AI_TOKEN_ACTIVITY_DIMENSION_SOURCE_SYSTEM = 3,
390
351
  AI_TOKEN_ACTIVITY_DIMENSION_USER = 4,
391
352
  AI_TOKEN_ACTIVITY_DIMENSION_API_KEY = 5,
353
+ AI_TOKEN_ACTIVITY_DIMENSION_EFFORT = 6,
392
354
  UNRECOGNIZED = -1,
393
355
  }
394
356
 
@@ -412,6 +374,9 @@ export function aITokenActivityDimensionFromJSON(object: any): AITokenActivityDi
412
374
  case 5:
413
375
  case "AI_TOKEN_ACTIVITY_DIMENSION_API_KEY":
414
376
  return AITokenActivityDimension.AI_TOKEN_ACTIVITY_DIMENSION_API_KEY;
377
+ case 6:
378
+ case "AI_TOKEN_ACTIVITY_DIMENSION_EFFORT":
379
+ return AITokenActivityDimension.AI_TOKEN_ACTIVITY_DIMENSION_EFFORT;
415
380
  case -1:
416
381
  case "UNRECOGNIZED":
417
382
  default:
@@ -433,6 +398,8 @@ export function aITokenActivityDimensionToJSON(object: AITokenActivityDimension)
433
398
  return "AI_TOKEN_ACTIVITY_DIMENSION_USER";
434
399
  case AITokenActivityDimension.AI_TOKEN_ACTIVITY_DIMENSION_API_KEY:
435
400
  return "AI_TOKEN_ACTIVITY_DIMENSION_API_KEY";
401
+ case AITokenActivityDimension.AI_TOKEN_ACTIVITY_DIMENSION_EFFORT:
402
+ return "AI_TOKEN_ACTIVITY_DIMENSION_EFFORT";
436
403
  case AITokenActivityDimension.UNRECOGNIZED:
437
404
  default:
438
405
  return "UNRECOGNIZED";
@@ -801,8 +768,10 @@ export interface ListSessionsRequest {
801
768
  /**
802
769
  * AISessionFilter selects conversations. Non-empty fields are ANDed; within a
803
770
  * repeated field the values are ORed (any-of). source_system matches by equality;
804
- * user_id / api_key_id / model / provider match the whole conversation's folded sets.
771
+ * user_id / api_key_id / model / provider / effort match the whole conversation's folded sets.
805
772
  * active_after selects conversations active at or after the instant (the period selector).
773
+ * model / provider / effort take stored names (expand a display name through ReferenceGatewayService);
774
+ * "" in effort matches calls that reported no effort.
806
775
  */
807
776
  export interface AISessionFilter {
808
777
  sourceSystem: string[];
@@ -811,6 +780,7 @@ export interface AISessionFilter {
811
780
  model: string[];
812
781
  provider: string[];
813
782
  activeAfter?: Date | undefined;
783
+ effort: string[];
814
784
  }
815
785
 
816
786
  export interface ListSessionsResponse {
@@ -864,6 +834,20 @@ export interface AISessionSummary {
864
834
  sessionVersion: number;
865
835
  /** Distinct subagent runs observed in the session. */
866
836
  subagents: number;
837
+ /** The efforts the session's model calls ran at; "" when a call reported none. */
838
+ efforts: string[];
839
+ /** Who billed the session's model calls (stored names; map them through ReferenceGatewayService). */
840
+ billingParties: string[];
841
+ /** How the session's model-call costs were obtained: 'reported' by the source, 'estimated' by Mirador. */
842
+ costSources: string[];
843
+ /** The seats the session's model calls drew on (an account can change mid-session). */
844
+ accountIds: string[];
845
+ /** Who reported the session: 'harness' or 'gateway'. */
846
+ observer: string;
847
+ /** The apps the session ran in ('claude-code', 'codex-exec', ...); a session can be resumed in another app. */
848
+ clients: string[];
849
+ /** The versions those apps reported, verbatim. */
850
+ clientVersions: string[];
867
851
  }
868
852
 
869
853
  export interface StreamSessionsRequest {
@@ -983,6 +967,8 @@ export interface AISessionEvent {
983
967
  isSubagent: boolean;
984
968
  /** The subagent's type, as the source names it. Display and grouping only; never identity. */
985
969
  agentName: string;
970
+ /** The reasoning effort the call reported; "" when none. */
971
+ effort: string;
986
972
  }
987
973
 
988
974
  export interface AIContentPart {
@@ -1062,8 +1048,8 @@ export interface SessionFileChange {
1062
1048
 
1063
1049
  /**
1064
1050
  * SessionModelUsage mirrors telemetry.api.v1.SessionModelUsage: one model's whole-session usage.
1065
- * usage_unavailable_count is model calls that reported no tokens; usage is nil when the model
1066
- * reported none.
1051
+ * usage_unavailable_count is model calls that reported no tokens; usage is nil when the group
1052
+ * reported neither tokens nor a cost.
1067
1053
  */
1068
1054
  export interface SessionModelUsage {
1069
1055
  model: string;
@@ -1071,6 +1057,8 @@ export interface SessionModelUsage {
1071
1057
  usage: AITokenUsage | undefined;
1072
1058
  callCount: number;
1073
1059
  usageUnavailableCount: number;
1060
+ /** One row per (model, provider, effort); "" when the calls reported no effort. */
1061
+ effort: string;
1074
1062
  }
1075
1063
 
1076
1064
  /**
@@ -1092,56 +1080,7 @@ export interface SessionTimelinePoint {
1092
1080
  | undefined;
1093
1081
  /** Funding facility observed on this event (lens, not reconciled) so the timeline can tint by facility. */
1094
1082
  fundingMode: AIFundingMode;
1095
- }
1096
-
1097
- export interface ListPrincipalsRequest {
1098
- organizationId: string;
1099
- projectId: string;
1100
- /** Structured filter (both optional, ANDed): kind and source_system, exact match. */
1101
- kind?: AIPrincipalKind | undefined;
1102
- sourceSystem: string;
1103
- pageSize: number;
1104
- pageToken: string;
1105
- }
1106
-
1107
- export interface ListPrincipalsResponse {
1108
- status: ResponseStatus | undefined;
1109
- principals: AIPrincipal[];
1110
- nextPageToken: string;
1111
- /** Exact total for the filter, computed on the first page only. */
1112
- totalCount?: number | undefined;
1113
- }
1114
-
1115
- export interface AIPrincipal {
1116
- kind: AIPrincipalKind;
1117
- id: string;
1118
- name: string;
1119
- sourceSystem: string;
1120
- alias: string;
1121
- /** Linked account user id (a seat) the frontend aggregates around; empty when unset. */
1122
- accountUserId: string;
1123
- }
1124
-
1125
- export interface UpdatePrincipalRequest {
1126
- organizationId: string;
1127
- projectId: string;
1128
- kind: AIPrincipalKind;
1129
- id: string;
1130
- sourceSystem: string;
1131
- /**
1132
- * Presence semantics: a field set (even to empty) is written, empty clears it; a field
1133
- * left absent is untouched. At least one of alias / account_user_id must be present.
1134
- */
1135
- alias?:
1136
- | string
1137
- | undefined;
1138
- /** Linked account user id (a seat). Must be a UUID when non-empty; empty clears it. */
1139
- accountUserId?: string | undefined;
1140
- }
1141
-
1142
- export interface UpdatePrincipalResponse {
1143
- status: ResponseStatus | undefined;
1144
- principal: AIPrincipal | undefined;
1083
+ effort: string;
1145
1084
  }
1146
1085
 
1147
1086
  /**
@@ -1263,7 +1202,11 @@ export interface GitActivitySummaryBucket {
1263
1202
  export interface GitActivitySummaryGroup {
1264
1203
  /** group_by value; empty when group_by is UNSPECIFIED */
1265
1204
  key: string;
1266
- measures: GitActivityMeasures | undefined;
1205
+ measures:
1206
+ | GitActivityMeasures
1207
+ | undefined;
1208
+ /** the session's source when group_by is session */
1209
+ sourceSystem: string;
1267
1210
  }
1268
1211
 
1269
1212
  export interface GitActivityMeasures {
@@ -1511,6 +1454,8 @@ export interface ProjectOverview {
1511
1454
  byProvider: ProjectOverviewSlice[];
1512
1455
  bySource: ProjectOverviewSlice[];
1513
1456
  topSessions: ProjectSessionRef[];
1457
+ /** "" key: calls that reported no effort */
1458
+ byEffort: ProjectOverviewSlice[];
1514
1459
  }
1515
1460
 
1516
1461
  export interface ProjectOverviewTotals {
@@ -1672,7 +1617,11 @@ export interface FileTierBucket {
1672
1617
 
1673
1618
  export interface FileGroup {
1674
1619
  key: string;
1675
- tiers: FileTiers | undefined;
1620
+ tiers:
1621
+ | FileTiers
1622
+ | undefined;
1623
+ /** the session's source when group_by is session */
1624
+ sourceSystem: string;
1676
1625
  }
1677
1626
 
1678
1627
  export interface ListModelPricesRequest {
@@ -1779,9 +1728,11 @@ export interface EntitlementsSnapshot {
1779
1728
  * SeatEntitlement mirrors telemetry.api.v1.SeatEntitlement: one entitlement owner's latest observed
1780
1729
  * funding state. Seat-scoped ((source_system, account_id)); principal_id/name best-effort. Seat-scoped:
1781
1730
  * windows are one seat's usage bars, never a team-pool sum. credits_balance_raw is verbatim, not USD.
1731
+ * A seat is an entitlement owner (billing_party, account_id), linked to a person through its principal and
1732
+ * the org member an admin linked that principal to. Mirrors telemetry.api.v1.SeatEntitlement.
1782
1733
  */
1783
1734
  export interface SeatEntitlement {
1784
- sourceSystem: string;
1735
+ billingParty: string;
1785
1736
  accountId: string;
1786
1737
  principalId: string;
1787
1738
  principalName: string;
@@ -1798,6 +1749,9 @@ export interface SeatEntitlement {
1798
1749
  seatTier: string;
1799
1750
  /** raw provenance for the registered/observed/inferred toggle */
1800
1751
  evidenceSource: string;
1752
+ sourceSystems: string[];
1753
+ principalSourceSystem: string;
1754
+ accountUserId: string;
1801
1755
  }
1802
1756
 
1803
1757
  /**
@@ -1977,7 +1931,7 @@ export const ListSessionsRequest: MessageFns<ListSessionsRequest> = {
1977
1931
  };
1978
1932
 
1979
1933
  function createBaseAISessionFilter(): AISessionFilter {
1980
- return { sourceSystem: [], userId: [], apiKeyId: [], model: [], provider: [], activeAfter: undefined };
1934
+ return { sourceSystem: [], userId: [], apiKeyId: [], model: [], provider: [], activeAfter: undefined, effort: [] };
1981
1935
  }
1982
1936
 
1983
1937
  export const AISessionFilter: MessageFns<AISessionFilter> = {
@@ -2000,6 +1954,9 @@ export const AISessionFilter: MessageFns<AISessionFilter> = {
2000
1954
  if (message.activeAfter !== undefined) {
2001
1955
  Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(50).fork()).join();
2002
1956
  }
1957
+ for (const v of message.effort) {
1958
+ writer.uint32(58).string(v!);
1959
+ }
2003
1960
  return writer;
2004
1961
  },
2005
1962
 
@@ -2064,6 +2021,14 @@ export const AISessionFilter: MessageFns<AISessionFilter> = {
2064
2021
  message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2065
2022
  continue;
2066
2023
  }
2024
+ case 7: {
2025
+ if (tag !== 58) {
2026
+ break;
2027
+ }
2028
+
2029
+ message.effort.push(reader.string());
2030
+ continue;
2031
+ }
2067
2032
  }
2068
2033
  if ((tag & 7) === 4 || tag === 0) {
2069
2034
  break;
@@ -2100,6 +2065,9 @@ export const AISessionFilter: MessageFns<AISessionFilter> = {
2100
2065
  : isSet(object.active_after)
2101
2066
  ? fromJsonTimestamp(object.active_after)
2102
2067
  : undefined,
2068
+ effort: globalThis.Array.isArray(object?.effort)
2069
+ ? object.effort.map((e: any) => globalThis.String(e))
2070
+ : [],
2103
2071
  };
2104
2072
  },
2105
2073
 
@@ -2123,6 +2091,9 @@ export const AISessionFilter: MessageFns<AISessionFilter> = {
2123
2091
  if (message.activeAfter !== undefined) {
2124
2092
  obj.activeAfter = message.activeAfter.toISOString();
2125
2093
  }
2094
+ if (message.effort?.length) {
2095
+ obj.effort = message.effort;
2096
+ }
2126
2097
  return obj;
2127
2098
  },
2128
2099
 
@@ -2137,6 +2108,7 @@ export const AISessionFilter: MessageFns<AISessionFilter> = {
2137
2108
  message.model = object.model?.map((e) => e) || [];
2138
2109
  message.provider = object.provider?.map((e) => e) || [];
2139
2110
  message.activeAfter = object.activeAfter ?? undefined;
2111
+ message.effort = object.effort?.map((e) => e) || [];
2140
2112
  return message;
2141
2113
  },
2142
2114
  };
@@ -2400,6 +2372,13 @@ function createBaseAISessionSummary(): AISessionSummary {
2400
2372
  filesTouched: 0,
2401
2373
  sessionVersion: 0,
2402
2374
  subagents: 0,
2375
+ efforts: [],
2376
+ billingParties: [],
2377
+ costSources: [],
2378
+ accountIds: [],
2379
+ observer: "",
2380
+ clients: [],
2381
+ clientVersions: [],
2403
2382
  };
2404
2383
  }
2405
2384
 
@@ -2480,6 +2459,27 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
2480
2459
  if (message.subagents !== 0) {
2481
2460
  writer.uint32(200).uint64(message.subagents);
2482
2461
  }
2462
+ for (const v of message.efforts) {
2463
+ writer.uint32(210).string(v!);
2464
+ }
2465
+ for (const v of message.billingParties) {
2466
+ writer.uint32(218).string(v!);
2467
+ }
2468
+ for (const v of message.costSources) {
2469
+ writer.uint32(226).string(v!);
2470
+ }
2471
+ for (const v of message.accountIds) {
2472
+ writer.uint32(234).string(v!);
2473
+ }
2474
+ if (message.observer !== "") {
2475
+ writer.uint32(242).string(message.observer);
2476
+ }
2477
+ for (const v of message.clients) {
2478
+ writer.uint32(250).string(v!);
2479
+ }
2480
+ for (const v of message.clientVersions) {
2481
+ writer.uint32(258).string(v!);
2482
+ }
2483
2483
  return writer;
2484
2484
  },
2485
2485
 
@@ -2696,6 +2696,62 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
2696
2696
  message.subagents = longToNumber(reader.uint64());
2697
2697
  continue;
2698
2698
  }
2699
+ case 26: {
2700
+ if (tag !== 210) {
2701
+ break;
2702
+ }
2703
+
2704
+ message.efforts.push(reader.string());
2705
+ continue;
2706
+ }
2707
+ case 27: {
2708
+ if (tag !== 218) {
2709
+ break;
2710
+ }
2711
+
2712
+ message.billingParties.push(reader.string());
2713
+ continue;
2714
+ }
2715
+ case 28: {
2716
+ if (tag !== 226) {
2717
+ break;
2718
+ }
2719
+
2720
+ message.costSources.push(reader.string());
2721
+ continue;
2722
+ }
2723
+ case 29: {
2724
+ if (tag !== 234) {
2725
+ break;
2726
+ }
2727
+
2728
+ message.accountIds.push(reader.string());
2729
+ continue;
2730
+ }
2731
+ case 30: {
2732
+ if (tag !== 242) {
2733
+ break;
2734
+ }
2735
+
2736
+ message.observer = reader.string();
2737
+ continue;
2738
+ }
2739
+ case 31: {
2740
+ if (tag !== 250) {
2741
+ break;
2742
+ }
2743
+
2744
+ message.clients.push(reader.string());
2745
+ continue;
2746
+ }
2747
+ case 32: {
2748
+ if (tag !== 258) {
2749
+ break;
2750
+ }
2751
+
2752
+ message.clientVersions.push(reader.string());
2753
+ continue;
2754
+ }
2699
2755
  }
2700
2756
  if ((tag & 7) === 4 || tag === 0) {
2701
2757
  break;
@@ -2813,6 +2869,33 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
2813
2869
  ? globalThis.Number(object.session_version)
2814
2870
  : 0,
2815
2871
  subagents: isSet(object.subagents) ? globalThis.Number(object.subagents) : 0,
2872
+ efforts: globalThis.Array.isArray(object?.efforts)
2873
+ ? object.efforts.map((e: any) => globalThis.String(e))
2874
+ : [],
2875
+ billingParties: globalThis.Array.isArray(object?.billingParties)
2876
+ ? object.billingParties.map((e: any) => globalThis.String(e))
2877
+ : globalThis.Array.isArray(object?.billing_parties)
2878
+ ? object.billing_parties.map((e: any) => globalThis.String(e))
2879
+ : [],
2880
+ costSources: globalThis.Array.isArray(object?.costSources)
2881
+ ? object.costSources.map((e: any) => globalThis.String(e))
2882
+ : globalThis.Array.isArray(object?.cost_sources)
2883
+ ? object.cost_sources.map((e: any) => globalThis.String(e))
2884
+ : [],
2885
+ accountIds: globalThis.Array.isArray(object?.accountIds)
2886
+ ? object.accountIds.map((e: any) => globalThis.String(e))
2887
+ : globalThis.Array.isArray(object?.account_ids)
2888
+ ? object.account_ids.map((e: any) => globalThis.String(e))
2889
+ : [],
2890
+ observer: isSet(object.observer) ? globalThis.String(object.observer) : "",
2891
+ clients: globalThis.Array.isArray(object?.clients)
2892
+ ? object.clients.map((e: any) => globalThis.String(e))
2893
+ : [],
2894
+ clientVersions: globalThis.Array.isArray(object?.clientVersions)
2895
+ ? object.clientVersions.map((e: any) => globalThis.String(e))
2896
+ : globalThis.Array.isArray(object?.client_versions)
2897
+ ? object.client_versions.map((e: any) => globalThis.String(e))
2898
+ : [],
2816
2899
  };
2817
2900
  },
2818
2901
 
@@ -2893,6 +2976,27 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
2893
2976
  if (message.subagents !== 0) {
2894
2977
  obj.subagents = Math.round(message.subagents);
2895
2978
  }
2979
+ if (message.efforts?.length) {
2980
+ obj.efforts = message.efforts;
2981
+ }
2982
+ if (message.billingParties?.length) {
2983
+ obj.billingParties = message.billingParties;
2984
+ }
2985
+ if (message.costSources?.length) {
2986
+ obj.costSources = message.costSources;
2987
+ }
2988
+ if (message.accountIds?.length) {
2989
+ obj.accountIds = message.accountIds;
2990
+ }
2991
+ if (message.observer !== "") {
2992
+ obj.observer = message.observer;
2993
+ }
2994
+ if (message.clients?.length) {
2995
+ obj.clients = message.clients;
2996
+ }
2997
+ if (message.clientVersions?.length) {
2998
+ obj.clientVersions = message.clientVersions;
2999
+ }
2896
3000
  return obj;
2897
3001
  },
2898
3002
 
@@ -2928,6 +3032,13 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
2928
3032
  message.filesTouched = object.filesTouched ?? 0;
2929
3033
  message.sessionVersion = object.sessionVersion ?? 0;
2930
3034
  message.subagents = object.subagents ?? 0;
3035
+ message.efforts = object.efforts?.map((e) => e) || [];
3036
+ message.billingParties = object.billingParties?.map((e) => e) || [];
3037
+ message.costSources = object.costSources?.map((e) => e) || [];
3038
+ message.accountIds = object.accountIds?.map((e) => e) || [];
3039
+ message.observer = object.observer ?? "";
3040
+ message.clients = object.clients?.map((e) => e) || [];
3041
+ message.clientVersions = object.clientVersions?.map((e) => e) || [];
2931
3042
  return message;
2932
3043
  },
2933
3044
  };
@@ -3962,6 +4073,7 @@ function createBaseAISessionEvent(): AISessionEvent {
3962
4073
  parentAgentId: "",
3963
4074
  isSubagent: false,
3964
4075
  agentName: "",
4076
+ effort: "",
3965
4077
  };
3966
4078
  }
3967
4079
 
@@ -4036,6 +4148,9 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
4036
4148
  if (message.agentName !== "") {
4037
4149
  writer.uint32(186).string(message.agentName);
4038
4150
  }
4151
+ if (message.effort !== "") {
4152
+ writer.uint32(194).string(message.effort);
4153
+ }
4039
4154
  return writer;
4040
4155
  },
4041
4156
 
@@ -4236,6 +4351,14 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
4236
4351
  message.agentName = reader.string();
4237
4352
  continue;
4238
4353
  }
4354
+ case 24: {
4355
+ if (tag !== 194) {
4356
+ break;
4357
+ }
4358
+
4359
+ message.effort = reader.string();
4360
+ continue;
4361
+ }
4239
4362
  }
4240
4363
  if ((tag & 7) === 4 || tag === 0) {
4241
4364
  break;
@@ -4331,6 +4454,7 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
4331
4454
  : isSet(object.agent_name)
4332
4455
  ? globalThis.String(object.agent_name)
4333
4456
  : "",
4457
+ effort: isSet(object.effort) ? globalThis.String(object.effort) : "",
4334
4458
  };
4335
4459
  },
4336
4460
 
@@ -4405,6 +4529,9 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
4405
4529
  if (message.agentName !== "") {
4406
4530
  obj.agentName = message.agentName;
4407
4531
  }
4532
+ if (message.effort !== "") {
4533
+ obj.effort = message.effort;
4534
+ }
4408
4535
  return obj;
4409
4536
  },
4410
4537
 
@@ -4438,6 +4565,7 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
4438
4565
  message.parentAgentId = object.parentAgentId ?? "";
4439
4566
  message.isSubagent = object.isSubagent ?? false;
4440
4567
  message.agentName = object.agentName ?? "";
4568
+ message.effort = object.effort ?? "";
4441
4569
  return message;
4442
4570
  },
4443
4571
  };
@@ -5461,7 +5589,7 @@ export const SessionFileChange: MessageFns<SessionFileChange> = {
5461
5589
  };
5462
5590
 
5463
5591
  function createBaseSessionModelUsage(): SessionModelUsage {
5464
- return { model: "", provider: "", usage: undefined, callCount: 0, usageUnavailableCount: 0 };
5592
+ return { model: "", provider: "", usage: undefined, callCount: 0, usageUnavailableCount: 0, effort: "" };
5465
5593
  }
5466
5594
 
5467
5595
  export const SessionModelUsage: MessageFns<SessionModelUsage> = {
@@ -5481,6 +5609,9 @@ export const SessionModelUsage: MessageFns<SessionModelUsage> = {
5481
5609
  if (message.usageUnavailableCount !== 0) {
5482
5610
  writer.uint32(40).uint64(message.usageUnavailableCount);
5483
5611
  }
5612
+ if (message.effort !== "") {
5613
+ writer.uint32(50).string(message.effort);
5614
+ }
5484
5615
  return writer;
5485
5616
  },
5486
5617
 
@@ -5537,6 +5668,14 @@ export const SessionModelUsage: MessageFns<SessionModelUsage> = {
5537
5668
  message.usageUnavailableCount = longToNumber(reader.uint64());
5538
5669
  continue;
5539
5670
  }
5671
+ case 6: {
5672
+ if (tag !== 50) {
5673
+ break;
5674
+ }
5675
+
5676
+ message.effort = reader.string();
5677
+ continue;
5678
+ }
5540
5679
  }
5541
5680
  if ((tag & 7) === 4 || tag === 0) {
5542
5681
  break;
@@ -5564,6 +5703,7 @@ export const SessionModelUsage: MessageFns<SessionModelUsage> = {
5564
5703
  : isSet(object.usage_unavailable_count)
5565
5704
  ? globalThis.Number(object.usage_unavailable_count)
5566
5705
  : 0,
5706
+ effort: isSet(object.effort) ? globalThis.String(object.effort) : "",
5567
5707
  };
5568
5708
  },
5569
5709
 
@@ -5584,6 +5724,9 @@ export const SessionModelUsage: MessageFns<SessionModelUsage> = {
5584
5724
  if (message.usageUnavailableCount !== 0) {
5585
5725
  obj.usageUnavailableCount = Math.round(message.usageUnavailableCount);
5586
5726
  }
5727
+ if (message.effort !== "") {
5728
+ obj.effort = message.effort;
5729
+ }
5587
5730
  return obj;
5588
5731
  },
5589
5732
 
@@ -5599,6 +5742,7 @@ export const SessionModelUsage: MessageFns<SessionModelUsage> = {
5599
5742
  : undefined;
5600
5743
  message.callCount = object.callCount ?? 0;
5601
5744
  message.usageUnavailableCount = object.usageUnavailableCount ?? 0;
5745
+ message.effort = object.effort ?? "";
5602
5746
  return message;
5603
5747
  },
5604
5748
  };
@@ -5615,6 +5759,7 @@ function createBaseSessionTimelinePoint(): SessionTimelinePoint {
5615
5759
  durationMs: undefined,
5616
5760
  usage: undefined,
5617
5761
  fundingMode: 0,
5762
+ effort: "",
5618
5763
  };
5619
5764
  }
5620
5765
 
@@ -5650,6 +5795,9 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
5650
5795
  if (message.fundingMode !== 0) {
5651
5796
  writer.uint32(80).int32(message.fundingMode);
5652
5797
  }
5798
+ if (message.effort !== "") {
5799
+ writer.uint32(90).string(message.effort);
5800
+ }
5653
5801
  return writer;
5654
5802
  },
5655
5803
 
@@ -5700,841 +5848,58 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
5700
5848
  }
5701
5849
  case 5: {
5702
5850
  if (tag !== 42) {
5703
- break;
5704
- }
5705
-
5706
- message.model = reader.string();
5707
- continue;
5708
- }
5709
- case 6: {
5710
- if (tag !== 50) {
5711
- break;
5712
- }
5713
-
5714
- message.provider = reader.string();
5715
- continue;
5716
- }
5717
- case 7: {
5718
- if (tag !== 58) {
5719
- break;
5720
- }
5721
-
5722
- message.finishReason = reader.string();
5723
- continue;
5724
- }
5725
- case 8: {
5726
- if (tag !== 64) {
5727
- break;
5728
- }
5729
-
5730
- message.durationMs = longToNumber(reader.int64());
5731
- continue;
5732
- }
5733
- case 9: {
5734
- if (tag !== 74) {
5735
- break;
5736
- }
5737
-
5738
- message.usage = AITokenUsage.decode(reader, reader.uint32());
5739
- continue;
5740
- }
5741
- case 10: {
5742
- if (tag !== 80) {
5743
- break;
5744
- }
5745
-
5746
- message.fundingMode = reader.int32() as any;
5747
- continue;
5748
- }
5749
- }
5750
- if ((tag & 7) === 4 || tag === 0) {
5751
- break;
5752
- }
5753
- reader.skip(tag & 7);
5754
- }
5755
- return message;
5756
- } finally {
5757
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
5758
- }
5759
- },
5760
-
5761
- fromJSON(object: any): SessionTimelinePoint {
5762
- return {
5763
- logicalEventId: isSet(object.logicalEventId)
5764
- ? globalThis.String(object.logicalEventId)
5765
- : isSet(object.logical_event_id)
5766
- ? globalThis.String(object.logical_event_id)
5767
- : "",
5768
- cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
5769
- kind: isSet(object.kind) ? aISessionEventKindFromJSON(object.kind) : 0,
5770
- eventTime: isSet(object.eventTime)
5771
- ? fromJsonTimestamp(object.eventTime)
5772
- : isSet(object.event_time)
5773
- ? fromJsonTimestamp(object.event_time)
5774
- : undefined,
5775
- model: isSet(object.model) ? globalThis.String(object.model) : "",
5776
- provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
5777
- finishReason: isSet(object.finishReason)
5778
- ? globalThis.String(object.finishReason)
5779
- : isSet(object.finish_reason)
5780
- ? globalThis.String(object.finish_reason)
5781
- : "",
5782
- durationMs: isSet(object.durationMs)
5783
- ? globalThis.Number(object.durationMs)
5784
- : isSet(object.duration_ms)
5785
- ? globalThis.Number(object.duration_ms)
5786
- : undefined,
5787
- usage: isSet(object.usage) ? AITokenUsage.fromJSON(object.usage) : undefined,
5788
- fundingMode: isSet(object.fundingMode)
5789
- ? aIFundingModeFromJSON(object.fundingMode)
5790
- : isSet(object.funding_mode)
5791
- ? aIFundingModeFromJSON(object.funding_mode)
5792
- : 0,
5793
- };
5794
- },
5795
-
5796
- toJSON(message: SessionTimelinePoint): unknown {
5797
- const obj: any = {};
5798
- if (message.logicalEventId !== "") {
5799
- obj.logicalEventId = message.logicalEventId;
5800
- }
5801
- if (message.cursor !== "") {
5802
- obj.cursor = message.cursor;
5803
- }
5804
- if (message.kind !== 0) {
5805
- obj.kind = aISessionEventKindToJSON(message.kind);
5806
- }
5807
- if (message.eventTime !== undefined) {
5808
- obj.eventTime = message.eventTime.toISOString();
5809
- }
5810
- if (message.model !== "") {
5811
- obj.model = message.model;
5812
- }
5813
- if (message.provider !== "") {
5814
- obj.provider = message.provider;
5815
- }
5816
- if (message.finishReason !== "") {
5817
- obj.finishReason = message.finishReason;
5818
- }
5819
- if (message.durationMs !== undefined) {
5820
- obj.durationMs = Math.round(message.durationMs);
5821
- }
5822
- if (message.usage !== undefined) {
5823
- obj.usage = AITokenUsage.toJSON(message.usage);
5824
- }
5825
- if (message.fundingMode !== 0) {
5826
- obj.fundingMode = aIFundingModeToJSON(message.fundingMode);
5827
- }
5828
- return obj;
5829
- },
5830
-
5831
- create<I extends Exact<DeepPartial<SessionTimelinePoint>, I>>(base?: I): SessionTimelinePoint {
5832
- return SessionTimelinePoint.fromPartial(base ?? ({} as any));
5833
- },
5834
- fromPartial<I extends Exact<DeepPartial<SessionTimelinePoint>, I>>(object: I): SessionTimelinePoint {
5835
- const message = createBaseSessionTimelinePoint();
5836
- message.logicalEventId = object.logicalEventId ?? "";
5837
- message.cursor = object.cursor ?? "";
5838
- message.kind = object.kind ?? 0;
5839
- message.eventTime = object.eventTime ?? undefined;
5840
- message.model = object.model ?? "";
5841
- message.provider = object.provider ?? "";
5842
- message.finishReason = object.finishReason ?? "";
5843
- message.durationMs = object.durationMs ?? undefined;
5844
- message.usage = (object.usage !== undefined && object.usage !== null)
5845
- ? AITokenUsage.fromPartial(object.usage)
5846
- : undefined;
5847
- message.fundingMode = object.fundingMode ?? 0;
5848
- return message;
5849
- },
5850
- };
5851
-
5852
- function createBaseListPrincipalsRequest(): ListPrincipalsRequest {
5853
- return { organizationId: "", projectId: "", kind: undefined, sourceSystem: "", pageSize: 0, pageToken: "" };
5854
- }
5855
-
5856
- export const ListPrincipalsRequest: MessageFns<ListPrincipalsRequest> = {
5857
- encode(message: ListPrincipalsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5858
- if (message.organizationId !== "") {
5859
- writer.uint32(10).string(message.organizationId);
5860
- }
5861
- if (message.projectId !== "") {
5862
- writer.uint32(18).string(message.projectId);
5863
- }
5864
- if (message.kind !== undefined) {
5865
- writer.uint32(24).int32(message.kind);
5866
- }
5867
- if (message.sourceSystem !== "") {
5868
- writer.uint32(34).string(message.sourceSystem);
5869
- }
5870
- if (message.pageSize !== 0) {
5871
- writer.uint32(40).int32(message.pageSize);
5872
- }
5873
- if (message.pageToken !== "") {
5874
- writer.uint32(50).string(message.pageToken);
5875
- }
5876
- return writer;
5877
- },
5878
-
5879
- decode(input: BinaryReader | Uint8Array, length?: number): ListPrincipalsRequest {
5880
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5881
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5882
- if (previousRecursionDepth >= 100) {
5883
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
5884
- }
5885
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5886
- try {
5887
- const end = length === undefined ? reader.len : reader.pos + length;
5888
- const message = createBaseListPrincipalsRequest();
5889
- while (reader.pos < end) {
5890
- const tag = reader.uint32();
5891
- switch (tag >>> 3) {
5892
- case 1: {
5893
- if (tag !== 10) {
5894
- break;
5895
- }
5896
-
5897
- message.organizationId = reader.string();
5898
- continue;
5899
- }
5900
- case 2: {
5901
- if (tag !== 18) {
5902
- break;
5903
- }
5904
-
5905
- message.projectId = reader.string();
5906
- continue;
5907
- }
5908
- case 3: {
5909
- if (tag !== 24) {
5910
- break;
5911
- }
5912
-
5913
- message.kind = reader.int32() as any;
5914
- continue;
5915
- }
5916
- case 4: {
5917
- if (tag !== 34) {
5918
- break;
5919
- }
5920
-
5921
- message.sourceSystem = reader.string();
5922
- continue;
5923
- }
5924
- case 5: {
5925
- if (tag !== 40) {
5926
- break;
5927
- }
5928
-
5929
- message.pageSize = reader.int32();
5930
- continue;
5931
- }
5932
- case 6: {
5933
- if (tag !== 50) {
5934
- break;
5935
- }
5936
-
5937
- message.pageToken = reader.string();
5938
- continue;
5939
- }
5940
- }
5941
- if ((tag & 7) === 4 || tag === 0) {
5942
- break;
5943
- }
5944
- reader.skip(tag & 7);
5945
- }
5946
- return message;
5947
- } finally {
5948
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
5949
- }
5950
- },
5951
-
5952
- fromJSON(object: any): ListPrincipalsRequest {
5953
- return {
5954
- organizationId: isSet(object.organizationId)
5955
- ? globalThis.String(object.organizationId)
5956
- : isSet(object.organization_id)
5957
- ? globalThis.String(object.organization_id)
5958
- : "",
5959
- projectId: isSet(object.projectId)
5960
- ? globalThis.String(object.projectId)
5961
- : isSet(object.project_id)
5962
- ? globalThis.String(object.project_id)
5963
- : "",
5964
- kind: isSet(object.kind) ? aIPrincipalKindFromJSON(object.kind) : undefined,
5965
- sourceSystem: isSet(object.sourceSystem)
5966
- ? globalThis.String(object.sourceSystem)
5967
- : isSet(object.source_system)
5968
- ? globalThis.String(object.source_system)
5969
- : "",
5970
- pageSize: isSet(object.pageSize)
5971
- ? globalThis.Number(object.pageSize)
5972
- : isSet(object.page_size)
5973
- ? globalThis.Number(object.page_size)
5974
- : 0,
5975
- pageToken: isSet(object.pageToken)
5976
- ? globalThis.String(object.pageToken)
5977
- : isSet(object.page_token)
5978
- ? globalThis.String(object.page_token)
5979
- : "",
5980
- };
5981
- },
5982
-
5983
- toJSON(message: ListPrincipalsRequest): unknown {
5984
- const obj: any = {};
5985
- if (message.organizationId !== "") {
5986
- obj.organizationId = message.organizationId;
5987
- }
5988
- if (message.projectId !== "") {
5989
- obj.projectId = message.projectId;
5990
- }
5991
- if (message.kind !== undefined) {
5992
- obj.kind = aIPrincipalKindToJSON(message.kind);
5993
- }
5994
- if (message.sourceSystem !== "") {
5995
- obj.sourceSystem = message.sourceSystem;
5996
- }
5997
- if (message.pageSize !== 0) {
5998
- obj.pageSize = Math.round(message.pageSize);
5999
- }
6000
- if (message.pageToken !== "") {
6001
- obj.pageToken = message.pageToken;
6002
- }
6003
- return obj;
6004
- },
6005
-
6006
- create<I extends Exact<DeepPartial<ListPrincipalsRequest>, I>>(base?: I): ListPrincipalsRequest {
6007
- return ListPrincipalsRequest.fromPartial(base ?? ({} as any));
6008
- },
6009
- fromPartial<I extends Exact<DeepPartial<ListPrincipalsRequest>, I>>(object: I): ListPrincipalsRequest {
6010
- const message = createBaseListPrincipalsRequest();
6011
- message.organizationId = object.organizationId ?? "";
6012
- message.projectId = object.projectId ?? "";
6013
- message.kind = object.kind ?? undefined;
6014
- message.sourceSystem = object.sourceSystem ?? "";
6015
- message.pageSize = object.pageSize ?? 0;
6016
- message.pageToken = object.pageToken ?? "";
6017
- return message;
6018
- },
6019
- };
6020
-
6021
- function createBaseListPrincipalsResponse(): ListPrincipalsResponse {
6022
- return { status: undefined, principals: [], nextPageToken: "", totalCount: undefined };
6023
- }
6024
-
6025
- export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
6026
- encode(message: ListPrincipalsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6027
- if (message.status !== undefined) {
6028
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6029
- }
6030
- for (const v of message.principals) {
6031
- AIPrincipal.encode(v!, writer.uint32(18).fork()).join();
6032
- }
6033
- if (message.nextPageToken !== "") {
6034
- writer.uint32(26).string(message.nextPageToken);
6035
- }
6036
- if (message.totalCount !== undefined) {
6037
- writer.uint32(32).int64(message.totalCount);
6038
- }
6039
- return writer;
6040
- },
6041
-
6042
- decode(input: BinaryReader | Uint8Array, length?: number): ListPrincipalsResponse {
6043
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6044
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6045
- if (previousRecursionDepth >= 100) {
6046
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6047
- }
6048
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6049
- try {
6050
- const end = length === undefined ? reader.len : reader.pos + length;
6051
- const message = createBaseListPrincipalsResponse();
6052
- while (reader.pos < end) {
6053
- const tag = reader.uint32();
6054
- switch (tag >>> 3) {
6055
- case 1: {
6056
- if (tag !== 10) {
6057
- break;
6058
- }
6059
-
6060
- message.status = ResponseStatus.decode(reader, reader.uint32());
6061
- continue;
6062
- }
6063
- case 2: {
6064
- if (tag !== 18) {
6065
- break;
6066
- }
6067
-
6068
- message.principals.push(AIPrincipal.decode(reader, reader.uint32()));
6069
- continue;
6070
- }
6071
- case 3: {
6072
- if (tag !== 26) {
6073
- break;
6074
- }
6075
-
6076
- message.nextPageToken = reader.string();
6077
- continue;
6078
- }
6079
- case 4: {
6080
- if (tag !== 32) {
6081
- break;
6082
- }
6083
-
6084
- message.totalCount = longToNumber(reader.int64());
6085
- continue;
6086
- }
6087
- }
6088
- if ((tag & 7) === 4 || tag === 0) {
6089
- break;
6090
- }
6091
- reader.skip(tag & 7);
6092
- }
6093
- return message;
6094
- } finally {
6095
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6096
- }
6097
- },
6098
-
6099
- fromJSON(object: any): ListPrincipalsResponse {
6100
- return {
6101
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
6102
- principals: globalThis.Array.isArray(object?.principals)
6103
- ? object.principals.map((e: any) => AIPrincipal.fromJSON(e))
6104
- : [],
6105
- nextPageToken: isSet(object.nextPageToken)
6106
- ? globalThis.String(object.nextPageToken)
6107
- : isSet(object.next_page_token)
6108
- ? globalThis.String(object.next_page_token)
6109
- : "",
6110
- totalCount: isSet(object.totalCount)
6111
- ? globalThis.Number(object.totalCount)
6112
- : isSet(object.total_count)
6113
- ? globalThis.Number(object.total_count)
6114
- : undefined,
6115
- };
6116
- },
6117
-
6118
- toJSON(message: ListPrincipalsResponse): unknown {
6119
- const obj: any = {};
6120
- if (message.status !== undefined) {
6121
- obj.status = ResponseStatus.toJSON(message.status);
6122
- }
6123
- if (message.principals?.length) {
6124
- obj.principals = message.principals.map((e) => AIPrincipal.toJSON(e));
6125
- }
6126
- if (message.nextPageToken !== "") {
6127
- obj.nextPageToken = message.nextPageToken;
6128
- }
6129
- if (message.totalCount !== undefined) {
6130
- obj.totalCount = Math.round(message.totalCount);
6131
- }
6132
- return obj;
6133
- },
6134
-
6135
- create<I extends Exact<DeepPartial<ListPrincipalsResponse>, I>>(base?: I): ListPrincipalsResponse {
6136
- return ListPrincipalsResponse.fromPartial(base ?? ({} as any));
6137
- },
6138
- fromPartial<I extends Exact<DeepPartial<ListPrincipalsResponse>, I>>(object: I): ListPrincipalsResponse {
6139
- const message = createBaseListPrincipalsResponse();
6140
- message.status = (object.status !== undefined && object.status !== null)
6141
- ? ResponseStatus.fromPartial(object.status)
6142
- : undefined;
6143
- message.principals = object.principals?.map((e) => AIPrincipal.fromPartial(e)) || [];
6144
- message.nextPageToken = object.nextPageToken ?? "";
6145
- message.totalCount = object.totalCount ?? undefined;
6146
- return message;
6147
- },
6148
- };
6149
-
6150
- function createBaseAIPrincipal(): AIPrincipal {
6151
- return { kind: 0, id: "", name: "", sourceSystem: "", alias: "", accountUserId: "" };
6152
- }
6153
-
6154
- export const AIPrincipal: MessageFns<AIPrincipal> = {
6155
- encode(message: AIPrincipal, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6156
- if (message.kind !== 0) {
6157
- writer.uint32(8).int32(message.kind);
6158
- }
6159
- if (message.id !== "") {
6160
- writer.uint32(18).string(message.id);
6161
- }
6162
- if (message.name !== "") {
6163
- writer.uint32(26).string(message.name);
6164
- }
6165
- if (message.sourceSystem !== "") {
6166
- writer.uint32(34).string(message.sourceSystem);
6167
- }
6168
- if (message.alias !== "") {
6169
- writer.uint32(42).string(message.alias);
6170
- }
6171
- if (message.accountUserId !== "") {
6172
- writer.uint32(50).string(message.accountUserId);
6173
- }
6174
- return writer;
6175
- },
6176
-
6177
- decode(input: BinaryReader | Uint8Array, length?: number): AIPrincipal {
6178
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6179
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6180
- if (previousRecursionDepth >= 100) {
6181
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6182
- }
6183
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6184
- try {
6185
- const end = length === undefined ? reader.len : reader.pos + length;
6186
- const message = createBaseAIPrincipal();
6187
- while (reader.pos < end) {
6188
- const tag = reader.uint32();
6189
- switch (tag >>> 3) {
6190
- case 1: {
6191
- if (tag !== 8) {
6192
- break;
6193
- }
6194
-
6195
- message.kind = reader.int32() as any;
6196
- continue;
6197
- }
6198
- case 2: {
6199
- if (tag !== 18) {
6200
- break;
6201
- }
6202
-
6203
- message.id = reader.string();
6204
- continue;
6205
- }
6206
- case 3: {
6207
- if (tag !== 26) {
6208
- break;
6209
- }
6210
-
6211
- message.name = reader.string();
6212
- continue;
6213
- }
6214
- case 4: {
6215
- if (tag !== 34) {
6216
- break;
6217
- }
6218
-
6219
- message.sourceSystem = reader.string();
6220
- continue;
6221
- }
6222
- case 5: {
6223
- if (tag !== 42) {
6224
- break;
6225
- }
6226
-
6227
- message.alias = reader.string();
6228
- continue;
6229
- }
6230
- case 6: {
6231
- if (tag !== 50) {
6232
- break;
6233
- }
6234
-
6235
- message.accountUserId = reader.string();
6236
- continue;
6237
- }
6238
- }
6239
- if ((tag & 7) === 4 || tag === 0) {
6240
- break;
6241
- }
6242
- reader.skip(tag & 7);
6243
- }
6244
- return message;
6245
- } finally {
6246
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6247
- }
6248
- },
6249
-
6250
- fromJSON(object: any): AIPrincipal {
6251
- return {
6252
- kind: isSet(object.kind) ? aIPrincipalKindFromJSON(object.kind) : 0,
6253
- id: isSet(object.id) ? globalThis.String(object.id) : "",
6254
- name: isSet(object.name) ? globalThis.String(object.name) : "",
6255
- sourceSystem: isSet(object.sourceSystem)
6256
- ? globalThis.String(object.sourceSystem)
6257
- : isSet(object.source_system)
6258
- ? globalThis.String(object.source_system)
6259
- : "",
6260
- alias: isSet(object.alias) ? globalThis.String(object.alias) : "",
6261
- accountUserId: isSet(object.accountUserId)
6262
- ? globalThis.String(object.accountUserId)
6263
- : isSet(object.account_user_id)
6264
- ? globalThis.String(object.account_user_id)
6265
- : "",
6266
- };
6267
- },
6268
-
6269
- toJSON(message: AIPrincipal): unknown {
6270
- const obj: any = {};
6271
- if (message.kind !== 0) {
6272
- obj.kind = aIPrincipalKindToJSON(message.kind);
6273
- }
6274
- if (message.id !== "") {
6275
- obj.id = message.id;
6276
- }
6277
- if (message.name !== "") {
6278
- obj.name = message.name;
6279
- }
6280
- if (message.sourceSystem !== "") {
6281
- obj.sourceSystem = message.sourceSystem;
6282
- }
6283
- if (message.alias !== "") {
6284
- obj.alias = message.alias;
6285
- }
6286
- if (message.accountUserId !== "") {
6287
- obj.accountUserId = message.accountUserId;
6288
- }
6289
- return obj;
6290
- },
6291
-
6292
- create<I extends Exact<DeepPartial<AIPrincipal>, I>>(base?: I): AIPrincipal {
6293
- return AIPrincipal.fromPartial(base ?? ({} as any));
6294
- },
6295
- fromPartial<I extends Exact<DeepPartial<AIPrincipal>, I>>(object: I): AIPrincipal {
6296
- const message = createBaseAIPrincipal();
6297
- message.kind = object.kind ?? 0;
6298
- message.id = object.id ?? "";
6299
- message.name = object.name ?? "";
6300
- message.sourceSystem = object.sourceSystem ?? "";
6301
- message.alias = object.alias ?? "";
6302
- message.accountUserId = object.accountUserId ?? "";
6303
- return message;
6304
- },
6305
- };
6306
-
6307
- function createBaseUpdatePrincipalRequest(): UpdatePrincipalRequest {
6308
- return {
6309
- organizationId: "",
6310
- projectId: "",
6311
- kind: 0,
6312
- id: "",
6313
- sourceSystem: "",
6314
- alias: undefined,
6315
- accountUserId: undefined,
6316
- };
6317
- }
6318
-
6319
- export const UpdatePrincipalRequest: MessageFns<UpdatePrincipalRequest> = {
6320
- encode(message: UpdatePrincipalRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6321
- if (message.organizationId !== "") {
6322
- writer.uint32(10).string(message.organizationId);
6323
- }
6324
- if (message.projectId !== "") {
6325
- writer.uint32(18).string(message.projectId);
6326
- }
6327
- if (message.kind !== 0) {
6328
- writer.uint32(24).int32(message.kind);
6329
- }
6330
- if (message.id !== "") {
6331
- writer.uint32(34).string(message.id);
6332
- }
6333
- if (message.sourceSystem !== "") {
6334
- writer.uint32(42).string(message.sourceSystem);
6335
- }
6336
- if (message.alias !== undefined) {
6337
- writer.uint32(50).string(message.alias);
6338
- }
6339
- if (message.accountUserId !== undefined) {
6340
- writer.uint32(58).string(message.accountUserId);
6341
- }
6342
- return writer;
6343
- },
6344
-
6345
- decode(input: BinaryReader | Uint8Array, length?: number): UpdatePrincipalRequest {
6346
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6347
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6348
- if (previousRecursionDepth >= 100) {
6349
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6350
- }
6351
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6352
- try {
6353
- const end = length === undefined ? reader.len : reader.pos + length;
6354
- const message = createBaseUpdatePrincipalRequest();
6355
- while (reader.pos < end) {
6356
- const tag = reader.uint32();
6357
- switch (tag >>> 3) {
6358
- case 1: {
6359
- if (tag !== 10) {
6360
- break;
6361
- }
6362
-
6363
- message.organizationId = reader.string();
6364
- continue;
6365
- }
6366
- case 2: {
6367
- if (tag !== 18) {
6368
- break;
6369
- }
6370
-
6371
- message.projectId = reader.string();
6372
- continue;
6373
- }
6374
- case 3: {
6375
- if (tag !== 24) {
6376
- break;
6377
- }
6378
-
6379
- message.kind = reader.int32() as any;
6380
- continue;
6381
- }
6382
- case 4: {
6383
- if (tag !== 34) {
6384
- break;
6385
- }
6386
-
6387
- message.id = reader.string();
6388
- continue;
6389
- }
6390
- case 5: {
6391
- if (tag !== 42) {
6392
- break;
6393
- }
6394
-
6395
- message.sourceSystem = reader.string();
6396
- continue;
6397
- }
6398
- case 6: {
6399
- if (tag !== 50) {
6400
- break;
6401
- }
6402
-
6403
- message.alias = reader.string();
6404
- continue;
6405
- }
6406
- case 7: {
6407
- if (tag !== 58) {
6408
- break;
6409
- }
6410
-
6411
- message.accountUserId = reader.string();
6412
- continue;
6413
- }
6414
- }
6415
- if ((tag & 7) === 4 || tag === 0) {
6416
- break;
6417
- }
6418
- reader.skip(tag & 7);
6419
- }
6420
- return message;
6421
- } finally {
6422
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6423
- }
6424
- },
6425
-
6426
- fromJSON(object: any): UpdatePrincipalRequest {
6427
- return {
6428
- organizationId: isSet(object.organizationId)
6429
- ? globalThis.String(object.organizationId)
6430
- : isSet(object.organization_id)
6431
- ? globalThis.String(object.organization_id)
6432
- : "",
6433
- projectId: isSet(object.projectId)
6434
- ? globalThis.String(object.projectId)
6435
- : isSet(object.project_id)
6436
- ? globalThis.String(object.project_id)
6437
- : "",
6438
- kind: isSet(object.kind) ? aIPrincipalKindFromJSON(object.kind) : 0,
6439
- id: isSet(object.id) ? globalThis.String(object.id) : "",
6440
- sourceSystem: isSet(object.sourceSystem)
6441
- ? globalThis.String(object.sourceSystem)
6442
- : isSet(object.source_system)
6443
- ? globalThis.String(object.source_system)
6444
- : "",
6445
- alias: isSet(object.alias) ? globalThis.String(object.alias) : undefined,
6446
- accountUserId: isSet(object.accountUserId)
6447
- ? globalThis.String(object.accountUserId)
6448
- : isSet(object.account_user_id)
6449
- ? globalThis.String(object.account_user_id)
6450
- : undefined,
6451
- };
6452
- },
6453
-
6454
- toJSON(message: UpdatePrincipalRequest): unknown {
6455
- const obj: any = {};
6456
- if (message.organizationId !== "") {
6457
- obj.organizationId = message.organizationId;
6458
- }
6459
- if (message.projectId !== "") {
6460
- obj.projectId = message.projectId;
6461
- }
6462
- if (message.kind !== 0) {
6463
- obj.kind = aIPrincipalKindToJSON(message.kind);
6464
- }
6465
- if (message.id !== "") {
6466
- obj.id = message.id;
6467
- }
6468
- if (message.sourceSystem !== "") {
6469
- obj.sourceSystem = message.sourceSystem;
6470
- }
6471
- if (message.alias !== undefined) {
6472
- obj.alias = message.alias;
6473
- }
6474
- if (message.accountUserId !== undefined) {
6475
- obj.accountUserId = message.accountUserId;
6476
- }
6477
- return obj;
6478
- },
5851
+ break;
5852
+ }
6479
5853
 
6480
- create<I extends Exact<DeepPartial<UpdatePrincipalRequest>, I>>(base?: I): UpdatePrincipalRequest {
6481
- return UpdatePrincipalRequest.fromPartial(base ?? ({} as any));
6482
- },
6483
- fromPartial<I extends Exact<DeepPartial<UpdatePrincipalRequest>, I>>(object: I): UpdatePrincipalRequest {
6484
- const message = createBaseUpdatePrincipalRequest();
6485
- message.organizationId = object.organizationId ?? "";
6486
- message.projectId = object.projectId ?? "";
6487
- message.kind = object.kind ?? 0;
6488
- message.id = object.id ?? "";
6489
- message.sourceSystem = object.sourceSystem ?? "";
6490
- message.alias = object.alias ?? undefined;
6491
- message.accountUserId = object.accountUserId ?? undefined;
6492
- return message;
6493
- },
6494
- };
5854
+ message.model = reader.string();
5855
+ continue;
5856
+ }
5857
+ case 6: {
5858
+ if (tag !== 50) {
5859
+ break;
5860
+ }
6495
5861
 
6496
- function createBaseUpdatePrincipalResponse(): UpdatePrincipalResponse {
6497
- return { status: undefined, principal: undefined };
6498
- }
5862
+ message.provider = reader.string();
5863
+ continue;
5864
+ }
5865
+ case 7: {
5866
+ if (tag !== 58) {
5867
+ break;
5868
+ }
6499
5869
 
6500
- export const UpdatePrincipalResponse: MessageFns<UpdatePrincipalResponse> = {
6501
- encode(message: UpdatePrincipalResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6502
- if (message.status !== undefined) {
6503
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6504
- }
6505
- if (message.principal !== undefined) {
6506
- AIPrincipal.encode(message.principal, writer.uint32(18).fork()).join();
6507
- }
6508
- return writer;
6509
- },
5870
+ message.finishReason = reader.string();
5871
+ continue;
5872
+ }
5873
+ case 8: {
5874
+ if (tag !== 64) {
5875
+ break;
5876
+ }
6510
5877
 
6511
- decode(input: BinaryReader | Uint8Array, length?: number): UpdatePrincipalResponse {
6512
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6513
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6514
- if (previousRecursionDepth >= 100) {
6515
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6516
- }
6517
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6518
- try {
6519
- const end = length === undefined ? reader.len : reader.pos + length;
6520
- const message = createBaseUpdatePrincipalResponse();
6521
- while (reader.pos < end) {
6522
- const tag = reader.uint32();
6523
- switch (tag >>> 3) {
6524
- case 1: {
6525
- if (tag !== 10) {
5878
+ message.durationMs = longToNumber(reader.int64());
5879
+ continue;
5880
+ }
5881
+ case 9: {
5882
+ if (tag !== 74) {
6526
5883
  break;
6527
5884
  }
6528
5885
 
6529
- message.status = ResponseStatus.decode(reader, reader.uint32());
5886
+ message.usage = AITokenUsage.decode(reader, reader.uint32());
6530
5887
  continue;
6531
5888
  }
6532
- case 2: {
6533
- if (tag !== 18) {
5889
+ case 10: {
5890
+ if (tag !== 80) {
5891
+ break;
5892
+ }
5893
+
5894
+ message.fundingMode = reader.int32() as any;
5895
+ continue;
5896
+ }
5897
+ case 11: {
5898
+ if (tag !== 90) {
6534
5899
  break;
6535
5900
  }
6536
5901
 
6537
- message.principal = AIPrincipal.decode(reader, reader.uint32());
5902
+ message.effort = reader.string();
6538
5903
  continue;
6539
5904
  }
6540
5905
  }
@@ -6549,35 +5914,98 @@ export const UpdatePrincipalResponse: MessageFns<UpdatePrincipalResponse> = {
6549
5914
  }
6550
5915
  },
6551
5916
 
6552
- fromJSON(object: any): UpdatePrincipalResponse {
5917
+ fromJSON(object: any): SessionTimelinePoint {
6553
5918
  return {
6554
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
6555
- principal: isSet(object.principal) ? AIPrincipal.fromJSON(object.principal) : undefined,
5919
+ logicalEventId: isSet(object.logicalEventId)
5920
+ ? globalThis.String(object.logicalEventId)
5921
+ : isSet(object.logical_event_id)
5922
+ ? globalThis.String(object.logical_event_id)
5923
+ : "",
5924
+ cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
5925
+ kind: isSet(object.kind) ? aISessionEventKindFromJSON(object.kind) : 0,
5926
+ eventTime: isSet(object.eventTime)
5927
+ ? fromJsonTimestamp(object.eventTime)
5928
+ : isSet(object.event_time)
5929
+ ? fromJsonTimestamp(object.event_time)
5930
+ : undefined,
5931
+ model: isSet(object.model) ? globalThis.String(object.model) : "",
5932
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
5933
+ finishReason: isSet(object.finishReason)
5934
+ ? globalThis.String(object.finishReason)
5935
+ : isSet(object.finish_reason)
5936
+ ? globalThis.String(object.finish_reason)
5937
+ : "",
5938
+ durationMs: isSet(object.durationMs)
5939
+ ? globalThis.Number(object.durationMs)
5940
+ : isSet(object.duration_ms)
5941
+ ? globalThis.Number(object.duration_ms)
5942
+ : undefined,
5943
+ usage: isSet(object.usage) ? AITokenUsage.fromJSON(object.usage) : undefined,
5944
+ fundingMode: isSet(object.fundingMode)
5945
+ ? aIFundingModeFromJSON(object.fundingMode)
5946
+ : isSet(object.funding_mode)
5947
+ ? aIFundingModeFromJSON(object.funding_mode)
5948
+ : 0,
5949
+ effort: isSet(object.effort) ? globalThis.String(object.effort) : "",
6556
5950
  };
6557
5951
  },
6558
5952
 
6559
- toJSON(message: UpdatePrincipalResponse): unknown {
5953
+ toJSON(message: SessionTimelinePoint): unknown {
6560
5954
  const obj: any = {};
6561
- if (message.status !== undefined) {
6562
- obj.status = ResponseStatus.toJSON(message.status);
5955
+ if (message.logicalEventId !== "") {
5956
+ obj.logicalEventId = message.logicalEventId;
5957
+ }
5958
+ if (message.cursor !== "") {
5959
+ obj.cursor = message.cursor;
5960
+ }
5961
+ if (message.kind !== 0) {
5962
+ obj.kind = aISessionEventKindToJSON(message.kind);
5963
+ }
5964
+ if (message.eventTime !== undefined) {
5965
+ obj.eventTime = message.eventTime.toISOString();
5966
+ }
5967
+ if (message.model !== "") {
5968
+ obj.model = message.model;
5969
+ }
5970
+ if (message.provider !== "") {
5971
+ obj.provider = message.provider;
5972
+ }
5973
+ if (message.finishReason !== "") {
5974
+ obj.finishReason = message.finishReason;
5975
+ }
5976
+ if (message.durationMs !== undefined) {
5977
+ obj.durationMs = Math.round(message.durationMs);
6563
5978
  }
6564
- if (message.principal !== undefined) {
6565
- obj.principal = AIPrincipal.toJSON(message.principal);
5979
+ if (message.usage !== undefined) {
5980
+ obj.usage = AITokenUsage.toJSON(message.usage);
5981
+ }
5982
+ if (message.fundingMode !== 0) {
5983
+ obj.fundingMode = aIFundingModeToJSON(message.fundingMode);
5984
+ }
5985
+ if (message.effort !== "") {
5986
+ obj.effort = message.effort;
6566
5987
  }
6567
5988
  return obj;
6568
5989
  },
6569
5990
 
6570
- create<I extends Exact<DeepPartial<UpdatePrincipalResponse>, I>>(base?: I): UpdatePrincipalResponse {
6571
- return UpdatePrincipalResponse.fromPartial(base ?? ({} as any));
5991
+ create<I extends Exact<DeepPartial<SessionTimelinePoint>, I>>(base?: I): SessionTimelinePoint {
5992
+ return SessionTimelinePoint.fromPartial(base ?? ({} as any));
6572
5993
  },
6573
- fromPartial<I extends Exact<DeepPartial<UpdatePrincipalResponse>, I>>(object: I): UpdatePrincipalResponse {
6574
- const message = createBaseUpdatePrincipalResponse();
6575
- message.status = (object.status !== undefined && object.status !== null)
6576
- ? ResponseStatus.fromPartial(object.status)
6577
- : undefined;
6578
- message.principal = (object.principal !== undefined && object.principal !== null)
6579
- ? AIPrincipal.fromPartial(object.principal)
5994
+ fromPartial<I extends Exact<DeepPartial<SessionTimelinePoint>, I>>(object: I): SessionTimelinePoint {
5995
+ const message = createBaseSessionTimelinePoint();
5996
+ message.logicalEventId = object.logicalEventId ?? "";
5997
+ message.cursor = object.cursor ?? "";
5998
+ message.kind = object.kind ?? 0;
5999
+ message.eventTime = object.eventTime ?? undefined;
6000
+ message.model = object.model ?? "";
6001
+ message.provider = object.provider ?? "";
6002
+ message.finishReason = object.finishReason ?? "";
6003
+ message.durationMs = object.durationMs ?? undefined;
6004
+ message.usage = (object.usage !== undefined && object.usage !== null)
6005
+ ? AITokenUsage.fromPartial(object.usage)
6580
6006
  : undefined;
6007
+ message.fundingMode = object.fundingMode ?? 0;
6008
+ message.effort = object.effort ?? "";
6581
6009
  return message;
6582
6010
  },
6583
6011
  };
@@ -8309,7 +7737,7 @@ export const GitActivitySummaryBucket: MessageFns<GitActivitySummaryBucket> = {
8309
7737
  };
8310
7738
 
8311
7739
  function createBaseGitActivitySummaryGroup(): GitActivitySummaryGroup {
8312
- return { key: "", measures: undefined };
7740
+ return { key: "", measures: undefined, sourceSystem: "" };
8313
7741
  }
8314
7742
 
8315
7743
  export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
@@ -8320,6 +7748,9 @@ export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
8320
7748
  if (message.measures !== undefined) {
8321
7749
  GitActivityMeasures.encode(message.measures, writer.uint32(18).fork()).join();
8322
7750
  }
7751
+ if (message.sourceSystem !== "") {
7752
+ writer.uint32(26).string(message.sourceSystem);
7753
+ }
8323
7754
  return writer;
8324
7755
  },
8325
7756
 
@@ -8352,6 +7783,14 @@ export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
8352
7783
  message.measures = GitActivityMeasures.decode(reader, reader.uint32());
8353
7784
  continue;
8354
7785
  }
7786
+ case 3: {
7787
+ if (tag !== 26) {
7788
+ break;
7789
+ }
7790
+
7791
+ message.sourceSystem = reader.string();
7792
+ continue;
7793
+ }
8355
7794
  }
8356
7795
  if ((tag & 7) === 4 || tag === 0) {
8357
7796
  break;
@@ -8368,6 +7807,11 @@ export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
8368
7807
  return {
8369
7808
  key: isSet(object.key) ? globalThis.String(object.key) : "",
8370
7809
  measures: isSet(object.measures) ? GitActivityMeasures.fromJSON(object.measures) : undefined,
7810
+ sourceSystem: isSet(object.sourceSystem)
7811
+ ? globalThis.String(object.sourceSystem)
7812
+ : isSet(object.source_system)
7813
+ ? globalThis.String(object.source_system)
7814
+ : "",
8371
7815
  };
8372
7816
  },
8373
7817
 
@@ -8379,6 +7823,9 @@ export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
8379
7823
  if (message.measures !== undefined) {
8380
7824
  obj.measures = GitActivityMeasures.toJSON(message.measures);
8381
7825
  }
7826
+ if (message.sourceSystem !== "") {
7827
+ obj.sourceSystem = message.sourceSystem;
7828
+ }
8382
7829
  return obj;
8383
7830
  },
8384
7831
 
@@ -8391,6 +7838,7 @@ export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
8391
7838
  message.measures = (object.measures !== undefined && object.measures !== null)
8392
7839
  ? GitActivityMeasures.fromPartial(object.measures)
8393
7840
  : undefined;
7841
+ message.sourceSystem = object.sourceSystem ?? "";
8394
7842
  return message;
8395
7843
  },
8396
7844
  };
@@ -11707,7 +11155,7 @@ export const ProjectOverviewRequest: MessageFns<ProjectOverviewRequest> = {
11707
11155
  };
11708
11156
 
11709
11157
  function createBaseProjectOverview(): ProjectOverview {
11710
- return { totals: undefined, byModel: [], byProvider: [], bySource: [], topSessions: [] };
11158
+ return { totals: undefined, byModel: [], byProvider: [], bySource: [], topSessions: [], byEffort: [] };
11711
11159
  }
11712
11160
 
11713
11161
  export const ProjectOverview: MessageFns<ProjectOverview> = {
@@ -11727,6 +11175,9 @@ export const ProjectOverview: MessageFns<ProjectOverview> = {
11727
11175
  for (const v of message.topSessions) {
11728
11176
  ProjectSessionRef.encode(v!, writer.uint32(42).fork()).join();
11729
11177
  }
11178
+ for (const v of message.byEffort) {
11179
+ ProjectOverviewSlice.encode(v!, writer.uint32(50).fork()).join();
11180
+ }
11730
11181
  return writer;
11731
11182
  },
11732
11183
 
@@ -11783,6 +11234,14 @@ export const ProjectOverview: MessageFns<ProjectOverview> = {
11783
11234
  message.topSessions.push(ProjectSessionRef.decode(reader, reader.uint32()));
11784
11235
  continue;
11785
11236
  }
11237
+ case 6: {
11238
+ if (tag !== 50) {
11239
+ break;
11240
+ }
11241
+
11242
+ message.byEffort.push(ProjectOverviewSlice.decode(reader, reader.uint32()));
11243
+ continue;
11244
+ }
11786
11245
  }
11787
11246
  if ((tag & 7) === 4 || tag === 0) {
11788
11247
  break;
@@ -11818,6 +11277,11 @@ export const ProjectOverview: MessageFns<ProjectOverview> = {
11818
11277
  : globalThis.Array.isArray(object?.top_sessions)
11819
11278
  ? object.top_sessions.map((e: any) => ProjectSessionRef.fromJSON(e))
11820
11279
  : [],
11280
+ byEffort: globalThis.Array.isArray(object?.byEffort)
11281
+ ? object.byEffort.map((e: any) => ProjectOverviewSlice.fromJSON(e))
11282
+ : globalThis.Array.isArray(object?.by_effort)
11283
+ ? object.by_effort.map((e: any) => ProjectOverviewSlice.fromJSON(e))
11284
+ : [],
11821
11285
  };
11822
11286
  },
11823
11287
 
@@ -11838,6 +11302,9 @@ export const ProjectOverview: MessageFns<ProjectOverview> = {
11838
11302
  if (message.topSessions?.length) {
11839
11303
  obj.topSessions = message.topSessions.map((e) => ProjectSessionRef.toJSON(e));
11840
11304
  }
11305
+ if (message.byEffort?.length) {
11306
+ obj.byEffort = message.byEffort.map((e) => ProjectOverviewSlice.toJSON(e));
11307
+ }
11841
11308
  return obj;
11842
11309
  },
11843
11310
 
@@ -11853,6 +11320,7 @@ export const ProjectOverview: MessageFns<ProjectOverview> = {
11853
11320
  message.byProvider = object.byProvider?.map((e) => ProjectOverviewSlice.fromPartial(e)) || [];
11854
11321
  message.bySource = object.bySource?.map((e) => ProjectOverviewSlice.fromPartial(e)) || [];
11855
11322
  message.topSessions = object.topSessions?.map((e) => ProjectSessionRef.fromPartial(e)) || [];
11323
+ message.byEffort = object.byEffort?.map((e) => ProjectOverviewSlice.fromPartial(e)) || [];
11856
11324
  return message;
11857
11325
  },
11858
11326
  };
@@ -14695,7 +14163,7 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14695
14163
  };
14696
14164
 
14697
14165
  function createBaseFileGroup(): FileGroup {
14698
- return { key: "", tiers: undefined };
14166
+ return { key: "", tiers: undefined, sourceSystem: "" };
14699
14167
  }
14700
14168
 
14701
14169
  export const FileGroup: MessageFns<FileGroup> = {
@@ -14706,6 +14174,9 @@ export const FileGroup: MessageFns<FileGroup> = {
14706
14174
  if (message.tiers !== undefined) {
14707
14175
  FileTiers.encode(message.tiers, writer.uint32(18).fork()).join();
14708
14176
  }
14177
+ if (message.sourceSystem !== "") {
14178
+ writer.uint32(26).string(message.sourceSystem);
14179
+ }
14709
14180
  return writer;
14710
14181
  },
14711
14182
 
@@ -14738,6 +14209,14 @@ export const FileGroup: MessageFns<FileGroup> = {
14738
14209
  message.tiers = FileTiers.decode(reader, reader.uint32());
14739
14210
  continue;
14740
14211
  }
14212
+ case 3: {
14213
+ if (tag !== 26) {
14214
+ break;
14215
+ }
14216
+
14217
+ message.sourceSystem = reader.string();
14218
+ continue;
14219
+ }
14741
14220
  }
14742
14221
  if ((tag & 7) === 4 || tag === 0) {
14743
14222
  break;
@@ -14754,6 +14233,11 @@ export const FileGroup: MessageFns<FileGroup> = {
14754
14233
  return {
14755
14234
  key: isSet(object.key) ? globalThis.String(object.key) : "",
14756
14235
  tiers: isSet(object.tiers) ? FileTiers.fromJSON(object.tiers) : undefined,
14236
+ sourceSystem: isSet(object.sourceSystem)
14237
+ ? globalThis.String(object.sourceSystem)
14238
+ : isSet(object.source_system)
14239
+ ? globalThis.String(object.source_system)
14240
+ : "",
14757
14241
  };
14758
14242
  },
14759
14243
 
@@ -14765,6 +14249,9 @@ export const FileGroup: MessageFns<FileGroup> = {
14765
14249
  if (message.tiers !== undefined) {
14766
14250
  obj.tiers = FileTiers.toJSON(message.tiers);
14767
14251
  }
14252
+ if (message.sourceSystem !== "") {
14253
+ obj.sourceSystem = message.sourceSystem;
14254
+ }
14768
14255
  return obj;
14769
14256
  },
14770
14257
 
@@ -14777,6 +14264,7 @@ export const FileGroup: MessageFns<FileGroup> = {
14777
14264
  message.tiers = (object.tiers !== undefined && object.tiers !== null)
14778
14265
  ? FileTiers.fromPartial(object.tiers)
14779
14266
  : undefined;
14267
+ message.sourceSystem = object.sourceSystem ?? "";
14780
14268
  return message;
14781
14269
  },
14782
14270
  };
@@ -16221,7 +15709,7 @@ export const EntitlementsSnapshot: MessageFns<EntitlementsSnapshot> = {
16221
15709
 
16222
15710
  function createBaseSeatEntitlement(): SeatEntitlement {
16223
15711
  return {
16224
- sourceSystem: "",
15712
+ billingParty: "",
16225
15713
  accountId: "",
16226
15714
  principalId: "",
16227
15715
  principalName: "",
@@ -16233,13 +15721,16 @@ function createBaseSeatEntitlement(): SeatEntitlement {
16233
15721
  planType: "",
16234
15722
  seatTier: "",
16235
15723
  evidenceSource: "",
15724
+ sourceSystems: [],
15725
+ principalSourceSystem: "",
15726
+ accountUserId: "",
16236
15727
  };
16237
15728
  }
16238
15729
 
16239
15730
  export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16240
15731
  encode(message: SeatEntitlement, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
16241
- if (message.sourceSystem !== "") {
16242
- writer.uint32(10).string(message.sourceSystem);
15732
+ if (message.billingParty !== "") {
15733
+ writer.uint32(10).string(message.billingParty);
16243
15734
  }
16244
15735
  if (message.accountId !== "") {
16245
15736
  writer.uint32(18).string(message.accountId);
@@ -16274,6 +15765,15 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16274
15765
  if (message.evidenceSource !== "") {
16275
15766
  writer.uint32(98).string(message.evidenceSource);
16276
15767
  }
15768
+ for (const v of message.sourceSystems) {
15769
+ writer.uint32(106).string(v!);
15770
+ }
15771
+ if (message.principalSourceSystem !== "") {
15772
+ writer.uint32(114).string(message.principalSourceSystem);
15773
+ }
15774
+ if (message.accountUserId !== "") {
15775
+ writer.uint32(122).string(message.accountUserId);
15776
+ }
16277
15777
  return writer;
16278
15778
  },
16279
15779
 
@@ -16295,7 +15795,7 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16295
15795
  break;
16296
15796
  }
16297
15797
 
16298
- message.sourceSystem = reader.string();
15798
+ message.billingParty = reader.string();
16299
15799
  continue;
16300
15800
  }
16301
15801
  case 2: {
@@ -16386,6 +15886,30 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16386
15886
  message.evidenceSource = reader.string();
16387
15887
  continue;
16388
15888
  }
15889
+ case 13: {
15890
+ if (tag !== 106) {
15891
+ break;
15892
+ }
15893
+
15894
+ message.sourceSystems.push(reader.string());
15895
+ continue;
15896
+ }
15897
+ case 14: {
15898
+ if (tag !== 114) {
15899
+ break;
15900
+ }
15901
+
15902
+ message.principalSourceSystem = reader.string();
15903
+ continue;
15904
+ }
15905
+ case 15: {
15906
+ if (tag !== 122) {
15907
+ break;
15908
+ }
15909
+
15910
+ message.accountUserId = reader.string();
15911
+ continue;
15912
+ }
16389
15913
  }
16390
15914
  if ((tag & 7) === 4 || tag === 0) {
16391
15915
  break;
@@ -16400,10 +15924,10 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16400
15924
 
16401
15925
  fromJSON(object: any): SeatEntitlement {
16402
15926
  return {
16403
- sourceSystem: isSet(object.sourceSystem)
16404
- ? globalThis.String(object.sourceSystem)
16405
- : isSet(object.source_system)
16406
- ? globalThis.String(object.source_system)
15927
+ billingParty: isSet(object.billingParty)
15928
+ ? globalThis.String(object.billingParty)
15929
+ : isSet(object.billing_party)
15930
+ ? globalThis.String(object.billing_party)
16407
15931
  : "",
16408
15932
  accountId: isSet(object.accountId)
16409
15933
  ? globalThis.String(object.accountId)
@@ -16458,13 +15982,28 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16458
15982
  : isSet(object.evidence_source)
16459
15983
  ? globalThis.String(object.evidence_source)
16460
15984
  : "",
15985
+ sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
15986
+ ? object.sourceSystems.map((e: any) => globalThis.String(e))
15987
+ : globalThis.Array.isArray(object?.source_systems)
15988
+ ? object.source_systems.map((e: any) => globalThis.String(e))
15989
+ : [],
15990
+ principalSourceSystem: isSet(object.principalSourceSystem)
15991
+ ? globalThis.String(object.principalSourceSystem)
15992
+ : isSet(object.principal_source_system)
15993
+ ? globalThis.String(object.principal_source_system)
15994
+ : "",
15995
+ accountUserId: isSet(object.accountUserId)
15996
+ ? globalThis.String(object.accountUserId)
15997
+ : isSet(object.account_user_id)
15998
+ ? globalThis.String(object.account_user_id)
15999
+ : "",
16461
16000
  };
16462
16001
  },
16463
16002
 
16464
16003
  toJSON(message: SeatEntitlement): unknown {
16465
16004
  const obj: any = {};
16466
- if (message.sourceSystem !== "") {
16467
- obj.sourceSystem = message.sourceSystem;
16005
+ if (message.billingParty !== "") {
16006
+ obj.billingParty = message.billingParty;
16468
16007
  }
16469
16008
  if (message.accountId !== "") {
16470
16009
  obj.accountId = message.accountId;
@@ -16499,6 +16038,15 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16499
16038
  if (message.evidenceSource !== "") {
16500
16039
  obj.evidenceSource = message.evidenceSource;
16501
16040
  }
16041
+ if (message.sourceSystems?.length) {
16042
+ obj.sourceSystems = message.sourceSystems;
16043
+ }
16044
+ if (message.principalSourceSystem !== "") {
16045
+ obj.principalSourceSystem = message.principalSourceSystem;
16046
+ }
16047
+ if (message.accountUserId !== "") {
16048
+ obj.accountUserId = message.accountUserId;
16049
+ }
16502
16050
  return obj;
16503
16051
  },
16504
16052
 
@@ -16507,7 +16055,7 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16507
16055
  },
16508
16056
  fromPartial<I extends Exact<DeepPartial<SeatEntitlement>, I>>(object: I): SeatEntitlement {
16509
16057
  const message = createBaseSeatEntitlement();
16510
- message.sourceSystem = object.sourceSystem ?? "";
16058
+ message.billingParty = object.billingParty ?? "";
16511
16059
  message.accountId = object.accountId ?? "";
16512
16060
  message.principalId = object.principalId ?? "";
16513
16061
  message.principalName = object.principalName ?? "";
@@ -16519,6 +16067,9 @@ export const SeatEntitlement: MessageFns<SeatEntitlement> = {
16519
16067
  message.planType = object.planType ?? "";
16520
16068
  message.seatTier = object.seatTier ?? "";
16521
16069
  message.evidenceSource = object.evidenceSource ?? "";
16070
+ message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
16071
+ message.principalSourceSystem = object.principalSourceSystem ?? "";
16072
+ message.accountUserId = object.accountUserId ?? "";
16522
16073
  return message;
16523
16074
  },
16524
16075
  };
@@ -16698,8 +16249,6 @@ export interface AIGatewayService {
16698
16249
  ): Observable<SessionTokenTimeline>;
16699
16250
  /** Live "Files changed" card: per file the latest-observed git change-type + exact --numstat churn. */
16700
16251
  StreamSessionFileChanges(request: SessionFileChangesRequest, metadata?: Metadata): Observable<SessionFileChanges>;
16701
- ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
16702
- UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
16703
16252
  /** Filtered, keyset-paginated drill-down feed of git/GitHub actions (newest first). */
16704
16253
  ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
16705
16254
  /**
@@ -16787,8 +16336,6 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
16787
16336
  this.StreamSessionEvents = this.StreamSessionEvents.bind(this);
16788
16337
  this.StreamSessionTokenTimeline = this.StreamSessionTokenTimeline.bind(this);
16789
16338
  this.StreamSessionFileChanges = this.StreamSessionFileChanges.bind(this);
16790
- this.ListPrincipals = this.ListPrincipals.bind(this);
16791
- this.UpdatePrincipal = this.UpdatePrincipal.bind(this);
16792
16339
  this.ListGitActivities = this.ListGitActivities.bind(this);
16793
16340
  this.StreamGitActivities = this.StreamGitActivities.bind(this);
16794
16341
  this.StreamGitActivitySummary = this.StreamGitActivitySummary.bind(this);
@@ -16849,18 +16396,6 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
16849
16396
  return result.pipe(map((data) => SessionFileChanges.decode(new BinaryReader(data))));
16850
16397
  }
16851
16398
 
16852
- ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse> {
16853
- const data = ListPrincipalsRequest.encode(request).finish();
16854
- const promise = this.rpc.request(this.service, "ListPrincipals", data, metadata);
16855
- return promise.then((data) => ListPrincipalsResponse.decode(new BinaryReader(data)));
16856
- }
16857
-
16858
- UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse> {
16859
- const data = UpdatePrincipalRequest.encode(request).finish();
16860
- const promise = this.rpc.request(this.service, "UpdatePrincipal", data, metadata);
16861
- return promise.then((data) => UpdatePrincipalResponse.decode(new BinaryReader(data)));
16862
- }
16863
-
16864
16399
  ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse> {
16865
16400
  const data = ListGitActivitiesRequest.encode(request).finish();
16866
16401
  const promise = this.rpc.request(this.service, "ListGitActivities", data, metadata);