Skip to content

feat(commands): annotate a write as local; the page gives it its own line (0.15.0) - #37

Merged
leemour merged 1 commit into
mainfrom
fix/local-writes
Oct 1, 2026
Merged

leemour merged 1 commit into
mainfrom
fix/local-writes

Conversation

@leemour

@leemour leemour commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Task

The generated command pages of tg-cli and max-cli say "Changes something in Telegram" / «Меняет что-то в MAX» under config set|unset and chats rules set|unset. Those only change local files.

Why

mutates meant two things: a write to the messenger, and a write to a local file. The page could not tell them apart.

What

  • CommandMeta.local / CommandInfo.local: with mutates: true, the write is only on this machine (a file, the keyring).
  • commandsPage text takes optional mutatesLocal, shown instead of mutates for a local write. Without it, no line.
  • mutates stays true on local writes, so commands --json keeps writes: yes — agents use it to tell reads from writes.
  • Version 0.15.0.

Decision: a second annotation rather than dropping mutates, because agents and the writes column depend on mutates.

Testing

pnpm lint && pnpm typecheck && pnpm test && pnpm docs:check — all pass. New test: a local write gets its own line, or none when mutatesLocal is absent.

Next: cli-messaging marks its 12 local-only commands local: true; tg-cli and max-cli pass the text.

🤖 Generated with Claude Code

…line (0.15.0)

One marker meant two things: `mutates` was set both on commands that change
the messenger and on ones that change only local files (config set, group
rules, recipient lists, the bot token). The commands page then said
"Changes something in Telegram" under `config set`.

`local: true` beside `mutates: true` says the write stays on this machine.
`mutates` keeps meaning "a write", so `commands --json` still shows
`writes: yes`. The page shows `text.mutatesLocal` for such a command, or no
line when the caller gives none — never the messenger label.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour
leemour merged commit fb1d835 into main Oct 1, 2026
4 checks passed
@leemour
leemour deleted the fix/local-writes branch October 1, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant