Adapters declare their own category (finish #872 DRY)#887
Conversation
…ardcoded list Onboarding still kept a hardcoded NATIVE_AGENTS set to label the picker (native plugin vs MCP server), decoupled from the adapters and prone to the same drift as the agent list (#872) — it had even mislabeled openclaw. Add a category field to ConnectAdapter (default mcp; factory sets mcp; the 7 native plugin/hook adapters set native), derive the onboarding hint from a.category, and assert every adapter declares one so a future adapter without a category fails CI.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR introduces an adapter ChangesAdapter Category Classification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@rohitg00 I see for opencode that it's not classed as native, with comment:
Any reason that this wouldnt' be the default? If it were, would it be classsed as 'native', or is the bar higher than that (and could it be reached)? |
Follow-up to #883 (reporter feedback). The onboarding picker now derives its agent set from connect's ADAPTERS, but it still kept a hardcoded NATIVE_AGENTS set to choose the "native plugin" vs "MCP server" hint, decoupled from the adapters and prone to the same drift class as the original bug. It had even mislabeled openclaw (a factory/MCP adapter) as native.
Change
category?: "native" | "mcp"to ConnectAdapter (defaults to mcp).createJsonMcpAdaptersetsmcp(MCP-only by construction; OpenClaw passesnative).category: "native"; opencode/continue declaremcp.a.categoryand the hardcoded set is gone — ADAPTERS is now the single source for both the agent set and its grouping.continuecategory during development).Displayed grouping is unchanged (same 7 native); only the source of truth moved onto the adapters. build + full suite (1413) pass.
Summary by CodeRabbit
New Features
Tests