zames_pro 2.72.9 → 2.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/README.md +111 -19
- package/dist/agent-loop.js +17 -5
- package/dist/browser-pure.js +6 -6
- package/dist/browser.js +5 -1
- package/dist/commands.js +7 -0
- package/dist/config.js +56 -1
- package/dist/i18n/common.js +2 -2
- package/dist/i18n/config.js +14 -0
- package/dist/i18n/deepseek.js +26 -26
- package/dist/i18n/help.js +8 -0
- package/dist/i18n/qwen.js +132 -0
- package/dist/i18n.js +2 -0
- package/dist/index.js +295 -28
- package/dist/input.js +23 -0
- package/dist/provider-handoff.js +73 -0
- package/dist/providers.js +50 -0
- package/dist/qwen-browser.js +1743 -0
- package/dist/qwen-chats.js +183 -0
- package/dist/qwen-net-capture.js +221 -0
- package/dist/qwen-ui.js +160 -0
- package/dist/run-task.js +2 -1
- package/dist/sessions.js +15 -4
- package/dist/ui-health.js +27 -21
- package/package.json +8 -3
- package/scripts/coverage-gate.mts +5 -1
- package/scripts/qwen-smoke.mts +189 -0
package/dist/i18n/deepseek.js
CHANGED
|
@@ -5,28 +5,28 @@ export const deepseekMessages = {
|
|
|
5
5
|
// printed around the moment they happen (browser.ts / agent-loop.ts), not as
|
|
6
6
|
// a bare error at the end of the run.
|
|
7
7
|
'ds.rate_limit_wait': {
|
|
8
|
-
ru: '⏳
|
|
9
|
-
en: '⏳
|
|
8
|
+
ru: '⏳ {provider}: «слишком часто». Жду {min} мин ({attempt}/{max}) и повторю отправку...',
|
|
9
|
+
en: '⏳ {provider}: "too frequent". Waiting {min} min ({attempt}/{max}), then resending...',
|
|
10
10
|
},
|
|
11
11
|
'ds.rate_limit_give_up': {
|
|
12
|
-
ru: '✖
|
|
13
|
-
en: '✖
|
|
12
|
+
ru: '✖ {provider} не принял сообщение после {attempt} пауз по {min} мин. Подожди и попробуй снова.',
|
|
13
|
+
en: '✖ {provider} refused the message after {attempt} waits of {min} min. Wait and try again.',
|
|
14
14
|
},
|
|
15
15
|
'ds.server_busy_wait': {
|
|
16
|
-
ru: '⏳
|
|
17
|
-
en: '⏳
|
|
16
|
+
ru: '⏳ {provider}: сервер занят. Жду {sec}с ({attempt}/{max}) и повторю...',
|
|
17
|
+
en: '⏳ {provider}: server busy. Waiting {sec}s ({attempt}/{max}), then retrying...',
|
|
18
18
|
},
|
|
19
19
|
'ds.server_busy_give_up': {
|
|
20
|
-
ru: '✖
|
|
21
|
-
en: '✖
|
|
20
|
+
ru: '✖ {provider}: сервер не ответил после {attempt} повторов. Попробуй позже.',
|
|
21
|
+
en: '✖ {provider}: the server did not respond after {attempt} retries. Try again later.',
|
|
22
22
|
},
|
|
23
23
|
'ds.ask_retry': {
|
|
24
24
|
ru: '⚠ Отправка не удалась (попытка {attempt}/{max} на этот запрос): {error} — повторяю...',
|
|
25
25
|
en: '⚠ Send failed (attempt {attempt}/{max} for this request): {error} — retrying...',
|
|
26
26
|
},
|
|
27
27
|
'ds.incomplete_retry': {
|
|
28
|
-
ru: '⏳
|
|
29
|
-
en: '⏳
|
|
28
|
+
ru: '⏳ {provider} оборвал ответ и кнопки Continue нет — переотправляю задачу ({attempt}/{max})...',
|
|
29
|
+
en: '⏳ {provider} truncated the answer and there is no Continue button — resending the task ({attempt}/{max})...',
|
|
30
30
|
},
|
|
31
31
|
'ds.attach_read_failed': {
|
|
32
32
|
ru: '⚠ не удалось прочитать вложение {name}: {error}',
|
|
@@ -41,8 +41,8 @@ export const deepseekMessages = {
|
|
|
41
41
|
en: '⚠ could not attach the files: {error}',
|
|
42
42
|
},
|
|
43
43
|
'ds.incomplete_give_up': {
|
|
44
|
-
ru: '✖
|
|
45
|
-
en: '✖
|
|
44
|
+
ru: '✖ {provider} {attempt} раз подряд оборвал ответ, не дойдя до конца. Возможно, включён режим размышления — попробуй выключить его (browser.deepThinking) или повтори позже.',
|
|
45
|
+
en: '✖ {provider} truncated the answer {attempt} times in a row. The reasoning mode (deep thinking) may be on — try turning it off (browser.deepThinking) or retry later.',
|
|
46
46
|
},
|
|
47
47
|
'ds.ask_restart_browser': {
|
|
48
48
|
ru: '⚠ Браузер потерял страницу — перезапускаю и вхожу заново...',
|
|
@@ -53,36 +53,36 @@ export const deepseekMessages = {
|
|
|
53
53
|
en: '⚠ Could not restart the browser: {error}',
|
|
54
54
|
},
|
|
55
55
|
'ds.ask_failed': {
|
|
56
|
-
ru: '✖ Не удалось получить ответ от
|
|
57
|
-
en: '✖ Could not get an answer from
|
|
56
|
+
ru: '✖ Не удалось получить ответ от {provider} после {max} попыток: {error}',
|
|
57
|
+
en: '✖ Could not get an answer from {provider} after {max} attempts: {error}',
|
|
58
58
|
},
|
|
59
59
|
'ds.input_missing': {
|
|
60
|
-
ru: '✖ Не найдено поле ввода на странице
|
|
61
|
-
en: '✖ The
|
|
60
|
+
ru: '✖ Не найдено поле ввода на странице {provider}. Запусти /debug-dom и поправь INPUT_SELECTORS.',
|
|
61
|
+
en: '✖ The {provider} input field was not found. Run /debug-dom and fix INPUT_SELECTORS.',
|
|
62
62
|
},
|
|
63
63
|
'ds.input_partial': {
|
|
64
64
|
ru: '✖ Не удалось вставить текст в поле ввода целиком ({got} из {want} символов). Сообщение не отправлено, чтобы не отправить обрезанный текст. Попробуй ещё раз или разбей сообщение.',
|
|
65
65
|
en: '✖ Could not paste the whole text into the input ({got} of {want} chars). The message was not sent to avoid sending a truncated text. Retry or split the message.',
|
|
66
66
|
},
|
|
67
67
|
'ds.send_no_start': {
|
|
68
|
-
ru: '✖ Ответ не начал генерироваться за 35с даже после повторной отправки. Проверь чат
|
|
69
|
-
en: '✖ The answer did not start generating within 35s even after resending. Check the
|
|
68
|
+
ru: '✖ Ответ не начал генерироваться за 35с даже после повторной отправки. Проверь чат {provider} вручную (возможно, кнопка отправки не нажимается или сессия разлогинилась).',
|
|
69
|
+
en: '✖ The answer did not start generating within 35s even after resending. Check the {provider} chat manually (the send button may not be clickable or the session may have expired).',
|
|
70
70
|
},
|
|
71
71
|
'ds.send_no_new_answer': {
|
|
72
|
-
ru: '✖ Новый ответ не получен — на странице остался прежний текст. Возможно, сообщение не отправилось. Проверь чат
|
|
73
|
-
en: '✖ No new answer received — the page still shows the previous text. The message may not have been sent. Check the
|
|
72
|
+
ru: '✖ Новый ответ не получен — на странице остался прежний текст. Возможно, сообщение не отправилось. Проверь чат {provider} вручную.',
|
|
73
|
+
en: '✖ No new answer received — the page still shows the previous text. The message may not have been sent. Check the {provider} chat manually.',
|
|
74
74
|
},
|
|
75
75
|
'ds.continue_clicked': {
|
|
76
|
-
ru: '▶ Нажал «Continue» (
|
|
77
|
-
en: '▶ Clicked "Continue" (
|
|
76
|
+
ru: '▶ Нажал «Continue» ({provider} приостановил вывод — возобновляю).',
|
|
77
|
+
en: '▶ Clicked "Continue" ({provider} paused the output — resuming).',
|
|
78
78
|
},
|
|
79
79
|
'ds.answer_timeout': {
|
|
80
|
-
ru: '⏳
|
|
81
|
-
en: '⏳
|
|
80
|
+
ru: '⏳ {provider} не ответил за {sec}с ({attempt}/{max}) — повторяю запрос...',
|
|
81
|
+
en: '⏳ {provider} did not answer within {sec}s ({attempt}/{max}) — retrying the request...',
|
|
82
82
|
},
|
|
83
83
|
'ds.answer_timeout_give_up': {
|
|
84
|
-
ru: '✖
|
|
85
|
-
en: '✖
|
|
84
|
+
ru: '✖ {provider} перестал отвечать, лимит повторов исчерпан. Модель не дала ответа — проверь чат вручную.',
|
|
85
|
+
en: '✖ {provider} stopped responding, retry limit exhausted. The model gave no answer — check the chat manually.',
|
|
86
86
|
},
|
|
87
87
|
'ds.tool_retry': {
|
|
88
88
|
ru: '⏳ Агент не распознал ответ модели — прошу продолжить ({attempt}/{max})...',
|
package/dist/i18n/help.js
CHANGED
|
@@ -423,6 +423,14 @@ export const helpMessages = {
|
|
|
423
423
|
ru: '/config lang <ru|en> сменить язык интерфейса и агента',
|
|
424
424
|
en: '/config lang <ru|en> switch UI and agent language',
|
|
425
425
|
},
|
|
426
|
+
'help.cmd.provider': {
|
|
427
|
+
ru: '/provider <deepseek|qwen> переключить провайдера чата',
|
|
428
|
+
en: '/provider <deepseek|qwen> switch the chat provider',
|
|
429
|
+
},
|
|
430
|
+
'help.cmd.model': {
|
|
431
|
+
ru: '/model [id] показать/выбрать модель Qwen',
|
|
432
|
+
en: '/model [id] show/pick the Qwen model',
|
|
433
|
+
},
|
|
426
434
|
'help.cmd.debug_dom': {
|
|
427
435
|
ru: '/debug-dom сохранить HTML страницы (для отладки)',
|
|
428
436
|
en: '/debug-dom dump page HTML (debug)',
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// Qwen (chat.qwen.ai) provider messages — everything the operator sees while
|
|
2
|
+
// the active backend is Qwen. Kept in its own section file (like deepseek.ts)
|
|
3
|
+
// so provider-specific wording has one home.
|
|
4
|
+
export const qwenMessages = {
|
|
5
|
+
'qwen.guest_mode': {
|
|
6
|
+
ru: 'Qwen: вход не выполнен, работаю в гостевом режиме (≈10 сообщений в сутки, без вложений). Войдите через /provider login или запустите с --headed.',
|
|
7
|
+
en: 'Qwen: not signed in, running in guest mode (~10 messages/day, no attachments). Log in via /provider login or launch with --headed.',
|
|
8
|
+
},
|
|
9
|
+
'qwen.login_email_prompt': {
|
|
10
|
+
ru: 'Email для входа в Qwen{def}: ',
|
|
11
|
+
en: 'Qwen login email{def}: ',
|
|
12
|
+
},
|
|
13
|
+
'qwen.login_code_prompt': {
|
|
14
|
+
ru: 'Код из письма Qwen: ',
|
|
15
|
+
en: 'Qwen email code: ',
|
|
16
|
+
},
|
|
17
|
+
'qwen.login_pass_prompt': {
|
|
18
|
+
ru: 'Пароль Qwen: ',
|
|
19
|
+
en: 'Qwen password: ',
|
|
20
|
+
},
|
|
21
|
+
'qwen.login_ok': {
|
|
22
|
+
ru: 'Qwen: вход выполнен.',
|
|
23
|
+
en: 'Qwen: signed in.',
|
|
24
|
+
},
|
|
25
|
+
'qwen.login_failed': {
|
|
26
|
+
ru: 'Qwen: войти не удалось. Войдите вручную в окне браузера (запустите с --headed) и повторите.',
|
|
27
|
+
en: 'Qwen: sign-in failed. Sign in manually in the browser window (launch with --headed) and retry.',
|
|
28
|
+
},
|
|
29
|
+
'qwen.guest_limit': {
|
|
30
|
+
ru: 'Qwen: исчерпан суточный лимит гостя. Войдите в аккаунт (email / Google / GitHub) командой /provider login или запустите с --headed.',
|
|
31
|
+
en: 'Qwen: the guest daily limit is exhausted. Sign in (email / Google / GitHub) with /provider login, or launch with --headed.',
|
|
32
|
+
},
|
|
33
|
+
'qwen.restart_browser': {
|
|
34
|
+
ru: '⚠ Qwen: страница браузера потеряна — перезапускаю и вхожу заново...',
|
|
35
|
+
en: '⚠ Qwen: the browser lost the page — restarting and signing in again...',
|
|
36
|
+
},
|
|
37
|
+
'qwen.restart_failed': {
|
|
38
|
+
ru: '⚠ Qwen: не удалось перезапустить браузер: {error}',
|
|
39
|
+
en: '⚠ Qwen: could not restart the browser: {error}',
|
|
40
|
+
},
|
|
41
|
+
'qwen.model_set': {
|
|
42
|
+
ru: 'Модель Qwen: {v}',
|
|
43
|
+
en: 'Qwen model: {v}',
|
|
44
|
+
},
|
|
45
|
+
'qwen.model_list': {
|
|
46
|
+
ru: 'Доступные модели Qwen:\n{v}',
|
|
47
|
+
en: 'Available Qwen models:\n{v}',
|
|
48
|
+
},
|
|
49
|
+
'qwen.model_error': {
|
|
50
|
+
ru: 'Не удалось получить список моделей Qwen: {v}',
|
|
51
|
+
en: 'Failed to fetch the Qwen model list: {v}',
|
|
52
|
+
},
|
|
53
|
+
'provider.switched': {
|
|
54
|
+
ru: 'Провайдер чата: {v}.',
|
|
55
|
+
en: 'Chat provider: {v}.',
|
|
56
|
+
},
|
|
57
|
+
'provider.switching': {
|
|
58
|
+
ru: 'Переключаю провайдера на {v}: закрываю старый браузер и открываю {v}...',
|
|
59
|
+
en: 'Switching provider to {v}: closing the old browser and opening {v}...',
|
|
60
|
+
},
|
|
61
|
+
'provider.switch_failed': {
|
|
62
|
+
ru: '✖ Не удалось открыть браузер {v}: {error}. Остаюсь на прежнем провайдере; проверь вход и попробуй снова.',
|
|
63
|
+
en: '✖ Could not open the {v} browser: {error}. Staying on the previous provider; check the login and retry.',
|
|
64
|
+
},
|
|
65
|
+
'provider.usage': {
|
|
66
|
+
ru: 'Использование: /provider <deepseek|qwen> | /provider login | /provider status',
|
|
67
|
+
en: 'Usage: /provider <deepseek|qwen> | /provider login | /provider status',
|
|
68
|
+
},
|
|
69
|
+
'provider.handoff_saved': {
|
|
70
|
+
ru: 'Контекст текущего чата сжат и сохранён для {v}. Он подхватится в следующей задаче.',
|
|
71
|
+
en: 'The current chat was summarized and saved for {v}. It will be carried over with the next task.',
|
|
72
|
+
},
|
|
73
|
+
'provider.handoff_used': {
|
|
74
|
+
ru: '📎 Подхватил контекст предыдущего провайдера (carried-over summary).',
|
|
75
|
+
en: '📎 Carried over the previous provider context (handoff summary).',
|
|
76
|
+
},
|
|
77
|
+
'provider.handoff_empty': {
|
|
78
|
+
ru: 'Не удалось сжать историю — контекст НЕ перенесён. Текущий чат останется у старого провайдера.',
|
|
79
|
+
en: 'Could not summarize the chat — context NOT carried over. The current chat stays with the old provider.',
|
|
80
|
+
},
|
|
81
|
+
'provider.login_done': {
|
|
82
|
+
ru: 'Проверка входа завершена.',
|
|
83
|
+
en: 'Login check complete.',
|
|
84
|
+
},
|
|
85
|
+
'provider.status': {
|
|
86
|
+
ru: 'Провайдер: {v}, модель: {m}, вход: {auth}',
|
|
87
|
+
en: 'Provider: {v}, model: {m}, login: {auth}',
|
|
88
|
+
},
|
|
89
|
+
// Qwen-specific statuses. The DeepSeek path had these under `ds.*`; using
|
|
90
|
+
// the SAME keys from QwenBrowser broke provider encapsulation (a Qwen notice
|
|
91
|
+
// was labelled with DeepSeek wording), so they live here instead.
|
|
92
|
+
'qwen.rate_limit_wait': {
|
|
93
|
+
ru: '⏳ {provider}: «слишком часто». Жду {min} мин ({attempt}/{max}) и повторю отправку...',
|
|
94
|
+
en: '⏳ {provider}: "too frequent". Waiting {min} min ({attempt}/{max}), then resending...',
|
|
95
|
+
},
|
|
96
|
+
'qwen.server_busy_wait': {
|
|
97
|
+
ru: '⏳ {provider}: сервер занят. Жду {sec}с ({attempt}/{max}) и повторю...',
|
|
98
|
+
en: '⏳ {provider}: server busy. Waiting {sec}s ({attempt}/{max}), then retrying...',
|
|
99
|
+
},
|
|
100
|
+
'qwen.incomplete_retry': {
|
|
101
|
+
ru: '⏳ {provider} оборвал ответ — переотправляю задачу ({attempt}/{max})...',
|
|
102
|
+
en: '⏳ {provider} truncated the answer — resending the task ({attempt}/{max})...',
|
|
103
|
+
},
|
|
104
|
+
'qwen.ask_retry': {
|
|
105
|
+
ru: '⚠ Отправка не удалась (попытка {attempt}/{max} на этот запрос): {error} — повторяю...',
|
|
106
|
+
en: '⚠ Send failed (attempt {attempt}/{max} for this request): {error} — retrying...',
|
|
107
|
+
},
|
|
108
|
+
'qwen.ask_failed': {
|
|
109
|
+
ru: '✖ Не удалось получить ответ от {provider} после {max} попыток: {error}',
|
|
110
|
+
en: '✖ Could not get an answer from {provider} after {max} attempts: {error}',
|
|
111
|
+
},
|
|
112
|
+
'qwen.attach_read_failed': {
|
|
113
|
+
ru: '⚠ не удалось прочитать вложение {name}: {error}',
|
|
114
|
+
en: '⚠ could not read the attachment {name}: {error}',
|
|
115
|
+
},
|
|
116
|
+
'qwen.attach_no_input': {
|
|
117
|
+
ru: '⚠ не найдено поле загрузки файлов — вложения не прикреплены',
|
|
118
|
+
en: '⚠ file upload field not found — the attachments were not attached',
|
|
119
|
+
},
|
|
120
|
+
'qwen.input_missing': {
|
|
121
|
+
ru: '✖ Не найдено поле ввода на странице {provider}. Запусти /debug-dom и поправь INPUT_SELECTORS.',
|
|
122
|
+
en: '✖ The {provider} input field was not found. Run /debug-dom and fix INPUT_SELECTORS.',
|
|
123
|
+
},
|
|
124
|
+
'qwen.send_no_new_answer': {
|
|
125
|
+
ru: '✖ Новый ответ не получен — на странице остался прежний текст. Возможно, сообщение не отправилось (кнопка отправки не нажалась). Проверь чат {provider} вручную.',
|
|
126
|
+
en: '✖ No new answer received — the page still shows the previous text. The message may not have been sent (the send button was not pressed). Check the {provider} chat manually.',
|
|
127
|
+
},
|
|
128
|
+
'qwen.send_button_missing': {
|
|
129
|
+
ru: '✖ Кнопка отправки Qwen не найдена или недоступна — сообщение не отправлено. Проверь чат вручную.',
|
|
130
|
+
en: '✖ The Qwen send button was not found or is disabled — the message was not sent. Check the chat manually.',
|
|
131
|
+
},
|
|
132
|
+
};
|
package/dist/i18n.js
CHANGED
|
@@ -16,6 +16,7 @@ import { selfReviewMessages } from './i18n/self-review.js';
|
|
|
16
16
|
import { mcpMessages } from './i18n/mcp.js';
|
|
17
17
|
import { configMessages } from './i18n/config.js';
|
|
18
18
|
import { promptMessages } from './i18n/prompt.js';
|
|
19
|
+
import { qwenMessages } from './i18n/qwen.js';
|
|
19
20
|
export const DEFAULT_LOCALE = 'ru';
|
|
20
21
|
export const LOCALES = [
|
|
21
22
|
{ code: 'ru', name: 'Русский', englishName: 'Russian' },
|
|
@@ -47,6 +48,7 @@ export const CATALOG = {
|
|
|
47
48
|
...mcpMessages,
|
|
48
49
|
...configMessages,
|
|
49
50
|
...promptMessages,
|
|
51
|
+
...qwenMessages,
|
|
50
52
|
};
|
|
51
53
|
export function translate(locale) {
|
|
52
54
|
const loc = isLocale(locale) ? locale : DEFAULT_LOCALE;
|