zames_pro 2.55.0 → 2.58.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.
package/dist/gitTools.js CHANGED
@@ -149,6 +149,36 @@ export function createGitTools(workdir) {
149
149
  return runGit(`git log --oneline --decorate -n ${Number(count) || 10}`, workdir, 10_000);
150
150
  },
151
151
  },
152
+ {
153
+ name: 'GitShow',
154
+ description: 'Show a commit or object: git show <ref> (ref defaults to HEAD). ' +
155
+ 'Read-only — use it to inspect an old version without checking out.',
156
+ parameters: { ref: 'string?', stat: 'boolean?' },
157
+ fn: async ({ ref, stat }) => {
158
+ const err = await ensureRepo();
159
+ if (err)
160
+ return err;
161
+ const r = ref && String(ref).trim() ? String(ref).trim() : 'HEAD';
162
+ // `stat` gives the cheap file list; the default dumps the full diff.
163
+ const flag = stat ? '--stat ' : '';
164
+ return runGit(`git show ${flag}${JSON.stringify(r)}`, workdir, 20_000);
165
+ },
166
+ },
167
+ {
168
+ name: 'GitBranchList',
169
+ description: 'List local git branches (name, current marker, last commit). ' +
170
+ 'Read-only — use it to pick a base branch without a raw `git branch`.',
171
+ parameters: {},
172
+ fn: async () => {
173
+ const err = await ensureRepo();
174
+ if (err)
175
+ return err;
176
+ // The format string contains parentheses/brackets, which the POSIX
177
+ // shell would treat as syntax — quote it as one JSON arg.
178
+ const format = JSON.stringify('%(HEAD) %(refname:short) %(committerdate:relative) %(subject)');
179
+ return runGit('git branch --sort=-committerdate --format=' + format, workdir, 10_000);
180
+ },
181
+ },
152
182
  {
153
183
  name: 'GitAdd',
154
184
  description: 'Stage files. If paths is not given — git add -A (everything).',
@@ -209,6 +239,13 @@ export function createGitTools(workdir) {
209
239
  : (await runGit('git branch --show-current', workdir, 5000)).trim();
210
240
  if (!b)
211
241
  return 'Error: could not determine the branch to push.';
242
+ // The branch name reaches the shell command below. Validate it as a
243
+ // real ref so a model-supplied value cannot smuggle shell metacharacters
244
+ // (`;`, backticks, `$()`) into `git push`. The remote stays a literal
245
+ // 'origin' and is not user-controlled.
246
+ if (!/^[A-Za-z0-9._/-]+$/.test(b) || b.startsWith('-')) {
247
+ return `Error: invalid branch name: ${b}`;
248
+ }
212
249
  const flag = setUpstream ? '-u ' : '';
213
250
  const target = quoteArgs(b);
214
251
  return runGit(`git push ${flag}origin ${target}`, workdir, 120_000);
package/dist/i18n.js CHANGED
@@ -77,10 +77,6 @@ export const CATALOG = {
77
77
  en: 'show the browser window (debug/sign-in)',
78
78
  },
79
79
  'help.opt.debug': { ru: 'подробный лог', en: 'verbose log' },
80
- 'help.opt.calibrate': {
81
- ru: 'режим калибровки селекторов',
82
- en: 'selector calibration mode',
83
- },
84
80
  'help.opt.dev': {
85
81
  ru: 'режим разработки: авто-перечитывание модулей',
86
82
  en: 'dev mode: auto-reload modules',
@@ -139,7 +135,13 @@ export const CATALOG = {
139
135
  ru: '!команда выполнить shell-команду напрямую (мимо модели)',
140
136
  en: '!command run a shell command directly (bypass the model)',
141
137
  },
142
- 'help.commands': { ru: 'Обычные команды:', en: 'Commands:' },
138
+ 'help.commands': { ru: 'Команды:', en: 'Commands:' },
139
+ 'help.sec.session': { ru: 'Сессия', en: 'Session' },
140
+ 'help.sec.workspace': { ru: 'Рабочая директория', en: 'Workspace' },
141
+ 'help.sec.git': { ru: 'Git', en: 'Git' },
142
+ 'help.sec.agent': { ru: 'Агент', en: 'Agent' },
143
+ 'help.sec.context': { ru: 'Контекст и настройки', en: 'Context & settings' },
144
+ 'help.sec.files': { ru: 'Файлы и прочее', en: 'Files & misc' },
143
145
  'help.cmd.new': {
144
146
  ru: '/new, /clear новый чат (сброс контекста)',
145
147
  en: '/new, /clear new chat (reset context)',
@@ -200,6 +202,26 @@ export const CATALOG = {
200
202
  ru: '/diff [--staged] показать git diff',
201
203
  en: '/diff [--staged] show working tree git diff',
202
204
  },
205
+ 'help.cmd.diffstat': {
206
+ ru: '/diffstat сводка изменений (git diff --stat)',
207
+ en: '/diffstat change summary (git diff --stat)',
208
+ },
209
+ 'help.cmd.retry': {
210
+ ru: '/retry повторить последнюю задачу в этом чате',
211
+ en: '/retry resend the last task into this chat',
212
+ },
213
+ 'help.cmd.rename': {
214
+ ru: '/rename <title> задать имя текущей сессии',
215
+ en: '/rename <title> set the current session title',
216
+ },
217
+ 'help.cmd.context': {
218
+ ru: '/context что загружено в промпт (AGENTS/MEMORY/skills/commands)',
219
+ en: '/context what is loaded into the prompt (AGENTS/MEMORY/skills/commands)',
220
+ },
221
+ 'help.cmd.copy': {
222
+ ru: '/copy скопировать последний ответ в буфер обмена',
223
+ en: '/copy copy the last answer to the clipboard',
224
+ },
203
225
  'help.cmd.cost': { ru: '/cost статистика сессии', en: '/cost session stats' },
204
226
  'help.cmd.export': {
205
227
  ru: '/export [file] выгрузить сессию в Markdown',
@@ -241,6 +263,26 @@ export const CATALOG = {
241
263
  ru: '/goal [текст|clear] задать долгоживущую цель сессии',
242
264
  en: '/goal [text|clear] set a long-lived session goal',
243
265
  },
266
+ 'help.cmd.plan': {
267
+ ru: '/plan [on|off] режим плана: только чтение, без правок и команд',
268
+ en: '/plan [on|off] plan mode: read-only, no edits or commands',
269
+ },
270
+ 'plan.on': {
271
+ ru: 'Режим плана ВКЛ: доступны только инструменты чтения. Правки и команды запрещены. /plan off — выключить.',
272
+ en: 'Plan mode ON: only read tools are available. Edits and commands are disabled. /plan off to disable.',
273
+ },
274
+ 'plan.off': {
275
+ ru: 'Режим плана ВЫКЛ: агент снова может писать и запускать команды.',
276
+ en: 'Plan mode OFF: the agent can edit and run commands again.',
277
+ },
278
+ 'help.opt.output_format': {
279
+ ru: 'формат вывода: text|json|jsonl (для скриптов)',
280
+ en: 'output format: text|json|jsonl (for scripts)',
281
+ },
282
+ 'help.opt.plan': {
283
+ ru: 'стартовать в режиме плана (только чтение)',
284
+ en: 'start in plan mode (read-only)',
285
+ },
244
286
  'help.cmd.loop': {
245
287
  ru: '/loop <интервал> <задача> периодически повторять задачу (напр. 10m)',
246
288
  en: '/loop <interval> <task> repeat a task periodically (e.g. 10m)',
@@ -356,8 +398,8 @@ export const CATALOG = {
356
398
  en: 'No such directory: {v}',
357
399
  },
358
400
  'adddir.note': {
359
- ru: 'Директория существует: {v}. Песочница фиксируется при запуске.',
360
- en: 'Directory exists: {v}. The sandbox is fixed at startup.',
401
+ ru: 'Директория существует: {v}. Только проверка — песочница фиксируется при запуске, доступ не расширяется (перезапустите с --dir, чтобы работать там).',
402
+ en: 'Directory exists: {v}. Check only — the sandbox is fixed at startup, access is NOT granted (relaunch with --dir to work there).',
361
403
  },
362
404
  'help.cmd.config': {
363
405
  ru: '/config настройки: показать и изменить',
@@ -683,6 +725,62 @@ export const CATALOG = {
683
725
  en: '... [{n} more lines, use Bash git diff for the full output]',
684
726
  },
685
727
  // ---------- /cost ----------
728
+ // ---------- /context ----------
729
+ 'context.title': {
730
+ ru: 'Загружено в промпт:',
731
+ en: 'Loaded into the prompt:',
732
+ },
733
+ 'context.system_prompt': {
734
+ ru: ' системный промпт: {n} символов',
735
+ en: ' system prompt: {n} chars',
736
+ },
737
+ 'context.agents': {
738
+ ru: 'AGENTS.md / инструкции:',
739
+ en: 'AGENTS.md / instructions:',
740
+ },
741
+ 'context.memory': {
742
+ ru: 'MEMORY.md:',
743
+ en: 'MEMORY.md:',
744
+ },
745
+ 'context.skills': {
746
+ ru: 'Скиллы:',
747
+ en: 'Skills:',
748
+ },
749
+ 'context.commands': {
750
+ ru: 'Кастомные команды:',
751
+ en: 'Custom commands:',
752
+ },
753
+ 'context.none': { ru: '(нет)', en: '(none)' },
754
+ 'context.near_full': {
755
+ ru: '⚠ Контекст заполнен на {pct}% — подумайте о /compact, чтобы сжать историю.',
756
+ en: '⚠ Context is {pct}% full — consider /compact to shrink the history.',
757
+ },
758
+ // ---------- /retry, /rename ----------
759
+ 'retry.none': {
760
+ ru: 'Нет последней задачи для повтора.',
761
+ en: 'No last task to retry.',
762
+ },
763
+ 'copy.none': {
764
+ ru: 'Нет ответа для копирования.',
765
+ en: 'No answer to copy.',
766
+ },
767
+ 'copy.done': {
768
+ ru: 'Скопировано в буфер обмена ({tool}).',
769
+ en: 'Copied to clipboard ({tool}).',
770
+ },
771
+ 'copy.failed': {
772
+ ru: 'Не удалось скопировать (нет {tool} или он недоступен).',
773
+ en: 'Could not copy ({tool} missing or unavailable).',
774
+ },
775
+ 'retry.running': { ru: 'Повторяю задачу…', en: 'Retrying the task...' },
776
+ 'rename.usage': {
777
+ ru: 'Использование: /rename <title>',
778
+ en: 'Usage: /rename <title>',
779
+ },
780
+ 'rename.done': {
781
+ ru: 'Сессия переименована: {v}',
782
+ en: 'Session renamed: {v}',
783
+ },
686
784
  'cost.title': { ru: 'Статистика сессии:', en: 'Session stats:' },
687
785
  'cost.context_known': {
688
786
  ru: ' контекст: ~{n} токенов (DeepSeek accumulated_token_usage)',
@@ -772,17 +870,16 @@ export const CATALOG = {
772
870
  en: 'Clear: /queue clear',
773
871
  },
774
872
  'msg.agent_error': { ru: '✖ Ошибка агента:', en: '✖ Agent error:' },
873
+ 'msg.tool_loop': {
874
+ ru: 'Агент повторяет один и тот же вызов инструмента — переключаю на другой подход.',
875
+ en: 'The agent keeps repeating the same tool call — switching it to a different approach.',
876
+ },
775
877
  'msg.suspicious_stop': {
776
878
  ru: 'агент, похоже, остановился, не распознав вызов инструмента. Ответ сохранён в транскрипте (событие suspicious_final). Можно попросить продолжить или переотправить задачу.',
777
879
  en: 'the agent seems to have stopped without recognizing a tool call. The response is saved in the transcript (suspicious_final event). You can ask it to continue or resend the task.',
778
880
  },
779
881
  'msg.critical': { ru: 'Критическая ошибка:', en: 'Critical error:' },
780
882
  'msg.error': { ru: 'Ошибка:', en: 'Error:' },
781
- 'confirm.hint': {
782
- ru: 'всегда для этого типа',
783
- en: 'always for this kind',
784
- },
785
- 'confirm.ask_label': { ru: 'Разрешить', en: 'Allow' },
786
883
  'msg.reloaded': {
787
884
  ru: 'Перезагружено модулей: {n}. Браузер и чат не тронуты.',
788
885
  en: 'Modules reloaded: {n}. Browser and chat untouched.',
@@ -1139,6 +1236,11 @@ export const CATALOG = {
1139
1236
  },
1140
1237
  'undo.changed': { ru: 'изменён', en: 'changed' },
1141
1238
  'undo.created': { ru: 'создан', en: 'created' },
1239
+ 'undo.reason_empty': { ru: 'история пуста', en: 'history is empty' },
1240
+ 'undo.reason_disabled': {
1241
+ ru: 'undo отключён в конфиге',
1242
+ en: 'undo is disabled in the config',
1243
+ },
1142
1244
  'dom.saved': { ru: 'HTML сохранён: {v}', en: 'HTML saved: {v}' },
1143
1245
  'dom.selectors': { ru: 'Селекторы:', en: 'Selectors:' },
1144
1246
  'dom.save_error': {
@@ -1161,10 +1263,6 @@ export const CATALOG = {
1161
1263
  ru: 'Не удалось перейти: {v}',
1162
1264
  en: 'Failed to change directory: {v}',
1163
1265
  },
1164
- calibrate: {
1165
- ru: '\n🔧 Режим калибровки селекторов\n',
1166
- en: '\n🔧 Selector calibration mode\n',
1167
- },
1168
1266
  'reload.auto_partial': {
1169
1267
  ru: '⚠ авто-reload: часть модулей не загрузилась, работаю на прежней версии:',
1170
1268
  en: '⚠ auto-reload: some modules failed, using previous version:',