pleumrouter 0.3.1 → 0.4.0

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.
@@ -0,0 +1,261 @@
1
+ // 한국어 사전 — 키는 영어 원문(placeholders는 {name} 형태로 보존).
2
+ // 값은 i18n 도입 전 이 CLI가 실제로 출력하던 원문 한국어 그대로다.
3
+ export const KO = {
4
+ // config.mjs
5
+ "Login required. Run this first:\n pleum login": "로그인이 필요합니다. 먼저 실행하세요:\n pleum login",
6
+
7
+ // launch.mjs
8
+ "Usage: pleum launch <tool> [--model id] [-- tool args]\n": "사용법: pleum launch <tool> [--model id] [-- 도구인자]\n",
9
+ "Auto-run:": "자동 실행:",
10
+ "✓ installed": "✓ 설치됨",
11
+ "✗ not installed —": "✗ 미설치 —",
12
+ "Manual setup (needs a provider definition file):": "설정 안내(provider 정의 파일 필요):",
13
+ "Example: pleum launch claude --model claude-sonnet-4": "예: pleum launch claude --model claude-sonnet-4",
14
+ "Unsupported tool: {tool}": "지원하지 않는 도구: {tool}",
15
+ "Manual setup:": "설정 안내:",
16
+ "Running {label}: {cmd}": "{label} 실행: {cmd}",
17
+ "'{bin}' not found. Install:\n {install}": "'{bin}'를 찾을 수 없습니다. 설치:\n {install}",
18
+ "{label} needs a provider definition in a file, so this only shows setup — it won't auto-run.":
19
+ "{label}는 provider 정의가 파일에 필요해 자동 실행 대신 설정만 안내합니다.",
20
+ "1) Add to {file}:": "1) {file} 에 추가:",
21
+ "2) Export the key and run:": "2) 키 export 후 실행:",
22
+
23
+ // login.mjs
24
+ "State mismatch or missing key": "state 불일치 또는 키 누락",
25
+ "Log in from your browser. If it doesn't open automatically, open this URL:":
26
+ "브라우저에서 로그인하세요. 자동으로 안 열리면 아래 URL을 여세요:",
27
+ "Login timed out (2 minutes)": "로그인 시간 초과(2분)",
28
+ "Logged in. Saved the key to ~/.pleum/config.json.": "로그인 완료. 키를 ~/.pleum/config.json 에 저장했습니다.",
29
+ "Failed to issue a device code (server responded {status})": "device code 발급 실패 (서버 응답 {status})",
30
+ "Code": "코드",
31
+ "Log in at the URL above, then enter the code (within {min} min).": "위 URL에서 로그인 후 코드를 입력하세요 ({min}분 내).",
32
+ "The code has expired.": "코드가 만료되었습니다.",
33
+ "Error:": "오류:",
34
+ "Timed out: the code has expired.": "시간 초과: 코드가 만료되었습니다.",
35
+
36
+ // recipes.mjs
37
+ "Goose sets its model in its own config — use the openai/<id> format in `goose configure`.":
38
+ "Goose는 모델을 설정에서 지정합니다 — `goose configure`에서 openai/<id> 형식 사용.",
39
+ "For OpenHands, prefix the model name with openai/ in its config.": "OpenHands는 모델명 앞에 openai/ 접두사를 붙여 설정하세요.",
40
+ "Generates a temporary PleumRouter provider config for this run only — your own opencode.json is untouched.":
41
+ "이번 실행에만 쓰이는 임시 PleumRouter provider 설정을 생성합니다 — 기존 opencode.json은 건드리지 않습니다.",
42
+ "Needs the Bun runtime (bun >= 1.3.14) on PATH. Only Claude-family models are routed via env vars.":
43
+ "PATH에 Bun 런타임(bun >= 1.3.14)이 필요합니다. env var로 라우팅되는 건 Claude 계열 모델뿐입니다.",
44
+ "Pick the model after it starts with the `hermes model` command.": "실행 후 `hermes model` 명령으로 모델을 선택하세요.",
45
+ "Needs GitHub Copilot CLI 2026-04 or later for BYOK provider routing support.":
46
+ "BYOK provider 라우팅을 지원하는 2026-04 이후 버전의 GitHub Copilot CLI가 필요합니다.",
47
+
48
+ // completion.mjs
49
+ "Usage: pleum completion <zsh|bash>": "사용법: pleum completion <zsh|bash>",
50
+ "or add to ~/.zshrc": "또는 ~/.zshrc에 추가",
51
+ "or add to ~/.bashrc": "또는 ~/.bashrc에 추가",
52
+ "or add _pleum to fpath": "또는 fpath에 _pleum로 추가",
53
+
54
+ // models.mjs
55
+ "Failed to fetch model list ({status})": "모델 목록 조회 실패 ({status})",
56
+ "Usage: pleum models <model-id> --info": "사용법: pleum models <model-id> --info",
57
+ "No matching models": "일치하는 모델 없음",
58
+ "price = per 1M tokens (display rate; actual billing may vary slightly with the intraday rate)":
59
+ "가격=토큰 1M당(표시환율 기준, 실청구는 장중 환율로 소폭 상이)",
60
+ "Model not found: {id} (list: pleum models)": "모델을 찾을 수 없음: {id} (목록: pleum models)",
61
+ "Failed to fetch model detail ({status})": "모델 상세 조회 실패 ({status})",
62
+ "price/1M": "가격/1M",
63
+ "in": "입력",
64
+ "out": "출력",
65
+ "(incl. {pct}% markup)": "(마크업 {pct}% 포함)",
66
+ "forced (can't be turned off)": "강제(끌 수 없음)",
67
+ "supported": "지원",
68
+ "usage": "사용량",
69
+ "weekly": "주간",
70
+ "total": "누적",
71
+ "Same provider:": "같은 제공자:",
72
+
73
+ // top.mjs
74
+ "period must be one of daily|weekly|monthly: {period}": "period는 daily|weekly|monthly 중 하나: {period}",
75
+ "daily": "일간",
76
+ "monthly": "월간",
77
+ "Model leaderboard": "모델 리더보드",
78
+ "tokens": "토큰",
79
+ "No data": "데이터 없음",
80
+ "Provider share": "제공자 점유율",
81
+ "Failed to fetch leaderboard ({status})": "리더보드 조회 실패 ({status})",
82
+
83
+ // usage.mjs
84
+ "--by must be one of {groups}: {by}": "--by 는 {groups} 중 하나: {by}",
85
+ "--days must be an integer 1-365: {days}": "--days 는 1~365 정수: {days}",
86
+ "by model": "모델별",
87
+ "by provider": "제공자별",
88
+ "by key": "키별",
89
+ "by day": "일별",
90
+ "Usage": "사용량",
91
+ "last {days} days": "최근 {days}일",
92
+ "No usage history": "사용 내역 없음",
93
+ "Total": "합계",
94
+ "This API key doesn't have usage:read permission.": "이 API 키에는 usage:read 권한이 없습니다.",
95
+ "Run pleum login again to get a new key (recent keys include it by default).":
96
+ "pleum login 을 다시 실행해 새 키를 발급받으세요 (최신 키에는 기본 포함).",
97
+ "Failed to fetch usage ({status})": "사용량 조회 실패 ({status})",
98
+
99
+ // balance.mjs
100
+ "Failed to check balance (HTTP {status})": "잔액 조회 실패 (HTTP {status})",
101
+ "The server may not support API-key balance checks yet, or the key may have expired — try pleum login again.":
102
+ "서버가 아직 API 키 잔액 조회를 지원하지 않거나 키가 만료됐을 수 있습니다 — pleum login 재시도.",
103
+ "Balance:": "잔액:",
104
+ "Balance is below the auto-charge threshold ({threshold} PLM).": "잔액이 자동충전 임계값({threshold} PLM) 아래입니다.",
105
+
106
+ // health.mjs
107
+ "Gateway connection failed: {error}": "게이트웨이 연결 실패: {error}",
108
+ "Gateway": "게이트웨이",
109
+ "healthy": "정상",
110
+ "{n} providers configured": "providers {n}개 구성됨",
111
+ "FX rate USD/KRW {rate}{src}": "환율 USD/KRW {rate}{src}",
112
+ "Logged in": "로그인됨",
113
+ "key": "키",
114
+ "Not logged in": "로그인 안 됨",
115
+
116
+ // interactive.mjs
117
+ "Select": "선택",
118
+ "type to filter · ↑↓ move · Enter select · Esc cancel": "타이핑=필터 · ↑↓=이동 · Enter=선택 · Esc=취소",
119
+ "… {n} more — type to narrow down": "… {n}개 더 — 타이핑으로 좁히기",
120
+ "No matches": "일치 없음",
121
+
122
+ // lang.mjs
123
+ "Unsupported language: {code}\n Available: {list}": "지원하지 않는 언어: {code}\n 사용 가능: {list}",
124
+ "Language set to {name}": "언어를 {name}(으)로 설정했습니다.",
125
+ "current": "현재",
126
+ "Choose a language": "언어 선택",
127
+ "Current language: {name}": "현재 언어: {name}",
128
+ "Available: {list}": "사용 가능: {list}",
129
+
130
+ // menu.mjs
131
+ "Anthropic's coding agent — supports subagents": "Anthropic 코딩 에이전트 — 서브에이전트 지원",
132
+ "OpenAI's coding agent": "OpenAI 코딩 에이전트",
133
+ "Terminal pair programming": "터미널 페어 프로그래밍",
134
+ "Block's local-first agent": "Block의 로컬 우선 에이전트",
135
+ "Autonomous dev agent": "자율 개발 에이전트",
136
+ "Multi-provider terminal coding agent": "멀티 provider 터미널 코딩 에이전트",
137
+ "Bun-based coding agent — Claude routing only": "Bun 기반 코딩 에이전트 — Claude 라우팅만 지원",
138
+ "Nous Research's general-purpose agent": "Nous Research의 범용 에이전트",
139
+ "Alibaba's terminal coding agent": "Alibaba의 터미널 코딩 에이전트",
140
+ "GitHub's terminal coding agent": "GitHub의 터미널 코딩 에이전트",
141
+ "Log in": "로그인",
142
+ "Log in via browser and save the API key": "브라우저로 로그인하고 API 키를 저장합니다",
143
+ "Chat with a model": "모델과 채팅",
144
+ "Start an interactive chat": "대화형 채팅을 시작합니다",
145
+ "model": "모델",
146
+ "Run an agent": "에이전트 실행",
147
+ "Pick a coding agent to run through PleumRouter": "PleumRouter로 실행할 코딩 에이전트 선택",
148
+ "Run an agent via PleumRouter": "PleumRouter로 에이전트 실행",
149
+ "install": "설치",
150
+ "not installed": "미설치",
151
+ "setup required": "설정 필요",
152
+ "Installed — press Enter for the {file} setup snippet": "설치됨 — Enter로 {file} 설정 스니펫 보기",
153
+ "Press Enter to install now": "Enter로 바로 설치",
154
+ "Manual install:": "수동 설치:",
155
+ "Model list": "모델 목록",
156
+ "All models — price and context included": "전체 모델 — 가격·컨텍스트 포함",
157
+ "Leaderboard": "리더보드",
158
+ "Model rankings · provider share": "모델 랭킹·제공자 점유율",
159
+ "Usage report": "지출 리포트",
160
+ "Spend over the last 30 days": "최근 30일 내 지출",
161
+ "Balance": "잔액",
162
+ "Check your credit balance": "크레딧 잔액 조회",
163
+ "Health check": "상태 점검",
164
+ "Gateway connectivity · login status": "게이트웨이 연결·로그인 상태",
165
+ "Failed to fetch model list: {error}": "모델 목록 조회 실패: {error}",
166
+ "select a model": "모델 선택",
167
+ "{label} needs manual installation:": "{label}는 수동 설치가 필요합니다:",
168
+ "{label} isn't installed. Install it now? [Y/n] ": "{label}가 설치되어 있지 않습니다. 지금 설치할까요? [Y/n] ",
169
+ "Install canceled — manual install: {install}": "설치 취소 — 수동 설치: {install}",
170
+ "Install failed (exit {code})": "설치 실패 (exit {code})",
171
+ "{label} installed": "{label} 설치 완료",
172
+ "↑/↓ move • enter run • → set model • esc quit": "↑/↓ 이동 • enter 실행 • → 모델 설정 • esc 종료",
173
+ "↑/↓ move • enter run • → set model • esc back": "↑/↓ 이동 • enter 실행 • → 모델 설정 • esc 뒤로",
174
+
175
+ // run.mjs
176
+ [`Specify a model: pleum run <model> ["prompt"] (model selection isn't available on non-interactive stdin)`]:
177
+ `모델을 지정하세요: pleum run <model> ["프롬프트"] (비대화형 stdin에선 모델 선택 불가)`,
178
+ 'Usage: pleum run <model> ["prompt"]\nModel list: pleum models': '사용법: pleum run <model> ["프롬프트"]\n모델 목록: pleum models',
179
+ "Attaching and uploading {n} local image(s) from the prompt.": "프롬프트의 로컬 이미지 {n}개를 첨부해 업로드합니다.",
180
+ "Goodbye.": "안녕히 가세요.",
181
+ "Ctrl+C again to quit (or /exit)": "한 번 더 Ctrl+C 하면 종료 (/exit 도 가능)",
182
+ '/help for commands · /exit to quit · wrap multi-line input in """ · Ctrl+C to stop generation':
183
+ '/help 명령 · /exit 종료 · 여러 줄은 """ 감싸기 · 생성 중 Ctrl+C=중단',
184
+ [`Commands:
185
+ /help, /? this help
186
+ /clear reset the conversation context (keeps the system prompt)
187
+ /system [text] set the system prompt (no arg shows the current value)
188
+ /model [id] switch models mid-session (no arg = arrow-key picker)
189
+ /models [query] browse the model list
190
+ /save [name] save the current session (default: last)
191
+ /load [name] load a saved session
192
+ /verbose toggle token/speed stats
193
+ /exit, /quit quit
194
+ Multi-line input: a line with """ → body → a line with """
195
+ Images: include an image file path right in the message (e.g. describe this ./shot.png)`]: `명령:
196
+ /help, /? 이 도움말
197
+ /clear 대화 컨텍스트 초기화(시스템 프롬프트는 유지)
198
+ /system [텍스트] 시스템 프롬프트 설정(인자 없으면 현재값 표시)
199
+ /model [id] 세션 유지한 채 모델 전환(인자 없으면 화살표 선택)
200
+ /models [검색어] 모델 목록 보기
201
+ /save [이름] 현재 세션 저장(기본 last)
202
+ /load [이름] 세션 불러오기
203
+ /verbose 토큰·속도 통계 표시 토글
204
+ /exit, /quit 종료
205
+ 여러 줄 입력: """ 한 줄 → 본문 → """ 한 줄
206
+ 이미지: 메시지에 이미지 파일 경로를 그대로 포함(예: 이 그림 설명해줘 ./shot.png)`,
207
+ "Context cleared": "컨텍스트 초기화",
208
+ "System prompt set": "시스템 프롬프트 설정",
209
+ "Current system prompt:": "현재 시스템 프롬프트:",
210
+ "No system prompt": "시스템 프롬프트 없음",
211
+ "Switched model →": "모델 전환 →",
212
+ "Current model:": "현재 모델:",
213
+ "switch: /model <id> · list: /models": "전환: /model <id> · 목록: /models",
214
+ "Session saved:": "세션 저장:",
215
+ "Save failed: {error}": "저장 실패: {error}",
216
+ "Session loaded (model: {model})": "세션 불러옴 (모델: {model})",
217
+ "No such session: {name}": "세션 없음: {name}",
218
+ "Stats {state}": "통계 {state}",
219
+ "on": "켜짐",
220
+ "off": "꺼짐",
221
+ "Unknown command: /{cmd} (/help)": "알 수 없는 명령: /{cmd} (/help)",
222
+ "{model} thinking…": "{model} 생각 중…",
223
+ "⏹ aborted": "⏹ 중단됨",
224
+ "⏹ generation aborted — the partial reply stays in context": "⏹ 생성 중단됨 — 부분 응답은 컨텍스트에 유지",
225
+ "Select a model": "모델 선택",
226
+ "… {n} more — narrow with a search term": "… {n}개 더 — 검색어로 좁히기",
227
+ "Choose a number, or search (Enter to cancel): ": "번호 선택 또는 검색어 (Enter=취소): ",
228
+ "No matches — showing the full list.": "일치 없음 — 전체 목록으로.",
229
+
230
+ // bin/pleum.mjs
231
+ "(no args) interactive launcher menu — keyboard only (TTY only)": "(인자 없음) 인터랙티브 런처 메뉴 — 키보드 전용 (TTY 전용)",
232
+ "Log in via browser + auto-save the key": "브라우저로 로그인 + 키 자동 저장",
233
+ "--device: browser-less environments (SSH/CI)": "--device: 브라우저 없는 환경(SSH·CI)",
234
+ "Delete the saved key": "저장된 키 삭제",
235
+ "Run a coding agent against PleumRouter": "코딩 에이전트를 PleumRouter로 실행",
236
+ "omit the tool to see the supported list and install status": "도구 생략 시 지원 목록·설치 여부 표시",
237
+ "Terminal chat (REPL) / one-shot / pipe": "터미널 채팅(REPL) / 1회 실행 / 파이프",
238
+ "omit the model for an arrow-key picker; /help lists commands": "모델 생략 시 화살표로 선택, /help 로 명령",
239
+ "Model list (price, context included)": "모델 목록(가격·컨텍스트 포함)",
240
+ "Model detail (price, perf, per-provider uptime)": "모델 상세(가격·성능·provider별 uptime)",
241
+ "Model leaderboard · provider share (daily|weekly|monthly)": "모델 리더보드·제공자 점유율(daily|weekly|monthly)",
242
+ "Your spend report (model|provider|api_key|day)": "내 지출 리포트(model|provider|api_key|day)",
243
+ "Check gateway connectivity and login status": "게이트웨이 연결·로그인 상태 점검",
244
+ "Show/change display language (en|ko|ja|zh|es)": "표시 언어 조회/변경 (en|ko|ja|zh|es)",
245
+ "Print a shell completion script": "셸 자동완성 스크립트 출력",
246
+ "Reinstall the latest version": "최신 버전으로 재설치",
247
+ "Print the version": "버전 출력",
248
+ "interactive": "대화형",
249
+ "Summarize in one line: ...": "한 줄로 요약: ...",
250
+ "one-shot": "1회 실행",
251
+ "what caused this?": "원인은?",
252
+ "pipe": "파이프",
253
+ "model detail": "모델 상세",
254
+ "last 7 days, by day": "최근 1주 일별 지출",
255
+ "SSH/CI environment": "SSH/CI 환경",
256
+ "PleumRouter terminal CLI": "PleumRouter 터미널 CLI",
257
+ "Examples:": "예:",
258
+ "Override base_url: PLEUM_BASE_URL environment variable": "base_url 덮어쓰기: PLEUM_BASE_URL 환경변수",
259
+ "Logged out": "로그아웃됨",
260
+ "Unknown command: {cmd}": "알 수 없는 명령: {cmd}",
261
+ };
@@ -0,0 +1,201 @@
1
+ // 中文词典 — 键为英文原文(占位符保持 {name} 格式)。
2
+ export const ZH = {
3
+ "'{bin}' not found. Install:\n {install}": "未找到 '{bin}'。安装:\n {install}",
4
+ "(incl. {pct}% markup)": "(含 {pct}% 加价)",
5
+ "(no args) interactive launcher menu — keyboard only (TTY only)": "(无参数)交互式启动菜单 — 仅键盘操作(仅限 TTY)",
6
+ "--by must be one of {groups}: {by}": "--by 必须是 {groups} 之一:{by}",
7
+ "--days must be an integer 1-365: {days}": "--days 必须是 1-365 之间的整数:{days}",
8
+ "--device: browser-less environments (SSH/CI)": "--device:无浏览器环境(SSH/CI)",
9
+ "/help for commands · /exit to quit · wrap multi-line input in \"\"\" · Ctrl+C to stop generation": "/help 查看命令 · /exit 退出 · 多行输入用 \"\"\" 包裹 · Ctrl+C 停止生成",
10
+ "1) Add to {file}:": "1) 添加到 {file}:",
11
+ "2) Export the key and run:": "2) 导出密钥并运行:",
12
+ "All models — price and context included": "所有模型 — 含价格与上下文",
13
+ "Anthropic's coding agent — supports subagents": "Anthropic 的编程代理 — 支持子代理",
14
+ "Attaching and uploading {n} local image(s) from the prompt.": "正在附加并上传提示中的 {n} 张本地图片。",
15
+ "Auto-run:": "自动运行:",
16
+ "Autonomous dev agent": "自主开发代理",
17
+ "Multi-provider terminal coding agent": "多提供商终端编程代理",
18
+ "Bun-based coding agent — Claude routing only": "基于 Bun 的编程代理 — 仅支持 Claude 路由",
19
+ "Nous Research's general-purpose agent": "Nous Research 的通用代理",
20
+ "Alibaba's terminal coding agent": "阿里巴巴的终端编程代理",
21
+ "GitHub's terminal coding agent": "GitHub 的终端编程代理",
22
+ "Available: {list}": "可用:{list}",
23
+ "Balance": "余额",
24
+ "Balance is below the auto-charge threshold ({threshold} PLM).": "余额低于自动充值阈值({threshold} PLM)。",
25
+ "Balance:": "余额:",
26
+ "Block's local-first agent": "Block 的本地优先代理",
27
+ "Chat with a model": "与模型对话",
28
+ "Check gateway connectivity and login status": "检查网关连通性与登录状态",
29
+ "Check your credit balance": "查询你的额度余额",
30
+ "Choose a language": "选择语言",
31
+ "Choose a number, or search (Enter to cancel): ": "选择编号,或搜索(Enter 取消): ",
32
+ "Code": "代码",
33
+ "Commands:\n /help, /? this help\n /clear reset the conversation context (keeps the system prompt)\n /system [text] set the system prompt (no arg shows the current value)\n /model [id] switch models mid-session (no arg = arrow-key picker)\n /models [query] browse the model list\n /save [name] save the current session (default: last)\n /load [name] load a saved session\n /verbose toggle token/speed stats\n /exit, /quit quit\n Multi-line input: a line with \"\"\" → body → a line with \"\"\"\n Images: include an image file path right in the message (e.g. describe this ./shot.png)": "命令:\n /help, /? 本帮助\n /clear 重置对话上下文(保留系统提示词)\n /system [text] 设置系统提示词(不带参数则显示当前值)\n /model [id] 会话中途切换模型(不带参数 = 方向键选择器)\n /models [query] 浏览模型列表\n /save [name] 保存当前会话(默认:last)\n /load [name] 加载已保存的会话\n /verbose 切换 token/速度统计\n /exit, /quit 退出\n 多行输入:一行 \"\"\" → 正文 → 一行 \"\"\"\n 图片:在消息中直接包含图片文件路径(例如 describe this ./shot.png)",
34
+ "Context cleared": "上下文已清除",
35
+ "Ctrl+C again to quit (or /exit)": "再次按 Ctrl+C 退出(或 /exit)",
36
+ "Current language: {name}": "当前语言:{name}",
37
+ "Current model:": "当前模型:",
38
+ "Current system prompt:": "当前系统提示词:",
39
+ "Delete the saved key": "删除已保存的密钥",
40
+ "Error:": "错误:",
41
+ "Example: pleum launch claude --model claude-sonnet-4": "示例:pleum launch claude --model claude-sonnet-4",
42
+ "Examples:": "示例:",
43
+ "FX rate USD/KRW {rate}{src}": "汇率 USD/KRW {rate}{src}",
44
+ "Failed to check balance (HTTP {status})": "查询余额失败(HTTP {status})",
45
+ "Failed to fetch leaderboard ({status})": "获取排行榜失败({status})",
46
+ "Failed to fetch model detail ({status})": "获取模型详情失败({status})",
47
+ "Failed to fetch model list ({status})": "获取模型列表失败({status})",
48
+ "Failed to fetch model list: {error}": "获取模型列表失败:{error}",
49
+ "Failed to fetch usage ({status})": "获取用量失败({status})",
50
+ "Failed to issue a device code (server responded {status})": "获取设备代码失败(服务器返回 {status})",
51
+ "For OpenHands, prefix the model name with openai/ in its config.": "对于 OpenHands,需在其配置中为模型名添加 openai/ 前缀。",
52
+ "Generates a temporary PleumRouter provider config for this run only — your own opencode.json is untouched.":
53
+ "仅为本次运行生成临时的 PleumRouter provider 配置 — 不会修改你自己的 opencode.json。",
54
+ "Needs the Bun runtime (bun >= 1.3.14) on PATH. Only Claude-family models are routed via env vars.":
55
+ "PATH 中需要 Bun 运行时(bun >= 1.3.14)。仅 Claude 系列模型通过环境变量路由。",
56
+ "Pick the model after it starts with the `hermes model` command.": "启动后使用 `hermes model` 命令选择模型。",
57
+ "Needs GitHub Copilot CLI 2026-04 or later for BYOK provider routing support.":
58
+ "需要 2026-04 或更新版本的 GitHub Copilot CLI 才支持 BYOK provider 路由。",
59
+ "Gateway": "网关",
60
+ "Gateway connection failed: {error}": "网关连接失败:{error}",
61
+ "Gateway connectivity · login status": "网关连通性 · 登录状态",
62
+ "Goodbye.": "再见。",
63
+ "Goose sets its model in its own config — use the openai/<id> format in `goose configure`.": "Goose 在自己的配置中设置模型 — 在 `goose configure` 中使用 openai/<id> 格式。",
64
+ "Health check": "健康检查",
65
+ "Install canceled — manual install: {install}": "安装已取消 — 手动安装:{install}",
66
+ "Install failed (exit {code})": "安装失败(退出码 {code})",
67
+ "Language set to {name}": "语言已设置为 {name}",
68
+ "Leaderboard": "排行榜",
69
+ "Log in": "登录",
70
+ "Log in at the URL above, then enter the code (within {min} min).": "在上方 URL 登录,然后输入代码({min} 分钟内有效)。",
71
+ "Log in from your browser. If it doesn't open automatically, open this URL:": "在浏览器中登录。如果没有自动打开,请手动打开此 URL:",
72
+ "Log in via browser + auto-save the key": "通过浏览器登录 + 自动保存密钥",
73
+ "Log in via browser and save the API key": "通过浏览器登录并保存 API 密钥",
74
+ "Logged in": "已登录",
75
+ "Logged in. Saved the key to ~/.pleum/config.json.": "已登录。密钥已保存至 ~/.pleum/config.json。",
76
+ "Logged out": "已登出",
77
+ "Login required. Run this first:\n pleum login": "需要登录。请先运行:\n pleum login",
78
+ "Login timed out (2 minutes)": "登录超时(2 分钟)",
79
+ "Manual install:": "手动安装:",
80
+ "Manual setup (needs a provider definition file):": "手动设置(需要提供商定义文件):",
81
+ "Manual setup:": "手动设置:",
82
+ "Model detail (price, perf, per-provider uptime)": "模型详情(价格、性能、各提供商可用率)",
83
+ "Model leaderboard": "模型排行榜",
84
+ "Model leaderboard · provider share (daily|weekly|monthly)": "模型排行榜 · 提供商份额(daily|weekly|monthly)",
85
+ "Model list": "模型列表",
86
+ "Model list (price, context included)": "模型列表(含价格与上下文)",
87
+ "Model not found: {id} (list: pleum models)": "未找到模型:{id} (列表:pleum models)",
88
+ "Model rankings · provider share": "模型排名 · 提供商份额",
89
+ "No data": "暂无数据",
90
+ "No matches": "无匹配项",
91
+ "No matches — showing the full list.": "无匹配项 — 显示完整列表。",
92
+ "No matching models": "无匹配模型",
93
+ "No such session: {name}": "无此会话:{name}",
94
+ "No system prompt": "无系统提示词",
95
+ "No usage history": "无用量记录",
96
+ "Not logged in": "未登录",
97
+ "OpenAI's coding agent": "OpenAI 的编程代理",
98
+ "Run an agent": "运行代理",
99
+ "Pick a coding agent to run through PleumRouter": "选择要通过 PleumRouter 运行的编程代理",
100
+ "Run an agent via PleumRouter": "通过 PleumRouter 运行代理",
101
+ "setup required": "需要设置",
102
+ "Installed — press Enter for the {file} setup snippet": "已安装 — 按 Enter 查看 {file} 设置片段",
103
+ "Override base_url: PLEUM_BASE_URL environment variable": "覆盖 base_url:PLEUM_BASE_URL 环境变量",
104
+ "PleumRouter terminal CLI": "PleumRouter 终端 CLI",
105
+ "Press Enter to install now": "按 Enter 立即安装",
106
+ "Print a shell completion script": "输出 shell 自动补全脚本",
107
+ "Print the version": "输出版本号",
108
+ "Provider share": "提供商份额",
109
+ "Reinstall the latest version": "重新安装最新版本",
110
+ "Run a coding agent against PleumRouter": "通过 PleumRouter 运行编程代理",
111
+ "Run pleum login again to get a new key (recent keys include it by default).": "再次运行 pleum login 获取新密钥(近期签发的密钥默认已包含该权限)。",
112
+ "Running {label}: {cmd}": "正在运行 {label}:{cmd}",
113
+ "SSH/CI environment": "SSH/CI 环境",
114
+ "Same provider:": "同一提供商:",
115
+ "Save failed: {error}": "保存失败:{error}",
116
+ "Select": "选择",
117
+ "Select a model": "选择模型",
118
+ "Session loaded (model: {model})": "会话已加载(模型:{model})",
119
+ "Session saved:": "会话已保存:",
120
+ "Show/change display language (en|ko|ja|zh|es)": "显示/更改界面语言(en|ko|ja|zh|es)",
121
+ "Specify a model: pleum run <model> [\"prompt\"] (model selection isn't available on non-interactive stdin)": "请指定模型:pleum run <model> [\"prompt\"] (非交互式 stdin 下无法选择模型)",
122
+ "Spend over the last 30 days": "最近 30 天的花费",
123
+ "Start an interactive chat": "开始交互式对话",
124
+ "State mismatch or missing key": "状态不匹配或缺少密钥",
125
+ "Stats {state}": "统计:{state}",
126
+ "Summarize in one line: ...": "用一句话总结:...",
127
+ "Switched model →": "已切换模型 →",
128
+ "System prompt set": "系统提示词已设置",
129
+ "Terminal chat (REPL) / one-shot / pipe": "终端对话(REPL)/ 单次 / 管道",
130
+ "Terminal pair programming": "终端结对编程",
131
+ "The code has expired.": "代码已过期。",
132
+ "The server may not support API-key balance checks yet, or the key may have expired — try pleum login again.": "服务器可能尚不支持 API 密钥余额查询,或密钥已过期 — 请重新运行 pleum login。",
133
+ "This API key doesn't have usage:read permission.": "此 API 密钥没有 usage:read 权限。",
134
+ "Timed out: the code has expired.": "已超时:代码已过期。",
135
+ "Total": "总计",
136
+ "Unknown command: /{cmd} (/help)": "未知命令:/{cmd} (/help)",
137
+ "Unknown command: {cmd}": "未知命令:{cmd}",
138
+ "Unsupported language: {code}\n Available: {list}": "不支持的语言:{code}\n 可用:{list}",
139
+ "Unsupported tool: {tool}": "不支持的工具:{tool}",
140
+ "Usage": "用量",
141
+ "Usage report": "用量报告",
142
+ "Usage: pleum completion <zsh|bash>": "用法:pleum completion <zsh|bash>",
143
+ "Usage: pleum launch <tool> [--model id] [-- tool args]\n": "用法:pleum launch <tool> [--model id] [-- tool args]\n",
144
+ "Usage: pleum models <model-id> --info": "用法:pleum models <model-id> --info",
145
+ "Usage: pleum run <model> [\"prompt\"]\nModel list: pleum models": "用法:pleum run <model> [\"prompt\"]\n模型列表:pleum models",
146
+ "Your spend report (model|provider|api_key|day)": "你的花费报告(model|provider|api_key|day)",
147
+ "by day": "按天",
148
+ "by key": "按密钥",
149
+ "by model": "按模型",
150
+ "by provider": "按提供商",
151
+ "current": "当前",
152
+ "daily": "每日",
153
+ "forced (can't be turned off)": "强制(无法关闭)",
154
+ "healthy": "健康",
155
+ "in": "输入",
156
+ "install": "安装",
157
+ "interactive": "交互式",
158
+ "key": "密钥",
159
+ "last 7 days, by day": "最近 7 天,按天",
160
+ "last {days} days": "最近 {days} 天",
161
+ "model": "模型",
162
+ "model detail": "模型详情",
163
+ "monthly": "每月",
164
+ "not installed": "未安装",
165
+ "off": "关闭",
166
+ "omit the model for an arrow-key picker; /help lists commands": "省略模型以使用方向键选择器;/help 列出所有命令",
167
+ "omit the tool to see the supported list and install status": "省略工具名以查看支持列表与安装状态",
168
+ "on": "开启",
169
+ "one-shot": "单次",
170
+ "or add _pleum to fpath": "或将 _pleum 添加到 fpath",
171
+ "or add to ~/.bashrc": "或添加到 ~/.bashrc",
172
+ "or add to ~/.zshrc": "或添加到 ~/.zshrc",
173
+ "out": "输出",
174
+ "period must be one of daily|weekly|monthly: {period}": "period 必须是 daily|weekly|monthly 之一:{period}",
175
+ "pipe": "管道",
176
+ "price = per 1M tokens (display rate; actual billing may vary slightly with the intraday rate)": "价格 = 每 1M tokens(显示汇率;实际计费可能随盘中汇率略有浮动)",
177
+ "price/1M": "价格/1M",
178
+ "select a model": "选择模型",
179
+ "supported": "支持",
180
+ "switch: /model <id> · list: /models": "切换:/model <id> · 列表:/models",
181
+ "tokens": "tokens",
182
+ "total": "总计",
183
+ "type to filter · ↑↓ move · Enter select · Esc cancel": "输入以筛选 · ↑↓ 移动 · Enter 选择 · Esc 取消",
184
+ "usage": "用量",
185
+ "weekly": "每周",
186
+ "what caused this?": "原因是什么?",
187
+ "{label} installed": "{label} 已安装",
188
+ "{label} isn't installed. Install it now? [Y/n] ": "{label} 尚未安装。是否立即安装? [Y/n] ",
189
+ "{label} needs a provider definition in a file, so this only shows setup — it won't auto-run.": "{label} 需要在文件中定义提供商,因此这里仅显示设置步骤 — 不会自动运行。",
190
+ "{label} needs manual installation:": "{label} 需要手动安装:",
191
+ "{model} thinking…": "{model} 思考中…",
192
+ "{n} providers configured": "已配置 {n} 个提供商",
193
+ "… {n} more — narrow with a search term": "… 还有 {n} 项 — 输入关键词缩小范围",
194
+ "… {n} more — type to narrow down": "… 还有 {n} 项 — 输入以缩小范围",
195
+ "↑/↓ move • enter run • → set model • esc quit": "↑/↓ 移动 • enter 运行 • → 设置模型 • esc 退出",
196
+ "↑/↓ move • enter run • → set model • esc back": "↑/↓ 移动 • enter 运行 • → 设置模型 • esc 返回",
197
+ "⏹ aborted": "⏹ 已中止",
198
+ "⏹ generation aborted — the partial reply stays in context": "⏹ 生成已中止 — 部分回复保留在上下文中",
199
+ "✓ installed": "✓ 已安装",
200
+ "✗ not installed —": "✗ 未安装 —",
201
+ };
package/src/login.mjs CHANGED
@@ -2,6 +2,7 @@ import { createServer } from "node:http";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { spawn } from "node:child_process";
4
4
  import { ROOT, V1, writeConfig } from "./config.mjs";
5
+ import { t } from "./i18n.mjs";
5
6
 
6
7
  function openBrowser(url) {
7
8
  const cmd =
@@ -47,7 +48,7 @@ export async function login() {
47
48
  res.end(JSON.stringify({ ok: Boolean(ok) }));
48
49
  server.close();
49
50
  if (ok) resolve(payload.key);
50
- else reject(new Error("state 불일치 또는 키 누락"));
51
+ else reject(new Error(t("State mismatch or missing key")));
51
52
  });
52
53
  });
53
54
 
@@ -55,18 +56,18 @@ export async function login() {
55
56
  server.listen(0, "127.0.0.1", () => {
56
57
  const { port } = server.address();
57
58
  const authUrl = `${ROOT}/cli-auth?port=${port}&state=${state}`;
58
- console.log("브라우저에서 로그인하세요. 자동으로 안 열리면 아래 URL을 여세요:\n " + authUrl + "\n");
59
+ console.log(`${t("Log in from your browser. If it doesn't open automatically, open this URL:")}\n ${authUrl}\n`);
59
60
  openBrowser(authUrl);
60
61
  });
61
62
 
62
63
  setTimeout(() => {
63
64
  server.close();
64
- reject(new Error("로그인 시간 초과(2분)"));
65
+ reject(new Error(t("Login timed out (2 minutes)")));
65
66
  }, 120_000).unref();
66
67
  });
67
68
 
68
69
  writeConfig({ key, base_url: ROOT });
69
- console.log("✓ 로그인 완료. 키를 ~/.pleum/config.json 에 저장했습니다.");
70
+ console.log(`✓ ${t("Logged in. Saved the key to ~/.pleum/config.json.")}`);
70
71
  }
71
72
 
72
73
  // device-code 로그인 — 브라우저 없는 환경(SSH·CI).
@@ -74,15 +75,15 @@ export async function login() {
74
75
  export async function loginDevice() {
75
76
  const res = await fetch(`${V1}/auth/device/code`, { method: "POST" });
76
77
  if (!res.ok) {
77
- console.error("device code 발급 실패 (서버 응답 " + res.status + ")");
78
+ console.error(t("Failed to issue a device code (server responded {status})", { status: res.status }));
78
79
  process.exit(1);
79
80
  }
80
81
  const { device_code, user_code, verification_url, interval, expires_in } = await res.json();
81
82
 
82
83
  console.log(
83
- `\n 코드: \x1b[1;32m${user_code}\x1b[0m\n` +
84
- ` URL : ${verification_url}\n\n` +
85
- ` 위 URL에서 로그인 후 코드를 입력하세요 (${expires_in / 60}분 내).\n`
84
+ `\n ${t("Code")}: \x1b[1;32m${user_code}\x1b[0m\n` +
85
+ ` URL: ${verification_url}\n\n` +
86
+ ` ${t("Log in at the URL above, then enter the code (within {min} min).", { min: expires_in / 60 })}\n`
86
87
  );
87
88
 
88
89
  const deadline = Date.now() + expires_in * 1000;
@@ -96,15 +97,15 @@ export async function loginDevice() {
96
97
  if (poll.status === 202) continue; // authorization_pending
97
98
  if (!poll.ok) {
98
99
  const e = await poll.json().catch(() => ({}));
99
- if (e.detail === "expired_token") { console.error("코드가 만료되었습니다."); process.exit(1); }
100
- console.error("오류:", e.detail ?? poll.status);
100
+ if (e.detail === "expired_token") { console.error(t("The code has expired.")); process.exit(1); }
101
+ console.error(t("Error:"), e.detail ?? poll.status);
101
102
  process.exit(1);
102
103
  }
103
104
  const { key } = await poll.json();
104
105
  writeConfig({ key, base_url: ROOT });
105
- console.log("✓ 로그인 완료. 키를 ~/.pleum/config.json 에 저장했습니다.");
106
+ console.log(`✓ ${t("Logged in. Saved the key to ~/.pleum/config.json.")}`);
106
107
  return;
107
108
  }
108
- console.error("시간 초과: 코드가 만료되었습니다.");
109
+ console.error(t("Timed out: the code has expired."));
109
110
  process.exit(1);
110
111
  }