Skip to content
TypeScript

Stage 2: wire the goal into runs, add ja/zh, fix metric edge cases

Claude0e4e5c54445c
diff --git a/README.ja.md b/README.ja.md
index fcaa1f9..f68f5bc 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -146,7 +146,7 @@ theseus [2m×2a×1h] ▸ /exit
| コマンド | 説明 |
| --- | --- |
-| 自由入力 · `/goal <text>` | 達成したい目標(自由入力は目標に蓄積) |
+| 自由入力 · `/goal <text>` | 達成したい目標 — 自由入力が蓄積され、run meta に記録されレポートに表示 |
| `/models` `/agents` `/harness` `/bench` | L0×L1×L2 — 引数なしで一覧、引数ありで選択 |
| `/runs` `/tasks` `/seed` `/runner` `/judge` `/score` `/lang` | スイープのパラメータ |
| `/run` · `/view [open]` · `/config` `/clear` `/help` `/exit` | 実行 · 可視化 · 確認/リセット/ヘルプ/終了 |
diff --git a/README.ko.md b/README.ko.md
index 582f5e9..a88ba81 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -145,7 +145,7 @@ theseus [2m×2a×1h] ▸ /exit
| 명령 | 설명 |
| --- | --- |
-| 자유 입력 · `/goal <text>` | 달성하려는 목표(자유 입력은 목표에 누적) |
+| 자유 입력 · `/goal <text>` | 달성하려는 목표 — 자유 입력이 누적되고, run meta 에 기록되어 리포트에 표시 |
| `/models` `/agents` `/harness` `/bench` | L0×L1×L2 — 인자 없으면 목록, 있으면 선택 |
| `/runs` `/tasks` `/seed` `/runner` `/judge` `/score` `/lang` | 스윕 파라미터 |
| `/run` · `/view [open]` · `/config` `/clear` `/help` `/exit` | 실행 · 시각화 · 점검/리셋/도움말/종료 |
diff --git a/README.md b/README.md
index 83efbbd..ebec2d7 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,7 @@ theseus [2m×2a×1h] ▸ /exit
| command | what it does |
| --- | --- |
-| plain text · `/goal <text>` | what you want to achieve (plain text accumulates into the goal) |
+| plain text · `/goal <text>` | what you want to achieve — accumulated from plain text, recorded in the run meta, shown on the report |
| `/models` `/agents` `/harness` `/bench` | the L0×L1×L2 matrix — bare command lists, with args selects |
| `/runs` `/tasks` `/seed` `/runner` `/judge` `/score` `/lang` | sweep parameters |
| `/run` | run the comparison with the current selection |
diff --git a/README.zh.md b/README.zh.md
index 7f91297..fabcac9 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -143,7 +143,7 @@ theseus [2m×2a×1h] ▸ /exit
| 命令 | 说明 |
| --- | --- |
-| 自然语言 · `/goal <text>` | 你想达成的目标(自然语言会累加到目标) |
+| 自然语言 · `/goal <text>` | 你想达成的目标 — 自然语言累加,记录到 run meta 并显示在报告中 |
| `/models` `/agents` `/harness` `/bench` | L0×L1×L2 —— 无参数列出,有参数选择 |
| `/runs` `/tasks` `/seed` `/runner` `/judge` `/score` `/lang` | 扫描参数 |
| `/run` · `/view [open]` · `/config` `/clear` `/help` `/exit` | 运行 · 可视化 · 查看/重置/帮助/退出 |
diff --git a/src/brand.ts b/src/brand.ts
index 200394f..6684ec1 100644
--- a/src/brand.ts
+++ b/src/brand.ts
@@ -27,7 +27,7 @@ export const THEME = {
} as const;
// Olympus Research 네 원칙(브랜드 보드).
-export const PRINCIPLES = {
+export const PRINCIPLES: Record<Lang, readonly (readonly [string, string])[]> = {
en: [
["Alpine Inspiration", "sharp, restrained form — alpine strength and minimalism"],
["Focus & Purpose", "the highest peak at the center — exploration toward the summit"],
@@ -40,18 +40,34 @@ export const PRINCIPLES = {
["테크니컬 엣지", "불필요한 디테일을 덜어내 기능성과 현대적 인상을 강조"],
["버서틸리티", "다양한 스케일과 매체에서 명확하게 작동하는 구조"],
],
-} as const;
+ ja: [
+ ["アルパイン・インスピレーション", "鋭く抑制された形 — 高山の強靭さとミニマリズム"],
+ ["フォーカス&パーパス", "最高峰を中心に — 探究と頂点を目指す精神"],
+ ["テクニカル・エッジ", "不要なものを削ぎ落とし、機能性と現代性を強調"],
+ ["バーサティリティ", "あらゆるスケール・媒体で明瞭に機能する構造"],
+ ],
+ zh: [
+ ["高山灵感", "锐利而克制的形态 — 高山的坚韧与极简"],
+ ["专注与目标", "以最高峰为中心 — 面向顶点的探索精神"],
+ ["技术锋芒", "去除多余细节,强调功能性与现代感"],
+ ["多场景适应", "在任何尺度与媒介下都清晰可用的结构"],
+ ],
+};
// theseus 의 의미는 "테세우스의 배"(부품을 갈아끼워도 워크플로는 당신의 것). 비주얼은 Olympus 알파인.
-export const PHILOSOPHY = {
+export const PHILOSOPHY: Record<Lang, string> = {
en: "Swap the model, the agent, the harness — plank by plank. The ship is still yours. theseus shows you which planks actually change the voyage.",
kr: "모델도, 에이전트도, 하네스도 — 널빤지처럼 갈아끼운다. 그래도 배는 당신의 것. theseus 는 어떤 널빤지가 항해를 실제로 바꾸는지 보여준다.",
-} as const;
+ ja: "モデルも、エージェントも、ハーネスも — 板を一枚ずつ張り替える。それでも船はあなたのもの。theseus はどの板が航海を本当に変えるかを見せる。",
+ zh: "模型、代理、工具链 — 像船板一样逐块更换。船依然是你的。theseus 告诉你哪块船板真正改变了航程。",
+};
-export const TAGLINE = {
+export const TAGLINE: Record<Lang, string> = {
en: "compare model × agent × harness on your own tasks",
kr: "내 과제로 모델 × 에이전트 × 하네스 비교",
-} as const;
+ ja: "自分のタスクでモデル × エージェント × ハーネスを比較",
+ zh: "用你自己的任务比较模型 × 代理 × 工具链",
+};
export function philosophy(lang: Lang): string {
return PHILOSOPHY[lang] ?? PHILOSOPHY.kr;
diff --git a/src/cli.ts b/src/cli.ts
index e227ac5..79917e5 100644
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -54,6 +54,7 @@ function toRunOptions(o: any): RunOptions {
language: normalizeLang(o.language),
view: normalizeView(o.view),
port: Number.parseInt(o.port ?? "7777", 10),
+ goal: o.goal || undefined,
};
}
@@ -80,6 +81,7 @@ function addCompareOptions(cmd: Command): Command {
.option("--concurrency <n>", "parallel executions", "4")
.option("--timeout <s>", "per-task timeout seconds", "600")
.option("--out <dir>", "output dir", "runs")
+ .option("--goal <text>", "what you want to achieve (recorded in meta + shown on the report)")
.option("--judge <name>", "none|heuristic|cc", "none")
.option("--score", "compute composite score (opt-in)", false)
.option("--balanced", "difficulty-balanced subset", false)
@@ -88,7 +90,7 @@ function addCompareOptions(cmd: Command): Command {
.option("--view <mode>", "visualization: inline|open|serve|term", "inline")
.option("--port <n>", "port for --view serve", "7777")
.option("--no-logo", "suppress the ASCII logo banner")
- .option("-L, --language <lang>", "en|kr", "kr");
+ .option("-L, --language <lang>", "en|kr|ja|zh", "kr");
}
function printPreflight(t: Translator, lang: Lang, opts: RunOptions, yes: boolean): boolean {
@@ -235,7 +237,7 @@ function buildProgram(): Command {
.aliases(["chat", "repl"])
.description("open an interactive session — slash commands to configure & run")
.option("--out <dir>", "output dir", "runs")
- .option("-L, --language <lang>", "en|kr", "kr")
+ .option("-L, --language <lang>", "en|kr|ja|zh", "kr")
.action((o) => runSession({ language: normalizeLang(o.language), outDir: o.out ?? "runs" }));
program
@@ -243,7 +245,7 @@ function buildProgram(): Command {
.description("show recorded results")
.option("--run <id>", "run id (default: latest)")
.option("--out <dir>", "output dir", "runs")
- .option("-L, --language <lang>", "en|kr", "kr")
+ .option("-L, --language <lang>", "en|kr|ja|zh", "kr")
.action((o) => {
const lang = normalizeLang(o.language);
const t = translator(lang);
@@ -310,7 +312,7 @@ function buildProgram(): Command {
.option("--out <dir>", "output dir", "runs")
.option("--rich", "force cli-table3 fallback", false)
.option("--open", "open report.html in browser", false)
- .option("-L, --language <lang>", "en|kr", "kr")
+ .option("-L, --language <lang>", "en|kr|ja|zh", "kr")
.action((o) =>
runTui({
out: o.out,
@@ -360,7 +362,7 @@ function buildProgram(): Command {
.option("--seed <n>", "seed", "0")
.option("--timeout <s>", "per-task timeout seconds", "120")
.option("-y, --yes", "allow real runner (not mock)", false)
- .option("-L, --language <lang>", "en|kr", "kr")
+ .option("-L, --language <lang>", "en|kr|ja|zh", "kr")
.action(async (o) => {
const lang = normalizeLang(o.language);
const t = translator(lang);
diff --git a/src/i18n.ts b/src/i18n.ts
index 7436c3a..299f8ca 100644
--- a/src/i18n.ts
+++ b/src/i18n.ts
@@ -1,112 +1,243 @@
/**
- * 다국어 (PRD §16). 사용자에게 보이는 표시 문자열만 i18n. 기본 kr 폴백.
+ * 다국어 (PRD §16). 사용자에게 보이는 표시 문자열만 i18n — en/kr/ja/zh (README 4개 언어와 동기).
+ * 누락 키 폴백: 요청 언어 → en → kr.
*/
import type { Lang } from "./models";
-type Entry = { en: string; kr: string };
+type Entry = { en: string; kr: string; ja?: string; zh?: string };
export const STRINGS: Record<string, Entry> = {
// CLI / banner
app_tagline: {
en: "theseus — compare model × agent × harness on your own tasks",
kr: "theseus — 내 과제로 모델 × 에이전트 × 하네스 비교",
+ ja: "theseus — 自分のタスクでモデル × エージェント × ハーネスを比較",
+ zh: "theseus — 用你自己的任务比较模型 × 代理 × 工具链",
},
- preflight_title: { en: "Preflight", kr: "사전점검" },
- valid_combos: { en: "Valid combos", kr: "유효 조합" },
- excluded_combos: { en: "Excluded combos", kr: "제외 조합" },
- scale: { en: "Scale (combos × tasks × runs)", kr: "실행 규모 (조합 × 과제 × 반복)" },
- runner_label: { en: "Runner", kr: "러너" },
- warnings: { en: "Warnings", kr: "경고" },
+ preflight_title: { en: "Preflight", kr: "사전점검", ja: "事前チェック", zh: "预检" },
+ valid_combos: { en: "Valid combos", kr: "유효 조합", ja: "有効な組み合わせ", zh: "有效组合" },
+ excluded_combos: {
+ en: "Excluded combos",
+ kr: "제외 조합",
+ ja: "除外された組み合わせ",
+ zh: "排除的组合",
+ },
+ scale: {
+ en: "Scale (combos × tasks × runs)",
+ kr: "실행 규모 (조합 × 과제 × 반복)",
+ ja: "実行規模(組み合わせ × タスク × 回数)",
+ zh: "执行规模(组合 × 任务 × 次数)",
+ },
+ runner_label: { en: "Runner", kr: "러너", ja: "ランナー", zh: "运行器" },
+ warnings: { en: "Warnings", kr: "경고", ja: "警告", zh: "警告" },
gate_blocked: {
en: "Blocked: real runner with >30 executions requires --yes",
kr: "차단됨: real 러너 30회 초과 실행은 --yes 필요",
+ ja: "ブロック: 実ランナーで30回超の実行には --yes が必要",
+ zh: "已阻止:真实运行器超过 30 次执行需要 --yes",
+ },
+ dry_run_only: {
+ en: "Dry run — plan only, nothing executed",
+ kr: "드라이런 — 계획만, 미실행",
+ ja: "ドライラン — 計画のみ、未実行",
+ zh: "试运行 — 仅计划,未执行",
},
- dry_run_only: { en: "Dry run — plan only, nothing executed", kr: "드라이런 — 계획만, 미실행" },
- run_complete: { en: "Run complete", kr: "실행 완료" },
- report_path: { en: "Report", kr: "리포트" },
- graph_path: { en: "Flow graph", kr: "흐름 그래프" },
- opening_browser: { en: "opening report in browser…", kr: "브라우저에서 리포트 여는 중…" },
- verify_captured: { en: "captured?", kr: "포착됨?" },
- run_id: { en: "Run id", kr: "런 ID" },
- results_table: { en: "Results", kr: "결과" },
+ run_complete: { en: "Run complete", kr: "실행 완료", ja: "実行完了", zh: "运行完成" },
+ report_path: { en: "Report", kr: "리포트", ja: "レポート", zh: "报告" },
+ graph_path: { en: "Flow graph", kr: "흐름 그래프", ja: "フローグラフ", zh: "流程图" },
+ opening_browser: {
+ en: "opening report in browser…",
+ kr: "브라우저에서 리포트 여는 중…",
+ ja: "ブラウザでレポートを開いています…",
+ zh: "正在浏览器中打开报告…",
+ },
+ verify_captured: { en: "captured?", kr: "포착됨?", ja: "捕捉?", zh: "捕获?" },
+ run_id: { en: "Run id", kr: "런 ID", ja: "実行ID", zh: "运行 ID" },
+ results_table: { en: "Results", kr: "결과", ja: "結果", zh: "结果" },
no_models: {
en: "No models/agents specified. Example: theseus --model opus4.8 --agent cc --harness none",
kr: "모델/에이전트 미지정. 예: theseus --model opus4.8 --agent cc --harness none",
+ ja: "モデル/エージェント未指定。例: theseus --model opus4.8 --agent cc --harness none",
+ zh: "未指定模型/代理。例:theseus --model opus4.8 --agent cc --harness none",
},
mock_banner: {
en: "MOCK runner — results are synthetic (offline). Not real measurements.",
kr: "MOCK 러너 — 합성 결과(오프라인). 실측 아님.",
+ ja: "MOCK ランナー — 合成結果(オフライン)。実測ではありません。",
+ zh: "MOCK 运行器 — 合成结果(离线)。并非真实测量。",
},
// dashboard chrome
- tab_decide: { en: "Decide", kr: "결정" },
- tab_detail: { en: "Detail", kr: "상세" },
- tab_flow: { en: "Flow", kr: "흐름" },
+ tab_decide: { en: "Decide", kr: "결정", ja: "決定", zh: "决策" },
+ tab_detail: { en: "Detail", kr: "상세", ja: "詳細", zh: "详情" },
+ tab_flow: { en: "Flow", kr: "흐름", ja: "フロー", zh: "流程" },
decide_lead: {
en: "The answer at a glance — pick the trade-off, not a single score.",
kr: "한눈에 보는 답 — 단일 점수가 아니라 트레이드오프를 고른다.",
+ ja: "一目でわかる答え — 単一スコアではなくトレードオフを選ぶ。",
+ zh: "一眼看到答案 — 选择权衡,而不是单一分数。",
+ },
+ sec_parallel: {
+ en: "Trade-off across every axis",
+ kr: "전 축 트레이드오프",
+ ja: "全軸のトレードオフ",
+ zh: "全维度权衡",
},
- sec_parallel: { en: "Trade-off across every axis", kr: "전 축 트레이드오프" },
parallel_note: {
en: "one line per combo · axes oriented so up = better · hover a line to isolate it",
kr: "조합당 한 선 · 위로 갈수록 좋음 · 선에 마우스를 올리면 그 조합만 강조",
+ ja: "組み合わせごとに1本 · 上ほど良い · 線にホバーで強調",
+ zh: "每个组合一条线 · 越往上越好 · 悬停以突出显示",
+ },
+ sec_rankings: {
+ en: "Ranking on each axis",
+ kr: "축별 순위",
+ ja: "軸ごとのランキング",
+ zh: "各维度排名",
},
- sec_rankings: { en: "Ranking on each axis", kr: "축별 순위" },
- legend_combos: { en: "Combos", kr: "조합" },
- axis_better: { en: "better", kr: "좋음" },
+ legend_combos: { en: "Combos", kr: "조합", ja: "組み合わせ", zh: "组合" },
+ axis_better: { en: "better", kr: "좋음", ja: "良い", zh: "更好" },
+ goal_label: { en: "goal", kr: "목표", ja: "目標", zh: "目标" },
// report sections
- sec_best: { en: "0. Best by perspective", kr: "0. 관점별 최적" },
- sec_score: { en: "0.5 Composite score (opt-in)", kr: "0.5 종합점수 (opt-in)" },
- sec_accuracy: { en: "1. Accuracy", kr: "1. 정확도" },
- sec_efficiency: { en: "2. Efficiency", kr: "2. 효율" },
- sec_scatter: { en: "3. Cost-performance scatter", kr: "3. 가성비 산점도" },
- pareto_frontier: { en: "Pareto frontier", kr: "파레토 경계" },
- philosophy_label: { en: "Ship of Theseus", kr: "테세우스의 배" },
- sec_matrix: { en: "4. Task pass/fail matrix", kr: "4. 과제별 통과/실패 매트릭스" },
- sec_flow: { en: "5. Subagent flow graphs", kr: "5. 서브에이전트 흐름 그래프" },
- sec_failures: { en: "6. Failed tasks & causes", kr: "6. 실패 과제 & 원인" },
- sec_uncollected: { en: "7. Uncollected metrics", kr: "7. 미수집 지표" },
+ sec_best: {
+ en: "0. Best by perspective",
+ kr: "0. 관점별 최적",
+ ja: "0. 観点別ベスト",
+ zh: "0. 各视角最优",
+ },
+ sec_score: {
+ en: "0.5 Composite score (opt-in)",
+ kr: "0.5 종합점수 (opt-in)",
+ ja: "0.5 総合スコア(opt-in)",
+ zh: "0.5 综合评分(可选)",
+ },
+ sec_accuracy: { en: "1. Accuracy", kr: "1. 정확도", ja: "1. 精度", zh: "1. 准确率" },
+ sec_efficiency: { en: "2. Efficiency", kr: "2. 효율", ja: "2. 効率", zh: "2. 效率" },
+ sec_scatter: {
+ en: "3. Cost-performance scatter",
+ kr: "3. 가성비 산점도",
+ ja: "3. コスト性能散布図",
+ zh: "3. 成本-性能散点图",
+ },
+ pareto_frontier: {
+ en: "Pareto frontier",
+ kr: "파레토 경계",
+ ja: "パレートフロンティア",
+ zh: "帕累托前沿",
+ },
+ philosophy_label: {
+ en: "Ship of Theseus",
+ kr: "테세우스의 배",
+ ja: "テセウスの船",
+ zh: "忒修斯之船",
+ },
+ sec_matrix: {
+ en: "4. Task pass/fail matrix",
+ kr: "4. 과제별 통과/실패 매트릭스",
+ ja: "4. タスク合否マトリクス",
+ zh: "4. 任务通过/失败矩阵",
+ },
+ sec_flow: {
+ en: "5. Subagent flow graphs",
+ kr: "5. 서브에이전트 흐름 그래프",
+ ja: "5. サブエージェントフローグラフ",
+ zh: "5. 子代理流程图",
+ },
+ sec_failures: {
+ en: "6. Failed tasks & causes",
+ kr: "6. 실패 과제 & 원인",
+ ja: "6. 失敗タスクと原因",
+ zh: "6. 失败任务与原因",
+ },
+ sec_uncollected: {
+ en: "7. Uncollected metrics",
+ kr: "7. 미수집 지표",
+ ja: "7. 未収集の指標",
+ zh: "7. 未收集的指标",
+ },
// perspectives
- persp_accuracy: { en: "Highest accuracy", kr: "최고 정확도" },
- persp_consistency: { en: "Most consistent", kr: "최고 일관성" },
- persp_effcost: { en: "Lowest $/solved", kr: "최저 해결당 비용" },
- persp_cost: { en: "Lowest cost", kr: "최저 비용" },
- persp_tokens: { en: "Fewest tokens", kr: "최소 토큰" },
- persp_time: { en: "Fastest", kr: "최단 시간" },
- persp_toolcalls: { en: "Fewest tool calls", kr: "최소 툴콜" },
- persp_subagents: { en: "Fewest subagents", kr: "최소 서브에이전트" },
- persp_quality: { en: "Highest quality", kr: "최고 품질" },
+ persp_accuracy: {
+ en: "Highest accuracy",
+ kr: "최고 정확도",
+ ja: "最高精度",
+ zh: "最高准确率",
+ },
+ persp_consistency: {
+ en: "Most consistent",
+ kr: "최고 일관성",
+ ja: "最も安定",
+ zh: "最稳定",
+ },
+ persp_effcost: {
+ en: "Lowest $/solved",
+ kr: "최저 해결당 비용",
+ ja: "解決あたり最安",
+ zh: "每解决最低成本",
+ },
+ persp_cost: { en: "Lowest cost", kr: "최저 비용", ja: "最低コスト", zh: "最低成本" },
+ persp_tokens: { en: "Fewest tokens", kr: "최소 토큰", ja: "最少トークン", zh: "最少 token" },
+ persp_time: { en: "Fastest", kr: "최단 시간", ja: "最速", zh: "最快" },
+ persp_toolcalls: {
+ en: "Fewest tool calls",
+ kr: "최소 툴콜",
+ ja: "最少ツール呼び出し",
+ zh: "最少工具调用",
+ },
+ persp_subagents: {
+ en: "Fewest subagents",
+ kr: "최소 서브에이전트",
+ ja: "最少サブエージェント",
+ zh: "最少子代理",
+ },
+ persp_quality: { en: "Highest quality", kr: "최고 품질", ja: "最高品質", zh: "最高质量" },
// graph
- graph_title: { en: "Subagent flow", kr: "서브에이전트 흐름" },
- tag_main: { en: "MAIN LOOP", kr: "메인 루프" },
- tag_sub: { en: "SUB", kr: "서브" },
- node_skills: { en: "Skills", kr: "스킬" },
- node_tools: { en: "Tools", kr: "도구" },
- node_steps: { en: "Steps", kr: "행동" },
- node_input: { en: "Input", kr: "입력" },
- node_log: { en: "Log", kr: "로그" },
- legend: { en: "Legend", kr: "범례" },
- uncollected_note: { en: "null = not collected", kr: "null = 미수집" },
+ graph_title: {
+ en: "Subagent flow",
+ kr: "서브에이전트 흐름",
+ ja: "サブエージェントフロー",
+ zh: "子代理流程",
+ },
+ tag_main: { en: "MAIN LOOP", kr: "메인 루프", ja: "メインループ", zh: "主循环" },
+ tag_sub: { en: "SUB", kr: "서브", ja: "サブ", zh: "子" },
+ node_skills: { en: "Skills", kr: "스킬", ja: "スキル", zh: "技能" },
+ node_tools: { en: "Tools", kr: "도구", ja: "ツール", zh: "工具" },
+ node_steps: { en: "Steps", kr: "행동", ja: "ステップ", zh: "步骤" },
+ node_input: { en: "Input", kr: "입력", ja: "入力", zh: "输入" },
+ node_log: { en: "Log", kr: "로그", ja: "ログ", zh: "日志" },
+ legend: { en: "Legend", kr: "범례", ja: "凡例", zh: "图例" },
+ uncollected_note: {
+ en: "null = not collected",
+ kr: "null = 미수집",
+ ja: "null = 未収集",
+ zh: "null = 未收集",
+ },
// misc columns
- col_combo: { en: "combo", kr: "조합" },
- col_acc: { en: "accuracy", kr: "정확도" },
- col_consistency: { en: "consistency", kr: "일관성" },
- col_effcost: { en: "$/solved", kr: "해결당 비용" },
+ col_combo: { en: "combo", kr: "조합", ja: "組み合わせ", zh: "组合" },
+ col_acc: { en: "accuracy", kr: "정확도", ja: "精度", zh: "准确率" },
+ col_consistency: { en: "consistency", kr: "일관성", ja: "安定性", zh: "稳定性" },
+ col_effcost: { en: "$/solved", kr: "해결당 비용", ja: "$/解決", zh: "$/解决" },
effcost_note: {
en: "expected $ to land one passing result, accounting for retries (cost ÷ per-run pass rate)",
kr: "통과 결과 1개를 얻기까지의 기대 비용 — 재시도 포함(실행당 비용 ÷ 실행당 통과율)",
+ ja: "合格を1つ得るまでの期待コスト — 再試行込み(実行あたりコスト ÷ 実行あたり合格率)",
+ zh: "获得一个通过结果的期望成本 — 含重试(每次运行成本 ÷ 每次运行通过率)",
+ },
+ col_subagents: {
+ en: "subagents",
+ kr: "서브에이전트",
+ ja: "サブエージェント",
+ zh: "子代理",
},
- col_subagents: { en: "subagents", kr: "서브에이전트" },
- col_tokens: { en: "total tok", kr: "총 토큰" },
- col_cost: { en: "cost", kr: "비용" },
- col_wall: { en: "wall", kr: "시간" },
- col_toolcalls: { en: "tool calls", kr: "툴콜" },
- col_perspective: { en: "perspective", kr: "관점" },
- col_value: { en: "value", kr: "값" },
+ col_tokens: { en: "total tok", kr: "총 토큰", ja: "総トークン", zh: "总 token" },
+ col_cost: { en: "cost", kr: "비용", ja: "コスト", zh: "成本" },
+ col_wall: { en: "wall", kr: "시간", ja: "時間", zh: "耗时" },
+ col_toolcalls: { en: "tool calls", kr: "툴콜", ja: "ツール呼び出し", zh: "工具调用" },
+ col_perspective: { en: "perspective", kr: "관점", ja: "観点", zh: "视角" },
+ col_value: { en: "value", kr: "값", ja: "値", zh: "数值" },
};
export function normalizeLang(input: string | undefined | null): Lang {
@@ -114,6 +245,8 @@ export function normalizeLang(input: string | undefined | null): Lang {
const s = input.trim().toLowerCase();
if (["en", "english", "eng"].includes(s)) return "en";
if (["kr", "ko", "korean", "kor", "한국어"].includes(s)) return "kr";
+ if (["ja", "jp", "japanese", "jpn", "日本語"].includes(s)) return "ja";
+ if (["zh", "cn", "chinese", "zh-cn", "zh-tw", "中文", "汉语", "漢語"].includes(s)) return "zh";
return "kr"; // 미상 → 기본 kr
}
@@ -121,7 +254,7 @@ export function tr(lang: Lang, key: string, fmt?: Record<string, string | number
const entry = STRINGS[key];
let s: string;
if (!entry) s = key;
- else s = entry[lang] ?? entry.kr ?? key; // 누락 키는 kr 폴백
+ else s = entry[lang] ?? entry.en ?? entry.kr ?? key; // 누락 키는 en → kr 폴백
if (fmt) {
for (const [k, v] of Object.entries(fmt)) {
s = s.replaceAll(`{${k}}`, String(v));
diff --git a/src/metrics.ts b/src/metrics.ts
index 0327ef8..7b8d994 100644
--- a/src/metrics.ts
+++ b/src/metrics.ts
@@ -73,11 +73,11 @@ function aggregateCost(results: RunResult[]): {
} {
const actuals = results.map((r) => r.costUsd).filter((c): c is number => c !== null);
const ests = results.map((r) => r.estimatedCostUsd).filter((c): c is number => c !== null);
- const sources = new Set(results.map((r) => r.costSource));
+ // 라벨은 실제 보고되는 값에서 도출 — costUsd:null 인데 costSource:"estimated" 같은 모순 방지.
let costSource: CostSource;
- if (sources.size === 1 && sources.has("none")) costSource = "none";
- else if (sources.has("actual")) costSource = "actual";
- else costSource = "estimated";
+ if (actuals.length) costSource = "actual";
+ else if (ests.length) costSource = "estimated";
+ else costSource = "none";
return {
costUsd: actuals.length ? round4(mean(actuals)) : null,
estimatedCostUsd: ests.length ? round4(mean(ests)) : null,
diff --git a/src/models.ts b/src/models.ts
index 31243ea..0105790 100644
--- a/src/models.ts
+++ b/src/models.ts
@@ -10,7 +10,7 @@ import { z } from "zod";
// 'open' = OpenRouter-hosted models (Qwen, GLM, DeepSeek, Kimi, …; incl. free tier),
// usable by model-agnostic agents (opencode/openclaw/hermes).
export type Family = "claude" | "gpt" | "open";
-export type Lang = "en" | "kr";
+export type Lang = "en" | "kr" | "ja" | "zh";
export type CostSource = "actual" | "estimated" | "none";
export type EventKind = "assistant" | "tool_use" | "subagent" | "result";
export type Status = "success" | "fail";
@@ -193,6 +193,7 @@ export interface RunOptions {
view?: ViewMode; // 시각화 전달 모드 (PRD v2 §W2)
port?: number; // serve 모드 포트
failRate?: number; // mock 전용 (테스트)
+ goal?: string; // 사용자가 밝힌 목표 — meta.json 에 기록되고 report 헤더에 표시
}
export type ViewMode = "inline" | "open" | "serve" | "term";
diff --git a/src/orchestrator.ts b/src/orchestrator.ts
index a280666..31671dd 100644
--- a/src/orchestrator.ts
+++ b/src/orchestrator.ts
@@ -222,6 +222,7 @@ export async function execute(opts: RunOptions): Promise<ExecuteResult> {
createdAt: new Date().toISOString(),
language: opts.language,
mock: anyMock,
+ goal: opts.goal,
});
// report + graph
@@ -237,6 +238,7 @@ export async function execute(opts: RunOptions): Promise<ExecuteResult> {
judge: judge !== null,
score: opts.score,
mock: anyMock,
+ goal: opts.goal,
},
recorder.reportPath,
);
diff --git a/src/preflight.ts b/src/preflight.ts
index 881afe9..b7ee1ea 100644
--- a/src/preflight.ts
+++ b/src/preflight.ts
@@ -1,3 +1,4 @@
+import { isLocalBench, taskIds } from "./benches/index";
import { isKnownModel, modelFamily } from "./config";
import { codexHomeStatus, harnessStatus } from "./harness";
/**
@@ -60,7 +61,17 @@ export function analyze(
}
const isReal = opts.runner !== "mock";
- const scale = valid.length * Math.max(0, opts.tasks) * Math.max(1, opts.runs);
+ // 실제 실행 규모 = 요청 task 수가 아니라 카탈로그로 클램프된 subset 크기(게이트 과대평가 방지).
+ let effTasks = Math.max(0, opts.tasks);
+ if (isLocalBench(opts.bench)) {
+ try {
+ effTasks = Math.min(effTasks, taskIds(opts.bench).length);
+ } catch {
+ // 카탈로그 로드 실패 → 요청값 유지(경고는 실행 시점에)
+ }
+ }
+ if (effTasks === 0) warnings.push("0 tasks selected — the run would be empty");
+ const scale = valid.length * effTasks * Math.max(1, opts.runs);
const gateBlocked = isReal && scale > REAL_GATE && !opts.yes;
return { valid, excluded, warnings, scale, isReal, gateBlocked };
diff --git a/src/recorder.ts b/src/recorder.ts
index dd5799a..6a8ef26 100644
--- a/src/recorder.ts
+++ b/src/recorder.ts
@@ -25,15 +25,26 @@ export interface RunMeta {
createdAt: string;
language: Lang;
mock: boolean;
+ goal?: string; // 사용자가 세션/CLI 에서 밝힌 목표 — run 의 의도를 기록
}
+// 밀리초 해상도 충돌 방지 — 같은 ms 에 두 번 만들어지면 -2, -3 … 접미사(런 디렉터리 덮어쓰기 방지).
+let lastBaseId = "";
+let dupSeq = 1;
+
export function makeRunId(date = new Date()): string {
const p = (n: number, w = 2) => String(n).padStart(w, "0");
- return (
+ const base =
`${date.getUTCFullYear()}${p(date.getUTCMonth() + 1)}${p(date.getUTCDate())}-` +
`${p(date.getUTCHours())}${p(date.getUTCMinutes())}${p(date.getUTCSeconds())}-` +
- `${p(date.getUTCMilliseconds(), 3)}`
- );
+ `${p(date.getUTCMilliseconds(), 3)}`;
+ if (base === lastBaseId) {
+ dupSeq += 1;
+ return `${base}-${dupSeq}`;
+ }
+ lastBaseId = base;
+ dupSeq = 1;
+ return base;
}
function safe(s: string): string {
diff --git a/src/report.ts b/src/report.ts
index 64d7e81..85ff4fc 100644
--- a/src/report.ts
+++ b/src/report.ts
@@ -26,6 +26,7 @@ export interface ReportInput {
judge: boolean;
score: boolean;
mock: boolean;
+ goal?: string;
}
const COST_MARK = { actual: "✓", estimated: "~", none: "" } as const;
@@ -636,6 +637,7 @@ th{background:#1c1f24;color:var(--foam);font-weight:600;letter-spacing:.03em}
.hero .meta{display:flex;flex-direction:column;gap:3px}
.hero .tag{font-size:13px;color:var(--mist)}
.hero .bench{color:var(--foam);font-family:ui-monospace,monospace;font-size:12px}
+.hero .goal{color:var(--rope);font-size:12px}
/* tabs (CSS-only via radio :checked) */
.tabs input{position:absolute;opacity:0;pointer-events:none}
.tabnav{display:flex;gap:4px;background:var(--seaDeep);padding:0 24px;border-bottom:1px solid var(--grid)}
@@ -686,7 +688,11 @@ th{background:#1c1f24;color:var(--foam);font-weight:600;letter-spacing:.03em}
.foot{margin:34px 0 8px;padding-top:14px;border-top:1px solid var(--grid);color:var(--mist);font-size:12px;font-style:italic}
${DETAILS_CSS}
</style></head><body>
-<header class="hero">${svgWordmark()}<div class="meta"><span class="tag">${esc(tr(lang, "app_tagline"))}</span><span class="bench">bench: ${esc(input.bench)}</span></div></header>
+<header class="hero">${svgWordmark()}<div class="meta"><span class="tag">${esc(tr(lang, "app_tagline"))}</span><span class="bench">bench: ${esc(input.bench)}</span>${
+ input.goal
+ ? `<span class="goal">◈ ${esc(tr(lang, "goal_label"))}: ${esc(input.goal)}</span>`
+ : ""
+ }</div></header>
<form class="tabs">
<input type="radio" name="tab" id="t-decide" checked>
<input type="radio" name="tab" id="t-detail">
diff --git a/src/session.ts b/src/session.ts
index db9302e..b22f075 100644
--- a/src/session.ts
+++ b/src/session.ts
@@ -157,7 +157,7 @@ const HELP = [
` ${pc.cyan("/bench")} <name> ${listLocalBenches().join(",")} | terminal-bench-v2`,
` ${pc.cyan("/runs")} ${pc.cyan("/tasks")} ${pc.cyan("/seed")} <n> sweep size`,
` ${pc.cyan("/runner")} <name> auto|mock|cc|codex|opencode|openclaw|hermes|tb`,
- ` ${pc.cyan("/judge")} <name> ${pc.cyan("/score")} on|off ${pc.cyan("/lang")} en|kr`,
+ ` ${pc.cyan("/judge")} <name> ${pc.cyan("/score")} on|off ${pc.cyan("/lang")} en|kr|ja|zh`,
` ${pc.cyan("/run")} run the comparison → table + report.html`,
` ${pc.cyan("/view")} [open] serve every recorded trace at localhost`,
` ${pc.cyan("/config")} ${pc.cyan("/clear")} ${pc.cyan("/help")} ${pc.cyan("/exit")}`,
@@ -314,6 +314,7 @@ function toRunOptions(s: SessionState): RunOptions {
language: s.language,
view: "inline",
port: s.port,
+ goal: s.goal || undefined,
};
}