feat: RFC-003 Agent Configuration Layer (Phase 1-5) #241
Reference in New Issue
Block a user
Delete Branch "feat/rfc-003-phase-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Full implementation of RFC-003: Agent Configuration Layer — separates agent infrastructure (type/model/timeout) from workflow business logic (prompt/schema).
Changes
Phase 1: Types + Config Schema
AgentFn,WorkflowContext(workdir + AbortSignal),ExtractFn,ExtractErrorAgentConfig,ExtractConfiginNerveConfignerve.yamlparser extended foragents+extractsectionsPhase 2: AgentRegistry + Echo Adapter
createAgentRegistry(agents)→{ get(name): AgentFn }type: echo) for testingPhase 3: Extract Layer
llmExtractWithRetry: retry-once with error contextmergeExtractConfig: three-level merge (global → agent → role)createLlmExtractFnfactory,ZodMetaSchemabridgePhase 4: WorkflowSpec Compiler
WorkflowSpec+RoleSpecauthoring typescompileWorkflowSpec: WorkflowSpec → WorkflowDefinition (runtime lazy compile)parseDurationStringToMsshared utilityRole<Meta>unchangedPhase 5: Integration
AgentRegistryon config hot-reload + logs eventnerve validatechecks: agent name refs, adapter type, extract configTesting
pnpm run checkcleanNot included
Ref: #234
Closes #235 #236 #237 #238 #239
- createAgentRegistry(agents) returns { get(name): AgentFn } - get() throws with agent name in message if not found - Echo adapter (type: 'echo') returns prompt as-is for testing - Tests: 5 cases covering get/throw/echo/multi-agent/AbortSignal Closes #236 Ref: #234feat(core): RFC-003 Phase 1 — Agent Config Types + Schemato feat: RFC-003 Agent Configuration Layer (Phase 1-5)✅ Hermes Agent Review — APPROVED
总评
RFC-003 Phase 1-5 实现质量很高,架构层次清晰,与 RFC 设计完全对齐。42 个文件改动量合理,每个 Phase 边界分明。
✅ 亮点
💡 Minor(不阻塞)
Reviewed by 小墨