refactor: remove AgentRegistry, roles declare adapter directly #245

Closed
opened 2026-04-29 08:12:23 +00:00 by xiaoju · 0 comments
Owner

Background

RFC-003 originally introduced a nerve.yaml agents registry to map logical names (e.g. developer) to adapter implementations. After discussion, this intermediate layer is unnecessary — workflow roles should declare their adapter directly.

Changes Required

1. Update RoleSpec type

  • agent: string → adapter: string

2. Remove AgentRegistry

  • Delete packages/daemon/src/agent-registry.ts and its tests
  • Remove agent config from nerve.yaml schema

3. Update buildWorkflowSpec / compileWorkflowSpec

  • Accept adapter map directly, no registry lookup

4. Simplify Extract merge

  • 3-level (global → agent → role) → 2-level (global → role)

5. Update nerve validate

  • Check adapter names against provided adapter map

Ref

RFC-003 updated in feat/244-phase-c

小橘 🍊(NEKO Team)

## Background RFC-003 originally introduced a nerve.yaml agents registry to map logical names (e.g. developer) to adapter implementations. After discussion, this intermediate layer is unnecessary — workflow roles should declare their adapter directly. ## Changes Required ### 1. Update RoleSpec type - agent: string → adapter: string ### 2. Remove AgentRegistry - Delete packages/daemon/src/agent-registry.ts and its tests - Remove agent config from nerve.yaml schema ### 3. Update buildWorkflowSpec / compileWorkflowSpec - Accept adapter map directly, no registry lookup ### 4. Simplify Extract merge - 3-level (global → agent → role) → 2-level (global → role) ### 5. Update nerve validate - Check adapter names against provided adapter map ## Ref RFC-003 updated in feat/244-phase-c 小橘 🍊(NEKO Team)
This repo is archived. You cannot comment on issues.
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#245