@miradorlabs/web-grpc 3.31.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "3.31.0",
3
+ "version": "3.32.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",
@@ -26,7 +26,8 @@ export const protobufPackage = "gateway.web.v1";
26
26
 
27
27
  /**
28
28
  * SessionSort ranks the conversation catalog, descending. Unspecified is RECENCY. RECENCY is the last activity;
29
- * the rest are summed conversation totals. source_system, then session_id, breaks ties.
29
+ * the rest are summed conversation totals. source_system, then session_id, breaks ties. A value the backend does
30
+ * not know is rejected with INVALID_ARGUMENT.
30
31
  */
31
32
  export enum SessionSort {
32
33
  SESSION_SORT_UNSPECIFIED = 0,
@@ -35,6 +36,8 @@ export enum SessionSort {
35
36
  SESSION_SORT_TURNS = 3,
36
37
  SESSION_SORT_TOOLS = 4,
37
38
  SESSION_SORT_RECENCY = 5,
39
+ /** SESSION_SORT_NET_COST - provider cost less its subscription facility slice (at least 0) */
40
+ SESSION_SORT_NET_COST = 6,
38
41
  UNRECOGNIZED = -1,
39
42
  }
40
43
 
@@ -58,6 +61,9 @@ export function sessionSortFromJSON(object: any): SessionSort {
58
61
  case 5:
59
62
  case "SESSION_SORT_RECENCY":
60
63
  return SessionSort.SESSION_SORT_RECENCY;
64
+ case 6:
65
+ case "SESSION_SORT_NET_COST":
66
+ return SessionSort.SESSION_SORT_NET_COST;
61
67
  case -1:
62
68
  case "UNRECOGNIZED":
63
69
  default:
@@ -79,6 +85,8 @@ export function sessionSortToJSON(object: SessionSort): string {
79
85
  return "SESSION_SORT_TOOLS";
80
86
  case SessionSort.SESSION_SORT_RECENCY:
81
87
  return "SESSION_SORT_RECENCY";
88
+ case SessionSort.SESSION_SORT_NET_COST:
89
+ return "SESSION_SORT_NET_COST";
82
90
  case SessionSort.UNRECOGNIZED:
83
91
  default:
84
92
  return "UNRECOGNIZED";
@@ -1780,11 +1788,14 @@ export interface ModelActivity {
1780
1788
  toolCalls: number;
1781
1789
  compactions: number;
1782
1790
  subagentRuns: number;
1791
+ /** Time to first token over the status-known calls that report a positive one, and those calls. */
1783
1792
  ttftMsSum: number;
1784
1793
  ttftCalls: number;
1785
1794
  providers: string[];
1786
1795
  /** busiest first, at most 200; user id, else api key */
1787
1796
  principals: ModelActivityPrincipal[];
1797
+ /** Calls that reported a status, the denominator of failed_calls; absent (an older backend) means unavailable. */
1798
+ settledCalls?: number | undefined;
1788
1799
  }
1789
1800
 
1790
1801
  export interface ModelActivityPrincipal {
@@ -14893,6 +14904,7 @@ function createBaseModelActivity(): ModelActivity {
14893
14904
  ttftCalls: 0,
14894
14905
  providers: [],
14895
14906
  principals: [],
14907
+ settledCalls: undefined,
14896
14908
  };
14897
14909
  }
14898
14910
 
@@ -14949,6 +14961,9 @@ export const ModelActivity: MessageFns<ModelActivity> = {
14949
14961
  for (const v of message.principals) {
14950
14962
  ModelActivityPrincipal.encode(v!, writer.uint32(138).fork()).join();
14951
14963
  }
14964
+ if (message.settledCalls !== undefined) {
14965
+ writer.uint32(144).uint64(message.settledCalls);
14966
+ }
14952
14967
  return writer;
14953
14968
  },
14954
14969
 
@@ -15101,6 +15116,14 @@ export const ModelActivity: MessageFns<ModelActivity> = {
15101
15116
  message.principals.push(ModelActivityPrincipal.decode(reader, reader.uint32()));
15102
15117
  continue;
15103
15118
  }
15119
+ case 18: {
15120
+ if (tag !== 144) {
15121
+ break;
15122
+ }
15123
+
15124
+ message.settledCalls = longToNumber(reader.uint64());
15125
+ continue;
15126
+ }
15104
15127
  }
15105
15128
  if ((tag & 7) === 4 || tag === 0) {
15106
15129
  break;
@@ -15184,6 +15207,11 @@ export const ModelActivity: MessageFns<ModelActivity> = {
15184
15207
  principals: globalThis.Array.isArray(object?.principals)
15185
15208
  ? object.principals.map((e: any) => ModelActivityPrincipal.fromJSON(e))
15186
15209
  : [],
15210
+ settledCalls: isSet(object.settledCalls)
15211
+ ? globalThis.Number(object.settledCalls)
15212
+ : isSet(object.settled_calls)
15213
+ ? globalThis.Number(object.settled_calls)
15214
+ : undefined,
15187
15215
  };
15188
15216
  },
15189
15217
 
@@ -15240,6 +15268,9 @@ export const ModelActivity: MessageFns<ModelActivity> = {
15240
15268
  if (message.principals?.length) {
15241
15269
  obj.principals = message.principals.map((e) => ModelActivityPrincipal.toJSON(e));
15242
15270
  }
15271
+ if (message.settledCalls !== undefined) {
15272
+ obj.settledCalls = Math.round(message.settledCalls);
15273
+ }
15243
15274
  return obj;
15244
15275
  },
15245
15276
 
@@ -15265,6 +15296,7 @@ export const ModelActivity: MessageFns<ModelActivity> = {
15265
15296
  message.ttftCalls = object.ttftCalls ?? 0;
15266
15297
  message.providers = object.providers?.map((e) => e) || [];
15267
15298
  message.principals = object.principals?.map((e) => ModelActivityPrincipal.fromPartial(e)) || [];
15299
+ message.settledCalls = object.settledCalls ?? undefined;
15268
15300
  return message;
15269
15301
  },
15270
15302
  };
@@ -26622,7 +26622,8 @@ ttftMsSum: jspb.Message.getFieldWithDefault(msg, 14, 0),
26622
26622
  ttftCalls: jspb.Message.getFieldWithDefault(msg, 15, 0),
26623
26623
  providersList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f,
26624
26624
  principalsList: jspb.Message.toObjectList(msg.getPrincipalsList(),
26625
- proto.gateway.web.v1.ModelActivityPrincipal.toObject, includeInstance)
26625
+ proto.gateway.web.v1.ModelActivityPrincipal.toObject, includeInstance),
26626
+ settledCalls: (f = jspb.Message.getField(msg, 18)) == null ? undefined : f
26626
26627
  };
26627
26628
 
26628
26629
  if (includeInstance) {
@@ -26728,6 +26729,10 @@ proto.gateway.web.v1.ModelActivity.deserializeBinaryFromReader = function(msg, r
26728
26729
  reader.readMessage(value,proto.gateway.web.v1.ModelActivityPrincipal.deserializeBinaryFromReader);
26729
26730
  msg.addPrincipals(value);
26730
26731
  break;
26732
+ case 18:
26733
+ var value = /** @type {number} */ (reader.readUint64());
26734
+ msg.setSettledCalls(value);
26735
+ break;
26731
26736
  default:
26732
26737
  reader.skipField();
26733
26738
  break;
@@ -26877,6 +26882,13 @@ proto.gateway.web.v1.ModelActivity.serializeBinaryToWriter = function(message, w
26877
26882
  proto.gateway.web.v1.ModelActivityPrincipal.serializeBinaryToWriter
26878
26883
  );
26879
26884
  }
26885
+ f = /** @type {number} */ (jspb.Message.getField(message, 18));
26886
+ if (f != null) {
26887
+ writer.writeUint64(
26888
+ 18,
26889
+ f
26890
+ );
26891
+ }
26880
26892
  };
26881
26893
 
26882
26894
 
@@ -27225,6 +27237,42 @@ proto.gateway.web.v1.ModelActivity.prototype.clearPrincipalsList = function() {
27225
27237
  };
27226
27238
 
27227
27239
 
27240
+ /**
27241
+ * optional uint64 settled_calls = 18;
27242
+ * @return {number}
27243
+ */
27244
+ proto.gateway.web.v1.ModelActivity.prototype.getSettledCalls = function() {
27245
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0));
27246
+ };
27247
+
27248
+
27249
+ /**
27250
+ * @param {number} value
27251
+ * @return {!proto.gateway.web.v1.ModelActivity} returns this
27252
+ */
27253
+ proto.gateway.web.v1.ModelActivity.prototype.setSettledCalls = function(value) {
27254
+ return jspb.Message.setField(this, 18, value);
27255
+ };
27256
+
27257
+
27258
+ /**
27259
+ * Clears the field making it undefined.
27260
+ * @return {!proto.gateway.web.v1.ModelActivity} returns this
27261
+ */
27262
+ proto.gateway.web.v1.ModelActivity.prototype.clearSettledCalls = function() {
27263
+ return jspb.Message.setField(this, 18, undefined);
27264
+ };
27265
+
27266
+
27267
+ /**
27268
+ * Returns whether this field is set.
27269
+ * @return {boolean}
27270
+ */
27271
+ proto.gateway.web.v1.ModelActivity.prototype.hasSettledCalls = function() {
27272
+ return jspb.Message.getField(this, 18) != null;
27273
+ };
27274
+
27275
+
27228
27276
 
27229
27277
 
27230
27278
 
@@ -37703,7 +37751,8 @@ proto.gateway.web.v1.SessionSort = {
37703
37751
  SESSION_SORT_TOKENS: 2,
37704
37752
  SESSION_SORT_TURNS: 3,
37705
37753
  SESSION_SORT_TOOLS: 4,
37706
- SESSION_SORT_RECENCY: 5
37754
+ SESSION_SORT_RECENCY: 5,
37755
+ SESSION_SORT_NET_COST: 6
37707
37756
  };
37708
37757
 
37709
37758
  /**
@@ -2127,6 +2127,13 @@ export const GitHubFilesResponse: MessageFns<GitHubFilesResponse> = {
2127
2127
  export interface GitHubGatewayService {
2128
2128
  GetGitHubConnector(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
2129
2129
  BeginGitHubConnection(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubBeginResponse>;
2130
+ /**
2131
+ * Completes the connection from GitHub's callback. Without an installation_id
2132
+ * it answers STATUS_CODE_NOT_FOUND only when the signed-in GitHub user has no
2133
+ * installation of the app: the client's cue to send them to the app's
2134
+ * install page and then connect. When every installation they have is
2135
+ * suspended it answers STATUS_CODE_VALIDATION_ERROR, to unsuspend it on GitHub.
2136
+ */
2130
2137
  CompleteGitHubConnection(request: GitHubCompleteRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
2131
2138
  DisconnectGitHubConnection(request: GitHubDisconnectRequest, metadata?: Metadata): Promise<GitHubEmptyResponse>;
2132
2139
  ListGitHubRepositories(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubRepositoriesResponse>;
@@ -153,7 +153,12 @@ var GitHubGatewayServiceService = exports.GitHubGatewayServiceService = {
153
153
  responseSerialize: serialize_gateway_web_v1_GitHubBeginResponse,
154
154
  responseDeserialize: deserialize_gateway_web_v1_GitHubBeginResponse,
155
155
  },
156
- completeGitHubConnection: {
156
+ // Completes the connection from GitHub's callback. Without an installation_id
157
+ // it answers STATUS_CODE_NOT_FOUND only when the signed-in GitHub user has no
158
+ // installation of the app: the client's cue to send them to the app's
159
+ // install page and then connect. When every installation they have is
160
+ // suspended it answers STATUS_CODE_VALIDATION_ERROR, to unsuspend it on GitHub.
161
+ completeGitHubConnection: {
157
162
  path: '/gateway.web.v1.GitHubGatewayService/CompleteGitHubConnection',
158
163
  requestStream: false,
159
164
  responseStream: false,