@openspecui/core 3.10.0 → 3.11.1

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 (76) hide show
  1. package/dist/{document-translation-BZ5QKjN0.d.mts → document-translation-AlZtjOt5.d.mts} +10 -7
  2. package/dist/{document-translation-BrE402YR.mjs → document-translation-Dnl1lz2K.mjs} +1 -1
  3. package/dist/document-translation.d.mts +2 -2
  4. package/dist/document-translation.mjs +2 -2
  5. package/dist/hosted-app.d.mts +1 -1
  6. package/dist/hosted-app.mjs +1 -1
  7. package/dist/index.d.mts +47 -37
  8. package/dist/index.mjs +240 -59
  9. package/dist/{local-download-profiles-BppI_PAq.mjs → local-download-profiles-CNDtMG2s.mjs} +7 -3
  10. package/dist/{local-download-profiles-Qu1932tV.d.mts → local-download-profiles-DISrU0mw.d.mts} +5 -1
  11. package/dist/local-download-profiles.d.mts +2 -2
  12. package/dist/local-download-profiles.mjs +1 -1
  13. package/dist/markdown-facts.d.mts +1 -1
  14. package/dist/markdown-facts.mjs +1 -1
  15. package/dist/{markdown-reading-DvLPaaY1.d.mts → markdown-reading-BaHZTf5f.d.mts} +1 -1
  16. package/dist/{markdown-reading-DYBp7qoI.mjs → markdown-reading-DSlcirYV.mjs} +1 -1
  17. package/dist/markdown-reading.d.mts +2 -2
  18. package/dist/markdown-reading.mjs +2 -2
  19. package/dist/{notifications-9vbSJQ8N.mjs → notifications-Xs9VPFWD.mjs} +2 -2
  20. package/dist/{notifications-D7tcKw71.d.mts → notifications-gGjGaYsF.d.mts} +9 -9
  21. package/dist/notifications.d.mts +2 -2
  22. package/dist/notifications.mjs +3 -3
  23. package/dist/{openspec-annotations-DVbFBz5J.d.mts → openspec-annotations-DYyP_HQh.d.mts} +2 -2
  24. package/dist/{openspec-annotations-BxBoWlyv.mjs → openspec-annotations-dNJentSE.mjs} +2 -2
  25. package/dist/openspec-annotations.d.mts +3 -3
  26. package/dist/openspec-annotations.mjs +3 -3
  27. package/dist/{openspec-projection-Bby9mX80.d.mts → openspec-projection-BojcJ9zl.d.mts} +3 -3
  28. package/dist/{openspec-projection-Cd6oydiK.mjs → openspec-projection-yqwKIKnp.mjs} +2 -2
  29. package/dist/openspec-projection.d.mts +5 -5
  30. package/dist/openspec-projection.mjs +4 -4
  31. package/dist/opsx-display-path.d.mts +1 -1
  32. package/dist/opsx-display-path.mjs +1 -1
  33. package/dist/{opsx-entity-DUJvjvrv.d.mts → opsx-entity-BdyGTVs_.d.mts} +19 -19
  34. package/dist/opsx-entity.d.mts +2 -2
  35. package/dist/opsx-entity.mjs +1 -1
  36. package/dist/{opsx-schema-detail-CUG4dYdw.d.mts → opsx-schema-detail-Cf8YIflR.d.mts} +1 -1
  37. package/dist/opsx-schema-detail.d.mts +3 -3
  38. package/dist/opsx-schema-detail.mjs +1 -1
  39. package/dist/{schemas-CqgvXgGV.d.mts → schemas-DV6yABO9.d.mts} +52 -44
  40. package/dist/{sounds-DABkmyg9.d.mts → sounds-C906qHTJ.d.mts} +5 -5
  41. package/dist/sounds.d.mts +1 -1
  42. package/dist/sounds.mjs +1 -1
  43. package/dist/{terminal-audio-DVz0HA2H.mjs → terminal-audio-CUs0sqEO.mjs} +1 -1
  44. package/dist/{terminal-audio-CDyXOIWx.d.mts → terminal-audio-D6dE8O1_.d.mts} +2 -2
  45. package/dist/terminal-audio.d.mts +2 -2
  46. package/dist/terminal-audio.mjs +2 -2
  47. package/dist/terminal-control.d.mts +2 -2
  48. package/dist/terminal-control.mjs +1 -1
  49. package/dist/{terminal-invocation-BnsT7ae7.d.mts → terminal-invocation-Cz0vfgkw.d.mts} +39 -39
  50. package/dist/terminal-invocation.d.mts +1 -1
  51. package/dist/terminal-invocation.mjs +1 -1
  52. package/dist/terminal-theme.d.mts +1 -1
  53. package/dist/terminal-theme.mjs +1 -1
  54. package/dist/translation-language-pair-D6f5u70K.mjs +51 -0
  55. package/dist/translation-language-pair-DaSvW83F.d.mts +18 -0
  56. package/dist/translation-language-pair.d.mts +2 -0
  57. package/dist/translation-language-pair.mjs +3 -0
  58. package/dist/{translator-C3LT7PqW.mjs → translator-B0T5VL9k.mjs} +94 -2
  59. package/dist/translator-tTXEGRdz.d.mts +1884 -0
  60. package/dist/translator.d.mts +2 -2
  61. package/dist/translator.mjs +2 -2
  62. package/package.json +9 -3
  63. package/dist/translator-C3W7bTIN.d.mts +0 -780
  64. /package/dist/{hosted-app-CxpQvD1s.mjs → hosted-app-CNZhVLM_.mjs} +0 -0
  65. /package/dist/{hosted-app-FuxG4-qA.d.mts → hosted-app-CegGJlNp.d.mts} +0 -0
  66. /package/dist/{markdown-facts-B5RvYPKF.mjs → markdown-facts-DbE1F2LD.mjs} +0 -0
  67. /package/dist/{markdown-facts-DUsbNcjh.d.mts → markdown-facts-DempqdIX.d.mts} +0 -0
  68. /package/dist/{opsx-display-path-Bf89ZyM5.mjs → opsx-display-path-Cw-5MTRg.mjs} +0 -0
  69. /package/dist/{opsx-display-path-CbO6K0Qq.d.mts → opsx-display-path-Ky9qnntM.d.mts} +0 -0
  70. /package/dist/{opsx-entity-BR_6djiM.mjs → opsx-entity-C_51ZEuP.mjs} +0 -0
  71. /package/dist/{opsx-schema-detail-5Wv1oWLT.mjs → opsx-schema-detail-Bu415_NB.mjs} +0 -0
  72. /package/dist/{sounds-CB_gpY-y.mjs → sounds-50cYk5b0.mjs} +0 -0
  73. /package/dist/{terminal-control-CNcEd9Rl.mjs → terminal-control-CYZhk7FM.mjs} +0 -0
  74. /package/dist/{terminal-invocation-wUmtJMPl.mjs → terminal-invocation-IopdwXKL.mjs} +0 -0
  75. /package/dist/{terminal-theme-CHkfTDk4.mjs → terminal-theme-BquTqZIO.mjs} +0 -0
  76. /package/dist/{terminal-theme-x_vAHvok.d.mts → terminal-theme-CH-VSrAq.d.mts} +0 -0
@@ -1,780 +0,0 @@
1
- import { z } from "zod";
2
-
3
- //#region src/translator.d.ts
4
- declare const TRANSLATOR_CONTRACT_VERSION = 2;
5
- declare const TRANSLATION_ENGINE_IDS: readonly ["browser", "local", "openai"];
6
- declare const TranslationEngineIdSchema: z.ZodEnum<["browser", "local", "openai"]>;
7
- type TranslationEngineId = z.infer<typeof TranslationEngineIdSchema>;
8
- declare const DEFAULT_TRANSLATION_ENGINE_ID: TranslationEngineId;
9
- declare const SERVICE_TRANSLATION_ENGINE_IDS: readonly ["local", "openai"];
10
- declare const ServiceTranslationEngineIdSchema: z.ZodEnum<["local", "openai"]>;
11
- type ServiceTranslationEngineId = z.infer<typeof ServiceTranslationEngineIdSchema>;
12
- interface TranslatorOptions {
13
- instructions?: string;
14
- context?: string;
15
- signal?: AbortSignal;
16
- }
17
- interface BatchTranslationResult {
18
- index: number;
19
- output: string;
20
- }
21
- interface Translator {
22
- batchTranslate(inputs: string[], options?: TranslatorOptions): AsyncGenerator<BatchTranslationResult>;
23
- destroy?(): void;
24
- }
25
- interface TranslatorCreateMonitor {
26
- setStatus(input: {
27
- message: string;
28
- progress?: number;
29
- }): void;
30
- }
31
- interface TranslatorPrepareMonitor {
32
- setStatus(input: {
33
- message: string;
34
- progress?: number;
35
- }): void;
36
- }
37
- interface TranslationModelSearchInput {
38
- engineId: ServiceTranslationEngineId;
39
- requestId?: string;
40
- query?: string;
41
- sourceLanguage?: string;
42
- targetLanguage?: string;
43
- limit?: number;
44
- cursor?: string;
45
- }
46
- type TranslationModelSearchPhase = 'candidates' | 'enriched' | 'complete' | 'error';
47
- interface TranslationDownloadFilePlan {
48
- path: string;
49
- sizeBytes?: number;
50
- required: boolean;
51
- }
52
- interface TranslationDownloadGroupPlan {
53
- id: string;
54
- label: string;
55
- description?: string;
56
- profile?: string;
57
- dtype?: string;
58
- estimatedTotalBytes?: number;
59
- selectable: boolean;
60
- selected: boolean;
61
- files: TranslationDownloadFilePlan[];
62
- }
63
- interface TranslationModelDownloadPlan {
64
- modelId: string;
65
- estimatedTotalBytes?: number;
66
- files: TranslationDownloadFilePlan[];
67
- selectedGroupId?: string;
68
- groups?: TranslationDownloadGroupPlan[];
69
- }
70
- interface TranslationModelCandidate {
71
- id: string;
72
- label: string;
73
- summary: string;
74
- downloads: number;
75
- likes: number;
76
- trendingScore?: number;
77
- lastModified?: string;
78
- pipelineTag?: string;
79
- tags: string[];
80
- compatibility: {
81
- transformersJs: boolean;
82
- onnx: boolean;
83
- localRuntimeVerified: boolean;
84
- };
85
- size: {
86
- estimatedTotalBytes?: number;
87
- primaryBytes?: number;
88
- };
89
- downloadGroups?: TranslationDownloadGroupPlan[];
90
- languageMatch: {
91
- sourceMatched: boolean;
92
- targetMatched: boolean;
93
- directionalScore: number;
94
- };
95
- }
96
- interface TranslationModelSearchResult {
97
- items: TranslationModelCandidate[];
98
- nextCursor?: string;
99
- }
100
- interface TranslationModelSearchEvent {
101
- requestId: string;
102
- phase: TranslationModelSearchPhase;
103
- items?: TranslationModelCandidate[];
104
- nextCursor?: string;
105
- message?: string;
106
- }
107
- declare const LocalModelDownloadStatusSchema: z.ZodEnum<["not-downloaded", "queued", "downloading", "paused", "downloaded", "error", "deleting"]>;
108
- type LocalModelDownloadStatus = z.infer<typeof LocalModelDownloadStatusSchema>;
109
- declare const TranslationDownloadFilePlanSchema: z.ZodObject<{
110
- path: z.ZodString;
111
- sizeBytes: z.ZodOptional<z.ZodNumber>;
112
- required: z.ZodBoolean;
113
- }, "strip", z.ZodTypeAny, {
114
- path: string;
115
- required: boolean;
116
- sizeBytes?: number | undefined;
117
- }, {
118
- path: string;
119
- required: boolean;
120
- sizeBytes?: number | undefined;
121
- }>;
122
- declare const TranslationDownloadGroupPlanSchema: z.ZodObject<{
123
- id: z.ZodString;
124
- label: z.ZodString;
125
- description: z.ZodOptional<z.ZodString>;
126
- profile: z.ZodOptional<z.ZodString>;
127
- dtype: z.ZodOptional<z.ZodString>;
128
- estimatedTotalBytes: z.ZodOptional<z.ZodNumber>;
129
- selectable: z.ZodBoolean;
130
- selected: z.ZodBoolean;
131
- files: z.ZodArray<z.ZodObject<{
132
- path: z.ZodString;
133
- sizeBytes: z.ZodOptional<z.ZodNumber>;
134
- required: z.ZodBoolean;
135
- }, "strip", z.ZodTypeAny, {
136
- path: string;
137
- required: boolean;
138
- sizeBytes?: number | undefined;
139
- }, {
140
- path: string;
141
- required: boolean;
142
- sizeBytes?: number | undefined;
143
- }>, "many">;
144
- }, "strip", z.ZodTypeAny, {
145
- label: string;
146
- id: string;
147
- selectable: boolean;
148
- selected: boolean;
149
- files: {
150
- path: string;
151
- required: boolean;
152
- sizeBytes?: number | undefined;
153
- }[];
154
- description?: string | undefined;
155
- profile?: string | undefined;
156
- dtype?: string | undefined;
157
- estimatedTotalBytes?: number | undefined;
158
- }, {
159
- label: string;
160
- id: string;
161
- selectable: boolean;
162
- selected: boolean;
163
- files: {
164
- path: string;
165
- required: boolean;
166
- sizeBytes?: number | undefined;
167
- }[];
168
- description?: string | undefined;
169
- profile?: string | undefined;
170
- dtype?: string | undefined;
171
- estimatedTotalBytes?: number | undefined;
172
- }>;
173
- declare const LocalModelAssetLogSchema: z.ZodObject<{
174
- engineId: z.ZodLiteral<"local">;
175
- modelId: z.ZodString;
176
- selectedGroupId: z.ZodOptional<z.ZodString>;
177
- status: z.ZodEnum<["not-downloaded", "queued", "downloading", "paused", "downloaded", "error", "deleting"]>;
178
- message: z.ZodString;
179
- progress: z.ZodOptional<z.ZodNumber>;
180
- bytesDownloaded: z.ZodOptional<z.ZodNumber>;
181
- totalBytes: z.ZodOptional<z.ZodNumber>;
182
- sessionId: z.ZodOptional<z.ZodString>;
183
- resumable: z.ZodOptional<z.ZodBoolean>;
184
- files: z.ZodOptional<z.ZodArray<z.ZodObject<{
185
- path: z.ZodString;
186
- sizeBytes: z.ZodOptional<z.ZodNumber>;
187
- downloadedBytes: z.ZodOptional<z.ZodNumber>;
188
- }, "strip", z.ZodTypeAny, {
189
- path: string;
190
- sizeBytes?: number | undefined;
191
- downloadedBytes?: number | undefined;
192
- }, {
193
- path: string;
194
- sizeBytes?: number | undefined;
195
- downloadedBytes?: number | undefined;
196
- }>, "many">>;
197
- updatedAt: z.ZodNumber;
198
- }, "strip", z.ZodTypeAny, {
199
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
200
- message: string;
201
- engineId: "local";
202
- modelId: string;
203
- updatedAt: number;
204
- sessionId?: string | undefined;
205
- selectedGroupId?: string | undefined;
206
- files?: {
207
- path: string;
208
- sizeBytes?: number | undefined;
209
- downloadedBytes?: number | undefined;
210
- }[] | undefined;
211
- progress?: number | undefined;
212
- bytesDownloaded?: number | undefined;
213
- totalBytes?: number | undefined;
214
- resumable?: boolean | undefined;
215
- }, {
216
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
217
- message: string;
218
- engineId: "local";
219
- modelId: string;
220
- updatedAt: number;
221
- sessionId?: string | undefined;
222
- selectedGroupId?: string | undefined;
223
- files?: {
224
- path: string;
225
- sizeBytes?: number | undefined;
226
- downloadedBytes?: number | undefined;
227
- }[] | undefined;
228
- progress?: number | undefined;
229
- bytesDownloaded?: number | undefined;
230
- totalBytes?: number | undefined;
231
- resumable?: boolean | undefined;
232
- }>;
233
- type LocalModelAssetLog = z.infer<typeof LocalModelAssetLogSchema>;
234
- declare const LocalModelAssetPlanSnapshotSchema: z.ZodObject<{
235
- modelId: z.ZodString;
236
- estimatedTotalBytes: z.ZodOptional<z.ZodNumber>;
237
- files: z.ZodArray<z.ZodObject<{
238
- path: z.ZodString;
239
- sizeBytes: z.ZodOptional<z.ZodNumber>;
240
- required: z.ZodBoolean;
241
- }, "strip", z.ZodTypeAny, {
242
- path: string;
243
- required: boolean;
244
- sizeBytes?: number | undefined;
245
- }, {
246
- path: string;
247
- required: boolean;
248
- sizeBytes?: number | undefined;
249
- }>, "many">;
250
- profile: z.ZodOptional<z.ZodString>;
251
- selectedGroupId: z.ZodOptional<z.ZodString>;
252
- groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
253
- id: z.ZodString;
254
- label: z.ZodString;
255
- description: z.ZodOptional<z.ZodString>;
256
- profile: z.ZodOptional<z.ZodString>;
257
- dtype: z.ZodOptional<z.ZodString>;
258
- estimatedTotalBytes: z.ZodOptional<z.ZodNumber>;
259
- selectable: z.ZodBoolean;
260
- selected: z.ZodBoolean;
261
- files: z.ZodArray<z.ZodObject<{
262
- path: z.ZodString;
263
- sizeBytes: z.ZodOptional<z.ZodNumber>;
264
- required: z.ZodBoolean;
265
- }, "strip", z.ZodTypeAny, {
266
- path: string;
267
- required: boolean;
268
- sizeBytes?: number | undefined;
269
- }, {
270
- path: string;
271
- required: boolean;
272
- sizeBytes?: number | undefined;
273
- }>, "many">;
274
- }, "strip", z.ZodTypeAny, {
275
- label: string;
276
- id: string;
277
- selectable: boolean;
278
- selected: boolean;
279
- files: {
280
- path: string;
281
- required: boolean;
282
- sizeBytes?: number | undefined;
283
- }[];
284
- description?: string | undefined;
285
- profile?: string | undefined;
286
- dtype?: string | undefined;
287
- estimatedTotalBytes?: number | undefined;
288
- }, {
289
- label: string;
290
- id: string;
291
- selectable: boolean;
292
- selected: boolean;
293
- files: {
294
- path: string;
295
- required: boolean;
296
- sizeBytes?: number | undefined;
297
- }[];
298
- description?: string | undefined;
299
- profile?: string | undefined;
300
- dtype?: string | undefined;
301
- estimatedTotalBytes?: number | undefined;
302
- }>, "many">>;
303
- }, "strip", z.ZodTypeAny, {
304
- files: {
305
- path: string;
306
- required: boolean;
307
- sizeBytes?: number | undefined;
308
- }[];
309
- modelId: string;
310
- selectedGroupId?: string | undefined;
311
- profile?: string | undefined;
312
- estimatedTotalBytes?: number | undefined;
313
- groups?: {
314
- label: string;
315
- id: string;
316
- selectable: boolean;
317
- selected: boolean;
318
- files: {
319
- path: string;
320
- required: boolean;
321
- sizeBytes?: number | undefined;
322
- }[];
323
- description?: string | undefined;
324
- profile?: string | undefined;
325
- dtype?: string | undefined;
326
- estimatedTotalBytes?: number | undefined;
327
- }[] | undefined;
328
- }, {
329
- files: {
330
- path: string;
331
- required: boolean;
332
- sizeBytes?: number | undefined;
333
- }[];
334
- modelId: string;
335
- selectedGroupId?: string | undefined;
336
- profile?: string | undefined;
337
- estimatedTotalBytes?: number | undefined;
338
- groups?: {
339
- label: string;
340
- id: string;
341
- selectable: boolean;
342
- selected: boolean;
343
- files: {
344
- path: string;
345
- required: boolean;
346
- sizeBytes?: number | undefined;
347
- }[];
348
- description?: string | undefined;
349
- profile?: string | undefined;
350
- dtype?: string | undefined;
351
- estimatedTotalBytes?: number | undefined;
352
- }[] | undefined;
353
- }>;
354
- type LocalModelAssetPlanSnapshot = z.infer<typeof LocalModelAssetPlanSnapshotSchema>;
355
- declare const LocalModelAssetStateSchema: z.ZodObject<{
356
- modelId: z.ZodString;
357
- status: z.ZodDefault<z.ZodEnum<["not-downloaded", "queued", "downloading", "paused", "downloaded", "error", "deleting"]>>;
358
- selected: z.ZodDefault<z.ZodBoolean>;
359
- installedAt: z.ZodOptional<z.ZodNumber>;
360
- updatedAt: z.ZodOptional<z.ZodNumber>;
361
- bytesDownloaded: z.ZodOptional<z.ZodNumber>;
362
- totalBytes: z.ZodOptional<z.ZodNumber>;
363
- progress: z.ZodOptional<z.ZodNumber>;
364
- resumable: z.ZodDefault<z.ZodBoolean>;
365
- error: z.ZodOptional<z.ZodString>;
366
- plan: z.ZodOptional<z.ZodObject<{
367
- modelId: z.ZodString;
368
- estimatedTotalBytes: z.ZodOptional<z.ZodNumber>;
369
- files: z.ZodArray<z.ZodObject<{
370
- path: z.ZodString;
371
- sizeBytes: z.ZodOptional<z.ZodNumber>;
372
- required: z.ZodBoolean;
373
- }, "strip", z.ZodTypeAny, {
374
- path: string;
375
- required: boolean;
376
- sizeBytes?: number | undefined;
377
- }, {
378
- path: string;
379
- required: boolean;
380
- sizeBytes?: number | undefined;
381
- }>, "many">;
382
- profile: z.ZodOptional<z.ZodString>;
383
- selectedGroupId: z.ZodOptional<z.ZodString>;
384
- groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
385
- id: z.ZodString;
386
- label: z.ZodString;
387
- description: z.ZodOptional<z.ZodString>;
388
- profile: z.ZodOptional<z.ZodString>;
389
- dtype: z.ZodOptional<z.ZodString>;
390
- estimatedTotalBytes: z.ZodOptional<z.ZodNumber>;
391
- selectable: z.ZodBoolean;
392
- selected: z.ZodBoolean;
393
- files: z.ZodArray<z.ZodObject<{
394
- path: z.ZodString;
395
- sizeBytes: z.ZodOptional<z.ZodNumber>;
396
- required: z.ZodBoolean;
397
- }, "strip", z.ZodTypeAny, {
398
- path: string;
399
- required: boolean;
400
- sizeBytes?: number | undefined;
401
- }, {
402
- path: string;
403
- required: boolean;
404
- sizeBytes?: number | undefined;
405
- }>, "many">;
406
- }, "strip", z.ZodTypeAny, {
407
- label: string;
408
- id: string;
409
- selectable: boolean;
410
- selected: boolean;
411
- files: {
412
- path: string;
413
- required: boolean;
414
- sizeBytes?: number | undefined;
415
- }[];
416
- description?: string | undefined;
417
- profile?: string | undefined;
418
- dtype?: string | undefined;
419
- estimatedTotalBytes?: number | undefined;
420
- }, {
421
- label: string;
422
- id: string;
423
- selectable: boolean;
424
- selected: boolean;
425
- files: {
426
- path: string;
427
- required: boolean;
428
- sizeBytes?: number | undefined;
429
- }[];
430
- description?: string | undefined;
431
- profile?: string | undefined;
432
- dtype?: string | undefined;
433
- estimatedTotalBytes?: number | undefined;
434
- }>, "many">>;
435
- }, "strip", z.ZodTypeAny, {
436
- files: {
437
- path: string;
438
- required: boolean;
439
- sizeBytes?: number | undefined;
440
- }[];
441
- modelId: string;
442
- selectedGroupId?: string | undefined;
443
- profile?: string | undefined;
444
- estimatedTotalBytes?: number | undefined;
445
- groups?: {
446
- label: string;
447
- id: string;
448
- selectable: boolean;
449
- selected: boolean;
450
- files: {
451
- path: string;
452
- required: boolean;
453
- sizeBytes?: number | undefined;
454
- }[];
455
- description?: string | undefined;
456
- profile?: string | undefined;
457
- dtype?: string | undefined;
458
- estimatedTotalBytes?: number | undefined;
459
- }[] | undefined;
460
- }, {
461
- files: {
462
- path: string;
463
- required: boolean;
464
- sizeBytes?: number | undefined;
465
- }[];
466
- modelId: string;
467
- selectedGroupId?: string | undefined;
468
- profile?: string | undefined;
469
- estimatedTotalBytes?: number | undefined;
470
- groups?: {
471
- label: string;
472
- id: string;
473
- selectable: boolean;
474
- selected: boolean;
475
- files: {
476
- path: string;
477
- required: boolean;
478
- sizeBytes?: number | undefined;
479
- }[];
480
- description?: string | undefined;
481
- profile?: string | undefined;
482
- dtype?: string | undefined;
483
- estimatedTotalBytes?: number | undefined;
484
- }[] | undefined;
485
- }>>;
486
- files: z.ZodDefault<z.ZodArray<z.ZodObject<{
487
- path: z.ZodString;
488
- sizeBytes: z.ZodOptional<z.ZodNumber>;
489
- downloadedBytes: z.ZodOptional<z.ZodNumber>;
490
- }, "strip", z.ZodTypeAny, {
491
- path: string;
492
- sizeBytes?: number | undefined;
493
- downloadedBytes?: number | undefined;
494
- }, {
495
- path: string;
496
- sizeBytes?: number | undefined;
497
- downloadedBytes?: number | undefined;
498
- }>, "many">>;
499
- }, "strip", z.ZodTypeAny, {
500
- status: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting";
501
- selected: boolean;
502
- files: {
503
- path: string;
504
- sizeBytes?: number | undefined;
505
- downloadedBytes?: number | undefined;
506
- }[];
507
- modelId: string;
508
- resumable: boolean;
509
- error?: string | undefined;
510
- progress?: number | undefined;
511
- bytesDownloaded?: number | undefined;
512
- totalBytes?: number | undefined;
513
- updatedAt?: number | undefined;
514
- installedAt?: number | undefined;
515
- plan?: {
516
- files: {
517
- path: string;
518
- required: boolean;
519
- sizeBytes?: number | undefined;
520
- }[];
521
- modelId: string;
522
- selectedGroupId?: string | undefined;
523
- profile?: string | undefined;
524
- estimatedTotalBytes?: number | undefined;
525
- groups?: {
526
- label: string;
527
- id: string;
528
- selectable: boolean;
529
- selected: boolean;
530
- files: {
531
- path: string;
532
- required: boolean;
533
- sizeBytes?: number | undefined;
534
- }[];
535
- description?: string | undefined;
536
- profile?: string | undefined;
537
- dtype?: string | undefined;
538
- estimatedTotalBytes?: number | undefined;
539
- }[] | undefined;
540
- } | undefined;
541
- }, {
542
- modelId: string;
543
- status?: "error" | "not-downloaded" | "queued" | "downloading" | "paused" | "downloaded" | "deleting" | undefined;
544
- error?: string | undefined;
545
- selected?: boolean | undefined;
546
- files?: {
547
- path: string;
548
- sizeBytes?: number | undefined;
549
- downloadedBytes?: number | undefined;
550
- }[] | undefined;
551
- progress?: number | undefined;
552
- bytesDownloaded?: number | undefined;
553
- totalBytes?: number | undefined;
554
- resumable?: boolean | undefined;
555
- updatedAt?: number | undefined;
556
- installedAt?: number | undefined;
557
- plan?: {
558
- files: {
559
- path: string;
560
- required: boolean;
561
- sizeBytes?: number | undefined;
562
- }[];
563
- modelId: string;
564
- selectedGroupId?: string | undefined;
565
- profile?: string | undefined;
566
- estimatedTotalBytes?: number | undefined;
567
- groups?: {
568
- label: string;
569
- id: string;
570
- selectable: boolean;
571
- selected: boolean;
572
- files: {
573
- path: string;
574
- required: boolean;
575
- sizeBytes?: number | undefined;
576
- }[];
577
- description?: string | undefined;
578
- profile?: string | undefined;
579
- dtype?: string | undefined;
580
- estimatedTotalBytes?: number | undefined;
581
- }[] | undefined;
582
- } | undefined;
583
- }>;
584
- type LocalModelAssetState = z.infer<typeof LocalModelAssetStateSchema>;
585
- interface LocalModelCatalogItem extends TranslationModelCandidate {
586
- asset: LocalModelAssetState;
587
- selectable: boolean;
588
- local: boolean;
589
- }
590
- interface LocalModelCatalogResult {
591
- items: LocalModelCatalogItem[];
592
- nextCursor?: string;
593
- }
594
- interface LocalModelCatalogSearchEvent {
595
- requestId: string;
596
- phase: TranslationModelSearchPhase;
597
- items?: LocalModelCatalogItem[];
598
- nextCursor?: string;
599
- message?: string;
600
- }
601
- interface LocalModelCatalogLocalResult {
602
- items: LocalModelCatalogItem[];
603
- }
604
- interface TranslatorFactoryPrepareOptions extends TranslatorFactoryCreateOptions {
605
- monitor?: TranslatorPrepareMonitor;
606
- }
607
- interface TranslatorFactoryCreateOptions {
608
- sourceLanguage: string;
609
- targetLanguage: string;
610
- model?: string;
611
- dtype?: string;
612
- runtimeConfig?: Record<string, unknown>;
613
- signal?: AbortSignal;
614
- monitor?: TranslatorCreateMonitor;
615
- }
616
- interface TranslatorFactory {
617
- prepare?(options: TranslatorFactoryPrepareOptions): Promise<void>;
618
- create(options: TranslatorFactoryCreateOptions): Promise<Translator>;
619
- }
620
- type TranslationEngineRuntime = 'browser' | 'server';
621
- interface TranslationEngineManifest {
622
- id: TranslationEngineId;
623
- label: string;
624
- description: string;
625
- technicalSummary: string;
626
- runtime: TranslationEngineRuntime;
627
- moduleName?: string;
628
- factoryExport?: string;
629
- }
630
- declare const TRANSLATION_ENGINE_MANIFESTS: readonly [{
631
- readonly id: "browser";
632
- readonly label: "Browser";
633
- readonly description: "Uses the browser Translator API and future browser-side providers.";
634
- readonly technicalSummary: "Browser-native Web Translator adapter. Package payload is about 5 KB; browser language packs are managed by the browser.";
635
- readonly runtime: "browser";
636
- readonly moduleName: "@openspecui/browser-translator";
637
- readonly factoryExport: "createBrowserTranslatorFactory";
638
- }, {
639
- readonly id: "local";
640
- readonly label: "Local-Transformers";
641
- readonly description: "Runs a bundled local Transformers.js translation runtime with managed model files.";
642
- readonly technicalSummary: "Server-side Transformers.js local adapter. Package payload is about 5 KB; selected model groups are downloaded separately and can range from tens to hundreds of MB.";
643
- readonly runtime: "server";
644
- readonly moduleName: "@openspecui/local-translator";
645
- readonly factoryExport: "createLocalTranslatorFactory";
646
- }, {
647
- readonly id: "openai";
648
- readonly label: "OpenAI-Completion";
649
- readonly description: "Uses an OpenAI-compatible TanStack AI completion provider for context-aware translation.";
650
- readonly technicalSummary: "Server-side TanStack AI adapter for OpenAI-compatible APIs. Package payload is about 5 KB; model size stays with the remote provider.";
651
- readonly runtime: "server";
652
- readonly moduleName: "@openspecui/openai-completion-translator";
653
- readonly factoryExport: "createOpenAICompletionTranslatorFactory";
654
- }];
655
- declare function getTranslationEngineManifest(engineId: TranslationEngineId): TranslationEngineManifest;
656
- declare const TranslationOpenAISettingsSchema: z.ZodObject<{
657
- baseUrl: z.ZodDefault<z.ZodString>;
658
- token: z.ZodDefault<z.ZodString>;
659
- model: z.ZodDefault<z.ZodString>;
660
- }, "strip", z.ZodTypeAny, {
661
- model: string;
662
- baseUrl: string;
663
- token: string;
664
- }, {
665
- model?: string | undefined;
666
- baseUrl?: string | undefined;
667
- token?: string | undefined;
668
- }>;
669
- type TranslationOpenAISettings = z.infer<typeof TranslationOpenAISettingsSchema>;
670
- declare const TranslationLocalSettingsSchema: z.ZodObject<{
671
- model: z.ZodDefault<z.ZodString>;
672
- selectedGroupId: z.ZodOptional<z.ZodString>;
673
- hfEndpoint: z.ZodDefault<z.ZodString>;
674
- }, "strip", z.ZodTypeAny, {
675
- model: string;
676
- hfEndpoint: string;
677
- selectedGroupId?: string | undefined;
678
- }, {
679
- model?: string | undefined;
680
- selectedGroupId?: string | undefined;
681
- hfEndpoint?: string | undefined;
682
- }>;
683
- type TranslationLocalSettings = z.infer<typeof TranslationLocalSettingsSchema>;
684
- declare const TranslationEngineGlobalSettingsSchema: z.ZodObject<{
685
- openai: z.ZodDefault<z.ZodObject<{
686
- baseUrl: z.ZodDefault<z.ZodString>;
687
- token: z.ZodDefault<z.ZodString>;
688
- model: z.ZodDefault<z.ZodString>;
689
- }, "strip", z.ZodTypeAny, {
690
- model: string;
691
- baseUrl: string;
692
- token: string;
693
- }, {
694
- model?: string | undefined;
695
- baseUrl?: string | undefined;
696
- token?: string | undefined;
697
- }>>;
698
- local: z.ZodDefault<z.ZodObject<{
699
- model: z.ZodDefault<z.ZodString>;
700
- selectedGroupId: z.ZodOptional<z.ZodString>;
701
- hfEndpoint: z.ZodDefault<z.ZodString>;
702
- }, "strip", z.ZodTypeAny, {
703
- model: string;
704
- hfEndpoint: string;
705
- selectedGroupId?: string | undefined;
706
- }, {
707
- model?: string | undefined;
708
- selectedGroupId?: string | undefined;
709
- hfEndpoint?: string | undefined;
710
- }>>;
711
- }, "strip", z.ZodTypeAny, {
712
- local: {
713
- model: string;
714
- hfEndpoint: string;
715
- selectedGroupId?: string | undefined;
716
- };
717
- openai: {
718
- model: string;
719
- baseUrl: string;
720
- token: string;
721
- };
722
- }, {
723
- local?: {
724
- model?: string | undefined;
725
- selectedGroupId?: string | undefined;
726
- hfEndpoint?: string | undefined;
727
- } | undefined;
728
- openai?: {
729
- model?: string | undefined;
730
- baseUrl?: string | undefined;
731
- token?: string | undefined;
732
- } | undefined;
733
- }>;
734
- type TranslationEngineGlobalSettings = z.infer<typeof TranslationEngineGlobalSettingsSchema>;
735
- type TranslationEngineGlobalSettingsUpdate = {
736
- openai?: Partial<TranslationOpenAISettings>;
737
- local?: Partial<TranslationLocalSettings>;
738
- };
739
- declare const BatchTranslateInputSchema: z.ZodObject<{
740
- engineId: z.ZodEnum<["browser", "local", "openai"]>;
741
- sourceLanguage: z.ZodString;
742
- targetLanguage: z.ZodString;
743
- model: z.ZodOptional<z.ZodString>;
744
- selectedGroupId: z.ZodOptional<z.ZodString>;
745
- inputs: z.ZodArray<z.ZodString, "many">;
746
- instructions: z.ZodOptional<z.ZodString>;
747
- context: z.ZodOptional<z.ZodString>;
748
- }, "strip", z.ZodTypeAny, {
749
- targetLanguage: string;
750
- engineId: "local" | "openai" | "browser";
751
- sourceLanguage: string;
752
- inputs: string[];
753
- model?: string | undefined;
754
- selectedGroupId?: string | undefined;
755
- instructions?: string | undefined;
756
- context?: string | undefined;
757
- }, {
758
- targetLanguage: string;
759
- engineId: "local" | "openai" | "browser";
760
- sourceLanguage: string;
761
- inputs: string[];
762
- model?: string | undefined;
763
- selectedGroupId?: string | undefined;
764
- instructions?: string | undefined;
765
- context?: string | undefined;
766
- }>;
767
- type BatchTranslateInput = z.infer<typeof BatchTranslateInputSchema>;
768
- declare const BatchTranslateEventSchema: z.ZodObject<{
769
- index: z.ZodNumber;
770
- output: z.ZodString;
771
- }, "strip", z.ZodTypeAny, {
772
- index: number;
773
- output: string;
774
- }, {
775
- index: number;
776
- output: string;
777
- }>;
778
- type BatchTranslateEvent = z.infer<typeof BatchTranslateEventSchema>;
779
- //#endregion
780
- export { getTranslationEngineManifest as $, TranslationEngineGlobalSettingsSchema as A, TranslationModelSearchEvent as B, TRANSLATION_ENGINE_MANIFESTS as C, TranslationDownloadGroupPlan as D, TranslationDownloadFilePlanSchema as E, TranslationEngineRuntime as F, TranslationOpenAISettingsSchema as G, TranslationModelSearchPhase as H, TranslationLocalSettings as I, TranslatorFactory as J, Translator as K, TranslationLocalSettingsSchema as L, TranslationEngineId as M, TranslationEngineIdSchema as N, TranslationDownloadGroupPlanSchema as O, TranslationEngineManifest as P, TranslatorPrepareMonitor as Q, TranslationModelCandidate as R, TRANSLATION_ENGINE_IDS as S, TranslationDownloadFilePlan as T, TranslationModelSearchResult as U, TranslationModelSearchInput as V, TranslationOpenAISettings as W, TranslatorFactoryPrepareOptions as X, TranslatorFactoryCreateOptions as Y, TranslatorOptions as Z, LocalModelDownloadStatus as _, BatchTranslationResult as a, ServiceTranslationEngineId as b, LocalModelAssetLogSchema as c, LocalModelAssetState as d, LocalModelAssetStateSchema as f, LocalModelCatalogSearchEvent as g, LocalModelCatalogResult as h, BatchTranslateInputSchema as i, TranslationEngineGlobalSettingsUpdate as j, TranslationEngineGlobalSettings as k, LocalModelAssetPlanSnapshot as l, LocalModelCatalogLocalResult as m, BatchTranslateEventSchema as n, DEFAULT_TRANSLATION_ENGINE_ID as o, LocalModelCatalogItem as p, TranslatorCreateMonitor as q, BatchTranslateInput as r, LocalModelAssetLog as s, BatchTranslateEvent as t, LocalModelAssetPlanSnapshotSchema as u, LocalModelDownloadStatusSchema as v, TRANSLATOR_CONTRACT_VERSION as w, ServiceTranslationEngineIdSchema as x, SERVICE_TRANSLATION_ENGINE_IDS as y, TranslationModelDownloadPlan as z };