feat(adapters): add capability flags to ServerAdapterModule #2

Closed
farhoodliquor-paperclip[bot] wants to merge 2 commits from feat/adapter-plugin-capabilities into master
farhoodliquor-paperclip[bot] commented 2026-04-13 01:37:55 +00:00 (Migrated from github.com)

Summary

Replace 4 hardcoded adapter type lists across the server and UI with declarative capability flags on ServerAdapterModule, enabling external adapter plugins to declare their capabilities without modifying Paperclip source.

  • Add supportsInstructionsBundle, instructionsPathKey, and requiresMaterializedRuntimeSkills optional fields to ServerAdapterModule
  • Set explicit flags on all 10 built-in adapters in registry.ts
  • Replace hardcoded lists in agents.ts with capability-aware helpers (with legacy fallbacks)
  • Expose capabilities object in GET /api/adapters response
  • New useAdapterCapabilities React hook for UI components
  • Replace hardcoded allowlists/denylists in AgentDetail.tsx, AgentConfigForm.tsx, OnboardingWizard.tsx
  • 6 new tests (adapter-registry + adapter-routes), all passing
  • New "Capability Flags" documentation section in docs/adapters/creating-an-adapter.md
  • Fixes latent bug: gemini_local was missing from AgentDetail.tsx isLocal allowlist

Test plan

  • adapter-registry.test.ts: capability flags exposed, undefined when unset, correct on built-ins
  • adapter-routes.test.ts: capabilities in API response, correct per adapter, derived supportsSkills
  • Manual: verify instructions bundle tab shows for local adapters, hidden for non-local
  • Manual: verify agent config form shows cwd/instructions/skills for local adapters only
  • Manual: verify external adapter with supportsInstructionsBundle: true gets bundle editor

🤖 Generated with Claude Code

## Summary Replace 4 hardcoded adapter type lists across the server and UI with declarative capability flags on `ServerAdapterModule`, enabling external adapter plugins to declare their capabilities without modifying Paperclip source. - Add `supportsInstructionsBundle`, `instructionsPathKey`, and `requiresMaterializedRuntimeSkills` optional fields to `ServerAdapterModule` - Set explicit flags on all 10 built-in adapters in `registry.ts` - Replace hardcoded lists in `agents.ts` with capability-aware helpers (with legacy fallbacks) - Expose `capabilities` object in `GET /api/adapters` response - New `useAdapterCapabilities` React hook for UI components - Replace hardcoded allowlists/denylists in `AgentDetail.tsx`, `AgentConfigForm.tsx`, `OnboardingWizard.tsx` - 6 new tests (adapter-registry + adapter-routes), all passing - New "Capability Flags" documentation section in `docs/adapters/creating-an-adapter.md` - Fixes latent bug: `gemini_local` was missing from `AgentDetail.tsx` isLocal allowlist ## Test plan - [x] `adapter-registry.test.ts`: capability flags exposed, undefined when unset, correct on built-ins - [x] `adapter-routes.test.ts`: capabilities in API response, correct per adapter, derived supportsSkills - [ ] Manual: verify instructions bundle tab shows for local adapters, hidden for non-local - [ ] Manual: verify agent config form shows cwd/instructions/skills for local adapters only - [ ] Manual: verify external adapter with `supportsInstructionsBundle: true` gets bundle editor 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

Sign in to join this conversation.