Phase 2 Testing: AgentRegistry + Mock Adapter #236
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
验证目标
AgentRegistry 从 nerve.yaml 读取 agents 配置,按名字返回 AgentFn。Echo adapter 用于测试。
前置条件
Phase 1 (#235) 完成。在
packages/daemon中工作。测试步骤
Step 1: AgentRegistry 创建
预期: 返回 AgentFn,不返回 null
Step 2: 不存在的 agent 报错
预期: throw Error,消息包含 agent name
Step 3: Echo adapter 工作
预期: result === "hello world"
Step 4: 多个 agent 独立配置
预期: registry.get("developer") 和 registry.get("ops") 返回不同 AgentFn 实例
Step 5: AbortSignal 在 context 中可访问
预期: echo adapter 接收到 context.signal
验证完成标准
✅ 所有 checkbox 打勾 | ✅
pnpm test通过Ref: #234