reevesagents 1.3.0 → 1.3.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.
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readTuiOpenToken
4
- } from "./chunk-4W6MVOPK.js";
4
+ } from "./chunk-5Q5XP5QI.js";
5
5
  import {
6
6
  translate,
7
7
  translatePhrase
8
- } from "./chunk-4LWTEYRI.js";
8
+ } from "./chunk-KVMBCWLI.js";
9
9
  import {
10
10
  modelDisplayName,
11
11
  modelValuesForProvider
12
- } from "./chunk-HS6TOISU.js";
12
+ } from "./chunk-TO32PH23.js";
13
13
  import {
14
14
  REEVESAGENTS_VERSION,
15
15
  attach,
@@ -18,7 +18,7 @@ import {
18
18
  hostStatus,
19
19
  listRunApprovals,
20
20
  resolveRunApproval
21
- } from "./chunk-Z2JHNE7V.js";
21
+ } from "./chunk-VTLLF2Z4.js";
22
22
  import {
23
23
  CONFIG_FIELDS,
24
24
  DEFAULT_LANGUAGE,
@@ -52,6 +52,8 @@ import {
52
52
  presetsDir,
53
53
  providerColor,
54
54
  providerDisplayName,
55
+ providerSupportsAuthMode,
56
+ providerSupportsEffort,
55
57
  readRun,
56
58
  runDoctor,
57
59
  runHasLiveTmuxTarget,
@@ -66,11 +68,11 @@ import {
66
68
  startRunFromPreset,
67
69
  stateRoot,
68
70
  stopRun
69
- } from "./chunk-65LHCGPC.js";
71
+ } from "./chunk-36SYE7IU.js";
70
72
  import "./chunk-D24DQQ6V.js";
71
73
  import {
72
74
  startWebFromTui
73
- } from "./chunk-5DOCQLT7.js";
75
+ } from "./chunk-GUM4JMVF.js";
74
76
 
75
77
  // src/tui/router.tsx
76
78
  import { createContext as createContext6, useContext as useContext6, useState as useState36, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
@@ -306,6 +308,16 @@ var glyphs = {
306
308
  }
307
309
  };
308
310
 
311
+ // src/utils/width.ts
312
+ import stringWidth from "string-width";
313
+ function displayWidth(text) {
314
+ return stringWidth(text);
315
+ }
316
+ function padEndDisplay(text, targetWidth) {
317
+ const gap = targetWidth - stringWidth(text);
318
+ return gap > 0 ? text + " ".repeat(gap) : text;
319
+ }
320
+
309
321
  // src/tui/components/Header.tsx
310
322
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
311
323
  function Header({ breadcrumb, meta, tmuxSession, columns }) {
@@ -316,7 +328,7 @@ function Header({ breadcrumb, meta, tmuxSession, columns }) {
316
328
  metaList = [...metaList, { label: "tmux", value: tmuxSession }];
317
329
  }
318
330
  const metaText = metaList.map(({ label, value }) => `${label} ${value}`).join(sep.dot);
319
- const metaWidth = Math.min(metaText.length, Math.max(0, Math.floor(width * 0.42)));
331
+ const metaWidth = Math.min(displayWidth(metaText), Math.max(0, Math.floor(width * 0.42)));
320
332
  const leftWidth = Math.max(1, width - metaWidth);
321
333
  if (isNarrow) {
322
334
  const current = breadcrumb[breadcrumb.length - 1] || "";
@@ -573,8 +585,8 @@ function Row({
573
585
  const displayPrimary = translatePhrase(language, primary);
574
586
  const displayHint = hint ? translatePhrase(language, hint) : hint;
575
587
  const displayTrailing = trailing ? translatePhrase(language, trailing) : trailing;
576
- const buttonPrimaryWidth = buttonLike ? Math.max(primaryWidth ?? 0, displayPrimary.length, 12) : primaryWidth;
577
- const primaryText = buttonPrimaryWidth ? displayPrimary.padEnd(buttonPrimaryWidth) : displayPrimary;
588
+ const buttonPrimaryWidth = buttonLike ? Math.max(primaryWidth ?? 0, displayWidth(displayPrimary), 12) : primaryWidth;
589
+ const primaryText = buttonPrimaryWidth ? padEndDisplay(displayPrimary, buttonPrimaryWidth) : displayPrimary;
578
590
  const railColor = selected ? colors.accent.deep : colors.surface.border;
579
591
  const availableWidth = Math.max(1, width - 6);
580
592
  const canFitTrailing = availableWidth >= 24;
@@ -598,7 +610,7 @@ function Row({
598
610
  glyph && /* @__PURE__ */ jsx12(Text7, { color: glyph.color, children: glyph.char }),
599
611
  glyph && /* @__PURE__ */ jsx12(Text7, { children: " " }),
600
612
  inlineBadges.map((item, idx) => {
601
- const label = truncateBadgeLabel(item.label, compact);
613
+ const label = truncateBadgeLabel(translatePhrase(language, item.label), compact);
602
614
  const displayLabel = item.width && !compact ? label.padEnd(item.width) : label;
603
615
  return /* @__PURE__ */ jsxs7(React8.Fragment, { children: [
604
616
  /* @__PURE__ */ jsx12(Text7, { color: badgeBracketColor, children: "[" }),
@@ -653,7 +665,7 @@ function Section({ label }) {
653
665
  const { language } = useLanguage();
654
666
  const columns = useLayoutColumns();
655
667
  const displayLabel = translatePhrase(language, label);
656
- const labelTextWidth = displayLabel ? displayLabel.length + 2 : 0;
668
+ const labelTextWidth = displayLabel ? displayWidth(displayLabel) + 2 : 0;
657
669
  const width = Math.max(labelTextWidth + 7, panelWidth(columns));
658
670
  const suffix = "\u2500".repeat(Math.max(2, width - labelTextWidth - 5));
659
671
  return /* @__PURE__ */ jsx13(Box8, { children: /* @__PURE__ */ jsxs8(Text8, { color: colors.surface.border, wrap: "truncate-end", children: [
@@ -746,7 +758,7 @@ function LanguageSelect() {
746
758
  Row,
747
759
  {
748
760
  selected: false,
749
- primary: `${firstVisible + 1}-${firstVisible + visibleOptions.length} of ${LANGUAGE_OPTIONS.length}`,
761
+ primary: t("runtime.pageRange", { from: firstVisible + 1, to: firstVisible + visibleOptions.length, total: LANGUAGE_OPTIONS.length }),
750
762
  trailing: "scroll with arrows",
751
763
  disabled: true
752
764
  }
@@ -1071,6 +1083,11 @@ function Legend({ items }) {
1071
1083
  }) });
1072
1084
  }
1073
1085
 
1086
+ // src/utils/agentLabel.ts
1087
+ function agentCountLabel(t, count) {
1088
+ return count === 1 ? t("runtime.agentsOne", { count }) : t("runtime.agentsMany", { count });
1089
+ }
1090
+
1074
1091
  // src/tui/screens/Runs.tsx
1075
1092
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1076
1093
  var ACTIONS = ["NewRun", "History", "Main Menu", "Quit"];
@@ -1104,6 +1121,7 @@ function moveSelectedIndex(idx, delta, runCount) {
1104
1121
  }
1105
1122
  function Runs() {
1106
1123
  const { exit } = useApp2();
1124
+ const { t, language } = useLanguage();
1107
1125
  const { push, resetStack, setSelectedRunId } = useRouter();
1108
1126
  const { rows: termRows } = useWindowSize4();
1109
1127
  const bodyRows = frameBodyRows(termRows, true, true);
@@ -1219,7 +1237,7 @@ function Runs() {
1219
1237
  let statusContext = "";
1220
1238
  if (selectedRun) {
1221
1239
  const agents = listAgents(selectedRun.id);
1222
- statusContext = `${selectedRun.name} \xB7 ${runStatus(selectedRun)} \xB7 ${agents.length} agents \xB7 ${selectedRun.working_dir}`;
1240
+ statusContext = `${selectedRun.name} \xB7 ${translatePhrase(language, runStatus(selectedRun))} \xB7 ${agentCountLabel(t, agents.length)} \xB7 ${selectedRun.working_dir}`;
1223
1241
  } else if (selected?.type === "action" && selected.action) {
1224
1242
  statusContext = ACTION_COPY[selected.action]?.hint ?? selected.action;
1225
1243
  }
@@ -1270,7 +1288,7 @@ function Runs() {
1270
1288
  primaryWidth: runNameWidth,
1271
1289
  glyph: statusGlyph(runStatus(run)),
1272
1290
  badges,
1273
- hint: `${agents.length} agents`
1291
+ hint: agentCountLabel(t, agents.length)
1274
1292
  },
1275
1293
  run.id
1276
1294
  );
@@ -1279,7 +1297,7 @@ function Runs() {
1279
1297
  Row,
1280
1298
  {
1281
1299
  selected: false,
1282
- primary: `${compactFirstEntry + 1}-${compactFirstEntry + compactEntries.length} of ${selectableEntries.length}`,
1300
+ primary: t("runtime.pageRange", { from: compactFirstEntry + 1, to: compactFirstEntry + compactEntries.length, total: selectableEntries.length }),
1283
1301
  trailing: "scroll with arrows",
1284
1302
  disabled: true
1285
1303
  }
@@ -1314,7 +1332,7 @@ function Runs() {
1314
1332
  primaryWidth: runNameWidth,
1315
1333
  glyph: statusGlyph(runStatus(run)),
1316
1334
  badges,
1317
- hint: `${agents.length} agents`
1335
+ hint: agentCountLabel(t, agents.length)
1318
1336
  },
1319
1337
  run.id
1320
1338
  );
@@ -1323,7 +1341,7 @@ function Runs() {
1323
1341
  Row,
1324
1342
  {
1325
1343
  selected: false,
1326
- primary: `${runScroll + 1}-${runScroll + visibleRuns.length} of ${runs.length}`,
1344
+ primary: t("runtime.pageRange", { from: runScroll + 1, to: runScroll + visibleRuns.length, total: runs.length }),
1327
1345
  trailing: "scroll with arrows",
1328
1346
  disabled: true
1329
1347
  }
@@ -1372,8 +1390,13 @@ function Dialog({
1372
1390
  onConfirm,
1373
1391
  onCancel
1374
1392
  }) {
1393
+ const { language } = useLanguage();
1375
1394
  const [focusedButton, setFocusedButton] = useState9("cancel");
1376
1395
  const borderColor = intent === "danger" ? colors.status.warn : colors.accent.primary;
1396
+ const displayTitle = translatePhrase(language, title);
1397
+ const displayBody = translatePhrase(language, body);
1398
+ const displayConfirm = translatePhrase(language, confirmLabel);
1399
+ const displayCancel = translatePhrase(language, cancelLabel);
1377
1400
  useInput4((input, key) => {
1378
1401
  if (key.leftArrow) {
1379
1402
  setFocusedButton("cancel");
@@ -1401,11 +1424,11 @@ function Dialog({
1401
1424
  ] }, name);
1402
1425
  };
1403
1426
  return /* @__PURE__ */ jsxs14(Box15, { flexDirection: "column", borderStyle: "round", borderColor, paddingX: 2, paddingY: 1, marginY: 1, children: [
1404
- /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: borderColor, bold: true, children: title }) }),
1405
- /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: colors.text.primary, children: body }) }),
1427
+ /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: borderColor, bold: true, children: displayTitle }) }),
1428
+ /* @__PURE__ */ jsx20(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx20(Text14, { color: colors.text.primary, children: displayBody }) }),
1406
1429
  /* @__PURE__ */ jsxs14(Box15, { marginTop: 1, flexDirection: "row", gap: 1, children: [
1407
- renderButton(cancelLabel, "cancel"),
1408
- renderButton(confirmLabel, "confirm")
1430
+ renderButton(displayCancel, "cancel"),
1431
+ renderButton(displayConfirm, "confirm")
1409
1432
  ] })
1410
1433
  ] });
1411
1434
  }
@@ -1989,6 +2012,7 @@ function statusGlyph3(status) {
1989
2012
  }
1990
2013
  function RunAgents() {
1991
2014
  const { selectedRunId, setSelectedAgentId, push, pop } = useRouter();
2015
+ const { language, t } = useLanguage();
1992
2016
  const { rows: termRows } = useWindowSize7();
1993
2017
  const bodyRows = frameBodyRows(termRows, true, true);
1994
2018
  const compactBody = bodyRows <= 9;
@@ -2109,7 +2133,7 @@ function RunAgents() {
2109
2133
  });
2110
2134
  if (!run) {
2111
2135
  return /* @__PURE__ */ jsx24(Frame, { breadcrumb: ["ReevesAgents", "Runs"], statusContext: "Run not found", children: /* @__PURE__ */ jsxs18(Box19, { flexDirection: "column", children: [
2112
- /* @__PURE__ */ jsx24(Text17, { color: colors.text.dim, children: "Run not found." }),
2136
+ /* @__PURE__ */ jsx24(Text17, { color: colors.text.dim, children: translatePhrase(language, "Run not found.") }),
2113
2137
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Row, { selected: true, primary: "Back", hint: "return to all runs" }) })
2114
2138
  ] }) });
2115
2139
  }
@@ -2121,8 +2145,8 @@ function RunAgents() {
2121
2145
  "Add Agent".length,
2122
2146
  "Back".length
2123
2147
  );
2124
- let statusContext = `${run.name} \xB7 ${agents.length} agents`;
2125
- if (selected?.type === "pagination") statusContext = `page ${page} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
2148
+ let statusContext = `${run.name} \xB7 ${agentCountLabel(t, agents.length)}`;
2149
+ if (selected?.type === "pagination") statusContext = t("runtime.pageNav", { page, total: totalPages });
2126
2150
  if (selected?.type === "action" && selected.action === "AddWorker") statusContext = isRunEnded ? "run is ended" : "add an agent to this run";
2127
2151
  if (selected?.type === "action" && selected.action === "Back") statusContext = "return to run hub";
2128
2152
  return /* @__PURE__ */ jsx24(
@@ -2291,6 +2315,7 @@ function peekAgents(agents) {
2291
2315
  }
2292
2316
  function RunOutput() {
2293
2317
  const { selectedRunId, pop, push, setSelectedAgentId } = useRouter();
2318
+ const { language, t } = useLanguage();
2294
2319
  const { rows: termRows } = useWindowSize8();
2295
2320
  const bodyRows = frameBodyRows(termRows, true, true);
2296
2321
  const compactBody = bodyRows <= 12;
@@ -2443,17 +2468,17 @@ function RunOutput() {
2443
2468
  breadcrumb: ["ReevesAgents", "Runs"],
2444
2469
  statusContext: "Run not found",
2445
2470
  children: /* @__PURE__ */ jsxs19(Box20, { flexDirection: "column", children: [
2446
- /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "Run not found." }),
2471
+ /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "Run not found.") }),
2447
2472
  /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Row, { selected: true, primary: "Back", hint: "return to run" }) })
2448
2473
  ] })
2449
2474
  }
2450
2475
  );
2451
2476
  }
2452
2477
  const secondsAgo = Math.floor((Date.now() - lastPeekAt) / 1e3);
2453
- const lastPeekLabel = secondsAgo === 0 ? "just now" : `${secondsAgo}s ago`;
2454
- let statusContext = agents.length > 0 ? `${agents.length} agent${agents.length === 1 ? "" : "s"}` : "no agents";
2455
- if (selected?.type === "agent" && selected.agent) statusContext = `${selected.agent.nickname} \xB7 enter opens output`;
2456
- if (selected?.type === "pagination") statusContext = `page ${activePage} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
2478
+ const lastPeekLabel = secondsAgo === 0 ? t("runtime.justNow") : t("runtime.secondsAgo", { seconds: secondsAgo });
2479
+ let statusContext = agents.length > 0 ? agentCountLabel(t, agents.length) : "no agents";
2480
+ if (selected?.type === "agent" && selected.agent) statusContext = `${selected.agent.nickname} \xB7 ${t("runtime.enterOpensOutput")}`;
2481
+ if (selected?.type === "pagination") statusContext = t("runtime.pageNav", { page: activePage, total: totalPages });
2457
2482
  return /* @__PURE__ */ jsx25(
2458
2483
  Frame,
2459
2484
  {
@@ -2512,14 +2537,14 @@ function RunOutput() {
2512
2537
  { label: providerLabel, color: providerColor(agent.provider) },
2513
2538
  { label: modelBadgeLabel(agent.model), color: modelColor(agent.model, agent.provider) }
2514
2539
  ],
2515
- hint: "enter opens output"
2540
+ hint: t("runtime.enterOpensOutput")
2516
2541
  },
2517
2542
  agent.id
2518
2543
  );
2519
2544
  }),
2520
2545
  /* @__PURE__ */ jsx25(SectionEnd, {})
2521
2546
  ] }) : /* @__PURE__ */ jsxs19(Box20, { flexDirection: "column", children: [
2522
- agents.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "No agents in this run." }) : pagedAgents.map((agent) => {
2547
+ agents.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "No agents in this run.") }) : pagedAgents.map((agent) => {
2523
2548
  const peek = peeks[agent.id] || "";
2524
2549
  const lines = peek ? peek.split("\n").slice(-PREVIEW_LINES) : [];
2525
2550
  const isSelected = selected?.type === "agent" && selected.agent?.id === agent.id;
@@ -2536,7 +2561,7 @@ function RunOutput() {
2536
2561
  /* @__PURE__ */ jsx25(Text18, { color: modelHue, children: modelBadgeLabel(agent.model) }),
2537
2562
  /* @__PURE__ */ jsx25(Text18, { color: colors.surface.border, children: "]" })
2538
2563
  ] }),
2539
- /* @__PURE__ */ jsx25(Box20, { marginTop: space.sm, children: lines.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: "(no output yet)" }) : /* @__PURE__ */ jsx25(Box20, { flexDirection: "column", children: lines.map((line, lineIdx) => /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: line }, lineIdx)) }) })
2564
+ /* @__PURE__ */ jsx25(Box20, { marginTop: space.sm, children: lines.length === 0 ? /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: translatePhrase(language, "(no output yet)") }) : /* @__PURE__ */ jsx25(Box20, { flexDirection: "column", children: lines.map((line, lineIdx) => /* @__PURE__ */ jsx25(Text18, { color: colors.text.dim, children: line }, lineIdx)) }) })
2540
2565
  ] }) }) }, agent.id);
2541
2566
  }),
2542
2567
  totalPages > 1 && /* @__PURE__ */ jsx25(
@@ -2598,7 +2623,7 @@ var ACTION_LABEL_WIDTH5 = Math.max(
2598
2623
  function AgentDetail() {
2599
2624
  const { selectedAgentId, push, pop } = useRouter();
2600
2625
  const { toast } = useToast();
2601
- const { t } = useLanguage();
2626
+ const { t, language } = useLanguage();
2602
2627
  const { rows: termRows } = useWindowSize9();
2603
2628
  const bodyRows = frameBodyRows(termRows, true, true);
2604
2629
  const compactBody = bodyRows <= 8;
@@ -2701,7 +2726,7 @@ function AgentDetail() {
2701
2726
  breadcrumb: ["ReevesAgents", "Runs"],
2702
2727
  statusContext: "Agent not found",
2703
2728
  children: /* @__PURE__ */ jsxs20(Box21, { flexDirection: "column", children: [
2704
- /* @__PURE__ */ jsx26(Text19, { color: colors.text.dim, children: "Agent not found." }),
2729
+ /* @__PURE__ */ jsx26(Text19, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
2705
2730
  /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(
2706
2731
  Row,
2707
2732
  {
@@ -2833,6 +2858,7 @@ var ACTION_LABEL_WIDTH6 = Math.max("Refresh Now".length, "Open Agent".length, "B
2833
2858
  function AgentOutput() {
2834
2859
  const { selectedAgentId, pop } = useRouter();
2835
2860
  const { toast } = useToast();
2861
+ const { language, t } = useLanguage();
2836
2862
  const { rows: termRows } = useWindowSize10();
2837
2863
  const bodyRows = frameBodyRows(termRows, true, true);
2838
2864
  const compactBody = bodyRows <= 9;
@@ -2960,7 +2986,7 @@ function AgentOutput() {
2960
2986
  breadcrumb: ["ReevesAgents", "Runs"],
2961
2987
  statusContext: "Agent not found",
2962
2988
  children: /* @__PURE__ */ jsxs21(Box22, { flexDirection: "column", children: [
2963
- /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: "Agent not found." }),
2989
+ /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
2964
2990
  /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(
2965
2991
  Row,
2966
2992
  {
@@ -2977,9 +3003,9 @@ function AgentOutput() {
2977
3003
  const isAgentEnded = agent.ended_at !== null;
2978
3004
  const canOpenAgent = !isAgentEnded && !isHeadless && !!agent.tmux_window_id;
2979
3005
  const openDisabledHint = isAgentEnded ? "agent has ended" : "no tmux window";
2980
- let statusContext = `${agent.nickname} \xB7 output`;
3006
+ let statusContext = `${agent.nickname} \xB7 ${t("runtime.output")}`;
2981
3007
  if (selected?.type === "pagination") {
2982
- statusContext = `output page ${activePage} of ${totalPages} \xB7 \u2190 \u2192 turn page`;
3008
+ statusContext = t("runtime.outputPageNav", { page: activePage, total: totalPages });
2983
3009
  } else if (selected?.type === "action") {
2984
3010
  const actionLabels = {
2985
3011
  RefreshNow: "fetch output now",
@@ -3027,7 +3053,7 @@ function AgentOutput() {
3027
3053
  overflow: "hidden",
3028
3054
  children: [
3029
3055
  visibleOutputLines.map((line, idx) => /* @__PURE__ */ jsx27(Text20, { color: colors.text.dim, children: line }, idx)),
3030
- visibleOutputLines.length === 0 && /* @__PURE__ */ jsx27(Text20, { color: colors.text.muted, children: "(no output yet)" })
3056
+ visibleOutputLines.length === 0 && /* @__PURE__ */ jsx27(Text20, { color: colors.text.muted, children: translatePhrase(language, "(no output yet)") })
3031
3057
  ]
3032
3058
  }
3033
3059
  )
@@ -3083,6 +3109,7 @@ import { Box as Box23, Text as Text21, useInput as useInput12 } from "ink";
3083
3109
  import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3084
3110
  function AgentTask() {
3085
3111
  const { selectedAgentId, pop } = useRouter();
3112
+ const { language, t } = useLanguage();
3086
3113
  const [agent] = useState16(
3087
3114
  () => selectedAgentId ? (() => {
3088
3115
  try {
@@ -3108,7 +3135,7 @@ function AgentTask() {
3108
3135
  });
3109
3136
  if (!agent || !run) {
3110
3137
  return /* @__PURE__ */ jsx28(Frame, { breadcrumb: ["ReevesAgents", "Runs"], statusContext: "Agent not found", children: /* @__PURE__ */ jsxs22(Box23, { flexDirection: "column", children: [
3111
- /* @__PURE__ */ jsx28(Text21, { color: colors.text.dim, children: "Agent not found." }),
3138
+ /* @__PURE__ */ jsx28(Text21, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
3112
3139
  /* @__PURE__ */ jsx28(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx28(Row, { selected: true, primary: "Back", hint: "return to agent detail" }) })
3113
3140
  ] }) });
3114
3141
  }
@@ -3129,7 +3156,7 @@ function AgentTask() {
3129
3156
  {
3130
3157
  selected: false,
3131
3158
  primary: "Last seen",
3132
- trailing: agent.last_seen ? `${Math.round((Date.now() - agent.last_seen) / 1e3)}s ago` : "never"
3159
+ trailing: agent.last_seen ? t("runtime.secondsAgo", { seconds: Math.round((Date.now() - agent.last_seen) / 1e3) }) : "never"
3133
3160
  }
3134
3161
  ),
3135
3162
  /* @__PURE__ */ jsx28(SectionEnd, {}),
@@ -3196,7 +3223,7 @@ function AgentKill() {
3196
3223
  breadcrumb: ["ReevesAgents", "Runs"],
3197
3224
  statusContext: "Agent not found",
3198
3225
  children: /* @__PURE__ */ jsxs23(Box24, { flexDirection: "column", children: [
3199
- /* @__PURE__ */ jsx29(Text22, { color: colors.text.dim, children: "Agent not found." }),
3226
+ /* @__PURE__ */ jsx29(Text22, { color: colors.text.dim, children: translatePhrase(language, "Agent not found.") }),
3200
3227
  /* @__PURE__ */ jsx29(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx29(
3201
3228
  Row,
3202
3229
  {
@@ -3336,7 +3363,7 @@ function TextField({
3336
3363
  const displayHelpText = helpText ? translatePhrase(language, helpText) : helpText;
3337
3364
  const labelText = `${displayLabel}${required ? " *" : ""}`;
3338
3365
  const contentWidth = Math.max(1, width - 6);
3339
- const labelWidth = Math.max(1, Math.min(Math.max(12, labelText.length), Math.floor(contentWidth * 0.35)));
3366
+ const labelWidth = Math.max(1, Math.min(Math.max(12, displayWidth(labelText)), Math.floor(contentWidth * 0.35)));
3340
3367
  const valueWidth = Math.max(1, contentWidth - labelWidth - sep.pipe.length);
3341
3368
  const lines = multiline ? wrapLines(displayValue, valueWidth) : [displayValue];
3342
3369
  return /* @__PURE__ */ jsxs25(Box26, { flexDirection: "column", width, children: [
@@ -3592,10 +3619,10 @@ function NewRunRoot() {
3592
3619
  hint: state.root.permissions === "skip" ? "trusted workspaces only" : "provider asks before sensitive actions"
3593
3620
  }
3594
3621
  ];
3595
- if (state.root.provider === "cc") {
3622
+ if (providerSupportsAuthMode(state.root.provider)) {
3596
3623
  list.push({ kind: "picker", id: "authMode", label: "Auth", current: state.root.authMode, values: AUTH_MODE_VALUES, display: authModeDisplay(state.root.authMode), hint: "api-key uses the API key instead of the default login" });
3597
3624
  }
3598
- if (state.root.provider === "cc" || state.root.provider === "codex") {
3625
+ if (providerSupportsEffort(state.root.provider)) {
3599
3626
  list.push({ kind: "picker", id: "effort", label: "Effort", current: state.root.effort, values: EFFORT_VALUES });
3600
3627
  }
3601
3628
  return list;
@@ -4029,10 +4056,10 @@ function NewRunWorker() {
4029
4056
  hint: worker.permissions === "skip" ? "trusted workspaces only" : "provider asks before sensitive actions"
4030
4057
  }
4031
4058
  ];
4032
- if (worker.provider === "cc") {
4059
+ if (providerSupportsAuthMode(worker.provider)) {
4033
4060
  list.push({ kind: "picker", id: "authMode", label: "Auth", current: worker.authMode, values: AUTH_MODE_VALUES2, display: authModeDisplay2(worker.authMode), hint: "api-key uses the API key instead of the default login" });
4034
4061
  }
4035
- if (worker.provider === "cc" || worker.provider === "codex") {
4062
+ if (providerSupportsEffort(worker.provider)) {
4036
4063
  list.push({ kind: "picker", id: "effort", label: "Effort", current: worker.effort, values: EFFORT_VALUES2 });
4037
4064
  }
4038
4065
  return list;
@@ -4263,6 +4290,7 @@ function permissionDisplay3(value) {
4263
4290
  function NewRunReview() {
4264
4291
  const { push, pop } = useRouter();
4265
4292
  const { state, reset } = useWizard();
4293
+ const { t } = useLanguage();
4266
4294
  const { rows: termRows } = useWindowSize15();
4267
4295
  const bodyRows = frameBodyRows(termRows, true, false);
4268
4296
  const compactBody = bodyRows <= 14;
@@ -4299,7 +4327,7 @@ function NewRunReview() {
4299
4327
  }
4300
4328
  });
4301
4329
  const promptPreview = state.root.prompt.length > 40 ? state.root.prompt.slice(0, 40) + "..." : state.root.prompt;
4302
- const showEffort = state.root.provider === "cc" || state.root.provider === "codex";
4330
+ const showEffort = providerSupportsEffort(state.root.provider);
4303
4331
  const permissionsSummary = showEffort ? `${permissionDisplay3(state.root.permissions)} \xB7 ${state.root.effort}` : permissionDisplay3(state.root.permissions);
4304
4332
  return /* @__PURE__ */ jsxs31(
4305
4333
  Frame,
@@ -4311,7 +4339,7 @@ function NewRunReview() {
4311
4339
  !compactBody && /* @__PURE__ */ jsx38(StepIndicator, { step: 4, total: 4, name: "Review" }),
4312
4340
  compactBody ? /* @__PURE__ */ jsxs31(Fragment9, { children: [
4313
4341
  /* @__PURE__ */ jsx38(Section, { label: "Review" }),
4314
- showCompactSummary && /* @__PURE__ */ jsx38(Row, { selected: false, primary: state.name || "(unset)", trailing: `${state.workers.length + 1} agents`, alwaysShowTrailing: true, disabled: true }),
4342
+ showCompactSummary && /* @__PURE__ */ jsx38(Row, { selected: false, primary: state.name || "(unset)", trailing: agentCountLabel(t, state.workers.length + 1), alwaysShowTrailing: true, disabled: true }),
4315
4343
  actions.map((action, idx) => /* @__PURE__ */ jsx38(
4316
4344
  Row,
4317
4345
  {
@@ -4335,7 +4363,7 @@ function NewRunReview() {
4335
4363
  /* @__PURE__ */ jsx38(Row, { selected: false, primary: showEffort ? "Permissions / Effort" : "Permissions", trailing: permissionsSummary }),
4336
4364
  /* @__PURE__ */ jsx38(SectionEnd, {}),
4337
4365
  state.workers.length > 0 && /* @__PURE__ */ jsxs31(Fragment9, { children: [
4338
- /* @__PURE__ */ jsx38(Section, { label: `Additional Agents (${state.workers.length})` }),
4366
+ /* @__PURE__ */ jsx38(Section, { label: t("runtime.additionalAgentsCount", { count: state.workers.length }) }),
4339
4367
  state.workers.map((worker, idx) => /* @__PURE__ */ jsx38(
4340
4368
  Row,
4341
4369
  {
@@ -4352,12 +4380,12 @@ function NewRunReview() {
4352
4380
  /* @__PURE__ */ jsx38(SectionEnd, {})
4353
4381
  ] }),
4354
4382
  /* @__PURE__ */ jsx38(Section, { label: "Planned Tmux Windows" }),
4355
- /* @__PURE__ */ jsx38(Row, { selected: false, primary: "agent 1", trailing: providerDisplayName(state.root.provider) }),
4383
+ /* @__PURE__ */ jsx38(Row, { selected: false, primary: t("runtime.agentN", { n: 1 }), trailing: providerDisplayName(state.root.provider) }),
4356
4384
  state.workers.map((worker, idx) => /* @__PURE__ */ jsx38(
4357
4385
  Row,
4358
4386
  {
4359
4387
  selected: false,
4360
- primary: `agent ${idx + 2}`,
4388
+ primary: t("runtime.agentN", { n: idx + 2 }),
4361
4389
  trailing: worker.nickname || providerDisplayName(worker.provider)
4362
4390
  },
4363
4391
  `tmux-${idx}`
@@ -4413,6 +4441,7 @@ var ACTION_LABEL_WIDTH12 = Math.max("Retry".length, "Back to Review".length);
4413
4441
  function NewRunStarting() {
4414
4442
  const { pop, resetStack, setSelectedRunId } = useRouter();
4415
4443
  const { state, reset } = useWizard();
4444
+ const { t } = useLanguage();
4416
4445
  const [error, setError] = useState25(null);
4417
4446
  const [actionIdx, setActionIdx] = useState25(0);
4418
4447
  const [retryCount, setRetryCount] = useState25(0);
@@ -4493,7 +4522,7 @@ function NewRunStarting() {
4493
4522
  statusKeys: "enter select \xB7 \u2191\u2193 move \xB7 esc back",
4494
4523
  children: [
4495
4524
  /* @__PURE__ */ jsx40(Box28, { flexDirection: "column", marginY: 1, children: /* @__PURE__ */ jsxs33(Text27, { children: [
4496
- "Error: ",
4525
+ t("runtime.errorPrefix"),
4497
4526
  error
4498
4527
  ] }) }),
4499
4528
  /* @__PURE__ */ jsx40(Section, { label: "Actions" }),
@@ -4520,9 +4549,8 @@ function NewRunStarting() {
4520
4549
  children: /* @__PURE__ */ jsxs33(Box28, { flexDirection: "row", marginY: 1, children: [
4521
4550
  /* @__PURE__ */ jsx40(Spinner, {}),
4522
4551
  /* @__PURE__ */ jsxs33(Text27, { children: [
4523
- " Launching ",
4524
- state.name,
4525
- "..."
4552
+ " ",
4553
+ t("runtime.launching", { name: state.name })
4526
4554
  ] })
4527
4555
  ] })
4528
4556
  }
@@ -4559,32 +4587,39 @@ function AddWorker() {
4559
4587
  const bodyRows = frameBodyRows(termRows, true, false);
4560
4588
  const compactBody = bodyRows <= 9;
4561
4589
  const run = selectedRunId ? safeReadRun(selectedRunId) : null;
4562
- const fields = useMemo7(() => [
4563
- { kind: "text", id: "nickname", label: "Nickname", value: draft.nickname, helpText: "tmux window name; letters, digits, dashes", required: true },
4564
- { kind: "picker", id: "provider", label: "Provider", current: draft.provider, values: PROVIDERS, display: providerDisplayName(draft.provider) },
4565
- {
4566
- kind: "picker",
4567
- id: "model",
4568
- label: "Model",
4569
- current: draft.model,
4570
- values: modelValuesForProvider(draft.provider),
4571
- display: modelDisplayName(draft.model),
4572
- hint: "optional \xB7 blank uses provider default"
4573
- },
4574
- { kind: "text", id: "prompt", label: "Prompt", value: draft.prompt, helpText: "optional initial prompt \xB7 enter newline \xB7 esc done", required: false },
4575
- { kind: "text", id: "workingDir", label: "Working Dir", value: draft.workingDir, helpText: "defaults to the run working dir", required: false },
4576
- {
4577
- kind: "picker",
4578
- id: "permissions",
4579
- label: "Permissions",
4580
- current: draft.permissions,
4581
- values: PERMISSIONS_VALUES3,
4582
- display: permissionDisplay4(draft.permissions),
4583
- hint: draft.permissions === "skip" ? "trusted workspaces only" : "provider asks before sensitive actions"
4584
- },
4585
- { kind: "picker", id: "authMode", label: "Auth", current: draft.authMode, values: AUTH_MODE_VALUES3, display: authModeDisplay3(draft.authMode), hint: "api-key uses the API key instead of the default login" },
4586
- { kind: "picker", id: "effort", label: "Effort", current: draft.effort, values: EFFORT_VALUES3 }
4587
- ], [draft]);
4590
+ const fields = useMemo7(() => {
4591
+ const list = [
4592
+ { kind: "text", id: "nickname", label: "Nickname", value: draft.nickname, helpText: "tmux window name; letters, digits, dashes", required: true },
4593
+ { kind: "picker", id: "provider", label: "Provider", current: draft.provider, values: PROVIDERS, display: providerDisplayName(draft.provider) },
4594
+ {
4595
+ kind: "picker",
4596
+ id: "model",
4597
+ label: "Model",
4598
+ current: draft.model,
4599
+ values: modelValuesForProvider(draft.provider),
4600
+ display: modelDisplayName(draft.model),
4601
+ hint: "optional \xB7 blank uses provider default"
4602
+ },
4603
+ { kind: "text", id: "prompt", label: "Prompt", value: draft.prompt, helpText: "optional initial prompt \xB7 enter newline \xB7 esc done", required: false },
4604
+ { kind: "text", id: "workingDir", label: "Working Dir", value: draft.workingDir, helpText: "defaults to the run working dir", required: false },
4605
+ {
4606
+ kind: "picker",
4607
+ id: "permissions",
4608
+ label: "Permissions",
4609
+ current: draft.permissions,
4610
+ values: PERMISSIONS_VALUES3,
4611
+ display: permissionDisplay4(draft.permissions),
4612
+ hint: draft.permissions === "skip" ? "trusted workspaces only" : "provider asks before sensitive actions"
4613
+ }
4614
+ ];
4615
+ if (providerSupportsAuthMode(draft.provider)) {
4616
+ list.push({ kind: "picker", id: "authMode", label: "Auth", current: draft.authMode, values: AUTH_MODE_VALUES3, display: authModeDisplay3(draft.authMode), hint: "api-key uses the API key instead of the default login" });
4617
+ }
4618
+ if (providerSupportsEffort(draft.provider)) {
4619
+ list.push({ kind: "picker", id: "effort", label: "Effort", current: draft.effort, values: EFFORT_VALUES3 });
4620
+ }
4621
+ return list;
4622
+ }, [draft]);
4588
4623
  const actions = [
4589
4624
  { id: "add", label: "Add Agent", hint: "add this agent to the run" },
4590
4625
  { id: "cancel", label: "Cancel", hint: "discard and return" }
@@ -4926,7 +4961,8 @@ function Settings() {
4926
4961
  const { language, setLanguage, t } = useLanguage();
4927
4962
  const { rows: termRows } = useWindowSize17();
4928
4963
  const bodyRows = frameBodyRows(termRows, true, true);
4929
- const compactBody = bodyRows <= 13;
4964
+ const nonCompactRows = PROVIDERS.length + LANGUAGE_OPTIONS.length + 3 + 4 + 8;
4965
+ const compactBody = bodyRows < nonCompactRows;
4930
4966
  const showCompactStatePaths = compactBody && bodyRows >= 10;
4931
4967
  const [selectedIdx, setSelectedIdx] = useState27(0);
4932
4968
  const [refreshKey, setRefreshKey] = useState27(0);
@@ -5407,6 +5443,7 @@ var CONTENT = [
5407
5443
  ];
5408
5444
  function Reference() {
5409
5445
  const { pop } = useRouter();
5446
+ const { t } = useLanguage();
5410
5447
  const { rows } = useWindowSize19();
5411
5448
  const bodyRows = frameBodyRows(rows, true, true);
5412
5449
  const compactBody = bodyRows <= 10;
@@ -5425,7 +5462,7 @@ function Reference() {
5425
5462
  if (key.return || key.escape || key.backspace) pop();
5426
5463
  });
5427
5464
  const visible = CONTENT.slice(scroll, scroll + visibleCount);
5428
- const statusContext = maxScroll > 0 ? `Reference ${scroll + 1}-${Math.min(CONTENT.length, scroll + visibleCount)} of ${CONTENT.length}` : "ReevesAgents reference";
5465
+ const statusContext = maxScroll > 0 ? t("runtime.referenceRange", { from: scroll + 1, to: Math.min(CONTENT.length, scroll + visibleCount), total: CONTENT.length }) : "ReevesAgents reference";
5429
5466
  const contentRows = [];
5430
5467
  let openSection = false;
5431
5468
  visible.forEach((item, idx) => {
@@ -5452,7 +5489,7 @@ function Reference() {
5452
5489
  Row,
5453
5490
  {
5454
5491
  selected: false,
5455
- primary: `${scroll + 1}-${Math.min(CONTENT.length, scroll + visibleCount)} of ${CONTENT.length}`,
5492
+ primary: t("runtime.pageRange", { from: scroll + 1, to: Math.min(CONTENT.length, scroll + visibleCount), total: CONTENT.length }),
5456
5493
  trailing: "scroll with arrows",
5457
5494
  disabled: true
5458
5495
  }
@@ -5474,6 +5511,7 @@ import { Box as Box32, useInput as useInput25, useWindowSize as useWindowSize20
5474
5511
  import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
5475
5512
  function Credits() {
5476
5513
  const { pop } = useRouter();
5514
+ const { t } = useLanguage();
5477
5515
  const { rows: termRows } = useWindowSize20();
5478
5516
  const bodyRows = frameBodyRows(termRows, true, true);
5479
5517
  const compactBody = bodyRows <= 8;
@@ -5516,7 +5554,7 @@ function Credits() {
5516
5554
  Row,
5517
5555
  {
5518
5556
  selected: false,
5519
- primary: `${scroll + 1}-${scroll + visible.length} of ${content.length}`,
5557
+ primary: t("runtime.pageRange", { from: scroll + 1, to: scroll + visible.length, total: content.length }),
5520
5558
  trailing: "scroll with arrows",
5521
5559
  disabled: true
5522
5560
  }
@@ -5544,6 +5582,7 @@ function statusGlyph4(status) {
5544
5582
  }
5545
5583
  function Doctor() {
5546
5584
  const { pop, push, setSelectedCheckName } = useRouter();
5585
+ const { language } = useLanguage();
5547
5586
  const { rows: termRows } = useWindowSize21();
5548
5587
  const bodyRows = frameBodyRows(termRows, true, true);
5549
5588
  const compactBody = bodyRows <= 10;
@@ -5632,7 +5671,7 @@ function Doctor() {
5632
5671
  statusContext: selectedCheck ? `${selectedCheck.name}: ${selectedCheck.detail}` : "",
5633
5672
  children: compactBody ? /* @__PURE__ */ jsxs39(Primary, { children: [
5634
5673
  /* @__PURE__ */ jsx48(Section, { label: selectedIdx < pagedChecks.length ? "Checks" : "Actions" }),
5635
- isSpinning ? /* @__PURE__ */ jsx48(Spinner, { label: "checking...", color: colors.accent.bright }) : compactEntryIndexes.map((idx) => {
5674
+ isSpinning ? /* @__PURE__ */ jsx48(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }) : compactEntryIndexes.map((idx) => {
5636
5675
  if (idx < pagedChecks.length) {
5637
5676
  const check = pagedChecks[idx];
5638
5677
  return /* @__PURE__ */ jsx48(
@@ -5667,7 +5706,7 @@ function Doctor() {
5667
5706
  }),
5668
5707
  /* @__PURE__ */ jsx48(SectionEnd, {})
5669
5708
  ] }) : /* @__PURE__ */ jsxs39(Primary, { children: [
5670
- isSpinning && /* @__PURE__ */ jsx48(Spinner, { label: "checking...", color: colors.accent.bright }),
5709
+ isSpinning && /* @__PURE__ */ jsx48(Spinner, { label: translatePhrase(language, "checking..."), color: colors.accent.bright }),
5671
5710
  !isSpinning && pagedChecks.map((check, idx) => /* @__PURE__ */ jsx48(
5672
5711
  Row,
5673
5712
  {
@@ -5729,6 +5768,7 @@ function findFixHint(check) {
5729
5768
  }
5730
5769
  function DoctorCheck() {
5731
5770
  const { pop, selectedCheckName } = useRouter();
5771
+ const { language } = useLanguage();
5732
5772
  const [selectedIdx, setSelectedIdx] = useState32(0);
5733
5773
  const result = useMemo11(() => runDoctor(), []);
5734
5774
  const check = result.checks.find((c) => c.name === selectedCheckName);
@@ -5776,15 +5816,15 @@ function DoctorCheck() {
5776
5816
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
5777
5817
  /* @__PURE__ */ jsx49(Section, { label: "Fix" }),
5778
5818
  /* @__PURE__ */ jsxs40(Box34, { marginY: 1, marginLeft: 2, flexDirection: "column", children: [
5779
- /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: "Suggested fix:" }),
5780
- /* @__PURE__ */ jsx49(Text28, { color: colors.accent.primary, children: fixHint })
5819
+ /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: translatePhrase(language, "Suggested fix:") }),
5820
+ /* @__PURE__ */ jsx49(Text28, { color: colors.accent.primary, children: translatePhrase(language, fixHint) })
5781
5821
  ] }),
5782
5822
  /* @__PURE__ */ jsx49(SectionEnd, {})
5783
5823
  ] }),
5784
5824
  !fixHint && /* @__PURE__ */ jsxs40(Fragment15, { children: [
5785
5825
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
5786
5826
  /* @__PURE__ */ jsx49(Section, { label: "Fix" }),
5787
- /* @__PURE__ */ jsx49(Box34, { marginY: 1, marginLeft: 2, children: /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: "No suggested fix. Check the source code or open an issue." }) }),
5827
+ /* @__PURE__ */ jsx49(Box34, { marginY: 1, marginLeft: 2, children: /* @__PURE__ */ jsx49(Text28, { color: colors.text.dim, children: translatePhrase(language, "No suggested fix. Check the source code or open an issue.") }) }),
5788
5828
  /* @__PURE__ */ jsx49(SectionEnd, {})
5789
5829
  ] }),
5790
5830
  /* @__PURE__ */ jsx49(Box34, { marginY: 1 }),
@@ -5957,6 +5997,7 @@ function isNumeric(field) {
5957
5997
  function Config() {
5958
5998
  const { pop } = useRouter();
5959
5999
  const { toast } = useToast();
6000
+ const { language } = useLanguage();
5960
6001
  const [global, setGlobal] = useState34(() => loadConfig().global);
5961
6002
  const [selectedIdx, setSelectedIdx] = useState34(0);
5962
6003
  const [editingKey, setEditingKey] = useState34(null);
@@ -6039,7 +6080,7 @@ function Config() {
6039
6080
  {
6040
6081
  selected: selectedIdx === idx,
6041
6082
  primary: field.label,
6042
- trailing: `\u2039 ${String(value)} \u203A`,
6083
+ trailing: `\u2039 ${translatePhrase(language, String(value))} \u203A`,
6043
6084
  hint: selectedIdx === idx ? "\u2190 \u2192 cycle" : void 0
6044
6085
  },
6045
6086
  field.key
@@ -6411,4 +6452,4 @@ export {
6411
6452
  nextHistoryOnReset,
6412
6453
  useRouter
6413
6454
  };
6414
- //# sourceMappingURL=router-I4WDR7CD.js.map
6455
+ //# sourceMappingURL=router-AOJOUKAY.js.map