@verbatra/sdk 0.11.1 → 0.13.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.
@@ -0,0 +1,927 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/run-summary.json",
4
+ "title": "verbatra run summary",
5
+ "type": "object",
6
+ "properties": {
7
+ "dryRun": {
8
+ "type": "boolean"
9
+ },
10
+ "locales": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "properties": {
15
+ "locale": {
16
+ "type": "string"
17
+ },
18
+ "status": {
19
+ "type": "string",
20
+ "enum": [
21
+ "succeeded",
22
+ "partial",
23
+ "failed"
24
+ ]
25
+ },
26
+ "translated": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "unchanged": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "orphaned": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ }
43
+ },
44
+ "pruned": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string"
48
+ }
49
+ },
50
+ "invalidIcuSource": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "emptySource": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "cacheHits": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string"
66
+ }
67
+ },
68
+ "fuzzyHits": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "object",
72
+ "properties": {
73
+ "key": {
74
+ "type": "string"
75
+ },
76
+ "previousSource": {
77
+ "type": "string"
78
+ },
79
+ "similarity": {
80
+ "type": "number"
81
+ }
82
+ },
83
+ "required": [
84
+ "key",
85
+ "previousSource",
86
+ "similarity"
87
+ ]
88
+ }
89
+ },
90
+ "integrityMismatches": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "string"
94
+ }
95
+ },
96
+ "integrityRefusals": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "object",
100
+ "properties": {
101
+ "key": {
102
+ "type": "string"
103
+ },
104
+ "reason": {
105
+ "type": "string",
106
+ "enum": [
107
+ "placeholder",
108
+ "markup",
109
+ "icu",
110
+ "degenerate",
111
+ "empty"
112
+ ]
113
+ },
114
+ "details": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ }
119
+ }
120
+ },
121
+ "required": [
122
+ "key",
123
+ "reason"
124
+ ]
125
+ }
126
+ },
127
+ "providerFailures": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "generated": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string"
137
+ }
138
+ },
139
+ "budgetWithheld": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "sensitiveWithheld": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string"
149
+ }
150
+ },
151
+ "usage": {
152
+ "type": "object",
153
+ "properties": {
154
+ "inputTokens": {
155
+ "type": "number"
156
+ },
157
+ "outputTokens": {
158
+ "type": "number"
159
+ }
160
+ },
161
+ "required": [
162
+ "inputTokens",
163
+ "outputTokens"
164
+ ]
165
+ },
166
+ "notices": {
167
+ "type": "array",
168
+ "items": {
169
+ "anyOf": [
170
+ {
171
+ "type": "object",
172
+ "properties": {
173
+ "code": {
174
+ "type": "string",
175
+ "enum": [
176
+ "FORMALITY_DOWNGRADED",
177
+ "GLOSSARY_IGNORED",
178
+ "PLACEHOLDER_UNSUPPORTED"
179
+ ]
180
+ },
181
+ "message": {
182
+ "type": "string"
183
+ }
184
+ },
185
+ "required": [
186
+ "code",
187
+ "message"
188
+ ]
189
+ },
190
+ {
191
+ "type": "object",
192
+ "properties": {
193
+ "code": {
194
+ "type": "string",
195
+ "enum": [
196
+ "PLURAL_CATEGORIES_INCOMPLETE",
197
+ "SUB_BATCH_FAILED",
198
+ "BLANK_ROW_BASELINE_RETAINED",
199
+ "HANDOFF_REVIEWS_RECORDED",
200
+ "BUDGET_TOKENS_EXCEEDED",
201
+ "CACHE_VERSION_UNRECOGNIZED",
202
+ "PROVENANCE_VERSION_UNRECOGNIZED",
203
+ "PROVENANCE_FILE_TOO_LARGE",
204
+ "LIMITS_FILE_IGNORED",
205
+ "LOCALE_STATE_CARRIED_OVER",
206
+ "LOCALE_STATE_CARRY_OVER_SKIPPED",
207
+ "LOCALE_UNVERIFIED_BY_PROVIDER",
208
+ "LOCALE_NOT_WELL_TESTED",
209
+ "GLOSSARY_UNSUPPORTED_BY_PROVIDER",
210
+ "FORMALITY_UNSUPPORTED_BY_PROVIDER",
211
+ "SOURCE_FOREIGN_PLACEHOLDERS",
212
+ "SOURCE_VALUE_EMPTY",
213
+ "SENSITIVE_CONTENT_SENT",
214
+ "SENSITIVE_CONTENT_REDACTED",
215
+ "SENSITIVE_CONTENT_WITHHELD",
216
+ "RUN_CANCELLED"
217
+ ]
218
+ },
219
+ "message": {
220
+ "type": "string"
221
+ },
222
+ "causeCode": {
223
+ "type": "string",
224
+ "enum": [
225
+ "MISSING_API_KEY",
226
+ "INVALID_REQUEST",
227
+ "INVALID_RESPONSE",
228
+ "OUTPUT_TRUNCATED",
229
+ "PROVIDER_REFUSED",
230
+ "PROVIDER_BLOCKED",
231
+ "RATE_LIMITED",
232
+ "TIMEOUT",
233
+ "AUTH_FAILED",
234
+ "PROVIDER_UNAVAILABLE",
235
+ "NETWORK_POLICY_VIOLATION",
236
+ "PROVIDER_ERROR"
237
+ ]
238
+ }
239
+ },
240
+ "required": [
241
+ "code",
242
+ "message"
243
+ ]
244
+ }
245
+ ]
246
+ }
247
+ },
248
+ "needsReview": {
249
+ "type": "array",
250
+ "items": {
251
+ "type": "object",
252
+ "properties": {
253
+ "key": {
254
+ "type": "string"
255
+ },
256
+ "reasons": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string",
260
+ "enum": [
261
+ "LENGTH_RATIO_OUTLIER",
262
+ "MAX_LENGTH_EXCEEDED",
263
+ "EQUALS_SOURCE",
264
+ "GLOSSARY_TERM_MISSED",
265
+ "GLOSSARY_FORBIDDEN_TERM",
266
+ "INTEGRITY_REORDERED",
267
+ "PROVIDER_DEGRADED",
268
+ "FUZZY_CACHE_REUSE",
269
+ "FOREIGN_PLACEHOLDER_CHANGED",
270
+ "BIDI_CONTROLS_CHANGED"
271
+ ]
272
+ }
273
+ }
274
+ },
275
+ "required": [
276
+ "key",
277
+ "reasons"
278
+ ]
279
+ }
280
+ },
281
+ "unfilled": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "string"
285
+ }
286
+ },
287
+ "protected": {
288
+ "type": "array",
289
+ "items": {
290
+ "type": "object",
291
+ "properties": {
292
+ "key": {
293
+ "type": "string"
294
+ },
295
+ "reason": {
296
+ "type": "string",
297
+ "enum": [
298
+ "human",
299
+ "import",
300
+ "external",
301
+ "pinned"
302
+ ]
303
+ },
304
+ "suggestion": {
305
+ "type": "string"
306
+ },
307
+ "suggestionStatus": {
308
+ "type": "string",
309
+ "enum": [
310
+ "planned",
311
+ "suggested",
312
+ "integrity-mismatch",
313
+ "provider-failure",
314
+ "budget-withheld",
315
+ "sensitive-withheld"
316
+ ]
317
+ }
318
+ },
319
+ "required": [
320
+ "key",
321
+ "reason"
322
+ ]
323
+ }
324
+ },
325
+ "malformedRows": {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "object",
329
+ "properties": {
330
+ "row": {
331
+ "type": "number"
332
+ },
333
+ "line": {
334
+ "type": "number"
335
+ },
336
+ "column": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "required": [
341
+ "row",
342
+ "column"
343
+ ]
344
+ }
345
+ },
346
+ "duplicateKeys": {
347
+ "type": "array",
348
+ "items": {
349
+ "type": "object",
350
+ "properties": {
351
+ "key": {
352
+ "type": "string"
353
+ },
354
+ "row": {
355
+ "type": "number"
356
+ },
357
+ "line": {
358
+ "type": "number"
359
+ }
360
+ },
361
+ "required": [
362
+ "key",
363
+ "row"
364
+ ]
365
+ }
366
+ },
367
+ "error": {
368
+ "type": "object",
369
+ "properties": {
370
+ "code": {
371
+ "type": "string"
372
+ },
373
+ "message": {
374
+ "type": "string"
375
+ }
376
+ },
377
+ "required": [
378
+ "code",
379
+ "message"
380
+ ]
381
+ }
382
+ },
383
+ "required": [
384
+ "locale",
385
+ "status",
386
+ "translated",
387
+ "unchanged",
388
+ "orphaned",
389
+ "pruned",
390
+ "invalidIcuSource",
391
+ "cacheHits",
392
+ "fuzzyHits",
393
+ "integrityMismatches",
394
+ "providerFailures",
395
+ "generated",
396
+ "budgetWithheld",
397
+ "sensitiveWithheld",
398
+ "notices",
399
+ "needsReview",
400
+ "unfilled",
401
+ "protected",
402
+ "malformedRows",
403
+ "duplicateKeys"
404
+ ]
405
+ }
406
+ },
407
+ "succeeded": {
408
+ "type": "array",
409
+ "items": {
410
+ "type": "string"
411
+ }
412
+ },
413
+ "partial": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "string"
417
+ }
418
+ },
419
+ "failed": {
420
+ "type": "array",
421
+ "items": {
422
+ "type": "string"
423
+ }
424
+ },
425
+ "usage": {
426
+ "type": "object",
427
+ "properties": {
428
+ "inputTokens": {
429
+ "type": "number"
430
+ },
431
+ "outputTokens": {
432
+ "type": "number"
433
+ }
434
+ },
435
+ "required": [
436
+ "inputTokens",
437
+ "outputTokens"
438
+ ]
439
+ },
440
+ "budget": {
441
+ "type": "object",
442
+ "properties": {
443
+ "maxTokens": {
444
+ "type": "number"
445
+ },
446
+ "behavior": {
447
+ "type": "string",
448
+ "enum": [
449
+ "warn",
450
+ "stop"
451
+ ]
452
+ },
453
+ "supported": {
454
+ "type": "boolean"
455
+ },
456
+ "tokensUsed": {
457
+ "type": "number"
458
+ },
459
+ "exceeded": {
460
+ "type": "boolean"
461
+ }
462
+ },
463
+ "required": [
464
+ "maxTokens",
465
+ "behavior",
466
+ "supported",
467
+ "tokensUsed",
468
+ "exceeded"
469
+ ]
470
+ },
471
+ "estimate": {
472
+ "anyOf": [
473
+ {
474
+ "type": "object",
475
+ "properties": {
476
+ "provider": {
477
+ "type": "string",
478
+ "enum": [
479
+ "anthropic",
480
+ "openai",
481
+ "gemini",
482
+ "deepl",
483
+ "google-translate",
484
+ "openai-compatible",
485
+ "opencode",
486
+ "libretranslate",
487
+ "none"
488
+ ]
489
+ },
490
+ "model": {
491
+ "type": "string"
492
+ },
493
+ "rateKey": {
494
+ "type": "string"
495
+ },
496
+ "keys": {
497
+ "type": "number"
498
+ },
499
+ "requests": {
500
+ "type": "number"
501
+ },
502
+ "caveats": {
503
+ "type": "array",
504
+ "items": {
505
+ "type": "string",
506
+ "enum": [
507
+ "CACHE_NOT_CONSULTED",
508
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
509
+ "TRANSPORT_RETRIES_NOT_COUNTED",
510
+ "TRANSLATION_LENGTH_IS_ESTIMATED",
511
+ "TOKEN_COUNT_IS_HEURISTIC",
512
+ "REPAIR_REQUESTS_NOT_COUNTED"
513
+ ]
514
+ }
515
+ },
516
+ "unit": {
517
+ "type": "string",
518
+ "const": "tokens"
519
+ },
520
+ "inputTokens": {
521
+ "type": "number"
522
+ },
523
+ "outputTokens": {
524
+ "type": "number"
525
+ },
526
+ "pricing": {
527
+ "type": "string",
528
+ "const": "priced"
529
+ },
530
+ "currency": {
531
+ "type": "string"
532
+ },
533
+ "asOf": {
534
+ "type": "string"
535
+ },
536
+ "locales": {
537
+ "type": "array",
538
+ "items": {
539
+ "type": "object",
540
+ "properties": {
541
+ "locale": {
542
+ "type": "string"
543
+ },
544
+ "keys": {
545
+ "type": "number"
546
+ },
547
+ "requests": {
548
+ "type": "number"
549
+ },
550
+ "inputTokens": {
551
+ "type": "number"
552
+ },
553
+ "outputTokens": {
554
+ "type": "number"
555
+ },
556
+ "sourceCharacters": {
557
+ "type": "number"
558
+ },
559
+ "cost": {
560
+ "type": "number"
561
+ }
562
+ },
563
+ "required": [
564
+ "locale",
565
+ "keys",
566
+ "requests",
567
+ "cost"
568
+ ]
569
+ }
570
+ },
571
+ "cost": {
572
+ "type": "number"
573
+ }
574
+ },
575
+ "required": [
576
+ "provider",
577
+ "rateKey",
578
+ "keys",
579
+ "requests",
580
+ "caveats",
581
+ "unit",
582
+ "inputTokens",
583
+ "outputTokens",
584
+ "pricing",
585
+ "currency",
586
+ "asOf",
587
+ "locales",
588
+ "cost"
589
+ ]
590
+ },
591
+ {
592
+ "type": "object",
593
+ "properties": {
594
+ "provider": {
595
+ "type": "string",
596
+ "enum": [
597
+ "anthropic",
598
+ "openai",
599
+ "gemini",
600
+ "deepl",
601
+ "google-translate",
602
+ "openai-compatible",
603
+ "opencode",
604
+ "libretranslate",
605
+ "none"
606
+ ]
607
+ },
608
+ "model": {
609
+ "type": "string"
610
+ },
611
+ "rateKey": {
612
+ "type": "string"
613
+ },
614
+ "keys": {
615
+ "type": "number"
616
+ },
617
+ "requests": {
618
+ "type": "number"
619
+ },
620
+ "caveats": {
621
+ "type": "array",
622
+ "items": {
623
+ "type": "string",
624
+ "enum": [
625
+ "CACHE_NOT_CONSULTED",
626
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
627
+ "TRANSPORT_RETRIES_NOT_COUNTED",
628
+ "TRANSLATION_LENGTH_IS_ESTIMATED",
629
+ "TOKEN_COUNT_IS_HEURISTIC",
630
+ "REPAIR_REQUESTS_NOT_COUNTED"
631
+ ]
632
+ }
633
+ },
634
+ "unit": {
635
+ "type": "string",
636
+ "const": "characters"
637
+ },
638
+ "sourceCharacters": {
639
+ "type": "number"
640
+ },
641
+ "pricing": {
642
+ "type": "string",
643
+ "const": "priced"
644
+ },
645
+ "currency": {
646
+ "type": "string"
647
+ },
648
+ "asOf": {
649
+ "type": "string"
650
+ },
651
+ "locales": {
652
+ "type": "array",
653
+ "items": {
654
+ "type": "object",
655
+ "properties": {
656
+ "locale": {
657
+ "type": "string"
658
+ },
659
+ "keys": {
660
+ "type": "number"
661
+ },
662
+ "requests": {
663
+ "type": "number"
664
+ },
665
+ "inputTokens": {
666
+ "type": "number"
667
+ },
668
+ "outputTokens": {
669
+ "type": "number"
670
+ },
671
+ "sourceCharacters": {
672
+ "type": "number"
673
+ },
674
+ "cost": {
675
+ "type": "number"
676
+ }
677
+ },
678
+ "required": [
679
+ "locale",
680
+ "keys",
681
+ "requests",
682
+ "cost"
683
+ ]
684
+ }
685
+ },
686
+ "cost": {
687
+ "type": "number"
688
+ }
689
+ },
690
+ "required": [
691
+ "provider",
692
+ "rateKey",
693
+ "keys",
694
+ "requests",
695
+ "caveats",
696
+ "unit",
697
+ "sourceCharacters",
698
+ "pricing",
699
+ "currency",
700
+ "asOf",
701
+ "locales",
702
+ "cost"
703
+ ]
704
+ },
705
+ {
706
+ "type": "object",
707
+ "properties": {
708
+ "provider": {
709
+ "type": "string",
710
+ "enum": [
711
+ "anthropic",
712
+ "openai",
713
+ "gemini",
714
+ "deepl",
715
+ "google-translate",
716
+ "openai-compatible",
717
+ "opencode",
718
+ "libretranslate",
719
+ "none"
720
+ ]
721
+ },
722
+ "model": {
723
+ "type": "string"
724
+ },
725
+ "rateKey": {
726
+ "type": "string"
727
+ },
728
+ "keys": {
729
+ "type": "number"
730
+ },
731
+ "requests": {
732
+ "type": "number"
733
+ },
734
+ "caveats": {
735
+ "type": "array",
736
+ "items": {
737
+ "type": "string",
738
+ "enum": [
739
+ "CACHE_NOT_CONSULTED",
740
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
741
+ "TRANSPORT_RETRIES_NOT_COUNTED",
742
+ "TRANSLATION_LENGTH_IS_ESTIMATED",
743
+ "TOKEN_COUNT_IS_HEURISTIC",
744
+ "REPAIR_REQUESTS_NOT_COUNTED"
745
+ ]
746
+ }
747
+ },
748
+ "unit": {
749
+ "type": "string",
750
+ "const": "tokens"
751
+ },
752
+ "inputTokens": {
753
+ "type": "number"
754
+ },
755
+ "outputTokens": {
756
+ "type": "number"
757
+ },
758
+ "pricing": {
759
+ "type": "string",
760
+ "enum": [
761
+ "no-rate-on-file",
762
+ "rate-unit-mismatch",
763
+ "not-billed"
764
+ ]
765
+ },
766
+ "locales": {
767
+ "type": "array",
768
+ "items": {
769
+ "type": "object",
770
+ "properties": {
771
+ "locale": {
772
+ "type": "string"
773
+ },
774
+ "keys": {
775
+ "type": "number"
776
+ },
777
+ "requests": {
778
+ "type": "number"
779
+ },
780
+ "inputTokens": {
781
+ "type": "number"
782
+ },
783
+ "outputTokens": {
784
+ "type": "number"
785
+ },
786
+ "sourceCharacters": {
787
+ "type": "number"
788
+ }
789
+ },
790
+ "required": [
791
+ "locale",
792
+ "keys",
793
+ "requests"
794
+ ]
795
+ }
796
+ }
797
+ },
798
+ "required": [
799
+ "provider",
800
+ "rateKey",
801
+ "keys",
802
+ "requests",
803
+ "caveats",
804
+ "unit",
805
+ "inputTokens",
806
+ "outputTokens",
807
+ "pricing",
808
+ "locales"
809
+ ]
810
+ },
811
+ {
812
+ "type": "object",
813
+ "properties": {
814
+ "provider": {
815
+ "type": "string",
816
+ "enum": [
817
+ "anthropic",
818
+ "openai",
819
+ "gemini",
820
+ "deepl",
821
+ "google-translate",
822
+ "openai-compatible",
823
+ "opencode",
824
+ "libretranslate",
825
+ "none"
826
+ ]
827
+ },
828
+ "model": {
829
+ "type": "string"
830
+ },
831
+ "rateKey": {
832
+ "type": "string"
833
+ },
834
+ "keys": {
835
+ "type": "number"
836
+ },
837
+ "requests": {
838
+ "type": "number"
839
+ },
840
+ "caveats": {
841
+ "type": "array",
842
+ "items": {
843
+ "type": "string",
844
+ "enum": [
845
+ "CACHE_NOT_CONSULTED",
846
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
847
+ "TRANSPORT_RETRIES_NOT_COUNTED",
848
+ "TRANSLATION_LENGTH_IS_ESTIMATED",
849
+ "TOKEN_COUNT_IS_HEURISTIC",
850
+ "REPAIR_REQUESTS_NOT_COUNTED"
851
+ ]
852
+ }
853
+ },
854
+ "unit": {
855
+ "type": "string",
856
+ "const": "characters"
857
+ },
858
+ "sourceCharacters": {
859
+ "type": "number"
860
+ },
861
+ "pricing": {
862
+ "type": "string",
863
+ "enum": [
864
+ "no-rate-on-file",
865
+ "rate-unit-mismatch",
866
+ "not-billed"
867
+ ]
868
+ },
869
+ "locales": {
870
+ "type": "array",
871
+ "items": {
872
+ "type": "object",
873
+ "properties": {
874
+ "locale": {
875
+ "type": "string"
876
+ },
877
+ "keys": {
878
+ "type": "number"
879
+ },
880
+ "requests": {
881
+ "type": "number"
882
+ },
883
+ "inputTokens": {
884
+ "type": "number"
885
+ },
886
+ "outputTokens": {
887
+ "type": "number"
888
+ },
889
+ "sourceCharacters": {
890
+ "type": "number"
891
+ }
892
+ },
893
+ "required": [
894
+ "locale",
895
+ "keys",
896
+ "requests"
897
+ ]
898
+ }
899
+ }
900
+ },
901
+ "required": [
902
+ "provider",
903
+ "rateKey",
904
+ "keys",
905
+ "requests",
906
+ "caveats",
907
+ "unit",
908
+ "sourceCharacters",
909
+ "pricing",
910
+ "locales"
911
+ ]
912
+ }
913
+ ]
914
+ },
915
+ "cancelled": {
916
+ "type": "boolean",
917
+ "const": true
918
+ }
919
+ },
920
+ "required": [
921
+ "dryRun",
922
+ "locales",
923
+ "succeeded",
924
+ "partial",
925
+ "failed"
926
+ ]
927
+ }