Repository navigation
refactor: add per-agent types and register setup adapters - #137
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Stephen Belanger (Qard)
force-pushed
the
refactor/split-server
branch
from
October 6, 2026 13:24
eec2bf7 to
20d2381
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 13:24
fd8b9b2 to
e53e7b3
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Oct 6, 2026
Stephen Belanger (Qard)
force-pushed
the
refactor/split-server
branch
from
October 6, 2026 14:04
20d2381 to
3e929a7
Compare
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 14:04
e53e7b3 to
cb15fd5
Compare
Introduce `agents`, with one type per supported coding agent and an `Identity` holding its CLI id, hook source, aliases and display name. Each capability is a trait the agent types implement. An agent adds itself to the registries for the capabilities it supports in `Register::register`, so a command looks agents up in its own registry and an unsupported capability is simply absent. Setup is the first capability. Each setup module now implements `Setup` for its agent type instead of exposing free functions, and run_enable, run_disable, run_update and update_warning dispatch through the registry rather than matching on SetupAgent. The doctor's per-agent activation warnings for Grok and Cursor move into their `Setup` impls. The clap enums keep defining the CLI surface and map each variant to an agent identity. The display-name and id tables duplicated in setup, doctor and transcript import now come from those identities. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Stephen Belanger (Qard)
force-pushed
the
refactor/agent-registry
branch
from
October 6, 2026 14:44
cb15fd5 to
a85a5e8
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.
Summary
Based on
mainnow that #136 has merged.This adds the agent model for the rest of the reorganization:
A command looks agents up in its own registry, so an agent that lacks a capability simply isn't there. There is no central descriptor listing every agent's features.
Setup is the first capability:
setup/<agent>.rsnow hasimpl Setup for <Agent>instead of freeenable/disable/update/stalefunctions.run_enable,run_disable,run_updateandupdate_warningdispatch through the registry instead of matching onSetupAgent.trace_runtime.rsinto the Grok and CursorSetupimpls (activation_warning).Identities replace duplicated tables. The clap enums (
SetupAgent,DoctorAgent,ImportSource) still define the CLI surface, so value names and aliases are unchanged. Each enum gainsidentity(), which maps a variant to its agent. That replaces the id and display-name tables duplicated in:setup(agent_details)DoctorAgent::source/display_nametranscript_import::source_nameA new test checks that every
SetupAgentvariant has a registered setup adapter.The next PR registers the remaining capabilities (translators, managed runs, transcript import) the same way.
Behaviour
None. The same CLI commands and output strings, and the same doctor warnings.
CommandRunneris now passed as&mut dynso the trait can be used as an object.Testing
cargo clippy --all-features --all-targets -D warningsis clean.cargo test --all-features --no-fail-fast: everything passes, including the new registry test, excepttrace_runtime::tests::doctor_reports_a_daemon_that_{cannot_authenticate_the_route,resolves_other_credentials}. Those fail the same way onmainin my local environment.🤖 Generated with Claude Code