You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(cortex-cli): Apply batch of issue fixes and improvements
- Add validation for mutually exclusive flags across commands:
- agent list: --primary vs --subagents
- login: --token, --sso, --device-auth, --with-api-key
- exec: --enabled-tools vs --disabled-tools
- plugin list: --enabled vs --disabled
- mcp add: --url vs --sse
- mcp logout: --name vs --all
- Improve error handling with JSON support:
- alias show: JSON error output
- mcp get: JSON error output
- plugin show: JSON error output
- debug wait: JSON error output
- run cmd: auth error JSON output
- Fix bug in autonomy.rs: is_read_only_command now uses command string
- Add session ID validation in lock_cmd
- Support 'last' as SESSION_ID in resume command
- Add duplicate task ID check in DAG helpers
- Add --jobs validation in DAG execute
- Add sort value validation in models list
- Add empty plugin name validation
- Update help text URLs to point to correct repo
- Replace emojis with text in PR checkout
- Move confirmation before backup in uninstall
- Convert GitHub URLs to raw URLs in upgrade changelog
- Support config.json in debug config command
- Add dry_run JSON output in compact and DAG commands
- Make run_whoami return Result<()> for proper error handling
- Change config get/unset to bail! on errors
Issues: #3646, #3651, #3682, #3696, #3700, #3716, #3722, #3815
* fix(cortex-cli): address validation feedback from PR review
- Fix clippy::bind_instead_of_map in debug_cmd/handlers/config.rs
by replacing and_then() with map() since closure always returns Some()
- Fix duplicate error output in alias_cmd.rs and plugin_cmd.rs
by using std::process::exit(1) after JSON error output instead of bail!()
to avoid duplicating error message to stderr
- Replace raw .unwrap() calls with safer patterns in dag_cmd/helpers.rs
using if-let guards and Option::and_then() instead of panicking
- Improve is_read_only_command() in exec_cmd/autonomy.rs to use
exact word matching instead of prefix matching to prevent false
positives (e.g., 'catfile' no longer matches 'cat')
* fix(cortex-cli): integrate allows_risk() for proper autonomy level validation
Address Greptile review feedback by actually calling the allows_risk() method
in the exec command approval flow. Previously, the security fix only added the
method but did not integrate it into the command execution path.
Changes:
- Replace simple AutonomyLevel::ReadOnly check with allows_risk(risk, command)
- Extract risk_level from sandbox_assessment if available
- Pass actual command string to validate read-only commands properly
- Provide clearer error messages including risk level and autonomy mode
0 commit comments