pantheon-opencode 2.0.0 → 2.0.2

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.
@@ -111,6 +111,29 @@ function formatSpent(cost) {
111
111
  const MODEL_USAGE_VISIBLE_CEILING = 3;
112
112
  const MODEL_USAGE_MESSAGE_LIMIT = 400;
113
113
  const MODEL_USAGE_SESSION_LIMIT = 8;
114
+ Object.freeze([
115
+ "auto",
116
+ "pt-BR",
117
+ "en"
118
+ ]);
119
+ /**
120
+ * Resolve effective language: 'pt-BR' or 'en'.
121
+ * Defaults to 'pt-BR' if system locale contains 'pt', if Intl locale is pt,
122
+ * or if system timezone is Brazilian/Portuguese; otherwise 'en'.
123
+ */
124
+ function resolveLanguage(preference = "auto", env = process.env) {
125
+ if (preference === "pt-BR") return "pt-BR";
126
+ if (preference === "en") return "en";
127
+ if ((env.LC_ALL ?? env.LC_MESSAGES ?? env.LANG ?? env.LANGUAGE ?? "").toLowerCase().startsWith("pt")) return "pt-BR";
128
+ try {
129
+ if (Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase().startsWith("pt")) return "pt-BR";
130
+ } catch {}
131
+ try {
132
+ const tz = (env.TZ ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "").toLowerCase();
133
+ if (tz.includes("sao_paulo") || tz.includes("brazil") || tz.includes("fortaleza") || tz.includes("recife") || tz.includes("manaus") || tz.includes("belem") || tz.includes("cuiaba") || tz.includes("campo_grande") || tz.includes("porto_velho") || tz.includes("rio_branco") || tz.includes("boa_vista") || tz.includes("maceio") || tz.includes("bahia") || tz.includes("noronha") || tz.includes("araguaina") || tz.includes("santarem") || tz.includes("lisbon") || tz.includes("madeira") || tz.includes("azores")) return "pt-BR";
134
+ } catch {}
135
+ return "en";
136
+ }
114
137
  //#endregion
115
138
  //#region src/autonomy-state.ts
116
139
  const DEFAULT_GOAL_LOOP_PREFS = {
@@ -165,72 +188,73 @@ function parseUsd(cell) {
165
188
  return Number.isFinite(value) && value > 0 ? value : null;
166
189
  }
167
190
  function buildAutonomyTab(input) {
191
+ const isPt = resolveLanguage(input.languagePref) === "pt-BR";
168
192
  return {
169
193
  id: "autonomy",
170
- title: "Autonomy",
194
+ title: isPt ? "Autonomia" : "Autonomy",
171
195
  groups: [
172
196
  {
173
- title: "Goal loop (multi-turn session auto-continuation)",
197
+ title: isPt ? "Goal loop (auto-continuação de sessões multi-turn)" : "Goal loop (multi-turn session auto-continuation)",
174
198
  rows: [
175
199
  {
176
200
  id: "autonomy.goal_loop.enabled",
177
- name: "Goal loop",
201
+ name: isPt ? "Goal loop" : "Goal loop",
178
202
  value: input.goalLoop.enabled ? "enabled" : "disabled",
179
203
  cycle: GOAL_LOOP_ENABLED_CYCLE,
180
- note: "auto-continues multi-turn tasks when session goes idle" + (input.goalLoopRestartPending ? " · [!] restart required to apply" : " · applies after OpenCode restart")
204
+ note: isPt ? "continua tarefas multi-turn quando a sessão fica ociosa" + (input.goalLoopRestartPending ? " · [!] reinício necessário para aplicar (restart)" : " · aplicado após reiniciar o OpenCode") : "auto-continues multi-turn tasks when session goes idle" + (input.goalLoopRestartPending ? " · [!] restart required to apply" : " · applies after OpenCode restart")
181
205
  },
182
206
  {
183
207
  id: "autonomy.goal_loop.maxContinuations",
184
- name: "Max continuations",
208
+ name: isPt ? "Limite continuações" : "Max continuations",
185
209
  value: String(input.goalLoop.maxContinuations),
186
210
  cycle: MAX_CONTINUATIONS_CYCLE,
187
- note: "1..200 — safety ceiling to prevent runaway tasks"
211
+ note: isPt ? "1..200 — teto de segurança contra loops infinitos" : "1..200 — safety ceiling to prevent runaway tasks"
188
212
  },
189
213
  {
190
214
  id: "autonomy.goal_loop.cooldownMs",
191
- name: "Cooldown (ms)",
215
+ name: isPt ? "Pausa entre turnos (ms)" : "Cooldown (ms)",
192
216
  value: String(input.goalLoop.cooldownMs),
193
217
  cycle: COOLDOWN_MS_CYCLE,
194
- note: "delay between autonomous turns (min 1000ms)"
218
+ note: isPt ? "intervalo entre turnos autônomos (mín 1000ms)" : "delay between autonomous turns (min 1000ms)"
195
219
  }
196
220
  ]
197
221
  },
198
222
  {
199
- title: "Decision budgets (applies live per gated call)",
223
+ title: isPt ? "Orçamento Jev (aplicado em tempo real por decisão)" : "Decision budgets (applies live per gated call)",
200
224
  rows: [{
201
225
  id: "autonomy.budget.monthly",
202
- name: "Monthly cap",
226
+ name: isPt ? "Teto mensal" : "Monthly cap",
203
227
  value: formatUsd(input.budgets.monthlyUsd),
204
228
  cycle: MONTHLY_USD_CYCLE,
205
- note: "monthly USD ceiling for gated arbitrator decisions"
229
+ note: isPt ? "teto mensal em USD para arbitragem do Jev" : "monthly USD ceiling for gated arbitrator decisions"
206
230
  }, {
207
231
  id: "autonomy.budget.perDecision",
208
- name: "Per-decision cap",
232
+ name: isPt ? "Teto por decisão" : "Per-decision cap",
209
233
  value: formatUsd(input.budgets.perDecisionUsd),
210
234
  cycle: PER_DECISION_USD_CYCLE,
211
- note: "price cap — gated decisions above this are refused"
235
+ note: isPt ? "teto de custo por decisão — acima disso é recusada" : "price cap — gated decisions above this are refused"
212
236
  }]
213
237
  },
214
238
  {
215
- title: "Decision gradient (reference policy · J1 owns the risk axis)",
239
+ title: isPt ? "Gradiente de decisão (política de referência · J1 governa o risco)" : "Decision gradient (reference policy · J1 owns the risk axis)",
216
240
  rows: [
217
241
  {
218
242
  id: "autonomy.gradient.solo",
219
243
  name: "Decide solo",
220
244
  value: "autonomous",
221
- note: "reversible & low-risk edits, routine fixes (no gate)"
245
+ note: isPt ? "edições reversíveis e rotineiras, sem travas (baixo risco)" : "reversible & low-risk edits, routine fixes (no gate)"
222
246
  },
223
247
  {
224
248
  id: "autonomy.gradient.jev",
225
249
  name: "Jev decides",
226
250
  value: "arbitrated",
227
- note: "typed ambiguity & candidate ranking (budget-capped)"
251
+ note: isPt ? "ambiguidade de tipos e ranqueamento de candidatos (com teto de custo)" : "typed ambiguity & candidate ranking (budget-capped)"
228
252
  },
229
253
  {
230
254
  id: "autonomy.gradient.human",
231
255
  name: "Human decides",
232
256
  value: "human review",
233
- note: "high-risk & destructive operations (J1 gate)"
257
+ note: isPt ? "operações de alto risco ou destrutivas (portão J1)" : "high-risk & destructive operations (J1 gate)"
234
258
  }
235
259
  ]
236
260
  }
@@ -505,49 +529,51 @@ function credentialStatus(provider, env, authProviders, configProviders) {
505
529
  if (provider === "opencode-console-jev") return "auth store";
506
530
  return "missing";
507
531
  }
508
- function buildDecisionTab(read, env = process.env, authProviders = /* @__PURE__ */ new Set(), configProviders = /* @__PURE__ */ new Set()) {
532
+ function buildDecisionTab(read, env = process.env, authProviders = /* @__PURE__ */ new Set(), configProviders = /* @__PURE__ */ new Set(), languagePref) {
533
+ const isPt = resolveLanguage(languagePref, env) === "pt-BR";
509
534
  const { config, corrupt } = read;
510
535
  const rows = [{
511
536
  id: "decision.enabled",
512
- name: "Router",
537
+ name: isPt ? "Assistente Jev" : "Router",
513
538
  value: config.enabled ? "enabled" : "disabled",
514
539
  ...corrupt ? {} : { cycle: DECISION_ENABLED_CYCLE },
515
- note: corrupt ? "config unreadable/invalid — runtime fail-closes; repair via `decision-router setup-model`" : "applies live — the runtime re-reads this on every gated call"
540
+ note: corrupt ? isPt ? "config inválida — runtime fail-closes; repair via `decision-router setup-model`" : "config unreadable/invalid — runtime fail-closes; repair via `decision-router setup-model`" : isPt ? "applies live — arbitragem de decisões relida em tempo real a cada chamada" : "applies live — the runtime re-reads this on every gated call"
516
541
  }, {
517
542
  id: "decision.selection.mode",
518
- name: "Selection mode",
543
+ name: isPt ? "Modo de operação" : "Selection mode",
519
544
  value: config.selection.mode,
520
545
  ...corrupt ? {} : { cycle: DECISION_SELECTION_CYCLE },
521
- note: "local routes on-device; auto/explicit pick a remote decision model"
546
+ note: isPt ? "local = no seu PC (grátis); auto/explícito = modelo nuvem (OpenRouter)" : "local routes on-device; auto/explicit pick a remote decision model"
522
547
  }];
523
- if (config.selection.mode === "explicit" || config.selection.provider !== void 0) rows.push({
548
+ const explicitTarget = config.selection.provider ? `${config.selection.provider}/${config.selection.model ?? ""}` : DECISION_TARGET_CYCLE[0] ?? "openrouter-jev/typesafe/jev-1.13";
549
+ rows.push({
524
550
  id: "decision.selection.target",
525
- name: "Explicit target",
526
- value: config.selection.provider ? `${config.selection.provider}/${config.selection.model ?? ""}` : "none",
527
- ...corrupt || config.selection.mode !== "explicit" ? {} : { cycle: DECISION_TARGET_CYCLE },
528
- note: "provider/model — sets the candidate list"
551
+ name: isPt ? "Modelo de decisão" : "Explicit target",
552
+ value: config.selection.mode === "local" ? config.selection.provider ? `${config.selection.provider}/${config.selection.model ?? ""}` : "local (on-device)" : explicitTarget,
553
+ ...corrupt ? {} : { cycle: DECISION_TARGET_CYCLE },
554
+ note: isPt ? config.selection.mode === "local" ? "ciclar seleciona modelo remoto e ativa modo explícito" : "provedor/modelo ativo — define candidato para arbitragem" : config.selection.mode === "local" ? "cycle to select a remote model and activate explicit mode" : "provider/model — sets the candidate list"
529
555
  });
530
- if (config.enabled_candidates.length > 0) rows.push({
556
+ if ((config.enabled_candidates?.length ?? 0) > 0) rows.push({
531
557
  id: "decision.candidates",
532
- name: "Candidates",
558
+ name: isPt ? "Candidatos ativos" : "Candidates",
533
559
  value: String(config.enabled_candidates.length),
534
- note: config.egress_consent ? config.enabled_candidates.map((candidate) => `${candidate.provider}/${candidate.model}`).join(", ") : "egress consent NOT granted — remote routes fail closed"
560
+ note: config.egress_consent ? config.enabled_candidates.map((candidate) => `${candidate.provider}/${candidate.model}`).join(", ") : isPt ? "egress consent NÃO concedido — rotas remotas bloqueadas" : "egress consent NOT granted — remote routes fail closed"
535
561
  });
536
562
  rows.push({
537
563
  id: "decision.consent",
538
- name: "Egress consent",
564
+ name: isPt ? "Acesso à nuvem (Egress)" : "Egress consent",
539
565
  value: config.egress_consent ? "granted" : "not granted",
540
566
  ...corrupt ? {} : { cycle: DECISION_CONSENT_CYCLE },
541
- note: "granted = remote decision routes may call their gateway (budget-capped)"
567
+ note: isPt ? config.egress_consent ? "granted = rotas remotas podem consultar gateway de API (com teto de custo)" : "not granted = chamadas remotas bloqueadas; requer granted para nuvem" : config.egress_consent ? "granted = remote decision routes may call their gateway (budget-capped)" : "not granted = remote routes fail closed; grant to allow cloud calls"
542
568
  });
543
569
  return {
544
570
  id: "decision",
545
- title: "Decision",
571
+ title: isPt ? "Decisão" : "Decision",
546
572
  groups: [{
547
- title: "Decision router",
573
+ title: isPt ? "Assistente de Decisão" : "Decision router",
548
574
  rows
549
575
  }, {
550
- title: "Credentials (status only — values never enter the window)",
576
+ title: isPt ? "Credenciais (status apenas — valores nunca gravados na janela)" : "Credentials (status only — values never enter the window)",
551
577
  rows: DECISION_KNOWN_PROVIDERS.map((provider) => {
552
578
  const status = credentialStatus(provider, env, authProviders, configProviders);
553
579
  const credential = DECISION_PROVIDER_CREDENTIALS[provider] ?? { note: "" };
@@ -1073,39 +1099,47 @@ function j1ThresholdFromEnv(env = process.env) {
1073
1099
  if (!Number.isFinite(raw) || raw < 0 || raw > 1) return J1_THRESHOLD_DEFAULT;
1074
1100
  return raw;
1075
1101
  }
1076
- const MODE_DESCRIPTION = {
1102
+ const MODE_DESCRIPTION_EN = {
1077
1103
  off: "nothing fires (hard zero)",
1078
1104
  shadow: "observe + record; invisible in the session",
1079
1105
  warn: "RESERVED — behaves as shadow in this release",
1080
1106
  enforce: "high-risk scores DENY the tool call (fail-open on gate unavailability)"
1081
1107
  };
1082
- function buildJ1Tab(env, disabledByOverride) {
1108
+ const MODE_DESCRIPTION_PT = {
1109
+ off: "desativado (hard zero)",
1110
+ shadow: "observa + registra telemetria (modo silencioso)",
1111
+ warn: "RESERVADO (RESERVED) — comporta-se como shadow nesta versão",
1112
+ enforce: "alto risco bloqueia a ferramenta (fail-open se indisponível)"
1113
+ };
1114
+ function buildJ1Tab(env, disabledByOverride, languagePref) {
1115
+ const isPt = resolveLanguage(languagePref) === "pt-BR";
1083
1116
  const mode = j1ModeFromEnv(env);
1084
1117
  const threshold = j1ThresholdFromEnv(env);
1085
1118
  const gateState = disabledByOverride ? "disabled via overrides" : mode === "off" ? "off (env unset)" : "active";
1119
+ const desc = isPt ? MODE_DESCRIPTION_PT[mode] : MODE_DESCRIPTION_EN[mode];
1086
1120
  return {
1087
1121
  id: "j1",
1088
- title: "J1",
1122
+ title: isPt ? "Segurança J1" : "J1",
1089
1123
  groups: [{
1090
- title: "Ladder (env-only — never written here)",
1124
+ title: isPt ? "Nível de Segurança e Portão de Risco J1 (env-only)" : "Safety Level & Risk Gate (J1) (env-only — never written here)",
1091
1125
  rows: [
1092
1126
  {
1093
1127
  id: "j1.mode",
1094
- name: "Mode",
1128
+ name: isPt ? "Modo de execução" : "Mode",
1095
1129
  value: mode,
1096
- note: `${MODE_DESCRIPTION[mode]} · restart applies`
1130
+ note: `${desc} · ${isPt ? "reinício necessário (restart applies)" : "restart applies"}`
1097
1131
  },
1098
1132
  {
1099
1133
  id: "j1.threshold",
1100
- name: "Enforce threshold",
1134
+ name: isPt ? "Limiar de bloqueio" : "Enforce threshold",
1101
1135
  value: String(threshold),
1102
- note: "deny at or above · 0..1 · default 0.8"
1136
+ note: isPt ? "bloqueia em ou acima · 0..1 · padrão 0.8" : "deny at or above · 0..1 · default 0.8"
1103
1137
  },
1104
1138
  {
1105
1139
  id: "j1.gate",
1106
- name: "Gate",
1140
+ name: isPt ? "Estado do portão" : "Gate",
1107
1141
  value: gateState,
1108
- note: `${J1_FLAG_ENV} / ${J1_THRESHOLD_ENV} · read once at startup`
1142
+ note: `${J1_FLAG_ENV} / ${J1_THRESHOLD_ENV} · ${isPt ? "lido na inicialização" : "read once at startup"}`
1109
1143
  }
1110
1144
  ]
1111
1145
  }]
@@ -1333,12 +1367,18 @@ const SETTINGS_VIEW_MODES = Object.freeze([
1333
1367
  "fullscreen",
1334
1368
  "dialog"
1335
1369
  ]);
1370
+ const LANGUAGE_CYCLE = Object.freeze([
1371
+ "auto",
1372
+ "pt-BR",
1373
+ "en"
1374
+ ]);
1336
1375
  const DEFAULT_TUI_PREFS = {
1337
1376
  version: 1,
1338
1377
  layout: {
1339
1378
  preset: "comfortable",
1340
1379
  separator: "spaces",
1341
- settingsView: "fullscreen"
1380
+ settingsView: "fullscreen",
1381
+ language: "auto"
1342
1382
  },
1343
1383
  sidebar: {
1344
1384
  header: {
@@ -1384,6 +1424,7 @@ function normalizeTuiPrefs(raw) {
1384
1424
  const preset = LAYOUT_PRESETS_CYCLE.includes(layout.preset) ? layout.preset : DEFAULT_TUI_PREFS.layout.preset;
1385
1425
  const separator = SEPARATOR_STYLES_CYCLE.includes(layout.separator) ? layout.separator : DEFAULT_TUI_PREFS.layout.separator;
1386
1426
  const settingsView = SETTINGS_VIEW_MODES.includes(layout.settingsView) ? layout.settingsView : DEFAULT_TUI_PREFS.layout.settingsView;
1427
+ const language = LANGUAGE_CYCLE.includes(layout.language) ? layout.language : DEFAULT_TUI_PREFS.layout.language;
1387
1428
  const gauge = GAUGE_STYLES.includes(context.gauge) ? context.gauge : DEFAULT_TUI_PREFS.sidebar.context.gauge;
1388
1429
  const barShape = BAR_SHAPES_CYCLE.includes(context.barShape) ? context.barShape : DEFAULT_TUI_PREFS.sidebar.context.barShape;
1389
1430
  const barWidth = BAR_WIDTHS_CYCLE.includes(context.barWidth) ? context.barWidth : DEFAULT_TUI_PREFS.sidebar.context.barWidth;
@@ -1393,7 +1434,8 @@ function normalizeTuiPrefs(raw) {
1393
1434
  layout: {
1394
1435
  preset,
1395
1436
  separator,
1396
- settingsView
1437
+ settingsView,
1438
+ language
1397
1439
  },
1398
1440
  sidebar: {
1399
1441
  header: {
@@ -1433,58 +1475,66 @@ const row = (id, name, value, note) => ({
1433
1475
  cycle: onOff,
1434
1476
  note
1435
1477
  });
1436
- function buildTuiTab(prefs) {
1478
+ function buildTuiTab(prefs, languagePref) {
1479
+ const isPt = resolveLanguage(languagePref ?? prefs.layout?.language) === "pt-BR";
1437
1480
  return {
1438
1481
  id: "tui",
1439
1482
  title: "TUI",
1440
1483
  groups: [
1441
1484
  {
1442
- title: "Preset & Layout",
1485
+ title: isPt ? "Predefinição & Layout" : "Preset & Layout",
1443
1486
  rows: [
1444
1487
  {
1445
1488
  id: "tui.layout.preset",
1446
- name: "Layout preset",
1489
+ name: isPt ? "Predefinição de layout" : "Layout preset",
1447
1490
  value: prefs.layout?.preset ?? DEFAULT_TUI_PREFS.layout.preset,
1448
1491
  cycle: LAYOUT_PRESETS_CYCLE,
1449
- note: "comfortable | compact — sets spacing & borders"
1492
+ note: isPt ? "comfortable | compact — define espaçamento e bordas" : "comfortable | compact — sets spacing & borders"
1450
1493
  },
1451
1494
  {
1452
1495
  id: "tui.layout.separator",
1453
- name: "Separator",
1496
+ name: isPt ? "Separador" : "Separator",
1454
1497
  value: prefs.layout?.separator ?? DEFAULT_TUI_PREFS.layout.separator,
1455
1498
  cycle: SEPARATOR_STYLES_CYCLE,
1456
- note: "spaces | pipes | dots | slashes — status line glyphs"
1499
+ note: isPt ? "spaces | pipes | dots | slashes — glifos na linha de status" : "spaces | pipes | dots | slashes — status line glyphs"
1457
1500
  },
1458
1501
  {
1459
1502
  id: "tui.layout.settingsView",
1460
- name: "Settings surface",
1503
+ name: isPt ? "Superfície de configurações" : "Settings surface",
1461
1504
  value: tuiRowValue(prefs, "tui.layout.settingsView") ?? "docked",
1462
1505
  cycle: SETTINGS_VIEW_MODES,
1463
- note: "docked (above prompt) | fullscreen router page | dialog overlay"
1506
+ note: isPt ? "docked (acima do prompt) | fullscreen | dialog" : "docked (above prompt) | fullscreen router page | dialog overlay"
1507
+ },
1508
+ {
1509
+ id: "tui.layout.language",
1510
+ name: isPt ? "Idioma / Language" : "Language / Idioma",
1511
+ value: tuiRowValue(prefs, "tui.layout.language") ?? "auto",
1512
+ cycle: LANGUAGE_CYCLE,
1513
+ note: isPt ? "auto (detecta via fuso/locale) | pt-BR (Português) | en (English)" : "auto (detect via timezone/locale) | pt-BR (Português) | en (English)"
1464
1514
  }
1465
1515
  ]
1466
1516
  },
1467
1517
  {
1468
- title: "Bars & Gauges",
1518
+ title: isPt ? "Barras & Medidores" : "Bars & Gauges",
1469
1519
  rows: [
1470
1520
  {
1471
1521
  id: "tui.sidebar.context.barShape",
1472
- name: "Bar shape",
1522
+ name: isPt ? "Formato da barra" : "Bar shape",
1473
1523
  value: prefs.sidebar.context.barShape,
1474
1524
  cycle: BAR_SHAPES_CYCLE,
1475
1525
  note: "line (━─) | block (▰▱) | smooth (█░) | ascii (=) | dots (●○) | braille"
1476
1526
  },
1477
1527
  {
1478
1528
  id: "tui.sidebar.context.barWidth",
1479
- name: "Bar width",
1529
+ name: isPt ? "Largura da barra" : "Bar width",
1480
1530
  value: prefs.sidebar.context.barWidth,
1481
1531
  cycle: BAR_WIDTHS_CYCLE,
1482
- note: "standard (12) | compact (8) | wide (16) | full (20 cells)"
1532
+ note: isPt ? "standard (12) | compact (8) | wide (16) | full (20 células)" : "standard (12) | compact (8) | wide (16) | full (20 cells)"
1483
1533
  },
1484
- row("tui.sidebar.context.evenMark", "Even-use mark", prefs.sidebar.context.evenMark, "| indicator at 50% midpoint in gauge bars"),
1534
+ row("tui.sidebar.context.evenMark", isPt ? "Marca central (50%)" : "Even-use mark", prefs.sidebar.context.evenMark, isPt ? "| indicador aos 50% nas barras de medição" : "| indicator at 50% midpoint in gauge bars"),
1485
1535
  {
1486
1536
  id: "tui.sidebar.context.gauge",
1487
- name: "Gauge style",
1537
+ name: isPt ? "Estilo do medidor" : "Gauge style",
1488
1538
  value: prefs.sidebar.context.gauge,
1489
1539
  cycle: GAUGE_STYLES,
1490
1540
  note: "both | bar | percent | off — `▰▱ 42% of 200k`"
@@ -1492,35 +1542,35 @@ function buildTuiTab(prefs) {
1492
1542
  ]
1493
1543
  },
1494
1544
  {
1495
- title: "Sidebar header",
1545
+ title: isPt ? "Cabeçalho da barra lateral" : "Sidebar header",
1496
1546
  rows: [
1497
- row("tui.sidebar.header.version", "Version line", prefs.sidebar.header.version, "the `Pantheon v…` line"),
1498
- row("tui.sidebar.header.preset", "Preset line", prefs.sidebar.header.preset, "the `▸ preset · provider` line"),
1499
- row("tui.sidebar.header.session", "Session line", prefs.sidebar.header.session, "the active session title")
1547
+ row("tui.sidebar.header.version", isPt ? "Linha de versão" : "Version line", prefs.sidebar.header.version, isPt ? "linha `Pantheon v…`" : "the `Pantheon v…` line"),
1548
+ row("tui.sidebar.header.preset", isPt ? "Linha de preset" : "Preset line", prefs.sidebar.header.preset, isPt ? "linha `▸ preset · provider`" : "the `▸ preset · provider` line"),
1549
+ row("tui.sidebar.header.session", isPt ? "Linha de sessão" : "Session line", prefs.sidebar.header.session, isPt ? "título da sessão ativa" : "the active session title")
1500
1550
  ]
1501
1551
  },
1502
1552
  {
1503
- title: "Sidebar blocks",
1553
+ title: isPt ? "Blocos da barra lateral" : "Sidebar blocks",
1504
1554
  rows: [
1505
- row("tui.sidebar.block.context", "Context block", prefs.sidebar.blocks.context, "tokens, gauge, spend, model usage"),
1506
- row("tui.sidebar.block.git", "Git block", prefs.sidebar.blocks.git, "branch + working-tree counts"),
1507
- row("tui.sidebar.block.todo", "Todo block", prefs.sidebar.blocks.todo, "the newest todowrite"),
1508
- row("tui.sidebar.block.dispatch", "Dispatch block", prefs.sidebar.blocks.dispatch, "live delegations + rollup")
1555
+ row("tui.sidebar.block.context", isPt ? "Bloco de contexto" : "Context block", prefs.sidebar.blocks.context, isPt ? "tokens, medidor, custo, uso de modelos" : "tokens, gauge, spend, model usage"),
1556
+ row("tui.sidebar.block.git", isPt ? "Bloco do Git" : "Git block", prefs.sidebar.blocks.git, isPt ? "branch + contagem de alterações" : "branch + working-tree counts"),
1557
+ row("tui.sidebar.block.todo", isPt ? "Bloco Todo" : "Todo block", prefs.sidebar.blocks.todo, isPt ? "tarefas pendentes mais recentes" : "the newest todowrite"),
1558
+ row("tui.sidebar.block.dispatch", isPt ? "Bloco Dispatch" : "Dispatch block", prefs.sidebar.blocks.dispatch, isPt ? "delegações em tempo real" : "live delegations + rollup")
1509
1559
  ]
1510
1560
  },
1511
1561
  {
1512
- title: "Context block detail",
1562
+ title: isPt ? "Detalhe do bloco de contexto" : "Context block detail",
1513
1563
  rows: [
1514
- row("tui.sidebar.context.tokens", "Tokens row", prefs.sidebar.context.tokens, "the raw token count line"),
1515
- row("tui.sidebar.context.spent", "Spent row", prefs.sidebar.context.spent, "the `$… spent in session` line"),
1516
- row("tui.sidebar.context.modelUsage", "Model usage table", prefs.sidebar.context.modelUsage, "per-model tokens/USD"),
1517
- row("tui.sidebar.context.performance", "Performance line", prefs.sidebar.context.performance, "cache % + tok/s"),
1518
- row("tui.sidebar.context.localSpend", "Local spend", prefs.sidebar.context.localSpend, "hoje / 30d totals")
1564
+ row("tui.sidebar.context.tokens", isPt ? "Linha de tokens" : "Tokens row", prefs.sidebar.context.tokens, isPt ? "contagem bruta de tokens" : "the raw token count line"),
1565
+ row("tui.sidebar.context.spent", isPt ? "Linha de custo" : "Spent row", prefs.sidebar.context.spent, isPt ? "linha `$… gastos na sessão`" : "the `$… spent in session` line"),
1566
+ row("tui.sidebar.context.modelUsage", isPt ? "Tabela de uso de modelos" : "Model usage table", prefs.sidebar.context.modelUsage, isPt ? "resumo de chamadas por modelo" : "per-model tokens/USD"),
1567
+ row("tui.sidebar.context.performance", isPt ? "Linha de desempenho" : "Performance row", prefs.sidebar.context.performance, isPt ? "tokens/segundo e latência" : "cache % + tok/s"),
1568
+ row("tui.sidebar.context.localSpend", isPt ? "Linha de custo local" : "Local spend row", prefs.sidebar.context.localSpend, isPt ? "totais de hoje / 30 dias" : "hoje / 30d totals")
1519
1569
  ]
1520
1570
  },
1521
1571
  {
1522
- title: "Footers",
1523
- rows: [row("tui.footer.prompt", "Prompt footer", prefs.footer.prompt, "the `▸preset · ✦n ativos` line while delegations run"), row("tui.footer.home", "Home status", prefs.footer.home, "the `Pantheon v…` line under the home prompt")]
1572
+ title: isPt ? "Rodapés" : "Footers",
1573
+ rows: [row("tui.footer.prompt", isPt ? "Prompt inferior" : "Prompt footer", prefs.footer.prompt, isPt ? "linha `▸preset · ✦n ativos` durante delegações" : "the `▸preset · ✦n ativos` line while delegations run"), row("tui.footer.home", isPt ? "Status inicial" : "Home status", prefs.footer.home, isPt ? "linha `Pantheon v…` sob o prompt inicial" : "the `Pantheon v…` line under the home prompt")]
1524
1574
  }
1525
1575
  ]
1526
1576
  };
@@ -1550,6 +1600,12 @@ function applyTuiRow(draft, id, value) {
1550
1600
  draft.layout.settingsView = value;
1551
1601
  }
1552
1602
  return;
1603
+ case "tui.layout.language":
1604
+ if (LANGUAGE_CYCLE.includes(value)) {
1605
+ if (!draft.layout) draft.layout = { ...DEFAULT_TUI_PREFS.layout };
1606
+ draft.layout.language = value;
1607
+ }
1608
+ return;
1553
1609
  case "tui.sidebar.context.barShape":
1554
1610
  if (BAR_SHAPES_CYCLE.includes(value)) draft.sidebar.context.barShape = value;
1555
1611
  return;
@@ -1612,6 +1668,7 @@ function tuiRowValue(prefs, id) {
1612
1668
  if (id === "tui.layout.preset") return prefs.layout?.preset ?? DEFAULT_TUI_PREFS.layout.preset;
1613
1669
  if (id === "tui.layout.separator") return prefs.layout?.separator ?? DEFAULT_TUI_PREFS.layout.separator;
1614
1670
  if (id === "tui.layout.settingsView") return prefs.layout?.settingsView ?? DEFAULT_TUI_PREFS.layout.settingsView ?? "docked";
1671
+ if (id === "tui.layout.language") return prefs.layout?.language ?? "auto";
1615
1672
  if (id === "tui.sidebar.context.barShape") return prefs.sidebar.context.barShape;
1616
1673
  if (id === "tui.sidebar.context.barWidth") return prefs.sidebar.context.barWidth;
1617
1674
  if (id === "tui.sidebar.context.gauge") return prefs.sidebar.context.gauge;
@@ -1893,7 +1950,7 @@ async function readChangelogForBundle(bundleUrl) {
1893
1950
  }
1894
1951
  /** The ambient build-time version, or null outside a tsdown build. */
1895
1952
  function embeddedVersion() {
1896
- return "2.0.0";
1953
+ return "2.0.2";
1897
1954
  }
1898
1955
  /**
1899
1956
  * Resolve the running Pantheon version for the what's-new window: the plugin
@@ -2118,7 +2175,7 @@ function persistUpdateCheckState(previous, latest) {
2118
2175
  } catch {}
2119
2176
  }
2120
2177
  function resolveRunningVersion() {
2121
- return "2.0.0";
2178
+ return "2.0.2";
2122
2179
  }
2123
2180
  const VALUE_WIDTH = 24;
2124
2181
  function SettingsWindow(props) {
@@ -2556,26 +2613,30 @@ function createWindowController(context, exit) {
2556
2613
  if (seen !== void 0) input.lastCheckedVersion = seen;
2557
2614
  return input;
2558
2615
  };
2559
- const tabs = () => [
2560
- buildGatesTab(load()),
2561
- buildDecisionTab(decision(), process.env, readAuthProviders(), readConfigProviders()),
2562
- buildPresetTab(presetInput()),
2563
- buildTuiTab(savedTuiPrefs()),
2564
- buildAutonomyTab({
2565
- goalLoop: goalLoop(),
2566
- budgets: budgets(),
2567
- goalLoopRestartPending: autonomyRestartPending()
2568
- }),
2569
- buildJ1Tab(process.env, false),
2570
- buildUpdatesTab(updatesInput()),
2571
- buildChangelogTab(currentVersion, changelogItems()),
2572
- buildDoctorTab({
2573
- runningVersion: currentVersion,
2574
- nodeVersion: process.versions.node,
2575
- load: load()
2576
- }),
2577
- buildAboutTab(currentVersion)
2578
- ];
2616
+ const tabs = () => {
2617
+ const lang = tuiPrefs().layout?.language;
2618
+ return [
2619
+ buildGatesTab(load()),
2620
+ buildDecisionTab(decision(), process.env, readAuthProviders(), readConfigProviders(), lang),
2621
+ buildPresetTab(presetInput()),
2622
+ buildTuiTab(tuiPrefs(), lang),
2623
+ buildAutonomyTab({
2624
+ goalLoop: goalLoop(),
2625
+ budgets: budgets(),
2626
+ goalLoopRestartPending: autonomyRestartPending(),
2627
+ languagePref: lang
2628
+ }),
2629
+ buildJ1Tab(process.env, false, lang),
2630
+ buildUpdatesTab(updatesInput()),
2631
+ buildChangelogTab(currentVersion, changelogItems()),
2632
+ buildDoctorTab({
2633
+ runningVersion: currentVersion,
2634
+ nodeVersion: process.versions.node,
2635
+ load: load()
2636
+ }),
2637
+ buildAboutTab(currentVersion)
2638
+ ];
2639
+ };
2579
2640
  const rows = () => tabRows(tabs()[page()] ?? tabs()[0] ?? EMPTY_TAB);
2580
2641
  const move = (delta) => {
2581
2642
  if (confirmExit()) setConfirmExit(false);
@@ -6280,7 +6341,7 @@ async function checkForPantheonUpdate(context) {
6280
6341
  const latest = String((await response.json())?.version ?? "");
6281
6342
  if (!latest) return;
6282
6343
  const notice = pickUpdateNotice({
6283
- currentVersion: "2.0.0",
6344
+ currentVersion: "2.0.2",
6284
6345
  latestVersion: latest,
6285
6346
  state: readState(),
6286
6347
  nowMs: Date.now()
@@ -7092,7 +7153,7 @@ function Sidebar(props) {
7092
7153
  get children() {
7093
7154
  var _el$13 = createElement("text");
7094
7155
  setProp(_el$13, "attributes", 1);
7095
- insert(_el$13, `Pantheon v2.0.0`);
7156
+ insert(_el$13, `Pantheon v2.0.2`);
7096
7157
  effect((_$p) => setProp(_el$13, "fg", text(), _$p));
7097
7158
  return _el$13;
7098
7159
  }
@@ -7864,7 +7925,7 @@ function HomeStatus(props) {
7864
7925
  },
7865
7926
  get children() {
7866
7927
  var _el$73 = createElement("text");
7867
- insert(_el$73, () => `Pantheon v2.0.0${preset().name ? ` ▸ ${preset().name}` : ""}`);
7928
+ insert(_el$73, () => `Pantheon v2.0.2${preset().name ? ` ▸ ${preset().name}` : ""}`);
7868
7929
  effect((_$p) => setProp(_el$73, "fg", muted(), _$p));
7869
7930
  return _el$73;
7870
7931
  }