@verbatra/sdk 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,14 +7,16 @@
7
7
  },
8
8
  "sourceLocale": {
9
9
  "type": "string",
10
- "minLength": 1
10
+ "minLength": 1,
11
+ "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(?:-[0-9A-WYZa-wyz](?:-[A-Za-z0-9]{2,8})+)*(?:-[Xx](?:-[A-Za-z0-9]{1,8})+)?$"
11
12
  },
12
13
  "targetLocales": {
13
14
  "minItems": 1,
14
15
  "type": "array",
15
16
  "items": {
16
17
  "type": "string",
17
- "minLength": 1
18
+ "minLength": 1,
19
+ "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(?:-[0-9A-WYZa-wyz](?:-[A-Za-z0-9]{2,8})+)*(?:-[Xx](?:-[A-Za-z0-9]{1,8})+)?$"
18
20
  }
19
21
  },
20
22
  "format": {
@@ -91,6 +93,18 @@
91
93
  "type": "integer",
92
94
  "exclusiveMinimum": 0,
93
95
  "maximum": 9007199254740991
96
+ },
97
+ "localeMap": {
98
+ "type": "object",
99
+ "propertyNames": {
100
+ "type": "string",
101
+ "minLength": 1
102
+ },
103
+ "additionalProperties": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "maxLength": 64
107
+ }
94
108
  }
95
109
  },
96
110
  "required": [
@@ -129,6 +143,18 @@
129
143
  "type": "integer",
130
144
  "exclusiveMinimum": 0,
131
145
  "maximum": 9007199254740991
146
+ },
147
+ "localeMap": {
148
+ "type": "object",
149
+ "propertyNames": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "additionalProperties": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 64
157
+ }
132
158
  }
133
159
  },
134
160
  "required": [
@@ -167,6 +193,18 @@
167
193
  "type": "integer",
168
194
  "exclusiveMinimum": 0,
169
195
  "maximum": 9007199254740991
196
+ },
197
+ "localeMap": {
198
+ "type": "object",
199
+ "propertyNames": {
200
+ "type": "string",
201
+ "minLength": 1
202
+ },
203
+ "additionalProperties": {
204
+ "type": "string",
205
+ "minLength": 1,
206
+ "maxLength": 64
207
+ }
170
208
  }
171
209
  },
172
210
  "required": [
@@ -200,6 +238,18 @@
200
238
  "type": "integer",
201
239
  "exclusiveMinimum": 0,
202
240
  "maximum": 9007199254740991
241
+ },
242
+ "localeMap": {
243
+ "type": "object",
244
+ "propertyNames": {
245
+ "type": "string",
246
+ "minLength": 1
247
+ },
248
+ "additionalProperties": {
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "maxLength": 64
252
+ }
203
253
  }
204
254
  },
205
255
  "additionalProperties": false
@@ -225,6 +275,18 @@
225
275
  "type": "integer",
226
276
  "exclusiveMinimum": 0,
227
277
  "maximum": 9007199254740991
278
+ },
279
+ "localeMap": {
280
+ "type": "object",
281
+ "propertyNames": {
282
+ "type": "string",
283
+ "minLength": 1
284
+ },
285
+ "additionalProperties": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "maxLength": 64
289
+ }
228
290
  }
229
291
  },
230
292
  "additionalProperties": false
@@ -236,6 +298,56 @@
236
298
  ],
237
299
  "additionalProperties": false
238
300
  },
301
+ {
302
+ "type": "object",
303
+ "properties": {
304
+ "id": {
305
+ "type": "string",
306
+ "const": "opencode"
307
+ },
308
+ "options": {
309
+ "type": "object",
310
+ "properties": {
311
+ "model": {
312
+ "type": "string",
313
+ "minLength": 1
314
+ },
315
+ "maxOutputTokens": {
316
+ "type": "integer",
317
+ "exclusiveMinimum": 0,
318
+ "maximum": 9007199254740991
319
+ },
320
+ "requestTimeoutMs": {
321
+ "type": "integer",
322
+ "exclusiveMinimum": 0,
323
+ "maximum": 9007199254740991
324
+ },
325
+ "localeMap": {
326
+ "type": "object",
327
+ "propertyNames": {
328
+ "type": "string",
329
+ "minLength": 1
330
+ },
331
+ "additionalProperties": {
332
+ "type": "string",
333
+ "minLength": 1,
334
+ "maxLength": 64
335
+ }
336
+ }
337
+ },
338
+ "required": [
339
+ "model",
340
+ "maxOutputTokens"
341
+ ],
342
+ "additionalProperties": false
343
+ }
344
+ },
345
+ "required": [
346
+ "id",
347
+ "options"
348
+ ],
349
+ "additionalProperties": false
350
+ },
239
351
  {
240
352
  "type": "object",
241
353
  "properties": {
@@ -267,6 +379,18 @@
267
379
  "type": "integer",
268
380
  "exclusiveMinimum": 0,
269
381
  "maximum": 9007199254740991
382
+ },
383
+ "localeMap": {
384
+ "type": "object",
385
+ "propertyNames": {
386
+ "type": "string",
387
+ "minLength": 1
388
+ },
389
+ "additionalProperties": {
390
+ "type": "string",
391
+ "minLength": 1,
392
+ "maxLength": 64
393
+ }
270
394
  }
271
395
  },
272
396
  "required": [
@@ -282,11 +406,186 @@
282
406
  "options"
283
407
  ],
284
408
  "additionalProperties": false
409
+ },
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "id": {
414
+ "type": "string",
415
+ "const": "libretranslate"
416
+ },
417
+ "options": {
418
+ "type": "object",
419
+ "properties": {
420
+ "baseUrl": {
421
+ "type": "string",
422
+ "pattern": "^https?:\\/\\/"
423
+ },
424
+ "requestTimeoutMs": {
425
+ "type": "integer",
426
+ "exclusiveMinimum": 0,
427
+ "maximum": 9007199254740991
428
+ },
429
+ "localeMap": {
430
+ "type": "object",
431
+ "propertyNames": {
432
+ "type": "string",
433
+ "minLength": 1
434
+ },
435
+ "additionalProperties": {
436
+ "type": "string",
437
+ "minLength": 1,
438
+ "maxLength": 64
439
+ }
440
+ }
441
+ },
442
+ "required": [
443
+ "baseUrl"
444
+ ],
445
+ "additionalProperties": false
446
+ }
447
+ },
448
+ "required": [
449
+ "id",
450
+ "options"
451
+ ],
452
+ "additionalProperties": false
453
+ },
454
+ {
455
+ "type": "object",
456
+ "properties": {
457
+ "id": {
458
+ "type": "string",
459
+ "const": "none"
460
+ },
461
+ "options": {
462
+ "default": {},
463
+ "type": "object",
464
+ "properties": {},
465
+ "additionalProperties": false
466
+ }
467
+ },
468
+ "required": [
469
+ "id"
470
+ ],
471
+ "additionalProperties": false
285
472
  }
286
473
  ]
287
474
  },
288
475
  "glossary": {
289
476
  "anyOf": [
477
+ {
478
+ "type": "string",
479
+ "minLength": 1
480
+ },
481
+ {
482
+ "type": "object",
483
+ "properties": {
484
+ "version": {
485
+ "type": "number",
486
+ "const": 2
487
+ },
488
+ "terms": {
489
+ "type": "array",
490
+ "items": {
491
+ "type": "object",
492
+ "properties": {
493
+ "source": {
494
+ "type": "string",
495
+ "maxLength": 200,
496
+ "pattern": "\\S"
497
+ },
498
+ "target": {
499
+ "type": "string",
500
+ "maxLength": 2000,
501
+ "pattern": "\\S"
502
+ },
503
+ "targets": {
504
+ "type": "object",
505
+ "propertyNames": {
506
+ "type": "string",
507
+ "minLength": 1,
508
+ "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(?:-[0-9A-WYZa-wyz](?:-[A-Za-z0-9]{2,8})+)*(?:-[Xx](?:-[A-Za-z0-9]{1,8})+)?$"
509
+ },
510
+ "additionalProperties": {
511
+ "type": "string",
512
+ "maxLength": 2000,
513
+ "pattern": "\\S"
514
+ }
515
+ },
516
+ "forbidden": {
517
+ "type": "object",
518
+ "propertyNames": {
519
+ "type": "string",
520
+ "minLength": 1,
521
+ "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(?:-[0-9A-WYZa-wyz](?:-[A-Za-z0-9]{2,8})+)*(?:-[Xx](?:-[A-Za-z0-9]{1,8})+)?$"
522
+ },
523
+ "additionalProperties": {
524
+ "minItems": 1,
525
+ "type": "array",
526
+ "items": {
527
+ "type": "string",
528
+ "maxLength": 2000,
529
+ "pattern": "\\S"
530
+ }
531
+ }
532
+ },
533
+ "caseSensitive": {
534
+ "type": "boolean"
535
+ },
536
+ "note": {
537
+ "type": "string",
538
+ "maxLength": 500,
539
+ "pattern": "\\S"
540
+ },
541
+ "partOfSpeech": {
542
+ "type": "string",
543
+ "maxLength": 50,
544
+ "pattern": "\\S"
545
+ }
546
+ },
547
+ "required": [
548
+ "source"
549
+ ],
550
+ "additionalProperties": false
551
+ }
552
+ },
553
+ "doNotTranslate": {
554
+ "type": "array",
555
+ "items": {
556
+ "anyOf": [
557
+ {
558
+ "type": "string",
559
+ "maxLength": 200,
560
+ "pattern": "\\S"
561
+ },
562
+ {
563
+ "type": "object",
564
+ "properties": {
565
+ "term": {
566
+ "type": "string",
567
+ "maxLength": 200,
568
+ "pattern": "\\S"
569
+ },
570
+ "caseSensitive": {
571
+ "type": "boolean"
572
+ }
573
+ },
574
+ "required": [
575
+ "term"
576
+ ],
577
+ "additionalProperties": false
578
+ }
579
+ ]
580
+ }
581
+ }
582
+ },
583
+ "required": [
584
+ "version",
585
+ "terms"
586
+ ],
587
+ "additionalProperties": false
588
+ },
290
589
  {
291
590
  "type": "object",
292
591
  "propertyNames": {
@@ -295,10 +594,6 @@
295
594
  "additionalProperties": {
296
595
  "type": "string"
297
596
  }
298
- },
299
- {
300
- "type": "string",
301
- "minLength": 1
302
597
  }
303
598
  ]
304
599
  },
@@ -483,6 +778,134 @@
483
778
  "roots"
484
779
  ],
485
780
  "additionalProperties": false
781
+ },
782
+ "humanEdits": {
783
+ "type": "string",
784
+ "enum": [
785
+ "protect",
786
+ "suggest",
787
+ "overwrite"
788
+ ]
789
+ },
790
+ "pinnedKeys": {
791
+ "type": "array",
792
+ "items": {
793
+ "type": "string",
794
+ "minLength": 1
795
+ }
796
+ },
797
+ "network": {
798
+ "oneOf": [
799
+ {
800
+ "type": "object",
801
+ "properties": {
802
+ "policy": {
803
+ "type": "string",
804
+ "const": "any"
805
+ },
806
+ "allowedHosts": {
807
+ "type": "array",
808
+ "items": {
809
+ "type": "string",
810
+ "pattern": "^(?:(?:\\*\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)+|[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)*)\\.?|[0-9a-fA-F.]*:[0-9a-fA-F:.]*(?:\\/\\d{1,3})?|\\d{1,3}(?:\\.\\d{1,3}){3}(?:\\/\\d{1,2})?)$"
811
+ }
812
+ }
813
+ },
814
+ "required": [
815
+ "policy"
816
+ ],
817
+ "additionalProperties": false
818
+ },
819
+ {
820
+ "type": "object",
821
+ "properties": {
822
+ "policy": {
823
+ "type": "string",
824
+ "const": "local-only"
825
+ },
826
+ "allowedHosts": {
827
+ "type": "array",
828
+ "items": {
829
+ "type": "string",
830
+ "pattern": "^(?:(?:\\*\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)+|[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)*)\\.?|[0-9a-fA-F.]*:[0-9a-fA-F:.]*(?:\\/\\d{1,3})?|\\d{1,3}(?:\\.\\d{1,3}){3}(?:\\/\\d{1,2})?)$"
831
+ }
832
+ }
833
+ },
834
+ "required": [
835
+ "policy"
836
+ ],
837
+ "additionalProperties": false
838
+ },
839
+ {
840
+ "type": "object",
841
+ "properties": {
842
+ "policy": {
843
+ "type": "string",
844
+ "const": "allowlist"
845
+ },
846
+ "allowedHosts": {
847
+ "minItems": 1,
848
+ "type": "array",
849
+ "items": {
850
+ "type": "string",
851
+ "pattern": "^(?:(?:\\*\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)+|[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\\.[a-zA-Z0-9_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?)*)\\.?|[0-9a-fA-F.]*:[0-9a-fA-F:.]*(?:\\/\\d{1,3})?|\\d{1,3}(?:\\.\\d{1,3}){3}(?:\\/\\d{1,2})?)$"
852
+ }
853
+ }
854
+ },
855
+ "required": [
856
+ "policy",
857
+ "allowedHosts"
858
+ ],
859
+ "additionalProperties": false
860
+ }
861
+ ]
862
+ },
863
+ "sensitiveData": {
864
+ "type": "object",
865
+ "properties": {
866
+ "mode": {
867
+ "type": "string",
868
+ "enum": [
869
+ "off",
870
+ "warn",
871
+ "block",
872
+ "redact"
873
+ ]
874
+ },
875
+ "detectors": {
876
+ "type": "array",
877
+ "items": {
878
+ "type": "string",
879
+ "enum": [
880
+ "secret",
881
+ "email",
882
+ "iban",
883
+ "credit-card",
884
+ "phone",
885
+ "ip",
886
+ "private-host"
887
+ ]
888
+ }
889
+ },
890
+ "patterns": {
891
+ "type": "array",
892
+ "items": {
893
+ "type": "string",
894
+ "minLength": 1
895
+ }
896
+ },
897
+ "allow": {
898
+ "type": "array",
899
+ "items": {
900
+ "type": "string",
901
+ "minLength": 1
902
+ }
903
+ }
904
+ },
905
+ "required": [
906
+ "mode"
907
+ ],
908
+ "additionalProperties": false
486
909
  }
487
910
  },
488
911
  "required": [