feat(cli)!: Default commands to global scope - #156
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
gricha
marked this pull request as ready for review
August 11, 2026 16:09
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e028f45. Configure here.
Comment on lines
+292
to
298
| values["agents"] === undefined | ||
| ) { | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| // Interactive mode: TTY with no --agents flag |
There was a problem hiding this comment.
Interactive init double-calls runInit with empty agents array
After a user completes interactive init, the outer function now falls through and calls runInit with an empty agents array, which can overwrite the agents and trust settings they just selected.
Evidence
runInteractiveInitalready callsrunInitinternally with the interactively-chosenagentsandtrustvalues.- The old code guarded the outer
runInitcall with anelsebranch, so it only ran in non-interactive mode. - The new code removed the
else, so the outerrunInit({ agents: [] })executes unconditionally afterrunInteractiveInitreturns. - Because no
trustvalue is passed in the outer call, the second invocation can also overwrite the trust configuration established during the interactive prompts.
Identified by Warden · code-review · FNX-RDC
3 tasks
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.

Summary
--projectselecting repository-local state.--globaland legacy--useraliases, while rejecting project/global conflicts before command execution.Migration and release
Repository workflows must add
--projectto every scope-aware command. Existing files are not copied, merged, or removed automatically. Legacy hooks can be updated withdotagents --project doctor --fix.Package manifests intentionally remain at
2.2.0; Craft must publish this change with amajorrelease. If rollback is necessary, restore the v2 npm release to thelatestdist-tag.Validation
pnpm check(291 library tests, 830 CLI tests)pnpm qa:exampleReview focus
Please focus on the centralized scope boundary in
cli/main.tsandcli/context.ts, plus managed post-merge hook replacement and migration behavior.