@miradorlabs/web-grpc 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -2234,6 +2234,49 @@ export function trackerSyncErrorToJSON(object: TrackerSyncError): string {
2234
2234
  }
2235
2235
  }
2236
2236
 
2237
+ /**
2238
+ * AIAgentKind is whose run made a model call: the session's main thread or a subagent run inside it. Mirrors
2239
+ * ai.api.v1.
2240
+ */
2241
+ export enum AIAgentKind {
2242
+ AI_AGENT_KIND_UNSPECIFIED = 0,
2243
+ AI_AGENT_KIND_MAIN = 1,
2244
+ AI_AGENT_KIND_SUBAGENT = 2,
2245
+ UNRECOGNIZED = -1,
2246
+ }
2247
+
2248
+ export function aIAgentKindFromJSON(object: any): AIAgentKind {
2249
+ switch (object) {
2250
+ case 0:
2251
+ case "AI_AGENT_KIND_UNSPECIFIED":
2252
+ return AIAgentKind.AI_AGENT_KIND_UNSPECIFIED;
2253
+ case 1:
2254
+ case "AI_AGENT_KIND_MAIN":
2255
+ return AIAgentKind.AI_AGENT_KIND_MAIN;
2256
+ case 2:
2257
+ case "AI_AGENT_KIND_SUBAGENT":
2258
+ return AIAgentKind.AI_AGENT_KIND_SUBAGENT;
2259
+ case -1:
2260
+ case "UNRECOGNIZED":
2261
+ default:
2262
+ return AIAgentKind.UNRECOGNIZED;
2263
+ }
2264
+ }
2265
+
2266
+ export function aIAgentKindToJSON(object: AIAgentKind): string {
2267
+ switch (object) {
2268
+ case AIAgentKind.AI_AGENT_KIND_UNSPECIFIED:
2269
+ return "AI_AGENT_KIND_UNSPECIFIED";
2270
+ case AIAgentKind.AI_AGENT_KIND_MAIN:
2271
+ return "AI_AGENT_KIND_MAIN";
2272
+ case AIAgentKind.AI_AGENT_KIND_SUBAGENT:
2273
+ return "AI_AGENT_KIND_SUBAGENT";
2274
+ case AIAgentKind.UNRECOGNIZED:
2275
+ default:
2276
+ return "UNRECOGNIZED";
2277
+ }
2278
+ }
2279
+
2237
2280
  export interface ListSessionsRequest {
2238
2281
  organizationId: string;
2239
2282
  projectId: string;
@@ -3443,7 +3486,10 @@ export interface ListModelReasoningResponse {
3443
3486
  status:
3444
3487
  | ResponseStatus
3445
3488
  | undefined;
3446
- /** Calls descending, then model_key, then effort_key ascending. */
3489
+ /**
3490
+ * One per (model_key, effort_key, agent_kind): calls descending, then model_key, effort_key and agent_kind
3491
+ * ascending (MAIN before SUBAGENT).
3492
+ */
3447
3493
  models: ModelReasoning[];
3448
3494
  coverage: ReasoningCoverage | undefined;
3449
3495
  servedModels: ReasoningServedModels | undefined;
@@ -3452,7 +3498,7 @@ export interface ListModelReasoningResponse {
3452
3498
  }
3453
3499
 
3454
3500
  /**
3455
- * One (model, effort) pair: counted calls report a thinking count (zero included); percentiles are exact, the
3501
+ * One (model, effort, agent kind): counted calls report a thinking count (zero included); percentiles are exact, the
3456
3502
  * smallest value whose cumulative count reaches ceil(level × n) (the lower middle value for an even n); a
3457
3503
  * percentile is absent when its count is 0.
3458
3504
  */
@@ -3464,11 +3510,22 @@ export interface ModelReasoning {
3464
3510
  countedCalls: number;
3465
3511
  zeroThinkingCalls: number;
3466
3512
  medianPerCall?: number | undefined;
3467
- p90PerCall?: number | undefined;
3513
+ p90PerCall?:
3514
+ | number
3515
+ | undefined;
3516
+ /** A turn with counted calls of both agent kinds counts in both rows, each summing only its own kind's calls. */
3468
3517
  countedTurns: number;
3469
- medianPerTurn?: number | undefined;
3518
+ medianPerTurn?:
3519
+ | number
3520
+ | undefined;
3521
+ /**
3522
+ * SUBAGENT when the source marked the calls a subagent's, else MAIN: a source that does not report subagents
3523
+ * reports every call as MAIN. Never UNSPECIFIED.
3524
+ */
3525
+ agentKind: AIAgentKind;
3470
3526
  }
3471
3527
 
3528
+ /** Every call of the range, both agent kinds; calls and counted_calls are the sums over every row. */
3472
3529
  export interface ReasoningCoverage {
3473
3530
  calls: number;
3474
3531
  countedCalls: number;
@@ -3476,6 +3533,7 @@ export interface ReasoningCoverage {
3476
3533
  sourceSystems: string[];
3477
3534
  }
3478
3535
 
3536
+ /** What the providers say served the range's calls, both agent kinds. */
3479
3537
  export interface ReasoningServedModels {
3480
3538
  servedCalls: number;
3481
3539
  /** Recorded and served models folding to different keys: an observed mismatch, a lower bound on substitution. */
@@ -19567,6 +19625,7 @@ function createBaseModelReasoning(): ModelReasoning {
19567
19625
  p90PerCall: undefined,
19568
19626
  countedTurns: 0,
19569
19627
  medianPerTurn: undefined,
19628
+ agentKind: 0,
19570
19629
  };
19571
19630
  }
19572
19631
 
@@ -19599,6 +19658,9 @@ export const ModelReasoning: MessageFns<ModelReasoning> = {
19599
19658
  if (message.medianPerTurn !== undefined) {
19600
19659
  writer.uint32(72).uint64(message.medianPerTurn);
19601
19660
  }
19661
+ if (message.agentKind !== 0) {
19662
+ writer.uint32(80).int32(message.agentKind);
19663
+ }
19602
19664
  return writer;
19603
19665
  },
19604
19666
 
@@ -19687,6 +19749,14 @@ export const ModelReasoning: MessageFns<ModelReasoning> = {
19687
19749
  message.medianPerTurn = longToNumber(reader.uint64());
19688
19750
  continue;
19689
19751
  }
19752
+ case 10: {
19753
+ if (tag !== 80) {
19754
+ break;
19755
+ }
19756
+
19757
+ message.agentKind = reader.int32() as any;
19758
+ continue;
19759
+ }
19690
19760
  }
19691
19761
  if ((tag & 7) === 4 || tag === 0) {
19692
19762
  break;
@@ -19742,6 +19812,11 @@ export const ModelReasoning: MessageFns<ModelReasoning> = {
19742
19812
  : isSet(object.median_per_turn)
19743
19813
  ? globalThis.Number(object.median_per_turn)
19744
19814
  : undefined,
19815
+ agentKind: isSet(object.agentKind)
19816
+ ? aIAgentKindFromJSON(object.agentKind)
19817
+ : isSet(object.agent_kind)
19818
+ ? aIAgentKindFromJSON(object.agent_kind)
19819
+ : 0,
19745
19820
  };
19746
19821
  },
19747
19822
 
@@ -19774,6 +19849,9 @@ export const ModelReasoning: MessageFns<ModelReasoning> = {
19774
19849
  if (message.medianPerTurn !== undefined) {
19775
19850
  obj.medianPerTurn = Math.round(message.medianPerTurn);
19776
19851
  }
19852
+ if (message.agentKind !== 0) {
19853
+ obj.agentKind = aIAgentKindToJSON(message.agentKind);
19854
+ }
19777
19855
  return obj;
19778
19856
  },
19779
19857
 
@@ -19791,6 +19869,7 @@ export const ModelReasoning: MessageFns<ModelReasoning> = {
19791
19869
  message.p90PerCall = object.p90PerCall ?? undefined;
19792
19870
  message.countedTurns = object.countedTurns ?? 0;
19793
19871
  message.medianPerTurn = object.medianPerTurn ?? undefined;
19872
+ message.agentKind = object.agentKind ?? 0;
19794
19873
  return message;
19795
19874
  },
19796
19875
  };
@@ -32728,16 +32807,16 @@ export interface AIGatewayService {
32728
32807
  */
32729
32808
  ListModelActivity(request: ModelActivityRequest, metadata?: Metadata): Promise<ModelActivityResponse>;
32730
32809
  /**
32731
- * How much each model thought per call over a time range, one row per (model, effort) after groups fold stored
32732
- * spellings: counted calls and exact medians and p90 per call and per turn; with coverage and what served the
32733
- * calls. Counts only. Mirrors ai.api.v1.
32810
+ * How much each model thought per call over a time range, one row per (model, effort, agent kind) after groups
32811
+ * fold stored spellings: counted calls and exact medians and p90 per call and per turn; with coverage and what
32812
+ * served the calls. Counts only. Mirrors ai.api.v1.
32734
32813
  */
32735
32814
  ListModelReasoning(request: ListModelReasoningRequest, metadata?: Metadata): Promise<ListModelReasoningResponse>;
32736
32815
  /**
32737
- * The Across Terma reasoning trend for the 12 closed ISO weeks: per global model and effort key and computed week,
32738
- * the median change of the contributing organizations against their own baselines and the mean share of their
32739
- * teams below range, rounded, with the contributing organizations as a band. Aggregates only; pairs limited to keys
32740
- * the caller organization's data carries. Mirrors ai.api.v1.
32816
+ * The Across Terma reasoning trend for the 12 closed ISO weeks, judged on main-thread calls only: per global model
32817
+ * and effort key and computed week, the median change of the contributing organizations against their own
32818
+ * baselines and the mean share of their teams below range, rounded, with the contributing organizations as a band.
32819
+ * Aggregates only; pairs limited to keys the caller organization's data carries. Mirrors ai.api.v1.
32741
32820
  */
32742
32821
  ListModelReasoningTrend(
32743
32822
  request: ListModelReasoningTrendRequest,
@@ -1141,9 +1141,9 @@ listModelActivity: {
1141
1141
  responseSerialize: serialize_gateway_web_v1_ModelActivityResponse,
1142
1142
  responseDeserialize: deserialize_gateway_web_v1_ModelActivityResponse,
1143
1143
  },
1144
- // How much each model thought per call over a time range, one row per (model, effort) after groups fold stored
1145
- // spellings: counted calls and exact medians and p90 per call and per turn; with coverage and what served the
1146
- // calls. Counts only. Mirrors ai.api.v1.
1144
+ // How much each model thought per call over a time range, one row per (model, effort, agent kind) after groups
1145
+ // fold stored spellings: counted calls and exact medians and p90 per call and per turn; with coverage and what
1146
+ // served the calls. Counts only. Mirrors ai.api.v1.
1147
1147
  listModelReasoning: {
1148
1148
  path: '/gateway.web.v1.AIGatewayService/ListModelReasoning',
1149
1149
  requestStream: false,
@@ -1155,10 +1155,10 @@ listModelReasoning: {
1155
1155
  responseSerialize: serialize_gateway_web_v1_ListModelReasoningResponse,
1156
1156
  responseDeserialize: deserialize_gateway_web_v1_ListModelReasoningResponse,
1157
1157
  },
1158
- // The Across Terma reasoning trend for the 12 closed ISO weeks: per global model and effort key and computed week,
1159
- // the median change of the contributing organizations against their own baselines and the mean share of their
1160
- // teams below range, rounded, with the contributing organizations as a band. Aggregates only; pairs limited to keys
1161
- // the caller organization's data carries. Mirrors ai.api.v1.
1158
+ // The Across Terma reasoning trend for the 12 closed ISO weeks, judged on main-thread calls only: per global model
1159
+ // and effort key and computed week, the median change of the contributing organizations against their own
1160
+ // baselines and the mean share of their teams below range, rounded, with the contributing organizations as a band.
1161
+ // Aggregates only; pairs limited to keys the caller organization's data carries. Mirrors ai.api.v1.
1162
1162
  listModelReasoningTrend: {
1163
1163
  path: '/gateway.web.v1.AIGatewayService/ListModelReasoningTrend',
1164
1164
  requestStream: false,
@@ -27,6 +27,7 @@ var proto_gateway_web_v1_reference_gateway_pb = require('../../../../proto/gatew
27
27
  goog.object.extend(proto, proto_gateway_web_v1_reference_gateway_pb);
28
28
  var proto_gateway_web_v1_trace_gateway_pb = require('../../../../proto/gateway/web/v1/trace_gateway_pb.js');
29
29
  goog.object.extend(proto, proto_gateway_web_v1_trace_gateway_pb);
30
+ goog.exportSymbol('proto.gateway.web.v1.AIAgentKind', null, global);
30
31
  goog.exportSymbol('proto.gateway.web.v1.AIContentPart', null, global);
31
32
  goog.exportSymbol('proto.gateway.web.v1.AIEntitlementRole', null, global);
32
33
  goog.exportSymbol('proto.gateway.web.v1.AIFacilityCostBreakdown', null, global);
@@ -32594,7 +32595,8 @@ zeroThinkingCalls: jspb.Message.getFieldWithDefault(msg, 5, 0),
32594
32595
  medianPerCall: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
32595
32596
  p90PerCall: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
32596
32597
  countedTurns: jspb.Message.getFieldWithDefault(msg, 8, 0),
32597
- medianPerTurn: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f
32598
+ medianPerTurn: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f,
32599
+ agentKind: jspb.Message.getFieldWithDefault(msg, 10, 0)
32598
32600
  };
32599
32601
 
32600
32602
  if (includeInstance) {
@@ -32667,6 +32669,10 @@ proto.gateway.web.v1.ModelReasoning.deserializeBinaryFromReader = function(msg,
32667
32669
  var value = /** @type {number} */ (reader.readUint64());
32668
32670
  msg.setMedianPerTurn(value);
32669
32671
  break;
32672
+ case 10:
32673
+ var value = /** @type {!proto.gateway.web.v1.AIAgentKind} */ (reader.readEnum());
32674
+ msg.setAgentKind(value);
32675
+ break;
32670
32676
  default:
32671
32677
  reader.skipField();
32672
32678
  break;
@@ -32759,6 +32765,13 @@ proto.gateway.web.v1.ModelReasoning.serializeBinaryToWriter = function(message,
32759
32765
  f
32760
32766
  );
32761
32767
  }
32768
+ f = message.getAgentKind();
32769
+ if (f !== 0.0) {
32770
+ writer.writeEnum(
32771
+ 10,
32772
+ f
32773
+ );
32774
+ }
32762
32775
  };
32763
32776
 
32764
32777
 
@@ -32978,6 +32991,24 @@ proto.gateway.web.v1.ModelReasoning.prototype.hasMedianPerTurn = function() {
32978
32991
  };
32979
32992
 
32980
32993
 
32994
+ /**
32995
+ * optional AIAgentKind agent_kind = 10;
32996
+ * @return {!proto.gateway.web.v1.AIAgentKind}
32997
+ */
32998
+ proto.gateway.web.v1.ModelReasoning.prototype.getAgentKind = function() {
32999
+ return /** @type {!proto.gateway.web.v1.AIAgentKind} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
33000
+ };
33001
+
33002
+
33003
+ /**
33004
+ * @param {!proto.gateway.web.v1.AIAgentKind} value
33005
+ * @return {!proto.gateway.web.v1.ModelReasoning} returns this
33006
+ */
33007
+ proto.gateway.web.v1.ModelReasoning.prototype.setAgentKind = function(value) {
33008
+ return jspb.Message.setProto3EnumField(this, 10, value);
33009
+ };
33010
+
33011
+
32981
33012
 
32982
33013
  /**
32983
33014
  * List of repeated fields within this message type.
@@ -58012,4 +58043,13 @@ proto.gateway.web.v1.TrackerSyncError = {
58012
58043
  TRACKER_SYNC_ERROR_INTERNAL: 7
58013
58044
  };
58014
58045
 
58046
+ /**
58047
+ * @enum {number}
58048
+ */
58049
+ proto.gateway.web.v1.AIAgentKind = {
58050
+ AI_AGENT_KIND_UNSPECIFIED: 0,
58051
+ AI_AGENT_KIND_MAIN: 1,
58052
+ AI_AGENT_KIND_SUBAGENT: 2
58053
+ };
58054
+
58015
58055
  goog.object.extend(exports, proto.gateway.web.v1);