@miradorlabs/web-grpc 4.26.0 → 4.27.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.
Files changed (34) hide show
  1. package/google/api/field_behavior.ts +1 -1
  2. package/google/protobuf/descriptor.ts +1 -1
  3. package/google/protobuf/duration.ts +1 -1
  4. package/google/protobuf/timestamp.ts +1 -1
  5. package/package.json +1 -1
  6. package/proto/gateway/common/v1/attribute_value.ts +1 -1
  7. package/proto/gateway/common/v1/status.ts +1 -1
  8. package/proto/gateway/common/v1/types.ts +1 -1
  9. package/proto/gateway/web/v1/account_gateway.ts +1 -1
  10. package/proto/gateway/web/v1/admin_gateway.ts +1 -1
  11. package/proto/gateway/web/v1/ai_gateway.ts +819 -681
  12. package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +36 -0
  13. package/proto/gateway/web/v1/ai_gateway_pb.js +1502 -495
  14. package/proto/gateway/web/v1/attribute_value.ts +1 -1
  15. package/proto/gateway/web/v1/beta_gateway.ts +1 -1
  16. package/proto/gateway/web/v1/chain_gateway.ts +1 -1
  17. package/proto/gateway/web/v1/claude_enterprise_gateway.ts +1 -1
  18. package/proto/gateway/web/v1/common.ts +1 -1
  19. package/proto/gateway/web/v1/derived_metric_gateway.ts +1 -1
  20. package/proto/gateway/web/v1/desktop_auth_gateway.ts +1 -1
  21. package/proto/gateway/web/v1/github_connector.ts +1 -1
  22. package/proto/gateway/web/v1/integration_gateway.ts +1 -1
  23. package/proto/gateway/web/v1/log_gateway.ts +1 -1
  24. package/proto/gateway/web/v1/market_gateway.ts +1 -1
  25. package/proto/gateway/web/v1/metric_gateway.ts +1 -1
  26. package/proto/gateway/web/v1/notification_gateway.ts +1 -1
  27. package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
  28. package/proto/gateway/web/v1/plan_gateway.ts +1 -1
  29. package/proto/gateway/web/v1/policy_gateway.ts +1 -1
  30. package/proto/gateway/web/v1/reference_gateway.ts +1 -1
  31. package/proto/gateway/web/v1/rule_gateway.ts +1 -1
  32. package/proto/gateway/web/v1/slo_gateway.ts +1 -1
  33. package/proto/gateway/web/v1/trace_gateway.ts +1 -1
  34. package/proto/gateway/web/v1/trace_measure_gateway.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.21.1
3
+ // protoc-gen-ts_proto v2.22.0
4
4
  // protoc v3.21.12
5
5
  // source: proto/gateway/web/v1/ai_gateway.proto
6
6
 
@@ -26,6 +26,52 @@ export const protobufPackage = "gateway.web.v1";
26
26
 
27
27
  export const protobufFileName = "proto/gateway/web/v1/ai_gateway.proto";
28
28
 
29
+ /** AILabelRating colours a value's chip, as its label set says. Unspecified is neutral. */
30
+ export enum AILabelRating {
31
+ AI_LABEL_RATING_UNSPECIFIED = 0,
32
+ AI_LABEL_RATING_GOOD = 1,
33
+ AI_LABEL_RATING_MID = 2,
34
+ AI_LABEL_RATING_BAD = 3,
35
+ UNRECOGNIZED = -1,
36
+ }
37
+
38
+ export function aILabelRatingFromJSON(object: any): AILabelRating {
39
+ switch (object) {
40
+ case 0:
41
+ case "AI_LABEL_RATING_UNSPECIFIED":
42
+ return AILabelRating.AI_LABEL_RATING_UNSPECIFIED;
43
+ case 1:
44
+ case "AI_LABEL_RATING_GOOD":
45
+ return AILabelRating.AI_LABEL_RATING_GOOD;
46
+ case 2:
47
+ case "AI_LABEL_RATING_MID":
48
+ return AILabelRating.AI_LABEL_RATING_MID;
49
+ case 3:
50
+ case "AI_LABEL_RATING_BAD":
51
+ return AILabelRating.AI_LABEL_RATING_BAD;
52
+ case -1:
53
+ case "UNRECOGNIZED":
54
+ default:
55
+ return AILabelRating.UNRECOGNIZED;
56
+ }
57
+ }
58
+
59
+ export function aILabelRatingToJSON(object: AILabelRating): string {
60
+ switch (object) {
61
+ case AILabelRating.AI_LABEL_RATING_UNSPECIFIED:
62
+ return "AI_LABEL_RATING_UNSPECIFIED";
63
+ case AILabelRating.AI_LABEL_RATING_GOOD:
64
+ return "AI_LABEL_RATING_GOOD";
65
+ case AILabelRating.AI_LABEL_RATING_MID:
66
+ return "AI_LABEL_RATING_MID";
67
+ case AILabelRating.AI_LABEL_RATING_BAD:
68
+ return "AI_LABEL_RATING_BAD";
69
+ case AILabelRating.UNRECOGNIZED:
70
+ default:
71
+ return "UNRECOGNIZED";
72
+ }
73
+ }
74
+
29
75
  /** SessionInsightSort orders a page of insights. */
30
76
  export enum SessionInsightSort {
31
77
  SESSION_INSIGHT_SORT_UNSPECIFIED = 0,
@@ -313,389 +359,6 @@ export function aISessionEventTypeToJSON(object: AISessionEventType): string {
313
359
  }
314
360
  }
315
361
 
316
- /** AIPromptComplexity is how much a prompt asks for, as a model judged it (MIR-469); mirrors ai.api.v1. */
317
- export enum AIPromptComplexity {
318
- /** AI_PROMPT_COMPLEXITY_UNSPECIFIED - not labelled */
319
- AI_PROMPT_COMPLEXITY_UNSPECIFIED = 0,
320
- AI_PROMPT_COMPLEXITY_SIMPLE = 1,
321
- AI_PROMPT_COMPLEXITY_MODERATE = 2,
322
- AI_PROMPT_COMPLEXITY_COMPLEX = 3,
323
- UNRECOGNIZED = -1,
324
- }
325
-
326
- export function aIPromptComplexityFromJSON(object: any): AIPromptComplexity {
327
- switch (object) {
328
- case 0:
329
- case "AI_PROMPT_COMPLEXITY_UNSPECIFIED":
330
- return AIPromptComplexity.AI_PROMPT_COMPLEXITY_UNSPECIFIED;
331
- case 1:
332
- case "AI_PROMPT_COMPLEXITY_SIMPLE":
333
- return AIPromptComplexity.AI_PROMPT_COMPLEXITY_SIMPLE;
334
- case 2:
335
- case "AI_PROMPT_COMPLEXITY_MODERATE":
336
- return AIPromptComplexity.AI_PROMPT_COMPLEXITY_MODERATE;
337
- case 3:
338
- case "AI_PROMPT_COMPLEXITY_COMPLEX":
339
- return AIPromptComplexity.AI_PROMPT_COMPLEXITY_COMPLEX;
340
- case -1:
341
- case "UNRECOGNIZED":
342
- default:
343
- return AIPromptComplexity.UNRECOGNIZED;
344
- }
345
- }
346
-
347
- export function aIPromptComplexityToJSON(object: AIPromptComplexity): string {
348
- switch (object) {
349
- case AIPromptComplexity.AI_PROMPT_COMPLEXITY_UNSPECIFIED:
350
- return "AI_PROMPT_COMPLEXITY_UNSPECIFIED";
351
- case AIPromptComplexity.AI_PROMPT_COMPLEXITY_SIMPLE:
352
- return "AI_PROMPT_COMPLEXITY_SIMPLE";
353
- case AIPromptComplexity.AI_PROMPT_COMPLEXITY_MODERATE:
354
- return "AI_PROMPT_COMPLEXITY_MODERATE";
355
- case AIPromptComplexity.AI_PROMPT_COMPLEXITY_COMPLEX:
356
- return "AI_PROMPT_COMPLEXITY_COMPLEX";
357
- case AIPromptComplexity.UNRECOGNIZED:
358
- default:
359
- return "UNRECOGNIZED";
360
- }
361
- }
362
-
363
- /** AIPromptClarity is whether a prompt gave the agent enough to act on; mirrors ai.api.v1. */
364
- export enum AIPromptClarity {
365
- /** AI_PROMPT_CLARITY_UNSPECIFIED - not labelled */
366
- AI_PROMPT_CLARITY_UNSPECIFIED = 0,
367
- /** AI_PROMPT_CLARITY_UNCLEAR - no actionable goal, or key context missing */
368
- AI_PROMPT_CLARITY_UNCLEAR = 1,
369
- /** AI_PROMPT_CLARITY_PARTIAL - the goal is clear, but scope or done is vague */
370
- AI_PROMPT_CLARITY_PARTIAL = 2,
371
- /** AI_PROMPT_CLARITY_CLEAR - the agent knows what to do and what done looks like */
372
- AI_PROMPT_CLARITY_CLEAR = 3,
373
- UNRECOGNIZED = -1,
374
- }
375
-
376
- export function aIPromptClarityFromJSON(object: any): AIPromptClarity {
377
- switch (object) {
378
- case 0:
379
- case "AI_PROMPT_CLARITY_UNSPECIFIED":
380
- return AIPromptClarity.AI_PROMPT_CLARITY_UNSPECIFIED;
381
- case 1:
382
- case "AI_PROMPT_CLARITY_UNCLEAR":
383
- return AIPromptClarity.AI_PROMPT_CLARITY_UNCLEAR;
384
- case 2:
385
- case "AI_PROMPT_CLARITY_PARTIAL":
386
- return AIPromptClarity.AI_PROMPT_CLARITY_PARTIAL;
387
- case 3:
388
- case "AI_PROMPT_CLARITY_CLEAR":
389
- return AIPromptClarity.AI_PROMPT_CLARITY_CLEAR;
390
- case -1:
391
- case "UNRECOGNIZED":
392
- default:
393
- return AIPromptClarity.UNRECOGNIZED;
394
- }
395
- }
396
-
397
- export function aIPromptClarityToJSON(object: AIPromptClarity): string {
398
- switch (object) {
399
- case AIPromptClarity.AI_PROMPT_CLARITY_UNSPECIFIED:
400
- return "AI_PROMPT_CLARITY_UNSPECIFIED";
401
- case AIPromptClarity.AI_PROMPT_CLARITY_UNCLEAR:
402
- return "AI_PROMPT_CLARITY_UNCLEAR";
403
- case AIPromptClarity.AI_PROMPT_CLARITY_PARTIAL:
404
- return "AI_PROMPT_CLARITY_PARTIAL";
405
- case AIPromptClarity.AI_PROMPT_CLARITY_CLEAR:
406
- return "AI_PROMPT_CLARITY_CLEAR";
407
- case AIPromptClarity.UNRECOGNIZED:
408
- default:
409
- return "UNRECOGNIZED";
410
- }
411
- }
412
-
413
- /** AIPromptSteering is what a prompt does in its session. */
414
- export enum AIPromptSteering {
415
- /** AI_PROMPT_STEERING_UNSPECIFIED - not labelled */
416
- AI_PROMPT_STEERING_UNSPECIFIED = 0,
417
- AI_PROMPT_STEERING_NEW_TASK = 1,
418
- AI_PROMPT_STEERING_FOLLOW_UP = 2,
419
- AI_PROMPT_STEERING_CORRECTION = 3,
420
- AI_PROMPT_STEERING_REDIRECT = 4,
421
- AI_PROMPT_STEERING_APPROVAL = 5,
422
- UNRECOGNIZED = -1,
423
- }
424
-
425
- export function aIPromptSteeringFromJSON(object: any): AIPromptSteering {
426
- switch (object) {
427
- case 0:
428
- case "AI_PROMPT_STEERING_UNSPECIFIED":
429
- return AIPromptSteering.AI_PROMPT_STEERING_UNSPECIFIED;
430
- case 1:
431
- case "AI_PROMPT_STEERING_NEW_TASK":
432
- return AIPromptSteering.AI_PROMPT_STEERING_NEW_TASK;
433
- case 2:
434
- case "AI_PROMPT_STEERING_FOLLOW_UP":
435
- return AIPromptSteering.AI_PROMPT_STEERING_FOLLOW_UP;
436
- case 3:
437
- case "AI_PROMPT_STEERING_CORRECTION":
438
- return AIPromptSteering.AI_PROMPT_STEERING_CORRECTION;
439
- case 4:
440
- case "AI_PROMPT_STEERING_REDIRECT":
441
- return AIPromptSteering.AI_PROMPT_STEERING_REDIRECT;
442
- case 5:
443
- case "AI_PROMPT_STEERING_APPROVAL":
444
- return AIPromptSteering.AI_PROMPT_STEERING_APPROVAL;
445
- case -1:
446
- case "UNRECOGNIZED":
447
- default:
448
- return AIPromptSteering.UNRECOGNIZED;
449
- }
450
- }
451
-
452
- export function aIPromptSteeringToJSON(object: AIPromptSteering): string {
453
- switch (object) {
454
- case AIPromptSteering.AI_PROMPT_STEERING_UNSPECIFIED:
455
- return "AI_PROMPT_STEERING_UNSPECIFIED";
456
- case AIPromptSteering.AI_PROMPT_STEERING_NEW_TASK:
457
- return "AI_PROMPT_STEERING_NEW_TASK";
458
- case AIPromptSteering.AI_PROMPT_STEERING_FOLLOW_UP:
459
- return "AI_PROMPT_STEERING_FOLLOW_UP";
460
- case AIPromptSteering.AI_PROMPT_STEERING_CORRECTION:
461
- return "AI_PROMPT_STEERING_CORRECTION";
462
- case AIPromptSteering.AI_PROMPT_STEERING_REDIRECT:
463
- return "AI_PROMPT_STEERING_REDIRECT";
464
- case AIPromptSteering.AI_PROMPT_STEERING_APPROVAL:
465
- return "AI_PROMPT_STEERING_APPROVAL";
466
- case AIPromptSteering.UNRECOGNIZED:
467
- default:
468
- return "UNRECOGNIZED";
469
- }
470
- }
471
-
472
- /**
473
- * AIPromptFrustration is how much frustration with the agent a prompt shows. The numbers rise with severity and a new
474
- * level is only ever appended above the most severe one. NONE is a label, not "not labelled".
475
- */
476
- export enum AIPromptFrustration {
477
- /** AI_PROMPT_FRUSTRATION_UNSPECIFIED - not labelled */
478
- AI_PROMPT_FRUSTRATION_UNSPECIFIED = 0,
479
- AI_PROMPT_FRUSTRATION_NONE = 1,
480
- AI_PROMPT_FRUSTRATION_MILD = 2,
481
- AI_PROMPT_FRUSTRATION_STRONG = 3,
482
- UNRECOGNIZED = -1,
483
- }
484
-
485
- export function aIPromptFrustrationFromJSON(object: any): AIPromptFrustration {
486
- switch (object) {
487
- case 0:
488
- case "AI_PROMPT_FRUSTRATION_UNSPECIFIED":
489
- return AIPromptFrustration.AI_PROMPT_FRUSTRATION_UNSPECIFIED;
490
- case 1:
491
- case "AI_PROMPT_FRUSTRATION_NONE":
492
- return AIPromptFrustration.AI_PROMPT_FRUSTRATION_NONE;
493
- case 2:
494
- case "AI_PROMPT_FRUSTRATION_MILD":
495
- return AIPromptFrustration.AI_PROMPT_FRUSTRATION_MILD;
496
- case 3:
497
- case "AI_PROMPT_FRUSTRATION_STRONG":
498
- return AIPromptFrustration.AI_PROMPT_FRUSTRATION_STRONG;
499
- case -1:
500
- case "UNRECOGNIZED":
501
- default:
502
- return AIPromptFrustration.UNRECOGNIZED;
503
- }
504
- }
505
-
506
- export function aIPromptFrustrationToJSON(object: AIPromptFrustration): string {
507
- switch (object) {
508
- case AIPromptFrustration.AI_PROMPT_FRUSTRATION_UNSPECIFIED:
509
- return "AI_PROMPT_FRUSTRATION_UNSPECIFIED";
510
- case AIPromptFrustration.AI_PROMPT_FRUSTRATION_NONE:
511
- return "AI_PROMPT_FRUSTRATION_NONE";
512
- case AIPromptFrustration.AI_PROMPT_FRUSTRATION_MILD:
513
- return "AI_PROMPT_FRUSTRATION_MILD";
514
- case AIPromptFrustration.AI_PROMPT_FRUSTRATION_STRONG:
515
- return "AI_PROMPT_FRUSTRATION_STRONG";
516
- case AIPromptFrustration.UNRECOGNIZED:
517
- default:
518
- return "UNRECOGNIZED";
519
- }
520
- }
521
-
522
- /** AIPromptSentiment is a prompt's overall tone. */
523
- export enum AIPromptSentiment {
524
- /** AI_PROMPT_SENTIMENT_UNSPECIFIED - not labelled */
525
- AI_PROMPT_SENTIMENT_UNSPECIFIED = 0,
526
- AI_PROMPT_SENTIMENT_NEGATIVE = 1,
527
- AI_PROMPT_SENTIMENT_NEUTRAL = 2,
528
- AI_PROMPT_SENTIMENT_POSITIVE = 3,
529
- UNRECOGNIZED = -1,
530
- }
531
-
532
- export function aIPromptSentimentFromJSON(object: any): AIPromptSentiment {
533
- switch (object) {
534
- case 0:
535
- case "AI_PROMPT_SENTIMENT_UNSPECIFIED":
536
- return AIPromptSentiment.AI_PROMPT_SENTIMENT_UNSPECIFIED;
537
- case 1:
538
- case "AI_PROMPT_SENTIMENT_NEGATIVE":
539
- return AIPromptSentiment.AI_PROMPT_SENTIMENT_NEGATIVE;
540
- case 2:
541
- case "AI_PROMPT_SENTIMENT_NEUTRAL":
542
- return AIPromptSentiment.AI_PROMPT_SENTIMENT_NEUTRAL;
543
- case 3:
544
- case "AI_PROMPT_SENTIMENT_POSITIVE":
545
- return AIPromptSentiment.AI_PROMPT_SENTIMENT_POSITIVE;
546
- case -1:
547
- case "UNRECOGNIZED":
548
- default:
549
- return AIPromptSentiment.UNRECOGNIZED;
550
- }
551
- }
552
-
553
- export function aIPromptSentimentToJSON(object: AIPromptSentiment): string {
554
- switch (object) {
555
- case AIPromptSentiment.AI_PROMPT_SENTIMENT_UNSPECIFIED:
556
- return "AI_PROMPT_SENTIMENT_UNSPECIFIED";
557
- case AIPromptSentiment.AI_PROMPT_SENTIMENT_NEGATIVE:
558
- return "AI_PROMPT_SENTIMENT_NEGATIVE";
559
- case AIPromptSentiment.AI_PROMPT_SENTIMENT_NEUTRAL:
560
- return "AI_PROMPT_SENTIMENT_NEUTRAL";
561
- case AIPromptSentiment.AI_PROMPT_SENTIMENT_POSITIVE:
562
- return "AI_PROMPT_SENTIMENT_POSITIVE";
563
- case AIPromptSentiment.UNRECOGNIZED:
564
- default:
565
- return "UNRECOGNIZED";
566
- }
567
- }
568
-
569
- /**
570
- * AISessionWorkType is the kind of work a model judged a session to be (MIR-386). ClickHouse stores the number
571
- * (ai_session_labels.WorkType). A retired value stays here, deprecated and never renumbered, so an old label still reads.
572
- */
573
- export enum AISessionWorkType {
574
- /** AI_SESSION_WORK_TYPE_UNSPECIFIED - no label: too short, nothing to read, or not labelled yet */
575
- AI_SESSION_WORK_TYPE_UNSPECIFIED = 0,
576
- AI_SESSION_WORK_TYPE_BUG_FIX = 1,
577
- AI_SESSION_WORK_TYPE_FEATURE = 2,
578
- AI_SESSION_WORK_TYPE_REFACTOR = 3,
579
- AI_SESSION_WORK_TYPE_TESTS = 4,
580
- AI_SESSION_WORK_TYPE_DOCS = 5,
581
- AI_SESSION_WORK_TYPE_OPS = 6,
582
- AI_SESSION_WORK_TYPE_REVIEW = 7,
583
- AI_SESSION_WORK_TYPE_EXPLORATION = 8,
584
- UNRECOGNIZED = -1,
585
- }
586
-
587
- export function aISessionWorkTypeFromJSON(object: any): AISessionWorkType {
588
- switch (object) {
589
- case 0:
590
- case "AI_SESSION_WORK_TYPE_UNSPECIFIED":
591
- return AISessionWorkType.AI_SESSION_WORK_TYPE_UNSPECIFIED;
592
- case 1:
593
- case "AI_SESSION_WORK_TYPE_BUG_FIX":
594
- return AISessionWorkType.AI_SESSION_WORK_TYPE_BUG_FIX;
595
- case 2:
596
- case "AI_SESSION_WORK_TYPE_FEATURE":
597
- return AISessionWorkType.AI_SESSION_WORK_TYPE_FEATURE;
598
- case 3:
599
- case "AI_SESSION_WORK_TYPE_REFACTOR":
600
- return AISessionWorkType.AI_SESSION_WORK_TYPE_REFACTOR;
601
- case 4:
602
- case "AI_SESSION_WORK_TYPE_TESTS":
603
- return AISessionWorkType.AI_SESSION_WORK_TYPE_TESTS;
604
- case 5:
605
- case "AI_SESSION_WORK_TYPE_DOCS":
606
- return AISessionWorkType.AI_SESSION_WORK_TYPE_DOCS;
607
- case 6:
608
- case "AI_SESSION_WORK_TYPE_OPS":
609
- return AISessionWorkType.AI_SESSION_WORK_TYPE_OPS;
610
- case 7:
611
- case "AI_SESSION_WORK_TYPE_REVIEW":
612
- return AISessionWorkType.AI_SESSION_WORK_TYPE_REVIEW;
613
- case 8:
614
- case "AI_SESSION_WORK_TYPE_EXPLORATION":
615
- return AISessionWorkType.AI_SESSION_WORK_TYPE_EXPLORATION;
616
- case -1:
617
- case "UNRECOGNIZED":
618
- default:
619
- return AISessionWorkType.UNRECOGNIZED;
620
- }
621
- }
622
-
623
- export function aISessionWorkTypeToJSON(object: AISessionWorkType): string {
624
- switch (object) {
625
- case AISessionWorkType.AI_SESSION_WORK_TYPE_UNSPECIFIED:
626
- return "AI_SESSION_WORK_TYPE_UNSPECIFIED";
627
- case AISessionWorkType.AI_SESSION_WORK_TYPE_BUG_FIX:
628
- return "AI_SESSION_WORK_TYPE_BUG_FIX";
629
- case AISessionWorkType.AI_SESSION_WORK_TYPE_FEATURE:
630
- return "AI_SESSION_WORK_TYPE_FEATURE";
631
- case AISessionWorkType.AI_SESSION_WORK_TYPE_REFACTOR:
632
- return "AI_SESSION_WORK_TYPE_REFACTOR";
633
- case AISessionWorkType.AI_SESSION_WORK_TYPE_TESTS:
634
- return "AI_SESSION_WORK_TYPE_TESTS";
635
- case AISessionWorkType.AI_SESSION_WORK_TYPE_DOCS:
636
- return "AI_SESSION_WORK_TYPE_DOCS";
637
- case AISessionWorkType.AI_SESSION_WORK_TYPE_OPS:
638
- return "AI_SESSION_WORK_TYPE_OPS";
639
- case AISessionWorkType.AI_SESSION_WORK_TYPE_REVIEW:
640
- return "AI_SESSION_WORK_TYPE_REVIEW";
641
- case AISessionWorkType.AI_SESSION_WORK_TYPE_EXPLORATION:
642
- return "AI_SESSION_WORK_TYPE_EXPLORATION";
643
- case AISessionWorkType.UNRECOGNIZED:
644
- default:
645
- return "UNRECOGNIZED";
646
- }
647
- }
648
-
649
- /**
650
- * AISessionComplexity is the size of a session's work from the same label. ClickHouse stores the number
651
- * (ai_session_labels.Complexity); retired values stay, deprecated.
652
- */
653
- export enum AISessionComplexity {
654
- /** AI_SESSION_COMPLEXITY_UNSPECIFIED - no label */
655
- AI_SESSION_COMPLEXITY_UNSPECIFIED = 0,
656
- AI_SESSION_COMPLEXITY_SMALL = 1,
657
- AI_SESSION_COMPLEXITY_MEDIUM = 2,
658
- AI_SESSION_COMPLEXITY_LARGE = 3,
659
- UNRECOGNIZED = -1,
660
- }
661
-
662
- export function aISessionComplexityFromJSON(object: any): AISessionComplexity {
663
- switch (object) {
664
- case 0:
665
- case "AI_SESSION_COMPLEXITY_UNSPECIFIED":
666
- return AISessionComplexity.AI_SESSION_COMPLEXITY_UNSPECIFIED;
667
- case 1:
668
- case "AI_SESSION_COMPLEXITY_SMALL":
669
- return AISessionComplexity.AI_SESSION_COMPLEXITY_SMALL;
670
- case 2:
671
- case "AI_SESSION_COMPLEXITY_MEDIUM":
672
- return AISessionComplexity.AI_SESSION_COMPLEXITY_MEDIUM;
673
- case 3:
674
- case "AI_SESSION_COMPLEXITY_LARGE":
675
- return AISessionComplexity.AI_SESSION_COMPLEXITY_LARGE;
676
- case -1:
677
- case "UNRECOGNIZED":
678
- default:
679
- return AISessionComplexity.UNRECOGNIZED;
680
- }
681
- }
682
-
683
- export function aISessionComplexityToJSON(object: AISessionComplexity): string {
684
- switch (object) {
685
- case AISessionComplexity.AI_SESSION_COMPLEXITY_UNSPECIFIED:
686
- return "AI_SESSION_COMPLEXITY_UNSPECIFIED";
687
- case AISessionComplexity.AI_SESSION_COMPLEXITY_SMALL:
688
- return "AI_SESSION_COMPLEXITY_SMALL";
689
- case AISessionComplexity.AI_SESSION_COMPLEXITY_MEDIUM:
690
- return "AI_SESSION_COMPLEXITY_MEDIUM";
691
- case AISessionComplexity.AI_SESSION_COMPLEXITY_LARGE:
692
- return "AI_SESSION_COMPLEXITY_LARGE";
693
- case AISessionComplexity.UNRECOGNIZED:
694
- default:
695
- return "UNRECOGNIZED";
696
- }
697
- }
698
-
699
362
  export enum AIGitAction {
700
363
  AI_GIT_ACTION_UNSPECIFIED = 0,
701
364
  AI_GIT_ACTION_BRANCH_CREATE = 1,
@@ -2159,10 +1822,10 @@ export interface SessionFilter {
2159
1822
  /** Stored model, provider or effort names whose display name the caller matched to the search text. */
2160
1823
  searchStoredNames: string[];
2161
1824
  /**
2162
- * Work types of the session's latest label (see AISessionSummary.work_type); a session with no label matches none.
2163
- * UNSPECIFIED or a number this server does not know is INVALID_ARGUMENT.
1825
+ * Work type keys of the session's latest label (AISessionSummary.work_type), such as "bug_fix"; a session with no
1826
+ * label matches none. At most 50 keys; an empty key is INVALID_ARGUMENT.
2164
1827
  */
2165
- workTypes: AISessionWorkType[];
1828
+ workTypes: string[];
2166
1829
  }
2167
1830
 
2168
1831
  /**
@@ -2260,12 +1923,12 @@ export interface AISessionSummary {
2260
1923
  /** The harness's latest "while you were away" recap (summary · recap); "" when it wrote none. */
2261
1924
  recap: string;
2262
1925
  /**
2263
- * The kind of work a model judged the session to be, from its latest label, which can predate its latest activity
2264
- * until the labeller relabels it; UNSPECIFIED when it has no label.
1926
+ * The work type key of the session's latest label (GetLabelCatalog's session work_type values), which can predate its
1927
+ * latest activity until the labeller relabels it; "" when it has no label.
2265
1928
  */
2266
- workType: AISessionWorkType;
2267
- /** The session's size from the same label; UNSPECIFIED when it has no label. */
2268
- complexity: AISessionComplexity;
1929
+ workType: string;
1930
+ /** The work size key of the same label; "" when it has no label. */
1931
+ workSize: string;
2269
1932
  /**
2270
1933
  * The session's score (0-100, AISessionScore) from its latest grading; absent when it is not scored: not graded
2271
1934
  * yet, or graded from an older session_version. GetSessionAnalysis has the breakdown.
@@ -2447,13 +2110,19 @@ export interface AIContentPart {
2447
2110
  content: string;
2448
2111
  }
2449
2112
 
2450
- /** AIPromptLabels is a model's labels for one prompt, from its latest labelling; a labelled prompt has all five. */
2113
+ /** AILabelCount is how many labelled prompts have one value (key) of one dimension. */
2114
+ export interface AILabelCount {
2115
+ key: string;
2116
+ prompts: number;
2117
+ }
2118
+
2119
+ /**
2120
+ * AIPromptLabels is a model's labels for one prompt, from its latest labelling: a value key of each of the prompt
2121
+ * labeller's dimensions (GetLabelCatalog's prompt steering and tone values).
2122
+ */
2451
2123
  export interface AIPromptLabels {
2452
- complexity: AIPromptComplexity;
2453
- clarity: AIPromptClarity;
2454
- steering: AIPromptSteering;
2455
- frustration: AIPromptFrustration;
2456
- sentiment: AIPromptSentiment;
2124
+ steering: string;
2125
+ tone: string;
2457
2126
  }
2458
2127
 
2459
2128
  /** AIPromptLabelSummary rolls up one session's labelled prompts, each at its latest labelling. */
@@ -2461,19 +2130,15 @@ export interface AIPromptLabelSummary {
2461
2130
  /** At least 1: the summary is absent when no prompt is labelled. */
2462
2131
  labelledPrompts: number;
2463
2132
  /**
2464
- * One row per steering value with at least one prompt, in enum order, adding up to labelled_prompts; a session with
2465
- * no correction has no CORRECTION row.
2133
+ * One row per steering value with at least one prompt, by key; they add up to labelled_prompts. A share is prompts /
2134
+ * labelled_prompts.
2466
2135
  */
2467
- steeringCounts: AIPromptSteeringCount[];
2468
- /** The most severe frustration among the labelled prompts. */
2469
- peakFrustration: AIPromptFrustration;
2470
- /** Labelled prompts whose clarity is CLEAR; share of clear prompts = clear_prompts / labelled_prompts. */
2471
- clearPrompts: number;
2472
- }
2473
-
2474
- export interface AIPromptSteeringCount {
2475
- steering: AIPromptSteering;
2476
- prompts: number;
2136
+ steeringCounts: AILabelCount[];
2137
+ /**
2138
+ * One row per tone value with at least one prompt, by key; they add up to labelled_prompts. A session's peak is its
2139
+ * value latest in GetLabelCatalog's order with a row.
2140
+ */
2141
+ toneCounts: AILabelCount[];
2477
2142
  }
2478
2143
 
2479
2144
  export interface GetPromptLabelTrendRequest {
@@ -2510,20 +2175,57 @@ export interface GetPromptLabelTrendResponse {
2510
2175
  weeks: AIPromptLabelWeek[];
2511
2176
  }
2512
2177
 
2513
- /**
2514
- * AIPromptLabelWeek: share of clear prompts = clear_prompts / labelled_prompts, correction rate = corrections /
2515
- * labelled_prompts, frustration rate = frustrated_prompts / labelled_prompts, each only when labelled_prompts > 0.
2516
- */
2178
+ /** AIPromptLabelWeek: a value's share is its prompts / labelled_prompts, only when labelled_prompts > 0. */
2517
2179
  export interface AIPromptLabelWeek {
2518
2180
  /** The week's Monday, YYYY-MM-DD. */
2519
2181
  weekStart: string;
2520
2182
  labelledPrompts: number;
2521
- /** Labelled prompts whose clarity is CLEAR. */
2522
- clearPrompts: number;
2523
- /** Labelled prompts whose steering is CORRECTION. */
2524
- corrections: number;
2525
- /** Labelled prompts with MILD or more severe frustration. */
2526
- frustratedPrompts: number;
2183
+ /** One row per steering value with at least one prompt in the week, by key. */
2184
+ steeringCounts: AILabelCount[];
2185
+ /** One row per tone value with at least one prompt in the week, by key. */
2186
+ toneCounts: AILabelCount[];
2187
+ }
2188
+
2189
+ export interface GetLabelCatalogRequest {
2190
+ organizationId: string;
2191
+ projectId: string;
2192
+ }
2193
+
2194
+ export interface GetLabelCatalogResponse {
2195
+ status:
2196
+ | ResponseStatus
2197
+ | undefined;
2198
+ /** The session labeller's set: work_type then work_size (AISessionSummary, SessionFilter.work_types). */
2199
+ sessionLabels:
2200
+ | AILabelSet
2201
+ | undefined;
2202
+ /** The prompt labeller's set: steering then tone (AIPromptLabels, AIPromptLabelSummary, GetPromptLabelTrend). */
2203
+ promptLabels: AILabelSet | undefined;
2204
+ }
2205
+
2206
+ /** AILabelSet is a labeller's set: its version (a content hash of its values) and its fixed dimensions in order. */
2207
+ export interface AILabelSet {
2208
+ version: string;
2209
+ dimensions: AILabelDimension[];
2210
+ }
2211
+
2212
+ /**
2213
+ * AILabelDimension is one thing a labelled item gets a value of, with its values in display order (a scale mildest or
2214
+ * smallest first).
2215
+ */
2216
+ export interface AILabelDimension {
2217
+ key: string;
2218
+ name: string;
2219
+ values: AILabelValue[];
2220
+ }
2221
+
2222
+ /** AILabelValue is one value of a dimension. */
2223
+ export interface AILabelValue {
2224
+ key: string;
2225
+ name: string;
2226
+ /** One plain-language sentence for people (a chip's tooltip), with the likely cause where that helps. */
2227
+ tooltip: string;
2228
+ rating: AILabelRating;
2527
2229
  }
2528
2230
 
2529
2231
  export interface SessionTokenTimelineRequest {
@@ -4959,7 +4661,7 @@ export const SessionFilter: MessageFns<SessionFilter> = {
4959
4661
  writer.uint32(98).string(v!);
4960
4662
  }
4961
4663
  for (const v of message.workTypes) {
4962
- writer.uint32(104).int32(v!);
4664
+ writer.uint32(106).string(v!);
4963
4665
  }
4964
4666
  return writer;
4965
4667
  },
@@ -5074,22 +4776,12 @@ export const SessionFilter: MessageFns<SessionFilter> = {
5074
4776
  continue;
5075
4777
  }
5076
4778
  case 13: {
5077
- if (tag === 104) {
5078
- message.workTypes.push(reader.int32() as any);
5079
-
5080
- continue;
5081
- }
5082
-
5083
- if (tag === 106) {
5084
- const end2 = reader.uint32() + reader.pos;
5085
- while (reader.pos < end2) {
5086
- message.workTypes.push(reader.int32() as any);
5087
- }
5088
-
5089
- continue;
4779
+ if (tag !== 106) {
4780
+ break;
5090
4781
  }
5091
4782
 
5092
- break;
4783
+ message.workTypes.push(reader.string());
4784
+ continue;
5093
4785
  }
5094
4786
  }
5095
4787
  if ((tag & 7) === 4 || tag === 0) {
@@ -5148,9 +4840,9 @@ export const SessionFilter: MessageFns<SessionFilter> = {
5148
4840
  ? object.search_stored_names.map((e: any) => globalThis.String(e))
5149
4841
  : [],
5150
4842
  workTypes: globalThis.Array.isArray(object?.workTypes)
5151
- ? object.workTypes.map((e: any) => aISessionWorkTypeFromJSON(e))
4843
+ ? object.workTypes.map((e: any) => globalThis.String(e))
5152
4844
  : globalThis.Array.isArray(object?.work_types)
5153
- ? object.work_types.map((e: any) => aISessionWorkTypeFromJSON(e))
4845
+ ? object.work_types.map((e: any) => globalThis.String(e))
5154
4846
  : [],
5155
4847
  };
5156
4848
  },
@@ -5194,7 +4886,7 @@ export const SessionFilter: MessageFns<SessionFilter> = {
5194
4886
  obj.searchStoredNames = message.searchStoredNames;
5195
4887
  }
5196
4888
  if (message.workTypes?.length) {
5197
- obj.workTypes = message.workTypes.map((e) => aISessionWorkTypeToJSON(e));
4889
+ obj.workTypes = message.workTypes;
5198
4890
  }
5199
4891
  return obj;
5200
4892
  },
@@ -5657,8 +5349,8 @@ function createBaseAISessionSummary(): AISessionSummary {
5657
5349
  termaVersions: [],
5658
5350
  title: "",
5659
5351
  recap: "",
5660
- workType: 0,
5661
- complexity: 0,
5352
+ workType: "",
5353
+ workSize: "",
5662
5354
  sessionScore: undefined,
5663
5355
  promptLabelSummary: undefined,
5664
5356
  };
@@ -5771,11 +5463,11 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
5771
5463
  if (message.recap !== "") {
5772
5464
  writer.uint32(274).string(message.recap);
5773
5465
  }
5774
- if (message.workType !== 0) {
5775
- writer.uint32(288).int32(message.workType);
5466
+ if (message.workType !== "") {
5467
+ writer.uint32(290).string(message.workType);
5776
5468
  }
5777
- if (message.complexity !== 0) {
5778
- writer.uint32(296).int32(message.complexity);
5469
+ if (message.workSize !== "") {
5470
+ writer.uint32(298).string(message.workSize);
5779
5471
  }
5780
5472
  if (message.sessionScore !== undefined) {
5781
5473
  writer.uint32(304).int32(message.sessionScore);
@@ -6080,19 +5772,19 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6080
5772
  continue;
6081
5773
  }
6082
5774
  case 36: {
6083
- if (tag !== 288) {
5775
+ if (tag !== 290) {
6084
5776
  break;
6085
5777
  }
6086
5778
 
6087
- message.workType = reader.int32() as any;
5779
+ message.workType = reader.string();
6088
5780
  continue;
6089
5781
  }
6090
5782
  case 37: {
6091
- if (tag !== 296) {
5783
+ if (tag !== 298) {
6092
5784
  break;
6093
5785
  }
6094
5786
 
6095
- message.complexity = reader.int32() as any;
5787
+ message.workSize = reader.string();
6096
5788
  continue;
6097
5789
  }
6098
5790
  case 38: {
@@ -6261,11 +5953,15 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6261
5953
  title: isSet(object.title) ? globalThis.String(object.title) : "",
6262
5954
  recap: isSet(object.recap) ? globalThis.String(object.recap) : "",
6263
5955
  workType: isSet(object.workType)
6264
- ? aISessionWorkTypeFromJSON(object.workType)
5956
+ ? globalThis.String(object.workType)
6265
5957
  : isSet(object.work_type)
6266
- ? aISessionWorkTypeFromJSON(object.work_type)
6267
- : 0,
6268
- complexity: isSet(object.complexity) ? aISessionComplexityFromJSON(object.complexity) : 0,
5958
+ ? globalThis.String(object.work_type)
5959
+ : "",
5960
+ workSize: isSet(object.workSize)
5961
+ ? globalThis.String(object.workSize)
5962
+ : isSet(object.work_size)
5963
+ ? globalThis.String(object.work_size)
5964
+ : "",
6269
5965
  sessionScore: isSet(object.sessionScore)
6270
5966
  ? globalThis.Number(object.sessionScore)
6271
5967
  : isSet(object.session_score)
@@ -6386,11 +6082,11 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6386
6082
  if (message.recap !== "") {
6387
6083
  obj.recap = message.recap;
6388
6084
  }
6389
- if (message.workType !== 0) {
6390
- obj.workType = aISessionWorkTypeToJSON(message.workType);
6085
+ if (message.workType !== "") {
6086
+ obj.workType = message.workType;
6391
6087
  }
6392
- if (message.complexity !== 0) {
6393
- obj.complexity = aISessionComplexityToJSON(message.complexity);
6088
+ if (message.workSize !== "") {
6089
+ obj.workSize = message.workSize;
6394
6090
  }
6395
6091
  if (message.sessionScore !== undefined) {
6396
6092
  obj.sessionScore = Math.round(message.sessionScore);
@@ -6443,8 +6139,8 @@ export const AISessionSummary: MessageFns<AISessionSummary> = {
6443
6139
  message.termaVersions = object.termaVersions?.map((e) => e) || [];
6444
6140
  message.title = object.title ?? "";
6445
6141
  message.recap = object.recap ?? "";
6446
- message.workType = object.workType ?? 0;
6447
- message.complexity = object.complexity ?? 0;
6142
+ message.workType = object.workType ?? "";
6143
+ message.workSize = object.workSize ?? "";
6448
6144
  message.sessionScore = object.sessionScore ?? undefined;
6449
6145
  message.promptLabelSummary = (object.promptLabelSummary !== undefined && object.promptLabelSummary !== null)
6450
6146
  ? AIPromptLabelSummary.fromPartial(object.promptLabelSummary)
@@ -8286,31 +7982,22 @@ export const AIContentPart: MessageFns<AIContentPart> = {
8286
7982
  },
8287
7983
  };
8288
7984
 
8289
- function createBaseAIPromptLabels(): AIPromptLabels {
8290
- return { complexity: 0, clarity: 0, steering: 0, frustration: 0, sentiment: 0 };
7985
+ function createBaseAILabelCount(): AILabelCount {
7986
+ return { key: "", prompts: 0 };
8291
7987
  }
8292
7988
 
8293
- export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8294
- encode(message: AIPromptLabels, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8295
- if (message.complexity !== 0) {
8296
- writer.uint32(8).int32(message.complexity);
8297
- }
8298
- if (message.clarity !== 0) {
8299
- writer.uint32(16).int32(message.clarity);
8300
- }
8301
- if (message.steering !== 0) {
8302
- writer.uint32(24).int32(message.steering);
8303
- }
8304
- if (message.frustration !== 0) {
8305
- writer.uint32(32).int32(message.frustration);
7989
+ export const AILabelCount: MessageFns<AILabelCount> = {
7990
+ encode(message: AILabelCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
7991
+ if (message.key !== "") {
7992
+ writer.uint32(10).string(message.key);
8306
7993
  }
8307
- if (message.sentiment !== 0) {
8308
- writer.uint32(40).int32(message.sentiment);
7994
+ if (message.prompts !== 0) {
7995
+ writer.uint32(16).uint64(message.prompts);
8309
7996
  }
8310
7997
  return writer;
8311
7998
  },
8312
7999
 
8313
- decode(input: BinaryReader | Uint8Array, length?: number): AIPromptLabels {
8000
+ decode(input: BinaryReader | Uint8Array, length?: number): AILabelCount {
8314
8001
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8315
8002
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8316
8003
  if (previousRecursionDepth >= 100) {
@@ -8319,16 +8006,16 @@ export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8319
8006
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8320
8007
  try {
8321
8008
  const end = length === undefined ? reader.len : reader.pos + length;
8322
- const message = createBaseAIPromptLabels();
8009
+ const message = createBaseAILabelCount();
8323
8010
  while (reader.pos < end) {
8324
8011
  const tag = reader.uint32();
8325
8012
  switch (tag >>> 3) {
8326
8013
  case 1: {
8327
- if (tag !== 8) {
8014
+ if (tag !== 10) {
8328
8015
  break;
8329
8016
  }
8330
8017
 
8331
- message.complexity = reader.int32() as any;
8018
+ message.key = reader.string();
8332
8019
  continue;
8333
8020
  }
8334
8021
  case 2: {
@@ -8336,31 +8023,92 @@ export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8336
8023
  break;
8337
8024
  }
8338
8025
 
8339
- message.clarity = reader.int32() as any;
8026
+ message.prompts = longToNumber(reader.uint64());
8340
8027
  continue;
8341
8028
  }
8342
- case 3: {
8343
- if (tag !== 24) {
8344
- break;
8345
- }
8029
+ }
8030
+ if ((tag & 7) === 4 || tag === 0) {
8031
+ break;
8032
+ }
8033
+ reader.skip(tag & 7);
8034
+ }
8035
+ return message;
8036
+ } finally {
8037
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
8038
+ }
8039
+ },
8346
8040
 
8347
- message.steering = reader.int32() as any;
8348
- continue;
8349
- }
8350
- case 4: {
8351
- if (tag !== 32) {
8041
+ fromJSON(object: any): AILabelCount {
8042
+ return {
8043
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
8044
+ prompts: isSet(object.prompts) ? globalThis.Number(object.prompts) : 0,
8045
+ };
8046
+ },
8047
+
8048
+ toJSON(message: AILabelCount): unknown {
8049
+ const obj: any = {};
8050
+ if (message.key !== "") {
8051
+ obj.key = message.key;
8052
+ }
8053
+ if (message.prompts !== 0) {
8054
+ obj.prompts = Math.round(message.prompts);
8055
+ }
8056
+ return obj;
8057
+ },
8058
+
8059
+ create<I extends Exact<DeepPartial<AILabelCount>, I>>(base?: I): AILabelCount {
8060
+ return AILabelCount.fromPartial(base ?? ({} as any));
8061
+ },
8062
+ fromPartial<I extends Exact<DeepPartial<AILabelCount>, I>>(object: I): AILabelCount {
8063
+ const message = createBaseAILabelCount();
8064
+ message.key = object.key ?? "";
8065
+ message.prompts = object.prompts ?? 0;
8066
+ return message;
8067
+ },
8068
+ };
8069
+
8070
+ function createBaseAIPromptLabels(): AIPromptLabels {
8071
+ return { steering: "", tone: "" };
8072
+ }
8073
+
8074
+ export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8075
+ encode(message: AIPromptLabels, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8076
+ if (message.steering !== "") {
8077
+ writer.uint32(10).string(message.steering);
8078
+ }
8079
+ if (message.tone !== "") {
8080
+ writer.uint32(18).string(message.tone);
8081
+ }
8082
+ return writer;
8083
+ },
8084
+
8085
+ decode(input: BinaryReader | Uint8Array, length?: number): AIPromptLabels {
8086
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8087
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8088
+ if (previousRecursionDepth >= 100) {
8089
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
8090
+ }
8091
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8092
+ try {
8093
+ const end = length === undefined ? reader.len : reader.pos + length;
8094
+ const message = createBaseAIPromptLabels();
8095
+ while (reader.pos < end) {
8096
+ const tag = reader.uint32();
8097
+ switch (tag >>> 3) {
8098
+ case 1: {
8099
+ if (tag !== 10) {
8352
8100
  break;
8353
8101
  }
8354
8102
 
8355
- message.frustration = reader.int32() as any;
8103
+ message.steering = reader.string();
8356
8104
  continue;
8357
8105
  }
8358
- case 5: {
8359
- if (tag !== 40) {
8106
+ case 2: {
8107
+ if (tag !== 18) {
8360
8108
  break;
8361
8109
  }
8362
8110
 
8363
- message.sentiment = reader.int32() as any;
8111
+ message.tone = reader.string();
8364
8112
  continue;
8365
8113
  }
8366
8114
  }
@@ -8377,30 +8125,18 @@ export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8377
8125
 
8378
8126
  fromJSON(object: any): AIPromptLabels {
8379
8127
  return {
8380
- complexity: isSet(object.complexity) ? aIPromptComplexityFromJSON(object.complexity) : 0,
8381
- clarity: isSet(object.clarity) ? aIPromptClarityFromJSON(object.clarity) : 0,
8382
- steering: isSet(object.steering) ? aIPromptSteeringFromJSON(object.steering) : 0,
8383
- frustration: isSet(object.frustration) ? aIPromptFrustrationFromJSON(object.frustration) : 0,
8384
- sentiment: isSet(object.sentiment) ? aIPromptSentimentFromJSON(object.sentiment) : 0,
8128
+ steering: isSet(object.steering) ? globalThis.String(object.steering) : "",
8129
+ tone: isSet(object.tone) ? globalThis.String(object.tone) : "",
8385
8130
  };
8386
8131
  },
8387
8132
 
8388
8133
  toJSON(message: AIPromptLabels): unknown {
8389
8134
  const obj: any = {};
8390
- if (message.complexity !== 0) {
8391
- obj.complexity = aIPromptComplexityToJSON(message.complexity);
8135
+ if (message.steering !== "") {
8136
+ obj.steering = message.steering;
8392
8137
  }
8393
- if (message.clarity !== 0) {
8394
- obj.clarity = aIPromptClarityToJSON(message.clarity);
8395
- }
8396
- if (message.steering !== 0) {
8397
- obj.steering = aIPromptSteeringToJSON(message.steering);
8398
- }
8399
- if (message.frustration !== 0) {
8400
- obj.frustration = aIPromptFrustrationToJSON(message.frustration);
8401
- }
8402
- if (message.sentiment !== 0) {
8403
- obj.sentiment = aIPromptSentimentToJSON(message.sentiment);
8138
+ if (message.tone !== "") {
8139
+ obj.tone = message.tone;
8404
8140
  }
8405
8141
  return obj;
8406
8142
  },
@@ -8410,17 +8146,14 @@ export const AIPromptLabels: MessageFns<AIPromptLabels> = {
8410
8146
  },
8411
8147
  fromPartial<I extends Exact<DeepPartial<AIPromptLabels>, I>>(object: I): AIPromptLabels {
8412
8148
  const message = createBaseAIPromptLabels();
8413
- message.complexity = object.complexity ?? 0;
8414
- message.clarity = object.clarity ?? 0;
8415
- message.steering = object.steering ?? 0;
8416
- message.frustration = object.frustration ?? 0;
8417
- message.sentiment = object.sentiment ?? 0;
8149
+ message.steering = object.steering ?? "";
8150
+ message.tone = object.tone ?? "";
8418
8151
  return message;
8419
8152
  },
8420
8153
  };
8421
8154
 
8422
8155
  function createBaseAIPromptLabelSummary(): AIPromptLabelSummary {
8423
- return { labelledPrompts: 0, steeringCounts: [], peakFrustration: 0, clearPrompts: 0 };
8156
+ return { labelledPrompts: 0, steeringCounts: [], toneCounts: [] };
8424
8157
  }
8425
8158
 
8426
8159
  export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
@@ -8429,13 +8162,10 @@ export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
8429
8162
  writer.uint32(8).uint64(message.labelledPrompts);
8430
8163
  }
8431
8164
  for (const v of message.steeringCounts) {
8432
- AIPromptSteeringCount.encode(v!, writer.uint32(18).fork()).join();
8165
+ AILabelCount.encode(v!, writer.uint32(18).fork()).join();
8433
8166
  }
8434
- if (message.peakFrustration !== 0) {
8435
- writer.uint32(24).int32(message.peakFrustration);
8436
- }
8437
- if (message.clearPrompts !== 0) {
8438
- writer.uint32(32).uint64(message.clearPrompts);
8167
+ for (const v of message.toneCounts) {
8168
+ AILabelCount.encode(v!, writer.uint32(26).fork()).join();
8439
8169
  }
8440
8170
  return writer;
8441
8171
  },
@@ -8466,23 +8196,15 @@ export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
8466
8196
  break;
8467
8197
  }
8468
8198
 
8469
- message.steeringCounts.push(AIPromptSteeringCount.decode(reader, reader.uint32()));
8199
+ message.steeringCounts.push(AILabelCount.decode(reader, reader.uint32()));
8470
8200
  continue;
8471
8201
  }
8472
8202
  case 3: {
8473
- if (tag !== 24) {
8474
- break;
8475
- }
8476
-
8477
- message.peakFrustration = reader.int32() as any;
8478
- continue;
8479
- }
8480
- case 4: {
8481
- if (tag !== 32) {
8203
+ if (tag !== 26) {
8482
8204
  break;
8483
8205
  }
8484
8206
 
8485
- message.clearPrompts = longToNumber(reader.uint64());
8207
+ message.toneCounts.push(AILabelCount.decode(reader, reader.uint32()));
8486
8208
  continue;
8487
8209
  }
8488
8210
  }
@@ -8505,20 +8227,15 @@ export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
8505
8227
  ? globalThis.Number(object.labelled_prompts)
8506
8228
  : 0,
8507
8229
  steeringCounts: globalThis.Array.isArray(object?.steeringCounts)
8508
- ? object.steeringCounts.map((e: any) => AIPromptSteeringCount.fromJSON(e))
8230
+ ? object.steeringCounts.map((e: any) => AILabelCount.fromJSON(e))
8509
8231
  : globalThis.Array.isArray(object?.steering_counts)
8510
- ? object.steering_counts.map((e: any) => AIPromptSteeringCount.fromJSON(e))
8232
+ ? object.steering_counts.map((e: any) => AILabelCount.fromJSON(e))
8233
+ : [],
8234
+ toneCounts: globalThis.Array.isArray(object?.toneCounts)
8235
+ ? object.toneCounts.map((e: any) => AILabelCount.fromJSON(e))
8236
+ : globalThis.Array.isArray(object?.tone_counts)
8237
+ ? object.tone_counts.map((e: any) => AILabelCount.fromJSON(e))
8511
8238
  : [],
8512
- peakFrustration: isSet(object.peakFrustration)
8513
- ? aIPromptFrustrationFromJSON(object.peakFrustration)
8514
- : isSet(object.peak_frustration)
8515
- ? aIPromptFrustrationFromJSON(object.peak_frustration)
8516
- : 0,
8517
- clearPrompts: isSet(object.clearPrompts)
8518
- ? globalThis.Number(object.clearPrompts)
8519
- : isSet(object.clear_prompts)
8520
- ? globalThis.Number(object.clear_prompts)
8521
- : 0,
8522
8239
  };
8523
8240
  },
8524
8241
 
@@ -8528,13 +8245,10 @@ export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
8528
8245
  obj.labelledPrompts = Math.round(message.labelledPrompts);
8529
8246
  }
8530
8247
  if (message.steeringCounts?.length) {
8531
- obj.steeringCounts = message.steeringCounts.map((e) => AIPromptSteeringCount.toJSON(e));
8532
- }
8533
- if (message.peakFrustration !== 0) {
8534
- obj.peakFrustration = aIPromptFrustrationToJSON(message.peakFrustration);
8248
+ obj.steeringCounts = message.steeringCounts.map((e) => AILabelCount.toJSON(e));
8535
8249
  }
8536
- if (message.clearPrompts !== 0) {
8537
- obj.clearPrompts = Math.round(message.clearPrompts);
8250
+ if (message.toneCounts?.length) {
8251
+ obj.toneCounts = message.toneCounts.map((e) => AILabelCount.toJSON(e));
8538
8252
  }
8539
8253
  return obj;
8540
8254
  },
@@ -8545,94 +8259,8 @@ export const AIPromptLabelSummary: MessageFns<AIPromptLabelSummary> = {
8545
8259
  fromPartial<I extends Exact<DeepPartial<AIPromptLabelSummary>, I>>(object: I): AIPromptLabelSummary {
8546
8260
  const message = createBaseAIPromptLabelSummary();
8547
8261
  message.labelledPrompts = object.labelledPrompts ?? 0;
8548
- message.steeringCounts = object.steeringCounts?.map((e) => AIPromptSteeringCount.fromPartial(e)) || [];
8549
- message.peakFrustration = object.peakFrustration ?? 0;
8550
- message.clearPrompts = object.clearPrompts ?? 0;
8551
- return message;
8552
- },
8553
- };
8554
-
8555
- function createBaseAIPromptSteeringCount(): AIPromptSteeringCount {
8556
- return { steering: 0, prompts: 0 };
8557
- }
8558
-
8559
- export const AIPromptSteeringCount: MessageFns<AIPromptSteeringCount> = {
8560
- encode(message: AIPromptSteeringCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8561
- if (message.steering !== 0) {
8562
- writer.uint32(8).int32(message.steering);
8563
- }
8564
- if (message.prompts !== 0) {
8565
- writer.uint32(16).uint64(message.prompts);
8566
- }
8567
- return writer;
8568
- },
8569
-
8570
- decode(input: BinaryReader | Uint8Array, length?: number): AIPromptSteeringCount {
8571
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8572
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8573
- if (previousRecursionDepth >= 100) {
8574
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
8575
- }
8576
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8577
- try {
8578
- const end = length === undefined ? reader.len : reader.pos + length;
8579
- const message = createBaseAIPromptSteeringCount();
8580
- while (reader.pos < end) {
8581
- const tag = reader.uint32();
8582
- switch (tag >>> 3) {
8583
- case 1: {
8584
- if (tag !== 8) {
8585
- break;
8586
- }
8587
-
8588
- message.steering = reader.int32() as any;
8589
- continue;
8590
- }
8591
- case 2: {
8592
- if (tag !== 16) {
8593
- break;
8594
- }
8595
-
8596
- message.prompts = longToNumber(reader.uint64());
8597
- continue;
8598
- }
8599
- }
8600
- if ((tag & 7) === 4 || tag === 0) {
8601
- break;
8602
- }
8603
- reader.skip(tag & 7);
8604
- }
8605
- return message;
8606
- } finally {
8607
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
8608
- }
8609
- },
8610
-
8611
- fromJSON(object: any): AIPromptSteeringCount {
8612
- return {
8613
- steering: isSet(object.steering) ? aIPromptSteeringFromJSON(object.steering) : 0,
8614
- prompts: isSet(object.prompts) ? globalThis.Number(object.prompts) : 0,
8615
- };
8616
- },
8617
-
8618
- toJSON(message: AIPromptSteeringCount): unknown {
8619
- const obj: any = {};
8620
- if (message.steering !== 0) {
8621
- obj.steering = aIPromptSteeringToJSON(message.steering);
8622
- }
8623
- if (message.prompts !== 0) {
8624
- obj.prompts = Math.round(message.prompts);
8625
- }
8626
- return obj;
8627
- },
8628
-
8629
- create<I extends Exact<DeepPartial<AIPromptSteeringCount>, I>>(base?: I): AIPromptSteeringCount {
8630
- return AIPromptSteeringCount.fromPartial(base ?? ({} as any));
8631
- },
8632
- fromPartial<I extends Exact<DeepPartial<AIPromptSteeringCount>, I>>(object: I): AIPromptSteeringCount {
8633
- const message = createBaseAIPromptSteeringCount();
8634
- message.steering = object.steering ?? 0;
8635
- message.prompts = object.prompts ?? 0;
8262
+ message.steeringCounts = object.steeringCounts?.map((e) => AILabelCount.fromPartial(e)) || [];
8263
+ message.toneCounts = object.toneCounts?.map((e) => AILabelCount.fromPartial(e)) || [];
8636
8264
  return message;
8637
8265
  },
8638
8266
  };
@@ -8967,7 +8595,7 @@ export const GetPromptLabelTrendResponse: MessageFns<GetPromptLabelTrendResponse
8967
8595
  };
8968
8596
 
8969
8597
  function createBaseAIPromptLabelWeek(): AIPromptLabelWeek {
8970
- return { weekStart: "", labelledPrompts: 0, clearPrompts: 0, corrections: 0, frustratedPrompts: 0 };
8598
+ return { weekStart: "", labelledPrompts: 0, steeringCounts: [], toneCounts: [] };
8971
8599
  }
8972
8600
 
8973
8601
  export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
@@ -8978,14 +8606,11 @@ export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
8978
8606
  if (message.labelledPrompts !== 0) {
8979
8607
  writer.uint32(16).uint64(message.labelledPrompts);
8980
8608
  }
8981
- if (message.clearPrompts !== 0) {
8982
- writer.uint32(24).uint64(message.clearPrompts);
8983
- }
8984
- if (message.corrections !== 0) {
8985
- writer.uint32(32).uint64(message.corrections);
8609
+ for (const v of message.steeringCounts) {
8610
+ AILabelCount.encode(v!, writer.uint32(26).fork()).join();
8986
8611
  }
8987
- if (message.frustratedPrompts !== 0) {
8988
- writer.uint32(40).uint64(message.frustratedPrompts);
8612
+ for (const v of message.toneCounts) {
8613
+ AILabelCount.encode(v!, writer.uint32(34).fork()).join();
8989
8614
  }
8990
8615
  return writer;
8991
8616
  },
@@ -9020,27 +8645,19 @@ export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
9020
8645
  continue;
9021
8646
  }
9022
8647
  case 3: {
9023
- if (tag !== 24) {
8648
+ if (tag !== 26) {
9024
8649
  break;
9025
8650
  }
9026
8651
 
9027
- message.clearPrompts = longToNumber(reader.uint64());
8652
+ message.steeringCounts.push(AILabelCount.decode(reader, reader.uint32()));
9028
8653
  continue;
9029
8654
  }
9030
8655
  case 4: {
9031
- if (tag !== 32) {
9032
- break;
9033
- }
9034
-
9035
- message.corrections = longToNumber(reader.uint64());
9036
- continue;
9037
- }
9038
- case 5: {
9039
- if (tag !== 40) {
8656
+ if (tag !== 34) {
9040
8657
  break;
9041
8658
  }
9042
8659
 
9043
- message.frustratedPrompts = longToNumber(reader.uint64());
8660
+ message.toneCounts.push(AILabelCount.decode(reader, reader.uint32()));
9044
8661
  continue;
9045
8662
  }
9046
8663
  }
@@ -9067,17 +8684,16 @@ export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
9067
8684
  : isSet(object.labelled_prompts)
9068
8685
  ? globalThis.Number(object.labelled_prompts)
9069
8686
  : 0,
9070
- clearPrompts: isSet(object.clearPrompts)
9071
- ? globalThis.Number(object.clearPrompts)
9072
- : isSet(object.clear_prompts)
9073
- ? globalThis.Number(object.clear_prompts)
9074
- : 0,
9075
- corrections: isSet(object.corrections) ? globalThis.Number(object.corrections) : 0,
9076
- frustratedPrompts: isSet(object.frustratedPrompts)
9077
- ? globalThis.Number(object.frustratedPrompts)
9078
- : isSet(object.frustrated_prompts)
9079
- ? globalThis.Number(object.frustrated_prompts)
9080
- : 0,
8687
+ steeringCounts: globalThis.Array.isArray(object?.steeringCounts)
8688
+ ? object.steeringCounts.map((e: any) => AILabelCount.fromJSON(e))
8689
+ : globalThis.Array.isArray(object?.steering_counts)
8690
+ ? object.steering_counts.map((e: any) => AILabelCount.fromJSON(e))
8691
+ : [],
8692
+ toneCounts: globalThis.Array.isArray(object?.toneCounts)
8693
+ ? object.toneCounts.map((e: any) => AILabelCount.fromJSON(e))
8694
+ : globalThis.Array.isArray(object?.tone_counts)
8695
+ ? object.tone_counts.map((e: any) => AILabelCount.fromJSON(e))
8696
+ : [],
9081
8697
  };
9082
8698
  },
9083
8699
 
@@ -9089,14 +8705,11 @@ export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
9089
8705
  if (message.labelledPrompts !== 0) {
9090
8706
  obj.labelledPrompts = Math.round(message.labelledPrompts);
9091
8707
  }
9092
- if (message.clearPrompts !== 0) {
9093
- obj.clearPrompts = Math.round(message.clearPrompts);
9094
- }
9095
- if (message.corrections !== 0) {
9096
- obj.corrections = Math.round(message.corrections);
8708
+ if (message.steeringCounts?.length) {
8709
+ obj.steeringCounts = message.steeringCounts.map((e) => AILabelCount.toJSON(e));
9097
8710
  }
9098
- if (message.frustratedPrompts !== 0) {
9099
- obj.frustratedPrompts = Math.round(message.frustratedPrompts);
8711
+ if (message.toneCounts?.length) {
8712
+ obj.toneCounts = message.toneCounts.map((e) => AILabelCount.toJSON(e));
9100
8713
  }
9101
8714
  return obj;
9102
8715
  },
@@ -9108,9 +8721,521 @@ export const AIPromptLabelWeek: MessageFns<AIPromptLabelWeek> = {
9108
8721
  const message = createBaseAIPromptLabelWeek();
9109
8722
  message.weekStart = object.weekStart ?? "";
9110
8723
  message.labelledPrompts = object.labelledPrompts ?? 0;
9111
- message.clearPrompts = object.clearPrompts ?? 0;
9112
- message.corrections = object.corrections ?? 0;
9113
- message.frustratedPrompts = object.frustratedPrompts ?? 0;
8724
+ message.steeringCounts = object.steeringCounts?.map((e) => AILabelCount.fromPartial(e)) || [];
8725
+ message.toneCounts = object.toneCounts?.map((e) => AILabelCount.fromPartial(e)) || [];
8726
+ return message;
8727
+ },
8728
+ };
8729
+
8730
+ function createBaseGetLabelCatalogRequest(): GetLabelCatalogRequest {
8731
+ return { organizationId: "", projectId: "" };
8732
+ }
8733
+
8734
+ export const GetLabelCatalogRequest: MessageFns<GetLabelCatalogRequest> = {
8735
+ encode(message: GetLabelCatalogRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8736
+ if (message.organizationId !== "") {
8737
+ writer.uint32(10).string(message.organizationId);
8738
+ }
8739
+ if (message.projectId !== "") {
8740
+ writer.uint32(18).string(message.projectId);
8741
+ }
8742
+ return writer;
8743
+ },
8744
+
8745
+ decode(input: BinaryReader | Uint8Array, length?: number): GetLabelCatalogRequest {
8746
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8747
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8748
+ if (previousRecursionDepth >= 100) {
8749
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
8750
+ }
8751
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8752
+ try {
8753
+ const end = length === undefined ? reader.len : reader.pos + length;
8754
+ const message = createBaseGetLabelCatalogRequest();
8755
+ while (reader.pos < end) {
8756
+ const tag = reader.uint32();
8757
+ switch (tag >>> 3) {
8758
+ case 1: {
8759
+ if (tag !== 10) {
8760
+ break;
8761
+ }
8762
+
8763
+ message.organizationId = reader.string();
8764
+ continue;
8765
+ }
8766
+ case 2: {
8767
+ if (tag !== 18) {
8768
+ break;
8769
+ }
8770
+
8771
+ message.projectId = reader.string();
8772
+ continue;
8773
+ }
8774
+ }
8775
+ if ((tag & 7) === 4 || tag === 0) {
8776
+ break;
8777
+ }
8778
+ reader.skip(tag & 7);
8779
+ }
8780
+ return message;
8781
+ } finally {
8782
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
8783
+ }
8784
+ },
8785
+
8786
+ fromJSON(object: any): GetLabelCatalogRequest {
8787
+ return {
8788
+ organizationId: isSet(object.organizationId)
8789
+ ? globalThis.String(object.organizationId)
8790
+ : isSet(object.organization_id)
8791
+ ? globalThis.String(object.organization_id)
8792
+ : "",
8793
+ projectId: isSet(object.projectId)
8794
+ ? globalThis.String(object.projectId)
8795
+ : isSet(object.project_id)
8796
+ ? globalThis.String(object.project_id)
8797
+ : "",
8798
+ };
8799
+ },
8800
+
8801
+ toJSON(message: GetLabelCatalogRequest): unknown {
8802
+ const obj: any = {};
8803
+ if (message.organizationId !== "") {
8804
+ obj.organizationId = message.organizationId;
8805
+ }
8806
+ if (message.projectId !== "") {
8807
+ obj.projectId = message.projectId;
8808
+ }
8809
+ return obj;
8810
+ },
8811
+
8812
+ create<I extends Exact<DeepPartial<GetLabelCatalogRequest>, I>>(base?: I): GetLabelCatalogRequest {
8813
+ return GetLabelCatalogRequest.fromPartial(base ?? ({} as any));
8814
+ },
8815
+ fromPartial<I extends Exact<DeepPartial<GetLabelCatalogRequest>, I>>(object: I): GetLabelCatalogRequest {
8816
+ const message = createBaseGetLabelCatalogRequest();
8817
+ message.organizationId = object.organizationId ?? "";
8818
+ message.projectId = object.projectId ?? "";
8819
+ return message;
8820
+ },
8821
+ };
8822
+
8823
+ function createBaseGetLabelCatalogResponse(): GetLabelCatalogResponse {
8824
+ return { status: undefined, sessionLabels: undefined, promptLabels: undefined };
8825
+ }
8826
+
8827
+ export const GetLabelCatalogResponse: MessageFns<GetLabelCatalogResponse> = {
8828
+ encode(message: GetLabelCatalogResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8829
+ if (message.status !== undefined) {
8830
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
8831
+ }
8832
+ if (message.sessionLabels !== undefined) {
8833
+ AILabelSet.encode(message.sessionLabels, writer.uint32(18).fork()).join();
8834
+ }
8835
+ if (message.promptLabels !== undefined) {
8836
+ AILabelSet.encode(message.promptLabels, writer.uint32(26).fork()).join();
8837
+ }
8838
+ return writer;
8839
+ },
8840
+
8841
+ decode(input: BinaryReader | Uint8Array, length?: number): GetLabelCatalogResponse {
8842
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8843
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8844
+ if (previousRecursionDepth >= 100) {
8845
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
8846
+ }
8847
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8848
+ try {
8849
+ const end = length === undefined ? reader.len : reader.pos + length;
8850
+ const message = createBaseGetLabelCatalogResponse();
8851
+ while (reader.pos < end) {
8852
+ const tag = reader.uint32();
8853
+ switch (tag >>> 3) {
8854
+ case 1: {
8855
+ if (tag !== 10) {
8856
+ break;
8857
+ }
8858
+
8859
+ message.status = ResponseStatus.decode(reader, reader.uint32());
8860
+ continue;
8861
+ }
8862
+ case 2: {
8863
+ if (tag !== 18) {
8864
+ break;
8865
+ }
8866
+
8867
+ message.sessionLabels = AILabelSet.decode(reader, reader.uint32());
8868
+ continue;
8869
+ }
8870
+ case 3: {
8871
+ if (tag !== 26) {
8872
+ break;
8873
+ }
8874
+
8875
+ message.promptLabels = AILabelSet.decode(reader, reader.uint32());
8876
+ continue;
8877
+ }
8878
+ }
8879
+ if ((tag & 7) === 4 || tag === 0) {
8880
+ break;
8881
+ }
8882
+ reader.skip(tag & 7);
8883
+ }
8884
+ return message;
8885
+ } finally {
8886
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
8887
+ }
8888
+ },
8889
+
8890
+ fromJSON(object: any): GetLabelCatalogResponse {
8891
+ return {
8892
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
8893
+ sessionLabels: isSet(object.sessionLabels)
8894
+ ? AILabelSet.fromJSON(object.sessionLabels)
8895
+ : isSet(object.session_labels)
8896
+ ? AILabelSet.fromJSON(object.session_labels)
8897
+ : undefined,
8898
+ promptLabels: isSet(object.promptLabels)
8899
+ ? AILabelSet.fromJSON(object.promptLabels)
8900
+ : isSet(object.prompt_labels)
8901
+ ? AILabelSet.fromJSON(object.prompt_labels)
8902
+ : undefined,
8903
+ };
8904
+ },
8905
+
8906
+ toJSON(message: GetLabelCatalogResponse): unknown {
8907
+ const obj: any = {};
8908
+ if (message.status !== undefined) {
8909
+ obj.status = ResponseStatus.toJSON(message.status);
8910
+ }
8911
+ if (message.sessionLabels !== undefined) {
8912
+ obj.sessionLabels = AILabelSet.toJSON(message.sessionLabels);
8913
+ }
8914
+ if (message.promptLabels !== undefined) {
8915
+ obj.promptLabels = AILabelSet.toJSON(message.promptLabels);
8916
+ }
8917
+ return obj;
8918
+ },
8919
+
8920
+ create<I extends Exact<DeepPartial<GetLabelCatalogResponse>, I>>(base?: I): GetLabelCatalogResponse {
8921
+ return GetLabelCatalogResponse.fromPartial(base ?? ({} as any));
8922
+ },
8923
+ fromPartial<I extends Exact<DeepPartial<GetLabelCatalogResponse>, I>>(object: I): GetLabelCatalogResponse {
8924
+ const message = createBaseGetLabelCatalogResponse();
8925
+ message.status = (object.status !== undefined && object.status !== null)
8926
+ ? ResponseStatus.fromPartial(object.status)
8927
+ : undefined;
8928
+ message.sessionLabels = (object.sessionLabels !== undefined && object.sessionLabels !== null)
8929
+ ? AILabelSet.fromPartial(object.sessionLabels)
8930
+ : undefined;
8931
+ message.promptLabels = (object.promptLabels !== undefined && object.promptLabels !== null)
8932
+ ? AILabelSet.fromPartial(object.promptLabels)
8933
+ : undefined;
8934
+ return message;
8935
+ },
8936
+ };
8937
+
8938
+ function createBaseAILabelSet(): AILabelSet {
8939
+ return { version: "", dimensions: [] };
8940
+ }
8941
+
8942
+ export const AILabelSet: MessageFns<AILabelSet> = {
8943
+ encode(message: AILabelSet, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8944
+ if (message.version !== "") {
8945
+ writer.uint32(10).string(message.version);
8946
+ }
8947
+ for (const v of message.dimensions) {
8948
+ AILabelDimension.encode(v!, writer.uint32(18).fork()).join();
8949
+ }
8950
+ return writer;
8951
+ },
8952
+
8953
+ decode(input: BinaryReader | Uint8Array, length?: number): AILabelSet {
8954
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8955
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
8956
+ if (previousRecursionDepth >= 100) {
8957
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
8958
+ }
8959
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
8960
+ try {
8961
+ const end = length === undefined ? reader.len : reader.pos + length;
8962
+ const message = createBaseAILabelSet();
8963
+ while (reader.pos < end) {
8964
+ const tag = reader.uint32();
8965
+ switch (tag >>> 3) {
8966
+ case 1: {
8967
+ if (tag !== 10) {
8968
+ break;
8969
+ }
8970
+
8971
+ message.version = reader.string();
8972
+ continue;
8973
+ }
8974
+ case 2: {
8975
+ if (tag !== 18) {
8976
+ break;
8977
+ }
8978
+
8979
+ message.dimensions.push(AILabelDimension.decode(reader, reader.uint32()));
8980
+ continue;
8981
+ }
8982
+ }
8983
+ if ((tag & 7) === 4 || tag === 0) {
8984
+ break;
8985
+ }
8986
+ reader.skip(tag & 7);
8987
+ }
8988
+ return message;
8989
+ } finally {
8990
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
8991
+ }
8992
+ },
8993
+
8994
+ fromJSON(object: any): AILabelSet {
8995
+ return {
8996
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
8997
+ dimensions: globalThis.Array.isArray(object?.dimensions)
8998
+ ? object.dimensions.map((e: any) => AILabelDimension.fromJSON(e))
8999
+ : [],
9000
+ };
9001
+ },
9002
+
9003
+ toJSON(message: AILabelSet): unknown {
9004
+ const obj: any = {};
9005
+ if (message.version !== "") {
9006
+ obj.version = message.version;
9007
+ }
9008
+ if (message.dimensions?.length) {
9009
+ obj.dimensions = message.dimensions.map((e) => AILabelDimension.toJSON(e));
9010
+ }
9011
+ return obj;
9012
+ },
9013
+
9014
+ create<I extends Exact<DeepPartial<AILabelSet>, I>>(base?: I): AILabelSet {
9015
+ return AILabelSet.fromPartial(base ?? ({} as any));
9016
+ },
9017
+ fromPartial<I extends Exact<DeepPartial<AILabelSet>, I>>(object: I): AILabelSet {
9018
+ const message = createBaseAILabelSet();
9019
+ message.version = object.version ?? "";
9020
+ message.dimensions = object.dimensions?.map((e) => AILabelDimension.fromPartial(e)) || [];
9021
+ return message;
9022
+ },
9023
+ };
9024
+
9025
+ function createBaseAILabelDimension(): AILabelDimension {
9026
+ return { key: "", name: "", values: [] };
9027
+ }
9028
+
9029
+ export const AILabelDimension: MessageFns<AILabelDimension> = {
9030
+ encode(message: AILabelDimension, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9031
+ if (message.key !== "") {
9032
+ writer.uint32(10).string(message.key);
9033
+ }
9034
+ if (message.name !== "") {
9035
+ writer.uint32(18).string(message.name);
9036
+ }
9037
+ for (const v of message.values) {
9038
+ AILabelValue.encode(v!, writer.uint32(26).fork()).join();
9039
+ }
9040
+ return writer;
9041
+ },
9042
+
9043
+ decode(input: BinaryReader | Uint8Array, length?: number): AILabelDimension {
9044
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9045
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9046
+ if (previousRecursionDepth >= 100) {
9047
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9048
+ }
9049
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9050
+ try {
9051
+ const end = length === undefined ? reader.len : reader.pos + length;
9052
+ const message = createBaseAILabelDimension();
9053
+ while (reader.pos < end) {
9054
+ const tag = reader.uint32();
9055
+ switch (tag >>> 3) {
9056
+ case 1: {
9057
+ if (tag !== 10) {
9058
+ break;
9059
+ }
9060
+
9061
+ message.key = reader.string();
9062
+ continue;
9063
+ }
9064
+ case 2: {
9065
+ if (tag !== 18) {
9066
+ break;
9067
+ }
9068
+
9069
+ message.name = reader.string();
9070
+ continue;
9071
+ }
9072
+ case 3: {
9073
+ if (tag !== 26) {
9074
+ break;
9075
+ }
9076
+
9077
+ message.values.push(AILabelValue.decode(reader, reader.uint32()));
9078
+ continue;
9079
+ }
9080
+ }
9081
+ if ((tag & 7) === 4 || tag === 0) {
9082
+ break;
9083
+ }
9084
+ reader.skip(tag & 7);
9085
+ }
9086
+ return message;
9087
+ } finally {
9088
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9089
+ }
9090
+ },
9091
+
9092
+ fromJSON(object: any): AILabelDimension {
9093
+ return {
9094
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
9095
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
9096
+ values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => AILabelValue.fromJSON(e)) : [],
9097
+ };
9098
+ },
9099
+
9100
+ toJSON(message: AILabelDimension): unknown {
9101
+ const obj: any = {};
9102
+ if (message.key !== "") {
9103
+ obj.key = message.key;
9104
+ }
9105
+ if (message.name !== "") {
9106
+ obj.name = message.name;
9107
+ }
9108
+ if (message.values?.length) {
9109
+ obj.values = message.values.map((e) => AILabelValue.toJSON(e));
9110
+ }
9111
+ return obj;
9112
+ },
9113
+
9114
+ create<I extends Exact<DeepPartial<AILabelDimension>, I>>(base?: I): AILabelDimension {
9115
+ return AILabelDimension.fromPartial(base ?? ({} as any));
9116
+ },
9117
+ fromPartial<I extends Exact<DeepPartial<AILabelDimension>, I>>(object: I): AILabelDimension {
9118
+ const message = createBaseAILabelDimension();
9119
+ message.key = object.key ?? "";
9120
+ message.name = object.name ?? "";
9121
+ message.values = object.values?.map((e) => AILabelValue.fromPartial(e)) || [];
9122
+ return message;
9123
+ },
9124
+ };
9125
+
9126
+ function createBaseAILabelValue(): AILabelValue {
9127
+ return { key: "", name: "", tooltip: "", rating: 0 };
9128
+ }
9129
+
9130
+ export const AILabelValue: MessageFns<AILabelValue> = {
9131
+ encode(message: AILabelValue, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9132
+ if (message.key !== "") {
9133
+ writer.uint32(10).string(message.key);
9134
+ }
9135
+ if (message.name !== "") {
9136
+ writer.uint32(18).string(message.name);
9137
+ }
9138
+ if (message.tooltip !== "") {
9139
+ writer.uint32(26).string(message.tooltip);
9140
+ }
9141
+ if (message.rating !== 0) {
9142
+ writer.uint32(32).int32(message.rating);
9143
+ }
9144
+ return writer;
9145
+ },
9146
+
9147
+ decode(input: BinaryReader | Uint8Array, length?: number): AILabelValue {
9148
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9149
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9150
+ if (previousRecursionDepth >= 100) {
9151
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9152
+ }
9153
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9154
+ try {
9155
+ const end = length === undefined ? reader.len : reader.pos + length;
9156
+ const message = createBaseAILabelValue();
9157
+ while (reader.pos < end) {
9158
+ const tag = reader.uint32();
9159
+ switch (tag >>> 3) {
9160
+ case 1: {
9161
+ if (tag !== 10) {
9162
+ break;
9163
+ }
9164
+
9165
+ message.key = reader.string();
9166
+ continue;
9167
+ }
9168
+ case 2: {
9169
+ if (tag !== 18) {
9170
+ break;
9171
+ }
9172
+
9173
+ message.name = reader.string();
9174
+ continue;
9175
+ }
9176
+ case 3: {
9177
+ if (tag !== 26) {
9178
+ break;
9179
+ }
9180
+
9181
+ message.tooltip = reader.string();
9182
+ continue;
9183
+ }
9184
+ case 4: {
9185
+ if (tag !== 32) {
9186
+ break;
9187
+ }
9188
+
9189
+ message.rating = reader.int32() as any;
9190
+ continue;
9191
+ }
9192
+ }
9193
+ if ((tag & 7) === 4 || tag === 0) {
9194
+ break;
9195
+ }
9196
+ reader.skip(tag & 7);
9197
+ }
9198
+ return message;
9199
+ } finally {
9200
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9201
+ }
9202
+ },
9203
+
9204
+ fromJSON(object: any): AILabelValue {
9205
+ return {
9206
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
9207
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
9208
+ tooltip: isSet(object.tooltip) ? globalThis.String(object.tooltip) : "",
9209
+ rating: isSet(object.rating) ? aILabelRatingFromJSON(object.rating) : 0,
9210
+ };
9211
+ },
9212
+
9213
+ toJSON(message: AILabelValue): unknown {
9214
+ const obj: any = {};
9215
+ if (message.key !== "") {
9216
+ obj.key = message.key;
9217
+ }
9218
+ if (message.name !== "") {
9219
+ obj.name = message.name;
9220
+ }
9221
+ if (message.tooltip !== "") {
9222
+ obj.tooltip = message.tooltip;
9223
+ }
9224
+ if (message.rating !== 0) {
9225
+ obj.rating = aILabelRatingToJSON(message.rating);
9226
+ }
9227
+ return obj;
9228
+ },
9229
+
9230
+ create<I extends Exact<DeepPartial<AILabelValue>, I>>(base?: I): AILabelValue {
9231
+ return AILabelValue.fromPartial(base ?? ({} as any));
9232
+ },
9233
+ fromPartial<I extends Exact<DeepPartial<AILabelValue>, I>>(object: I): AILabelValue {
9234
+ const message = createBaseAILabelValue();
9235
+ message.key = object.key ?? "";
9236
+ message.name = object.name ?? "";
9237
+ message.tooltip = object.tooltip ?? "";
9238
+ message.rating = object.rating ?? 0;
9114
9239
  return message;
9115
9240
  },
9116
9241
  };
@@ -34859,6 +34984,12 @@ export interface AIGatewayService {
34859
34984
  * time): counts only, the shares derived only when a week has labelled prompts. Mirrors ai.api.v1.
34860
34985
  */
34861
34986
  GetPromptLabelTrend(request: GetPromptLabelTrendRequest, metadata?: Metadata): Promise<GetPromptLabelTrendResponse>;
34987
+ /**
34988
+ * The label sets the project's sessions and prompts are labelled with: every fixed dimension and its values in display
34989
+ * order, with each value's name, tooltip and rating. A stored key the catalogue no longer lists shows as
34990
+ * the key. Mirrors ai.api.v1.
34991
+ */
34992
+ GetLabelCatalog(request: GetLabelCatalogRequest, metadata?: Metadata): Promise<GetLabelCatalogResponse>;
34862
34993
  /**
34863
34994
  * Per-seat entitlement usage board: every entitlement owner's latest observed funding facility and
34864
34995
  * per-harness usage % windows. Stream-first (first frame = full snapshot), seat-scoped. Mirrors
@@ -34949,6 +35080,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
34949
35080
  this.ListSessionInsights = this.ListSessionInsights.bind(this);
34950
35081
  this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
34951
35082
  this.GetPromptLabelTrend = this.GetPromptLabelTrend.bind(this);
35083
+ this.GetLabelCatalog = this.GetLabelCatalog.bind(this);
34952
35084
  this.StreamEntitlements = this.StreamEntitlements.bind(this);
34953
35085
  this.ListRelayHeartbeats = this.ListRelayHeartbeats.bind(this);
34954
35086
  this.ListIssueCosts = this.ListIssueCosts.bind(this);
@@ -35175,6 +35307,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
35175
35307
  return promise.then((data) => GetPromptLabelTrendResponse.decode(new BinaryReader(data)));
35176
35308
  }
35177
35309
 
35310
+ GetLabelCatalog(request: GetLabelCatalogRequest, metadata?: Metadata): Promise<GetLabelCatalogResponse> {
35311
+ const data = GetLabelCatalogRequest.encode(request).finish();
35312
+ const promise = this.rpc.request(this.service, "GetLabelCatalog", data, metadata);
35313
+ return promise.then((data) => GetLabelCatalogResponse.decode(new BinaryReader(data)));
35314
+ }
35315
+
35178
35316
  StreamEntitlements(request: StreamEntitlementsRequest, metadata?: Metadata): Observable<EntitlementsSnapshot> {
35179
35317
  const data = StreamEntitlementsRequest.encode(request).finish();
35180
35318
  const result = this.rpc.serverStreamingRequest(this.service, "StreamEntitlements", data, metadata);