feat(plugins): discover and aggregate provider plugins - #272
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Claude Code and Codex plugin adapters, normalizes provider plugin catalogs, validates provider responses, handles lifecycle timeouts, and exposes aggregated plugin discovery through the engine runtime and service. ChangesPlugin discovery
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant EngineService
participant EngineRuntime
participant PluginService
participant ProviderAdapters
EngineService->>EngineRuntime: listPlugins(opts)
EngineRuntime->>PluginService: list(opts)
PluginService->>ProviderAdapters: list(opts) concurrently
ProviderAdapters-->>PluginService: normalized plugin catalogs
PluginService-->>EngineRuntime: sorted aggregated plugins
EngineRuntime-->>EngineService: plugin list
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9848e73c7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryAdds read-only native plugin discovery and aggregation.
Confidence Score: 5/5The pull request appears safe to merge. No blocking failures remain.
What T-Rex did
|
| Filename | Overview |
|---|---|
| packages/host/agent-adapter/src/plugins/claude-code.ts | Adds Claude Code CLI catalog discovery, package metadata inspection, and schema normalization. |
| packages/host/agent-adapter/src/plugins/codex.ts | Adds deadline-bound Codex app-server discovery, per-entry detail fallback, and normalization. |
| packages/host/agent-adapter/src/native/codex/app-server.ts | Adds abort-signal propagation to the spawned Codex app-server. |
| packages/host/engine/src/plugin/service.ts | Aggregates provider catalogs concurrently with deterministic ordering and provider failure isolation. |
| packages/host/engine/src/engine.ts | Wires plugin aggregation into the Engine runtime with an injectable provider factory. |
Sequence Diagram
sequenceDiagram
participant C as Engine Consumer
participant E as Engine
participant P as PluginService
participant A as Provider Adapters
participant CLI as Claude/Codex Control Plane
C->>E: listPlugins(options)
E->>P: list(options)
par Claude Code discovery
P->>A: ClaudeCodePluginAdapter.list(options)
A->>CLI: plugin list + marketplace list
CLI-->>A: native catalog
and Codex discovery
P->>A: CodexPluginAdapter.list(options)
A->>CLI: plugin/list + plugin/read
CLI-->>A: native catalog
end
A-->>P: normalized plugins
P-->>E: sorted aggregate
E-->>C: Plugin[]
Reviews (2): Last reviewed commit: "fix(agent-adapter): harden plugin discov..." | Re-trigger Greptile
There was a problem hiding this comment.
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 `@packages/host/agent-adapter/src/plugins/codex.ts`:
- Around line 125-151: Guard the discovery server shutdown in list so the
timeout callback and the finally block share an idempotent close path. Update
the server.close usage around startServer, the DISCOVERY_TIMEOUT_MS timer, and
the finally cleanup so CodexAppServer.close is invoked at most once, including
when the request rejects after the timeout.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7c01cd37-5164-4280-850e-3129c22bf462
📒 Files selected for processing (12)
packages/host/agent-adapter/src/__tests__/claude-code-plugins.test.tspackages/host/agent-adapter/src/__tests__/codex-plugins.test.tspackages/host/agent-adapter/src/index.tspackages/host/agent-adapter/src/plugins/adapter.tspackages/host/agent-adapter/src/plugins/claude-code.tspackages/host/agent-adapter/src/plugins/codex.tspackages/host/agent-adapter/src/plugins/index.tspackages/host/engine/src/__tests__/plugin-service.test.tspackages/host/engine/src/deps.tspackages/host/engine/src/engine.tspackages/host/engine/src/plugin/service.tspackages/host/engine/src/service.ts
Summary
plugin list --available --jsonandplugin marketplace list --jsonplugin/listandplugin/read, including remote plugin identity, per-entry fallback, and process cleanupassetsempty in this phase because neither provider control plane supplies trusted LinkCode managed-tool requirementsCODE-432
This PR is intentionally read-only. It does not add wire messages, client/UI support, marketplace mutations, plugin installation, or asset installation.
Verification
pnpm format:checkpnpm typechecknode --max-old-space-size=8192 node_modules/eslint/bin/eslint.js --concurrency=off --format=sukka .(0 errors)pnpm test(246 files passed, 1 skipped; 1,926 tests passed, 1 skipped)The default local
pnpm check:cireached the known concurrent ESLint heap limit after its format step; the equivalent format, low-concurrency full-repo lint, and typecheck gates above all passed.Checklist
pnpm check:ciandpnpm testboth pass (local concurrent ESLint OOM; equivalent gates and full tests pass as documented above)WIRE_PROTOCOL_VERSIONis bumped (no wire changes)Summary by CodeRabbit
listPluginscapability.