Repository navigation
feat(cli): mark the session and mirrors commands as cli-core's own - #3365
Merged
Merged
Conversation
cli-base's reserved-shared-command lint rule (WC-CMD-34) warns on CLIs that mount tokenSessionCommand, oauthSessionCommand or fileMirrorsCommand, because those were not marked as shared. They now are, so commands --json gives them origin cli-core. A CLI changes them only through their options. No CLI on main edits the returned commands. accountRemoveCommand takes effects. asterisk, beeline, notion and yandex-disk annotate the returned command with LOCAL_WRITE today, which a marked command refuses at startup, so it stays unmarked until they pass effects instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leemour
force-pushed
the
feat/mark-shared-session-commands
branch
from
November 25, 2026 21:37
8cad392 to
aead327
Compare
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
cli-base #727 added the lint rule
reserved-shared-command(WC-CMD-34). It warns on correct CLIs, because four shared factories were not marked as cli-core's own:tokenSessionCommand,oauthSessionCommand,fileMirrorsCommandand a standaloneaccountRemoveCommand. The rule becomes an error on 2027-01-15, only after they are marked.Why
A marked command is checked at startup (
assertSharedContracts): any change to it after the factory returns stops the run. So before marking, I checked every CLI on origin/main that calls these factories.tokenSessionCommand(attio, linear, slack, wordpress) andfileMirrorsCommand(notion): mounted as returned. Nothing edits them.oauthSessionCommand: no CLI uses it yet. zm, drive and gcal will add their start flags throughstartOptions(feat(oauth): let oauthSessionCommand take the sign-ins a CLI kept before #3361), which the factory applies, so the contract holds.accountRemoveCommand: asterisk, beeline, notion and yandex-disk wrap it inannotate(..., { effects: LOCAL_WRITE }). Marked, that would stop every run of those four CLIs at startup after their next bump.What
tokenSessionCommand,oauthSessionCommandandfileMirrorsCommandgo throughsharedCommand, likeappDoctorCommand.commands --jsongives themorigin: "cli-core".accountRemoveCommandtakeseffects, so those four CLIs can passLOCAL_WRITEinstead of annotating. It stays unmarked until they do.Testing
pnpm typecheck,pnpm lint,pnpm docs:check, the API report.🤖 Generated with Claude Code