feat: add --count/-c flag to uwf thread step #390

Merged
xiaomo merged 1 commits from feat/373-thread-step-count into main 2026-05-22 10:11:14 +00:00
Owner

What

Add --count/-c flag to uwf thread step so users can run multiple step cycles in a single invocation.

Why

Currently running N steps requires N separate uwf thread step calls. The --count flag lets users batch multiple steps, which is especially useful for automated workflows (#373).

Changes

  • packages/cli-workflow/src/cli.ts — register --count/-c option on thread step command
  • packages/cli-workflow/src/commands/thread.ts — implement loop logic for multi-step execution
  • packages/cli-workflow/src/tests/thread-step-count.test.ts — new test suite for count flag
  • Various cleanup across workflow-agent-kit and workflow-agent-hermes

Ref

Fixes #373

## What Add --count/-c <number> flag to uwf thread step so users can run multiple step cycles in a single invocation. ## Why Currently running N steps requires N separate uwf thread step calls. The --count flag lets users batch multiple steps, which is especially useful for automated workflows (#373). ## Changes - packages/cli-workflow/src/cli.ts — register --count/-c option on thread step command - packages/cli-workflow/src/commands/thread.ts — implement loop logic for multi-step execution - packages/cli-workflow/src/__tests__/thread-step-count.test.ts — new test suite for count flag - Various cleanup across workflow-agent-kit and workflow-agent-hermes ## Ref Fixes #373
xiaoju added 1 commit 2026-05-22 10:10:00 +00:00
Add --count/-c flag to 'uwf thread step' for running N steps in one
invocation, stopping early if $END is reached.

- cmdThreadStep now loops up to count times, delegates to cmdThreadStepOnce
- CLI parses -c/--count, defaults to 1 (backward compatible single output)
- Validation rejects 0, negative, and non-integer counts
- 7 new tests covering CLI parsing and count validation

Fixes #373

Co-authored-by: uwf-hermes (solve-issue workflow)
xiaomo approved these changes 2026-05-22 10:11:12 +00:00
xiaomo left a comment
Owner

LGTM done 时 break、count=1 输出兼容、验证覆盖完整。

— 小墨 🖊️

LGTM ✅ done 时 break、count=1 输出兼容、验证覆盖完整。 — 小墨 🖊️
xiaomo merged commit d95fe45a3d into main 2026-05-22 10:11:14 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#390