@miradorlabs/web-grpc 3.47.0 → 3.49.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 +1 -1
- package/proto/gateway/web/v1/ai_gateway.ts +1275 -95
- package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +35 -0
- package/proto/gateway/web/v1/ai_gateway_pb.js +2113 -210
- package/proto/gateway/web/v1/notification_gateway.ts +772 -0
- package/proto/gateway/web/v1/notification_gateway_grpc_pb.js +86 -0
- package/proto/gateway/web/v1/notification_gateway_pb.js +1323 -0
|
@@ -216,6 +216,209 @@ export function aISessionEventTypeToJSON(object: AISessionEventType): string {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
/** AIPromptComplexity is how much a prompt asks for, as a model judged it (MIR-469); mirrors ai.api.v1. */
|
|
220
|
+
export enum AIPromptComplexity {
|
|
221
|
+
/** AI_PROMPT_COMPLEXITY_UNSPECIFIED - not scored */
|
|
222
|
+
AI_PROMPT_COMPLEXITY_UNSPECIFIED = 0,
|
|
223
|
+
AI_PROMPT_COMPLEXITY_SIMPLE = 1,
|
|
224
|
+
AI_PROMPT_COMPLEXITY_MODERATE = 2,
|
|
225
|
+
AI_PROMPT_COMPLEXITY_COMPLEX = 3,
|
|
226
|
+
UNRECOGNIZED = -1,
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function aIPromptComplexityFromJSON(object: any): AIPromptComplexity {
|
|
230
|
+
switch (object) {
|
|
231
|
+
case 0:
|
|
232
|
+
case "AI_PROMPT_COMPLEXITY_UNSPECIFIED":
|
|
233
|
+
return AIPromptComplexity.AI_PROMPT_COMPLEXITY_UNSPECIFIED;
|
|
234
|
+
case 1:
|
|
235
|
+
case "AI_PROMPT_COMPLEXITY_SIMPLE":
|
|
236
|
+
return AIPromptComplexity.AI_PROMPT_COMPLEXITY_SIMPLE;
|
|
237
|
+
case 2:
|
|
238
|
+
case "AI_PROMPT_COMPLEXITY_MODERATE":
|
|
239
|
+
return AIPromptComplexity.AI_PROMPT_COMPLEXITY_MODERATE;
|
|
240
|
+
case 3:
|
|
241
|
+
case "AI_PROMPT_COMPLEXITY_COMPLEX":
|
|
242
|
+
return AIPromptComplexity.AI_PROMPT_COMPLEXITY_COMPLEX;
|
|
243
|
+
case -1:
|
|
244
|
+
case "UNRECOGNIZED":
|
|
245
|
+
default:
|
|
246
|
+
return AIPromptComplexity.UNRECOGNIZED;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function aIPromptComplexityToJSON(object: AIPromptComplexity): string {
|
|
251
|
+
switch (object) {
|
|
252
|
+
case AIPromptComplexity.AI_PROMPT_COMPLEXITY_UNSPECIFIED:
|
|
253
|
+
return "AI_PROMPT_COMPLEXITY_UNSPECIFIED";
|
|
254
|
+
case AIPromptComplexity.AI_PROMPT_COMPLEXITY_SIMPLE:
|
|
255
|
+
return "AI_PROMPT_COMPLEXITY_SIMPLE";
|
|
256
|
+
case AIPromptComplexity.AI_PROMPT_COMPLEXITY_MODERATE:
|
|
257
|
+
return "AI_PROMPT_COMPLEXITY_MODERATE";
|
|
258
|
+
case AIPromptComplexity.AI_PROMPT_COMPLEXITY_COMPLEX:
|
|
259
|
+
return "AI_PROMPT_COMPLEXITY_COMPLEX";
|
|
260
|
+
case AIPromptComplexity.UNRECOGNIZED:
|
|
261
|
+
default:
|
|
262
|
+
return "UNRECOGNIZED";
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** AIPromptSteering is what a prompt does in its session. */
|
|
267
|
+
export enum AIPromptSteering {
|
|
268
|
+
/** AI_PROMPT_STEERING_UNSPECIFIED - not scored */
|
|
269
|
+
AI_PROMPT_STEERING_UNSPECIFIED = 0,
|
|
270
|
+
AI_PROMPT_STEERING_NEW_TASK = 1,
|
|
271
|
+
AI_PROMPT_STEERING_FOLLOW_UP = 2,
|
|
272
|
+
AI_PROMPT_STEERING_CORRECTION = 3,
|
|
273
|
+
AI_PROMPT_STEERING_REDIRECT = 4,
|
|
274
|
+
AI_PROMPT_STEERING_APPROVAL = 5,
|
|
275
|
+
UNRECOGNIZED = -1,
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function aIPromptSteeringFromJSON(object: any): AIPromptSteering {
|
|
279
|
+
switch (object) {
|
|
280
|
+
case 0:
|
|
281
|
+
case "AI_PROMPT_STEERING_UNSPECIFIED":
|
|
282
|
+
return AIPromptSteering.AI_PROMPT_STEERING_UNSPECIFIED;
|
|
283
|
+
case 1:
|
|
284
|
+
case "AI_PROMPT_STEERING_NEW_TASK":
|
|
285
|
+
return AIPromptSteering.AI_PROMPT_STEERING_NEW_TASK;
|
|
286
|
+
case 2:
|
|
287
|
+
case "AI_PROMPT_STEERING_FOLLOW_UP":
|
|
288
|
+
return AIPromptSteering.AI_PROMPT_STEERING_FOLLOW_UP;
|
|
289
|
+
case 3:
|
|
290
|
+
case "AI_PROMPT_STEERING_CORRECTION":
|
|
291
|
+
return AIPromptSteering.AI_PROMPT_STEERING_CORRECTION;
|
|
292
|
+
case 4:
|
|
293
|
+
case "AI_PROMPT_STEERING_REDIRECT":
|
|
294
|
+
return AIPromptSteering.AI_PROMPT_STEERING_REDIRECT;
|
|
295
|
+
case 5:
|
|
296
|
+
case "AI_PROMPT_STEERING_APPROVAL":
|
|
297
|
+
return AIPromptSteering.AI_PROMPT_STEERING_APPROVAL;
|
|
298
|
+
case -1:
|
|
299
|
+
case "UNRECOGNIZED":
|
|
300
|
+
default:
|
|
301
|
+
return AIPromptSteering.UNRECOGNIZED;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function aIPromptSteeringToJSON(object: AIPromptSteering): string {
|
|
306
|
+
switch (object) {
|
|
307
|
+
case AIPromptSteering.AI_PROMPT_STEERING_UNSPECIFIED:
|
|
308
|
+
return "AI_PROMPT_STEERING_UNSPECIFIED";
|
|
309
|
+
case AIPromptSteering.AI_PROMPT_STEERING_NEW_TASK:
|
|
310
|
+
return "AI_PROMPT_STEERING_NEW_TASK";
|
|
311
|
+
case AIPromptSteering.AI_PROMPT_STEERING_FOLLOW_UP:
|
|
312
|
+
return "AI_PROMPT_STEERING_FOLLOW_UP";
|
|
313
|
+
case AIPromptSteering.AI_PROMPT_STEERING_CORRECTION:
|
|
314
|
+
return "AI_PROMPT_STEERING_CORRECTION";
|
|
315
|
+
case AIPromptSteering.AI_PROMPT_STEERING_REDIRECT:
|
|
316
|
+
return "AI_PROMPT_STEERING_REDIRECT";
|
|
317
|
+
case AIPromptSteering.AI_PROMPT_STEERING_APPROVAL:
|
|
318
|
+
return "AI_PROMPT_STEERING_APPROVAL";
|
|
319
|
+
case AIPromptSteering.UNRECOGNIZED:
|
|
320
|
+
default:
|
|
321
|
+
return "UNRECOGNIZED";
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* AIPromptFrustration is how much frustration with the agent a prompt shows. The numbers rise with severity and a new
|
|
327
|
+
* level is only ever appended above the most severe one. NONE is a score, not "not scored".
|
|
328
|
+
*/
|
|
329
|
+
export enum AIPromptFrustration {
|
|
330
|
+
/** AI_PROMPT_FRUSTRATION_UNSPECIFIED - not scored */
|
|
331
|
+
AI_PROMPT_FRUSTRATION_UNSPECIFIED = 0,
|
|
332
|
+
AI_PROMPT_FRUSTRATION_NONE = 1,
|
|
333
|
+
AI_PROMPT_FRUSTRATION_MILD = 2,
|
|
334
|
+
AI_PROMPT_FRUSTRATION_STRONG = 3,
|
|
335
|
+
UNRECOGNIZED = -1,
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function aIPromptFrustrationFromJSON(object: any): AIPromptFrustration {
|
|
339
|
+
switch (object) {
|
|
340
|
+
case 0:
|
|
341
|
+
case "AI_PROMPT_FRUSTRATION_UNSPECIFIED":
|
|
342
|
+
return AIPromptFrustration.AI_PROMPT_FRUSTRATION_UNSPECIFIED;
|
|
343
|
+
case 1:
|
|
344
|
+
case "AI_PROMPT_FRUSTRATION_NONE":
|
|
345
|
+
return AIPromptFrustration.AI_PROMPT_FRUSTRATION_NONE;
|
|
346
|
+
case 2:
|
|
347
|
+
case "AI_PROMPT_FRUSTRATION_MILD":
|
|
348
|
+
return AIPromptFrustration.AI_PROMPT_FRUSTRATION_MILD;
|
|
349
|
+
case 3:
|
|
350
|
+
case "AI_PROMPT_FRUSTRATION_STRONG":
|
|
351
|
+
return AIPromptFrustration.AI_PROMPT_FRUSTRATION_STRONG;
|
|
352
|
+
case -1:
|
|
353
|
+
case "UNRECOGNIZED":
|
|
354
|
+
default:
|
|
355
|
+
return AIPromptFrustration.UNRECOGNIZED;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export function aIPromptFrustrationToJSON(object: AIPromptFrustration): string {
|
|
360
|
+
switch (object) {
|
|
361
|
+
case AIPromptFrustration.AI_PROMPT_FRUSTRATION_UNSPECIFIED:
|
|
362
|
+
return "AI_PROMPT_FRUSTRATION_UNSPECIFIED";
|
|
363
|
+
case AIPromptFrustration.AI_PROMPT_FRUSTRATION_NONE:
|
|
364
|
+
return "AI_PROMPT_FRUSTRATION_NONE";
|
|
365
|
+
case AIPromptFrustration.AI_PROMPT_FRUSTRATION_MILD:
|
|
366
|
+
return "AI_PROMPT_FRUSTRATION_MILD";
|
|
367
|
+
case AIPromptFrustration.AI_PROMPT_FRUSTRATION_STRONG:
|
|
368
|
+
return "AI_PROMPT_FRUSTRATION_STRONG";
|
|
369
|
+
case AIPromptFrustration.UNRECOGNIZED:
|
|
370
|
+
default:
|
|
371
|
+
return "UNRECOGNIZED";
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** AIPromptSentiment is a prompt's overall tone. */
|
|
376
|
+
export enum AIPromptSentiment {
|
|
377
|
+
/** AI_PROMPT_SENTIMENT_UNSPECIFIED - not scored */
|
|
378
|
+
AI_PROMPT_SENTIMENT_UNSPECIFIED = 0,
|
|
379
|
+
AI_PROMPT_SENTIMENT_NEGATIVE = 1,
|
|
380
|
+
AI_PROMPT_SENTIMENT_NEUTRAL = 2,
|
|
381
|
+
AI_PROMPT_SENTIMENT_POSITIVE = 3,
|
|
382
|
+
UNRECOGNIZED = -1,
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export function aIPromptSentimentFromJSON(object: any): AIPromptSentiment {
|
|
386
|
+
switch (object) {
|
|
387
|
+
case 0:
|
|
388
|
+
case "AI_PROMPT_SENTIMENT_UNSPECIFIED":
|
|
389
|
+
return AIPromptSentiment.AI_PROMPT_SENTIMENT_UNSPECIFIED;
|
|
390
|
+
case 1:
|
|
391
|
+
case "AI_PROMPT_SENTIMENT_NEGATIVE":
|
|
392
|
+
return AIPromptSentiment.AI_PROMPT_SENTIMENT_NEGATIVE;
|
|
393
|
+
case 2:
|
|
394
|
+
case "AI_PROMPT_SENTIMENT_NEUTRAL":
|
|
395
|
+
return AIPromptSentiment.AI_PROMPT_SENTIMENT_NEUTRAL;
|
|
396
|
+
case 3:
|
|
397
|
+
case "AI_PROMPT_SENTIMENT_POSITIVE":
|
|
398
|
+
return AIPromptSentiment.AI_PROMPT_SENTIMENT_POSITIVE;
|
|
399
|
+
case -1:
|
|
400
|
+
case "UNRECOGNIZED":
|
|
401
|
+
default:
|
|
402
|
+
return AIPromptSentiment.UNRECOGNIZED;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export function aIPromptSentimentToJSON(object: AIPromptSentiment): string {
|
|
407
|
+
switch (object) {
|
|
408
|
+
case AIPromptSentiment.AI_PROMPT_SENTIMENT_UNSPECIFIED:
|
|
409
|
+
return "AI_PROMPT_SENTIMENT_UNSPECIFIED";
|
|
410
|
+
case AIPromptSentiment.AI_PROMPT_SENTIMENT_NEGATIVE:
|
|
411
|
+
return "AI_PROMPT_SENTIMENT_NEGATIVE";
|
|
412
|
+
case AIPromptSentiment.AI_PROMPT_SENTIMENT_NEUTRAL:
|
|
413
|
+
return "AI_PROMPT_SENTIMENT_NEUTRAL";
|
|
414
|
+
case AIPromptSentiment.AI_PROMPT_SENTIMENT_POSITIVE:
|
|
415
|
+
return "AI_PROMPT_SENTIMENT_POSITIVE";
|
|
416
|
+
case AIPromptSentiment.UNRECOGNIZED:
|
|
417
|
+
default:
|
|
418
|
+
return "UNRECOGNIZED";
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
219
422
|
/**
|
|
220
423
|
* AISessionWorkType is the kind of work a model judged a session to be (MIR-386). ClickHouse stores the number
|
|
221
424
|
* (ai_session_labels.WorkType). A retired value stays here, deprecated and never renumbered, so an old label still reads.
|
|
@@ -1693,6 +1896,11 @@ export interface AISessionSummary {
|
|
|
1693
1896
|
| undefined;
|
|
1694
1897
|
/** The outcome its latest grades give when they were read from the current session_version; UNSPECIFIED otherwise. */
|
|
1695
1898
|
outcome: AISessionOutcome;
|
|
1899
|
+
/**
|
|
1900
|
+
* The session's prompt scores rolled up (MIR-469), on StreamSessionSummary only, never on ListSessions or
|
|
1901
|
+
* StreamSessions. Absent when no prompt is scored or the scores could not be read: not available, never zero.
|
|
1902
|
+
*/
|
|
1903
|
+
promptScoreSummary: AIPromptScoreSummary | undefined;
|
|
1696
1904
|
}
|
|
1697
1905
|
|
|
1698
1906
|
export interface StreamSessionsRequest {
|
|
@@ -1848,6 +2056,12 @@ export interface AISessionEvent {
|
|
|
1848
2056
|
* names X here; agent_id stays the run that did the work). Never set on agent · run. "" = about no other run.
|
|
1849
2057
|
*/
|
|
1850
2058
|
subjectAgentId: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* A model's latest scores for this prompt (MIR-469), on a message · user event only. Absent when it is not scored
|
|
2061
|
+
* (not yet, withheld, injected, or from a harness or time without a recorded origin) or the scores could not be read:
|
|
2062
|
+
* not available, never zero. A score written after the live tail sent the event shows on the next read.
|
|
2063
|
+
*/
|
|
2064
|
+
promptScore: AIPromptScore | undefined;
|
|
1851
2065
|
}
|
|
1852
2066
|
|
|
1853
2067
|
export interface AIContentPart {
|
|
@@ -1856,6 +2070,85 @@ export interface AIContentPart {
|
|
|
1856
2070
|
content: string;
|
|
1857
2071
|
}
|
|
1858
2072
|
|
|
2073
|
+
/** AIPromptScore is a model's scores for one prompt, from its latest scoring; a scored prompt has all five. */
|
|
2074
|
+
export interface AIPromptScore {
|
|
2075
|
+
complexity: AIPromptComplexity;
|
|
2076
|
+
/** 1 (vague) to 5 (clear). */
|
|
2077
|
+
clarity: number;
|
|
2078
|
+
steering: AIPromptSteering;
|
|
2079
|
+
frustration: AIPromptFrustration;
|
|
2080
|
+
sentiment: AIPromptSentiment;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
/** AIPromptScoreSummary rolls up one session's scored prompts, each at its latest scoring. */
|
|
2084
|
+
export interface AIPromptScoreSummary {
|
|
2085
|
+
/** At least 1: the summary is absent when no prompt is scored. */
|
|
2086
|
+
scoredPrompts: number;
|
|
2087
|
+
/**
|
|
2088
|
+
* One row per steering value with at least one prompt, in enum order, adding up to scored_prompts; a session with no
|
|
2089
|
+
* correction has no CORRECTION row.
|
|
2090
|
+
*/
|
|
2091
|
+
steeringCounts: AIPromptSteeringCount[];
|
|
2092
|
+
/** The most severe frustration among the scored prompts. */
|
|
2093
|
+
peakFrustration: AIPromptFrustration;
|
|
2094
|
+
/** The mean clarity of the scored prompts, 1 to 5. */
|
|
2095
|
+
meanClarity: number;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
export interface AIPromptSteeringCount {
|
|
2099
|
+
steering: AIPromptSteering;
|
|
2100
|
+
prompts: number;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
export interface GetPromptScoreTrendRequest {
|
|
2104
|
+
organizationId: string;
|
|
2105
|
+
projectId: string;
|
|
2106
|
+
/**
|
|
2107
|
+
* Inclusive UTC calendar-day bounds, YYYY-MM-DD; end_date >= start_date. Only prompts inside them count, and every
|
|
2108
|
+
* ISO week that overlaps them is returned, at most 53, so a bound inside a week makes that week partial.
|
|
2109
|
+
*/
|
|
2110
|
+
startDate: string;
|
|
2111
|
+
endDate: string;
|
|
2112
|
+
filter: PromptScoreTrendFilter | undefined;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* PromptScoreTrendFilter: fields AND, a repeated field matches any of its values, an unset or empty field does not
|
|
2117
|
+
* filter. A prompt belongs to the user id, else the api key, of its own event, matched as DailyActivityRequest.Filter
|
|
2118
|
+
* matches principals; a person is the principals ListPrincipals gives for them. An empty list reads the whole project,
|
|
2119
|
+
* so do not query a person with no principals. Each list holds at most 500 entries.
|
|
2120
|
+
*/
|
|
2121
|
+
export interface PromptScoreTrendFilter {
|
|
2122
|
+
principals: DailyActivityPrincipal[];
|
|
2123
|
+
sourceSystems: string[];
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
export interface GetPromptScoreTrendResponse {
|
|
2127
|
+
status:
|
|
2128
|
+
| ResponseStatus
|
|
2129
|
+
| undefined;
|
|
2130
|
+
/**
|
|
2131
|
+
* One row per ISO week that overlaps the window, oldest first; a week with no scored prompt has zero counts and no
|
|
2132
|
+
* rate.
|
|
2133
|
+
*/
|
|
2134
|
+
weeks: AIPromptScoreWeek[];
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
/**
|
|
2138
|
+
* AIPromptScoreWeek: mean clarity = clarity_sum / scored_prompts, correction rate = corrections / scored_prompts,
|
|
2139
|
+
* frustration rate = frustrated_prompts / scored_prompts, each only when scored_prompts > 0.
|
|
2140
|
+
*/
|
|
2141
|
+
export interface AIPromptScoreWeek {
|
|
2142
|
+
/** The week's Monday, YYYY-MM-DD. */
|
|
2143
|
+
weekStart: string;
|
|
2144
|
+
scoredPrompts: number;
|
|
2145
|
+
claritySum: number;
|
|
2146
|
+
/** Scored prompts whose steering is CORRECTION. */
|
|
2147
|
+
corrections: number;
|
|
2148
|
+
/** Scored prompts with MILD or more severe frustration. */
|
|
2149
|
+
frustratedPrompts: number;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
1859
2152
|
export interface SessionTokenTimelineRequest {
|
|
1860
2153
|
organizationId: string;
|
|
1861
2154
|
projectId: string;
|
|
@@ -4238,6 +4531,7 @@ function createBaseAISessionSummary(): AISessionSummary {
|
|
|
4238
4531
|
complexity: 0,
|
|
4239
4532
|
sessionScore: undefined,
|
|
4240
4533
|
outcome: 0,
|
|
4534
|
+
promptScoreSummary: undefined,
|
|
4241
4535
|
};
|
|
4242
4536
|
}
|
|
4243
4537
|
|
|
@@ -4360,6 +4654,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
4360
4654
|
if (message.outcome !== 0) {
|
|
4361
4655
|
writer.uint32(312).int32(message.outcome);
|
|
4362
4656
|
}
|
|
4657
|
+
if (message.promptScoreSummary !== undefined) {
|
|
4658
|
+
AIPromptScoreSummary.encode(message.promptScoreSummary, writer.uint32(322).fork()).join();
|
|
4659
|
+
}
|
|
4363
4660
|
return writer;
|
|
4364
4661
|
},
|
|
4365
4662
|
|
|
@@ -4688,6 +4985,14 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
4688
4985
|
message.outcome = reader.int32() as any;
|
|
4689
4986
|
continue;
|
|
4690
4987
|
}
|
|
4988
|
+
case 40: {
|
|
4989
|
+
if (tag !== 322) {
|
|
4990
|
+
break;
|
|
4991
|
+
}
|
|
4992
|
+
|
|
4993
|
+
message.promptScoreSummary = AIPromptScoreSummary.decode(reader, reader.uint32());
|
|
4994
|
+
continue;
|
|
4995
|
+
}
|
|
4691
4996
|
}
|
|
4692
4997
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4693
4998
|
break;
|
|
@@ -4849,6 +5154,11 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
4849
5154
|
? globalThis.Number(object.session_score)
|
|
4850
5155
|
: undefined,
|
|
4851
5156
|
outcome: isSet(object.outcome) ? aISessionOutcomeFromJSON(object.outcome) : 0,
|
|
5157
|
+
promptScoreSummary: isSet(object.promptScoreSummary)
|
|
5158
|
+
? AIPromptScoreSummary.fromJSON(object.promptScoreSummary)
|
|
5159
|
+
: isSet(object.prompt_score_summary)
|
|
5160
|
+
? AIPromptScoreSummary.fromJSON(object.prompt_score_summary)
|
|
5161
|
+
: undefined,
|
|
4852
5162
|
};
|
|
4853
5163
|
},
|
|
4854
5164
|
|
|
@@ -4971,6 +5281,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
4971
5281
|
if (message.outcome !== 0) {
|
|
4972
5282
|
obj.outcome = aISessionOutcomeToJSON(message.outcome);
|
|
4973
5283
|
}
|
|
5284
|
+
if (message.promptScoreSummary !== undefined) {
|
|
5285
|
+
obj.promptScoreSummary = AIPromptScoreSummary.toJSON(message.promptScoreSummary);
|
|
5286
|
+
}
|
|
4974
5287
|
return obj;
|
|
4975
5288
|
},
|
|
4976
5289
|
|
|
@@ -5020,6 +5333,9 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
|
|
|
5020
5333
|
message.complexity = object.complexity ?? 0;
|
|
5021
5334
|
message.sessionScore = object.sessionScore ?? undefined;
|
|
5022
5335
|
message.outcome = object.outcome ?? 0;
|
|
5336
|
+
message.promptScoreSummary = (object.promptScoreSummary !== undefined && object.promptScoreSummary !== null)
|
|
5337
|
+
? AIPromptScoreSummary.fromPartial(object.promptScoreSummary)
|
|
5338
|
+
: undefined;
|
|
5023
5339
|
return message;
|
|
5024
5340
|
},
|
|
5025
5341
|
};
|
|
@@ -6137,6 +6453,7 @@ function createBaseAISessionEvent(): AISessionEvent {
|
|
|
6137
6453
|
callCategory: "",
|
|
6138
6454
|
replyPhase: "",
|
|
6139
6455
|
subjectAgentId: "",
|
|
6456
|
+
promptScore: undefined,
|
|
6140
6457
|
};
|
|
6141
6458
|
}
|
|
6142
6459
|
|
|
@@ -6229,6 +6546,9 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
6229
6546
|
if (message.subjectAgentId !== "") {
|
|
6230
6547
|
writer.uint32(234).string(message.subjectAgentId);
|
|
6231
6548
|
}
|
|
6549
|
+
if (message.promptScore !== undefined) {
|
|
6550
|
+
AIPromptScore.encode(message.promptScore, writer.uint32(242).fork()).join();
|
|
6551
|
+
}
|
|
6232
6552
|
return writer;
|
|
6233
6553
|
},
|
|
6234
6554
|
|
|
@@ -6477,6 +6797,14 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
6477
6797
|
message.subjectAgentId = reader.string();
|
|
6478
6798
|
continue;
|
|
6479
6799
|
}
|
|
6800
|
+
case 30: {
|
|
6801
|
+
if (tag !== 242) {
|
|
6802
|
+
break;
|
|
6803
|
+
}
|
|
6804
|
+
|
|
6805
|
+
message.promptScore = AIPromptScore.decode(reader, reader.uint32());
|
|
6806
|
+
continue;
|
|
6807
|
+
}
|
|
6480
6808
|
}
|
|
6481
6809
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6482
6810
|
break;
|
|
@@ -6590,6 +6918,11 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
6590
6918
|
: isSet(object.subject_agent_id)
|
|
6591
6919
|
? globalThis.String(object.subject_agent_id)
|
|
6592
6920
|
: "",
|
|
6921
|
+
promptScore: isSet(object.promptScore)
|
|
6922
|
+
? AIPromptScore.fromJSON(object.promptScore)
|
|
6923
|
+
: isSet(object.prompt_score)
|
|
6924
|
+
? AIPromptScore.fromJSON(object.prompt_score)
|
|
6925
|
+
: undefined,
|
|
6593
6926
|
};
|
|
6594
6927
|
},
|
|
6595
6928
|
|
|
@@ -6655,95 +6988,896 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
6655
6988
|
if (message.agentId !== "") {
|
|
6656
6989
|
obj.agentId = message.agentId;
|
|
6657
6990
|
}
|
|
6658
|
-
if (message.parentAgentId !== "") {
|
|
6659
|
-
obj.parentAgentId = message.parentAgentId;
|
|
6991
|
+
if (message.parentAgentId !== "") {
|
|
6992
|
+
obj.parentAgentId = message.parentAgentId;
|
|
6993
|
+
}
|
|
6994
|
+
if (message.isSubagent !== false) {
|
|
6995
|
+
obj.isSubagent = message.isSubagent;
|
|
6996
|
+
}
|
|
6997
|
+
if (message.agentName !== "") {
|
|
6998
|
+
obj.agentName = message.agentName;
|
|
6999
|
+
}
|
|
7000
|
+
if (message.effort !== "") {
|
|
7001
|
+
obj.effort = message.effort;
|
|
7002
|
+
}
|
|
7003
|
+
if (message.subtype !== "") {
|
|
7004
|
+
obj.subtype = message.subtype;
|
|
7005
|
+
}
|
|
7006
|
+
if (message.context !== "") {
|
|
7007
|
+
obj.context = message.context;
|
|
7008
|
+
}
|
|
7009
|
+
if (message.callCategory !== "") {
|
|
7010
|
+
obj.callCategory = message.callCategory;
|
|
7011
|
+
}
|
|
7012
|
+
if (message.replyPhase !== "") {
|
|
7013
|
+
obj.replyPhase = message.replyPhase;
|
|
7014
|
+
}
|
|
7015
|
+
if (message.subjectAgentId !== "") {
|
|
7016
|
+
obj.subjectAgentId = message.subjectAgentId;
|
|
7017
|
+
}
|
|
7018
|
+
if (message.promptScore !== undefined) {
|
|
7019
|
+
obj.promptScore = AIPromptScore.toJSON(message.promptScore);
|
|
7020
|
+
}
|
|
7021
|
+
return obj;
|
|
7022
|
+
},
|
|
7023
|
+
|
|
7024
|
+
create<I extends Exact<DeepPartial<AISessionEvent>, I>>(base?: I): AISessionEvent {
|
|
7025
|
+
return AISessionEvent.fromPartial(base ?? ({} as any));
|
|
7026
|
+
},
|
|
7027
|
+
fromPartial<I extends Exact<DeepPartial<AISessionEvent>, I>>(object: I): AISessionEvent {
|
|
7028
|
+
const message = createBaseAISessionEvent();
|
|
7029
|
+
message.type = object.type ?? 0;
|
|
7030
|
+
message.sequence = object.sequence ?? undefined;
|
|
7031
|
+
message.eventTime = object.eventTime ?? undefined;
|
|
7032
|
+
message.turnId = object.turnId ?? "";
|
|
7033
|
+
message.content = object.content?.map((e) => AIContentPart.fromPartial(e)) || [];
|
|
7034
|
+
message.usage = (object.usage !== undefined && object.usage !== null)
|
|
7035
|
+
? AITokenUsage.fromPartial(object.usage)
|
|
7036
|
+
: undefined;
|
|
7037
|
+
message.model = object.model ?? "";
|
|
7038
|
+
message.provider = object.provider ?? "";
|
|
7039
|
+
message.toolName = object.toolName ?? "";
|
|
7040
|
+
message.status = object.status ?? "";
|
|
7041
|
+
message.finishReason = object.finishReason ?? "";
|
|
7042
|
+
message.durationMs = object.durationMs ?? undefined;
|
|
7043
|
+
message.ttftMs = object.ttftMs ?? undefined;
|
|
7044
|
+
message.modelCallId = object.modelCallId ?? "";
|
|
7045
|
+
message.toolCallId = object.toolCallId ?? "";
|
|
7046
|
+
message.logicalEventId = object.logicalEventId ?? "";
|
|
7047
|
+
message.version = object.version ?? 0;
|
|
7048
|
+
message.cursor = object.cursor ?? "";
|
|
7049
|
+
message.fundingMode = object.fundingMode ?? 0;
|
|
7050
|
+
message.agentId = object.agentId ?? "";
|
|
7051
|
+
message.parentAgentId = object.parentAgentId ?? "";
|
|
7052
|
+
message.isSubagent = object.isSubagent ?? false;
|
|
7053
|
+
message.agentName = object.agentName ?? "";
|
|
7054
|
+
message.effort = object.effort ?? "";
|
|
7055
|
+
message.subtype = object.subtype ?? "";
|
|
7056
|
+
message.context = object.context ?? "";
|
|
7057
|
+
message.callCategory = object.callCategory ?? "";
|
|
7058
|
+
message.replyPhase = object.replyPhase ?? "";
|
|
7059
|
+
message.subjectAgentId = object.subjectAgentId ?? "";
|
|
7060
|
+
message.promptScore = (object.promptScore !== undefined && object.promptScore !== null)
|
|
7061
|
+
? AIPromptScore.fromPartial(object.promptScore)
|
|
7062
|
+
: undefined;
|
|
7063
|
+
return message;
|
|
7064
|
+
},
|
|
7065
|
+
};
|
|
7066
|
+
|
|
7067
|
+
function createBaseAIContentPart(): AIContentPart {
|
|
7068
|
+
return { partIndex: 0, contentType: "", content: "" };
|
|
7069
|
+
}
|
|
7070
|
+
|
|
7071
|
+
export const AIContentPart: MessageFns<AIContentPart> = {
|
|
7072
|
+
encode(message: AIContentPart, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7073
|
+
if (message.partIndex !== 0) {
|
|
7074
|
+
writer.uint32(8).uint32(message.partIndex);
|
|
7075
|
+
}
|
|
7076
|
+
if (message.contentType !== "") {
|
|
7077
|
+
writer.uint32(18).string(message.contentType);
|
|
7078
|
+
}
|
|
7079
|
+
if (message.content !== "") {
|
|
7080
|
+
writer.uint32(26).string(message.content);
|
|
7081
|
+
}
|
|
7082
|
+
return writer;
|
|
7083
|
+
},
|
|
7084
|
+
|
|
7085
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIContentPart {
|
|
7086
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7087
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7088
|
+
if (previousRecursionDepth >= 100) {
|
|
7089
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7090
|
+
}
|
|
7091
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7092
|
+
try {
|
|
7093
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7094
|
+
const message = createBaseAIContentPart();
|
|
7095
|
+
while (reader.pos < end) {
|
|
7096
|
+
const tag = reader.uint32();
|
|
7097
|
+
switch (tag >>> 3) {
|
|
7098
|
+
case 1: {
|
|
7099
|
+
if (tag !== 8) {
|
|
7100
|
+
break;
|
|
7101
|
+
}
|
|
7102
|
+
|
|
7103
|
+
message.partIndex = reader.uint32();
|
|
7104
|
+
continue;
|
|
7105
|
+
}
|
|
7106
|
+
case 2: {
|
|
7107
|
+
if (tag !== 18) {
|
|
7108
|
+
break;
|
|
7109
|
+
}
|
|
7110
|
+
|
|
7111
|
+
message.contentType = reader.string();
|
|
7112
|
+
continue;
|
|
7113
|
+
}
|
|
7114
|
+
case 3: {
|
|
7115
|
+
if (tag !== 26) {
|
|
7116
|
+
break;
|
|
7117
|
+
}
|
|
7118
|
+
|
|
7119
|
+
message.content = reader.string();
|
|
7120
|
+
continue;
|
|
7121
|
+
}
|
|
7122
|
+
}
|
|
7123
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7124
|
+
break;
|
|
7125
|
+
}
|
|
7126
|
+
reader.skip(tag & 7);
|
|
7127
|
+
}
|
|
7128
|
+
return message;
|
|
7129
|
+
} finally {
|
|
7130
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7131
|
+
}
|
|
7132
|
+
},
|
|
7133
|
+
|
|
7134
|
+
fromJSON(object: any): AIContentPart {
|
|
7135
|
+
return {
|
|
7136
|
+
partIndex: isSet(object.partIndex)
|
|
7137
|
+
? globalThis.Number(object.partIndex)
|
|
7138
|
+
: isSet(object.part_index)
|
|
7139
|
+
? globalThis.Number(object.part_index)
|
|
7140
|
+
: 0,
|
|
7141
|
+
contentType: isSet(object.contentType)
|
|
7142
|
+
? globalThis.String(object.contentType)
|
|
7143
|
+
: isSet(object.content_type)
|
|
7144
|
+
? globalThis.String(object.content_type)
|
|
7145
|
+
: "",
|
|
7146
|
+
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
7147
|
+
};
|
|
7148
|
+
},
|
|
7149
|
+
|
|
7150
|
+
toJSON(message: AIContentPart): unknown {
|
|
7151
|
+
const obj: any = {};
|
|
7152
|
+
if (message.partIndex !== 0) {
|
|
7153
|
+
obj.partIndex = Math.round(message.partIndex);
|
|
7154
|
+
}
|
|
7155
|
+
if (message.contentType !== "") {
|
|
7156
|
+
obj.contentType = message.contentType;
|
|
7157
|
+
}
|
|
7158
|
+
if (message.content !== "") {
|
|
7159
|
+
obj.content = message.content;
|
|
7160
|
+
}
|
|
7161
|
+
return obj;
|
|
7162
|
+
},
|
|
7163
|
+
|
|
7164
|
+
create<I extends Exact<DeepPartial<AIContentPart>, I>>(base?: I): AIContentPart {
|
|
7165
|
+
return AIContentPart.fromPartial(base ?? ({} as any));
|
|
7166
|
+
},
|
|
7167
|
+
fromPartial<I extends Exact<DeepPartial<AIContentPart>, I>>(object: I): AIContentPart {
|
|
7168
|
+
const message = createBaseAIContentPart();
|
|
7169
|
+
message.partIndex = object.partIndex ?? 0;
|
|
7170
|
+
message.contentType = object.contentType ?? "";
|
|
7171
|
+
message.content = object.content ?? "";
|
|
7172
|
+
return message;
|
|
7173
|
+
},
|
|
7174
|
+
};
|
|
7175
|
+
|
|
7176
|
+
function createBaseAIPromptScore(): AIPromptScore {
|
|
7177
|
+
return { complexity: 0, clarity: 0, steering: 0, frustration: 0, sentiment: 0 };
|
|
7178
|
+
}
|
|
7179
|
+
|
|
7180
|
+
export const AIPromptScore: MessageFns<AIPromptScore> = {
|
|
7181
|
+
encode(message: AIPromptScore, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7182
|
+
if (message.complexity !== 0) {
|
|
7183
|
+
writer.uint32(8).int32(message.complexity);
|
|
7184
|
+
}
|
|
7185
|
+
if (message.clarity !== 0) {
|
|
7186
|
+
writer.uint32(16).uint32(message.clarity);
|
|
7187
|
+
}
|
|
7188
|
+
if (message.steering !== 0) {
|
|
7189
|
+
writer.uint32(24).int32(message.steering);
|
|
7190
|
+
}
|
|
7191
|
+
if (message.frustration !== 0) {
|
|
7192
|
+
writer.uint32(32).int32(message.frustration);
|
|
7193
|
+
}
|
|
7194
|
+
if (message.sentiment !== 0) {
|
|
7195
|
+
writer.uint32(40).int32(message.sentiment);
|
|
7196
|
+
}
|
|
7197
|
+
return writer;
|
|
7198
|
+
},
|
|
7199
|
+
|
|
7200
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIPromptScore {
|
|
7201
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7202
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7203
|
+
if (previousRecursionDepth >= 100) {
|
|
7204
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7205
|
+
}
|
|
7206
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7207
|
+
try {
|
|
7208
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7209
|
+
const message = createBaseAIPromptScore();
|
|
7210
|
+
while (reader.pos < end) {
|
|
7211
|
+
const tag = reader.uint32();
|
|
7212
|
+
switch (tag >>> 3) {
|
|
7213
|
+
case 1: {
|
|
7214
|
+
if (tag !== 8) {
|
|
7215
|
+
break;
|
|
7216
|
+
}
|
|
7217
|
+
|
|
7218
|
+
message.complexity = reader.int32() as any;
|
|
7219
|
+
continue;
|
|
7220
|
+
}
|
|
7221
|
+
case 2: {
|
|
7222
|
+
if (tag !== 16) {
|
|
7223
|
+
break;
|
|
7224
|
+
}
|
|
7225
|
+
|
|
7226
|
+
message.clarity = reader.uint32();
|
|
7227
|
+
continue;
|
|
7228
|
+
}
|
|
7229
|
+
case 3: {
|
|
7230
|
+
if (tag !== 24) {
|
|
7231
|
+
break;
|
|
7232
|
+
}
|
|
7233
|
+
|
|
7234
|
+
message.steering = reader.int32() as any;
|
|
7235
|
+
continue;
|
|
7236
|
+
}
|
|
7237
|
+
case 4: {
|
|
7238
|
+
if (tag !== 32) {
|
|
7239
|
+
break;
|
|
7240
|
+
}
|
|
7241
|
+
|
|
7242
|
+
message.frustration = reader.int32() as any;
|
|
7243
|
+
continue;
|
|
7244
|
+
}
|
|
7245
|
+
case 5: {
|
|
7246
|
+
if (tag !== 40) {
|
|
7247
|
+
break;
|
|
7248
|
+
}
|
|
7249
|
+
|
|
7250
|
+
message.sentiment = reader.int32() as any;
|
|
7251
|
+
continue;
|
|
7252
|
+
}
|
|
7253
|
+
}
|
|
7254
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7255
|
+
break;
|
|
7256
|
+
}
|
|
7257
|
+
reader.skip(tag & 7);
|
|
7258
|
+
}
|
|
7259
|
+
return message;
|
|
7260
|
+
} finally {
|
|
7261
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7262
|
+
}
|
|
7263
|
+
},
|
|
7264
|
+
|
|
7265
|
+
fromJSON(object: any): AIPromptScore {
|
|
7266
|
+
return {
|
|
7267
|
+
complexity: isSet(object.complexity) ? aIPromptComplexityFromJSON(object.complexity) : 0,
|
|
7268
|
+
clarity: isSet(object.clarity) ? globalThis.Number(object.clarity) : 0,
|
|
7269
|
+
steering: isSet(object.steering) ? aIPromptSteeringFromJSON(object.steering) : 0,
|
|
7270
|
+
frustration: isSet(object.frustration) ? aIPromptFrustrationFromJSON(object.frustration) : 0,
|
|
7271
|
+
sentiment: isSet(object.sentiment) ? aIPromptSentimentFromJSON(object.sentiment) : 0,
|
|
7272
|
+
};
|
|
7273
|
+
},
|
|
7274
|
+
|
|
7275
|
+
toJSON(message: AIPromptScore): unknown {
|
|
7276
|
+
const obj: any = {};
|
|
7277
|
+
if (message.complexity !== 0) {
|
|
7278
|
+
obj.complexity = aIPromptComplexityToJSON(message.complexity);
|
|
7279
|
+
}
|
|
7280
|
+
if (message.clarity !== 0) {
|
|
7281
|
+
obj.clarity = Math.round(message.clarity);
|
|
7282
|
+
}
|
|
7283
|
+
if (message.steering !== 0) {
|
|
7284
|
+
obj.steering = aIPromptSteeringToJSON(message.steering);
|
|
7285
|
+
}
|
|
7286
|
+
if (message.frustration !== 0) {
|
|
7287
|
+
obj.frustration = aIPromptFrustrationToJSON(message.frustration);
|
|
7288
|
+
}
|
|
7289
|
+
if (message.sentiment !== 0) {
|
|
7290
|
+
obj.sentiment = aIPromptSentimentToJSON(message.sentiment);
|
|
7291
|
+
}
|
|
7292
|
+
return obj;
|
|
7293
|
+
},
|
|
7294
|
+
|
|
7295
|
+
create<I extends Exact<DeepPartial<AIPromptScore>, I>>(base?: I): AIPromptScore {
|
|
7296
|
+
return AIPromptScore.fromPartial(base ?? ({} as any));
|
|
7297
|
+
},
|
|
7298
|
+
fromPartial<I extends Exact<DeepPartial<AIPromptScore>, I>>(object: I): AIPromptScore {
|
|
7299
|
+
const message = createBaseAIPromptScore();
|
|
7300
|
+
message.complexity = object.complexity ?? 0;
|
|
7301
|
+
message.clarity = object.clarity ?? 0;
|
|
7302
|
+
message.steering = object.steering ?? 0;
|
|
7303
|
+
message.frustration = object.frustration ?? 0;
|
|
7304
|
+
message.sentiment = object.sentiment ?? 0;
|
|
7305
|
+
return message;
|
|
7306
|
+
},
|
|
7307
|
+
};
|
|
7308
|
+
|
|
7309
|
+
function createBaseAIPromptScoreSummary(): AIPromptScoreSummary {
|
|
7310
|
+
return { scoredPrompts: 0, steeringCounts: [], peakFrustration: 0, meanClarity: 0 };
|
|
7311
|
+
}
|
|
7312
|
+
|
|
7313
|
+
export const AIPromptScoreSummary: MessageFns<AIPromptScoreSummary> = {
|
|
7314
|
+
encode(message: AIPromptScoreSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7315
|
+
if (message.scoredPrompts !== 0) {
|
|
7316
|
+
writer.uint32(8).uint64(message.scoredPrompts);
|
|
7317
|
+
}
|
|
7318
|
+
for (const v of message.steeringCounts) {
|
|
7319
|
+
AIPromptSteeringCount.encode(v!, writer.uint32(18).fork()).join();
|
|
7320
|
+
}
|
|
7321
|
+
if (message.peakFrustration !== 0) {
|
|
7322
|
+
writer.uint32(24).int32(message.peakFrustration);
|
|
7323
|
+
}
|
|
7324
|
+
if (message.meanClarity !== 0) {
|
|
7325
|
+
writer.uint32(33).double(message.meanClarity);
|
|
7326
|
+
}
|
|
7327
|
+
return writer;
|
|
7328
|
+
},
|
|
7329
|
+
|
|
7330
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIPromptScoreSummary {
|
|
7331
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7332
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7333
|
+
if (previousRecursionDepth >= 100) {
|
|
7334
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7335
|
+
}
|
|
7336
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7337
|
+
try {
|
|
7338
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7339
|
+
const message = createBaseAIPromptScoreSummary();
|
|
7340
|
+
while (reader.pos < end) {
|
|
7341
|
+
const tag = reader.uint32();
|
|
7342
|
+
switch (tag >>> 3) {
|
|
7343
|
+
case 1: {
|
|
7344
|
+
if (tag !== 8) {
|
|
7345
|
+
break;
|
|
7346
|
+
}
|
|
7347
|
+
|
|
7348
|
+
message.scoredPrompts = longToNumber(reader.uint64());
|
|
7349
|
+
continue;
|
|
7350
|
+
}
|
|
7351
|
+
case 2: {
|
|
7352
|
+
if (tag !== 18) {
|
|
7353
|
+
break;
|
|
7354
|
+
}
|
|
7355
|
+
|
|
7356
|
+
message.steeringCounts.push(AIPromptSteeringCount.decode(reader, reader.uint32()));
|
|
7357
|
+
continue;
|
|
7358
|
+
}
|
|
7359
|
+
case 3: {
|
|
7360
|
+
if (tag !== 24) {
|
|
7361
|
+
break;
|
|
7362
|
+
}
|
|
7363
|
+
|
|
7364
|
+
message.peakFrustration = reader.int32() as any;
|
|
7365
|
+
continue;
|
|
7366
|
+
}
|
|
7367
|
+
case 4: {
|
|
7368
|
+
if (tag !== 33) {
|
|
7369
|
+
break;
|
|
7370
|
+
}
|
|
7371
|
+
|
|
7372
|
+
message.meanClarity = reader.double();
|
|
7373
|
+
continue;
|
|
7374
|
+
}
|
|
7375
|
+
}
|
|
7376
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7377
|
+
break;
|
|
7378
|
+
}
|
|
7379
|
+
reader.skip(tag & 7);
|
|
7380
|
+
}
|
|
7381
|
+
return message;
|
|
7382
|
+
} finally {
|
|
7383
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7384
|
+
}
|
|
7385
|
+
},
|
|
7386
|
+
|
|
7387
|
+
fromJSON(object: any): AIPromptScoreSummary {
|
|
7388
|
+
return {
|
|
7389
|
+
scoredPrompts: isSet(object.scoredPrompts)
|
|
7390
|
+
? globalThis.Number(object.scoredPrompts)
|
|
7391
|
+
: isSet(object.scored_prompts)
|
|
7392
|
+
? globalThis.Number(object.scored_prompts)
|
|
7393
|
+
: 0,
|
|
7394
|
+
steeringCounts: globalThis.Array.isArray(object?.steeringCounts)
|
|
7395
|
+
? object.steeringCounts.map((e: any) => AIPromptSteeringCount.fromJSON(e))
|
|
7396
|
+
: globalThis.Array.isArray(object?.steering_counts)
|
|
7397
|
+
? object.steering_counts.map((e: any) => AIPromptSteeringCount.fromJSON(e))
|
|
7398
|
+
: [],
|
|
7399
|
+
peakFrustration: isSet(object.peakFrustration)
|
|
7400
|
+
? aIPromptFrustrationFromJSON(object.peakFrustration)
|
|
7401
|
+
: isSet(object.peak_frustration)
|
|
7402
|
+
? aIPromptFrustrationFromJSON(object.peak_frustration)
|
|
7403
|
+
: 0,
|
|
7404
|
+
meanClarity: isSet(object.meanClarity)
|
|
7405
|
+
? globalThis.Number(object.meanClarity)
|
|
7406
|
+
: isSet(object.mean_clarity)
|
|
7407
|
+
? globalThis.Number(object.mean_clarity)
|
|
7408
|
+
: 0,
|
|
7409
|
+
};
|
|
7410
|
+
},
|
|
7411
|
+
|
|
7412
|
+
toJSON(message: AIPromptScoreSummary): unknown {
|
|
7413
|
+
const obj: any = {};
|
|
7414
|
+
if (message.scoredPrompts !== 0) {
|
|
7415
|
+
obj.scoredPrompts = Math.round(message.scoredPrompts);
|
|
7416
|
+
}
|
|
7417
|
+
if (message.steeringCounts?.length) {
|
|
7418
|
+
obj.steeringCounts = message.steeringCounts.map((e) => AIPromptSteeringCount.toJSON(e));
|
|
7419
|
+
}
|
|
7420
|
+
if (message.peakFrustration !== 0) {
|
|
7421
|
+
obj.peakFrustration = aIPromptFrustrationToJSON(message.peakFrustration);
|
|
7422
|
+
}
|
|
7423
|
+
if (message.meanClarity !== 0) {
|
|
7424
|
+
obj.meanClarity = floatToJson(message.meanClarity);
|
|
7425
|
+
}
|
|
7426
|
+
return obj;
|
|
7427
|
+
},
|
|
7428
|
+
|
|
7429
|
+
create<I extends Exact<DeepPartial<AIPromptScoreSummary>, I>>(base?: I): AIPromptScoreSummary {
|
|
7430
|
+
return AIPromptScoreSummary.fromPartial(base ?? ({} as any));
|
|
7431
|
+
},
|
|
7432
|
+
fromPartial<I extends Exact<DeepPartial<AIPromptScoreSummary>, I>>(object: I): AIPromptScoreSummary {
|
|
7433
|
+
const message = createBaseAIPromptScoreSummary();
|
|
7434
|
+
message.scoredPrompts = object.scoredPrompts ?? 0;
|
|
7435
|
+
message.steeringCounts = object.steeringCounts?.map((e) => AIPromptSteeringCount.fromPartial(e)) || [];
|
|
7436
|
+
message.peakFrustration = object.peakFrustration ?? 0;
|
|
7437
|
+
message.meanClarity = object.meanClarity ?? 0;
|
|
7438
|
+
return message;
|
|
7439
|
+
},
|
|
7440
|
+
};
|
|
7441
|
+
|
|
7442
|
+
function createBaseAIPromptSteeringCount(): AIPromptSteeringCount {
|
|
7443
|
+
return { steering: 0, prompts: 0 };
|
|
7444
|
+
}
|
|
7445
|
+
|
|
7446
|
+
export const AIPromptSteeringCount: MessageFns<AIPromptSteeringCount> = {
|
|
7447
|
+
encode(message: AIPromptSteeringCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7448
|
+
if (message.steering !== 0) {
|
|
7449
|
+
writer.uint32(8).int32(message.steering);
|
|
7450
|
+
}
|
|
7451
|
+
if (message.prompts !== 0) {
|
|
7452
|
+
writer.uint32(16).uint64(message.prompts);
|
|
7453
|
+
}
|
|
7454
|
+
return writer;
|
|
7455
|
+
},
|
|
7456
|
+
|
|
7457
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIPromptSteeringCount {
|
|
7458
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7459
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7460
|
+
if (previousRecursionDepth >= 100) {
|
|
7461
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7462
|
+
}
|
|
7463
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7464
|
+
try {
|
|
7465
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7466
|
+
const message = createBaseAIPromptSteeringCount();
|
|
7467
|
+
while (reader.pos < end) {
|
|
7468
|
+
const tag = reader.uint32();
|
|
7469
|
+
switch (tag >>> 3) {
|
|
7470
|
+
case 1: {
|
|
7471
|
+
if (tag !== 8) {
|
|
7472
|
+
break;
|
|
7473
|
+
}
|
|
7474
|
+
|
|
7475
|
+
message.steering = reader.int32() as any;
|
|
7476
|
+
continue;
|
|
7477
|
+
}
|
|
7478
|
+
case 2: {
|
|
7479
|
+
if (tag !== 16) {
|
|
7480
|
+
break;
|
|
7481
|
+
}
|
|
7482
|
+
|
|
7483
|
+
message.prompts = longToNumber(reader.uint64());
|
|
7484
|
+
continue;
|
|
7485
|
+
}
|
|
7486
|
+
}
|
|
7487
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7488
|
+
break;
|
|
7489
|
+
}
|
|
7490
|
+
reader.skip(tag & 7);
|
|
7491
|
+
}
|
|
7492
|
+
return message;
|
|
7493
|
+
} finally {
|
|
7494
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7495
|
+
}
|
|
7496
|
+
},
|
|
7497
|
+
|
|
7498
|
+
fromJSON(object: any): AIPromptSteeringCount {
|
|
7499
|
+
return {
|
|
7500
|
+
steering: isSet(object.steering) ? aIPromptSteeringFromJSON(object.steering) : 0,
|
|
7501
|
+
prompts: isSet(object.prompts) ? globalThis.Number(object.prompts) : 0,
|
|
7502
|
+
};
|
|
7503
|
+
},
|
|
7504
|
+
|
|
7505
|
+
toJSON(message: AIPromptSteeringCount): unknown {
|
|
7506
|
+
const obj: any = {};
|
|
7507
|
+
if (message.steering !== 0) {
|
|
7508
|
+
obj.steering = aIPromptSteeringToJSON(message.steering);
|
|
7509
|
+
}
|
|
7510
|
+
if (message.prompts !== 0) {
|
|
7511
|
+
obj.prompts = Math.round(message.prompts);
|
|
7512
|
+
}
|
|
7513
|
+
return obj;
|
|
7514
|
+
},
|
|
7515
|
+
|
|
7516
|
+
create<I extends Exact<DeepPartial<AIPromptSteeringCount>, I>>(base?: I): AIPromptSteeringCount {
|
|
7517
|
+
return AIPromptSteeringCount.fromPartial(base ?? ({} as any));
|
|
7518
|
+
},
|
|
7519
|
+
fromPartial<I extends Exact<DeepPartial<AIPromptSteeringCount>, I>>(object: I): AIPromptSteeringCount {
|
|
7520
|
+
const message = createBaseAIPromptSteeringCount();
|
|
7521
|
+
message.steering = object.steering ?? 0;
|
|
7522
|
+
message.prompts = object.prompts ?? 0;
|
|
7523
|
+
return message;
|
|
7524
|
+
},
|
|
7525
|
+
};
|
|
7526
|
+
|
|
7527
|
+
function createBaseGetPromptScoreTrendRequest(): GetPromptScoreTrendRequest {
|
|
7528
|
+
return { organizationId: "", projectId: "", startDate: "", endDate: "", filter: undefined };
|
|
7529
|
+
}
|
|
7530
|
+
|
|
7531
|
+
export const GetPromptScoreTrendRequest: MessageFns<GetPromptScoreTrendRequest> = {
|
|
7532
|
+
encode(message: GetPromptScoreTrendRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7533
|
+
if (message.organizationId !== "") {
|
|
7534
|
+
writer.uint32(10).string(message.organizationId);
|
|
7535
|
+
}
|
|
7536
|
+
if (message.projectId !== "") {
|
|
7537
|
+
writer.uint32(18).string(message.projectId);
|
|
7538
|
+
}
|
|
7539
|
+
if (message.startDate !== "") {
|
|
7540
|
+
writer.uint32(26).string(message.startDate);
|
|
7541
|
+
}
|
|
7542
|
+
if (message.endDate !== "") {
|
|
7543
|
+
writer.uint32(34).string(message.endDate);
|
|
7544
|
+
}
|
|
7545
|
+
if (message.filter !== undefined) {
|
|
7546
|
+
PromptScoreTrendFilter.encode(message.filter, writer.uint32(42).fork()).join();
|
|
7547
|
+
}
|
|
7548
|
+
return writer;
|
|
7549
|
+
},
|
|
7550
|
+
|
|
7551
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetPromptScoreTrendRequest {
|
|
7552
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7553
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7554
|
+
if (previousRecursionDepth >= 100) {
|
|
7555
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7556
|
+
}
|
|
7557
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7558
|
+
try {
|
|
7559
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7560
|
+
const message = createBaseGetPromptScoreTrendRequest();
|
|
7561
|
+
while (reader.pos < end) {
|
|
7562
|
+
const tag = reader.uint32();
|
|
7563
|
+
switch (tag >>> 3) {
|
|
7564
|
+
case 1: {
|
|
7565
|
+
if (tag !== 10) {
|
|
7566
|
+
break;
|
|
7567
|
+
}
|
|
7568
|
+
|
|
7569
|
+
message.organizationId = reader.string();
|
|
7570
|
+
continue;
|
|
7571
|
+
}
|
|
7572
|
+
case 2: {
|
|
7573
|
+
if (tag !== 18) {
|
|
7574
|
+
break;
|
|
7575
|
+
}
|
|
7576
|
+
|
|
7577
|
+
message.projectId = reader.string();
|
|
7578
|
+
continue;
|
|
7579
|
+
}
|
|
7580
|
+
case 3: {
|
|
7581
|
+
if (tag !== 26) {
|
|
7582
|
+
break;
|
|
7583
|
+
}
|
|
7584
|
+
|
|
7585
|
+
message.startDate = reader.string();
|
|
7586
|
+
continue;
|
|
7587
|
+
}
|
|
7588
|
+
case 4: {
|
|
7589
|
+
if (tag !== 34) {
|
|
7590
|
+
break;
|
|
7591
|
+
}
|
|
7592
|
+
|
|
7593
|
+
message.endDate = reader.string();
|
|
7594
|
+
continue;
|
|
7595
|
+
}
|
|
7596
|
+
case 5: {
|
|
7597
|
+
if (tag !== 42) {
|
|
7598
|
+
break;
|
|
7599
|
+
}
|
|
7600
|
+
|
|
7601
|
+
message.filter = PromptScoreTrendFilter.decode(reader, reader.uint32());
|
|
7602
|
+
continue;
|
|
7603
|
+
}
|
|
7604
|
+
}
|
|
7605
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7606
|
+
break;
|
|
7607
|
+
}
|
|
7608
|
+
reader.skip(tag & 7);
|
|
7609
|
+
}
|
|
7610
|
+
return message;
|
|
7611
|
+
} finally {
|
|
7612
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7613
|
+
}
|
|
7614
|
+
},
|
|
7615
|
+
|
|
7616
|
+
fromJSON(object: any): GetPromptScoreTrendRequest {
|
|
7617
|
+
return {
|
|
7618
|
+
organizationId: isSet(object.organizationId)
|
|
7619
|
+
? globalThis.String(object.organizationId)
|
|
7620
|
+
: isSet(object.organization_id)
|
|
7621
|
+
? globalThis.String(object.organization_id)
|
|
7622
|
+
: "",
|
|
7623
|
+
projectId: isSet(object.projectId)
|
|
7624
|
+
? globalThis.String(object.projectId)
|
|
7625
|
+
: isSet(object.project_id)
|
|
7626
|
+
? globalThis.String(object.project_id)
|
|
7627
|
+
: "",
|
|
7628
|
+
startDate: isSet(object.startDate)
|
|
7629
|
+
? globalThis.String(object.startDate)
|
|
7630
|
+
: isSet(object.start_date)
|
|
7631
|
+
? globalThis.String(object.start_date)
|
|
7632
|
+
: "",
|
|
7633
|
+
endDate: isSet(object.endDate)
|
|
7634
|
+
? globalThis.String(object.endDate)
|
|
7635
|
+
: isSet(object.end_date)
|
|
7636
|
+
? globalThis.String(object.end_date)
|
|
7637
|
+
: "",
|
|
7638
|
+
filter: isSet(object.filter) ? PromptScoreTrendFilter.fromJSON(object.filter) : undefined,
|
|
7639
|
+
};
|
|
7640
|
+
},
|
|
7641
|
+
|
|
7642
|
+
toJSON(message: GetPromptScoreTrendRequest): unknown {
|
|
7643
|
+
const obj: any = {};
|
|
7644
|
+
if (message.organizationId !== "") {
|
|
7645
|
+
obj.organizationId = message.organizationId;
|
|
7646
|
+
}
|
|
7647
|
+
if (message.projectId !== "") {
|
|
7648
|
+
obj.projectId = message.projectId;
|
|
7649
|
+
}
|
|
7650
|
+
if (message.startDate !== "") {
|
|
7651
|
+
obj.startDate = message.startDate;
|
|
7652
|
+
}
|
|
7653
|
+
if (message.endDate !== "") {
|
|
7654
|
+
obj.endDate = message.endDate;
|
|
7655
|
+
}
|
|
7656
|
+
if (message.filter !== undefined) {
|
|
7657
|
+
obj.filter = PromptScoreTrendFilter.toJSON(message.filter);
|
|
7658
|
+
}
|
|
7659
|
+
return obj;
|
|
7660
|
+
},
|
|
7661
|
+
|
|
7662
|
+
create<I extends Exact<DeepPartial<GetPromptScoreTrendRequest>, I>>(base?: I): GetPromptScoreTrendRequest {
|
|
7663
|
+
return GetPromptScoreTrendRequest.fromPartial(base ?? ({} as any));
|
|
7664
|
+
},
|
|
7665
|
+
fromPartial<I extends Exact<DeepPartial<GetPromptScoreTrendRequest>, I>>(object: I): GetPromptScoreTrendRequest {
|
|
7666
|
+
const message = createBaseGetPromptScoreTrendRequest();
|
|
7667
|
+
message.organizationId = object.organizationId ?? "";
|
|
7668
|
+
message.projectId = object.projectId ?? "";
|
|
7669
|
+
message.startDate = object.startDate ?? "";
|
|
7670
|
+
message.endDate = object.endDate ?? "";
|
|
7671
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
7672
|
+
? PromptScoreTrendFilter.fromPartial(object.filter)
|
|
7673
|
+
: undefined;
|
|
7674
|
+
return message;
|
|
7675
|
+
},
|
|
7676
|
+
};
|
|
7677
|
+
|
|
7678
|
+
function createBasePromptScoreTrendFilter(): PromptScoreTrendFilter {
|
|
7679
|
+
return { principals: [], sourceSystems: [] };
|
|
7680
|
+
}
|
|
7681
|
+
|
|
7682
|
+
export const PromptScoreTrendFilter: MessageFns<PromptScoreTrendFilter> = {
|
|
7683
|
+
encode(message: PromptScoreTrendFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7684
|
+
for (const v of message.principals) {
|
|
7685
|
+
DailyActivityPrincipal.encode(v!, writer.uint32(10).fork()).join();
|
|
7686
|
+
}
|
|
7687
|
+
for (const v of message.sourceSystems) {
|
|
7688
|
+
writer.uint32(18).string(v!);
|
|
7689
|
+
}
|
|
7690
|
+
return writer;
|
|
7691
|
+
},
|
|
7692
|
+
|
|
7693
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PromptScoreTrendFilter {
|
|
7694
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7695
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7696
|
+
if (previousRecursionDepth >= 100) {
|
|
7697
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6660
7698
|
}
|
|
6661
|
-
|
|
6662
|
-
|
|
7699
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7700
|
+
try {
|
|
7701
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7702
|
+
const message = createBasePromptScoreTrendFilter();
|
|
7703
|
+
while (reader.pos < end) {
|
|
7704
|
+
const tag = reader.uint32();
|
|
7705
|
+
switch (tag >>> 3) {
|
|
7706
|
+
case 1: {
|
|
7707
|
+
if (tag !== 10) {
|
|
7708
|
+
break;
|
|
7709
|
+
}
|
|
7710
|
+
|
|
7711
|
+
message.principals.push(DailyActivityPrincipal.decode(reader, reader.uint32()));
|
|
7712
|
+
continue;
|
|
7713
|
+
}
|
|
7714
|
+
case 2: {
|
|
7715
|
+
if (tag !== 18) {
|
|
7716
|
+
break;
|
|
7717
|
+
}
|
|
7718
|
+
|
|
7719
|
+
message.sourceSystems.push(reader.string());
|
|
7720
|
+
continue;
|
|
7721
|
+
}
|
|
7722
|
+
}
|
|
7723
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7724
|
+
break;
|
|
7725
|
+
}
|
|
7726
|
+
reader.skip(tag & 7);
|
|
7727
|
+
}
|
|
7728
|
+
return message;
|
|
7729
|
+
} finally {
|
|
7730
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6663
7731
|
}
|
|
6664
|
-
|
|
6665
|
-
|
|
7732
|
+
},
|
|
7733
|
+
|
|
7734
|
+
fromJSON(object: any): PromptScoreTrendFilter {
|
|
7735
|
+
return {
|
|
7736
|
+
principals: globalThis.Array.isArray(object?.principals)
|
|
7737
|
+
? object.principals.map((e: any) => DailyActivityPrincipal.fromJSON(e))
|
|
7738
|
+
: [],
|
|
7739
|
+
sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
|
|
7740
|
+
? object.sourceSystems.map((e: any) => globalThis.String(e))
|
|
7741
|
+
: globalThis.Array.isArray(object?.source_systems)
|
|
7742
|
+
? object.source_systems.map((e: any) => globalThis.String(e))
|
|
7743
|
+
: [],
|
|
7744
|
+
};
|
|
7745
|
+
},
|
|
7746
|
+
|
|
7747
|
+
toJSON(message: PromptScoreTrendFilter): unknown {
|
|
7748
|
+
const obj: any = {};
|
|
7749
|
+
if (message.principals?.length) {
|
|
7750
|
+
obj.principals = message.principals.map((e) => DailyActivityPrincipal.toJSON(e));
|
|
6666
7751
|
}
|
|
6667
|
-
if (message.
|
|
6668
|
-
obj.
|
|
7752
|
+
if (message.sourceSystems?.length) {
|
|
7753
|
+
obj.sourceSystems = message.sourceSystems;
|
|
6669
7754
|
}
|
|
6670
|
-
|
|
6671
|
-
|
|
7755
|
+
return obj;
|
|
7756
|
+
},
|
|
7757
|
+
|
|
7758
|
+
create<I extends Exact<DeepPartial<PromptScoreTrendFilter>, I>>(base?: I): PromptScoreTrendFilter {
|
|
7759
|
+
return PromptScoreTrendFilter.fromPartial(base ?? ({} as any));
|
|
7760
|
+
},
|
|
7761
|
+
fromPartial<I extends Exact<DeepPartial<PromptScoreTrendFilter>, I>>(object: I): PromptScoreTrendFilter {
|
|
7762
|
+
const message = createBasePromptScoreTrendFilter();
|
|
7763
|
+
message.principals = object.principals?.map((e) => DailyActivityPrincipal.fromPartial(e)) || [];
|
|
7764
|
+
message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
|
|
7765
|
+
return message;
|
|
7766
|
+
},
|
|
7767
|
+
};
|
|
7768
|
+
|
|
7769
|
+
function createBaseGetPromptScoreTrendResponse(): GetPromptScoreTrendResponse {
|
|
7770
|
+
return { status: undefined, weeks: [] };
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
export const GetPromptScoreTrendResponse: MessageFns<GetPromptScoreTrendResponse> = {
|
|
7774
|
+
encode(message: GetPromptScoreTrendResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7775
|
+
if (message.status !== undefined) {
|
|
7776
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
6672
7777
|
}
|
|
6673
|
-
|
|
6674
|
-
|
|
7778
|
+
for (const v of message.weeks) {
|
|
7779
|
+
AIPromptScoreWeek.encode(v!, writer.uint32(18).fork()).join();
|
|
6675
7780
|
}
|
|
6676
|
-
|
|
6677
|
-
|
|
7781
|
+
return writer;
|
|
7782
|
+
},
|
|
7783
|
+
|
|
7784
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetPromptScoreTrendResponse {
|
|
7785
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7786
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7787
|
+
if (previousRecursionDepth >= 100) {
|
|
7788
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6678
7789
|
}
|
|
6679
|
-
|
|
6680
|
-
|
|
7790
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7791
|
+
try {
|
|
7792
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7793
|
+
const message = createBaseGetPromptScoreTrendResponse();
|
|
7794
|
+
while (reader.pos < end) {
|
|
7795
|
+
const tag = reader.uint32();
|
|
7796
|
+
switch (tag >>> 3) {
|
|
7797
|
+
case 1: {
|
|
7798
|
+
if (tag !== 10) {
|
|
7799
|
+
break;
|
|
7800
|
+
}
|
|
7801
|
+
|
|
7802
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
7803
|
+
continue;
|
|
7804
|
+
}
|
|
7805
|
+
case 2: {
|
|
7806
|
+
if (tag !== 18) {
|
|
7807
|
+
break;
|
|
7808
|
+
}
|
|
7809
|
+
|
|
7810
|
+
message.weeks.push(AIPromptScoreWeek.decode(reader, reader.uint32()));
|
|
7811
|
+
continue;
|
|
7812
|
+
}
|
|
7813
|
+
}
|
|
7814
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7815
|
+
break;
|
|
7816
|
+
}
|
|
7817
|
+
reader.skip(tag & 7);
|
|
7818
|
+
}
|
|
7819
|
+
return message;
|
|
7820
|
+
} finally {
|
|
7821
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6681
7822
|
}
|
|
6682
|
-
|
|
6683
|
-
|
|
7823
|
+
},
|
|
7824
|
+
|
|
7825
|
+
fromJSON(object: any): GetPromptScoreTrendResponse {
|
|
7826
|
+
return {
|
|
7827
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
7828
|
+
weeks: globalThis.Array.isArray(object?.weeks) ? object.weeks.map((e: any) => AIPromptScoreWeek.fromJSON(e)) : [],
|
|
7829
|
+
};
|
|
7830
|
+
},
|
|
7831
|
+
|
|
7832
|
+
toJSON(message: GetPromptScoreTrendResponse): unknown {
|
|
7833
|
+
const obj: any = {};
|
|
7834
|
+
if (message.status !== undefined) {
|
|
7835
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
7836
|
+
}
|
|
7837
|
+
if (message.weeks?.length) {
|
|
7838
|
+
obj.weeks = message.weeks.map((e) => AIPromptScoreWeek.toJSON(e));
|
|
6684
7839
|
}
|
|
6685
7840
|
return obj;
|
|
6686
7841
|
},
|
|
6687
7842
|
|
|
6688
|
-
create<I extends Exact<DeepPartial<
|
|
6689
|
-
return
|
|
7843
|
+
create<I extends Exact<DeepPartial<GetPromptScoreTrendResponse>, I>>(base?: I): GetPromptScoreTrendResponse {
|
|
7844
|
+
return GetPromptScoreTrendResponse.fromPartial(base ?? ({} as any));
|
|
6690
7845
|
},
|
|
6691
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
6692
|
-
const message =
|
|
6693
|
-
message.
|
|
6694
|
-
|
|
6695
|
-
message.eventTime = object.eventTime ?? undefined;
|
|
6696
|
-
message.turnId = object.turnId ?? "";
|
|
6697
|
-
message.content = object.content?.map((e) => AIContentPart.fromPartial(e)) || [];
|
|
6698
|
-
message.usage = (object.usage !== undefined && object.usage !== null)
|
|
6699
|
-
? AITokenUsage.fromPartial(object.usage)
|
|
7846
|
+
fromPartial<I extends Exact<DeepPartial<GetPromptScoreTrendResponse>, I>>(object: I): GetPromptScoreTrendResponse {
|
|
7847
|
+
const message = createBaseGetPromptScoreTrendResponse();
|
|
7848
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
7849
|
+
? ResponseStatus.fromPartial(object.status)
|
|
6700
7850
|
: undefined;
|
|
6701
|
-
message.
|
|
6702
|
-
message.provider = object.provider ?? "";
|
|
6703
|
-
message.toolName = object.toolName ?? "";
|
|
6704
|
-
message.status = object.status ?? "";
|
|
6705
|
-
message.finishReason = object.finishReason ?? "";
|
|
6706
|
-
message.durationMs = object.durationMs ?? undefined;
|
|
6707
|
-
message.ttftMs = object.ttftMs ?? undefined;
|
|
6708
|
-
message.modelCallId = object.modelCallId ?? "";
|
|
6709
|
-
message.toolCallId = object.toolCallId ?? "";
|
|
6710
|
-
message.logicalEventId = object.logicalEventId ?? "";
|
|
6711
|
-
message.version = object.version ?? 0;
|
|
6712
|
-
message.cursor = object.cursor ?? "";
|
|
6713
|
-
message.fundingMode = object.fundingMode ?? 0;
|
|
6714
|
-
message.agentId = object.agentId ?? "";
|
|
6715
|
-
message.parentAgentId = object.parentAgentId ?? "";
|
|
6716
|
-
message.isSubagent = object.isSubagent ?? false;
|
|
6717
|
-
message.agentName = object.agentName ?? "";
|
|
6718
|
-
message.effort = object.effort ?? "";
|
|
6719
|
-
message.subtype = object.subtype ?? "";
|
|
6720
|
-
message.context = object.context ?? "";
|
|
6721
|
-
message.callCategory = object.callCategory ?? "";
|
|
6722
|
-
message.replyPhase = object.replyPhase ?? "";
|
|
6723
|
-
message.subjectAgentId = object.subjectAgentId ?? "";
|
|
7851
|
+
message.weeks = object.weeks?.map((e) => AIPromptScoreWeek.fromPartial(e)) || [];
|
|
6724
7852
|
return message;
|
|
6725
7853
|
},
|
|
6726
7854
|
};
|
|
6727
7855
|
|
|
6728
|
-
function
|
|
6729
|
-
return {
|
|
7856
|
+
function createBaseAIPromptScoreWeek(): AIPromptScoreWeek {
|
|
7857
|
+
return { weekStart: "", scoredPrompts: 0, claritySum: 0, corrections: 0, frustratedPrompts: 0 };
|
|
6730
7858
|
}
|
|
6731
7859
|
|
|
6732
|
-
export const
|
|
6733
|
-
encode(message:
|
|
6734
|
-
if (message.
|
|
6735
|
-
writer.uint32(
|
|
7860
|
+
export const AIPromptScoreWeek: MessageFns<AIPromptScoreWeek> = {
|
|
7861
|
+
encode(message: AIPromptScoreWeek, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7862
|
+
if (message.weekStart !== "") {
|
|
7863
|
+
writer.uint32(10).string(message.weekStart);
|
|
6736
7864
|
}
|
|
6737
|
-
if (message.
|
|
6738
|
-
writer.uint32(
|
|
7865
|
+
if (message.scoredPrompts !== 0) {
|
|
7866
|
+
writer.uint32(16).uint64(message.scoredPrompts);
|
|
6739
7867
|
}
|
|
6740
|
-
if (message.
|
|
6741
|
-
writer.uint32(
|
|
7868
|
+
if (message.claritySum !== 0) {
|
|
7869
|
+
writer.uint32(24).uint64(message.claritySum);
|
|
7870
|
+
}
|
|
7871
|
+
if (message.corrections !== 0) {
|
|
7872
|
+
writer.uint32(32).uint64(message.corrections);
|
|
7873
|
+
}
|
|
7874
|
+
if (message.frustratedPrompts !== 0) {
|
|
7875
|
+
writer.uint32(40).uint64(message.frustratedPrompts);
|
|
6742
7876
|
}
|
|
6743
7877
|
return writer;
|
|
6744
7878
|
},
|
|
6745
7879
|
|
|
6746
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
7880
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIPromptScoreWeek {
|
|
6747
7881
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6748
7882
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6749
7883
|
if (previousRecursionDepth >= 100) {
|
|
@@ -6752,32 +7886,48 @@ export const AIContentPart: MessageFns<AIContentPart> = {
|
|
|
6752
7886
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6753
7887
|
try {
|
|
6754
7888
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6755
|
-
const message =
|
|
7889
|
+
const message = createBaseAIPromptScoreWeek();
|
|
6756
7890
|
while (reader.pos < end) {
|
|
6757
7891
|
const tag = reader.uint32();
|
|
6758
7892
|
switch (tag >>> 3) {
|
|
6759
7893
|
case 1: {
|
|
6760
|
-
if (tag !==
|
|
7894
|
+
if (tag !== 10) {
|
|
6761
7895
|
break;
|
|
6762
7896
|
}
|
|
6763
7897
|
|
|
6764
|
-
message.
|
|
7898
|
+
message.weekStart = reader.string();
|
|
6765
7899
|
continue;
|
|
6766
7900
|
}
|
|
6767
7901
|
case 2: {
|
|
6768
|
-
if (tag !==
|
|
7902
|
+
if (tag !== 16) {
|
|
6769
7903
|
break;
|
|
6770
7904
|
}
|
|
6771
7905
|
|
|
6772
|
-
message.
|
|
7906
|
+
message.scoredPrompts = longToNumber(reader.uint64());
|
|
6773
7907
|
continue;
|
|
6774
7908
|
}
|
|
6775
7909
|
case 3: {
|
|
6776
|
-
if (tag !==
|
|
7910
|
+
if (tag !== 24) {
|
|
6777
7911
|
break;
|
|
6778
7912
|
}
|
|
6779
7913
|
|
|
6780
|
-
message.
|
|
7914
|
+
message.claritySum = longToNumber(reader.uint64());
|
|
7915
|
+
continue;
|
|
7916
|
+
}
|
|
7917
|
+
case 4: {
|
|
7918
|
+
if (tag !== 32) {
|
|
7919
|
+
break;
|
|
7920
|
+
}
|
|
7921
|
+
|
|
7922
|
+
message.corrections = longToNumber(reader.uint64());
|
|
7923
|
+
continue;
|
|
7924
|
+
}
|
|
7925
|
+
case 5: {
|
|
7926
|
+
if (tag !== 40) {
|
|
7927
|
+
break;
|
|
7928
|
+
}
|
|
7929
|
+
|
|
7930
|
+
message.frustratedPrompts = longToNumber(reader.uint64());
|
|
6781
7931
|
continue;
|
|
6782
7932
|
}
|
|
6783
7933
|
}
|
|
@@ -6792,44 +7942,62 @@ export const AIContentPart: MessageFns<AIContentPart> = {
|
|
|
6792
7942
|
}
|
|
6793
7943
|
},
|
|
6794
7944
|
|
|
6795
|
-
fromJSON(object: any):
|
|
7945
|
+
fromJSON(object: any): AIPromptScoreWeek {
|
|
6796
7946
|
return {
|
|
6797
|
-
|
|
6798
|
-
? globalThis.
|
|
6799
|
-
: isSet(object.
|
|
6800
|
-
? globalThis.
|
|
6801
|
-
: 0,
|
|
6802
|
-
contentType: isSet(object.contentType)
|
|
6803
|
-
? globalThis.String(object.contentType)
|
|
6804
|
-
: isSet(object.content_type)
|
|
6805
|
-
? globalThis.String(object.content_type)
|
|
7947
|
+
weekStart: isSet(object.weekStart)
|
|
7948
|
+
? globalThis.String(object.weekStart)
|
|
7949
|
+
: isSet(object.week_start)
|
|
7950
|
+
? globalThis.String(object.week_start)
|
|
6806
7951
|
: "",
|
|
6807
|
-
|
|
7952
|
+
scoredPrompts: isSet(object.scoredPrompts)
|
|
7953
|
+
? globalThis.Number(object.scoredPrompts)
|
|
7954
|
+
: isSet(object.scored_prompts)
|
|
7955
|
+
? globalThis.Number(object.scored_prompts)
|
|
7956
|
+
: 0,
|
|
7957
|
+
claritySum: isSet(object.claritySum)
|
|
7958
|
+
? globalThis.Number(object.claritySum)
|
|
7959
|
+
: isSet(object.clarity_sum)
|
|
7960
|
+
? globalThis.Number(object.clarity_sum)
|
|
7961
|
+
: 0,
|
|
7962
|
+
corrections: isSet(object.corrections) ? globalThis.Number(object.corrections) : 0,
|
|
7963
|
+
frustratedPrompts: isSet(object.frustratedPrompts)
|
|
7964
|
+
? globalThis.Number(object.frustratedPrompts)
|
|
7965
|
+
: isSet(object.frustrated_prompts)
|
|
7966
|
+
? globalThis.Number(object.frustrated_prompts)
|
|
7967
|
+
: 0,
|
|
6808
7968
|
};
|
|
6809
7969
|
},
|
|
6810
7970
|
|
|
6811
|
-
toJSON(message:
|
|
7971
|
+
toJSON(message: AIPromptScoreWeek): unknown {
|
|
6812
7972
|
const obj: any = {};
|
|
6813
|
-
if (message.
|
|
6814
|
-
obj.
|
|
7973
|
+
if (message.weekStart !== "") {
|
|
7974
|
+
obj.weekStart = message.weekStart;
|
|
6815
7975
|
}
|
|
6816
|
-
if (message.
|
|
6817
|
-
obj.
|
|
7976
|
+
if (message.scoredPrompts !== 0) {
|
|
7977
|
+
obj.scoredPrompts = Math.round(message.scoredPrompts);
|
|
6818
7978
|
}
|
|
6819
|
-
if (message.
|
|
6820
|
-
obj.
|
|
7979
|
+
if (message.claritySum !== 0) {
|
|
7980
|
+
obj.claritySum = Math.round(message.claritySum);
|
|
7981
|
+
}
|
|
7982
|
+
if (message.corrections !== 0) {
|
|
7983
|
+
obj.corrections = Math.round(message.corrections);
|
|
7984
|
+
}
|
|
7985
|
+
if (message.frustratedPrompts !== 0) {
|
|
7986
|
+
obj.frustratedPrompts = Math.round(message.frustratedPrompts);
|
|
6821
7987
|
}
|
|
6822
7988
|
return obj;
|
|
6823
7989
|
},
|
|
6824
7990
|
|
|
6825
|
-
create<I extends Exact<DeepPartial<
|
|
6826
|
-
return
|
|
7991
|
+
create<I extends Exact<DeepPartial<AIPromptScoreWeek>, I>>(base?: I): AIPromptScoreWeek {
|
|
7992
|
+
return AIPromptScoreWeek.fromPartial(base ?? ({} as any));
|
|
6827
7993
|
},
|
|
6828
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
6829
|
-
const message =
|
|
6830
|
-
message.
|
|
6831
|
-
message.
|
|
6832
|
-
message.
|
|
7994
|
+
fromPartial<I extends Exact<DeepPartial<AIPromptScoreWeek>, I>>(object: I): AIPromptScoreWeek {
|
|
7995
|
+
const message = createBaseAIPromptScoreWeek();
|
|
7996
|
+
message.weekStart = object.weekStart ?? "";
|
|
7997
|
+
message.scoredPrompts = object.scoredPrompts ?? 0;
|
|
7998
|
+
message.claritySum = object.claritySum ?? 0;
|
|
7999
|
+
message.corrections = object.corrections ?? 0;
|
|
8000
|
+
message.frustratedPrompts = object.frustratedPrompts ?? 0;
|
|
6833
8001
|
return message;
|
|
6834
8002
|
},
|
|
6835
8003
|
};
|
|
@@ -25536,6 +26704,11 @@ export interface AIGatewayService {
|
|
|
25536
26704
|
request: GetSessionScoreTrendRequest,
|
|
25537
26705
|
metadata?: Metadata,
|
|
25538
26706
|
): Promise<GetSessionScoreTrendResponse>;
|
|
26707
|
+
/**
|
|
26708
|
+
* A project's scored prompts, or one person's (their principals), per ISO week (UTC, by each prompt's own event
|
|
26709
|
+
* time): counts only, the rates derived only when a week has scored prompts. Mirrors ai.api.v1.
|
|
26710
|
+
*/
|
|
26711
|
+
GetPromptScoreTrend(request: GetPromptScoreTrendRequest, metadata?: Metadata): Promise<GetPromptScoreTrendResponse>;
|
|
25539
26712
|
/**
|
|
25540
26713
|
* Per-seat entitlement usage board: every entitlement owner's latest observed funding facility and
|
|
25541
26714
|
* per-harness usage % windows. Stream-first (first frame = full snapshot), seat-scoped. Mirrors
|
|
@@ -25584,6 +26757,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
25584
26757
|
this.GetSessionUsageTrend = this.GetSessionUsageTrend.bind(this);
|
|
25585
26758
|
this.GetSessionAnalysis = this.GetSessionAnalysis.bind(this);
|
|
25586
26759
|
this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
|
|
26760
|
+
this.GetPromptScoreTrend = this.GetPromptScoreTrend.bind(this);
|
|
25587
26761
|
this.StreamEntitlements = this.StreamEntitlements.bind(this);
|
|
25588
26762
|
this.ListRelayHeartbeats = this.ListRelayHeartbeats.bind(this);
|
|
25589
26763
|
}
|
|
@@ -25761,6 +26935,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
25761
26935
|
return promise.then((data) => GetSessionScoreTrendResponse.decode(new BinaryReader(data)));
|
|
25762
26936
|
}
|
|
25763
26937
|
|
|
26938
|
+
GetPromptScoreTrend(request: GetPromptScoreTrendRequest, metadata?: Metadata): Promise<GetPromptScoreTrendResponse> {
|
|
26939
|
+
const data = GetPromptScoreTrendRequest.encode(request).finish();
|
|
26940
|
+
const promise = this.rpc.request(this.service, "GetPromptScoreTrend", data, metadata);
|
|
26941
|
+
return promise.then((data) => GetPromptScoreTrendResponse.decode(new BinaryReader(data)));
|
|
26942
|
+
}
|
|
26943
|
+
|
|
25764
26944
|
StreamEntitlements(request: StreamEntitlementsRequest, metadata?: Metadata): Observable<EntitlementsSnapshot> {
|
|
25765
26945
|
const data = StreamEntitlementsRequest.encode(request).finish();
|
|
25766
26946
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamEntitlements", data, metadata);
|