@openspecui/core 3.11.3 → 3.11.5

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 (29) hide show
  1. package/dist/{document-translation-BrlCvnLZ.mjs → document-translation-B6VWf7ll.mjs} +26 -2
  2. package/dist/{document-translation-Cv6BIGL5.d.mts → document-translation-DhFREeHW.d.mts} +254 -52
  3. package/dist/document-translation.d.mts +2 -2
  4. package/dist/document-translation.mjs +3 -3
  5. package/dist/index.d.mts +410 -89
  6. package/dist/index.mjs +226 -89
  7. package/dist/{local-download-profiles-GKs2OOqJ.d.mts → local-download-profiles-DIVr0mFh.d.mts} +1 -1
  8. package/dist/local-download-profiles.d.mts +2 -2
  9. package/dist/{notifications-CJQ_F_Un.d.mts → notifications-BDBbeTRk.d.mts} +16 -16
  10. package/dist/notifications.d.mts +2 -2
  11. package/dist/{openspec-projection-BbuPTbvj.d.mts → openspec-projection-CmxjMsxS.d.mts} +1 -1
  12. package/dist/openspec-projection.d.mts +2 -2
  13. package/dist/{opsx-entity-BO9G2SCW.d.mts → opsx-entity-CRa2u1j3.d.mts} +1 -1
  14. package/dist/opsx-entity.d.mts +2 -2
  15. package/dist/{opsx-schema-detail-DTajJW4g.d.mts → opsx-schema-detail-aVlqvbro.d.mts} +1 -1
  16. package/dist/opsx-schema-detail.d.mts +3 -3
  17. package/dist/{schemas-DQzd1hgp.d.mts → schemas-Dp8-Wm-X.d.mts} +28 -28
  18. package/dist/sounds.d.mts +1 -1
  19. package/dist/{terminal-audio-UCLlM1qN.d.mts → terminal-audio-DLOmaKqa.d.mts} +1 -1
  20. package/dist/terminal-audio.d.mts +2 -2
  21. package/dist/terminal-control.d.mts +2 -2
  22. package/dist/{terminal-invocation-DCPc8hmm.d.mts → terminal-invocation-B3js0mEF.d.mts} +81 -81
  23. package/dist/terminal-invocation.d.mts +1 -1
  24. package/dist/{translator-prn3W9lf.d.mts → translator-CS7MsNZp.d.mts} +387 -138
  25. package/dist/{translator-Car0_7uk.mjs → translator-Cx9j32Og.mjs} +164 -6
  26. package/dist/translator.d.mts +2 -2
  27. package/dist/translator.mjs +2 -2
  28. package/package.json +1 -1
  29. /package/dist/{sounds-3yEx1YXT.d.mts → sounds-6KwglrL2.d.mts} +0 -0
@@ -1,5 +1,27 @@
1
1
  import { z } from "zod";
2
2
 
3
+ //#region src/translation-task-control.d.ts
4
+ declare const BATCH_TRANSLATION_ERROR_KINDS: readonly ["timeout", "memory-limit", "runtime", "abort"];
5
+ type BatchTranslationErrorKind = (typeof BATCH_TRANSLATION_ERROR_KINDS)[number];
6
+ interface BatchTranslationError {
7
+ kind: BatchTranslationErrorKind;
8
+ message: string;
9
+ }
10
+ interface ControlledTranslationTaskOptions {
11
+ signal?: AbortSignal;
12
+ timeoutMs?: number;
13
+ }
14
+ type ControlledTranslationTaskResult<T> = {
15
+ ok: true;
16
+ value: T;
17
+ } | {
18
+ ok: false;
19
+ error: BatchTranslationError;
20
+ };
21
+ declare function runControlledTranslationTask<T>(task: (signal: AbortSignal) => Promise<T>, options?: ControlledTranslationTaskOptions): Promise<ControlledTranslationTaskResult<T>>;
22
+ declare function normalizeBatchTranslationError(error: unknown, parentSignal?: AbortSignal): BatchTranslationError;
23
+ declare function isBatchTranslationAbort(error: BatchTranslationError, signal: AbortSignal | undefined): boolean;
24
+ //#endregion
3
25
  //#region src/translator.d.ts
4
26
  declare const TRANSLATOR_CONTRACT_VERSION = 3;
5
27
  declare const TRANSLATION_ENGINE_IDS: readonly ["browser", "local", "local-ct2", "local-llama", "openai"];
@@ -12,14 +34,17 @@ type ManagedLocalTranslationEngineId = Extract<TranslationEngineId, 'local' | 'l
12
34
  declare const SERVICE_TRANSLATION_ENGINE_IDS: readonly ["local", "local-ct2", "local-llama", "openai"];
13
35
  declare const ServiceTranslationEngineIdSchema: z.ZodEnum<["local", "local-ct2", "local-llama", "openai"]>;
14
36
  type ServiceTranslationEngineId = z.infer<typeof ServiceTranslationEngineIdSchema>;
37
+ declare const DEFAULT_BATCH_TRANSLATION_TIMEOUT_MS = 15000;
15
38
  interface TranslatorOptions {
16
39
  instructions?: string;
17
40
  context?: string;
18
41
  signal?: AbortSignal;
42
+ timeoutMs?: number;
19
43
  }
20
44
  interface BatchTranslationResult {
21
45
  index: number;
22
- output: string;
46
+ output?: string;
47
+ error?: BatchTranslationError;
23
48
  }
24
49
  interface Translator {
25
50
  batchTranslate(inputs: string[], options?: TranslatorOptions): AsyncGenerator<BatchTranslationResult>;
@@ -193,8 +218,8 @@ declare const TranslationDownloadGroupPlanSchema: z.ZodObject<{
193
218
  raw?: unknown;
194
219
  }>, "many">;
195
220
  }, "strip", z.ZodTypeAny, {
196
- label: string;
197
221
  id: string;
222
+ label: string;
198
223
  selectable: boolean;
199
224
  selected: boolean;
200
225
  files: {
@@ -206,7 +231,7 @@ declare const TranslationDownloadGroupPlanSchema: z.ZodObject<{
206
231
  sourceUrl?: string | undefined;
207
232
  raw?: unknown;
208
233
  }[];
209
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
234
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
210
235
  error?: string | undefined;
211
236
  description?: string | undefined;
212
237
  profile?: string | undefined;
@@ -221,8 +246,8 @@ declare const TranslationDownloadGroupPlanSchema: z.ZodObject<{
221
246
  totalBytes?: number | undefined;
222
247
  resumable?: boolean | undefined;
223
248
  }, {
224
- label: string;
225
249
  id: string;
250
+ label: string;
226
251
  selectable: boolean;
227
252
  selected: boolean;
228
253
  files: {
@@ -234,7 +259,7 @@ declare const TranslationDownloadGroupPlanSchema: z.ZodObject<{
234
259
  sourceUrl?: string | undefined;
235
260
  raw?: unknown;
236
261
  }[];
237
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
262
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
238
263
  error?: string | undefined;
239
264
  description?: string | undefined;
240
265
  profile?: string | undefined;
@@ -316,8 +341,8 @@ declare const LocalModelProfileManifestGroupSchema: z.ZodObject<{
316
341
  raw?: unknown;
317
342
  }>, "many">;
318
343
  }, "strip", z.ZodTypeAny, {
319
- label: string;
320
344
  id: string;
345
+ label: string;
321
346
  baseGroupId: string;
322
347
  commitHash: string;
323
348
  shortCommitHash: string;
@@ -338,8 +363,8 @@ declare const LocalModelProfileManifestGroupSchema: z.ZodObject<{
338
363
  dtype?: string | undefined;
339
364
  estimatedTotalBytes?: number | undefined;
340
365
  }, {
341
- label: string;
342
366
  id: string;
367
+ label: string;
343
368
  baseGroupId: string;
344
369
  commitHash: string;
345
370
  shortCommitHash: string;
@@ -410,8 +435,8 @@ declare const LocalModelProfileManifestSchema: z.ZodObject<{
410
435
  raw?: unknown;
411
436
  }>, "many">;
412
437
  }, "strip", z.ZodTypeAny, {
413
- label: string;
414
438
  id: string;
439
+ label: string;
415
440
  baseGroupId: string;
416
441
  commitHash: string;
417
442
  shortCommitHash: string;
@@ -432,8 +457,8 @@ declare const LocalModelProfileManifestSchema: z.ZodObject<{
432
457
  dtype?: string | undefined;
433
458
  estimatedTotalBytes?: number | undefined;
434
459
  }, {
435
- label: string;
436
460
  id: string;
461
+ label: string;
437
462
  baseGroupId: string;
438
463
  commitHash: string;
439
464
  shortCommitHash: string;
@@ -456,17 +481,17 @@ declare const LocalModelProfileManifestSchema: z.ZodObject<{
456
481
  }>>>;
457
482
  groupOrder: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
458
483
  }, "strip", z.ZodTypeAny, {
459
- source: "huggingface";
460
484
  revision: string;
461
485
  commitHash: string;
462
486
  shortCommitHash: string;
463
487
  modelId: string;
488
+ source: "huggingface";
464
489
  endpoint: string;
465
490
  fetchedAt: number;
466
491
  updatedAt: number;
467
492
  groups: Record<string, {
468
- label: string;
469
493
  id: string;
494
+ label: string;
470
495
  baseGroupId: string;
471
496
  commitHash: string;
472
497
  shortCommitHash: string;
@@ -490,18 +515,18 @@ declare const LocalModelProfileManifestSchema: z.ZodObject<{
490
515
  groupOrder: string[];
491
516
  raw?: unknown;
492
517
  }, {
493
- source: "huggingface";
494
518
  revision: string;
495
519
  commitHash: string;
496
520
  shortCommitHash: string;
497
521
  modelId: string;
522
+ source: "huggingface";
498
523
  fetchedAt: number;
499
524
  updatedAt: number;
500
525
  raw?: unknown;
501
526
  endpoint?: string | undefined;
502
527
  groups?: Record<string, {
503
- label: string;
504
528
  id: string;
529
+ label: string;
505
530
  baseGroupId: string;
506
531
  commitHash: string;
507
532
  shortCommitHash: string;
@@ -534,8 +559,8 @@ declare const LocalModelLifecycleFileStateSchema: z.ZodObject<{
534
559
  updatedAt: z.ZodOptional<z.ZodNumber>;
535
560
  error: z.ZodOptional<z.ZodString>;
536
561
  }, "strip", z.ZodTypeAny, {
537
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
538
562
  path: string;
563
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
539
564
  required: boolean;
540
565
  error?: string | undefined;
541
566
  sizeBytes?: number | undefined;
@@ -543,10 +568,10 @@ declare const LocalModelLifecycleFileStateSchema: z.ZodObject<{
543
568
  downloadedBytes?: number | undefined;
544
569
  }, {
545
570
  path: string;
546
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
571
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
547
572
  error?: string | undefined;
548
- required?: boolean | undefined;
549
573
  sizeBytes?: number | undefined;
574
+ required?: boolean | undefined;
550
575
  updatedAt?: number | undefined;
551
576
  downloadedBytes?: number | undefined;
552
577
  }>;
@@ -572,8 +597,8 @@ declare const LocalModelLifecycleGroupStateSchema: z.ZodObject<{
572
597
  updatedAt: z.ZodOptional<z.ZodNumber>;
573
598
  error: z.ZodOptional<z.ZodString>;
574
599
  }, "strip", z.ZodTypeAny, {
575
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
576
600
  path: string;
601
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
577
602
  required: boolean;
578
603
  error?: string | undefined;
579
604
  sizeBytes?: number | undefined;
@@ -581,26 +606,26 @@ declare const LocalModelLifecycleGroupStateSchema: z.ZodObject<{
581
606
  downloadedBytes?: number | undefined;
582
607
  }, {
583
608
  path: string;
584
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
609
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
585
610
  error?: string | undefined;
586
- required?: boolean | undefined;
587
611
  sizeBytes?: number | undefined;
612
+ required?: boolean | undefined;
588
613
  updatedAt?: number | undefined;
589
614
  downloadedBytes?: number | undefined;
590
615
  }>, "many">>;
591
616
  }, "strip", z.ZodTypeAny, {
592
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
593
- groupId: string;
617
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
594
618
  resumable: boolean;
595
619
  files: {
596
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
597
620
  path: string;
621
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
598
622
  required: boolean;
599
623
  error?: string | undefined;
600
624
  sizeBytes?: number | undefined;
601
625
  updatedAt?: number | undefined;
602
626
  downloadedBytes?: number | undefined;
603
627
  }[];
628
+ groupId: string;
604
629
  error?: string | undefined;
605
630
  baseGroupId?: string | undefined;
606
631
  rootDir?: string | undefined;
@@ -611,7 +636,7 @@ declare const LocalModelLifecycleGroupStateSchema: z.ZodObject<{
611
636
  installedAt?: number | undefined;
612
637
  }, {
613
638
  groupId: string;
614
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
639
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
615
640
  error?: string | undefined;
616
641
  baseGroupId?: string | undefined;
617
642
  rootDir?: string | undefined;
@@ -621,10 +646,10 @@ declare const LocalModelLifecycleGroupStateSchema: z.ZodObject<{
621
646
  resumable?: boolean | undefined;
622
647
  files?: {
623
648
  path: string;
624
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
649
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
625
650
  error?: string | undefined;
626
- required?: boolean | undefined;
627
651
  sizeBytes?: number | undefined;
652
+ required?: boolean | undefined;
628
653
  updatedAt?: number | undefined;
629
654
  downloadedBytes?: number | undefined;
630
655
  }[] | undefined;
@@ -643,8 +668,8 @@ declare const LocalModelProfileLoadStateSchema: z.ZodObject<{
643
668
  error?: string | undefined;
644
669
  updatedAt?: number | undefined;
645
670
  }, {
646
- status?: "error" | "idle" | "loading" | "ready" | undefined;
647
671
  message?: string | undefined;
672
+ status?: "error" | "idle" | "loading" | "ready" | undefined;
648
673
  error?: string | undefined;
649
674
  updatedAt?: number | undefined;
650
675
  }>;
@@ -676,13 +701,12 @@ declare const LocalModelAssetLogSchema: z.ZodObject<{
676
701
  }>, "many">>;
677
702
  updatedAt: z.ZodNumber;
678
703
  }, "strip", z.ZodTypeAny, {
679
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
680
704
  message: string;
705
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
706
+ engineId: "local" | "local-ct2" | "local-llama";
681
707
  modelId: string;
682
708
  updatedAt: number;
683
- engineId: "local" | "local-ct2" | "local-llama";
684
- sessionId?: string | undefined;
685
- groupId?: string | undefined;
709
+ selectedGroupId?: string | undefined;
686
710
  progress?: number | undefined;
687
711
  bytesDownloaded?: number | undefined;
688
712
  totalBytes?: number | undefined;
@@ -692,15 +716,15 @@ declare const LocalModelAssetLogSchema: z.ZodObject<{
692
716
  sizeBytes?: number | undefined;
693
717
  downloadedBytes?: number | undefined;
694
718
  }[] | undefined;
695
- selectedGroupId?: string | undefined;
719
+ groupId?: string | undefined;
720
+ sessionId?: string | undefined;
696
721
  }, {
697
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
698
722
  message: string;
723
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
724
+ engineId: "local" | "local-ct2" | "local-llama";
699
725
  modelId: string;
700
726
  updatedAt: number;
701
- engineId: "local" | "local-ct2" | "local-llama";
702
- sessionId?: string | undefined;
703
- groupId?: string | undefined;
727
+ selectedGroupId?: string | undefined;
704
728
  progress?: number | undefined;
705
729
  bytesDownloaded?: number | undefined;
706
730
  totalBytes?: number | undefined;
@@ -710,7 +734,8 @@ declare const LocalModelAssetLogSchema: z.ZodObject<{
710
734
  sizeBytes?: number | undefined;
711
735
  downloadedBytes?: number | undefined;
712
736
  }[] | undefined;
713
- selectedGroupId?: string | undefined;
737
+ groupId?: string | undefined;
738
+ sessionId?: string | undefined;
714
739
  }>;
715
740
  type LocalModelAssetLog = z.infer<typeof LocalModelAssetLogSchema>;
716
741
  declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
@@ -788,8 +813,8 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
788
813
  raw?: unknown;
789
814
  }>, "many">;
790
815
  }, "strip", z.ZodTypeAny, {
791
- label: string;
792
816
  id: string;
817
+ label: string;
793
818
  selectable: boolean;
794
819
  selected: boolean;
795
820
  files: {
@@ -801,7 +826,7 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
801
826
  sourceUrl?: string | undefined;
802
827
  raw?: unknown;
803
828
  }[];
804
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
829
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
805
830
  error?: string | undefined;
806
831
  description?: string | undefined;
807
832
  profile?: string | undefined;
@@ -816,8 +841,8 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
816
841
  totalBytes?: number | undefined;
817
842
  resumable?: boolean | undefined;
818
843
  }, {
819
- label: string;
820
844
  id: string;
845
+ label: string;
821
846
  selectable: boolean;
822
847
  selected: boolean;
823
848
  files: {
@@ -829,7 +854,7 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
829
854
  sourceUrl?: string | undefined;
830
855
  raw?: unknown;
831
856
  }[];
832
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
857
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
833
858
  error?: string | undefined;
834
859
  description?: string | undefined;
835
860
  profile?: string | undefined;
@@ -855,11 +880,12 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
855
880
  raw?: unknown;
856
881
  }[];
857
882
  modelId: string;
883
+ selectedGroupId?: string | undefined;
858
884
  profile?: string | undefined;
859
885
  estimatedTotalBytes?: number | undefined;
860
886
  groups?: {
861
- label: string;
862
887
  id: string;
888
+ label: string;
863
889
  selectable: boolean;
864
890
  selected: boolean;
865
891
  files: {
@@ -871,7 +897,7 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
871
897
  sourceUrl?: string | undefined;
872
898
  raw?: unknown;
873
899
  }[];
874
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
900
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
875
901
  error?: string | undefined;
876
902
  description?: string | undefined;
877
903
  profile?: string | undefined;
@@ -886,7 +912,6 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
886
912
  totalBytes?: number | undefined;
887
913
  resumable?: boolean | undefined;
888
914
  }[] | undefined;
889
- selectedGroupId?: string | undefined;
890
915
  }, {
891
916
  files: {
892
917
  path: string;
@@ -898,11 +923,12 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
898
923
  raw?: unknown;
899
924
  }[];
900
925
  modelId: string;
926
+ selectedGroupId?: string | undefined;
901
927
  profile?: string | undefined;
902
928
  estimatedTotalBytes?: number | undefined;
903
929
  groups?: {
904
- label: string;
905
930
  id: string;
931
+ label: string;
906
932
  selectable: boolean;
907
933
  selected: boolean;
908
934
  files: {
@@ -914,7 +940,7 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
914
940
  sourceUrl?: string | undefined;
915
941
  raw?: unknown;
916
942
  }[];
917
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
943
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
918
944
  error?: string | undefined;
919
945
  description?: string | undefined;
920
946
  profile?: string | undefined;
@@ -929,7 +955,6 @@ declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
929
955
  totalBytes?: number | undefined;
930
956
  resumable?: boolean | undefined;
931
957
  }[] | undefined;
932
- selectedGroupId?: string | undefined;
933
958
  }>;
934
959
  type LocalModelAssetPlanSnapshot = z.infer<typeof LocalModelAssetPlanSnapshotSchema>;
935
960
  declare const LocalModelAssetStateSchema: z.ZodObject<{
@@ -956,8 +981,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
956
981
  error?: string | undefined;
957
982
  updatedAt?: number | undefined;
958
983
  }, {
959
- status?: "error" | "idle" | "loading" | "ready" | undefined;
960
984
  message?: string | undefined;
985
+ status?: "error" | "idle" | "loading" | "ready" | undefined;
961
986
  error?: string | undefined;
962
987
  updatedAt?: number | undefined;
963
988
  }>>;
@@ -1010,8 +1035,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1010
1035
  raw?: unknown;
1011
1036
  }>, "many">;
1012
1037
  }, "strip", z.ZodTypeAny, {
1013
- label: string;
1014
1038
  id: string;
1039
+ label: string;
1015
1040
  baseGroupId: string;
1016
1041
  commitHash: string;
1017
1042
  shortCommitHash: string;
@@ -1032,8 +1057,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1032
1057
  dtype?: string | undefined;
1033
1058
  estimatedTotalBytes?: number | undefined;
1034
1059
  }, {
1035
- label: string;
1036
1060
  id: string;
1061
+ label: string;
1037
1062
  baseGroupId: string;
1038
1063
  commitHash: string;
1039
1064
  shortCommitHash: string;
@@ -1056,17 +1081,17 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1056
1081
  }>>>;
1057
1082
  groupOrder: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1058
1083
  }, "strip", z.ZodTypeAny, {
1059
- source: "huggingface";
1060
1084
  revision: string;
1061
1085
  commitHash: string;
1062
1086
  shortCommitHash: string;
1063
1087
  modelId: string;
1088
+ source: "huggingface";
1064
1089
  endpoint: string;
1065
1090
  fetchedAt: number;
1066
1091
  updatedAt: number;
1067
1092
  groups: Record<string, {
1068
- label: string;
1069
1093
  id: string;
1094
+ label: string;
1070
1095
  baseGroupId: string;
1071
1096
  commitHash: string;
1072
1097
  shortCommitHash: string;
@@ -1090,18 +1115,18 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1090
1115
  groupOrder: string[];
1091
1116
  raw?: unknown;
1092
1117
  }, {
1093
- source: "huggingface";
1094
1118
  revision: string;
1095
1119
  commitHash: string;
1096
1120
  shortCommitHash: string;
1097
1121
  modelId: string;
1122
+ source: "huggingface";
1098
1123
  fetchedAt: number;
1099
1124
  updatedAt: number;
1100
1125
  raw?: unknown;
1101
1126
  endpoint?: string | undefined;
1102
1127
  groups?: Record<string, {
1103
- label: string;
1104
1128
  id: string;
1129
+ label: string;
1105
1130
  baseGroupId: string;
1106
1131
  commitHash: string;
1107
1132
  shortCommitHash: string;
@@ -1145,8 +1170,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1145
1170
  updatedAt: z.ZodOptional<z.ZodNumber>;
1146
1171
  error: z.ZodOptional<z.ZodString>;
1147
1172
  }, "strip", z.ZodTypeAny, {
1148
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1149
1173
  path: string;
1174
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1150
1175
  required: boolean;
1151
1176
  error?: string | undefined;
1152
1177
  sizeBytes?: number | undefined;
@@ -1154,26 +1179,26 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1154
1179
  downloadedBytes?: number | undefined;
1155
1180
  }, {
1156
1181
  path: string;
1157
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1182
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1158
1183
  error?: string | undefined;
1159
- required?: boolean | undefined;
1160
1184
  sizeBytes?: number | undefined;
1185
+ required?: boolean | undefined;
1161
1186
  updatedAt?: number | undefined;
1162
1187
  downloadedBytes?: number | undefined;
1163
1188
  }>, "many">>;
1164
1189
  }, "strip", z.ZodTypeAny, {
1165
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1166
- groupId: string;
1190
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1167
1191
  resumable: boolean;
1168
1192
  files: {
1169
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1170
1193
  path: string;
1194
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1171
1195
  required: boolean;
1172
1196
  error?: string | undefined;
1173
1197
  sizeBytes?: number | undefined;
1174
1198
  updatedAt?: number | undefined;
1175
1199
  downloadedBytes?: number | undefined;
1176
1200
  }[];
1201
+ groupId: string;
1177
1202
  error?: string | undefined;
1178
1203
  baseGroupId?: string | undefined;
1179
1204
  rootDir?: string | undefined;
@@ -1184,7 +1209,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1184
1209
  installedAt?: number | undefined;
1185
1210
  }, {
1186
1211
  groupId: string;
1187
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1212
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1188
1213
  error?: string | undefined;
1189
1214
  baseGroupId?: string | undefined;
1190
1215
  rootDir?: string | undefined;
@@ -1194,10 +1219,10 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1194
1219
  resumable?: boolean | undefined;
1195
1220
  files?: {
1196
1221
  path: string;
1197
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1222
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1198
1223
  error?: string | undefined;
1199
- required?: boolean | undefined;
1200
1224
  sizeBytes?: number | undefined;
1225
+ required?: boolean | undefined;
1201
1226
  updatedAt?: number | undefined;
1202
1227
  downloadedBytes?: number | undefined;
1203
1228
  }[] | undefined;
@@ -1279,8 +1304,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1279
1304
  raw?: unknown;
1280
1305
  }>, "many">;
1281
1306
  }, "strip", z.ZodTypeAny, {
1282
- label: string;
1283
1307
  id: string;
1308
+ label: string;
1284
1309
  selectable: boolean;
1285
1310
  selected: boolean;
1286
1311
  files: {
@@ -1292,7 +1317,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1292
1317
  sourceUrl?: string | undefined;
1293
1318
  raw?: unknown;
1294
1319
  }[];
1295
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1320
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1296
1321
  error?: string | undefined;
1297
1322
  description?: string | undefined;
1298
1323
  profile?: string | undefined;
@@ -1307,8 +1332,8 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1307
1332
  totalBytes?: number | undefined;
1308
1333
  resumable?: boolean | undefined;
1309
1334
  }, {
1310
- label: string;
1311
1335
  id: string;
1336
+ label: string;
1312
1337
  selectable: boolean;
1313
1338
  selected: boolean;
1314
1339
  files: {
@@ -1320,7 +1345,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1320
1345
  sourceUrl?: string | undefined;
1321
1346
  raw?: unknown;
1322
1347
  }[];
1323
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1348
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1324
1349
  error?: string | undefined;
1325
1350
  description?: string | undefined;
1326
1351
  profile?: string | undefined;
@@ -1346,11 +1371,12 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1346
1371
  raw?: unknown;
1347
1372
  }[];
1348
1373
  modelId: string;
1374
+ selectedGroupId?: string | undefined;
1349
1375
  profile?: string | undefined;
1350
1376
  estimatedTotalBytes?: number | undefined;
1351
1377
  groups?: {
1352
- label: string;
1353
1378
  id: string;
1379
+ label: string;
1354
1380
  selectable: boolean;
1355
1381
  selected: boolean;
1356
1382
  files: {
@@ -1362,7 +1388,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1362
1388
  sourceUrl?: string | undefined;
1363
1389
  raw?: unknown;
1364
1390
  }[];
1365
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1391
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1366
1392
  error?: string | undefined;
1367
1393
  description?: string | undefined;
1368
1394
  profile?: string | undefined;
@@ -1377,7 +1403,6 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1377
1403
  totalBytes?: number | undefined;
1378
1404
  resumable?: boolean | undefined;
1379
1405
  }[] | undefined;
1380
- selectedGroupId?: string | undefined;
1381
1406
  }, {
1382
1407
  files: {
1383
1408
  path: string;
@@ -1389,11 +1414,12 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1389
1414
  raw?: unknown;
1390
1415
  }[];
1391
1416
  modelId: string;
1417
+ selectedGroupId?: string | undefined;
1392
1418
  profile?: string | undefined;
1393
1419
  estimatedTotalBytes?: number | undefined;
1394
1420
  groups?: {
1395
- label: string;
1396
1421
  id: string;
1422
+ label: string;
1397
1423
  selectable: boolean;
1398
1424
  selected: boolean;
1399
1425
  files: {
@@ -1405,7 +1431,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1405
1431
  sourceUrl?: string | undefined;
1406
1432
  raw?: unknown;
1407
1433
  }[];
1408
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1434
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1409
1435
  error?: string | undefined;
1410
1436
  description?: string | undefined;
1411
1437
  profile?: string | undefined;
@@ -1420,7 +1446,6 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1420
1446
  totalBytes?: number | undefined;
1421
1447
  resumable?: boolean | undefined;
1422
1448
  }[] | undefined;
1423
- selectedGroupId?: string | undefined;
1424
1449
  }>>;
1425
1450
  files: z.ZodDefault<z.ZodArray<z.ZodObject<{
1426
1451
  path: z.ZodString;
@@ -1436,7 +1461,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1436
1461
  downloadedBytes?: number | undefined;
1437
1462
  }>, "many">>;
1438
1463
  }, "strip", z.ZodTypeAny, {
1439
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1464
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1440
1465
  resumable: boolean;
1441
1466
  selected: boolean;
1442
1467
  files: {
@@ -1453,18 +1478,18 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1453
1478
  updatedAt?: number | undefined;
1454
1479
  };
1455
1480
  groupsState: Record<string, {
1456
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1457
- groupId: string;
1481
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1458
1482
  resumable: boolean;
1459
1483
  files: {
1460
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
1461
1484
  path: string;
1485
+ status: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting";
1462
1486
  required: boolean;
1463
1487
  error?: string | undefined;
1464
1488
  sizeBytes?: number | undefined;
1465
1489
  updatedAt?: number | undefined;
1466
1490
  downloadedBytes?: number | undefined;
1467
1491
  }[];
1492
+ groupId: string;
1468
1493
  error?: string | undefined;
1469
1494
  baseGroupId?: string | undefined;
1470
1495
  rootDir?: string | undefined;
@@ -1474,25 +1499,25 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1474
1499
  updatedAt?: number | undefined;
1475
1500
  installedAt?: number | undefined;
1476
1501
  }>;
1502
+ selectedGroupId?: string | undefined;
1477
1503
  error?: string | undefined;
1478
1504
  progress?: number | undefined;
1479
1505
  bytesDownloaded?: number | undefined;
1480
1506
  totalBytes?: number | undefined;
1481
1507
  updatedAt?: number | undefined;
1482
1508
  installedAt?: number | undefined;
1483
- selectedGroupId?: string | undefined;
1484
1509
  profileManifest?: {
1485
- source: "huggingface";
1486
1510
  revision: string;
1487
1511
  commitHash: string;
1488
1512
  shortCommitHash: string;
1489
1513
  modelId: string;
1514
+ source: "huggingface";
1490
1515
  endpoint: string;
1491
1516
  fetchedAt: number;
1492
1517
  updatedAt: number;
1493
1518
  groups: Record<string, {
1494
- label: string;
1495
1519
  id: string;
1520
+ label: string;
1496
1521
  baseGroupId: string;
1497
1522
  commitHash: string;
1498
1523
  shortCommitHash: string;
@@ -1527,11 +1552,12 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1527
1552
  raw?: unknown;
1528
1553
  }[];
1529
1554
  modelId: string;
1555
+ selectedGroupId?: string | undefined;
1530
1556
  profile?: string | undefined;
1531
1557
  estimatedTotalBytes?: number | undefined;
1532
1558
  groups?: {
1533
- label: string;
1534
1559
  id: string;
1560
+ label: string;
1535
1561
  selectable: boolean;
1536
1562
  selected: boolean;
1537
1563
  files: {
@@ -1543,7 +1569,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1543
1569
  sourceUrl?: string | undefined;
1544
1570
  raw?: unknown;
1545
1571
  }[];
1546
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1572
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1547
1573
  error?: string | undefined;
1548
1574
  description?: string | undefined;
1549
1575
  profile?: string | undefined;
@@ -1558,11 +1584,11 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1558
1584
  totalBytes?: number | undefined;
1559
1585
  resumable?: boolean | undefined;
1560
1586
  }[] | undefined;
1561
- selectedGroupId?: string | undefined;
1562
1587
  } | undefined;
1563
1588
  }, {
1564
1589
  modelId: string;
1565
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1590
+ selectedGroupId?: string | undefined;
1591
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1566
1592
  error?: string | undefined;
1567
1593
  progress?: number | undefined;
1568
1594
  bytesDownloaded?: number | undefined;
@@ -1576,27 +1602,26 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1576
1602
  }[] | undefined;
1577
1603
  updatedAt?: number | undefined;
1578
1604
  installedAt?: number | undefined;
1579
- selectedGroupId?: string | undefined;
1580
1605
  version?: 2 | undefined;
1581
1606
  profileLoad?: {
1582
- status?: "error" | "idle" | "loading" | "ready" | undefined;
1583
1607
  message?: string | undefined;
1608
+ status?: "error" | "idle" | "loading" | "ready" | undefined;
1584
1609
  error?: string | undefined;
1585
1610
  updatedAt?: number | undefined;
1586
1611
  } | undefined;
1587
1612
  profileManifest?: {
1588
- source: "huggingface";
1589
1613
  revision: string;
1590
1614
  commitHash: string;
1591
1615
  shortCommitHash: string;
1592
1616
  modelId: string;
1617
+ source: "huggingface";
1593
1618
  fetchedAt: number;
1594
1619
  updatedAt: number;
1595
1620
  raw?: unknown;
1596
1621
  endpoint?: string | undefined;
1597
1622
  groups?: Record<string, {
1598
- label: string;
1599
1623
  id: string;
1624
+ label: string;
1600
1625
  baseGroupId: string;
1601
1626
  commitHash: string;
1602
1627
  shortCommitHash: string;
@@ -1621,7 +1646,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1621
1646
  } | undefined;
1622
1647
  groupsState?: Record<string, {
1623
1648
  groupId: string;
1624
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1649
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1625
1650
  error?: string | undefined;
1626
1651
  baseGroupId?: string | undefined;
1627
1652
  rootDir?: string | undefined;
@@ -1631,10 +1656,10 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1631
1656
  resumable?: boolean | undefined;
1632
1657
  files?: {
1633
1658
  path: string;
1634
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1659
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1635
1660
  error?: string | undefined;
1636
- required?: boolean | undefined;
1637
1661
  sizeBytes?: number | undefined;
1662
+ required?: boolean | undefined;
1638
1663
  updatedAt?: number | undefined;
1639
1664
  downloadedBytes?: number | undefined;
1640
1665
  }[] | undefined;
@@ -1652,11 +1677,12 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1652
1677
  raw?: unknown;
1653
1678
  }[];
1654
1679
  modelId: string;
1680
+ selectedGroupId?: string | undefined;
1655
1681
  profile?: string | undefined;
1656
1682
  estimatedTotalBytes?: number | undefined;
1657
1683
  groups?: {
1658
- label: string;
1659
1684
  id: string;
1685
+ label: string;
1660
1686
  selectable: boolean;
1661
1687
  selected: boolean;
1662
1688
  files: {
@@ -1668,7 +1694,7 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1668
1694
  sourceUrl?: string | undefined;
1669
1695
  raw?: unknown;
1670
1696
  }[];
1671
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
1697
+ status?: "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "error" | "deleting" | undefined;
1672
1698
  error?: string | undefined;
1673
1699
  description?: string | undefined;
1674
1700
  profile?: string | undefined;
@@ -1683,7 +1709,6 @@ declare const LocalModelAssetStateSchema: z.ZodObject<{
1683
1709
  totalBytes?: number | undefined;
1684
1710
  resumable?: boolean | undefined;
1685
1711
  }[] | undefined;
1686
- selectedGroupId?: string | undefined;
1687
1712
  } | undefined;
1688
1713
  }>;
1689
1714
  type LocalModelAssetState = z.infer<typeof LocalModelAssetStateSchema>;
@@ -1791,12 +1816,12 @@ declare const TranslationEngineAssetStatusSchema: z.ZodObject<{
1791
1816
  } & {
1792
1817
  state: z.ZodEnum<["ready", "missing", "downloading", "error", "not-applicable"]>;
1793
1818
  }, "strip", z.ZodTypeAny, {
1794
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1819
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1795
1820
  message?: string | undefined;
1796
1821
  error?: string | undefined;
1797
1822
  progress?: number | undefined;
1798
1823
  }, {
1799
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1824
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1800
1825
  message?: string | undefined;
1801
1826
  error?: string | undefined;
1802
1827
  progress?: number | undefined;
@@ -1849,12 +1874,12 @@ declare const TranslationEngineLifecycleStatusSchema: z.ZodObject<{
1849
1874
  } & {
1850
1875
  state: z.ZodEnum<["ready", "missing", "downloading", "error", "not-applicable"]>;
1851
1876
  }, "strip", z.ZodTypeAny, {
1852
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1877
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1853
1878
  message?: string | undefined;
1854
1879
  error?: string | undefined;
1855
1880
  progress?: number | undefined;
1856
1881
  }, {
1857
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1882
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1858
1883
  message?: string | undefined;
1859
1884
  error?: string | undefined;
1860
1885
  progress?: number | undefined;
@@ -1874,7 +1899,7 @@ declare const TranslationEngineLifecycleStatusSchema: z.ZodObject<{
1874
1899
  progress?: number | undefined;
1875
1900
  };
1876
1901
  assets: {
1877
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1902
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1878
1903
  message?: string | undefined;
1879
1904
  error?: string | undefined;
1880
1905
  progress?: number | undefined;
@@ -1894,7 +1919,7 @@ declare const TranslationEngineLifecycleStatusSchema: z.ZodObject<{
1894
1919
  progress?: number | undefined;
1895
1920
  };
1896
1921
  assets: {
1897
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
1922
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1898
1923
  message?: string | undefined;
1899
1924
  error?: string | undefined;
1900
1925
  progress?: number | undefined;
@@ -1920,11 +1945,11 @@ declare const TranslationEngineInstallLogEventSchema: z.ZodObject<{
1920
1945
  stream: z.ZodEnum<["stdout", "stderr"]>;
1921
1946
  text: z.ZodString;
1922
1947
  }, "strip", z.ZodTypeAny, {
1923
- text: string;
1924
1948
  stream: "stdout" | "stderr";
1925
- }, {
1926
1949
  text: string;
1950
+ }, {
1927
1951
  stream: "stdout" | "stderr";
1952
+ text: string;
1928
1953
  }>;
1929
1954
  interface TranslationEngineLifecycleStatusEvent {
1930
1955
  type: 'status';
@@ -1984,12 +2009,12 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
1984
2009
  } & {
1985
2010
  state: z.ZodEnum<["ready", "missing", "downloading", "error", "not-applicable"]>;
1986
2011
  }, "strip", z.ZodTypeAny, {
1987
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2012
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1988
2013
  message?: string | undefined;
1989
2014
  error?: string | undefined;
1990
2015
  progress?: number | undefined;
1991
2016
  }, {
1992
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2017
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
1993
2018
  message?: string | undefined;
1994
2019
  error?: string | undefined;
1995
2020
  progress?: number | undefined;
@@ -2009,7 +2034,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2009
2034
  progress?: number | undefined;
2010
2035
  };
2011
2036
  assets: {
2012
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2037
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2013
2038
  message?: string | undefined;
2014
2039
  error?: string | undefined;
2015
2040
  progress?: number | undefined;
@@ -2029,7 +2054,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2029
2054
  progress?: number | undefined;
2030
2055
  };
2031
2056
  assets: {
2032
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2057
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2033
2058
  message?: string | undefined;
2034
2059
  error?: string | undefined;
2035
2060
  progress?: number | undefined;
@@ -2052,7 +2077,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2052
2077
  progress?: number | undefined;
2053
2078
  };
2054
2079
  assets: {
2055
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2080
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2056
2081
  message?: string | undefined;
2057
2082
  error?: string | undefined;
2058
2083
  progress?: number | undefined;
@@ -2075,7 +2100,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2075
2100
  progress?: number | undefined;
2076
2101
  };
2077
2102
  assets: {
2078
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2103
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2079
2104
  message?: string | undefined;
2080
2105
  error?: string | undefined;
2081
2106
  progress?: number | undefined;
@@ -2088,12 +2113,12 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2088
2113
  text: z.ZodString;
2089
2114
  }, "strip", z.ZodTypeAny, {
2090
2115
  type: "log";
2091
- text: string;
2092
2116
  stream: "stdout" | "stderr";
2117
+ text: string;
2093
2118
  }, {
2094
2119
  type: "log";
2095
- text: string;
2096
2120
  stream: "stdout" | "stderr";
2121
+ text: string;
2097
2122
  }>, z.ZodObject<{
2098
2123
  type: z.ZodLiteral<"exit">;
2099
2124
  lifecycle: z.ZodObject<{
@@ -2138,12 +2163,12 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2138
2163
  } & {
2139
2164
  state: z.ZodEnum<["ready", "missing", "downloading", "error", "not-applicable"]>;
2140
2165
  }, "strip", z.ZodTypeAny, {
2141
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2166
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2142
2167
  message?: string | undefined;
2143
2168
  error?: string | undefined;
2144
2169
  progress?: number | undefined;
2145
2170
  }, {
2146
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2171
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2147
2172
  message?: string | undefined;
2148
2173
  error?: string | undefined;
2149
2174
  progress?: number | undefined;
@@ -2163,7 +2188,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2163
2188
  progress?: number | undefined;
2164
2189
  };
2165
2190
  assets: {
2166
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2191
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2167
2192
  message?: string | undefined;
2168
2193
  error?: string | undefined;
2169
2194
  progress?: number | undefined;
@@ -2183,7 +2208,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2183
2208
  progress?: number | undefined;
2184
2209
  };
2185
2210
  assets: {
2186
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2211
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2187
2212
  message?: string | undefined;
2188
2213
  error?: string | undefined;
2189
2214
  progress?: number | undefined;
@@ -2206,7 +2231,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2206
2231
  progress?: number | undefined;
2207
2232
  };
2208
2233
  assets: {
2209
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2234
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2210
2235
  message?: string | undefined;
2211
2236
  error?: string | undefined;
2212
2237
  progress?: number | undefined;
@@ -2229,7 +2254,7 @@ declare const TranslationEngineLifecycleEventSchema: z.ZodDiscriminatedUnion<"ty
2229
2254
  progress?: number | undefined;
2230
2255
  };
2231
2256
  assets: {
2232
- state: "error" | "downloading" | "ready" | "missing" | "not-applicable";
2257
+ state: "downloading" | "error" | "ready" | "missing" | "not-applicable";
2233
2258
  message?: string | undefined;
2234
2259
  error?: string | undefined;
2235
2260
  progress?: number | undefined;
@@ -2355,155 +2380,358 @@ declare const TranslationOpenAISettingsSchema: z.ZodObject<{
2355
2380
  token: z.ZodDefault<z.ZodString>;
2356
2381
  model: z.ZodDefault<z.ZodString>;
2357
2382
  }, "strip", z.ZodTypeAny, {
2383
+ model: string;
2358
2384
  baseUrl: string;
2359
2385
  token: string;
2360
- model: string;
2361
2386
  }, {
2387
+ model?: string | undefined;
2388
+ baseUrl?: string | undefined;
2389
+ token?: string | undefined;
2390
+ }>;
2391
+ declare const TranslationOpenAISettingsUpdateSchema: z.ZodObject<{
2392
+ baseUrl: z.ZodOptional<z.ZodString>;
2393
+ token: z.ZodOptional<z.ZodString>;
2394
+ model: z.ZodOptional<z.ZodString>;
2395
+ }, "strip", z.ZodTypeAny, {
2396
+ model?: string | undefined;
2362
2397
  baseUrl?: string | undefined;
2363
2398
  token?: string | undefined;
2399
+ }, {
2364
2400
  model?: string | undefined;
2401
+ baseUrl?: string | undefined;
2402
+ token?: string | undefined;
2365
2403
  }>;
2366
2404
  type TranslationOpenAISettings = z.infer<typeof TranslationOpenAISettingsSchema>;
2367
2405
  declare const TranslationLocalSettingsSchema: z.ZodObject<{
2368
2406
  model: z.ZodDefault<z.ZodString>;
2369
2407
  selectedGroupId: z.ZodOptional<z.ZodString>;
2370
2408
  hfEndpoint: z.ZodDefault<z.ZodString>;
2409
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2371
2410
  }, "strip", z.ZodTypeAny, {
2372
2411
  model: string;
2373
2412
  hfEndpoint: string;
2413
+ memoryBudgetPercent: number;
2374
2414
  selectedGroupId?: string | undefined;
2375
2415
  }, {
2416
+ model?: string | undefined;
2376
2417
  selectedGroupId?: string | undefined;
2418
+ hfEndpoint?: string | undefined;
2419
+ memoryBudgetPercent?: number | undefined;
2420
+ }>;
2421
+ declare const TranslationLocalSettingsUpdateSchema: z.ZodObject<{
2422
+ model: z.ZodOptional<z.ZodString>;
2423
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2424
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2425
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2426
+ }, "strip", z.ZodTypeAny, {
2377
2427
  model?: string | undefined;
2428
+ selectedGroupId?: string | null | undefined;
2378
2429
  hfEndpoint?: string | undefined;
2430
+ memoryBudgetPercent?: number | undefined;
2431
+ }, {
2432
+ model?: string | undefined;
2433
+ selectedGroupId?: string | null | undefined;
2434
+ hfEndpoint?: string | undefined;
2435
+ memoryBudgetPercent?: number | undefined;
2379
2436
  }>;
2380
2437
  type TranslationLocalSettings = z.infer<typeof TranslationLocalSettingsSchema>;
2381
2438
  declare const TranslationLocalCt2SettingsSchema: z.ZodObject<{
2382
2439
  model: z.ZodDefault<z.ZodString>;
2383
2440
  selectedGroupId: z.ZodOptional<z.ZodString>;
2384
2441
  hfEndpoint: z.ZodDefault<z.ZodString>;
2442
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2385
2443
  }, "strip", z.ZodTypeAny, {
2386
2444
  model: string;
2387
2445
  hfEndpoint: string;
2446
+ memoryBudgetPercent: number;
2388
2447
  selectedGroupId?: string | undefined;
2389
2448
  }, {
2449
+ model?: string | undefined;
2390
2450
  selectedGroupId?: string | undefined;
2451
+ hfEndpoint?: string | undefined;
2452
+ memoryBudgetPercent?: number | undefined;
2453
+ }>;
2454
+ declare const TranslationLocalCt2SettingsUpdateSchema: z.ZodObject<{
2455
+ model: z.ZodOptional<z.ZodString>;
2456
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2457
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2458
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2459
+ }, "strip", z.ZodTypeAny, {
2391
2460
  model?: string | undefined;
2461
+ selectedGroupId?: string | null | undefined;
2392
2462
  hfEndpoint?: string | undefined;
2463
+ memoryBudgetPercent?: number | undefined;
2464
+ }, {
2465
+ model?: string | undefined;
2466
+ selectedGroupId?: string | null | undefined;
2467
+ hfEndpoint?: string | undefined;
2468
+ memoryBudgetPercent?: number | undefined;
2393
2469
  }>;
2394
2470
  type TranslationLocalCt2Settings = z.infer<typeof TranslationLocalCt2SettingsSchema>;
2395
2471
  declare const TranslationLocalLlamaSettingsSchema: z.ZodObject<{
2396
2472
  model: z.ZodDefault<z.ZodString>;
2397
2473
  selectedGroupId: z.ZodOptional<z.ZodString>;
2398
2474
  hfEndpoint: z.ZodDefault<z.ZodString>;
2475
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2399
2476
  }, "strip", z.ZodTypeAny, {
2400
2477
  model: string;
2401
2478
  hfEndpoint: string;
2479
+ memoryBudgetPercent: number;
2402
2480
  selectedGroupId?: string | undefined;
2403
2481
  }, {
2482
+ model?: string | undefined;
2404
2483
  selectedGroupId?: string | undefined;
2484
+ hfEndpoint?: string | undefined;
2485
+ memoryBudgetPercent?: number | undefined;
2486
+ }>;
2487
+ declare const TranslationLocalLlamaSettingsUpdateSchema: z.ZodObject<{
2488
+ model: z.ZodOptional<z.ZodString>;
2489
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2490
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2491
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2492
+ }, "strip", z.ZodTypeAny, {
2405
2493
  model?: string | undefined;
2494
+ selectedGroupId?: string | null | undefined;
2406
2495
  hfEndpoint?: string | undefined;
2496
+ memoryBudgetPercent?: number | undefined;
2497
+ }, {
2498
+ model?: string | undefined;
2499
+ selectedGroupId?: string | null | undefined;
2500
+ hfEndpoint?: string | undefined;
2501
+ memoryBudgetPercent?: number | undefined;
2407
2502
  }>;
2408
2503
  type TranslationLocalLlamaSettings = z.infer<typeof TranslationLocalLlamaSettingsSchema>;
2409
2504
  declare const TranslationEngineGlobalSettingsSchema: z.ZodObject<{
2505
+ engineId: z.ZodDefault<z.ZodEnum<["browser", "local", "local-ct2", "local-llama", "openai"]>>;
2410
2506
  openai: z.ZodDefault<z.ZodObject<{
2411
2507
  baseUrl: z.ZodDefault<z.ZodString>;
2412
2508
  token: z.ZodDefault<z.ZodString>;
2413
2509
  model: z.ZodDefault<z.ZodString>;
2414
2510
  }, "strip", z.ZodTypeAny, {
2511
+ model: string;
2415
2512
  baseUrl: string;
2416
2513
  token: string;
2417
- model: string;
2418
2514
  }, {
2515
+ model?: string | undefined;
2419
2516
  baseUrl?: string | undefined;
2420
2517
  token?: string | undefined;
2421
- model?: string | undefined;
2422
2518
  }>>;
2423
2519
  local: z.ZodDefault<z.ZodObject<{
2424
2520
  model: z.ZodDefault<z.ZodString>;
2425
2521
  selectedGroupId: z.ZodOptional<z.ZodString>;
2426
2522
  hfEndpoint: z.ZodDefault<z.ZodString>;
2523
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2427
2524
  }, "strip", z.ZodTypeAny, {
2428
2525
  model: string;
2429
2526
  hfEndpoint: string;
2527
+ memoryBudgetPercent: number;
2430
2528
  selectedGroupId?: string | undefined;
2431
2529
  }, {
2432
- selectedGroupId?: string | undefined;
2433
2530
  model?: string | undefined;
2531
+ selectedGroupId?: string | undefined;
2434
2532
  hfEndpoint?: string | undefined;
2533
+ memoryBudgetPercent?: number | undefined;
2435
2534
  }>>;
2436
2535
  localCt2: z.ZodDefault<z.ZodObject<{
2437
2536
  model: z.ZodDefault<z.ZodString>;
2438
2537
  selectedGroupId: z.ZodOptional<z.ZodString>;
2439
2538
  hfEndpoint: z.ZodDefault<z.ZodString>;
2539
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2440
2540
  }, "strip", z.ZodTypeAny, {
2441
2541
  model: string;
2442
2542
  hfEndpoint: string;
2543
+ memoryBudgetPercent: number;
2443
2544
  selectedGroupId?: string | undefined;
2444
2545
  }, {
2445
- selectedGroupId?: string | undefined;
2446
2546
  model?: string | undefined;
2547
+ selectedGroupId?: string | undefined;
2447
2548
  hfEndpoint?: string | undefined;
2549
+ memoryBudgetPercent?: number | undefined;
2448
2550
  }>>;
2449
2551
  localLlama: z.ZodDefault<z.ZodObject<{
2450
2552
  model: z.ZodDefault<z.ZodString>;
2451
2553
  selectedGroupId: z.ZodOptional<z.ZodString>;
2452
2554
  hfEndpoint: z.ZodDefault<z.ZodString>;
2555
+ memoryBudgetPercent: z.ZodDefault<z.ZodNumber>;
2453
2556
  }, "strip", z.ZodTypeAny, {
2454
2557
  model: string;
2455
2558
  hfEndpoint: string;
2559
+ memoryBudgetPercent: number;
2456
2560
  selectedGroupId?: string | undefined;
2457
2561
  }, {
2458
- selectedGroupId?: string | undefined;
2459
2562
  model?: string | undefined;
2563
+ selectedGroupId?: string | undefined;
2460
2564
  hfEndpoint?: string | undefined;
2565
+ memoryBudgetPercent?: number | undefined;
2461
2566
  }>>;
2462
2567
  }, "strip", z.ZodTypeAny, {
2463
2568
  local: {
2464
2569
  model: string;
2465
2570
  hfEndpoint: string;
2571
+ memoryBudgetPercent: number;
2466
2572
  selectedGroupId?: string | undefined;
2467
2573
  };
2468
- openai: {
2469
- baseUrl: string;
2470
- token: string;
2471
- model: string;
2472
- };
2473
2574
  localCt2: {
2474
2575
  model: string;
2475
2576
  hfEndpoint: string;
2577
+ memoryBudgetPercent: number;
2476
2578
  selectedGroupId?: string | undefined;
2477
2579
  };
2478
2580
  localLlama: {
2479
2581
  model: string;
2480
2582
  hfEndpoint: string;
2583
+ memoryBudgetPercent: number;
2481
2584
  selectedGroupId?: string | undefined;
2482
2585
  };
2586
+ openai: {
2587
+ model: string;
2588
+ baseUrl: string;
2589
+ token: string;
2590
+ };
2591
+ engineId: "local" | "openai" | "browser" | "local-ct2" | "local-llama";
2483
2592
  }, {
2484
2593
  local?: {
2594
+ model?: string | undefined;
2595
+ selectedGroupId?: string | undefined;
2596
+ hfEndpoint?: string | undefined;
2597
+ memoryBudgetPercent?: number | undefined;
2598
+ } | undefined;
2599
+ localCt2?: {
2600
+ model?: string | undefined;
2485
2601
  selectedGroupId?: string | undefined;
2602
+ hfEndpoint?: string | undefined;
2603
+ memoryBudgetPercent?: number | undefined;
2604
+ } | undefined;
2605
+ localLlama?: {
2486
2606
  model?: string | undefined;
2607
+ selectedGroupId?: string | undefined;
2487
2608
  hfEndpoint?: string | undefined;
2609
+ memoryBudgetPercent?: number | undefined;
2488
2610
  } | undefined;
2489
2611
  openai?: {
2612
+ model?: string | undefined;
2490
2613
  baseUrl?: string | undefined;
2491
2614
  token?: string | undefined;
2615
+ } | undefined;
2616
+ engineId?: "local" | "openai" | "browser" | "local-ct2" | "local-llama" | undefined;
2617
+ }>;
2618
+ declare const TranslationEngineGlobalSettingsUpdateSchema: z.ZodObject<{
2619
+ engineId: z.ZodOptional<z.ZodEnum<["browser", "local", "local-ct2", "local-llama", "openai"]>>;
2620
+ openai: z.ZodOptional<z.ZodObject<{
2621
+ baseUrl: z.ZodOptional<z.ZodString>;
2622
+ token: z.ZodOptional<z.ZodString>;
2623
+ model: z.ZodOptional<z.ZodString>;
2624
+ }, "strip", z.ZodTypeAny, {
2625
+ model?: string | undefined;
2626
+ baseUrl?: string | undefined;
2627
+ token?: string | undefined;
2628
+ }, {
2492
2629
  model?: string | undefined;
2630
+ baseUrl?: string | undefined;
2631
+ token?: string | undefined;
2632
+ }>>;
2633
+ local: z.ZodOptional<z.ZodObject<{
2634
+ model: z.ZodOptional<z.ZodString>;
2635
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2636
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2637
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2638
+ }, "strip", z.ZodTypeAny, {
2639
+ model?: string | undefined;
2640
+ selectedGroupId?: string | null | undefined;
2641
+ hfEndpoint?: string | undefined;
2642
+ memoryBudgetPercent?: number | undefined;
2643
+ }, {
2644
+ model?: string | undefined;
2645
+ selectedGroupId?: string | null | undefined;
2646
+ hfEndpoint?: string | undefined;
2647
+ memoryBudgetPercent?: number | undefined;
2648
+ }>>;
2649
+ localCt2: z.ZodOptional<z.ZodObject<{
2650
+ model: z.ZodOptional<z.ZodString>;
2651
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2652
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2653
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2654
+ }, "strip", z.ZodTypeAny, {
2655
+ model?: string | undefined;
2656
+ selectedGroupId?: string | null | undefined;
2657
+ hfEndpoint?: string | undefined;
2658
+ memoryBudgetPercent?: number | undefined;
2659
+ }, {
2660
+ model?: string | undefined;
2661
+ selectedGroupId?: string | null | undefined;
2662
+ hfEndpoint?: string | undefined;
2663
+ memoryBudgetPercent?: number | undefined;
2664
+ }>>;
2665
+ localLlama: z.ZodOptional<z.ZodObject<{
2666
+ model: z.ZodOptional<z.ZodString>;
2667
+ selectedGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2668
+ hfEndpoint: z.ZodOptional<z.ZodString>;
2669
+ memoryBudgetPercent: z.ZodOptional<z.ZodNumber>;
2670
+ }, "strip", z.ZodTypeAny, {
2671
+ model?: string | undefined;
2672
+ selectedGroupId?: string | null | undefined;
2673
+ hfEndpoint?: string | undefined;
2674
+ memoryBudgetPercent?: number | undefined;
2675
+ }, {
2676
+ model?: string | undefined;
2677
+ selectedGroupId?: string | null | undefined;
2678
+ hfEndpoint?: string | undefined;
2679
+ memoryBudgetPercent?: number | undefined;
2680
+ }>>;
2681
+ }, "strip", z.ZodTypeAny, {
2682
+ local?: {
2683
+ model?: string | undefined;
2684
+ selectedGroupId?: string | null | undefined;
2685
+ hfEndpoint?: string | undefined;
2686
+ memoryBudgetPercent?: number | undefined;
2493
2687
  } | undefined;
2494
2688
  localCt2?: {
2495
- selectedGroupId?: string | undefined;
2496
2689
  model?: string | undefined;
2690
+ selectedGroupId?: string | null | undefined;
2497
2691
  hfEndpoint?: string | undefined;
2692
+ memoryBudgetPercent?: number | undefined;
2498
2693
  } | undefined;
2499
2694
  localLlama?: {
2500
- selectedGroupId?: string | undefined;
2501
2695
  model?: string | undefined;
2696
+ selectedGroupId?: string | null | undefined;
2697
+ hfEndpoint?: string | undefined;
2698
+ memoryBudgetPercent?: number | undefined;
2699
+ } | undefined;
2700
+ openai?: {
2701
+ model?: string | undefined;
2702
+ baseUrl?: string | undefined;
2703
+ token?: string | undefined;
2704
+ } | undefined;
2705
+ engineId?: "local" | "openai" | "browser" | "local-ct2" | "local-llama" | undefined;
2706
+ }, {
2707
+ local?: {
2708
+ model?: string | undefined;
2709
+ selectedGroupId?: string | null | undefined;
2502
2710
  hfEndpoint?: string | undefined;
2711
+ memoryBudgetPercent?: number | undefined;
2712
+ } | undefined;
2713
+ localCt2?: {
2714
+ model?: string | undefined;
2715
+ selectedGroupId?: string | null | undefined;
2716
+ hfEndpoint?: string | undefined;
2717
+ memoryBudgetPercent?: number | undefined;
2718
+ } | undefined;
2719
+ localLlama?: {
2720
+ model?: string | undefined;
2721
+ selectedGroupId?: string | null | undefined;
2722
+ hfEndpoint?: string | undefined;
2723
+ memoryBudgetPercent?: number | undefined;
2724
+ } | undefined;
2725
+ openai?: {
2726
+ model?: string | undefined;
2727
+ baseUrl?: string | undefined;
2728
+ token?: string | undefined;
2503
2729
  } | undefined;
2730
+ engineId?: "local" | "openai" | "browser" | "local-ct2" | "local-llama" | undefined;
2504
2731
  }>;
2505
2732
  type TranslationEngineGlobalSettings = z.infer<typeof TranslationEngineGlobalSettingsSchema>;
2506
2733
  type TranslationEngineGlobalSettingsUpdate = {
2734
+ engineId?: TranslationEngineId;
2507
2735
  openai?: Partial<TranslationOpenAISettings>;
2508
2736
  local?: Partial<Omit<TranslationLocalSettings, 'selectedGroupId'>> & {
2509
2737
  selectedGroupId?: TranslationLocalSettings['selectedGroupId'] | null;
@@ -2524,36 +2752,57 @@ declare const BatchTranslateInputSchema: z.ZodObject<{
2524
2752
  inputs: z.ZodArray<z.ZodString, "many">;
2525
2753
  instructions: z.ZodOptional<z.ZodString>;
2526
2754
  context: z.ZodOptional<z.ZodString>;
2755
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
2527
2756
  }, "strip", z.ZodTypeAny, {
2528
- engineId: "browser" | "local" | "local-ct2" | "local-llama" | "openai";
2529
- sourceLanguage: string;
2530
2757
  targetLanguage: string;
2758
+ engineId: "local" | "openai" | "browser" | "local-ct2" | "local-llama";
2759
+ sourceLanguage: string;
2531
2760
  inputs: string[];
2532
- selectedGroupId?: string | undefined;
2761
+ timeoutMs: number;
2533
2762
  model?: string | undefined;
2763
+ selectedGroupId?: string | undefined;
2534
2764
  instructions?: string | undefined;
2535
2765
  context?: string | undefined;
2536
2766
  }, {
2537
- engineId: "browser" | "local" | "local-ct2" | "local-llama" | "openai";
2538
- sourceLanguage: string;
2539
2767
  targetLanguage: string;
2768
+ engineId: "local" | "openai" | "browser" | "local-ct2" | "local-llama";
2769
+ sourceLanguage: string;
2540
2770
  inputs: string[];
2541
- selectedGroupId?: string | undefined;
2542
2771
  model?: string | undefined;
2772
+ selectedGroupId?: string | undefined;
2543
2773
  instructions?: string | undefined;
2544
2774
  context?: string | undefined;
2775
+ timeoutMs?: number | undefined;
2545
2776
  }>;
2546
2777
  type BatchTranslateInput = z.infer<typeof BatchTranslateInputSchema>;
2547
2778
  declare const BatchTranslateEventSchema: z.ZodObject<{
2548
2779
  index: z.ZodNumber;
2549
- output: z.ZodString;
2780
+ output: z.ZodOptional<z.ZodString>;
2781
+ error: z.ZodOptional<z.ZodObject<{
2782
+ kind: z.ZodEnum<["timeout", "memory-limit", "runtime", "abort"]>;
2783
+ message: z.ZodString;
2784
+ }, "strip", z.ZodTypeAny, {
2785
+ message: string;
2786
+ kind: "runtime" | "timeout" | "memory-limit" | "abort";
2787
+ }, {
2788
+ message: string;
2789
+ kind: "runtime" | "timeout" | "memory-limit" | "abort";
2790
+ }>>;
2550
2791
  }, "strip", z.ZodTypeAny, {
2551
2792
  index: number;
2552
- output: string;
2793
+ error?: {
2794
+ message: string;
2795
+ kind: "runtime" | "timeout" | "memory-limit" | "abort";
2796
+ } | undefined;
2797
+ output?: string | undefined;
2553
2798
  }, {
2554
2799
  index: number;
2555
- output: string;
2800
+ error?: {
2801
+ message: string;
2802
+ kind: "runtime" | "timeout" | "memory-limit" | "abort";
2803
+ } | undefined;
2804
+ output?: string | undefined;
2556
2805
  }>;
2557
2806
  type BatchTranslateEvent = z.infer<typeof BatchTranslateEventSchema>;
2558
2807
  //#endregion
2559
- export { TranslationEngineDependencyStatusSchema as $, isTranslationEngineDependencyReady as $t, LocalModelProfileManifestSchema as A, TranslationLocalSettings as At, TRANSLATION_ENGINE_MANIFESTS as B, Translator as Bt, LocalModelProfileLoadState as C, TranslationEngineRuntimeStatus as Ct, LocalModelProfileManifestFileSchema as D, TranslationLocalCt2SettingsSchema as Dt, LocalModelProfileManifestFile as E, TranslationLocalCt2Settings as Et, ManagedLocalTranslationEngineId as F, TranslationModelSearchInput as Ft, TranslationDownloadGroupPlanSchema as G, TranslatorOptions as Gt, TranslationDownloadFilePlan as H, TranslatorFactory as Ht, SERVICE_TRANSLATION_ENGINE_IDS as I, TranslationModelSearchPhase as It, TranslationEngineAssetStatus as J, getManagedLocalTranslationEngineManifest as Jt, TranslationEngineAssetState as K, TranslatorPrepareMonitor as Kt, ServiceTranslationEngineId as L, TranslationModelSearchResult as Lt, LocalModelProfileStatusSchema as M, TranslationModelCandidate as Mt, ManagedLocalCatalogSource as N, TranslationModelDownloadPlan as Nt, LocalModelProfileManifestGroup as O, TranslationLocalLlamaSettings as Ot, ManagedLocalCatalogSourceSchema as P, TranslationModelSearchEvent as Pt, TranslationEngineDependencyStatus as Q, isManagedLocalTranslationEngineId as Qt, ServiceTranslationEngineIdSchema as R, TranslationOpenAISettings as Rt, LocalModelLifecycleGroupStateSchema as S, TranslationEngineRuntimeStateSchema as St, LocalModelProfileManifest as T, TranslationEngineSettingsKey as Tt, TranslationDownloadFilePlanSchema as U, TranslatorFactoryCreateOptions as Ut, TRANSLATOR_CONTRACT_VERSION as V, TranslatorCreateMonitor as Vt, TranslationDownloadGroupPlan as W, TranslatorFactoryPrepareOptions as Wt, TranslationEngineDependencyState as X, getTranslationEngineManifest as Xt, TranslationEngineAssetStatusSchema as Y, getTranslationEngineLifecycleMessage as Yt, TranslationEngineDependencyStateSchema as Z, isDirectionalManagedLocalTranslationEngineId as Zt, LocalModelDownloadStatus as _, TranslationEngineLifecycleStatusEvent as _t, BatchTranslationResult as a, TranslationEngineInstallLogEvent as at, LocalModelLifecycleFileStateSchema as b, TranslationEngineRuntime as bt, LocalModelAssetLogSchema as c, TranslationEngineInstallLogStreamSchema as ct, LocalModelAssetState as d, TranslationEngineLifecycleController as dt, isTranslationEngineRuntimeReady as en, TranslationEngineGlobalSettings as et, LocalModelAssetStateSchema as f, TranslationEngineLifecycleEvent as ft, LocalModelCatalogSearchEvent as g, TranslationEngineLifecycleStatus as gt, LocalModelCatalogResult as h, TranslationEngineLifecycleLogEvent as ht, BatchTranslateInputSchema as i, TranslationEngineIdSchema as it, LocalModelProfileStatus as j, TranslationLocalSettingsSchema as jt, LocalModelProfileManifestGroupSchema as k, TranslationLocalLlamaSettingsSchema as kt, LocalModelAssetPlanSnapshot as l, TranslationEngineKind as lt, LocalModelCatalogLocalResult as m, TranslationEngineLifecycleExitEvent as mt, BatchTranslateEventSchema as n, TranslationEngineGlobalSettingsUpdate as nt, DEFAULT_TRANSLATION_ENGINE_ID as o, TranslationEngineInstallLogEventSchema as ot, LocalModelCatalogItem as p, TranslationEngineLifecycleEventSchema as pt, TranslationEngineAssetStateSchema as q, createTranslationEngineLifecycleStatus as qt, BatchTranslateInput as r, TranslationEngineId as rt, LocalModelAssetLog as s, TranslationEngineInstallLogStream as st, BatchTranslateEvent as t, shouldShowTranslationEngineInstallGate as tn, TranslationEngineGlobalSettingsSchema as tt, LocalModelAssetPlanSnapshotSchema as u, TranslationEngineLifecycleContext as ut, LocalModelDownloadStatusSchema as v, TranslationEngineLifecycleStatusSchema as vt, LocalModelProfileLoadStateSchema as w, TranslationEngineRuntimeStatusSchema as wt, LocalModelLifecycleGroupState as x, TranslationEngineRuntimeState as xt, LocalModelLifecycleFileState as y, TranslationEngineManifest as yt, TRANSLATION_ENGINE_IDS as z, TranslationOpenAISettingsSchema as zt };
2808
+ export { TranslationEngineDependencyStatus as $, createTranslationEngineLifecycleStatus as $t, LocalModelProfileManifestGroupSchema as A, TranslationLocalCt2SettingsUpdateSchema as At, TRANSLATION_ENGINE_IDS as B, TranslationModelSearchInput as Bt, LocalModelLifecycleGroupStateSchema as C, TranslationEngineRuntimeState as Ct, LocalModelProfileManifestFile as D, TranslationEngineSettingsKey as Dt, LocalModelProfileManifest as E, TranslationEngineRuntimeStatusSchema as Et, ManagedLocalCatalogSourceSchema as F, TranslationLocalSettingsSchema as Ft, TranslationDownloadGroupPlan as G, TranslationOpenAISettingsUpdateSchema as Gt, TRANSLATOR_CONTRACT_VERSION as H, TranslationModelSearchResult as Ht, ManagedLocalTranslationEngineId as I, TranslationLocalSettingsUpdateSchema as It, TranslationEngineAssetStateSchema as J, TranslatorFactory as Jt, TranslationDownloadGroupPlanSchema as K, Translator as Kt, SERVICE_TRANSLATION_ENGINE_IDS as L, TranslationModelCandidate as Lt, LocalModelProfileStatus as M, TranslationLocalLlamaSettingsSchema as Mt, LocalModelProfileStatusSchema as N, TranslationLocalLlamaSettingsUpdateSchema as Nt, LocalModelProfileManifestFileSchema as O, TranslationLocalCt2Settings as Ot, ManagedLocalCatalogSource as P, TranslationLocalSettings as Pt, TranslationEngineDependencyStateSchema as Q, TranslatorPrepareMonitor as Qt, ServiceTranslationEngineId as R, TranslationModelDownloadPlan as Rt, LocalModelLifecycleGroupState as S, TranslationEngineRuntime as St, LocalModelProfileLoadStateSchema as T, TranslationEngineRuntimeStatus as Tt, TranslationDownloadFilePlan as U, TranslationOpenAISettings as Ut, TRANSLATION_ENGINE_MANIFESTS as V, TranslationModelSearchPhase as Vt, TranslationDownloadFilePlanSchema as W, TranslationOpenAISettingsSchema as Wt, TranslationEngineAssetStatusSchema as X, TranslatorFactoryPrepareOptions as Xt, TranslationEngineAssetStatus as Y, TranslatorFactoryCreateOptions as Yt, TranslationEngineDependencyState as Z, TranslatorOptions as Zt, LocalModelCatalogSearchEvent as _, TranslationEngineLifecycleLogEvent as _t, BatchTranslationResult as a, isTranslationEngineDependencyReady as an, TranslationEngineId as at, LocalModelLifecycleFileState as b, TranslationEngineLifecycleStatusSchema as bt, LocalModelAssetLog as c, BatchTranslationError as cn, TranslationEngineInstallLogEventSchema as ct, LocalModelAssetPlanSnapshotSchema as d, normalizeBatchTranslationError as dn, TranslationEngineKind as dt, getManagedLocalTranslationEngineManifest as en, TranslationEngineDependencyStatusSchema as et, LocalModelAssetState as f, runControlledTranslationTask as fn, TranslationEngineLifecycleContext as ft, LocalModelCatalogResult as g, TranslationEngineLifecycleExitEvent as gt, LocalModelCatalogLocalResult as h, TranslationEngineLifecycleEventSchema as ht, BatchTranslateInputSchema as i, isManagedLocalTranslationEngineId as in, TranslationEngineGlobalSettingsUpdateSchema as it, LocalModelProfileManifestSchema as j, TranslationLocalLlamaSettings as jt, LocalModelProfileManifestGroup as k, TranslationLocalCt2SettingsSchema as kt, LocalModelAssetLogSchema as l, BatchTranslationErrorKind as ln, TranslationEngineInstallLogStream as lt, LocalModelCatalogItem as m, TranslationEngineLifecycleEvent as mt, BatchTranslateEventSchema as n, getTranslationEngineManifest as nn, TranslationEngineGlobalSettingsSchema as nt, DEFAULT_BATCH_TRANSLATION_TIMEOUT_MS as o, isTranslationEngineRuntimeReady as on, TranslationEngineIdSchema as ot, LocalModelAssetStateSchema as p, TranslationEngineLifecycleController as pt, TranslationEngineAssetState as q, TranslatorCreateMonitor as qt, BatchTranslateInput as r, isDirectionalManagedLocalTranslationEngineId as rn, TranslationEngineGlobalSettingsUpdate as rt, DEFAULT_TRANSLATION_ENGINE_ID as s, shouldShowTranslationEngineInstallGate as sn, TranslationEngineInstallLogEvent as st, BatchTranslateEvent as t, getTranslationEngineLifecycleMessage as tn, TranslationEngineGlobalSettings as tt, LocalModelAssetPlanSnapshot as u, isBatchTranslationAbort as un, TranslationEngineInstallLogStreamSchema as ut, LocalModelDownloadStatus as v, TranslationEngineLifecycleStatus as vt, LocalModelProfileLoadState as w, TranslationEngineRuntimeStateSchema as wt, LocalModelLifecycleFileStateSchema as x, TranslationEngineManifest as xt, LocalModelDownloadStatusSchema as y, TranslationEngineLifecycleStatusEvent as yt, ServiceTranslationEngineIdSchema as z, TranslationModelSearchEvent as zt };