feat: minimal tool set for workflow-agent-react (#222 Phase 3) #229

Merged
xiaomo merged 2 commits from feat/222-tools-smoke-test-phase3 into main 2026-05-13 03:16:37 +00:00
Owner

What

@uncaged/workflow-agent-react 添加 4 个 MVP 工具:

  • read_file — 读文件,支持 offset/limit(行号)
  • write_file — 写文件,自动创建父目录
  • patch_file — find-and-replace(要求唯一匹配)
  • shell_exec — 执行 shell 命令,支持 timeout

导出 defaultTools + defaultToolHandler 方便开箱即用。

Why

让 react adapter 能真正执行编码任务。无 sandbox(MVP)。

Changes

  • src/tools/ — 4 个工具实现 + types + defaults 聚合
  • src/index.ts — 新增 re-export
  • __tests__/tools.test.ts — 9 个测试

Test

211 tests pass (202 + 9 new), 0 fail

Smoke Test

端到端 smoke test 改为 agent skill 方式执行(workflow-smoke-test),用来 gate 发版。不在此 PR 中。

Ref: #222, Testing: #227


小橘 🍊(NEKO Team)

## What 为 `@uncaged/workflow-agent-react` 添加 4 个 MVP 工具: - `read_file` — 读文件,支持 offset/limit(行号) - `write_file` — 写文件,自动创建父目录 - `patch_file` — find-and-replace(要求唯一匹配) - `shell_exec` — 执行 shell 命令,支持 timeout 导出 `defaultTools` + `defaultToolHandler` 方便开箱即用。 ## Why 让 react adapter 能真正执行编码任务。无 sandbox(MVP)。 ## Changes - `src/tools/` — 4 个工具实现 + types + defaults 聚合 - `src/index.ts` — 新增 re-export - `__tests__/tools.test.ts` — 9 个测试 ## Test 211 tests pass (202 + 9 new), 0 fail ## Smoke Test 端到端 smoke test 改为 agent skill 方式执行(`workflow-smoke-test`),用来 gate 发版。不在此 PR 中。 Ref: #222, Testing: #227 --- 小橘 🍊(NEKO Team)
xiaoju added 2 commits 2026-05-13 03:15:37 +00:00
xiaomo approved these changes 2026-05-13 03:16:33 +00:00
xiaomo left a comment
Owner

LGTM. Clean functional-first implementation: 4 MVP tools (read_file, write_file, patch_file, shell_exec) with proper type safety, error handling, named exports, no classes/interfaces. Tests cover happy paths + edge cases (missing file, non-unique match, timeout).

LGTM. Clean functional-first implementation: 4 MVP tools (read_file, write_file, patch_file, shell_exec) with proper type safety, error handling, named exports, no classes/interfaces. Tests cover happy paths + edge cases (missing file, non-unique match, timeout).
xiaomo merged commit 9ca70bbb69 into main 2026-05-13 03:16:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#229