Skip to content

rust(feat): add profile-aware agent installation - #706

Merged
evan-sift merged 1 commit into
mainfrom
rust/cli-agent-profiles
Jul 31, 2026
Merged

rust(feat): add profile-aware agent installation#706
evan-sift merged 1 commit into
mainfrom
rust/cli-agent-profiles

Conversation

@evan-sift

@evan-sift evan-sift commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Changes

Lets the agent bundle target a named Sift profile. The global --profile flag was already parsed but hidden; this unhides it and threads it into the MCP arguments each client is registered with, so a registration points at one profile rather than whatever the default resolves to at runtime.

Widens the managed registration from an access mode to access plus profile. Both are read back out of the client configs, so update preserves the installed profile the same way it already preserved read-only or destructive access, with no state file. Adds --default-profile to move every client back to the default, mutually exclusive with --profile.

Only the exact argument shapes this CLI writes count as managed, now including mcp --profile <name> and mcp --profile <name> --allow-destructive. A profile that is empty or starts with - is rejected rather than treated as managed.

Mixed profiles across detected clients are an error, matching the existing treatment of mixed access modes: doctor reports them and update refuses to guess.

Verification

  • cargo fmt --check --all, cargo clippy --all-features, cargo test --all-features
  • 25 cmd::agent tests

Note for reviewers

No CHANGELOG entry is added here, matching the original branch. If --profile / --default-profile should be called out for release, that line is worth adding.

lineville
lineville previously approved these changes Jul 30, 2026

@lineville lineville left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good just want to understand what this mixed profile issue is? How does one create this issue of mixed profiles that we're protecting against?

Comment thread rust/crates/sift_cli/src/cmd/agent/mod.rs
lineville
lineville previously approved these changes Jul 31, 2026
auto-merge was automatically disabled July 31, 2026 18:06

Pull Request is not mergeable

auto-merge was automatically disabled July 31, 2026 18:07

Pull Request is not mergeable

@evan-sift
evan-sift force-pushed the rust/cli-agent-profiles branch from 23b6bbc to 9be8357 Compare July 31, 2026 18:09
auto-merge was automatically disabled July 31, 2026 18:24

Pull Request is not mergeable

auto-merge was automatically disabled July 31, 2026 18:26

Pull Request is not mergeable

auto-merge was automatically disabled July 31, 2026 18:27

Pull Request is not mergeable

@evan-sift
evan-sift force-pushed the rust/cli-agent-profiles branch from 9be8357 to feda33e Compare July 31, 2026 18:27
@evan-sift
evan-sift force-pushed the rust/cli-agent-profiles branch from feda33e to 448b944 Compare July 31, 2026 18:41
@evan-sift
evan-sift force-pushed the rust/cli-agent-profiles branch from 448b944 to 7b42e6c Compare July 31, 2026 18:59
Base automatically changed from rust/cli-agent-cursor-opencode to main July 31, 2026 19:12
Let the agent bundle target a named Sift profile. The global `--profile` flag
was already parsed but hidden; unhide it and thread it into the MCP arguments
each client is registered with, so a registration points at one profile rather
than whatever the default resolves to at runtime.

Widen the managed registration from an access mode to access plus profile.
Both are read back out of the client configs, so update preserves the
installed profile the same way it already preserved read-only or destructive
access, with no state file. Add `--default-profile` to move every client back
to the default, mutually exclusive with `--profile`.

Only the exact argument shapes this CLI writes count as managed, now including
`mcp --profile <name>` and `mcp --profile <name> --allow-destructive`. A
profile that is empty or starts with `-` is rejected rather than treated as a
managed entry.

Mixed profiles across detected clients are an error, matching the existing
treatment of mixed access modes: doctor reports them and update refuses to
guess. Doctor also flags clients that do not all use a profile passed on the
command line.
@evan-sift
evan-sift force-pushed the rust/cli-agent-profiles branch from 7b42e6c to c2d051e Compare July 31, 2026 19:12
@evan-sift
evan-sift merged commit c012dfd into main Jul 31, 2026
22 checks passed
@evan-sift
evan-sift deleted the rust/cli-agent-profiles branch July 31, 2026 19:26
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.

2 participants