Skip to content

feat(agentplugins): support comma-separated targets - #50

Merged
777genius merged 2 commits into
mainfrom
feat/agentplugins-multi-target
Aug 11, 2026
Merged

feat(agentplugins): support comma-separated targets#50
777genius merged 2 commits into
mainfrom
feat/agentplugins-multi-target

Conversation

@777genius

@777genius 777genius commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept ordered comma-separated targets such as --target codex,cursor
  • run add, update, repair, and remove through the existing per-client lifecycle
  • preserve successful client changes and return a non-zero batch summary on partial failure
  • keep single-target and no-target behavior unchanged

Verification

  • go test ./... in cli/plugin-kit-ai
  • isolated binary add/remove E2E with fresh Codex and Cursor sandbox homes
  • JSON batch, deduplication, invalid target, and partial failure tests

Summary by CodeRabbit

  • New Features

    • Added support for comma-separated target selection across install, update, repair, and removal commands.
    • Targets are processed independently with deduplication, per-target results, and progress reporting.
    • Added aggregated JSON output for batch operations.
    • Successful changes are retained when another target fails, with a non-zero exit status and clear failure summaries.
    • Improved validation for unsupported, ambiguous, or unsafe target values.
  • Documentation

    • Added examples and guidance for multi-target operations, including partial-failure behavior.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@777genius, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c939ee2-d0e5-4f77-b62e-db5032b26eb1

📥 Commits

Reviewing files that changed from the base of the PR and between 7b9409d and bab4043.

📒 Files selected for processing (2)
  • cli/plugin-kit-ai/internal/agentpluginscli/cli_test.go
  • cli/plugin-kit-ai/internal/agentpluginscli/lifecycle.go
📝 Walkthrough

Walkthrough

The agentplugins CLI now accepts ordered, comma-separated targets for lifecycle commands. It validates and deduplicates targets, executes them independently, aggregates human-readable or versioned JSON results, and reports partial failures without rolling back successful changes.

Changes

Multi-target lifecycle commands

Layer / File(s) Summary
Target parsing and validation
cli/plugin-kit-ai/internal/agentpluginscli/target_batch.go, cli/plugin-kit-ai/internal/agentpluginscli/root.go
Target options support comma-separated clients with whitespace trimming, deduplication, supported-client validation, and rejection of invalid combinations.
Batch lifecycle execution
cli/plugin-kit-ai/internal/agentpluginscli/target_batch.go, cli/plugin-kit-ai/internal/agentpluginscli/add.go, cli/plugin-kit-ai/internal/agentpluginscli/lifecycle.go
Add, update, repair, and remove execute through runForTargets. The CLI captures per-target results, aggregates JSON output, preserves successful changes, and returns errors for failed targets.
Batch validation and documentation
cli/plugin-kit-ai/internal/agentpluginscli/cli_test.go, README.md, npm/agentplugins/README.md, CHANGELOG.md
Tests cover parsing, deduplication, invalid values, partial failures, persisted state, and batch JSON. Documentation describes sequential multi-target execution and failure behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AgentpluginsCLI
  participant runForTargets
  participant LifecycleCommand
  AgentpluginsCLI->>runForTargets: Submit validated target list
  runForTargets->>LifecycleCommand: Execute operation for each target
  LifecycleCommand-->>runForTargets: Return per-target output or error
  runForTargets-->>AgentpluginsCLI: Return aggregate results and status
Loading

Possibly related PRs

Poem

A rabbit hops through targets in a row,
Codex first, then Cursor goes.
One may fail, but one stays bright,
JSON records each result right.
Commas guide the meadow run.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes support for comma-separated targets, which is the main change.
Description check ✅ Passed The description covers the main change and verification, but it omits the Release Impact section from the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agentplugins-multi-target

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cli/plugin-kit-ai/internal/agentpluginscli/lifecycle.go`:
- Around line 44-46: Reuse a single buffered input reader across the complete
repair batch: in lifecycle.go lines 44-46, create the reader before
runForTargets and pass it into every runRepair invocation instead of letting
runRepair create one per target. In cli_test.go lines 104-179, add an
interactive multi-target repair test supplying distinct confirmations for both
targets to verify the shared reader behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9fe31f2f-d65b-495f-ae23-b476b15f5deb

📥 Commits

Reviewing files that changed from the base of the PR and between b9f7353 and 7b9409d.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • README.md
  • cli/plugin-kit-ai/internal/agentpluginscli/add.go
  • cli/plugin-kit-ai/internal/agentpluginscli/cli_test.go
  • cli/plugin-kit-ai/internal/agentpluginscli/lifecycle.go
  • cli/plugin-kit-ai/internal/agentpluginscli/root.go
  • cli/plugin-kit-ai/internal/agentpluginscli/target_batch.go
  • npm/agentplugins/README.md

Comment thread cli/plugin-kit-ai/internal/agentpluginscli/lifecycle.go
@777genius
777genius merged commit 20393a1 into main Aug 11, 2026
14 checks passed
@777genius
777genius deleted the feat/agentplugins-multi-target branch August 11, 2026 16:19
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.

1 participant