opencode-windows-scheduler 1.5.0 → 1.5.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 (67) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/LICENSE +21 -21
  3. package/README.md +24 -2
  4. package/ROADMAP-STRATEGY.md +16 -16
  5. package/ROADMAP.md +410 -141
  6. package/dist/core/dry-run.d.ts +10 -0
  7. package/dist/core/dry-run.d.ts.map +1 -1
  8. package/dist/core/dry-run.js +55 -34
  9. package/dist/core/git-trigger.d.ts.map +1 -1
  10. package/dist/core/git-trigger.js +15 -9
  11. package/dist/core/matrix.d.ts.map +1 -1
  12. package/dist/core/matrix.js +48 -22
  13. package/dist/core/schedule-v2.d.ts.map +1 -1
  14. package/dist/core/schedule-v2.js +29 -17
  15. package/dist/core/scheduler/types.d.ts +6 -0
  16. package/dist/core/scheduler/types.d.ts.map +1 -1
  17. package/dist/core/scheduler/windows.d.ts +6 -2
  18. package/dist/core/scheduler/windows.d.ts.map +1 -1
  19. package/dist/core/scheduler/windows.js +25 -10
  20. package/dist/core/telegram.d.ts.map +1 -1
  21. package/dist/core/telegram.js +13 -10
  22. package/dist/i18n.d.ts +52 -0
  23. package/dist/i18n.d.ts.map +1 -0
  24. package/dist/i18n.js +292 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +781 -179
  28. package/dist/notifications.d.ts.map +1 -1
  29. package/dist/notifications.js +74 -40
  30. package/dist/rpc.d.ts +15 -2
  31. package/dist/rpc.d.ts.map +1 -1
  32. package/dist/rpc.js +6 -2
  33. package/dist/server.d.ts.map +1 -1
  34. package/dist/server.js +89 -48
  35. package/dist/settings.d.ts +3 -0
  36. package/dist/settings.d.ts.map +1 -1
  37. package/dist/settings.js +20 -8
  38. package/dist/task-transfer.d.ts +13 -0
  39. package/dist/task-transfer.d.ts.map +1 -1
  40. package/dist/task-transfer.js +11 -0
  41. package/dist/types.d.ts +11 -0
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/types.js +32 -0
  44. package/docs/ARCHITECTURE.md +36 -1
  45. package/docs/FEATURES.md +19 -0
  46. package/docs/README.ru.md +17 -1
  47. package/gui-experimental.cjs +9 -9
  48. package/locales/en.json +695 -0
  49. package/locales/ru.json +695 -0
  50. package/package.json +6 -3
  51. package/scripts/test-locale.mjs +44 -0
  52. package/src/core/dry-run.ts +76 -38
  53. package/src/core/git-trigger.ts +15 -9
  54. package/src/core/matrix.ts +52 -26
  55. package/src/core/schedule-v2.ts +47 -17
  56. package/src/core/scheduler/types.ts +6 -0
  57. package/src/core/scheduler/windows.ts +25 -10
  58. package/src/core/telegram.ts +16 -10
  59. package/src/gui.tsx +575 -480
  60. package/src/i18n.ts +339 -0
  61. package/src/index.ts +943 -191
  62. package/src/notifications.ts +83 -42
  63. package/src/rpc.ts +6 -2
  64. package/src/server.ts +89 -48
  65. package/src/settings.ts +38 -10
  66. package/src/task-transfer.ts +24 -0
  67. package/src/types.ts +37 -0
package/src/gui.tsx CHANGED
@@ -2,6 +2,29 @@ import { createSignal, onCleanup, ErrorBoundary } from "solid-js"
2
2
  import { Panel, Plugin } from "@opencode/plugin/gui"
3
3
  import { SchedulerRpc } from "./rpc.js"
4
4
  import { loadHistory, loadMetrics, type HistoryRecord } from "./history.js"
5
+ import { registerCatalog, setLocale, t, type TranslateParams, type Locale } from "./i18n.js"
6
+ // Каталоги встраиваются в бандл на этапе сборки: в webview OpenCode нет
7
+ // доступа к файлам пакета, поэтому ленивый fs-загрузчик из i18n.ts не работает.
8
+ import ruCatalog from "../locales/ru.json"
9
+ import enCatalog from "../locales/en.json"
10
+
11
+ registerCatalog("ru", ruCatalog)
12
+ registerCatalog("en", enCatalog)
13
+
14
+ /** Счётчик смены локали: чтение в JSX-геттерах делает строки реактивными. */
15
+ const [localeTick, setLocaleTick] = createSignal(0)
16
+
17
+ /** gt — t() + подписка на смену локали для Solid. */
18
+ const gt = (key: string, params?: TranslateParams): string => {
19
+ localeTick()
20
+ return t(key, params)
21
+ }
22
+
23
+ /** Переключает язык интерфейса без перезапуска панели. */
24
+ const applyLocale = (locale: unknown): void => {
25
+ setLocale(locale as Locale)
26
+ setLocaleTick((v) => v + 1)
27
+ }
5
28
 
6
29
  /** Статус задачи для отображения в GUI. */
7
30
  type JobStatus = "running" | "success" | "error" | "partial" | "idle" | "unknown"
@@ -160,6 +183,10 @@ interface Job {
160
183
  gitPollSeconds?: number | null
161
184
  /** Пауза до даты (ISO) — задача включится автоматически. */
162
185
  pausedUntil?: string | null
186
+ /** Windows: задача запускается и без входа пользователя (/ru SYSTEM). */
187
+ runWhenLoggedOff?: boolean | null
188
+ /** Windows: фактический режим входа из планировщика (Interactive/Background). */
189
+ logonMode?: string | null
163
190
  }
164
191
 
165
192
  /** Пользовательский шаблон, сохранённый в templates.json. */
@@ -232,24 +259,27 @@ function statusColor(status: JobStatus): string {
232
259
  /** Приоритет по умолчанию — «Обычный». */
233
260
  const DEFAULT_PRIORITY = 5
234
261
 
262
+ /** Внутренний маркер dry-run локальной формы — не переводится. */
263
+ const DRYRUN_FORM_MARKER = "form"
264
+
235
265
  /** Человекочитаемая подпись приоритета (0..10). */
236
266
  function priorityLabel(priority?: number): string {
237
267
  const value =
238
268
  typeof priority === "number" && Number.isFinite(priority)
239
269
  ? Math.min(10, Math.max(0, Math.floor(priority)))
240
270
  : DEFAULT_PRIORITY
241
- if (value >= 10) return "Критический"
242
- if (value >= 8) return "Высокий"
243
- if (value <= 3) return "Низкий"
244
- return "Обычный"
271
+ if (value >= 10) return gt("gui.priority.critical")
272
+ if (value >= 8) return gt("gui.priority.high")
273
+ if (value <= 3) return gt("gui.priority.low")
274
+ return gt("gui.priority.normal")
245
275
  }
246
276
 
247
277
  /** Варианты выпадающего списка «Приоритет». */
248
- const PRIORITY_OPTIONS: Array<{ value: number; label: string }> = [
249
- { value: 2, label: "Низкий" },
250
- { value: 5, label: "Обычный" },
251
- { value: 8, label: "Высокий" },
252
- { value: 10, label: "Критический" },
278
+ const priorityOptions = (): Array<{ value: number; label: string }> => [
279
+ { value: 2, label: gt("gui.priority.low") },
280
+ { value: 5, label: gt("gui.priority.normal") },
281
+ { value: 8, label: gt("gui.priority.high") },
282
+ { value: 10, label: gt("gui.priority.critical") },
253
283
  ]
254
284
 
255
285
  /** Безопасно извлекает текст ошибки из любого thrown value. */
@@ -284,12 +314,12 @@ function joinListInput(list?: string[] | null): string {
284
314
  }
285
315
 
286
316
  /** Пресеты cron-расписаний */
287
- const CRON_PRESETS: Array<{ label: string; value: string }> = [
288
- { label: "Каждую минуту", value: "* * * * *" },
289
- { label: "Каждый час", value: "0 * * * *" },
290
- { label: "Каждый день в 09:00", value: "0 9 * * *" },
291
- { label: "Каждый понедельник в 10:00", value: "0 10 * * 1" },
292
- { label: "Свое расписание…", value: "__custom__" },
317
+ const cronPresets = (): Array<{ label: string; value: string }> => [
318
+ { label: gt("gui.cron.everyMinute"), value: "* * * * *" },
319
+ { label: gt("gui.cron.everyHour"), value: "0 * * * *" },
320
+ { label: gt("gui.cron.dailyAt9"), value: "0 9 * * *" },
321
+ { label: gt("gui.cron.mondayAt10"), value: "0 10 * * 1" },
322
+ { label: gt("gui.cron.custom"), value: "__custom__" },
293
323
  ]
294
324
 
295
325
  export default Plugin.define({
@@ -309,7 +339,7 @@ export default Plugin.define({
309
339
  const [profilesOpen, setProfilesOpen] = createSignal(false)
310
340
  const [profileBusy, setProfileBusy] = createSignal(false)
311
341
  // Собственный текстовый prompt: в Electron/WebView window.prompt не работает
312
- // (возвращает null), из-за чего «+ Создать» в профилях молча ничего не делал.
342
+ // (возвращает null), из-за чего «{gt("gui.createProfile")}» в профилях молча ничего не делал.
313
343
  const [promptOpen, setPromptOpen] = createSignal(false)
314
344
  const [promptTitle, setPromptTitle] = createSignal("")
315
345
  const [promptValue, setPromptValue] = createSignal("")
@@ -344,22 +374,22 @@ export default Plugin.define({
344
374
  const [history, setHistory] = createSignal<HistoryRecord[]>([])
345
375
 
346
376
  // Шаблоны промптов
347
- const TEMPLATES: Array<{ label: string; value: string; prompt: string }> = [
348
- { label: "Свой промпт", value: "custom", prompt: "" },
377
+ const promptTemplates = (): Array<{ label: string; value: string; prompt: string }> => [
378
+ { label: gt("gui.promptTemplates.custom"), value: "custom", prompt: "" },
349
379
  {
350
- label: "Ночной сторож (тесты)",
380
+ label: gt("gui.promptTemplates.nightWatch"),
351
381
  value: "night-watch",
352
- prompt: "Запусти ночные проверки: прогнали тесты, зафиксируй ошибки и составь краткий отчёт о состоянии репозитория.",
382
+ prompt: gt("gui.promptTemplates.nightWatchPrompt"),
353
383
  },
354
384
  {
355
- label: "Утренний дайджест",
385
+ label: gt("gui.promptTemplates.morningDigest"),
356
386
  value: "morning-digest",
357
- prompt: "Собери утренний дайджест: какие изменения были за ночь, есть ли проваленные сборки, что требует внимания сегодня.",
387
+ prompt: gt("gui.promptTemplates.morningDigestPrompt"),
358
388
  },
359
389
  {
360
- label: "Гигиена кода",
390
+ label: gt("gui.promptTemplates.codeHygiene"),
361
391
  value: "code-hygiene",
362
- prompt: "Проведи аудит гигиены кода: найди неиспользуемые импорты, неиспользуемые переменные, лишние зависимости и предложи правки.",
392
+ prompt: gt("gui.promptTemplates.codeHygienePrompt"),
363
393
  },
364
394
  ]
365
395
  const [template, setTemplate] = createSignal<string>("custom")
@@ -450,12 +480,15 @@ export default Plugin.define({
450
480
 
451
481
  // Название планировщика приходит с бэкенда: на Windows — «Планировщик Windows»,
452
482
  // на macOS/Linux — «OpenCode Scheduler». GUI не зависит от ОС напрямую.
453
- const [schedulerTitle, setSchedulerTitle] = createSignal("Планировщик задач")
483
+ const [schedulerTitle, setSchedulerTitle] = createSignal(gt("gui.app.title"))
484
+ // Платформа нужна форме: режим входа есть только у Планировщика Windows.
485
+ const [schedulerPlatform, setSchedulerPlatform] = createSignal<NodeJS.Platform | "">("")
454
486
 
455
487
  async function loadPlatformGui() {
456
488
  try {
457
489
  const info = await rpc.get_platform({})
458
490
  if (info?.title) setSchedulerTitle(info.title)
491
+ if (info?.platform) setSchedulerPlatform(info.platform)
459
492
  } catch (err: any) {
460
493
  console.error("RPC Error (get_platform):", err)
461
494
  }
@@ -516,6 +549,7 @@ export default Plugin.define({
516
549
  setAuditRetentionEnabled(Boolean(au?.enabled !== false))
517
550
  setAuditRetentionDays(Number(au?.retentionDays ?? 90))
518
551
  setAuditMaxRecords(Number(au?.maxRecords ?? 10000))
552
+ applyLocale((s as { locale?: string }).locale)
519
553
  } catch (err: any) {
520
554
  console.error("RPC Error (get_settings):", err)
521
555
  }
@@ -627,9 +661,10 @@ export default Plugin.define({
627
661
  setAuditRetentionDays(Number(au?.retentionDays ?? 90))
628
662
  setAuditMaxRecords(Number(au?.maxRecords ?? 10000))
629
663
  }
664
+ applyLocale((s as { locale?: string }).locale)
630
665
  } catch (err: any) {
631
666
  console.error("RPC Error (save_settings):", err)
632
- ctx.toast.show({ title: "Не удалось сохранить настройки", variant: "error", description: errorMessage(err) })
667
+ ctx.toast.show({ title: gt("gui.toast.settingsSaveFailed"), variant: "error", description: errorMessage(err) })
633
668
  }
634
669
  }
635
670
 
@@ -657,15 +692,16 @@ export default Plugin.define({
657
692
  setHistoryMaxRecords(Number(h?.maxRecords ?? 5000))
658
693
  setHistoryLastCleanupAt(h?.lastCleanupAt ?? null)
659
694
  setHistoryLastCleanupDeleted(Number(h?.lastCleanupDeleted ?? 0))
695
+ applyLocale((s as { locale?: string }).locale)
660
696
  ctx.toast.show({
661
- title: result.success ? "Очистка истории завершена" : "Очистка не удалась",
697
+ title: result.success ? gt("gui.toast.historyCleanupDone") : gt("gui.toast.historyCleanupFailed"),
662
698
  variant: result.success ? "success" : "error",
663
699
  description: result.message,
664
700
  })
665
701
  } catch (err: any) {
666
702
  console.error("RPC Error (cleanup_history):", err)
667
703
  ctx.toast.show({
668
- title: "Очистка не удалась",
704
+ title: gt("gui.toast.historyCleanupFailed"),
669
705
  variant: "error",
670
706
  description: errorMessage(err),
671
707
  })
@@ -698,14 +734,14 @@ export default Plugin.define({
698
734
  if (result?.success) {
699
735
  setSecretName("")
700
736
  setSecretValue("")
701
- ctx.toast.show({ title: "Секрет сохранён", variant: "success", description: result.message })
737
+ ctx.toast.show({ title: gt("gui.toast.secretSaved"), variant: "success", description: result.message })
702
738
  void loadSecretsGui()
703
739
  } else {
704
- ctx.toast.show({ title: "Секрет не сохранён", variant: "error", description: result?.message ?? "" })
740
+ ctx.toast.show({ title: gt("gui.toast.secretNotSaved"), variant: "error", description: result?.message ?? "" })
705
741
  }
706
742
  } catch (err: any) {
707
743
  console.error("RPC Error (save_secret):", err)
708
- ctx.toast.show({ title: "Секрет не сохранён", variant: "error", description: errorMessage(err) })
744
+ ctx.toast.show({ title: gt("gui.toast.secretNotSaved"), variant: "error", description: errorMessage(err) })
709
745
  } finally {
710
746
  setSecretsBusy(false)
711
747
  }
@@ -717,14 +753,14 @@ export default Plugin.define({
717
753
  try {
718
754
  const result = await rpc.delete_secret({ name })
719
755
  if (result?.success) {
720
- ctx.toast.show({ title: "Секрет удалён", variant: "success", description: result?.message ?? "" })
756
+ ctx.toast.show({ title: gt("gui.toast.secretDeleted"), variant: "success", description: result?.message ?? "" })
721
757
  void loadSecretsGui()
722
758
  } else {
723
- ctx.toast.show({ title: "Секрет не удалён", variant: "error", description: result?.message ?? "" })
759
+ ctx.toast.show({ title: gt("gui.toast.secretNotDeleted"), variant: "error", description: result?.message ?? "" })
724
760
  }
725
761
  } catch (err: any) {
726
762
  console.error("RPC Error (delete_secret):", err)
727
- ctx.toast.show({ title: "Секрет не удалён", variant: "error", description: errorMessage(err) })
763
+ ctx.toast.show({ title: gt("gui.toast.secretNotDeleted"), variant: "error", description: errorMessage(err) })
728
764
  } finally {
729
765
  setSecretsBusy(false)
730
766
  }
@@ -763,14 +799,14 @@ export default Plugin.define({
763
799
  await saveNotificationSettings()
764
800
  const result = await rpc.test_notification({})
765
801
  ctx.toast.show({
766
- title: result.success ? "Тестовое уведомление отправлено" : "Тест не удался",
802
+ title: result.success ? gt("gui.toast.testSent") : gt("gui.toast.testFailed"),
767
803
  variant: result.success ? "success" : "error",
768
804
  description: result.message,
769
805
  })
770
806
  } catch (err: any) {
771
807
  console.error("RPC Error (test_notification):", err)
772
808
  ctx.toast.show({
773
- title: "Тест не удался",
809
+ title: gt("gui.toast.testFailed"),
774
810
  variant: "error",
775
811
  description: errorMessage(err),
776
812
  })
@@ -787,14 +823,14 @@ export default Plugin.define({
787
823
  await saveNotificationSettings()
788
824
  const result = await rpc.send_digest({})
789
825
  ctx.toast.show({
790
- title: result.success ? "Дайджест отправлен" : "Дайджест не отправлен",
826
+ title: result.success ? gt("gui.toast.digestSent") : gt("gui.toast.digestFailed"),
791
827
  variant: result.success ? "success" : "error",
792
828
  description: result.message,
793
829
  })
794
830
  } catch (err: any) {
795
831
  console.error("RPC Error (send_digest):", err)
796
832
  ctx.toast.show({
797
- title: "Дайджест не отправлен",
833
+ title: gt("gui.toast.digestFailed"),
798
834
  variant: "error",
799
835
  description: errorMessage(err),
800
836
  })
@@ -851,6 +887,9 @@ export default Plugin.define({
851
887
  // Сессия OpenCode (Спринт 24): new / reuse (сохраняем sessionId на задаче) / last (--continue).
852
888
  const [session, setSession] = createSignal<"new" | "reuse" | "last">("new")
853
889
  const [sessionMaxRuns, setSessionMaxRuns] = createSignal("")
890
+ // Спринт 27.5.9: режим входа (Windows). false — только при активном входе,
891
+ // true — задача работает и без входа (/ru SYSTEM, session 0).
892
+ const [runWhenLoggedOff, setRunWhenLoggedOff] = createSignal(false)
854
893
  // Часовой пояс и окно запуска (Спринт 19). Пусто = системный пояс / без окна.
855
894
  const [timezone, setTimezone] = createSignal("")
856
895
  const [notBefore, setNotBefore] = createSignal("")
@@ -1034,7 +1073,7 @@ export default Plugin.define({
1034
1073
  try {
1035
1074
  const result = await rpc.export_tasks({})
1036
1075
  if (!result.success) {
1037
- ctx.toast.show({ title: "Ошибка экспорта", variant: "error", description: result.error })
1076
+ ctx.toast.show({ title: gt("gui.toast.exportFailed"), variant: "error", description: result.error })
1038
1077
  return
1039
1078
  }
1040
1079
  setExportData(result.data)
@@ -1047,10 +1086,10 @@ export default Plugin.define({
1047
1086
  a.click()
1048
1087
  document.body.removeChild(a)
1049
1088
  URL.revokeObjectURL(url)
1050
- ctx.toast.show({ title: `Экспортировано задач: ${result.count}`, variant: "success" })
1089
+ ctx.toast.show({ title: gt("gui.toast.exported", { count: result.count }), variant: "success" })
1051
1090
  } catch (err: any) {
1052
1091
  console.error("RPC Error (export_tasks):", err)
1053
- ctx.toast.show({ title: "Ошибка экспорта", variant: "error", description: errorMessage(err) })
1092
+ ctx.toast.show({ title: gt("gui.toast.exportFailed"), variant: "error", description: errorMessage(err) })
1054
1093
  } finally {
1055
1094
  setExportBusy(false)
1056
1095
  }
@@ -1065,7 +1104,7 @@ export default Plugin.define({
1065
1104
  async function handleImport() {
1066
1105
  const file = importFile()
1067
1106
  if (!file) {
1068
- ctx.toast.show({ title: "Выберите файл", variant: "error", description: "Не выбран файл для импорта." })
1107
+ ctx.toast.show({ title: gt("gui.toast.chooseFile"), variant: "error", description: gt("gui.toast.noFileForImport") })
1069
1108
  return
1070
1109
  }
1071
1110
  setImportBusy(true)
@@ -1073,15 +1112,15 @@ export default Plugin.define({
1073
1112
  const text = await file.text()
1074
1113
  const result = await rpc.import_tasks({ data: text })
1075
1114
  if (!result.success) {
1076
- ctx.toast.show({ title: "Ошибка импорта", variant: "error", description: result.error })
1115
+ ctx.toast.show({ title: gt("gui.toast.importFailed"), variant: "error", description: result.error })
1077
1116
  return
1078
1117
  }
1079
1118
  setImportFile(null)
1080
- ctx.toast.show({ title: `Импортировано задач: ${result.imported}`, variant: "success" })
1119
+ ctx.toast.show({ title: gt("gui.toast.imported", { count: result.imported }), variant: "success" })
1081
1120
  await loadJobs()
1082
1121
  } catch (err: any) {
1083
1122
  console.error("RPC Error (import_tasks):", err)
1084
- ctx.toast.show({ title: "Ошибка импорта", variant: "error", description: errorMessage(err) })
1123
+ ctx.toast.show({ title: gt("gui.toast.importFailed"), variant: "error", description: errorMessage(err) })
1085
1124
  } finally {
1086
1125
  setImportBusy(false)
1087
1126
  }
@@ -1130,35 +1169,35 @@ export default Plugin.define({
1130
1169
  try {
1131
1170
  const result = await rpc.set_profile({ name })
1132
1171
  if (!result.success) {
1133
- ctx.toast.show({ title: "Не удалось переключить профиль", variant: "error", description: result.message ?? "Неизвестная ошибка" })
1172
+ ctx.toast.show({ title: gt("gui.toast.profileSwitchFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
1134
1173
  return
1135
1174
  }
1136
1175
  setProfileCurrent(result.current ?? name)
1137
- ctx.toast.show({ title: "Профиль переключён", variant: "success", description: result.message })
1176
+ ctx.toast.show({ title: gt("gui.toast.profileSwitched"), variant: "success", description: result.message })
1138
1177
  await loadProfilesGui()
1139
1178
  } catch (err: any) {
1140
1179
  console.error("RPC Error (set_profile):", err)
1141
- ctx.toast.show({ title: "Ошибка переключения профиля", variant: "error", description: shortError(errorMessage(err)) })
1180
+ ctx.toast.show({ title: gt("gui.toast.profileSwitchError"), variant: "error", description: shortError(errorMessage(err)) })
1142
1181
  } finally {
1143
1182
  setProfileBusy(false)
1144
1183
  }
1145
1184
  }
1146
1185
 
1147
1186
  async function handleCreateProfile() {
1148
- const name = ((await askText("Имя нового профиля (латиница, цифры, - и _)", "")) ?? "").trim()
1187
+ const name = ((await askText(gt("gui.profile.namePrompt"), "")) ?? "").trim()
1149
1188
  if (!name) return
1150
1189
  setProfileBusy(true)
1151
1190
  try {
1152
1191
  const result = await rpc.create_profile({ name })
1153
1192
  if (!result.success) {
1154
- ctx.toast.show({ title: "Не удалось создать профиль", variant: "error", description: result.message ?? "Неизвестная ошибка" })
1193
+ ctx.toast.show({ title: gt("gui.toast.profileCreateFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
1155
1194
  return
1156
1195
  }
1157
1196
  await loadProfilesGui()
1158
- ctx.toast.show({ title: "Профиль создан", variant: "success", description: result.message })
1197
+ ctx.toast.show({ title: gt("gui.toast.profileCreated"), variant: "success", description: result.message })
1159
1198
  } catch (err: any) {
1160
1199
  console.error("RPC Error (create_profile):", err)
1161
- ctx.toast.show({ title: "Ошибка создания профиля", variant: "error", description: shortError(errorMessage(err)) })
1200
+ ctx.toast.show({ title: gt("gui.toast.profileCreateError"), variant: "error", description: shortError(errorMessage(err)) })
1162
1201
  } finally {
1163
1202
  setProfileBusy(false)
1164
1203
  }
@@ -1166,19 +1205,19 @@ export default Plugin.define({
1166
1205
 
1167
1206
  async function handleDeleteProfile(name: string) {
1168
1207
  if (!name || name === "default") return
1169
- if (!window.confirm(`Удалить профиль "${name}" вместе с его БД, настройками и логами?`)) return
1208
+ if (!window.confirm(gt("gui.profile.deleteConfirm", { name }))) return
1170
1209
  setProfileBusy(true)
1171
1210
  try {
1172
1211
  const result = await rpc.delete_profile({ name })
1173
1212
  if (!result.success) {
1174
- ctx.toast.show({ title: "Не удалось удалить профиль", variant: "error", description: result.message ?? "Неизвестная ошибка" })
1213
+ ctx.toast.show({ title: gt("gui.toast.profileDeleteFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
1175
1214
  return
1176
1215
  }
1177
1216
  await loadProfilesGui()
1178
- ctx.toast.show({ title: "Профиль удалён", variant: "success" })
1217
+ ctx.toast.show({ title: gt("gui.toast.profileDeleted"), variant: "success" })
1179
1218
  } catch (err: any) {
1180
1219
  console.error("RPC Error (delete_profile):", err)
1181
- ctx.toast.show({ title: "Ошибка удаления профиля", variant: "error", description: shortError(errorMessage(err)) })
1220
+ ctx.toast.show({ title: gt("gui.toast.profileDeleteError"), variant: "error", description: shortError(errorMessage(err)) })
1182
1221
  } finally {
1183
1222
  setProfileBusy(false)
1184
1223
  }
@@ -1209,17 +1248,17 @@ export default Plugin.define({
1209
1248
 
1210
1249
  async function handleEditWorkspaceEnv(workspace: Workspace) {
1211
1250
  const envText = await askText(
1212
- "Env-переменные workspace, по одной в строке KEY=VALUE\n(пустое поле — очистить)",
1251
+ gt("gui.workspace.envPrompt"),
1213
1252
  envToText(workspace.env)
1214
1253
  )
1215
1254
  if (envText === null) return
1216
1255
  const env = parseEnvText(envText)
1217
1256
  if (!env) {
1218
- ctx.toast.show({ title: "Неверный формат env", variant: "error", description: "Нужны строки KEY=VALUE, имя — латиница/цифры/_" })
1257
+ ctx.toast.show({ title: gt("gui.toast.envInvalid"), variant: "error", description: gt("gui.workspace.envInvalidHelp") })
1219
1258
  return
1220
1259
  }
1221
1260
  const envFile = await askText(
1222
- "Путь к .env-файлу workspace (необязательно, пусто — без файла)",
1261
+ gt("gui.workspace.envFilePrompt"),
1223
1262
  workspace.envFile ?? ""
1224
1263
  )
1225
1264
  if (envFile === null) return
@@ -1231,23 +1270,23 @@ export default Plugin.define({
1231
1270
  envFile: envFile.trim() || null,
1232
1271
  })
1233
1272
  if (!result.success) {
1234
- ctx.toast.show({ title: "Не удалось сохранить env", variant: "error", description: result.error ?? "Неизвестная ошибка" })
1273
+ ctx.toast.show({ title: gt("gui.toast.envSaveFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
1235
1274
  return
1236
1275
  }
1237
1276
  await loadWorkspacesGui()
1238
- ctx.toast.show({ title: "Env-переменные сохранены", variant: "success", description: "Секреты маскируются в логах" })
1277
+ ctx.toast.show({ title: gt("gui.toast.envSaved"), variant: "success", description: gt("gui.workspace.envSecretsMasked") })
1239
1278
  } catch (err: any) {
1240
1279
  console.error("RPC Error (update_workspace env):", err)
1241
- ctx.toast.show({ title: "Ошибка сохранения env", variant: "error", description: shortError(errorMessage(err)) })
1280
+ ctx.toast.show({ title: gt("gui.toast.envSaveError"), variant: "error", description: shortError(errorMessage(err)) })
1242
1281
  } finally {
1243
1282
  setWorkspaceBusy(false)
1244
1283
  }
1245
1284
  }
1246
1285
 
1247
1286
  async function handleAddWorkspace() {
1248
- const workspacePath = ((await askText("Путь к git-репозиторию (workspace)", "")) ?? "").trim()
1287
+ const workspacePath = ((await askText(gt("gui.workspace.pathPrompt"), "")) ?? "").trim()
1249
1288
  if (!workspacePath) return
1250
- const workspaceName = ((await askText("Название workspace (необязательно)", "")) ?? "").trim()
1289
+ const workspaceName = ((await askText(gt("gui.workspace.namePrompt"), "")) ?? "").trim()
1251
1290
  setWorkspaceBusy(true)
1252
1291
  try {
1253
1292
  const result = await rpc.add_workspace({
@@ -1255,24 +1294,24 @@ export default Plugin.define({
1255
1294
  ...(workspaceName ? { name: workspaceName } : {}),
1256
1295
  })
1257
1296
  if (!result.success) {
1258
- ctx.toast.show({ title: "Ошибка добавления workspace", variant: "error", description: result.error ?? "Неизвестная ошибка" })
1297
+ ctx.toast.show({ title: gt("gui.toast.workspaceAddFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
1259
1298
  return
1260
1299
  }
1261
1300
  await loadWorkspacesGui()
1262
1301
  if (result.workspace?.id) setWorkspaceId(result.workspace.id)
1263
- ctx.toast.show({ title: "Workspace добавлен", variant: "success" })
1302
+ ctx.toast.show({ title: gt("gui.toast.workspaceAdded"), variant: "success" })
1264
1303
  } catch (err: any) {
1265
1304
  console.error("RPC Error (add_workspace):", err)
1266
- ctx.toast.show({ title: "Ошибка добавления workspace", variant: "error", description: shortError(errorMessage(err)) })
1305
+ ctx.toast.show({ title: gt("gui.toast.workspaceAddFailed"), variant: "error", description: shortError(errorMessage(err)) })
1267
1306
  } finally {
1268
1307
  setWorkspaceBusy(false)
1269
1308
  }
1270
1309
  }
1271
1310
 
1272
1311
  async function handleEditWorkspace(workspace: Workspace) {
1273
- const nextPath = ((await askText("Путь к git-репозиторию", workspace.path)) ?? "").trim()
1312
+ const nextPath = ((await askText(gt("gui.workspace.pathPromptShort"), workspace.path)) ?? "").trim()
1274
1313
  if (!nextPath) return
1275
- const nextName = ((await askText("Название workspace", workspace.name)) ?? "").trim()
1314
+ const nextName = ((await askText(gt("gui.workspace.namePromptShort"), workspace.name)) ?? "").trim()
1276
1315
  setWorkspaceBusy(true)
1277
1316
  try {
1278
1317
  const result = await rpc.update_workspace({
@@ -1281,36 +1320,36 @@ export default Plugin.define({
1281
1320
  ...(nextName ? { name: nextName } : {}),
1282
1321
  })
1283
1322
  if (!result.success) {
1284
- ctx.toast.show({ title: "Ошибка обновления workspace", variant: "error", description: result.error ?? "Неизвестная ошибка" })
1323
+ ctx.toast.show({ title: gt("gui.toast.workspaceUpdateFailed"), variant: "error", description: result.error ?? gt("gui.common.unknownError") })
1285
1324
  return
1286
1325
  }
1287
1326
  await loadWorkspacesGui()
1288
- ctx.toast.show({ title: "Workspace обновлён", variant: "success" })
1327
+ ctx.toast.show({ title: gt("gui.toast.workspaceUpdated"), variant: "success" })
1289
1328
  } catch (err: any) {
1290
1329
  console.error("RPC Error (update_workspace):", err)
1291
- ctx.toast.show({ title: "Ошибка обновления workspace", variant: "error", description: shortError(errorMessage(err)) })
1330
+ ctx.toast.show({ title: gt("gui.toast.workspaceUpdateFailed"), variant: "error", description: shortError(errorMessage(err)) })
1292
1331
  } finally {
1293
1332
  setWorkspaceBusy(false)
1294
1333
  }
1295
1334
  }
1296
1335
 
1297
1336
  async function handleDeleteWorkspace(workspace: Workspace) {
1298
- if (!window.confirm(`Удалить workspace "${workspace.name}"? Задачи сохранены, привязка будет очищена.`)) return
1337
+ if (!window.confirm(gt("gui.workspace.deleteConfirm", { name: workspace.name }))) return
1299
1338
  setWorkspaceBusy(true)
1300
1339
  try {
1301
1340
  const result = await rpc.delete_workspace({ id: workspace.id })
1302
1341
  if (!result.success) {
1303
- ctx.toast.show({ title: "Ошибка удаления workspace", variant: "error", description: result.message ?? "Неизвестная ошибка" })
1342
+ ctx.toast.show({ title: gt("gui.toast.workspaceDeleteFailed"), variant: "error", description: result.message ?? gt("gui.common.unknownError") })
1304
1343
  return
1305
1344
  }
1306
1345
  if (workspaceId() === workspace.id) setWorkspaceId("")
1307
1346
  if (workspaceFilter() === workspace.id) setWorkspaceFilter("all")
1308
1347
  await loadWorkspacesGui()
1309
1348
  await loadJobs()
1310
- ctx.toast.show({ title: "Workspace удалён", variant: "success", description: result.message })
1349
+ ctx.toast.show({ title: gt("gui.toast.workspaceDeleted"), variant: "success", description: result.message })
1311
1350
  } catch (err: any) {
1312
1351
  console.error("RPC Error (delete_workspace):", err)
1313
- ctx.toast.show({ title: "Ошибка удаления workspace", variant: "error", description: shortError(errorMessage(err)) })
1352
+ ctx.toast.show({ title: gt("gui.toast.workspaceDeleteFailed"), variant: "error", description: shortError(errorMessage(err)) })
1314
1353
  } finally {
1315
1354
  setWorkspaceBusy(false)
1316
1355
  }
@@ -1331,7 +1370,7 @@ export default Plugin.define({
1331
1370
  setPrompt(t.prompt ?? "")
1332
1371
  if (t.schedule) {
1333
1372
  setSchedule(t.schedule)
1334
- const preset = CRON_PRESETS.find((p) => p.value === t.schedule)
1373
+ const preset = cronPresets().find((p) => p.value === t.schedule)
1335
1374
  setCronPreset((preset ? preset.value : "__custom__") as any)
1336
1375
  }
1337
1376
  setRetryCount(t.retryCount ?? 0)
@@ -1388,7 +1427,7 @@ export default Plugin.define({
1388
1427
  return
1389
1428
  }
1390
1429
 
1391
- const builtin = TEMPLATES.find((t) => t.value === val)
1430
+ const builtin = promptTemplates().find((t) => t.value === val)
1392
1431
  if (builtin) setPrompt(builtin.prompt)
1393
1432
  }
1394
1433
 
@@ -1396,14 +1435,14 @@ export default Plugin.define({
1396
1435
  async function handleSaveAsTemplate() {
1397
1436
  if (!(prompt() || "").trim()) {
1398
1437
  ctx.toast.show({
1399
- title: "Нечего сохранять",
1438
+ title: gt("gui.toast.nothingToSave"),
1400
1439
  variant: "error",
1401
- description: "Сначала заполните промпт — он обязателен для шаблона.",
1440
+ description: gt("gui.toast.promptRequired"),
1402
1441
  })
1403
1442
  return
1404
1443
  }
1405
1444
 
1406
- const templateName = ((await askText("Название шаблона", "")) ?? "").trim()
1445
+ const templateName = ((await askText(gt("gui.templates.namePrompt"), "")) ?? "").trim()
1407
1446
  if (!templateName) return
1408
1447
 
1409
1448
  try {
@@ -1442,20 +1481,20 @@ export default Plugin.define({
1442
1481
  })
1443
1482
  if (!result.success) {
1444
1483
  ctx.toast.show({
1445
- title: "Не удалось сохранить шаблон",
1484
+ title: gt("gui.toast.templateSaveFailed"),
1446
1485
  variant: "error",
1447
- description: result.error || "Неизвестная ошибка",
1486
+ description: result.error || gt("gui.common.unknownError"),
1448
1487
  })
1449
1488
  return
1450
1489
  }
1451
1490
  await loadTemplatesGui()
1452
1491
  const saved = (result as any).template
1453
1492
  if (saved?.id) setTemplate(`custom:${saved.id}`)
1454
- ctx.toast.show({ title: `Шаблон "${templateName}" сохранён`, variant: "success" })
1493
+ ctx.toast.show({ title: gt("gui.toast.templateSaved", { name: templateName }), variant: "success" })
1455
1494
  } catch (err: any) {
1456
1495
  console.error("RPC Error (save_template):", err)
1457
1496
  ctx.toast.show({
1458
- title: "Ошибка сохранения шаблона",
1497
+ title: gt("gui.toast.templateSaveError"),
1459
1498
  variant: "error",
1460
1499
  description: errorMessage(err),
1461
1500
  })
@@ -1464,24 +1503,24 @@ export default Plugin.define({
1464
1503
 
1465
1504
  /** Удаляет пользовательский шаблон по id. */
1466
1505
  async function handleDeleteTemplate(t: CustomTemplate) {
1467
- if (!window.confirm(`Удалить шаблон "${t.name}"?`)) return
1506
+ if (!window.confirm(gt("gui.templates.deleteConfirm", { name: t.name }))) return
1468
1507
  try {
1469
1508
  const result = await rpc.delete_template({ id: t.id })
1470
1509
  if (!result.success) {
1471
1510
  ctx.toast.show({
1472
- title: "Не удалось удалить шаблон",
1511
+ title: gt("gui.toast.templateDeleteFailed"),
1473
1512
  variant: "error",
1474
- description: result.error || "Неизвестная ошибка",
1513
+ description: result.error || gt("gui.common.unknownError"),
1475
1514
  })
1476
1515
  return
1477
1516
  }
1478
1517
  if (template() === `custom:${t.id}`) setTemplate("custom")
1479
1518
  await loadTemplatesGui()
1480
- ctx.toast.show({ title: `Шаблон "${t.name}" удалён`, variant: "success" })
1519
+ ctx.toast.show({ title: gt("gui.toast.templateDeleted", { name: t.name }), variant: "success" })
1481
1520
  } catch (err: any) {
1482
1521
  console.error("RPC Error (delete_template):", err)
1483
1522
  ctx.toast.show({
1484
- title: "Ошибка удаления шаблона",
1523
+ title: gt("gui.toast.templateDeleteError"),
1485
1524
  variant: "error",
1486
1525
  description: errorMessage(err),
1487
1526
  })
@@ -1542,7 +1581,7 @@ export default Plugin.define({
1542
1581
  } catch (err: any) {
1543
1582
  console.error("RPC Error (get_tasks):", err)
1544
1583
  // Оставляем старые данные на экране, не роняем UI
1545
- ctx.toast.show({ title: "Ошибка загрузки задач", variant: "error", description: shortError(errorMessage(err)) })
1584
+ ctx.toast.show({ title: gt("gui.toast.jobsLoadFailed"), variant: "error", description: shortError(errorMessage(err)) })
1546
1585
  }
1547
1586
  }
1548
1587
 
@@ -1562,7 +1601,7 @@ export default Plugin.define({
1562
1601
  setHistory(result.records ?? [])
1563
1602
  } catch (err: any) {
1564
1603
  console.error("RPC Error (get_history):", err)
1565
- ctx.toast.show({ title: "Ошибка загрузки истории", variant: "error", description: errorMessage(err) })
1604
+ ctx.toast.show({ title: gt("gui.toast.historyLoadFailed"), variant: "error", description: errorMessage(err) })
1566
1605
  }
1567
1606
  }
1568
1607
 
@@ -1633,12 +1672,13 @@ export default Plugin.define({
1633
1672
  workspaceId: (workspaceId() || "").trim() || undefined,
1634
1673
  allowedTools: allowedTools().length > 0 ? allowedTools() : undefined,
1635
1674
  deniedTools: deniedTools().length > 0 ? deniedTools() : undefined,
1675
+ runWhenLoggedOff: runWhenLoggedOff(),
1636
1676
  matrix: matrixPayload(),
1637
1677
  })
1638
1678
  if (!result.success) {
1639
1679
  const short = shortError(result.message)
1640
1680
  setCronError(short)
1641
- ctx.toast.show({ title: "Ошибка создания задачи", variant: "error", description: short })
1681
+ ctx.toast.show({ title: gt("gui.toast.taskCreateFailed"), variant: "error", description: short })
1642
1682
  return
1643
1683
  }
1644
1684
  // Windows регистрирует задачу в Планировщике не мгновенно:
@@ -1665,9 +1705,10 @@ export default Plugin.define({
1665
1705
  setDelaySeconds("")
1666
1706
  setSession("new")
1667
1707
  setSessionMaxRuns("")
1668
- setTimezone("")
1669
- setNotBefore("")
1670
- setNotAfter("")
1708
+ setRunWhenLoggedOff(false)
1709
+ setTimezone("")
1710
+ setNotBefore("")
1711
+ setNotAfter("")
1671
1712
  setMcpServer("")
1672
1713
  setMcpEventName("")
1673
1714
  setMcpFilter("")
@@ -1678,12 +1719,12 @@ export default Plugin.define({
1678
1719
  resetMatrixForm()
1679
1720
  setEditingJob(null)
1680
1721
  setTemplate("custom")
1681
- ctx.toast.show({ title: "Задача создана", variant: "success" })
1722
+ ctx.toast.show({ title: gt("gui.toast.taskCreated"), variant: "success" })
1682
1723
  } catch (err: any) {
1683
1724
  console.error("RPC Error (create_task):", err)
1684
1725
  const msg = shortError(errorMessage(err))
1685
1726
  setCronError(msg)
1686
- ctx.toast.show({ title: "Ошибка создания задачи", variant: "error", description: msg })
1727
+ ctx.toast.show({ title: gt("gui.toast.taskCreateFailed"), variant: "error", description: msg })
1687
1728
  } finally {
1688
1729
  setBusy(false)
1689
1730
  }
@@ -1729,7 +1770,7 @@ export default Plugin.define({
1729
1770
  const seconds = ((Number(record.durationMs) || 0) / 1000).toFixed(1)
1730
1771
  const reason = record.error ? `: ${record.error}` : ""
1731
1772
  ctx.toast.show({
1732
- title: ok ? `Задача "${jobName}" выполнена` : `Задача "${jobName}" упала`,
1773
+ title: ok ? gt("gui.toast.taskDone", { name: jobName }) : gt("gui.toast.taskCrashed", { name: jobName }),
1733
1774
  variant: ok ? "success" : "error",
1734
1775
  description: `${seconds}s${reason}`,
1735
1776
  })
@@ -1752,12 +1793,12 @@ export default Plugin.define({
1752
1793
  try {
1753
1794
  const result = await rpc.run_task({ name: jobName })
1754
1795
  if (!result.success) {
1755
- ctx.toast.show({ title: `Не удалось запустить "${jobName}"`, variant: "error", description: result.message })
1796
+ ctx.toast.show({ title: gt("gui.toast.taskStartFailed", { name: jobName }), variant: "error", description: result.message })
1756
1797
  return
1757
1798
  }
1758
1799
  // Уже выполняющаяся задача приходит как success с сообщением
1759
1800
  // «Задача ... уже выполняется» — показываем мягкое уведомление, не ошибку.
1760
- ctx.toast.show({ title: result.message || `Задача "${jobName}" запущена`, variant: "success" })
1801
+ ctx.toast.show({ title: result.message || gt("gui.toast.taskStarted", { name: jobName }), variant: "success" })
1761
1802
  // Для уже идущего запуска не ждём новую запись истории.
1762
1803
  if (!/уже выполняется/i.test(result.message || "")) {
1763
1804
  watchManualRun(jobName)
@@ -1765,7 +1806,7 @@ export default Plugin.define({
1765
1806
  await loadJobs()
1766
1807
  } catch (err: any) {
1767
1808
  console.error("RPC Error (run_task):", err)
1768
- ctx.toast.show({ title: "Ошибка запуска", variant: "error", description: errorMessage(err) })
1809
+ ctx.toast.show({ title: gt("gui.toast.runFailed"), variant: "error", description: errorMessage(err) })
1769
1810
  }
1770
1811
  }
1771
1812
 
@@ -1773,14 +1814,14 @@ export default Plugin.define({
1773
1814
  try {
1774
1815
  const result = await rpc.pause_task({ name: jobName })
1775
1816
  if (!result.success) {
1776
- ctx.toast.show({ title: `Не удалось поставить на паузу "${jobName}"`, variant: "error", description: result.message })
1817
+ ctx.toast.show({ title: gt("gui.toast.pauseFailed", { name: jobName }), variant: "error", description: result.message })
1777
1818
  return
1778
1819
  }
1779
- ctx.toast.show({ title: `Задача "${jobName}" поставлена на паузу`, variant: "success" })
1820
+ ctx.toast.show({ title: gt("gui.toast.paused", { name: jobName }), variant: "success" })
1780
1821
  await loadJobs()
1781
1822
  } catch (err: any) {
1782
1823
  console.error("RPC Error (pause_task):", err)
1783
- ctx.toast.show({ title: "Ошибка паузы", variant: "error", description: errorMessage(err) })
1824
+ ctx.toast.show({ title: gt("gui.toast.pauseError"), variant: "error", description: errorMessage(err) })
1784
1825
  }
1785
1826
  }
1786
1827
 
@@ -1788,46 +1829,46 @@ export default Plugin.define({
1788
1829
  try {
1789
1830
  const result = await rpc.resume_task({ name: jobName })
1790
1831
  if (!result.success) {
1791
- ctx.toast.show({ title: `Не удалось возобновить "${jobName}"`, variant: "error", description: result.message })
1832
+ ctx.toast.show({ title: gt("gui.toast.resumeFailed", { name: jobName }), variant: "error", description: result.message })
1792
1833
  return
1793
1834
  }
1794
- ctx.toast.show({ title: `Задача "${jobName}" возобновлена`, variant: "success" })
1835
+ ctx.toast.show({ title: gt("gui.toast.resumed", { name: jobName }), variant: "success" })
1795
1836
  await loadJobs()
1796
1837
  } catch (err: any) {
1797
1838
  console.error("RPC Error (resume_task):", err)
1798
- ctx.toast.show({ title: "Ошибка возобновления", variant: "error", description: errorMessage(err) })
1839
+ ctx.toast.show({ title: gt("gui.toast.resumeError"), variant: "error", description: errorMessage(err) })
1799
1840
  }
1800
1841
  }
1801
1842
 
1802
1843
  async function handleCancelMatrix(jobName: string) {
1803
- if (!window.confirm(`Отменить выполняющиеся клоны матрицы "${jobName}"?`)) return
1844
+ if (!window.confirm(gt("gui.matrix.cancelClonesConfirm", { name: jobName }))) return
1804
1845
  try {
1805
1846
  const result = await rpc.cancel_matrix({ name: jobName })
1806
1847
  if (!result.success) {
1807
- ctx.toast.show({ title: "Не удалось отменить матрицу", variant: "error", description: result.message })
1848
+ ctx.toast.show({ title: gt("gui.toast.matrixCancelFailed"), variant: "error", description: result.message })
1808
1849
  return
1809
1850
  }
1810
1851
  ctx.toast.show({ title: result.message, variant: "success" })
1811
1852
  await loadJobs()
1812
1853
  } catch (err: any) {
1813
1854
  console.error("RPC Error (cancel_matrix):", err)
1814
- ctx.toast.show({ title: "Ошибка отмены матрицы", variant: "error", description: errorMessage(err) })
1855
+ ctx.toast.show({ title: gt("gui.toast.matrixCancelError"), variant: "error", description: errorMessage(err) })
1815
1856
  }
1816
1857
  }
1817
1858
 
1818
1859
  async function handleDelete(jobName: string) {
1819
1860
  const target = jobs().find((job) => job.name === jobName)
1820
1861
  const message = target?.matrix
1821
- ? `Удалить матрицу "${jobName}" вместе со всеми клонами и агрегатором?`
1822
- : `Удалить задачу "${jobName}"?`
1862
+ ? gt("gui.matrix.deleteConfirm", { name: jobName })
1863
+ : gt("gui.task.deleteConfirm", { name: jobName })
1823
1864
  if (!window.confirm(message)) return
1824
1865
  try {
1825
1866
  const result = await rpc.delete_task({ name: jobName })
1826
1867
  if (!result.success) {
1827
- ctx.toast.show({ title: "Ошибка удаления", variant: "error", description: result.message })
1868
+ ctx.toast.show({ title: gt("gui.toast.deleteFailed"), variant: "error", description: result.message })
1828
1869
  return
1829
1870
  }
1830
- ctx.toast.show({ title: `Задача "${jobName}" удалена`, variant: "success" })
1871
+ ctx.toast.show({ title: gt("gui.toast.taskDeleted", { name: jobName }), variant: "success" })
1831
1872
  if (logsTask() === jobName) {
1832
1873
  setLogs("")
1833
1874
  setLogsTask(null)
@@ -1836,24 +1877,24 @@ export default Plugin.define({
1836
1877
  await loadJobs()
1837
1878
  } catch (err: any) {
1838
1879
  console.error("RPC Error (delete_task):", err)
1839
- ctx.toast.show({ title: "Ошибка удаления", variant: "error", description: errorMessage(err) })
1880
+ ctx.toast.show({ title: gt("gui.toast.deleteFailed"), variant: "error", description: errorMessage(err) })
1840
1881
  }
1841
1882
  }
1842
1883
 
1843
1884
  async function showLogs(jobName: string) {
1844
1885
  setLogsTask(jobName)
1845
- setLogs("Загрузка логов…")
1886
+ setLogs(gt("gui.logs.loading"))
1846
1887
  try {
1847
1888
  const result = await rpc.get_task_logs({ name: jobName })
1848
1889
  if (!result.success) {
1849
- setLogs(result.error || "Не удалось загрузить логи")
1850
- ctx.toast.show({ title: "Ошибка чтения логов", variant: "error", description: result.error })
1890
+ setLogs(result.error || gt("gui.logs.loadFailed"))
1891
+ ctx.toast.show({ title: gt("gui.toast.logsReadFailed"), variant: "error", description: result.error })
1851
1892
  return
1852
1893
  }
1853
- setLogs(result.logs || "(пусто)")
1894
+ setLogs(result.logs || gt("gui.logs.empty"))
1854
1895
  } catch (err: any) {
1855
1896
  console.error("RPC Error (get_task_logs):", err)
1856
- setLogs("Ошибка чтения логов: " + errorMessage(err))
1897
+ setLogs(gt("gui.logs.readError", { error: errorMessage(err) }))
1857
1898
  }
1858
1899
  }
1859
1900
 
@@ -1902,11 +1943,12 @@ export default Plugin.define({
1902
1943
  workspaceId: (workspaceId() || "").trim() || undefined,
1903
1944
  allowedTools: allowedTools().length > 0 ? allowedTools() : [],
1904
1945
  deniedTools: deniedTools().length > 0 ? deniedTools() : [],
1946
+ runWhenLoggedOff: runWhenLoggedOff(),
1905
1947
  matrix: matrixPayload(),
1906
1948
  })
1907
1949
  if (!result.success) {
1908
1950
  setCronError(result.message)
1909
- ctx.toast.show({ title: "Ошибка обновления задачи", variant: "error", description: result.message })
1951
+ ctx.toast.show({ title: gt("gui.toast.taskUpdateFailed"), variant: "error", description: result.message })
1910
1952
  return
1911
1953
  }
1912
1954
  setEditingJob(null)
@@ -1927,9 +1969,10 @@ export default Plugin.define({
1927
1969
  setDelaySeconds("")
1928
1970
  setSession("new")
1929
1971
  setSessionMaxRuns("")
1930
- setTimezone("")
1931
- setNotBefore("")
1932
- setNotAfter("")
1972
+ setRunWhenLoggedOff(false)
1973
+ setTimezone("")
1974
+ setNotBefore("")
1975
+ setNotAfter("")
1933
1976
  setMcpServer("")
1934
1977
  setMcpEventName("")
1935
1978
  setMcpFilter("")
@@ -1940,12 +1983,12 @@ export default Plugin.define({
1940
1983
  resetMatrixForm()
1941
1984
  setCronPreset("* * * * *")
1942
1985
  await loadJobs()
1943
- ctx.toast.show({ title: "Задача обновлена", variant: "success" })
1986
+ ctx.toast.show({ title: gt("gui.toast.taskUpdated"), variant: "success" })
1944
1987
  } catch (err: any) {
1945
1988
  console.error("RPC Error (update_task):", err)
1946
1989
  const msg = errorMessage(err)
1947
1990
  setCronError(msg)
1948
- ctx.toast.show({ title: "Ошибка обновления задачи", variant: "error", description: msg })
1991
+ ctx.toast.show({ title: gt("gui.toast.taskUpdateFailed"), variant: "error", description: msg })
1949
1992
  } finally {
1950
1993
  setBusy(false)
1951
1994
  }
@@ -1980,6 +2023,7 @@ export default Plugin.define({
1980
2023
  setRunAt(job.runAt ?? "")
1981
2024
  setDelaySeconds("")
1982
2025
  setSession(job.session === "reuse" || job.session === "last" ? job.session : "new")
2026
+ setRunWhenLoggedOff(job.runWhenLoggedOff === true)
1983
2027
  setSessionMaxRuns(
1984
2028
  typeof job.sessionMaxRuns === "number" ? String(job.sessionMaxRuns) : ""
1985
2029
  )
@@ -2044,36 +2088,36 @@ export default Plugin.define({
2044
2088
 
2045
2089
  const validationError = (): string => {
2046
2090
  const taskName = (name() || "").trim()
2047
- if (!taskName) return "Укажите имя задачи."
2048
- if (!(prompt() || "").trim()) return "Укажите промпт."
2049
- if (triggerType() === "cron" && !(schedule() || "").trim()) return "Укажите cron-расписание."
2091
+ if (!taskName) return gt("gui.validation.taskNameRequired")
2092
+ if (!(prompt() || "").trim()) return gt("gui.validation.promptRequired")
2093
+ if (triggerType() === "cron" && !(schedule() || "").trim()) return gt("gui.validation.cronRequired")
2050
2094
  if (triggerType() === "once" && !(runAt() || "").trim() && !(delaySeconds() || "").trim()) {
2051
- return "Укажите время запуска или задержку."
2095
+ return gt("gui.validation.runAtRequired")
2052
2096
  }
2053
2097
  // Спринт 27: git-триггер работает только в git-репозитории задачи.
2054
2098
  if (triggerType() === "git" && !(workspaceId() || "").trim() && !(workingDirectory() || "").trim()) {
2055
- return "Для git-триггера выберите workspace или укажите рабочую директорию."
2099
+ return gt("gui.validation.gitWorkspaceRequired")
2056
2100
  }
2057
2101
  if ((gitPollSeconds() || "").trim() && !/^([5-9]|[1-9]\d+)$/.test(gitPollSeconds().trim())) {
2058
- return "Период опроса git — целое число секунд не меньше 5."
2102
+ return gt("gui.validation.gitPollInvalid")
2059
2103
  }
2060
- if (matrixMode() && matrixWorkspaceIds().length === 0) return "Выберите хотя бы один workspace для матрицы."
2104
+ if (matrixMode() && matrixWorkspaceIds().length === 0) return gt("gui.validation.matrixWorkspacesRequired")
2061
2105
  if (session() === "reuse" && (sessionMaxRuns() || "").trim() && !/^[1-9]\d*$/.test(sessionMaxRuns().trim())) {
2062
- return "Лимит запусков сессии — целое положительное число."
2106
+ return gt("gui.validation.sessionMaxRunsInvalid")
2063
2107
  }
2064
2108
  if (matrixMode() && (matrixConcurrency() || "").trim() && !/^[1-9]\d*$/.test(matrixConcurrency().trim())) {
2065
- return "Concurrency матрицы — целое положительное число."
2109
+ return gt("gui.validation.matrixConcurrencyInvalid")
2066
2110
  }
2067
2111
  if (((notBefore() || "").trim() === "") !== ((notAfter() || "").trim() === "")) {
2068
- return "Окно запуска задаётся только парой «с/по»."
2112
+ return gt("gui.validation.windowPairRequired")
2069
2113
  }
2070
- if (!validTimezone()) return "Неизвестная таймзона. Укажите IANA-пояс, например Europe/Moscow."
2071
- if (!isIntInRange(priority(), 0, 10)) return "Приоритет — целое число от 0 до 10."
2072
- if (!isIntInRange(retryCount(), 0)) return "Количество повторов — целое число ≥ 0."
2073
- if (!isIntInRange(retryDelay(), 0)) return "Задержка повтора — целое число секунд ≥ 0."
2114
+ if (!validTimezone()) return gt("gui.validation.timezoneInvalid")
2115
+ if (!isIntInRange(priority(), 0, 10)) return gt("gui.validation.priorityInvalid")
2116
+ if (!isIntInRange(retryCount(), 0)) return gt("gui.validation.retryCountInvalid")
2117
+ if (!isIntInRange(retryDelay(), 0)) return gt("gui.validation.retryDelayInvalid")
2074
2118
  const self = taskName.toLowerCase()
2075
2119
  if (dependsOn().some((dep) => dep.trim().toLowerCase() === self)) {
2076
- return "Задача не может зависеть от самой себя."
2120
+ return gt("gui.validation.dependsOnSelf")
2077
2121
  }
2078
2122
  return ""
2079
2123
  }
@@ -2161,44 +2205,60 @@ export default Plugin.define({
2161
2205
  )}
2162
2206
  {job.isMatrixParent && job.matrix && (
2163
2207
  <span
2164
- title={`Matrix fan-out: ${job.matrix.workspaceIds.length} клонов, стратегия: ${job.matrix.strategy ?? "parallel"}, при ошибке: ${job.matrix.failureMode ?? "continue"}${
2165
- job.matrix.concurrency
2166
- ? `, одновременно: ${job.matrix.concurrency}`
2167
- : ""
2168
- }${
2169
- job.matrix.overrides
2170
- ? `, переопределено workspace: ${Object.keys(job.matrix.overrides).length}`
2171
- : ""
2172
- }`}
2208
+ title={gt("gui.job.fanoutTitle", {
2209
+ count: job.matrix.workspaceIds.length,
2210
+ strategy: job.matrix.strategy ?? "parallel",
2211
+ failureMode: job.matrix.failureMode ?? "continue",
2212
+ concurrency: job.matrix.concurrency
2213
+ ? gt("gui.job.fanoutConcurrency", { concurrency: job.matrix.concurrency })
2214
+ : "",
2215
+ overrides: job.matrix.overrides
2216
+ ? gt("gui.job.fanoutOverrides", { overrides: Object.keys(job.matrix.overrides).length })
2217
+ : "",
2218
+ })}
2173
2219
  style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)"
2174
2220
  >📦 Matrix ({job.matrix.workspaceIds.length}){job.matrix.concurrency ? ` ⚙${job.matrix.concurrency}` : ""}</span>
2175
2221
  )}
2176
2222
  {job.matrixParentId && (
2177
2223
  <span
2178
- title={`Клон матрицы. Родитель: ${job.matrixParentId}`}
2224
+ title={gt("gui.job.matrixClone", { parent: job.matrixParentId })}
2179
2225
  style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #8e8e93;color:#b0b0b6;background:rgba(142,142,147,0.12)"
2180
2226
  >↳ matrix {job.matrixParentId}</span>
2181
2227
  )}
2182
2228
  {job.watchPath && (
2183
- <span title={`Отслеживание файла: ${job.watchPath}`} style="font-size:13px;flex-shrink:0;cursor:help">👁️</span>
2229
+ <span title={gt("gui.job.watchFile", { path: job.watchPath })} style="font-size:13px;flex-shrink:0;cursor:help">👁️</span>
2184
2230
  )}
2185
2231
  {Array.isArray(job.watchGlobs) && job.watchGlobs.length > 0 && (
2186
- <span title={`Glob-маски файлового триггера: ${job.watchGlobs.join(", ")}`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #5ac8fa;color:#5ac8fa;background:rgba(90,200,250,0.12)">✳ {job.watchGlobs.length} масок</span>
2232
+ <span title={gt("gui.job.watchGlobsTitle", { globs: job.watchGlobs.join(", ") })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #5ac8fa;color:#5ac8fa;background:rgba(90,200,250,0.12)">{gt("gui.job.watchGlobsCount", { count: job.watchGlobs.length })}</span>
2187
2233
  )}
2188
2234
  {job.triggerType === "git" && (
2189
- <span title={`Git-триггер: новый коммит${job.gitBranch ? ` в ветке ${job.gitBranch}` : ""}${Array.isArray(job.gitPaths) && job.gitPaths.length > 0 ? `, пути: ${job.gitPaths.join(", ")}` : ""}. Опрос каждые ${job.gitPollSeconds ?? 60} с.`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">🔀 git</span>
2235
+ <span title={gt("gui.job.gitTriggerTitle", {
2236
+ branch: job.gitBranch ? gt("gui.job.gitTriggerBranch", { branch: job.gitBranch }) : "",
2237
+ paths: Array.isArray(job.gitPaths) && job.gitPaths.length > 0 ? gt("gui.job.gitTriggerPaths", { paths: job.gitPaths.join(", ") }) : "",
2238
+ seconds: job.gitPollSeconds ?? 60,
2239
+ })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">🔀 git</span>
2190
2240
  )}
2191
2241
  {Array.isArray(job.activeDays) && job.activeDays.length > 0 && (
2192
- <span title={`Запуск только в дни: ${job.activeDays.map((d) => ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"][d] ?? d).join(", ")}`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">📅 {job.activeDays.length}/7</span>
2242
+ <span title={gt("gui.job.activeDaysTitle", { days: job.activeDays.map((d) => [gt("gui.weekday.0"), gt("gui.weekday.1"), gt("gui.weekday.2"), gt("gui.weekday.3"), gt("gui.weekday.4"), gt("gui.weekday.5"), gt("gui.weekday.6")][d] ?? d).join(", ") })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">📅 {job.activeDays.length}/7</span>
2193
2243
  )}
2194
2244
  {job.timezone && (
2195
- <span title={`Часовой пояс задачи: ${job.timezone}`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #64d2ff;color:#64d2ff;background:rgba(100,210,255,0.12)">🌍 {job.timezone}</span>
2245
+ <span title={gt("gui.job.timezoneTitle", { tz: job.timezone })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #64d2ff;color:#64d2ff;background:rgba(100,210,255,0.12)">🌍 {job.timezone}</span>
2196
2246
  )}
2197
2247
  {job.notBefore && job.notAfter && (
2198
- <span title={`Окно запуска: ${job.notBefore}–${job.notAfter}. Вне окна запуск переносится на его открытие.`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #bf5af2;color:#bf5af2;background:rgba(191,90,242,0.12)">🪟 {job.notBefore}–{job.notAfter}</span>
2248
+ <span title={gt("gui.job.windowTitle", { from: job.notBefore, to: job.notAfter })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #bf5af2;color:#bf5af2;background:rgba(191,90,242,0.12)">🪟 {job.notBefore}–{job.notAfter}</span>
2199
2249
  )}
2200
2250
  {job.pausedUntil && (
2201
- <span title={`Пауза до ${new Date(job.pausedUntil).toLocaleString()} — задача включится автоматически.`} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ffd60a;color:#ffd60a;background:rgba(255,214,10,0.12)">⏸ до {new Date(job.pausedUntil).toLocaleDateString()}</span>
2251
+ <span title={gt("gui.job.pausedUntilTitle", { date: new Date(job.pausedUntil).toLocaleString() })} style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ffd60a;color:#ffd60a;background:rgba(255,214,10,0.12)">{gt("gui.job.pausedUntilShort", { date: new Date(job.pausedUntil).toLocaleDateString() })}</span>
2252
+ )}
2253
+ {job.runWhenLoggedOff && (
2254
+ <span
2255
+ title={gt("gui.job.runWhenLoggedOffTitle", {
2256
+ mode: job.logonMode ?? gt("gui.job.logonModeUnknown"),
2257
+ })}
2258
+ style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)"
2259
+ >
2260
+ 🌙 {gt("gui.job.runWhenLoggedOffShort")}
2261
+ </span>
2202
2262
  )}
2203
2263
  {(job.beforeScript || job.afterScript) && (
2204
2264
  <span
@@ -2208,37 +2268,42 @@ export default Plugin.define({
2208
2268
  )}
2209
2269
  {job.triggerType === "mcp-event" && (
2210
2270
  <span
2211
- title={`MCP-событие: ${job.mcpEvent?.event ?? "—"}${job.mcpEvent?.filter ? ` (фильтр: ${job.mcpEvent.filter})` : ""}`}
2271
+ title={gt("gui.job.mcpEventTitle", {
2272
+ event: job.mcpEvent?.event ?? "—",
2273
+ filterSuffix: job.mcpEvent?.filter ? gt("gui.job.mcpEventFilterSuffix", { filter: job.mcpEvent.filter }) : "",
2274
+ })}
2212
2275
  style="font-size:13px;flex-shrink:0;cursor:help"
2213
2276
  >📡</span>
2214
2277
  )}
2215
2278
  {job.session && job.session !== "new" && (
2216
2279
  <span
2217
2280
  title={job.session === "reuse"
2218
- ? `Переиспользуемая сессия OpenCode${job.sessionId ? `: ${job.sessionId}` : ""}`
2219
- : "Продолжение последней сессии OpenCode (--continue)"}
2281
+ ? (job.sessionId
2282
+ ? gt("gui.job.sessionReuseTitleId", { id: job.sessionId })
2283
+ : gt("gui.job.sessionReuseTitle"))
2284
+ : gt("gui.job.sessionContinueTitle")}
2220
2285
  style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)"
2221
- >{job.session === "reuse" ? "⟳ сессия" : "↪ продолжение"}</span>
2286
+ >{job.session === "reuse" ? gt("gui.job.sessionReuseShort") : gt("gui.job.sessionContinueShort")}</span>
2222
2287
  )}
2223
2288
  {job.model && (
2224
- <span title={`Модель LLM: ${job.model}`} style="font-size:12px;flex-shrink:0;cursor:help;color:#c084fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px">🧠 {job.model}</span>
2289
+ <span title={gt("gui.job.modelTitle", { model: job.model })} style="font-size:12px;flex-shrink:0;cursor:help;color:#c084fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px">🧠 {job.model}</span>
2225
2290
  )}
2226
2291
  {typeof job.priority === "number" && job.priority !== DEFAULT_PRIORITY && (
2227
- <span title={`Приоритет: ${priorityLabel(job.priority)} (${job.priority})`} style="font-size:12px;flex-shrink:0;cursor:help;color:#f5a623;white-space:nowrap">🚀 {priorityLabel(job.priority)}</span>
2292
+ <span title={gt("gui.job.priorityTitle", { label: priorityLabel(job.priority), priority: job.priority })} style="font-size:12px;flex-shrink:0;cursor:help;color:#f5a623;white-space:nowrap">🚀 {priorityLabel(job.priority)}</span>
2228
2293
  )}
2229
2294
  {(Array.isArray(job.allowedTools) && job.allowedTools.length > 0) || (Array.isArray(job.deniedTools) && job.deniedTools.length > 0) ? (
2230
2295
  <span
2231
- title={`Ограничения инструментов: ${[
2296
+ title={gt("gui.job.toolLimitsTitle", { limits: [
2232
2297
  job.allowedTools?.length ? `allowed=[${job.allowedTools.join(", ")}]` : "",
2233
2298
  job.deniedTools?.length ? `denied=[${job.deniedTools.join(", ")}]` : "",
2234
- ].filter(Boolean).join(" · ")}`}
2299
+ ].filter(Boolean).join(" · ") })}
2235
2300
  style="font-size:13px;flex-shrink:0;cursor:help"
2236
2301
  >🔒</span>
2237
2302
  ) : null}
2238
2303
  </div>
2239
2304
  {Array.isArray(job.dependsOn) && job.dependsOn.length > 0 && (
2240
2305
  <div style="display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35">
2241
- <span style="color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">🔗 Зависит от: {job.dependsOn.join(" + ")}</span>
2306
+ <span style="color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">{gt("gui.job.dependsOn", { list: job.dependsOn.join(" + ") })}</span>
2242
2307
  </div>
2243
2308
  )}
2244
2309
  {job.isMatrixParent && job.matrixSummary && (
@@ -2247,17 +2312,17 @@ export default Plugin.define({
2247
2312
  title={job.matrixSummary.message}
2248
2313
  style={`cursor:help;color:${statusColor(job.matrixSummary.status as JobStatus)};white-space:nowrap;overflow:hidden;text-overflow:ellipsis`}
2249
2314
  >
2250
- 📦 Matrix: {job.matrixSummary.successCount}/{job.matrixSummary.totalCount} успешных
2315
+ {gt("gui.job.matrixDone", { success: job.matrixSummary.successCount, total: job.matrixSummary.totalCount })}
2251
2316
  {job.matrixSummary.errorCount > 0 ? ` · ❌ ${job.matrixSummary.errorCount}` : ""}
2252
2317
  {job.matrixSummary.pendingCount > 0 ? ` · ⏳ ${job.matrixSummary.pendingCount}` : ""}
2253
2318
  </span>
2254
2319
  </div>
2255
2320
  )}
2256
2321
  <div
2257
- title="Запуски именно этой задачи: успешные / частичные / ошибки и таймауты"
2322
+ title={gt("gui.job.runsTitle")}
2258
2323
  style="font-size:12px;color:#a0a0a6;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
2259
2324
  >
2260
- 📊 Всего: {job.runsTotal ?? 0} | ✅ {job.runsSuccess ?? 0} | 🟠 {job.runsPartial ?? 0} | ❌ {job.runsError ?? 0}
2325
+ {gt("gui.job.runsLine", { total: job.runsTotal ?? 0, success: job.runsSuccess ?? 0, partial: job.runsPartial ?? 0, error: job.runsError ?? 0 })}
2261
2326
  </div>
2262
2327
  {(job.schedule || job.nextRun) && (
2263
2328
  <div style="display:flex;align-items:center;gap:8px;font-size:12px;color:#a0a0a6;margin-top:2px">
@@ -2269,23 +2334,23 @@ export default Plugin.define({
2269
2334
  <div style="display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:110px">
2270
2335
  {job.status === "running" ? (
2271
2336
  <div style="font-size:12px;color:#f5a623;font-weight:600;white-space:nowrap">
2272
- 🟡 Выполняется: {runningSec()} сек
2337
+ {gt("gui.jobStatus.running", { seconds: runningSec() })}
2273
2338
  </div>
2274
2339
  ) : (
2275
2340
  <div style="font-size:12px;font-weight:600;white-space:nowrap">
2276
2341
  {job.orphaned
2277
- ? "🧟 Нет в планировщике"
2342
+ ? gt("gui.jobStatus.orphan")
2278
2343
  : job.paused
2279
- ? "⏸ Пауза"
2344
+ ? gt("gui.jobStatus.paused")
2280
2345
  : job.status === "success"
2281
- ? "🟢 Готова"
2346
+ ? gt("gui.jobStatus.success")
2282
2347
  : job.status === "error"
2283
- ? "🔴 Ошибка"
2348
+ ? gt("gui.jobStatus.error")
2284
2349
  : job.status === "partial"
2285
- ? "🟠 Частично"
2350
+ ? gt("gui.jobStatus.partial")
2286
2351
  : job.status === "idle"
2287
- ? "⚪ Не запускалась"
2288
- : "⚪ Неизвестно"}
2352
+ ? gt("gui.jobStatus.never")
2353
+ : gt("gui.jobStatus.unknown")}
2289
2354
  </div>
2290
2355
  )}
2291
2356
  </div>
@@ -2293,7 +2358,7 @@ export default Plugin.define({
2293
2358
  <div style="display:flex;gap:6px">
2294
2359
  <button
2295
2360
  onClick={() => void handleRun(job.name)}
2296
- title={`Запустить "${job.name}"`}
2361
+ title={gt("gui.job.runTitle", { name: job.name })}
2297
2362
  style={iconButtonStyle()}
2298
2363
  onMouseEnter={(e) => {
2299
2364
  iconHover(e, true)
@@ -2314,10 +2379,10 @@ export default Plugin.define({
2314
2379
  disabled={!!job.orphaned}
2315
2380
  title={
2316
2381
  job.orphaned
2317
- ? `Задача "${job.name}" отсутствует в планировщике ОС — пауза недоступна`
2382
+ ? gt("gui.job.pauseUnavailable", { name: job.name })
2318
2383
  : job.paused
2319
- ? `Возобновить "${job.name}"`
2320
- : `Поставить на паузу "${job.name}"`
2384
+ ? gt("gui.job.resumeTitle", { name: job.name })
2385
+ : gt("gui.job.pauseTitle", { name: job.name })
2321
2386
  }
2322
2387
  style={iconButtonStyle()}
2323
2388
  onMouseEnter={(e) => iconHover(e, true)}
@@ -2327,7 +2392,7 @@ export default Plugin.define({
2327
2392
  </button>
2328
2393
  <button
2329
2394
  onClick={() => void showLogs(job.name)}
2330
- title={`Логи "${job.name}"`}
2395
+ title={gt("gui.job.logsTitle", { name: job.name })}
2331
2396
  style={iconButtonStyle()}
2332
2397
  onMouseEnter={(e) => iconHover(e, true)}
2333
2398
  onMouseLeave={(e) => iconHover(e, false)}
@@ -2336,7 +2401,7 @@ export default Plugin.define({
2336
2401
  </button>
2337
2402
  <button
2338
2403
  onClick={() => void openDryRun(job.name)}
2339
- title={`Dry-Run симуляция "${job.name}"`}
2404
+ title={gt("gui.job.dryRunTitle", { name: job.name })}
2340
2405
  style={iconButtonStyle(dryRunOpen() && dryRunName() === job.name)}
2341
2406
  onMouseEnter={(e) => iconHover(e, true, dryRunOpen() && dryRunName() === job.name)}
2342
2407
  onMouseLeave={(e) => iconHover(e, false, dryRunOpen() && dryRunName() === job.name)}
@@ -2345,7 +2410,7 @@ export default Plugin.define({
2345
2410
  </button>
2346
2411
  <button
2347
2412
  onClick={() => void fetchHistory(job.name)}
2348
- title={`История "${job.name}"`}
2413
+ title={gt("gui.job.historyTitle", { name: job.name })}
2349
2414
  style={iconButtonStyle(historyOpen() === job.name)}
2350
2415
  onMouseEnter={(e) => iconHover(e, true, historyOpen() === job.name)}
2351
2416
  onMouseLeave={(e) => iconHover(e, false, historyOpen() === job.name)}
@@ -2354,7 +2419,7 @@ export default Plugin.define({
2354
2419
  </button>
2355
2420
  <button
2356
2421
  onClick={() => void startEditing(job)}
2357
- title={`Редактировать "${job.name}"`}
2422
+ title={gt("gui.job.editTitle", { name: job.name })}
2358
2423
  style={iconButtonStyle()}
2359
2424
  onMouseEnter={(e) => iconHover(e, true)}
2360
2425
  onMouseLeave={(e) => iconHover(e, false)}
@@ -2364,7 +2429,7 @@ export default Plugin.define({
2364
2429
  {job.matrix && (
2365
2430
  <button
2366
2431
  onClick={() => void handleCancelMatrix(job.name)}
2367
- title={`Отменить выполняющиеся клоны матрицы "${job.name}"`}
2432
+ title={gt("gui.job.cancelMatrixTitle", { name: job.name })}
2368
2433
  style={iconButtonStyle()}
2369
2434
  onMouseEnter={(e) => iconHover(e, true)}
2370
2435
  onMouseLeave={(e) => iconHover(e, false)}
@@ -2375,7 +2440,7 @@ export default Plugin.define({
2375
2440
  {!job.matrixParentId && (
2376
2441
  <button
2377
2442
  onClick={() => void handleDelete(job.name)}
2378
- title={job.matrix ? `Удалить матрицу "${job.name}" вместе с клонами` : `Удалить "${job.name}"`}
2443
+ title={job.matrix ? gt("gui.job.deleteMatrixTitle", { name: job.name }) : gt("gui.job.deleteTitle", { name: job.name })}
2379
2444
  style={iconButtonStyle()}
2380
2445
  onMouseEnter={(e) => iconHover(e, true)}
2381
2446
  onMouseLeave={(e) => iconHover(e, false)}
@@ -2388,7 +2453,7 @@ export default Plugin.define({
2388
2453
  {historyOpen() === job.name && (
2389
2454
  <div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%">
2390
2455
  <div style="font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px">
2391
- 📜 История последних запусков
2456
+ {gt("gui.job.historyPanelTitle")}
2392
2457
  <button
2393
2458
  onClick={() => setHistoryOpen(null)}
2394
2459
  style="background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0"
@@ -2399,17 +2464,17 @@ export default Plugin.define({
2399
2464
  </button>
2400
2465
  </div>
2401
2466
  {history().length === 0 ? (
2402
- <div style="font-size:12px;color:#8e8e93;padding:6px 0">Запусков пока нет.</div>
2467
+ <div style="font-size:12px;color:#8e8e93;padding:6px 0">{gt("gui.job.historyEmpty")}</div>
2403
2468
  ) : (
2404
2469
  history().map((r) => (
2405
2470
  <div key={r.startedAt + r.durationMs} style="display:flex;align-items:flex-start;gap:10px;font-size:12px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333">
2406
2471
  <span style="color:#8e8e93;white-space:nowrap">{new Date(r.startedAt).toLocaleString()}</span>
2407
2472
  <span style={{color: r.status === "success" ? "#34c759" : "#ff3b30", fontWeight: 600, whiteSpace: "nowrap"}}>
2408
- {r.status === "success" ? "✅ Успех" : "❌ Ошибка"}
2473
+ {r.status === "success" ? gt("gui.history.success") : gt("gui.history.error")}
2409
2474
  </span>
2410
- <span style="color:#b0b0b0;white-space:nowrap">{r.durationMs} мс</span>
2475
+ <span style="color:#b0b0b0;white-space:nowrap">{gt("gui.history.durationMs", { ms: r.durationMs })}</span>
2411
2476
  {r.model && (
2412
- <span style="color:#c084fc;white-space:nowrap" title={`Модель: ${r.model}`}>🧠 {r.model}</span>
2477
+ <span style="color:#c084fc;white-space:nowrap" title={gt("gui.history.modelTitle", { model: r.model })}>🧠 {r.model}</span>
2413
2478
  )}
2414
2479
  {r.preFlightStatus && r.preFlightStatus !== "skipped" && (
2415
2480
  <span
@@ -2431,7 +2496,7 @@ export default Plugin.define({
2431
2496
  <div style="margin-top:2px;color:#ff6b6b;font-size:11px;white-space:pre-wrap;word-break:break-word">{r.error}</div>
2432
2497
  )}
2433
2498
  {r.nextTask && (
2434
- <span style="color:#5ac8fa;font-size:11px;white-space:nowrap" title="Запущена следующая задача в цепочке">🔗 → {r.nextTask}</span>
2499
+ <span style="color:#5ac8fa;font-size:11px;white-space:nowrap" title={gt("gui.history.nextTaskTitle")}>🔗 → {r.nextTask}</span>
2435
2500
  )}
2436
2501
  </div>
2437
2502
  ))
@@ -2451,9 +2516,9 @@ export default Plugin.define({
2451
2516
  ✕
2452
2517
  </button>
2453
2518
  </div>
2454
- {dryRunBusy() && <div style="font-size:12px;color:#8e8e93;padding:6px 0">Симуляция…</div>}
2519
+ {dryRunBusy() && <div style="font-size:12px;color:#8e8e93;padding:6px 0">{gt("gui.job.simulating")}</div>}
2455
2520
  {!dryRunBusy() && dryRunReport() && !dryRunReport().success && (
2456
- <div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ {dryRunReport().error ?? "Симуляция не удалась"}</div>
2521
+ <div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ {dryRunReport().error ?? gt("gui.job.simulationFailed")}</div>
2457
2522
  )}
2458
2523
  {!dryRunBusy() && dryRunReport() && dryRunReport().success && (
2459
2524
  <div style="display:flex;flex-direction:column;gap:4px">
@@ -2468,10 +2533,10 @@ export default Plugin.define({
2468
2533
  <span style="font-weight:600;white-space:nowrap">🧪 {t.name}</span>
2469
2534
  {t.workspace && <span style="color:#5ac8fa;white-space:nowrap">📦 {t.workspace.name}</span>}
2470
2535
  {t.matrixParent && <span style="color:#ff9f0a;white-space:nowrap">↳ matrix {t.matrixParent}</span>}
2471
- <span style="color:#8e8e93;white-space:nowrap">cwd: {t.cwd || "(папка проекта)"}</span>
2536
+ <span style="color:#8e8e93;white-space:nowrap">cwd: {t.cwd || gt("gui.common.projectDir")}</span>
2472
2537
  {t.roleScoped && <span style="cursor:help" title={`allowed=[${(t.roleScoped.allowed ?? []).join(", ")}] · denied=[${(t.roleScoped.denied ?? []).join(", ")}]`}>🔒</span>}
2473
- {t.estimatedDurationSec != null && <span style="color:#8e8e93;white-space:nowrap">⏱ ~{t.estimatedDurationSec} с</span>}
2474
- {t.estimatedTokens != null && <span style="color:#8e8e93;white-space:nowrap">· ~{t.estimatedTokens} ток.</span>}
2538
+ {t.estimatedDurationSec != null && <span style="color:#8e8e93;white-space:nowrap">{gt("gui.job.durationEst", { seconds: t.estimatedDurationSec })}</span>}
2539
+ {t.estimatedTokens != null && <span style="color:#8e8e93;white-space:nowrap">{gt("gui.job.tokensEst", { tokens: t.estimatedTokens })}</span>}
2475
2540
  {t.estimatedCostUsd != null && <span style="color:#8e8e93;white-space:nowrap">· ~${Number(t.estimatedCostUsd).toFixed(4)}</span>}
2476
2541
  <div style="width:100%;color:#a0a0a6;overflow-wrap:anywhere">$ {t.command}</div>
2477
2542
  {t.preFlight && <div style="width:100%;color:#8e8e93;overflow-wrap:anywhere">⚡ pre: {t.preFlight}</div>}
@@ -2481,9 +2546,11 @@ export default Plugin.define({
2481
2546
  ))}
2482
2547
  {dryRunReport().totals && (dryRunReport().totals.estimatedDurationSec != null || dryRunReport().totals.estimatedTokens != null) && (
2483
2548
  <div style="font-size:11px;color:#b0b0b0;padding:4px 0">
2484
- Σ {(dryRunReport().totals.estimatedDurationSec ?? "—") + " с · " +
2485
- (dryRunReport().totals.estimatedTokens ?? "—") + " токенов" +
2486
- (dryRunReport().totals.estimatedCostUsd != null ? ` · ~$${Number(dryRunReport().totals.estimatedCostUsd).toFixed(4)}` : "")}
2549
+ {gt("gui.job.totalsLine", {
2550
+ duration: dryRunReport().totals.estimatedDurationSec ?? "—",
2551
+ tokens: dryRunReport().totals.estimatedTokens ?? "—",
2552
+ cost: dryRunReport().totals.estimatedCostUsd != null ? ` · ~$${Number(dryRunReport().totals.estimatedCostUsd).toFixed(4)}` : "",
2553
+ })}
2487
2554
  </div>
2488
2555
  )}
2489
2556
  </div>
@@ -2498,14 +2565,16 @@ export default Plugin.define({
2498
2565
  return ctx.add(Panel, {
2499
2566
  id: "scheduler-jobs",
2500
2567
  region: "side",
2501
- list: () => [{ id: "jobs", title: "Планировщик", pinned: true }],
2568
+ list: () => [{ id: "jobs", title: gt("gui.jobsTitle"), pinned: true }],
2502
2569
  render: () => (
2503
2570
  <ErrorBoundary fallback={(err: any) => (
2504
2571
  <div style="padding:16px;color:#ff3b30;font-size:13px">
2505
- Ошибка UI: {err.message}
2572
+ {gt("gui.uiError", { message: err.message })}
2506
2573
  </div>
2507
2574
  )}>
2508
- <div style={`display:flex;flex-direction:column;width:100%;height:100%;max-height:100vh;min-height:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;gap:24px;padding:20px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;transition:background 0.3s ease;scrollbar-width:thin;scrollbar-color:#444 transparent;background:${winterMode() ? "linear-gradient(180deg, #0f172a 0%, #000000 100%)" : "#0f0f0f"}`}>
2575
+ <div class="scheduler-panel-root" style={`display:flex;flex-direction:column;width:100%;height:100%;max-height:100vh;min-height:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;gap:24px;padding:20px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;transition:background 0.3s ease;scrollbar-width:thin;scrollbar-color:#444 transparent;background:${winterMode() ? "linear-gradient(180deg, #0f172a 0%, #000000 100%)" : "#0f0f0f"}`}>
2576
+ {/* Прокручивается корень, а не дети: иначе короткий viewport сжимает карточки до 2px. */}
2577
+ <style>{`.scheduler-panel-root > * { flex-shrink: 0; }`}</style>
2509
2578
  <div style="display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap">
2510
2579
  <div style="min-width:0">
2511
2580
  <h2 style="margin:0;font-size:22px;font-weight:800;letter-spacing:0.2px;line-height:1.2;color:#ffffff">
@@ -2515,30 +2584,30 @@ export default Plugin.define({
2515
2584
  Local AI CI/CD Orchestrator
2516
2585
  </div>
2517
2586
  <div
2518
- title="Суммарные метрики по всем задачам (включая архивные записи метрик)"
2587
+ title={gt("gui.metricsTotalsTitle")}
2519
2588
  style="margin-top:4px;font-size:11px;color:#8e8e93"
2520
2589
  >
2521
- 📊 Всего по всем задачам: {metrics().total} · ✅ {metrics().success} · ❌ {metrics().error}
2590
+ {gt("gui.metricsTotalsLine", { total: metrics().total, success: metrics().success, error: metrics().error })}
2522
2591
  </div>
2523
2592
  </div>
2524
2593
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
2525
2594
  <select
2526
2595
  value={workspaceFilter()}
2527
2596
  onChange={(e) => setWorkspaceFilter(e.currentTarget.value)}
2528
- title="Фильтр задач по workspace"
2597
+ title={gt("gui.workspaceFilterTitle")}
2529
2598
  style="padding:6px 10px;border-radius:999px;cursor:pointer;font-size:12px;border:1px solid #333;background:#1e1e1e;color:#e0e0e0;outline:none;max-width:200px"
2530
2599
  >
2531
- <option value="all">Все workspace</option>
2600
+ <option value="all">{gt("gui.workspaceAll")}</option>
2532
2601
  {workspaces().map((workspace) => (
2533
2602
  <option key={workspace.id} value={workspace.id}>📦 {workspace.name}</option>
2534
2603
  ))}
2535
- <option value="none">Без workspace</option>
2604
+ <option value="none">{gt("gui.workspaceNone")}</option>
2536
2605
  </select>
2537
2606
  <button
2538
2607
  onClick={() => setProfilesOpen((v) => !v)}
2539
2608
  title={profilePinned()
2540
- ? "Профиль задан переменной окружения OPENCODE_SCHEDULER_PROFILE — переключение в GUI недоступно"
2541
- : "Профили: отдельные БД, настройки и порт дашборда"}
2609
+ ? gt("gui.profileEnvLockedTitle")
2610
+ : gt("gui.profilesTitle")}
2542
2611
  style={`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;border:1px solid ${profilesOpen() ? "#bf5af2" : "#333"};background:${profilesOpen() ? "rgba(191,90,242,0.12)" : "#1e1e1e"};color:${profilesOpen() ? "#bf5af2" : "#e0e0e0"}`}
2543
2612
  >
2544
2613
  👤 {profileCurrent()}{profilePinned() ? " 🔒" : ""}
@@ -2560,15 +2629,15 @@ export default Plugin.define({
2560
2629
  if (win) win.location.href = url;
2561
2630
  else window.open(url, "_blank");
2562
2631
  }}
2563
- title="Открыть локальный веб-дашборд (фактический порт сервера)"
2632
+ title={gt("gui.openDashboardTitle")}
2564
2633
  style="display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid #333;background:#1e1e1e;color:#e0e0e0"
2565
2634
  onMouseEnter={(e) => { const b = e.currentTarget; b.style.borderColor = "#5ac8fa"; b.style.background = "rgba(90,200,250,0.12)"; b.style.color = "#5ac8fa" }}
2566
2635
  onMouseLeave={(e) => { const b = e.currentTarget; b.style.borderColor = "#333"; b.style.background = "#1e1e1e"; b.style.color = "#e0e0e0" }}
2567
2636
  >
2568
- 🌐 Открыть дашборд
2637
+ {gt("gui.openDashboard")}
2569
2638
  </button>
2570
2639
  <label
2571
- title="Переключить зимнюю тему"
2640
+ title={gt("gui.winterModeTitle")}
2572
2641
  style={`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid ${winterMode() ? "rgba(135, 206, 250, 0.5)" : "#333"};background:${winterMode() ? "rgba(135, 206, 250, 0.12)" : "#1e1e1e"};color:#e0e0e0`}
2573
2642
  >
2574
2643
  <input
@@ -2577,7 +2646,7 @@ export default Plugin.define({
2577
2646
  onChange={(e) => void toggleWinterMode(e.currentTarget.checked)}
2578
2647
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2579
2648
  />
2580
- ❄️ Зимний режим
2649
+ {gt("gui.winterMode")}
2581
2650
  </label>
2582
2651
  </div>
2583
2652
  </div>
@@ -2585,39 +2654,39 @@ export default Plugin.define({
2585
2654
  {profilesOpen() && (
2586
2655
  <div style="background:#1e1e1e;border:1px solid #333;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px">
2587
2656
  <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap">
2588
- <div style="font-size:12px;font-weight:600;color:#e0e0e0">👤 Профили</div>
2657
+ <div style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.profilesHeading")}</div>
2589
2658
  <button
2590
2659
  onClick={() => void handleCreateProfile()}
2591
2660
  disabled={profileBusy()}
2592
2661
  style={`padding:4px 10px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${profileBusy() ? "not-allowed" : "pointer"}`}
2593
2662
  >
2594
- + Создать
2663
+ {gt("gui.createProfile")}
2595
2664
  </button>
2596
2665
  </div>
2597
2666
  {profilePinned() && (
2598
2667
  <div style="font-size:11px;color:#ffd60a">
2599
- Профиль задан переменной OPENCODE_SCHEDULER_PROFILE. Переключение в GUI недоступно.
2668
+ {gt("gui.profileEnvLocked")}
2600
2669
  </div>
2601
2670
  )}
2602
2671
  <div style="display:flex;flex-direction:column;gap:6px">
2603
2672
  {profiles().map((profile) => (
2604
2673
  <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px">
2605
2674
  <span style={`font-weight:${profile.active ? 700 : 400};color:${profile.active ? "#bf5af2" : "#e0e0e0"}`}>
2606
- {profile.name}{profile.isDefault ? " (по умолчанию)" : ""}
2675
+ {profile.name}{profile.isDefault ? gt("gui.defaultSuffix") : ""}
2607
2676
  </span>
2608
2677
  <span style="font-size:11px;color:#8e8e93">
2609
- {profile.port ? `порт ${profile.port}` : "порт по умолчанию"}
2678
+ {profile.port ? gt("gui.profilePort", { port: profile.port }) : gt("gui.profilePortDefault")}
2610
2679
  </span>
2611
2680
  <span style="font-size:11px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;max-width:340px" title={profile.dir}>{profile.dir}</span>
2612
2681
  {profile.active ? (
2613
- <span style="font-size:11px;color:#34c759">активен</span>
2682
+ <span style="font-size:11px;color:#34c759">{gt("gui.profileActive")}</span>
2614
2683
  ) : (
2615
2684
  <button
2616
2685
  onClick={() => void handleSwitchProfile(profile.name)}
2617
2686
  disabled={profileBusy() || profilePinned()}
2618
2687
  style={`padding:2px 8px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${profileBusy() || profilePinned() ? "not-allowed" : "pointer"};opacity:${profilePinned() ? 0.5 : 1}`}
2619
2688
  >
2620
- Переключить
2689
+ {gt("gui.profileSwitch")}
2621
2690
  </button>
2622
2691
  )}
2623
2692
  {!profile.isDefault && !profile.active && (
@@ -2626,14 +2695,14 @@ export default Plugin.define({
2626
2695
  disabled={profileBusy()}
2627
2696
  style={`padding:2px 8px;border-radius:6px;border:1px solid rgba(255,59,48,0.4);background:rgba(255,59,48,0.12);color:#ff3b30;font-size:11px;cursor:${profileBusy() ? "not-allowed" : "pointer"}`}
2628
2697
  >
2629
- Удалить
2698
+ {gt("gui.profileDelete")}
2630
2699
  </button>
2631
2700
  )}
2632
2701
  </div>
2633
2702
  ))}
2634
2703
  </div>
2635
2704
  <div style="font-size:11px;color:#8e8e93">
2636
- У каждого профиля своя БД, настройки, логи и порт дашборда. После переключения перезапустите OpenCode.
2705
+ {gt("gui.profilesHint")}
2637
2706
  </div>
2638
2707
  </div>
2639
2708
  )}
@@ -2644,7 +2713,7 @@ export default Plugin.define({
2644
2713
  disabled={exportBusy()}
2645
2714
  style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${exportBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${exportBusy() ? 0.6 : 1};transition:background 0.18s ease`}
2646
2715
  >
2647
- {exportBusy() ? "Экспорт..." : "Экспорт"}
2716
+ {exportBusy() ? gt("gui.exportBusy") : gt("gui.export")}
2648
2717
  </button>
2649
2718
  <input
2650
2719
  type="file"
@@ -2657,12 +2726,12 @@ export default Plugin.define({
2657
2726
  disabled={importBusy()}
2658
2727
  style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${importBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${importBusy() ? 0.6 : 1};transition:background 0.18s ease`}
2659
2728
  >
2660
- {importBusy() ? "Импорт..." : "Импорт"}
2729
+ {importBusy() ? gt("gui.importBusy") : gt("gui.import")}
2661
2730
  </button>
2662
2731
  </div>
2663
2732
 
2664
2733
  <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px">
2665
- <label style="font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap">Макс. одновременных задач:</label>
2734
+ <label style="font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap">{gt("gui.maxConcurrentLabel")}</label>
2666
2735
  <input
2667
2736
  type="number"
2668
2737
  min="0"
@@ -2670,7 +2739,7 @@ export default Plugin.define({
2670
2739
  onChange={(e) => saveSettingsGui(Number(e.currentTarget.value) || 1)}
2671
2740
  style="width:60px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
2672
2741
  />
2673
- <span style="font-size:11px;color:#8e8e93;white-space:nowrap">(0 = без ограничений)</span>
2742
+ <span style="font-size:11px;color:#8e8e93;white-space:nowrap">{gt("gui.zeroUnlimited")}</span>
2674
2743
  </div>
2675
2744
 
2676
2745
  {/* 🔔 Уведомления (сворачиваемая секция, чтобы не загромождать форму) */}
@@ -2679,9 +2748,9 @@ export default Plugin.define({
2679
2748
  onClick={() => setNotificationsCollapsed(!notificationsCollapsed())}
2680
2749
  style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"
2681
2750
  >
2682
- <span>🔔 Уведомления</span>
2751
+ <span>{gt("gui.notifications")}</span>
2683
2752
  <span style="display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93">
2684
- {notificationsEnabled() ? (onlyOnError() ? "только ошибки" : "все запуски") : "выключены"}
2753
+ {notificationsEnabled() ? (onlyOnError() ? gt("gui.notifyOnlyErrors") : gt("gui.notifyAllRuns")) : gt("gui.notifyDisabled")}
2685
2754
  <span>{notificationsCollapsed() ? "▾" : "▴"}</span>
2686
2755
  </span>
2687
2756
  </button>
@@ -2698,7 +2767,7 @@ export default Plugin.define({
2698
2767
  }}
2699
2768
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2700
2769
  />
2701
- Включить уведомления
2770
+ {gt("gui.notifyEnable")}
2702
2771
  </label>
2703
2772
 
2704
2773
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
@@ -2712,7 +2781,7 @@ export default Plugin.define({
2712
2781
  }}
2713
2782
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2714
2783
  />
2715
- Только при ошибке
2784
+ {gt("gui.notifyOnlyOnError")}
2716
2785
  </label>
2717
2786
 
2718
2787
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
@@ -2727,7 +2796,7 @@ export default Plugin.define({
2727
2796
  }}
2728
2797
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2729
2798
  />
2730
- Webhook (Discord / Slack / generic)
2799
+ {gt("gui.webhookLabel")}
2731
2800
  </label>
2732
2801
  <input
2733
2802
  type="url"
@@ -2739,10 +2808,10 @@ export default Plugin.define({
2739
2808
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && webhookEnabled() ? 1 : 0.5}`}
2740
2809
  />
2741
2810
  <div style="font-size:11px;color:#8e8e93">
2742
- POST с JSON {"{ content, text }"} — совместимо с Discord и Slack.
2811
+ {gt("gui.webhookPostHint", { payload: "{ content, text }" })}
2743
2812
  </div>
2744
2813
  <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#b0b0b0">
2745
- <span>Таймаут, мс:</span>
2814
+ <span>{gt("gui.timeoutMs")}</span>
2746
2815
  <input
2747
2816
  type="number"
2748
2817
  min="1000"
@@ -2754,7 +2823,7 @@ export default Plugin.define({
2754
2823
  onChange={() => void saveNotificationSettings()}
2755
2824
  style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
2756
2825
  />
2757
- <span>повторов:</span>
2826
+ <span>{gt("gui.retryCount")}</span>
2758
2827
  <input
2759
2828
  type="number"
2760
2829
  min="0"
@@ -2765,7 +2834,7 @@ export default Plugin.define({
2765
2834
  onChange={() => void saveNotificationSettings()}
2766
2835
  style="width:56px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
2767
2836
  />
2768
- <span>пауза, мс:</span>
2837
+ <span>{gt("gui.retryDelayMs")}</span>
2769
2838
  <input
2770
2839
  type="number"
2771
2840
  min="100"
@@ -2779,7 +2848,7 @@ export default Plugin.define({
2779
2848
  />
2780
2849
  </div>
2781
2850
  <div style="font-size:11px;color:#8e8e93">
2782
- Повтор при сетевой ошибке, таймауте, 5xx и 429 (экспоненциальная пауза).
2851
+ {gt("gui.retryHint")}
2783
2852
  </div>
2784
2853
  </div>
2785
2854
 
@@ -2805,7 +2874,7 @@ export default Plugin.define({
2805
2874
  disabled={!notificationsEnabled() || !telegramEnabled()}
2806
2875
  onInput={(e) => setTelegramBotToken(e.currentTarget.value)}
2807
2876
  onChange={() => void saveNotificationSettings()}
2808
- placeholder="Токен бота из @BotFather"
2877
+ placeholder={gt("gui.botTokenPlaceholder")}
2809
2878
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}
2810
2879
  />
2811
2880
  <input
@@ -2814,11 +2883,11 @@ export default Plugin.define({
2814
2883
  disabled={!notificationsEnabled() || !telegramEnabled()}
2815
2884
  onInput={(e) => setTelegramChatId(e.currentTarget.value)}
2816
2885
  onChange={() => void saveNotificationSettings()}
2817
- placeholder="chat_id (например, 123456789 или -100...)"
2886
+ placeholder={gt("gui.chatIdPlaceholder")}
2818
2887
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}
2819
2888
  />
2820
2889
  <div style={`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && telegramEnabled() ? 1 : 0.5}`}>
2821
- <span>разметка:</span>
2890
+ <span>{gt("gui.parseModeLabel")}</span>
2822
2891
  <select
2823
2892
  value={telegramParseMode()}
2824
2893
  disabled={!notificationsEnabled() || !telegramEnabled()}
@@ -2844,7 +2913,7 @@ export default Plugin.define({
2844
2913
  }}
2845
2914
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2846
2915
  />
2847
- без звука
2916
+ {gt("gui.silent")}
2848
2917
  </label>
2849
2918
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer">
2850
2919
  <input
@@ -2857,15 +2926,15 @@ export default Plugin.define({
2857
2926
  }}
2858
2927
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2859
2928
  />
2860
- ссылка на дашборд
2929
+ {gt("gui.dashboardLink")}
2861
2930
  </label>
2862
2931
  </div>
2863
2932
  <div style="font-size:11px;color:#8e8e93">
2864
- Токен можно не хранить в settings.json: задайте OPENCODE_SCHEDULER_TELEGRAM_BOT_TOKEN и OPENCODE_SCHEDULER_TELEGRAM_CHAT_ID.
2933
+ {gt("gui.botTokenEnvHint")}
2865
2934
  </div>
2866
2935
  </div>
2867
2936
 
2868
- {/* Нативные уведомления ОС (Спринт 25) */}
2937
+ {/* {gt("gui.nativeNotifications")} (Спринт 25) */}
2869
2938
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
2870
2939
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
2871
2940
  <input
@@ -2878,7 +2947,7 @@ export default Plugin.define({
2878
2947
  }}
2879
2948
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2880
2949
  />
2881
- Нативные уведомления ОС
2950
+ {gt("gui.nativeNotifications")}
2882
2951
  </label>
2883
2952
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() && nativeEnabled() ? 1 : 0.5}`}>
2884
2953
  <input
@@ -2891,14 +2960,14 @@ export default Plugin.define({
2891
2960
  }}
2892
2961
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2893
2962
  />
2894
- со звуком
2963
+ {gt("gui.withSound")}
2895
2964
  </label>
2896
2965
  <div style="font-size:11px;color:#8e8e93">
2897
- Windows Toast, macOS Notification Center, Linux notify-send. Без внешних зависимостей.
2966
+ {gt("gui.nativeHint")}
2898
2967
  </div>
2899
2968
  </div>
2900
2969
 
2901
- {/* Тихие часы (Спринт 25) */}
2970
+ {/* {gt("gui.quietHours")} (Спринт 25) */}
2902
2971
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
2903
2972
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
2904
2973
  <input
@@ -2911,10 +2980,10 @@ export default Plugin.define({
2911
2980
  }}
2912
2981
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
2913
2982
  />
2914
- Тихие часы
2983
+ {gt("gui.quietHours")}
2915
2984
  </label>
2916
2985
  <div style={`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && quietEnabled() ? 1 : 0.5}`}>
2917
- <span>с</span>
2986
+ <span>{gt("gui.quietFrom")}</span>
2918
2987
  <input
2919
2988
  type="time"
2920
2989
  value={quietFrom()}
@@ -2923,7 +2992,7 @@ export default Plugin.define({
2923
2992
  onChange={() => void saveNotificationSettings()}
2924
2993
  style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
2925
2994
  />
2926
- <span>до</span>
2995
+ <span>{gt("gui.quietTo")}</span>
2927
2996
  <input
2928
2997
  type="time"
2929
2998
  value={quietTo()}
@@ -2934,20 +3003,20 @@ export default Plugin.define({
2934
3003
  />
2935
3004
  </div>
2936
3005
  <div style="font-size:11px;color:#8e8e93">
2937
- В тихие часы success и partial подавляются, ошибки и таймауты отправляются.
3006
+ {gt("gui.quietHoursHint")}
2938
3007
  </div>
2939
3008
  </div>
2940
3009
 
2941
3010
  {/* Фильтры по задачам (Спринт 20) */}
2942
3011
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
2943
- <div style="font-size:12px;color:#e0e0e0;font-weight:600">Фильтры по задачам</div>
3012
+ <div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.taskFiltersHeading")}</div>
2944
3013
  <input
2945
3014
  type="text"
2946
3015
  value={filterInclude() || ""}
2947
3016
  disabled={!notificationsEnabled()}
2948
3017
  onInput={(e) => setFilterInclude(e.currentTarget.value)}
2949
3018
  onChange={() => void saveNotificationSettings()}
2950
- placeholder="Только эти задачи (через запятую, * — маска)"
3019
+ placeholder={gt("gui.filterIncludePlaceholder")}
2951
3020
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
2952
3021
  />
2953
3022
  <input
@@ -2956,24 +3025,24 @@ export default Plugin.define({
2956
3025
  disabled={!notificationsEnabled()}
2957
3026
  onInput={(e) => setFilterExclude(e.currentTarget.value)}
2958
3027
  onChange={() => void saveNotificationSettings()}
2959
- placeholder="Исключить задачи (через запятую, * — маска)"
3028
+ placeholder={gt("gui.filterExcludePlaceholder")}
2960
3029
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
2961
3030
  />
2962
3031
  <div style="font-size:11px;color:#8e8e93">
2963
- Пустой список «только» = все задачи. Исключения важнее включений.
3032
+ {gt("gui.filterHint")}
2964
3033
  </div>
2965
3034
  </div>
2966
3035
 
2967
3036
  {/* Шаблоны сообщений (Спринт 20) */}
2968
3037
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
2969
- <div style="font-size:12px;color:#e0e0e0;font-weight:600">Шаблоны сообщений</div>
3038
+ <div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.templatesHeading")}</div>
2970
3039
  <input
2971
3040
  type="text"
2972
3041
  value={templateSuccess() || ""}
2973
3042
  disabled={!notificationsEnabled()}
2974
3043
  onInput={(e) => setTemplateSuccess(e.currentTarget.value)}
2975
3044
  onChange={() => void saveNotificationSettings()}
2976
- placeholder={'✅ Задача "{task}" выполнена ({duration})'}
3045
+ placeholder={gt("gui.templateSuccessPlaceholder")}
2977
3046
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
2978
3047
  />
2979
3048
  <input
@@ -2982,18 +3051,18 @@ export default Plugin.define({
2982
3051
  disabled={!notificationsEnabled()}
2983
3052
  onInput={(e) => setTemplateError(e.currentTarget.value)}
2984
3053
  onChange={() => void saveNotificationSettings()}
2985
- placeholder={'❌ Задача "{task}" упала ({duration}){error}'}
3054
+ placeholder={gt("gui.templateErrorPlaceholder")}
2986
3055
  style={`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${notificationsEnabled() ? 1 : 0.5}`}
2987
3056
  />
2988
3057
  <div style="font-size:11px;color:#8e8e93">
2989
- Плейсхолдеры: {"{task} {status} {duration} {error} {emoji} {cost} {tokens}"}. Пусто = шаблон по умолчанию.
3058
+ {gt("gui.templateHint")}
2990
3059
  </div>
2991
3060
  </div>
2992
3061
 
2993
3062
  {/* 🔐 Секреты (Спринт 26) */}
2994
3063
  <div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden">
2995
3064
  <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px">
2996
- <span style="font-size:12px;font-weight:600;color:#e0e0e0">🔐 Секреты</span>
3065
+ <span style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.secrets")}</span>
2997
3066
  <span style="font-size:11px;color:#8e8e93">{secretsList().length}</span>
2998
3067
  </div>
2999
3068
  <div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
@@ -3001,7 +3070,7 @@ export default Plugin.define({
3001
3070
  <input
3002
3071
  type="text"
3003
3072
  value={secretName()}
3004
- placeholder="Имя секрета (A-Za-z0-9_.-)"
3073
+ placeholder={gt("gui.secretNamePlaceholder")}
3005
3074
  onInput={(e) => setSecretName(e.currentTarget.value)}
3006
3075
  style="width:220px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3007
3076
  />
@@ -3009,7 +3078,7 @@ export default Plugin.define({
3009
3078
  type="password"
3010
3079
  autocomplete="new-password"
3011
3080
  value={secretValue()}
3012
- placeholder="Значение (не возвращается при чтении)"
3081
+ placeholder={gt("gui.secretValuePlaceholder")}
3013
3082
  onInput={(e) => setSecretValue(e.currentTarget.value)}
3014
3083
  style="width:320px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3015
3084
  />
@@ -3020,7 +3089,7 @@ export default Plugin.define({
3020
3089
  ? "padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6"
3021
3090
  : "padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1"}
3022
3091
  >
3023
- {secretsBusy() ? "Сохранение..." : "💾 Сохранить"}
3092
+ {secretsBusy() ? gt("gui.saving") : gt("gui.save")}
3024
3093
  </button>
3025
3094
  </div>
3026
3095
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;overflow:auto">
@@ -3033,7 +3102,7 @@ export default Plugin.define({
3033
3102
  <span style="color:#ce9178">•••• {item.preview}</span>
3034
3103
  <button
3035
3104
  onClick={() => void handleDeleteSecret(item.name)}
3036
- title="Удалить"
3105
+ title={gt("gui.delete")}
3037
3106
  style="padding:2px 6px;background:#c43b2b;color:white;border:none;border-radius:3px;cursor:pointer;font-size:10px;font-weight:600;line-height:1"
3038
3107
  >
3039
3108
  ×
@@ -3041,17 +3110,17 @@ export default Plugin.define({
3041
3110
  </span>
3042
3111
  ))}
3043
3112
  {secretsList().length === 0 && (
3044
- <span style="font-size:11px;color:#8e8e93">Секретов нет. Значения хранятся зашифрованно в secrets.json.</span>
3113
+ <span style="font-size:11px;color:#8e8e93">{gt("gui.secretsEmpty")}</span>
3045
3114
  )}
3046
3115
  </div>
3047
3116
  <div style="font-size:11px;color:#8e8e93">
3048
- В задачах используйте ссылку <code style="color:#dcdcaa">${"{secret:NAME}"}</code> — значение подставляется из хранилища при запуске и маскируется в логах.
3117
+ {gt("gui.secretsUsage", { secretRef: "{secret:NAME}" })}
3049
3118
  </div>
3050
3119
  </div>
3051
3120
  </div>
3052
3121
  {/* Уведомления о матрицах (Спринт 20) */}
3053
3122
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
3054
- <div style="font-size:12px;color:#e0e0e0;font-weight:600">Матрицы</div>
3123
+ <div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.matrixNotifyHeading")}</div>
3055
3124
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
3056
3125
  <input
3057
3126
  type="checkbox"
@@ -3063,7 +3132,7 @@ export default Plugin.define({
3063
3132
  }}
3064
3133
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
3065
3134
  />
3066
- Уведомлять о завершении матриц
3135
+ {gt("gui.matrixNotifyEnable")}
3067
3136
  </label>
3068
3137
  <div style={`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && matrixNotifyEnabled() ? 1 : 0.5}`}>
3069
3138
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer">
@@ -3090,9 +3159,9 @@ export default Plugin.define({
3090
3159
  }}
3091
3160
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
3092
3161
  />
3093
- все упали
3162
+ {gt("gui.matrixAllFailed")}
3094
3163
  </label>
3095
- <span>зависший клон, мин:</span>
3164
+ <span>{gt("gui.matrixStuckMinutes")}</span>
3096
3165
  <input
3097
3166
  type="number"
3098
3167
  min="0"
@@ -3105,13 +3174,13 @@ export default Plugin.define({
3105
3174
  />
3106
3175
  </div>
3107
3176
  <div style="font-size:11px;color:#8e8e93">
3108
- Клон, выполняющийся дольше указанного времени, уведомляется один раз. 0 — выключить.
3177
+ {gt("gui.matrixStuckHint")}
3109
3178
  </div>
3110
3179
  </div>
3111
3180
 
3112
3181
  {/* Дайджест (Спринт 20) */}
3113
3182
  <div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px">
3114
- <div style="font-size:12px;color:#e0e0e0;font-weight:600">Дайджест</div>
3183
+ <div style="font-size:12px;color:#e0e0e0;font-weight:600">{gt("gui.digestHeading")}</div>
3115
3184
  <label style={`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${notificationsEnabled() ? 1 : 0.5}`}>
3116
3185
  <input
3117
3186
  type="checkbox"
@@ -3123,7 +3192,7 @@ export default Plugin.define({
3123
3192
  }}
3124
3193
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
3125
3194
  />
3126
- Отправлять дайджест
3195
+ {gt("gui.digestEnable")}
3127
3196
  </label>
3128
3197
  <div style={`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${notificationsEnabled() && digestEnabled() ? 1 : 0.5}`}>
3129
3198
  <select
@@ -3135,8 +3204,8 @@ export default Plugin.define({
3135
3204
  }}
3136
3205
  style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3137
3206
  >
3138
- <option value="daily">ежедневно</option>
3139
- <option value="weekly">еженедельно (Пн)</option>
3207
+ <option value="daily">{gt("gui.digestDaily")}</option>
3208
+ <option value="weekly">{gt("gui.digestWeekly")}</option>
3140
3209
  </select>
3141
3210
  <input
3142
3211
  type="time"
@@ -3148,12 +3217,12 @@ export default Plugin.define({
3148
3217
  />
3149
3218
  <span style="font-size:11px;color:#8e8e93">
3150
3219
  {digestLastSentAt()
3151
- ? `последняя отправка: ${new Date(digestLastSentAt()!).toLocaleString()}`
3152
- : "ещё не отправлялся"}
3220
+ ? gt("gui.digestLastSent", { when: new Date(digestLastSentAt()!).toLocaleString() })
3221
+ : gt("gui.digestNeverSent")}
3153
3222
  </span>
3154
3223
  </div>
3155
3224
  <div style="font-size:11px;color:#8e8e93">
3156
- Запуски, success rate, стоимость и топ ошибок за сутки/неделю.
3225
+ {gt("gui.digestHint")}
3157
3226
  </div>
3158
3227
  </div>
3159
3228
 
@@ -3163,17 +3232,17 @@ export default Plugin.define({
3163
3232
  disabled={testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled())}
3164
3233
  style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${testNotificationBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? 0.6 : 1}`}
3165
3234
  >
3166
- {testNotificationBusy() ? "Отправка..." : "🧪 Тестовое уведомление"}
3235
+ {testNotificationBusy() ? gt("gui.sending") : gt("gui.sendTestNotification")}
3167
3236
  </button>
3168
3237
  <button
3169
3238
  onClick={() => void handleSendDigest()}
3170
3239
  disabled={digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled())}
3171
3240
  style={`padding:6px 12px;background:#2d7d46;color:white;border:none;border-radius:6px;cursor:${digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${digestBusy() || !(webhookEnabled() || telegramEnabled() || nativeEnabled()) ? 0.6 : 1}`}
3172
3241
  >
3173
- {digestBusy() ? "Отправка..." : "📊 Отправить дайджест сейчас"}
3242
+ {digestBusy() ? gt("gui.sending") : gt("gui.sendDigestNow")}
3174
3243
  </button>
3175
3244
  <span style="font-size:11px;color:#8e8e93">
3176
- Каналы: webhook, Telegram, нативные уведомления ОС.
3245
+ {gt("gui.digestChannels")}
3177
3246
  </span>
3178
3247
  </div>
3179
3248
  </div>
@@ -3186,9 +3255,9 @@ export default Plugin.define({
3186
3255
  onClick={() => setHistoryCollapsed(!historyCollapsed())}
3187
3256
  style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"
3188
3257
  >
3189
- <span>🧹 История и ретеншн</span>
3258
+ <span>{gt("gui.historyHeading")}</span>
3190
3259
  <span style="display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93">
3191
- {historyRetentionDays() > 0 ? `старше ${historyRetentionDays()} дн.` : "без срока"} · {historyMaxRecords() > 0 ? `до ${historyMaxRecords()} записей` : "без лимита"}
3260
+ {historyRetentionDays() > 0 ? gt("gui.historyOlderThan", { days: historyRetentionDays() }) : gt("gui.historyNoExpiry")} · {historyMaxRecords() > 0 ? gt("gui.historyUpToRecords", { count: historyMaxRecords() }) : gt("gui.historyNoLimit")}
3192
3261
  <span>{historyCollapsed() ? "▾" : "▴"}</span>
3193
3262
  </span>
3194
3263
  </button>
@@ -3196,7 +3265,7 @@ export default Plugin.define({
3196
3265
  {!historyCollapsed() && (
3197
3266
  <div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
3198
3267
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
3199
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Удалять записи старше, дней</label>
3268
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyDeleteOlderLabel")}</label>
3200
3269
  <input
3201
3270
  type="number"
3202
3271
  min="0"
@@ -3207,11 +3276,11 @@ export default Plugin.define({
3207
3276
  }}
3208
3277
  style="width:70px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3209
3278
  />
3210
- <span style="font-size:11px;color:#8e8e93">0 = не удалять по возрасту</span>
3279
+ <span style="font-size:11px;color:#8e8e93">{gt("gui.zeroKeepByAge")}</span>
3211
3280
  </div>
3212
3281
 
3213
3282
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
3214
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Хранить не более записей</label>
3283
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyKeepMaxLabel")}</label>
3215
3284
  <input
3216
3285
  type="number"
3217
3286
  min="0"
@@ -3222,14 +3291,14 @@ export default Plugin.define({
3222
3291
  }}
3223
3292
  style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3224
3293
  />
3225
- <span style="font-size:11px;color:#8e8e93">0 = без ограничения</span>
3294
+ <span style="font-size:11px;color:#8e8e93">{gt("gui.zeroNoLimit")}</span>
3226
3295
  </div>
3227
3296
 
3228
3297
  <div style="font-size:11px;color:#8e8e93">
3229
- Последняя очистка:{" "}
3298
+ {gt("gui.lastCleanupLabel")}{" "}
3230
3299
  {historyLastCleanupAt()
3231
- ? `${new Date(historyLastCleanupAt()!).toLocaleString()} · удалено ${historyLastCleanupDeleted()}`
3232
- : "ещё не выполнялась"}
3300
+ ? gt("gui.lastCleanupDone", { when: new Date(historyLastCleanupAt()!).toLocaleString(), deleted: historyLastCleanupDeleted() })
3301
+ : gt("gui.lastCleanupNever")}
3233
3302
  </div>
3234
3303
 
3235
3304
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
@@ -3238,10 +3307,10 @@ export default Plugin.define({
3238
3307
  disabled={historyCleanupBusy()}
3239
3308
  style={`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${historyCleanupBusy() ? "not-allowed" : "pointer"};font-size:12px;font-weight:500;opacity:${historyCleanupBusy() ? 0.6 : 1}`}
3240
3309
  >
3241
- {historyCleanupBusy() ? "Очистка..." : "🧹 Очистить сейчас"}
3310
+ {historyCleanupBusy() ? gt("gui.cleaningUp") : gt("gui.cleanupNow")}
3242
3311
  </button>
3243
3312
  <span style="font-size:11px;color:#8e8e93">
3244
- Удаляются только завершённые записи; незавершённые запуски не трогаются.
3313
+ {gt("gui.historyCleanupHint")}
3245
3314
  </span>
3246
3315
  </div>
3247
3316
  </div>
@@ -3255,7 +3324,7 @@ export default Plugin.define({
3255
3324
  onClick={() => setAuditCollapsed(!auditCollapsed())}
3256
3325
  style="display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0"
3257
3326
  >
3258
- <span>📜 Журнал аудита</span>
3327
+ <span>{gt("gui.auditHeading")}</span>
3259
3328
  <span style="font-size:11px;font-weight:400;color:#8e8e93">{auditRecords().length}</span>
3260
3329
  <span style="font-size:11px;color:#8e8e93">{auditCollapsed() ? "▾" : "▴"}</span>
3261
3330
  </button>
@@ -3264,16 +3333,16 @@ export default Plugin.define({
3264
3333
  {!auditCollapsed() && (
3265
3334
  <div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
3266
3335
  <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
3267
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Действие</label>
3336
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditAction")}</label>
3268
3337
  <input
3269
3338
  type="text"
3270
3339
  value={auditFilterAction()}
3271
- placeholder="например task.create"
3340
+ placeholder={gt("gui.auditActionPlaceholder")}
3272
3341
  onInput={(e) => setAuditFilterAction(e.currentTarget.value)}
3273
3342
  onChange={() => void loadAuditGui()}
3274
3343
  style="width:150px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3275
3344
  />
3276
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Источник</label>
3345
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditSource")}</label>
3277
3346
  <input
3278
3347
  type="text"
3279
3348
  value={auditFilterActor()}
@@ -3282,11 +3351,11 @@ export default Plugin.define({
3282
3351
  onChange={() => void loadAuditGui()}
3283
3352
  style="width:110px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3284
3353
  />
3285
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Цель</label>
3354
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.auditTarget")}</label>
3286
3355
  <input
3287
3356
  type="text"
3288
3357
  value={auditFilterTarget()}
3289
- placeholder="имя задачи/секрета"
3358
+ placeholder={gt("gui.auditTargetPlaceholder")}
3290
3359
  onInput={(e) => setAuditFilterTarget(e.currentTarget.value)}
3291
3360
  onChange={() => void loadAuditGui()}
3292
3361
  style="width:180px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
@@ -3298,19 +3367,19 @@ export default Plugin.define({
3298
3367
  ? "padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6"
3299
3368
  : "padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1"}
3300
3369
  >
3301
- {auditBusy() ? "Загрузка..." : "Обновить"}
3370
+ {auditBusy() ? gt("gui.loading") : gt("gui.refresh")}
3302
3371
  </button>
3303
3372
  </div>
3304
3373
  <div style="width:100%;overflow:auto;border:1px solid #333;border-radius:6px;background:#0f0f0f">
3305
3374
  <table style="width:100%;border-collapse:collapse;font-size:11px">
3306
3375
  <thead>
3307
3376
  <tr style="border-bottom:1px solid #333">
3308
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Время</th>
3309
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Действие</th>
3310
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Цель</th>
3311
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Источник</th>
3312
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Автор</th>
3313
- <th style="text-align:left;padding:6px 8px;color:#8e8e93">Удалён с</th>
3377
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditTime")}</th>
3378
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditAction")}</th>
3379
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditTarget")}</th>
3380
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditSource")}</th>
3381
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditActor")}</th>
3382
+ <th style="text-align:left;padding:6px 8px;color:#8e8e93">{gt("gui.auditDeletedFrom")}</th>
3314
3383
  </tr>
3315
3384
  </thead>
3316
3385
  <tbody>
@@ -3326,14 +3395,14 @@ export default Plugin.define({
3326
3395
  ))}
3327
3396
  {auditRecords().length === 0 && (
3328
3397
  <tr>
3329
- <td colspan="6" style="padding:10px 8px;color:#8e8e93;text-align:center">Записей аудита нет.</td>
3398
+ <td colspan="6" style="padding:10px 8px;color:#8e8e93;text-align:center">{gt("gui.auditEmpty")}</td>
3330
3399
  </tr>
3331
3400
  )}
3332
3401
  </tbody>
3333
3402
  </table>
3334
3403
  </div>
3335
3404
  <div style="font-size:11px;color:#8e8e93">
3336
- Записываются мутации задач, настроек, шаблонов, профилей, рабочих зон, секретов, импорта и очистки истории. Детали маскируются (секреты заменены на <code style="color:#dcdcaa">***</code>).
3405
+ {gt("gui.auditHint", { redacted: "***" })}
3337
3406
  </div>
3338
3407
  </div>
3339
3408
  )}
@@ -3342,7 +3411,7 @@ export default Plugin.define({
3342
3411
  {/* 🧹 Настройки аудита (ретеншн) */}
3343
3412
  <div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden">
3344
3413
  <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px">
3345
- <span style="font-size:12px;font-weight:600;color:#e0e0e0">Журнал аудита — хранение</span>
3414
+ <span style="font-size:12px;font-weight:600;color:#e0e0e0">{gt("gui.auditStorageHeading")}</span>
3346
3415
  </div>
3347
3416
  <div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px">
3348
3417
  <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
@@ -3356,11 +3425,11 @@ export default Plugin.define({
3356
3425
  }}
3357
3426
  style="accent-color:#5ac8fa;cursor:pointer;margin:0"
3358
3427
  />
3359
- Включить аудит
3428
+ {gt("gui.auditEnable")}
3360
3429
  </label>
3361
3430
  </div>
3362
3431
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
3363
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Удалять записи старше, дней</label>
3432
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyDeleteOlderLabel")}</label>
3364
3433
  <input
3365
3434
  type="number"
3366
3435
  min="0"
@@ -3371,10 +3440,10 @@ export default Plugin.define({
3371
3440
  }}
3372
3441
  style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3373
3442
  />
3374
- <span style="font-size:11px;color:#8e8e93">0 = не удалять по возрасту</span>
3443
+ <span style="font-size:11px;color:#8e8e93">{gt("gui.zeroKeepByAge")}</span>
3375
3444
  </div>
3376
3445
  <div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
3377
- <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">Хранить не более записей</label>
3446
+ <label style="font-size:12px;color:#e0e0e0;white-space:nowrap">{gt("gui.historyKeepMaxLabel")}</label>
3378
3447
  <input
3379
3448
  type="number"
3380
3449
  min="0"
@@ -3385,7 +3454,7 @@ export default Plugin.define({
3385
3454
  }}
3386
3455
  style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"
3387
3456
  />
3388
- <span style="font-size:11px;color:#8e8e93">0 = без ограничения</span>
3457
+ <span style="font-size:11px;color:#8e8e93">{gt("gui.zeroNoLimit")}</span>
3389
3458
  </div>
3390
3459
  </div>
3391
3460
  </div>
@@ -3404,17 +3473,17 @@ export default Plugin.define({
3404
3473
  <button
3405
3474
  onClick={() => void handleAddWorkspace()}
3406
3475
  disabled={workspaceBusy()}
3407
- title="Добавить workspace (git-репозиторий)"
3476
+ title={gt("gui.workspaceAddTitle")}
3408
3477
  style={`padding:5px 10px;border-radius:6px;border:1px solid #333;background:#252526;color:${workspaceBusy() ? "#666" : "#5ac8fa"};font-size:11px;font-weight:600;cursor:${workspaceBusy() ? "not-allowed" : "pointer"}`}
3409
3478
  >
3410
- + Добавить
3479
+ {gt("gui.add")}
3411
3480
  </button>
3412
3481
  </div>
3413
3482
  {!workspacesCollapsed() && (
3414
3483
  <div style="display:flex;flex-direction:column;gap:6px;padding:0 14px 12px">
3415
3484
  {workspaces().length === 0 ? (
3416
3485
  <div style="font-size:12px;color:#8e8e93;padding:4px 0">
3417
- Workspace не добавлен. Задача без workspace использует рабочую директорию проекта.
3486
+ {gt("gui.workspaceEmpty")}
3418
3487
  </div>
3419
3488
  ) : (
3420
3489
  workspaces().map((workspace) => (
@@ -3424,29 +3493,29 @@ export default Plugin.define({
3424
3493
  <span style="font-size:12px;font-weight:700;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">📦 {workspace.name}</span>
3425
3494
  <span style="font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis" title={workspace.path}>{workspace.path}</span>
3426
3495
  <span style="font-size:10px;color:#a0a0a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">
3427
- git: {workspace.gitBranch || "—"} · {workspace.gitRemote || "remote не задан"}
3496
+ {gt("gui.workspaceGitInfo", { branch: workspace.gitBranch || "—", remote: workspace.gitRemote || gt("gui.remoteNotSet") })}
3428
3497
  </span>
3429
3498
  <span style="font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">
3430
- env: {workspace.env ? `${Object.keys(workspace.env).length} перем.` : "—"}{workspace.envFile ? " · .env-файл" : ""}
3499
+ {gt("gui.workspaceEnvLine", { count: workspace.env ? Object.keys(workspace.env).length : "—", envFile: workspace.envFile ? gt("gui.workspaceEnvFile") : "" })}
3431
3500
  </span>
3432
3501
  </div>
3433
3502
  <div style="display:flex;gap:4px;flex-shrink:0">
3434
3503
  <button
3435
3504
  onClick={() => void handleEditWorkspaceEnv(workspace)}
3436
3505
  disabled={workspaceBusy()}
3437
- title="Env-переменные workspace (секреты маскируются в логах)"
3506
+ title={gt("gui.workspaceEnvTitle")}
3438
3507
  style="background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px"
3439
3508
  >🔑</button>
3440
3509
  <button
3441
3510
  onClick={() => void handleEditWorkspace(workspace)}
3442
3511
  disabled={workspaceBusy()}
3443
- title="Редактировать workspace"
3512
+ title={gt("gui.workspaceEditTitle")}
3444
3513
  style="background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px"
3445
3514
  >✏️</button>
3446
3515
  <button
3447
3516
  onClick={() => void handleDeleteWorkspace(workspace)}
3448
3517
  disabled={workspaceBusy()}
3449
- title="Удалить workspace (задачи сохраняются)"
3518
+ title={gt("gui.workspaceDeleteTitle")}
3450
3519
  style="background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;padding:2px"
3451
3520
  >🗑</button>
3452
3521
  </div>
@@ -3461,37 +3530,37 @@ export default Plugin.define({
3461
3530
  {formCollapsed() ? (
3462
3531
  <button
3463
3532
  onClick={() => setFormCollapsed(false)}
3464
- title="Развернуть форму создания задачи"
3533
+ title={gt("gui.expandFormTitle")}
3465
3534
  style="display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:700px;box-sizing:border-box;padding:12px 16px;background:#1e1e1e;border:1px dashed #3a3a3a;border-radius:10px;color:#e0e0e0;font-size:13px;font-weight:600;cursor:pointer;transition:border-color 0.18s ease, background 0.18s ease"
3466
3535
  onMouseEnter={(e) => { const b = e.currentTarget; b.style.borderColor = "#5ac8fa"; b.style.background = "#232326" }}
3467
3536
  onMouseLeave={(e) => { const b = e.currentTarget; b.style.borderColor = "#3a3a3a"; b.style.background = "#1e1e1e" }}
3468
3537
  >
3469
- ➕ Создать задачу
3538
+ {gt("gui.createTask")}
3470
3539
  </button>
3471
3540
  ) : (
3472
3541
  <div style="display:block;width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;padding:20px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,0.2)">
3473
- <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px">
3542
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px;flex-wrap:wrap">
3474
3543
  <h3 style="margin:0;font-size:14px;font-weight:600;color:#ffffff">
3475
- {isEditing ? "Редактирование задачи" : "Новая задача"}
3544
+ {isEditing ? gt("gui.editingTask") : gt("gui.newTask")}
3476
3545
  </h3>
3477
- <div style="display:flex;align-items:center;gap:8px">
3546
+ <div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap">
3478
3547
  <button
3479
3548
  onClick={handleSaveAsTemplate}
3480
- title="Сохранить текущие настройки формы как шаблон"
3549
+ title={gt("gui.saveAsTemplateTitle")}
3481
3550
  style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"
3482
3551
  onMouseEnter={(e) => { const b = e.currentTarget; b.style.color = "#5ac8fa"; b.style.borderColor = "#5ac8fa" }}
3483
3552
  onMouseLeave={(e) => { const b = e.currentTarget; b.style.color = "#a0a0a6"; b.style.borderColor = "#333" }}
3484
3553
  >
3485
- 💾 Сохранить как шаблон
3554
+ {gt("gui.saveAsTemplate")}
3486
3555
  </button>
3487
3556
  <button
3488
3557
  onClick={() => setFormCollapsed(true)}
3489
- title="Свернуть форму"
3558
+ title={gt("gui.collapseFormTitle")}
3490
3559
  style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"
3491
3560
  onMouseEnter={(e) => { const b = e.currentTarget; b.style.color = "#5ac8fa"; b.style.borderColor = "#5ac8fa" }}
3492
3561
  onMouseLeave={(e) => { const b = e.currentTarget; b.style.color = "#a0a0a6"; b.style.borderColor = "#333" }}
3493
3562
  >
3494
- Скрыть форму ▴
3563
+ {gt("gui.hideForm")}
3495
3564
  </button>
3496
3565
  </div>
3497
3566
  </div>
@@ -3517,17 +3586,17 @@ export default Plugin.define({
3517
3586
  📦 Matrix (Fan-Out)
3518
3587
  </label>
3519
3588
  <div style="font-size:11px;color:#8e8e93;margin-top:4px;line-height:1.45">
3520
- Задача-шаблон раскладывается на клоны по workspace. Родитель сам не выполняется — он запускает клоны и агрегирует результат.
3589
+ {gt("gui.matrixHint")}
3521
3590
  </div>
3522
3591
 
3523
3592
  {matrixMode() && (
3524
3593
  <div style="margin-top:10px;display:flex;flex-direction:column;gap:10px">
3525
3594
  <div>
3526
3595
  <div style="font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:6px">
3527
- Workspaces (для матрицы) — выбрано {matrixWorkspaceIds().length}
3596
+ {gt("gui.matrixWorkspacesSelected", { count: matrixWorkspaceIds().length })}
3528
3597
  </div>
3529
3598
  {workspaces().length === 0 ? (
3530
- <div style="font-size:11px;color:#f5a623">Сначала добавьте хотя бы один workspace.</div>
3599
+ <div style="font-size:11px;color:#f5a623">{gt("gui.addWorkspaceFirst")}</div>
3531
3600
  ) : (
3532
3601
  <div style="display:flex;flex-direction:column;gap:4px;max-height:170px;overflow:auto;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px">
3533
3602
  {workspaces().map((workspace) => (
@@ -3548,36 +3617,36 @@ export default Plugin.define({
3548
3617
 
3549
3618
  <div style="display:flex;gap:8px;flex-wrap:wrap">
3550
3619
  <label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
3551
- Стратегия
3620
+ {gt("gui.strategy")}
3552
3621
  <select
3553
3622
  value={matrixStrategy()}
3554
3623
  onChange={(e) => setMatrixStrategy(e.currentTarget.value === "sequential" ? "sequential" : "parallel")}
3555
3624
  style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
3556
3625
  >
3557
- <option value="parallel">parallel — все сразу</option>
3558
- <option value="sequential">sequential — по одному</option>
3626
+ <option value="parallel">{gt("gui.matrixParallel")}</option>
3627
+ <option value="sequential">{gt("gui.matrixSequential")}</option>
3559
3628
  </select>
3560
3629
  </label>
3561
3630
  <label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
3562
- При ошибке
3631
+ {gt("gui.onFailure")}
3563
3632
  <select
3564
3633
  value={matrixFailureMode()}
3565
3634
  onChange={(e) => setMatrixFailureMode(e.currentTarget.value === "stop" ? "stop" : "continue")}
3566
3635
  style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
3567
3636
  >
3568
- <option value="continue">continue — продолжать</option>
3569
- <option value="stop">stop — остановить</option>
3637
+ <option value="continue">{gt("gui.matrixContinue")}</option>
3638
+ <option value="stop">{gt("gui.matrixStop")}</option>
3570
3639
  </select>
3571
3640
  </label>
3572
3641
  <label style="flex:1;min-width:150px;font-size:11px;color:#b0b0b0">
3573
- Агрегация
3642
+ {gt("gui.aggregation")}
3574
3643
  <select
3575
3644
  value={matrixAggregation()}
3576
3645
  onChange={(e) => setMatrixAggregation(e.currentTarget.value === "per-task" ? "per-task" : "summary")}
3577
3646
  style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
3578
3647
  >
3579
- <option value="summary">summary — сводка</option>
3580
- <option value="per-task">per-task — по задачам</option>
3648
+ <option value="summary">{gt("gui.matrixSummary")}</option>
3649
+ <option value="per-task">{gt("gui.matrixPerTask")}</option>
3581
3650
  </select>
3582
3651
  </label>
3583
3652
  </div>
@@ -3589,20 +3658,18 @@ export default Plugin.define({
3589
3658
  onChange={(e) => setMatrixAggregator(e.currentTarget.checked)}
3590
3659
  style="accent-color:#ff9f0a"
3591
3660
  />
3592
- Создать aggregator-задачу matrix-complete (запустится после всех клонов)
3661
+ {gt("gui.matrixAggregator")}
3593
3662
  </label>
3594
3663
 
3595
3664
  <label style="font-size:11px;color:#b0b0b0;max-width:240px">
3596
- Одновременно клонов (concurrency)
3665
+ {gt("gui.matrixConcurrency")}
3597
3666
  <input
3598
3667
  type="number"
3599
3668
  min="1"
3600
3669
  step="1"
3601
3670
  value={matrixConcurrency()}
3602
3671
  onInput={(e) => setMatrixConcurrency(e.currentTarget.value)}
3603
- placeholder={
3604
- matrixStrategy() === "sequential" ? "1 (sequential)" : "без лимита"
3605
- }
3672
+ placeholder={matrixStrategy() === "sequential" ? gt("gui.concurrencySequentialPlaceholder") : gt("gui.concurrencyUnlimitedPlaceholder")}
3606
3673
  style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
3607
3674
  />
3608
3675
  </label>
@@ -3610,7 +3677,7 @@ export default Plugin.define({
3610
3677
  {matrixWorkspaceIds().length > 0 && (
3611
3678
  <details style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px">
3612
3679
  <summary style="cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500">
3613
- ⚙ Настройки по workspace — переопределено {matrixOverrideCount()}
3680
+ {gt("gui.matrixOverridesTitle", { count: matrixOverrideCount() })}
3614
3681
  </summary>
3615
3682
  <div style="margin-top:8px;display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto">
3616
3683
  {matrixWorkspaceIds().map((wsId) => {
@@ -3628,14 +3695,14 @@ export default Plugin.define({
3628
3695
  <div style="display:flex;flex-direction:column;gap:6px">
3629
3696
  <textarea
3630
3697
  rows={2}
3631
- placeholder="Промпт (по умолчанию — общий промпт формы)"
3698
+ placeholder={gt("gui.matrixPromptPlaceholder")}
3632
3699
  value={override.prompt ?? ""}
3633
3700
  onInput={(e) => updateMatrixOverride(wsId, "prompt", e.currentTarget.value)}
3634
3701
  style={`${inputStyle};width:100%;resize:vertical;font-family:inherit`}
3635
3702
  />
3636
3703
  <div style="display:flex;gap:6px;flex-wrap:wrap">
3637
3704
  <input
3638
- placeholder="Модель (override)"
3705
+ placeholder={gt("gui.matrixModelPlaceholder")}
3639
3706
  value={override.model ?? ""}
3640
3707
  onInput={(e) => updateMatrixOverride(wsId, "model", e.currentTarget.value)}
3641
3708
  style={`${inputStyle};flex:1;min-width:150px`}
@@ -3672,11 +3739,11 @@ export default Plugin.define({
3672
3739
  <div style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6">
3673
3740
  {matrixPreview().length > 0 ? (
3674
3741
  <>
3675
- <div style="color:#ff9f0a;font-weight:600">Будет создано {matrixPreview().length} клон(а/ов):</div>
3742
+ <div style="color:#ff9f0a;font-weight:600">{gt("gui.matrixWillCreate", { count: matrixPreview().length })}</div>
3676
3743
  <div style="color:#e0e0e0;word-break:break-all">{matrixPreview().join(", ")}</div>
3677
3744
  </>
3678
3745
  ) : (
3679
- <span style="color:#f5a623">Выберите хотя бы один workspace — превью клонов появится здесь.</span>
3746
+ <span style="color:#f5a623">{gt("gui.matrixSelectHint")}</span>
3680
3747
  )}
3681
3748
  </div>
3682
3749
  </div>
@@ -3685,7 +3752,7 @@ export default Plugin.define({
3685
3752
 
3686
3753
  {!matrixMode() && (
3687
3754
  <div style="display:block;width:100%;margin-bottom:12px">
3688
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Workspace (multi-repo)</label>
3755
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.workspaceMultiRepo")}</label>
3689
3756
  <select
3690
3757
  value={workspaceId()}
3691
3758
  onChange={(e) => {
@@ -3694,7 +3761,7 @@ export default Plugin.define({
3694
3761
  }}
3695
3762
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3696
3763
  >
3697
- <option value="">Без workspace — рабочая директория</option>
3764
+ <option value="">{gt("gui.noWorkspaceOption")}</option>
3698
3765
  {workspaces().map((workspace) => (
3699
3766
  <option key={workspace.id} value={workspace.id}>📦 {workspace.name}</option>
3700
3767
  ))}
@@ -3710,32 +3777,32 @@ export default Plugin.define({
3710
3777
  )}
3711
3778
 
3712
3779
  <div style="display:block;width:100%;margin-bottom:12px">
3713
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Имя задачи</label>
3780
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.taskNameLabel")}</label>
3714
3781
  <input
3715
3782
  type="text"
3716
3783
  value={name() || ""}
3717
3784
  onInput={(e) => setName(e.currentTarget.value)}
3718
- placeholder="например, Gui-Test"
3785
+ placeholder={gt("gui.taskNamePlaceholder")}
3719
3786
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3720
3787
  />
3721
3788
  </div>
3722
3789
 
3723
3790
  {!workspaceId() && !matrixMode() && (
3724
3791
  <div style="display:block;width:100%;margin-bottom:12px">
3725
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Рабочая директория</label>
3792
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.workingDirectoryLabel")}</label>
3726
3793
  <input
3727
3794
  type="text"
3728
3795
  value={workingDirectory() || ""}
3729
3796
  onInput={(e) => setWorkingDirectory(e.currentTarget.value)}
3730
- placeholder="по умолчанию — папка проекта"
3797
+ placeholder={gt("gui.workingDirectoryPlaceholder")}
3731
3798
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3732
3799
  />
3733
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">В этой папке задача запустит opencode run — здесь подхватятся MCP-серверы из opencode.json.</div>
3800
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.workingDirectoryHint")}</div>
3734
3801
  </div>
3735
3802
  )}
3736
3803
 
3737
3804
  <div style="display:block;width:100%;margin-bottom:12px">
3738
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Тип триггера</label>
3805
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.triggerTypeLabel")}</label>
3739
3806
  <div style="display:flex;gap:8px;flex-wrap:wrap">
3740
3807
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3741
3808
  <input
@@ -3745,7 +3812,7 @@ export default Plugin.define({
3745
3812
  onChange={() => setTriggerType("cron")}
3746
3813
  style="accent-color:#007acc"
3747
3814
  />
3748
- По расписанию (Cron)
3815
+ {gt("gui.triggerCron")}
3749
3816
  </label>
3750
3817
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3751
3818
  <input
@@ -3755,7 +3822,7 @@ export default Plugin.define({
3755
3822
  onChange={() => setTriggerType("file")}
3756
3823
  style="accent-color:#007acc"
3757
3824
  />
3758
- При изменении файла
3825
+ {gt("gui.triggerFile")}
3759
3826
  </label>
3760
3827
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3761
3828
  <input
@@ -3765,7 +3832,7 @@ export default Plugin.define({
3765
3832
  onChange={() => setTriggerType("git")}
3766
3833
  style="accent-color:#007acc"
3767
3834
  />
3768
- Новый коммит (Git)
3835
+ {gt("gui.triggerGit")}
3769
3836
  </label>
3770
3837
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3771
3838
  <input
@@ -3785,22 +3852,22 @@ export default Plugin.define({
3785
3852
  onChange={() => setTriggerType("once")}
3786
3853
  style="accent-color:#007acc"
3787
3854
  />
3788
- Разово
3855
+ {gt("gui.triggerOnce")}
3789
3856
  </label>
3790
3857
  </div>
3791
3858
  </div>
3792
3859
 
3793
3860
  {triggerType() === "file" && (
3794
3861
  <div style="display:block;width:100%;margin-bottom:12px">
3795
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Путь к файлу для отслеживания</label>
3862
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchFileLabel")}</label>
3796
3863
  <input
3797
3864
  type="text"
3798
3865
  value={watchPath() || ""}
3799
3866
  onInput={(e) => setWatchPath(e.currentTarget.value)}
3800
- placeholder="например, C:\project\src\main.ts"
3867
+ placeholder={gt("gui.watchFilePlaceholder")}
3801
3868
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3802
3869
  />
3803
- <label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">Glob-маски (по одной в строке, пусто — любое изменение)</label>
3870
+ <label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchGlobsLabel")}</label>
3804
3871
  <textarea
3805
3872
  value={watchGlobs() || ""}
3806
3873
  onInput={(e) => setWatchGlobs(e.currentTarget.value)}
@@ -3808,7 +3875,7 @@ export default Plugin.define({
3808
3875
  placeholder={"**/*.md\nsrc/**"}
3809
3876
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
3810
3877
  />
3811
- <label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">Исключения (glob, по одной в строке)</label>
3878
+ <label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.watchIgnoreLabel")}</label>
3812
3879
  <textarea
3813
3880
  value={watchIgnore() || ""}
3814
3881
  onInput={(e) => setWatchIgnore(e.currentTarget.value)}
@@ -3816,14 +3883,14 @@ export default Plugin.define({
3816
3883
  placeholder={"node_modules/**\n*.log"}
3817
3884
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"
3818
3885
  />
3819
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Маски считаются от пути watchPath. Поддерживаются *, **, ? и классы [abc]; маска каталога с /** рекурсивна.</div>
3886
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.watchGlobsHint")}</div>
3820
3887
  </div>
3821
3888
  )}
3822
3889
 
3823
3890
  {triggerType() === "git" && (
3824
3891
  <>
3825
3892
  <div style="display:block;width:100%;margin-bottom:12px">
3826
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Ветки (glob, через запятую; пусто — любая)</label>
3893
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitBranchesLabel")}</label>
3827
3894
  <input
3828
3895
  type="text"
3829
3896
  value={gitBranch() || ""}
@@ -3833,7 +3900,7 @@ export default Plugin.define({
3833
3900
  />
3834
3901
  </div>
3835
3902
  <div style="display:block;width:100%;margin-bottom:12px">
3836
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Пути изменений (glob, по одной в строке; пусто — любой файл)</label>
3903
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitPathsLabel")}</label>
3837
3904
  <textarea
3838
3905
  value={gitPaths() || ""}
3839
3906
  onInput={(e) => setGitPaths(e.currentTarget.value)}
@@ -3843,7 +3910,7 @@ export default Plugin.define({
3843
3910
  />
3844
3911
  </div>
3845
3912
  <div style="display:block;width:100%;margin-bottom:12px">
3846
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Игнорируемые пути (glob, по одной в строке)</label>
3913
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitIgnoreLabel")}</label>
3847
3914
  <textarea
3848
3915
  value={gitIgnore() || ""}
3849
3916
  onInput={(e) => setGitIgnore(e.currentTarget.value)}
@@ -3853,7 +3920,7 @@ export default Plugin.define({
3853
3920
  />
3854
3921
  </div>
3855
3922
  <div style="display:block;width:100%;margin-bottom:12px">
3856
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Период опроса, секунды (минимум 5, по умолчанию 60)</label>
3923
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.gitPollLabel")}</label>
3857
3924
  <input
3858
3925
  type="number"
3859
3926
  min="5"
@@ -3862,7 +3929,7 @@ export default Plugin.define({
3862
3929
  placeholder="60"
3863
3930
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3864
3931
  />
3865
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Первый опрос запоминает текущий HEAD без запуска задачи — дальше задача стартует на новом коммите, затронувшем подходящие файлы.</div>
3932
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.gitPollHint")}</div>
3866
3933
  </div>
3867
3934
  </>
3868
3935
  )}
@@ -3870,64 +3937,64 @@ export default Plugin.define({
3870
3937
  {triggerType() === "mcp-event" && (
3871
3938
  <>
3872
3939
  <div style="display:block;width:100%;margin-bottom:12px">
3873
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">MCP-сервер / источник</label>
3940
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpSourceLabel")}</label>
3874
3941
  <input
3875
3942
  type="text"
3876
3943
  value={mcpServer() || ""}
3877
3944
  onInput={(e) => setMcpServer(e.currentTarget.value)}
3878
- placeholder="например, github"
3945
+ placeholder={gt("gui.mcpSourcePlaceholder")}
3879
3946
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3880
3947
  />
3881
3948
  </div>
3882
3949
  <div style="display:block;width:100%;margin-bottom:12px">
3883
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Имя события</label>
3950
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpEventLabel")}</label>
3884
3951
  <input
3885
3952
  type="text"
3886
3953
  value={mcpEventName() || ""}
3887
3954
  onInput={(e) => setMcpEventName(e.currentTarget.value)}
3888
- placeholder="например, github.pr.opened"
3955
+ placeholder={gt("gui.mcpEventPlaceholder")}
3889
3956
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3890
3957
  />
3891
3958
  </div>
3892
3959
  <div style="display:block;width:100%;margin-bottom:12px">
3893
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Фильтр (опционально)</label>
3960
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.mcpFilterLabel")}</label>
3894
3961
  <input
3895
3962
  type="text"
3896
3963
  value={mcpFilter() || ""}
3897
3964
  onInput={(e) => setMcpFilter(e.currentTarget.value)}
3898
- placeholder='например, repo="my-project" или regex'
3965
+ placeholder={gt("gui.mcpFilterPlaceholder")}
3899
3966
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3900
3967
  />
3901
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">key=value сравнивается с полем payload, иначе фильтр считается regex/подстрокой. События приходят через RPC emit_event.</div>
3968
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.mcpFilterHint")}</div>
3902
3969
  </div>
3903
3970
  </>
3904
3971
  )}
3905
3972
 
3906
3973
  {triggerType() === "once" && (
3907
3974
  <div style="display:block;width:100%;margin-bottom:12px">
3908
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Время однократного запуска</label>
3975
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.oneShotTimeLabel")}</label>
3909
3976
  <input
3910
3977
  type="text"
3911
3978
  value={runAt() || ""}
3912
3979
  onInput={(e) => setRunAt(e.currentTarget.value)}
3913
- placeholder="2026-11-14T10:00:00.000Z или локальная дата"
3980
+ placeholder={gt("gui.oneShotTimePlaceholder")}
3914
3981
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3915
3982
  />
3916
- <div style="font-size:11px;color:#8e8e93;margin:6px 0">Или задержка в секундах от нажатия кнопки «Создать задачу»:</div>
3983
+ <div style="font-size:11px;color:#8e8e93;margin:6px 0">{gt("gui.oneShotDelayHint")}</div>
3917
3984
  <input
3918
3985
  type="number"
3919
3986
  min="1"
3920
3987
  value={delaySeconds() || ""}
3921
3988
  onInput={(e) => setDelaySeconds(e.currentTarget.value)}
3922
- placeholder="например, 3600"
3989
+ placeholder={gt("gui.oneShotDelayPlaceholder")}
3923
3990
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3924
3991
  />
3925
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Приоритет у runAt: если задано время, delaySeconds игнорируется. После запуска задача больше не повторится.</div>
3992
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.oneShotHint")}</div>
3926
3993
  </div>
3927
3994
  )}
3928
3995
 
3929
3996
  <div style="display:block;width:100%;margin-bottom:12px">
3930
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Сессия OpenCode</label>
3997
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.sessionLabel")}</label>
3931
3998
  <div style="display:flex;gap:8px;flex-wrap:wrap">
3932
3999
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3933
4000
  <input
@@ -3937,7 +4004,7 @@ export default Plugin.define({
3937
4004
  onChange={() => setSession("new")}
3938
4005
  style="accent-color:#007acc"
3939
4006
  />
3940
- Новая
4007
+ {gt("gui.sessionNew")}
3941
4008
  </label>
3942
4009
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3943
4010
  <input
@@ -3947,7 +4014,7 @@ export default Plugin.define({
3947
4014
  onChange={() => setSession("reuse")}
3948
4015
  style="accent-color:#007acc"
3949
4016
  />
3950
- Переиспользовать
4017
+ {gt("gui.sessionReuse")}
3951
4018
  </label>
3952
4019
  <label style="display:flex;align-items:center;gap:6px;cursor:pointer;flex:1">
3953
4020
  <input
@@ -3957,25 +4024,53 @@ export default Plugin.define({
3957
4024
  onChange={() => setSession("last")}
3958
4025
  style="accent-color:#007acc"
3959
4026
  />
3960
- Последняя (--continue)
4027
+ {gt("gui.sessionContinue")}
3961
4028
  </label>
3962
4029
  </div>
3963
4030
  {session() === "reuse" && (
3964
4031
  <div style="margin-top:8px">
3965
- <label style="display:block;margin-bottom:6px;font-size:11px;color:#8e8e93">Сколько запусков переживает сессия (sessionMaxRuns, необязательно)</label>
4032
+ <label style="display:block;margin-bottom:6px;font-size:11px;color:#8e8e93">{gt("gui.sessionMaxRunsLabel")}</label>
3966
4033
  <input
3967
4034
  type="number"
3968
4035
  min="1"
3969
4036
  value={sessionMaxRuns() || ""}
3970
4037
  onInput={(e) => setSessionMaxRuns(e.currentTarget.value)}
3971
- placeholder="без ограничения"
4038
+ placeholder={gt("gui.unboundedPlaceholder")}
3972
4039
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3973
4040
  />
3974
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">sessionId генерируется плагином автоматически. При достижении лимита сессия удаляется, следующий запуск начинает чистую сессию.</div>
4041
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.sessionMaxRunsHint")}</div>
3975
4042
  </div>
3976
4043
  )}
3977
4044
  </div>
3978
4045
 
4046
+ {schedulerPlatform() === "win32" && (
4047
+ <div style="display:block;width:100%;margin-bottom:12px">
4048
+ <label style="display:flex;align-items:flex-start;gap:8px;cursor:pointer">
4049
+ <input
4050
+ type="checkbox"
4051
+ checked={runWhenLoggedOff()}
4052
+ onChange={(e) => setRunWhenLoggedOff(e.currentTarget.checked)}
4053
+ style="accent-color:#007acc;margin-top:3px"
4054
+ />
4055
+ <span>
4056
+ <span style="display:block;font-size:12px;color:#b0b0b0;font-weight:500">
4057
+ {gt("gui.runWhenLoggedOffLabel")}
4058
+ </span>
4059
+ <span
4060
+ style={{
4061
+ display: "block",
4062
+ "font-size": "11px",
4063
+ "margin-top": "4px",
4064
+ color: runWhenLoggedOff() ? "#ffd60a" : "#8e8e93",
4065
+ }}
4066
+ >
4067
+ {gt("gui.runWhenLoggedOffHint")}
4068
+ </span>
4069
+ </span>
4070
+ </label>
4071
+ </div>
4072
+ )}
4073
+
3979
4074
  <div
3980
4075
  style={{
3981
4076
  display: triggerType() !== "cron" ? "none" : "block",
@@ -3983,7 +4078,7 @@ export default Plugin.define({
3983
4078
  marginBottom: "12px",
3984
4079
  }}
3985
4080
  >
3986
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Расписание</label>
4081
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.scheduleLabel")}</label>
3987
4082
  <select
3988
4083
  value={cronPreset()}
3989
4084
  onChange={(e) => {
@@ -3993,13 +4088,13 @@ export default Plugin.define({
3993
4088
  }}
3994
4089
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
3995
4090
  >
3996
- {CRON_PRESETS.map((p) => (
4091
+ {cronPresets().map((p) => (
3997
4092
  <option key={p.value} value={p.value}>{p.label}</option>
3998
4093
  ))}
3999
4094
  </select>
4000
4095
  {showCustomCron && (
4001
4096
  <div style="display:block;width:100%;margin-top:8px">
4002
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Cron-выражение</label>
4097
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.cronExprLabel")}</label>
4003
4098
  <input
4004
4099
  type="text"
4005
4100
  value={schedule() || ""}
@@ -4013,13 +4108,13 @@ export default Plugin.define({
4013
4108
  <div style="display:block;max-height:80px;overflow-y:auto;margin-top:8px;padding:8px;background:#2a1113;border:1px solid #5a1d21;border-radius:6px;font-size:11px;line-height:1.4;color:#ff6b6b;white-space:pre-wrap;word-break:break-word">{cronError()}</div>
4014
4109
  )}
4015
4110
  <div style="display:block;width:100%;margin-top:12px">
4016
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Часовой пояс (IANA)</label>
4111
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.timezoneLabel")}</label>
4017
4112
  <input
4018
4113
  type="text"
4019
4114
  list="iana-timezones"
4020
4115
  value={timezone() || ""}
4021
4116
  onInput={(e) => setTimezone(e.currentTarget.value)}
4022
- placeholder="Пусто — системный пояс"
4117
+ placeholder={gt("gui.timezonePlaceholder")}
4023
4118
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4024
4119
  />
4025
4120
  <datalist id="iana-timezones">
@@ -4033,17 +4128,17 @@ export default Plugin.define({
4033
4128
  <option value="UTC" />
4034
4129
  </datalist>
4035
4130
  <div style="display:block;margin-top:6px;font-size:11px;color:#808080">
4036
- Другая зона — задача будится каждую минуту, cron проверяется с учётом пояса.
4131
+ {gt("gui.timezoneHint")}
4037
4132
  </div>
4038
4133
  </div>
4039
4134
  <div style="display:block;width:100%;margin-top:12px">
4040
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Окно запуска (необязательно)</label>
4135
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.windowLabel")}</label>
4041
4136
  <div style="display:flex;gap:8px;align-items:center">
4042
4137
  <input
4043
4138
  type="time"
4044
4139
  value={notBefore() || ""}
4045
4140
  onInput={(e) => setNotBefore(e.currentTarget.value)}
4046
- title="Начало окна"
4141
+ title={gt("gui.windowStartTitle")}
4047
4142
  style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4048
4143
  />
4049
4144
  <span style="color:#808080;font-size:12px">—</span>
@@ -4051,24 +4146,24 @@ export default Plugin.define({
4051
4146
  type="time"
4052
4147
  value={notAfter() || ""}
4053
4148
  onInput={(e) => setNotAfter(e.currentTarget.value)}
4054
- title="Конец окна (может быть меньше начала)"
4149
+ title={gt("gui.windowEndTitle")}
4055
4150
  style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4056
4151
  />
4057
4152
  </div>
4058
4153
  <div style="display:block;margin-top:6px;font-size:11px;color:#808080">
4059
- Вне окна запуск переносится на его открытие, а не пропускается. Например 22:00 — 06:00.
4154
+ {gt("gui.windowHint")}
4060
4155
  </div>
4061
4156
  <div style="display:block;margin-top:12px">
4062
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Дни недели (пусто — все дни)</label>
4157
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.weekdaysLabel")}</label>
4063
4158
  <div style="display:flex;gap:10px;flex-wrap:wrap">
4064
4159
  {[
4065
- { value: 1, label: "Пн" },
4066
- { value: 2, label: "Вт" },
4067
- { value: 3, label: "Ср" },
4068
- { value: 4, label: "Чт" },
4069
- { value: 5, label: "Пт" },
4070
- { value: 6, label: "Сб" },
4071
- { value: 0, label: "Вс" },
4160
+ { value: 1, day: "gui.weekday.1" },
4161
+ { value: 2, day: "gui.weekday.2" },
4162
+ { value: 3, day: "gui.weekday.3" },
4163
+ { value: 4, day: "gui.weekday.4" },
4164
+ { value: 5, day: "gui.weekday.5" },
4165
+ { value: 6, day: "gui.weekday.6" },
4166
+ { value: 0, day: "gui.weekday.0" },
4072
4167
  ].map((day) => (
4073
4168
  <label style="display:flex;align-items:center;gap:5px;cursor:pointer;font-size:12px;color:#d0d0d5">
4074
4169
  <input
@@ -4082,48 +4177,48 @@ export default Plugin.define({
4082
4177
  }}
4083
4178
  style="accent-color:#007acc"
4084
4179
  />
4085
- {day.label}
4180
+ {gt(day.day)}
4086
4181
  </label>
4087
4182
  ))}
4088
4183
  </div>
4089
4184
  </div>
4090
4185
  <div style="display:block;margin-top:12px">
4091
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Вне окна или в неразрешённый день</label>
4186
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.outsideWindowLabel")}</label>
4092
4187
  <select
4093
4188
  value={windowPolicy()}
4094
4189
  onChange={(e) => setWindowPolicy(e.currentTarget.value as "skip" | "postpone" | "run")}
4095
4190
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4096
4191
  >
4097
- <option value="postpone">Перенести на открытие окна (по умолчанию)</option>
4098
- <option value="skip">Пропустить запуск</option>
4099
- <option value="run">Выполнить всё равно</option>
4192
+ <option value="postpone">{gt("gui.windowPostpone")}</option>
4193
+ <option value="skip">{gt("gui.windowSkip")}</option>
4194
+ <option value="run">{gt("gui.windowRun")}</option>
4100
4195
  </select>
4101
4196
  <div style="display:block;margin-top:6px;font-size:11px;color:#808080">
4102
- Для cron политика применяется в обёртке, для файловых и git-триггеров — при обработке события. Перенос ждёт не дольше 12 часов.
4197
+ {gt("gui.windowPolicyHint")}
4103
4198
  </div>
4104
4199
  </div>
4105
4200
  </div>
4106
4201
  </div>
4107
4202
 
4108
4203
  <div style="display:block;width:100%;margin-bottom:12px">
4109
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Промпт</label>
4204
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.promptLabel")}</label>
4110
4205
  <textarea
4111
4206
  value={prompt() || ""}
4112
4207
  onInput={(e) => setPrompt(e.currentTarget.value)}
4113
- placeholder="Напиши краткий отчет о состоянии рынка"
4208
+ placeholder={gt("gui.promptPlaceholder")}
4114
4209
  rows={2}
4115
4210
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical"
4116
4211
  />
4117
4212
  </div>
4118
4213
 
4119
4214
  <div style="display:block;width:100%;margin-bottom:12px">
4120
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Шаблон промпта</label>
4215
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.promptTemplateLabel")}</label>
4121
4216
  <select
4122
4217
  value={template()}
4123
4218
  onChange={(e) => selectTemplate(e.currentTarget.value)}
4124
4219
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4125
4220
  >
4126
- {TEMPLATES.map((t) => (
4221
+ {promptTemplates().map((t) => (
4127
4222
  <option key={t.value} value={t.value}>{t.label}</option>
4128
4223
  ))}
4129
4224
  {customTemplates().map((t) => (
@@ -4132,7 +4227,7 @@ export default Plugin.define({
4132
4227
  </select>
4133
4228
  {template().startsWith("custom:") && (
4134
4229
  <div style="display:flex;align-items:center;gap:6px;margin-top:8px">
4135
- <span style="font-size:10px;color:#8e8e93">Кастомный шаблон:</span>
4230
+ <span style="font-size:10px;color:#8e8e93">{gt("gui.customTemplate")}</span>
4136
4231
  {customTemplates().map((t) => {
4137
4232
  if (`custom:${t.id}` !== template()) return null;
4138
4233
  return (
@@ -4146,7 +4241,7 @@ export default Plugin.define({
4146
4241
  const t = customTemplates().find((x) => `custom:${x.id}` === template());
4147
4242
  if (t) handleDeleteTemplate(t);
4148
4243
  }}
4149
- title="Удалить шаблон"
4244
+ title={gt("gui.deleteTemplateTitle")}
4150
4245
  style="background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;line-height:1;padding:0"
4151
4246
  onMouseEnter={(e) => { e.currentTarget.style.color = "#c92a2a"; }}
4152
4247
  onMouseLeave={(e) => { e.currentTarget.style.color = "#ff3b30"; }}
@@ -4158,13 +4253,13 @@ export default Plugin.define({
4158
4253
  </div>
4159
4254
 
4160
4255
  <div style="display:block;width:100%;margin-bottom:12px">
4161
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Модель LLM</label>
4256
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.modelLabel")}</label>
4162
4257
  <input
4163
4258
  type="text"
4164
4259
  list="scheduler-model-presets"
4165
4260
  value={model() || ""}
4166
4261
  onInput={(e) => setModel(e.currentTarget.value)}
4167
- placeholder="по умолчанию (как в OpenCode)"
4262
+ placeholder={gt("gui.modelPlaceholder")}
4168
4263
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4169
4264
  />
4170
4265
  <datalist id="scheduler-model-presets">
@@ -4174,28 +4269,28 @@ export default Plugin.define({
4174
4269
  <option value="google/gemini-2.5-pro" />
4175
4270
  <option value="openai/gpt-4o-mini" />
4176
4271
  </datalist>
4177
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Пусто — модель OpenCode по умолчанию. Иначе будет передан флаг --model.</div>
4272
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.modelHint")}</div>
4178
4273
  </div>
4179
4274
 
4180
4275
  <div style="display:block;width:100%;margin-bottom:12px">
4181
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Приоритет</label>
4276
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.priorityLabel")}</label>
4182
4277
  <select
4183
4278
  value={String(priority())}
4184
4279
  onChange={(e) => setPriority(Number(e.currentTarget.value) || DEFAULT_PRIORITY)}
4185
4280
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4186
4281
  >
4187
- {PRIORITY_OPTIONS.map((p) => (
4282
+ {priorityOptions().map((p) => (
4188
4283
  <option key={p.value} value={String(p.value)}>{p.label}</option>
4189
4284
  ))}
4190
- {!PRIORITY_OPTIONS.some((p) => p.value === priority()) && (
4191
- <option value={String(priority())}>Другой ({priority()})</option>
4285
+ {!priorityOptions().some((p) => p.value === priority()) && (
4286
+ <option value={String(priority())}>{gt("gui.otherPriorityOption", { priority: priority() })}</option>
4192
4287
  )}
4193
4288
  </select>
4194
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Если готовы несколько задач сразу, первой запускается задача с более высоким приоритетом.</div>
4289
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.priorityHint")}</div>
4195
4290
  </div>
4196
4291
 
4197
4292
  <div style="display:block;width:100%;margin-bottom:12px">
4198
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Кол-во повторов при ошибке</label>
4293
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.maxRetriesLabel")}</label>
4199
4294
  <input
4200
4295
  type="number"
4201
4296
  min="0"
@@ -4207,7 +4302,7 @@ export default Plugin.define({
4207
4302
  </div>
4208
4303
 
4209
4304
  <div style="display:block;width:100%;margin-bottom:12px">
4210
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Задержка перед повтором (сек)</label>
4305
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.retryDelayLabel")}</label>
4211
4306
  <input
4212
4307
  type="number"
4213
4308
  min="1"
@@ -4219,46 +4314,46 @@ export default Plugin.define({
4219
4314
  </div>
4220
4315
 
4221
4316
  <div style="display:block;width:100%;margin-bottom:12px">
4222
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Проверочная команда (Quality Gate)</label>
4317
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.qualityGateLabel")}</label>
4223
4318
  <input
4224
4319
  type="text"
4225
4320
  value={qualityGate() || ""}
4226
4321
  onInput={(e) => setQualityGate(e.currentTarget.value)}
4227
- placeholder="например: npm run test"
4322
+ placeholder={gt("gui.qualityGatePlaceholder")}
4228
4323
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4229
4324
  />
4230
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Выполняется после успешного ответа ИИ. Ненулевой код = ошибка задачи.</div>
4325
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.qualityGateHint")}</div>
4231
4326
  </div>
4232
4327
 
4233
4328
  <div style="display:block;width:100%;margin-bottom:12px">
4234
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Команда перед запуском (Pre-flight)</label>
4329
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.preflightLabel")}</label>
4235
4330
  <input
4236
4331
  type="text"
4237
4332
  value={beforeScript() || ""}
4238
4333
  onInput={(e) => setBeforeScript(e.currentTarget.value)}
4239
- placeholder="например: git pull"
4334
+ placeholder={gt("gui.preflightPlaceholder")}
4240
4335
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4241
4336
  />
4242
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Например: git pull или npm install. Выполняется в рабочей директории задачи. Ненулевой код отменяет запуск (Pre-flight script failed).</div>
4337
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.preflightHint")}</div>
4243
4338
  </div>
4244
4339
 
4245
4340
  <div style="display:block;width:100%;margin-bottom:12px">
4246
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Команда после запуска (Post-flight)</label>
4341
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.postflightLabel")}</label>
4247
4342
  <input
4248
4343
  type="text"
4249
4344
  value={afterScript() || ""}
4250
4345
  onInput={(e) => setAfterScript(e.currentTarget.value)}
4251
- placeholder="например: git push"
4346
+ placeholder={gt("gui.postflightPlaceholder")}
4252
4347
  style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"
4253
4348
  />
4254
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Например: git push или npm run build. Выполняется в рабочей директории задачи даже при ошибке основной задачи.</div>
4349
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.postflightHint")}</div>
4255
4350
  </div>
4256
4351
 
4257
4352
  <div style="display:block;width:100%;margin-bottom:12px">
4258
- <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">Зависит от задач (успешное завершение)</label>
4353
+ <label style="display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500">{gt("gui.dependsOnLabel")}</label>
4259
4354
  <div style="display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;min-height:38px;box-sizing:border-box">
4260
4355
  {dependencyCandidates().length === 0 ? (
4261
- <span style="font-size:12px;color:#8e8e93">Других задач пока нет</span>
4356
+ <span style="font-size:12px;color:#8e8e93">{gt("gui.noOtherTasks")}</span>
4262
4357
  ) : (
4263
4358
  dependencyCandidates().map((candidate) => (
4264
4359
  <label style={`display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:14px;border:1px solid ${dependsOn().includes(candidate) ? "#5ac8fa" : "#333"};background:${dependsOn().includes(candidate) ? "rgba(90,200,250,0.12)" : "transparent"};color:${dependsOn().includes(candidate) ? "#5ac8fa" : "#cfcfd2"};font-size:12px;cursor:pointer;user-select:none`}>
@@ -4273,13 +4368,13 @@ export default Plugin.define({
4273
4368
  ))
4274
4369
  )}
4275
4370
  </div>
4276
- <div style="font-size:11px;color:#8e8e93;margin-top:6px">Задача запустится автоматически, когда все отмеченные задачи завершатся успешно.</div>
4371
+ <div style="font-size:11px;color:#8e8e93;margin-top:6px">{gt("gui.dependsOnHint")}</div>
4277
4372
  </div>
4278
4373
 
4279
4374
  {/* Role-scoped tools (Спринт 14): metadata-only, denied имеет приоритет */}
4280
4375
  <details style="display:block;width:100%;margin-bottom:12px">
4281
4376
  <summary style="cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:8px;user-select:none">
4282
- 🔒 Ограничения инструментов
4377
+ {gt("gui.toolLimitsHeading")}
4283
4378
  {(allowedTools().length > 0 || deniedTools().length > 0) && (
4284
4379
  <span style="color:#5ac8fa;font-size:11px;margin-left:6px">
4285
4380
  ({allowedTools().length} allowed · {deniedTools().length} denied)
@@ -4288,10 +4383,10 @@ export default Plugin.define({
4288
4383
  </summary>
4289
4384
  <div style="display:block;width:100%;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px;box-sizing:border-box">
4290
4385
  <div style="font-size:11px;color:#8e8e93;margin-bottom:8px">
4291
- ⚠ Metadata-only: opencode 2.2.3 не поддерживает allow/deny флаги — ограничения фиксируются в логе и истории.
4292
- При конфликте приоритет у <b>denied</b>. Пустой allowedTools запрещён.
4386
+ {gt("gui.toolLimitsNote")}
4387
+ {gt("gui.toolLimitsDenied")}
4293
4388
  </div>
4294
- <div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">Белый список (allowedTools)</div>
4389
+ <div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">{gt("gui.allowedToolsLabel")}</div>
4295
4390
  <div style="display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px">
4296
4391
  {POPULAR_TOOLS.map((tool) => (
4297
4392
  <label style={`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${allowedTools().includes(tool) ? "#34c759" : "#333"};background:${allowedTools().includes(tool) ? "rgba(52,199,89,0.12)" : "transparent"};color:${allowedTools().includes(tool) ? "#34c759" : "#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`}>
@@ -4305,7 +4400,7 @@ export default Plugin.define({
4305
4400
  </label>
4306
4401
  ))}
4307
4402
  </div>
4308
- <div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">Чёрный список (deniedTools)</div>
4403
+ <div style="font-size:11px;color:#b0b0b0;margin-bottom:4px">{gt("gui.deniedToolsLabel")}</div>
4309
4404
  <div style="display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px">
4310
4405
  {POPULAR_TOOLS.map((tool) => (
4311
4406
  <label style={`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${deniedTools().includes(tool) ? "#ff3b30" : "#333"};background:${deniedTools().includes(tool) ? "rgba(255,59,48,0.12)" : "transparent"};color:${deniedTools().includes(tool) ? "#ff3b30" : "#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`}>
@@ -4324,7 +4419,7 @@ export default Plugin.define({
4324
4419
  type="text"
4325
4420
  value={customTool()}
4326
4421
  onInput={(e) => setCustomTool(e.currentTarget.value)}
4327
- placeholder="свой инструмент, например websearch"
4422
+ placeholder={gt("gui.toolPlaceholder")}
4328
4423
  style="flex:1;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"
4329
4424
  />
4330
4425
  <button onClick={() => addCustomTool("allowed")} style="padding:6px 10px;background:transparent;border:1px solid #34c759;color:#34c759;border-radius:6px;cursor:pointer;font-size:12px">+ allowed</button>
@@ -4342,7 +4437,7 @@ export default Plugin.define({
4342
4437
  <div style="display:block;width:100%;margin-top:8px">
4343
4438
  <button
4344
4439
  onClick={() => {
4345
- setDryRunName("(форма)")
4440
+ setDryRunName(DRYRUN_FORM_MARKER)
4346
4441
  const baseTask = {
4347
4442
  order: 0,
4348
4443
  trigger: "manual",
@@ -4363,7 +4458,7 @@ export default Plugin.define({
4363
4458
  name: matrixClonePreviewName(name(), w.name),
4364
4459
  order: index,
4365
4460
  cwd: w.path,
4366
- matrixParent: name() || "(без имени)",
4461
+ matrixParent: name() || gt("gui.noNameFallback"),
4367
4462
  }))
4368
4463
  setDryRunReport({
4369
4464
  tasks: matrixMode()
@@ -4371,29 +4466,29 @@ export default Plugin.define({
4371
4466
  : [
4372
4467
  {
4373
4468
  ...baseTask,
4374
- name: name() || "(без имени)",
4469
+ name: name() || gt("gui.noNameFallback"),
4375
4470
  cwd:
4376
4471
  selectedWorkspace()?.path ||
4377
4472
  (workingDirectory() || "").trim() ||
4378
- "(папка проекта)",
4473
+ gt("gui.projectFolderFallback"),
4379
4474
  },
4380
4475
  ],
4381
4476
  totals: {},
4382
4477
  warnings: [
4383
- ...(!name().trim() ? ["Не указано имя — превью локальное (форма не сохранена)."] : []),
4478
+ ...(!name().trim() ? [gt("gui.dryRunNoNameWarning")] : []),
4384
4479
  ...(matrixMode()
4385
4480
  ? [
4386
- `Matrix: будет создано ${matrixTasks.length} клон(а/ов) по workspace; родитель сам не выполняется.`,
4481
+ gt("gui.dryRunMatrixPreview", { count: matrixTasks.length }),
4387
4482
  ]
4388
4483
  : []),
4389
4484
  ],
4390
4485
  })
4391
4486
  setDryRunOpen(true)
4392
4487
  }}
4393
- title="Локальное превью команды по текущим полям формы (без RPC и без запуска)"
4488
+ title={gt("gui.dryRunPreviewTitle")}
4394
4489
  style="display:block;width:100%;padding:8px;margin-top:4px;background:transparent;border:1px solid #333;border-radius:6px;color:#d4e6ff;cursor:pointer;font-size:12px"
4395
4490
  >
4396
- 🧪 Превью
4491
+ {gt("gui.dryRunButton")}
4397
4492
  </button>
4398
4493
  <button
4399
4494
  onClick={handleCreate}
@@ -4401,22 +4496,22 @@ export default Plugin.define({
4401
4496
  title={!canSubmit() ? validationError() : undefined}
4402
4497
  style={`display:block;width:100%;padding:10px;margin-top:8px;background:${busy() ? "#666" : "#007acc"};color:white;border-radius:6px;border:none;cursor:${busy() || !canSubmit() ? "not-allowed" : "pointer"};font-size:13px;font-weight:500;opacity:${busy() || !canSubmit() ? 0.6 : 1}`}
4403
4498
  >
4404
- {busy() ? "Создание..." : isEditing ? "Сохранить" : "Создать задачу"}
4499
+ {busy() ? gt("gui.creating") : isEditing ? gt("gui.save") : gt("gui.createTaskSubmit")}
4405
4500
  </button>
4406
4501
  {isEditing && (
4407
4502
  <button
4408
- onClick={() => { setEditingJob(null); setName(""); setSchedule("* * * * *"); setPrompt(""); setModel(""); setPriority(DEFAULT_PRIORITY); setRetryCount(0); setRetryDelay(60); setQualityGate(""); setDependsOn([]); setBeforeScript(""); setAfterScript(""); setTriggerType("cron"); setWatchPath(""); setRunAt(""); setDelaySeconds(""); setSession("new"); setSessionMaxRuns(""); setTimezone(""); setNotBefore(""); setNotAfter(""); setMcpServer(""); setMcpEventName(""); setMcpFilter(""); setWorkingDirectory(""); setWorkspaceId(""); setAllowedTools([]); setDeniedTools([]); resetMatrixForm(); setCronPreset("* * * * *"); setCronError("") }}
4503
+ onClick={() => { setEditingJob(null); setName(""); setSchedule("* * * * *"); setPrompt(""); setModel(""); setPriority(DEFAULT_PRIORITY); setRetryCount(0); setRetryDelay(60); setQualityGate(""); setDependsOn([]); setBeforeScript(""); setAfterScript(""); setTriggerType("cron"); setWatchPath(""); setRunAt(""); setDelaySeconds(""); setSession("new"); setSessionMaxRuns(""); setRunWhenLoggedOff(false); setTimezone(""); setNotBefore(""); setNotAfter(""); setMcpServer(""); setMcpEventName(""); setMcpFilter(""); setWorkingDirectory(""); setWorkspaceId(""); setAllowedTools([]); setDeniedTools([]); resetMatrixForm(); setCronPreset("* * * * *"); setCronError("") }}
4409
4504
  style="background:transparent;border:1px solid #333;border-radius:6px;padding:8px 16px;color:#ff3b30;cursor:pointer;font-size:13px;width:100%"
4410
4505
  >
4411
- Отмена
4412
- </button>
4506
+ {gt("gui.cancel")}
4507
+ </button>
4413
4508
  )}
4414
4509
  </div>
4415
4510
 
4416
- {dryRunOpen() && dryRunName() === "(форма)" && (
4511
+ {dryRunOpen() && dryRunName() === DRYRUN_FORM_MARKER && (
4417
4512
  <div style="display:block;width:100%;margin-top:8px;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px">
4418
4513
  <div style="font-size:12px;font-weight:600;color:#ffffff;display:flex;justify-content:space-between;align-items:center">
4419
- 🧪 Превью (локальное, по полям формы)
4514
+ {gt("gui.dryRunLocalTitle")}
4420
4515
  <button onClick={() => closeDryRun()} style="background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0">✕</button>
4421
4516
  </div>
4422
4517
  {(() => {
@@ -4448,10 +4543,10 @@ export default Plugin.define({
4448
4543
 
4449
4544
  {/* Список задач */}
4450
4545
  <div style="display:block;width:100%;margin-top:24px">
4451
- <h3 style="margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff">Задачи</h3>
4546
+ <h3 style="margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff">{gt("gui.tasksHeading")}</h3>
4452
4547
  {workspaceFilter() !== "all" && (
4453
4548
  <div style="font-size:11px;color:#8e8e93;margin-bottom:8px">
4454
- Фильтр: {workspaceFilter() === "none" ? "без workspace" : `📦 ${workspaces().find((w) => w.id === workspaceFilter())?.name ?? "workspace"}`} · показано {visibleJobs().length} из {jobsArr().length}
4549
+ {gt("gui.filterSummary", { scope: workspaceFilter() === "none" ? gt("gui.workspaceNone") : `📦 ${workspaces().find((w) => w.id === workspaceFilter())?.name ?? "workspace"}`, visible: visibleJobs().length, total: jobsArr().length })}
4455
4550
  </div>
4456
4551
  )}
4457
4552
  {visibleJobs().length === 0 ?
@@ -4459,8 +4554,8 @@ export default Plugin.define({
4459
4554
  <span style="font-size:40px;line-height:1">{winterMode() ? "🎄" : "📅"}</span>
4460
4555
  <span style="max-width:380px;line-height:1.5">
4461
4556
  {winterMode()
4462
- ? "Задач пока нет. Самое время украсить ёлку!"
4463
- : "Нет активных задач. Создайте первую и доверьте рутину ИИ!"}
4557
+ ? gt("gui.emptyWinter")
4558
+ : gt("gui.emptyNormal")}
4464
4559
  </span>
4465
4560
  </div>
4466
4561
  :
@@ -4518,17 +4613,17 @@ export default Plugin.define({
4518
4613
  onClick={() => answerPrompt(null)}
4519
4614
  style="padding:6px 14px;border-radius:6px;border:1px solid #3a3a3a;background:#262626;color:#e0e0e0;font-size:12px;cursor:pointer"
4520
4615
  >
4521
- Отмена
4616
+ {gt("gui.cancel")}
4522
4617
  </button>
4523
4618
  <button
4524
4619
  onClick={() => answerPrompt(promptValue())}
4525
4620
  style="padding:6px 14px;border-radius:6px;border:1px solid #0a84ff;background:#0a84ff;color:#fff;font-size:12px;font-weight:600;cursor:pointer"
4526
4621
  >
4527
- ОК
4622
+ {gt("gui.ok")}
4528
4623
  </button>
4529
4624
  </div>
4530
4625
  {promptTitle().includes("KEY=VALUE") && (
4531
- <div style="font-size:11px;color:#8e8e93">Ctrl+Enter — сохранить, Escape — отмена</div>
4626
+ <div style="font-size:11px;color:#8e8e93">{gt("gui.modalShortcutHint")}</div>
4532
4627
  )}
4533
4628
  </div>
4534
4629
  </div>
@@ -4539,7 +4634,7 @@ export default Plugin.define({
4539
4634
  <div style="position:fixed;bottom:16px;left:16px;right:16px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:0;max-height:300px;overflow:hidden;display:flex;flex-direction:column;z-index:1000">
4540
4635
  <div style="display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #333;background:#252526;border-radius:8px 8px 0 0">
4541
4636
  <div style="display:flex;align-items:center;gap:8px">
4542
- <span style="font-size:13px;font-weight:600;color:#ffffff">Логи</span>
4637
+ <span style="font-size:13px;font-weight:600;color:#ffffff">{gt("gui.logsHeading")}</span>
4543
4638
  <span style="font-size:11px;color:#8e8e93">{logsTask()}</span>
4544
4639
  </div>
4545
4640
  <button
@@ -4568,18 +4663,18 @@ export default Plugin.define({
4568
4663
  return ctx.add(Panel, {
4569
4664
  id: "scheduler-jobs",
4570
4665
  region: "side",
4571
- list: () => [{ id: "jobs", title: "Планировщик", pinned: true }],
4666
+ list: () => [{ id: "jobs", title: gt("gui.jobsTitle"), pinned: true }],
4572
4667
  render: () => (
4573
4668
  <ErrorBoundary fallback={(err: any) => (
4574
4669
  <div style="padding:16px;color:#ff3b30;font-size:13px">
4575
- Ошибка UI: {err.message}
4670
+ {gt("gui.uiError", { message: err.message })}
4576
4671
  </div>
4577
4672
  )}>
4578
4673
  <div style="padding:16px;display:flex;flex-direction:column;gap:16px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;background:#0f0f0f">
4579
4674
  <h2 style="margin:0;font-size:22px;font-weight:800;color:#ffffff">{schedulerTitle()}</h2>
4580
4675
  <div style="margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93">Local AI CI/CD Orchestrator</div>
4581
4676
  <div style="background:#2a1a1a;border:1px solid #ff3b30;border-radius:8px;padding:16px;color:#ff3b30">
4582
- Произошла ошибка отображения. Попробуйте перезагрузить панель.
4677
+ {gt("gui.errorBoundaryDetail")}
4583
4678
  </div>
4584
4679
  </div>
4585
4680
  </ErrorBoundary>