feat: workflowAsAgent factory #39

Merged
xiaoju merged 1 commits from feat/33-workflow-as-agent into main 2026-05-07 10:52:41 +00:00
Owner

What

workflowAsAgent(name) — invoke workflows as agents.

Changes

  • workflow-as-agent.ts — factory: name → registry → bundle → child thread → summary
  • Depth limit (max 3) prevents infinite recursion
  • WorkflowFnOptions.depth, ModeratorContext.depth added
  • Unit + integration tests, 146 passing

Ref

Fixes #33, Refs #25

## What `workflowAsAgent(name)` — invoke workflows as agents. ## Changes - `workflow-as-agent.ts` — factory: name → registry → bundle → child thread → summary - Depth limit (max 3) prevents infinite recursion - `WorkflowFnOptions.depth`, `ModeratorContext.depth` added - Unit + integration tests, 146 passing ## Ref Fixes #33, Refs #25
xiaoju added 1 commit 2026-05-07 10:52:39 +00:00
- workflowAsAgent(name) resolves via registry → bundle → child thread
- System-level depth limit (max 3, constant)
- Returns summary string, errors as string (no throw)
- Integration test with nested workflow execution
- 146 tests passing

Fixes #33
xiaoju merged commit 4403532f35 into main 2026-05-07 10:52:41 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#39