Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@

### Изменено — может сломать скрипты

- **CLI и MCP используют четыре уровня `permissions`: `deny`, `readonly`, `ask`, `allow`.**
Можно разрешить удаление отдельно от остальных записей в сообщения. Большинство записей через
MCP теперь разрешено по умолчанию; удаление требует подтверждения, если не задан явный `allow`.
Ограничьте ресурсы через `readonly` или `deny`; `--confirm-send` требует форму для каждой записи.
Старые `--allow-*` принимаются с предупреждением и не дают прав. `config migrate --dry-run`
показывает перевод `readOnly`, `allow`, `mcpTools` и уровней модерации; `config migrate` сохраняет
его, после чего старые настройки нельзя менять. См. [настройки](docs/configuration.md).


- **Скачанные фото получают расширение по HTTP MIME**, например `.webp` для WebP,
а не JPEG по типу вложения. Исходные имена файлов сохраняются; лишних предварительных запросов нет.

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ max bot list --check # все боты на
чат с ботом; `bot messages search --from <кто>` и `bot messages between <кто> <кто>` — без
запросов к MAX.
- **Бот для агента.** `max sales bot mcp` — MCP-сервер бота: агенту доступно то, что разрешают
`readOnly` и `allow` профиля бота; удаление — только после вашей формы.
`permissions` профиля бота; при `ask` удаление требует вашей формы, при `allow` — нет.
- **Все методы Bot API.** Полное покрытие официальной схемы через `max bot api <операция>` — с флагами
для параметров и JSON-телом, которое сверяется со схемой до отправки.
- **Бот не напишет лишнего.** У каждого бота свой список чатов, куда ему можно писать, и журнал
всего, что он отправил, — без текста. Профиль только для чтения и `allow` действуют и на бота.
всего, что он отправил, — без текста. `permissions` ограничивает и бота.
- **Токен не в файле.** Токен бота — в системном хранилище паролей, отдельно от вашего.

Бота создают на [business.max.ru](https://business.max.ru/self); MAX выдаёт их подтверждённым
Expand Down Expand Up @@ -161,8 +161,8 @@ max chats moderate "Поход" --allow-dangerous # проверить
- **Агент без терминала** — Claude Desktop, Cursor и другие клиенты MCP. Подключите `max mcp`:
готовую запись для их настроек печатает `max mcp config`. Там же есть команды `/catch-up` (что
нового), `/review` (кто кому должен), `/reply` (черновик ответа) и `/find` (поиск). По умолчанию
агент только читает. Отправку можно разрешить, в том числе с вашим подтверждением каждого
сообщения, а изменения аккаунта — контакты, группы, профиль — только в файле настроек.
права агента задают `permissions`; большинство записей разрешено по умолчанию. `readonly`
запрещает запись, `ask` требует подтверждения. `--confirm-send` требует форму перед каждой записью.

## Что умеет

Expand Down Expand Up @@ -398,7 +398,7 @@ max skill install --for all # установить без входа
### MCP-сервер для агентов без терминала

Claude Desktop, Cursor и другие клиенты MCP подключаются к `max mcp` и работают с тем же
аккаунтом. Без `--allow-send` и без `mcpTools` в настройках агент только читает. С `--confirm-send` перед каждой отправкой вы
аккаунтом. CLI и MCP используют одни `permissions`; большинство записей разрешено по умолчанию. С `--confirm-send` перед каждой отправкой вы
видите чат и текст и отвечаете «да» или «нет». Навык для агента сервер отдаёт ресурсом `max://skill`.
Подробно — [docs/mcp.md](docs/mcp.md).

Expand Down
6 changes: 3 additions & 3 deletions docs/bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ max sales bot webhooks delete https://bot.example.ru/max

Бот подчиняется тем же настройкам профиля, что и личный аккаунт:

- `readOnly` — бот ничего не меняет, только читает;
- `permissions` — уровни по ключам `bot.*`; `readonly` разрешает только чтение;
- `allow` — только названные действия: отправка `send`, правка `edit`, удаление `delete`,
закрепление `pin`, участники и настройки чата `groups`, команды бота `profile`, получение
обновлений `read`. Действие без своего слова (вебхуки) при заданном `allow` запрещено.
Expand Down Expand Up @@ -433,7 +433,7 @@ max sales bot mcp config # запись для Claude Desktop, Cursor
(`max_bot_chats_moderate`). `max_bot_status` показывает, за какой профиль говорит сервер, откуда токен,
чей это бот и какие пишущие инструменты включены.

- `readOnly: true` у профиля бота — агент только читает;
- `permissions.bot: readonly` у профиля бота — агент только читает;
- `allow` — только названные действия: `"allow": ["send"]` даёт отправку и комментарии, но не правку
и не удаление;
- удаление сообщения или комментария агент сначала показывает вам формой; `--allow-dangerous` при
Expand All @@ -445,7 +445,7 @@ max sales bot mcp config # запись для Claude Desktop, Cursor
запускается и пишет об этом предупреждение.

Каждая запись идёт через ту же команду, что вы набрали бы сами: её проходят список получателей
бота, `readOnly`, `allow` и журнал. Агенту недоступны токен и вебхуки; список получателей, меню
бота, `permissions` и журнал. Агенту недоступны токен и вебхуки; список получателей, меню
команд и админов он только читает, а не меняет; выход из чата, отправка файлов и `bot api` ему тоже
недоступны.

Expand Down
62 changes: 43 additions & 19 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,20 @@ max config show [options]
|---|---|
| `--bot` | the settings a `max bot` command on this profile gets, rather than the personal account's. |

### `max config migrate`

replace legacy access settings with permissions, preserving effective levels

**Меняет что-то только на этом компьютере.**

```sh
max config migrate [options]
```

| Опция | Что делает |
|---|---|
| `--dry-run` | show the migration without writing the file. |

### `max config set`

save a setting to the configuration file
Expand All @@ -1734,7 +1748,7 @@ max config set <setting> <value> [options]

| Аргумент | | Что это |
|---|---|---|
| `setting` | обязательный | one of: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, sendsPerHour, senderColors, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile. |
| `setting` | обязательный | one of: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, permissions, sendsPerHour, senderColors, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile. |
| `value` | обязательный | a number, true or false, or for allow a list like send,reaction. |

| Опция | Что делает |
Expand All @@ -1755,7 +1769,7 @@ max config unset <setting> [options]

| Аргумент | | Что это |
|---|---|---|
| `setting` | обязательный | one of: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, sendsPerHour, senderColors, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile. |
| `setting` | обязательный | one of: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, permissions, sendsPerHour, senderColors, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile. |

| Опция | Что делает |
|---|---|
Expand Down Expand Up @@ -1902,11 +1916,12 @@ max mcp [options]

| Опция | Что делает |
|---|---|
| `--allow-send` | offer the send tool; without it the server can only read. |
| `--allow-dangerous` | skip confirmation for messages.delete at level ask. |
| `--allow-send` | deprecated: use permissions.messages.send in config; does not grant access. |
| `--confirm-send` | show the owner every write the server offers — sends, edits, reactions, mcpTools — in a form from the server first. |
| `--allow-mark-read` | offer the tool that marks a chat read; the other person sees it. |
| `--allow-delete` | offer the tool that deletes messages for you only; it cannot be undone. |
| `--allow-moderate` | let max_chats_check act on a group's rules — delete others' messages, remove people — where they allow it. |
| `--allow-mark-read` | deprecated: use permissions.chats.mark-read in config; does not grant access. |
| `--allow-delete` | deprecated: use permissions.messages.delete in config; does not grant access. |
| `--allow-moderate` | deprecated: use permissions.chats.moderate and group rules; does not grant access. |

### `max mcp config`

Expand All @@ -1918,11 +1933,12 @@ max mcp config [options]

| Опция | Что делает |
|---|---|
| `--allow-send` | offer the send tool; without it the server can only read. |
| `--allow-dangerous` | skip confirmation for messages.delete at level ask. |
| `--allow-send` | deprecated: use permissions.messages.send in config; does not grant access. |
| `--confirm-send` | show the owner every write the server offers — sends, edits, reactions, mcpTools — in a form from the server first. |
| `--allow-mark-read` | offer the tool that marks a chat read; the other person sees it. |
| `--allow-delete` | offer the tool that deletes messages for you only; it cannot be undone. |
| `--allow-moderate` | let max_chats_check act on a group's rules — delete others' messages, remove people — where they allow it. |
| `--allow-mark-read` | deprecated: use permissions.chats.mark-read in config; does not grant access. |
| `--allow-delete` | deprecated: use permissions.messages.delete in config; does not grant access. |
| `--allow-moderate` | deprecated: use permissions.chats.moderate and group rules; does not grant access. |

### `max mcp setup`

Expand All @@ -1941,11 +1957,12 @@ max mcp setup <client> [options]
| Опция | Что делает |
|---|---|
| `--allow-writes` | acknowledge that this profile offers writing tools. |
| `--allow-send` | offer the send tool; without it the server can only read. |
| `--allow-dangerous` | skip confirmation for messages.delete at level ask. |
| `--allow-send` | deprecated: use permissions.messages.send in config; does not grant access. |
| `--confirm-send` | show the owner every write the server offers — sends, edits, reactions, mcpTools — in a form from the server first. |
| `--allow-mark-read` | offer the tool that marks a chat read; the other person sees it. |
| `--allow-delete` | offer the tool that deletes messages for you only; it cannot be undone. |
| `--allow-moderate` | let max_chats_check act on a group's rules — delete others' messages, remove people — where they allow it. |
| `--allow-mark-read` | deprecated: use permissions.chats.mark-read in config; does not grant access. |
| `--allow-delete` | deprecated: use permissions.messages.delete in config; does not grant access. |
| `--allow-moderate` | deprecated: use permissions.chats.moderate and group rules; does not grant access. |

### `max mcp doctor`

Expand All @@ -1957,11 +1974,12 @@ max mcp doctor [options]

| Опция | Что делает |
|---|---|
| `--allow-send` | offer the send tool; without it the server can only read. |
| `--allow-dangerous` | skip confirmation for messages.delete at level ask. |
| `--allow-send` | deprecated: use permissions.messages.send in config; does not grant access. |
| `--confirm-send` | show the owner every write the server offers — sends, edits, reactions, mcpTools — in a form from the server first. |
| `--allow-mark-read` | offer the tool that marks a chat read; the other person sees it. |
| `--allow-delete` | offer the tool that deletes messages for you only; it cannot be undone. |
| `--allow-moderate` | let max_chats_check act on a group's rules — delete others' messages, remove people — where they allow it. |
| `--allow-mark-read` | deprecated: use permissions.chats.mark-read in config; does not grant access. |
| `--allow-delete` | deprecated: use permissions.messages.delete in config; does not grant access. |
| `--allow-moderate` | deprecated: use permissions.chats.moderate and group rules; does not grant access. |

## `max bot`

Expand Down Expand Up @@ -2757,14 +2775,18 @@ delete a comment under a post
**Меняет что-то в MAX.**

```sh
max bot comments delete <message> <comment>
max bot comments delete <message> <comment> [options]
```

| Аргумент | | Что это |
|---|---|---|
| `message` | обязательный | |
| `comment` | обязательный | |

| Опция | Что делает |
|---|---|
| `--allow-dangerous` | skip confirmation for bot.messages.delete at level ask. |

### `max bot uploads`

files uploaded to MAX, to attach to a message
Expand Down Expand Up @@ -3140,6 +3162,7 @@ max bot api delete-message [options]
| Опция | Что делает |
|---|---|
| `--message-id <value>` | Deleting message identifier. |
| `--allow-dangerous` | skip confirmation for bot.messages.delete at level ask. |

#### `max bot api get-message-by-id`

Expand Down Expand Up @@ -3217,6 +3240,7 @@ max bot api delete-comment [options]
|---|---|
| `--message-id <value>` | Message identifier (`mid`) of the commented message. |
| `--comment-id <value>` | Deleting comment identifier. |
| `--allow-dangerous` | skip confirmation for bot.messages.delete at level ask. |

#### `max bot api get-comment-by-id`

Expand Down
Loading
Loading