Skip to content

rust(feat): add sift-cli agent lifecycle for Claude and Codex - #704

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

rust(feat): add sift-cli agent lifecycle for Claude and Codex#704
evan-sift merged 1 commit into
mainfrom
rust/cli-agent-claude-codex

Conversation

@evan-sift

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

Copy link
Copy Markdown
Collaborator

Changes

Adds sift-cli agent install|update|doctor|uninstall, replacing the removed project-scoped skill writer with four stateless, user-scoped commands. State is derived from the installed files and each client's own MCP config, so there is no state file to drift.

Registers through each client's native CLI (claude mcp, codex mcp) rather than editing their config files. A Codex registration counts as Sift-managed only when both the transport and the surrounding metadata match what this CLI writes, so a hand-tuned entry is reported as a conflict instead of being silently replaced. Native replacement is remove-then-add, and a failed add restores the previous entry.

Install and update preflight every target and refuse to touch an unmanaged same-name skill or MCP entry. Skill install mirrors the embedded bundle exactly, so files a previous release left behind are removed. Registrations default to read-only; update preserves whatever mode is installed and rejects a mixed fleet rather than choosing for the user.

Points the MCP server's instructions and destructive-tool refusal at these commands, and makes agent update refuse to run on an outdated CLI, printing the installer for the newer release. Release lookup now skips drafts and prereleases.

Verification

  • cargo fmt --check --all, cargo clippy --all-features, cargo test --all-features
  • 11 new cmd::agent tests plus the cmd::version release-filter test

Note for reviewers

Rollback of a partial multi-client install is covered here by the native replacement test. The cross-client transaction tests arrive with the JSON-backed clients in the next PR, which can be driven directly without a fake process runner.

Comment thread rust/crates/sift_cli/src/cli/mod.rs
Comment thread rust/crates/sift_cli/src/cmd/agent/files.rs
Comment thread rust/crates/sift_cli/src/cmd/agent/skill.rs Outdated
Comment thread rust/crates/sift_cli/src/cmd/version.rs
Comment thread rust/crates/sift_cli/src/cmd/version.rs
@evan-sift
evan-sift force-pushed the rust/cli-agent-claude-codex branch from 81b3cfc to 9765e68 Compare July 31, 2026 01:01
lineville
lineville previously approved these changes Jul 31, 2026
@evan-sift
evan-sift marked this pull request as draft July 31, 2026 16:35
@evan-sift
evan-sift marked this pull request as ready for review July 31, 2026 16:35
@evan-sift
evan-sift force-pushed the rust/cli-agent-claude-codex branch from 9765e68 to 0b8fab0 Compare July 31, 2026 17:19
@evan-sift
evan-sift force-pushed the rust/cli-agent-claude-codex branch from 0b8fab0 to 1e34e5b Compare July 31, 2026 18:09
@evan-sift
evan-sift force-pushed the rust/cli-agent-claude-codex branch from 1e34e5b to c33ac22 Compare July 31, 2026 18:27
Base automatically changed from rust/cli-sift-plugin-bundle to main July 31, 2026 18:41
Add `sift-cli agent install|update|doctor|uninstall`, replacing the removed
project-scoped skill writer with four stateless, user-scoped commands. State is
derived from the installed files and each client's own MCP config, so there is
no state file to drift.

Register through each client's native CLI (`claude mcp`, `codex mcp`) rather
than editing their config files. Codex registrations are only treated as
Sift-managed when both the transport and the surrounding metadata match what
this CLI writes, so a hand-tuned entry is reported as a conflict instead of
being silently replaced. Native replacement is remove-then-add, and a failed
add restores the previous entry.

Install and update preflight every target and refuse to touch an unmanaged
same-name skill or MCP entry. Skill install mirrors the embedded bundle
exactly, so files a previous release left behind are removed. Registrations
default to read-only; update preserves whatever mode is already installed and
rejects a mixed fleet rather than picking for the user.

Point the MCP server's instructions and destructive-tool refusal at these
commands, and make `agent update` refuse to run on an outdated CLI, printing
the installer for the newer release. Release lookup now skips drafts and
prereleases.

Rollback of a partial multi-client install is covered by the native
replacement test here; the cross-client transaction tests arrive with the
JSON-backed clients, which can be driven without a fake process runner.
@evan-sift
evan-sift force-pushed the rust/cli-agent-claude-codex branch from c33ac22 to 7f0b6a3 Compare July 31, 2026 18:41
@evan-sift
evan-sift merged commit 6bceead into main Jul 31, 2026
22 checks passed
@evan-sift
evan-sift deleted the rust/cli-agent-claude-codex branch July 31, 2026 18:59
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