Repository navigation
feat(commands): annotate a write as local; the page gives it its own line (0.15.0) - #37
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
The generated command pages of tg-cli and max-cli say "Changes something in Telegram" / «Меняет что-то в MAX» under
config set|unsetandchats rules set|unset. Those only change local files.Why
mutatesmeant 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: withmutates: true, the write is only on this machine (a file, the keyring).commandsPagetext takes optionalmutatesLocal, shown instead ofmutatesfor a local write. Without it, no line.mutatesstays true on local writes, socommands --jsonkeepswrites: yes— agents use it to tell reads from writes.Decision: a second annotation rather than dropping
mutates, because agents and thewritescolumn depend onmutates.Testing
pnpm lint && pnpm typecheck && pnpm test && pnpm docs:check— all pass. New test: a local write gets its own line, or none whenmutatesLocalis absent.Next: cli-messaging marks its 12 local-only commands
local: true; tg-cli and max-cli pass the text.🤖 Generated with Claude Code