Phase 5 Testing: uwf-agent-kit 框架 #314

Closed
opened 2026-05-18 08:48:02 +00:00 by xiaoju · 1 comment
Owner

Ref: #309

验证目标

提供 agent 作者可用的框架:读 thread context、执行 extract、写 StepNode、输出 hash。

前置条件

Phase 1-4 完成。

测试步骤

  • Step 1: createAgent API
    createAgent({ name, run }) 可调用,类型正确
    预期: run 回调收到 ctx(role, systemPrompt, threadContext, prompt)

  • Step 2: Thread context 读取
    agent-kit 从 CAS 读 thread 链,构建完整上下文
    预期: prompt 来自 StartNode,systemPrompt 来自 role 定义,history 含已有 steps

  • Step 3: Extract 功能
    agent-kit 调 LLM(从 config.yaml models + .env 读配置)提取符合 outputSchema 的结构化 output
    预期: output 符合 schema,写入 CAS 为独立节点

  • Step 4: StepNode 写入
    agent-kit 构建 StepNode(start, prev, role, output, detail, agent)并写入 CAS
    预期: json-cas get <hash> 返回正确的 StepNode

  • Step 5: stdout 输出
    agent CLI 执行完毕后 stdout 输出 StepNode hash(纯文本一行,13 字符)
    预期: 格式正确

  • Step 6: 不挪链头指针
    执行后 threads.yaml 中的 head 未被 agent 修改
    预期: threads.yaml 不变

验证完成标准

所有 checkbox 打勾

Ref: #309 ## 验证目标 提供 agent 作者可用的框架:读 thread context、执行 extract、写 StepNode、输出 hash。 ## 前置条件 Phase 1-4 完成。 ## 测试步骤 - [ ] **Step 1: createAgent API** `createAgent({ name, run })` 可调用,类型正确 **预期:** run 回调收到 ctx(role, systemPrompt, threadContext, prompt) - [ ] **Step 2: Thread context 读取** agent-kit 从 CAS 读 thread 链,构建完整上下文 **预期:** prompt 来自 StartNode,systemPrompt 来自 role 定义,history 含已有 steps - [ ] **Step 3: Extract 功能** agent-kit 调 LLM(从 config.yaml models + .env 读配置)提取符合 outputSchema 的结构化 output **预期:** output 符合 schema,写入 CAS 为独立节点 - [ ] **Step 4: StepNode 写入** agent-kit 构建 StepNode(start, prev, role, output, detail, agent)并写入 CAS **预期:** `json-cas get <hash>` 返回正确的 StepNode - [ ] **Step 5: stdout 输出** agent CLI 执行完毕后 stdout 输出 StepNode hash(纯文本一行,13 字符) **预期:** 格式正确 - [ ] **Step 6: 不挪链头指针** 执行后 threads.yaml 中的 head 未被 agent 修改 **预期:** threads.yaml 不变 ## 验证完成标准 ✅ 所有 checkbox 打勾
Author
Owner

Closing: old architecture testing phase, superseded by uwf redesign.

— 小橘 🍊(NEKO Team)

Closing: old architecture testing phase, superseded by uwf redesign. — 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#314