From eac8f13a14bbdb4ef69ca71ce921aa54c64ada94 Mon Sep 17 00:00:00 2001 From: leemour Date: Thu, 19 Nov 2026 08:44:24 +0100 Subject: [PATCH 1/4] fix(session): a sign-in goes on when the keyring does not answer; cli-core 0.707.0 cli-base 0.108.0 (#605) throws keyring.unreachable from Credentials#read instead of answering "no token". adoptToken and setup read the old token before a sign-in, so on a machine without a working keyring the sign-in now failed before it could fall back to the private file. SessionStore.tokenBeforeSignIn reads that case as no token, as cli-core does for its own sign-ins; every other read still reports the unreachable keyring. cli-core 0.706.0 (#3139) adds messages scheduled cancel|edit|send, which MAX refuses for now; the remote-write list in commands.test.ts names them. cli-core 0.707.0 (was 0.681.0) and cli-base 0.124.0 (was 0.106.0); generated files regenerated. Co-Authored-By: Claude Opus 5.5 --- changes/fix-parity-core-0707.md | 11 ++ contracts/wirecat.json | 84 ++++++++- docs/commands.md | 63 ++++++- docs/dev/bot-api-coverage.md | 10 + package.json | 4 +- pnpm-lock.yaml | 314 ++++++++++++++++++++++++++++++-- src/bot/generated/manifest.ts | 24 ++- src/bot/generated/types.ts | 37 ++++ src/client.test.ts | 25 ++- src/client/session.ts | 14 +- src/commands/commands.test.ts | 3 + src/commands/setup.ts | 2 +- src/session/adopt.test.ts | 7 + src/session/adopt.ts | 6 +- src/session/store.ts | 14 ++ 15 files changed, 588 insertions(+), 30 deletions(-) create mode 100644 changes/fix-parity-core-0707.md diff --git a/changes/fix-parity-core-0707.md b/changes/fix-parity-core-0707.md new file mode 100644 index 00000000..09348339 --- /dev/null +++ b/changes/fix-parity-core-0707.md @@ -0,0 +1,11 @@ +### Изменено — может сломать скрипты + +- **`max` собран на cli-core 0.707.0 и cli-base 0.124.0** (были 0.681.0 и 0.106.0). Из заметного: + - Если связка ключей ОС не отвечает, команда сообщает об этом (`keyring.unreachable`) и пишет, как это исправить. + Раньше она отвечала, что вход не выполнен, хотя токен лежал в связке. Вход (`session start`, `setup`) при этом, + как и раньше, сохраняет токен в личный файл, а `max serve` и запуск по таймеру считают это временным сбоем и + пробуют позже. + - `mcp serve --profiles all` запускается и на компьютере без профиля: показывает инструменты, а каждый вызов + отвечает, как создать первый профиль. + - Появились `messages scheduled cancel|edit|send`. MAX их пока не поддерживает, и команды отвечают, что этот + мессенджер так не умеет. diff --git a/contracts/wirecat.json b/contracts/wirecat.json index ddbb227f..0b8fd714 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -1209,7 +1209,7 @@ "messages", "scheduled" ], - "summary": "messages waiting to be sent later in a chat, soonest first; cancel one in…", + "summary": "messages waiting to be sent later in a chat, soonest first, with their…", "effects": { "remote": "read", "local": "read" @@ -1217,6 +1217,48 @@ "permission": "messages.scheduled", "entity": "message" }, + { + "path": [ + "messages", + "scheduled", + "cancel" + ], + "summary": "cancel scheduled messages before they are sent; they cannot be got back", + "effects": { + "remote": "write", + "local": "write" + }, + "permission": "messages.scheduled.cancel", + "entity": "scheduled_cancellation" + }, + { + "path": [ + "messages", + "scheduled", + "edit" + ], + "summary": "change the text or the time of a scheduled message before it is sent", + "effects": { + "remote": "write", + "local": "write" + }, + "permission": "messages.scheduled.edit", + "entity": "message_write" + }, + { + "path": [ + "messages", + "scheduled", + "send" + ], + "summary": "deliver what is scheduled right away instead of at its time; each gets a new id", + "effects": { + "remote": "write", + "local": "write" + }, + "permission": "messages.scheduled.send", + "entity": "scheduled_send" + }, { "path": [ "messages", @@ -5622,6 +5664,44 @@ "app": "max-cli", "env": "MAX" }, - "settings": null + "settings": null, + "accountRemove": { + "signOut": [ + "{profile}", + "session", + "end", + "--record", + "--json" + ], + "remove": { + "minVersion": "0.0.0", + "keepData": [ + "{profile}", + "account", + "remove", + "--keep-data", + "--record", + "--json" + ], + "deleteData": [ + "{profile}", + "account", + "remove", + "--delete-data", + "--record", + "--json" + ], + "dryRun": "--dry-run", + "confirm": "--yes" + }, + "removes": [ + "signIn" + ], + "keeps": [ + "settings", + "data", + "listed" + ] + } } } diff --git a/docs/commands.md b/docs/commands.md index fcd99604..4d46ed6a 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1957,21 +1957,74 @@ max messages send [text] [options] ### `max messages scheduled` -messages waiting to be sent later in a chat, soonest first; cancel one in the app +messages waiting to be sent later in a chat, soonest first, with their scheduled ids + +#### `max messages scheduled cancel` + +cancel scheduled messages before they are sent; they cannot be got back + +**Меняет что-то вне этого компьютера: в MAX или во внешнем сервисе.** ```sh -max messages scheduled +max messages scheduled cancel [options] ``` | Аргумент | | Что это | |---|---|---| | `chat` | обязательный | a chat: its id, or part of its title. | +| `scheduled-id` | обязательный | the scheduled ids `messages scheduled ` lists, by spaces or commas, at most 10; never the id of a sent message. | + +| Опция | Что делает | +|---|---| +| `--allow-dangerous` | go ahead without the question an ask level puts before a cancellation. | -**Returns:** message — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 31 more; every field: max commands info messages scheduled +**Returns:** scheduled cancellation — operation_id, chat_id, cancelled; every field: max commands info messages scheduled cancel -**Next usually:** `max messages links `, `max messages transcribe `, `max stats messages evidence ` +**Example:** `max personal messages scheduled cancel "Book club" 3` + +#### `max messages scheduled edit` + +change the text or the time of a scheduled message before it is sent + +**Меняет что-то вне этого компьютера: в MAX или во внешнем сервисе.** + +```sh +max messages scheduled edit [text] [options] +``` + +| Аргумент | | Что это | +|---|---|---| +| `chat` | обязательный | a chat: its id, or part of its title. | +| `scheduled-id` | обязательный | the scheduled id `messages scheduled ` lists; never the id of a sent message. | +| `text` | необязательный | the new text; without it and without --at-time, read from stdin. | + +| Опция | Что делает | +|---|---| +| `--at-time