Files
united-workforce/packages/workflow-runtime
xingyue 522afdd4bd feat: adopt changesets + fix exports, bump to 0.4.0
- Install @changesets/cli with fixed mode (all @uncaged/* packages sync version)
- Fix package exports: add bun condition, point import to dist/
- Bump all packages to 0.4.0 via changeset version
- Auto-generated CHANGELOG.md for each package
- Ignore workflow-dashboard (private)
- Add npm scripts: changeset, version, release
- publish.sh: support workspace:^ prefix matching

Closes #241, Closes #242
2026-05-13 20:56:21 +08:00
..

@uncaged/workflow-runtime

Workflow author API: createWorkflow plus re-exports of protocol workflow types.

What This Package Does

Bundle code imports createWorkflow to turn a WorkflowDefinition plus AgentBinding into a WorkflowFn generator. It re-exports the protocol types and constants most authors need so workflows rarely import @uncaged/workflow-protocol directly.

Key Exports

From src/index.ts:

  • Functions: createWorkflow, ok, err
  • Types: AgentBinding, AgentContext, AgentFn, CasStore, ExtractContext, ExtractFn, LlmProvider, Moderator, ModeratorContext, Result, RoleDefinition, RoleMeta, RoleOutput, RoleStep, StartStep, ThreadContext, WorkflowCompletion, WorkflowDefinition, WorkflowDescriptor, WorkflowFn, WorkflowResult, WorkflowRoleDescriptor, WorkflowRoleSchema, WorkflowRuntime
  • Constants: END, START

Dependencies

  • Workspace: @uncaged/workflow-protocol — contract types and helpers
  • Peer: zod ^4 — matches schema usage on role definitions

Usage

import { createWorkflow, type WorkflowDefinition, type AgentBinding } from "@uncaged/workflow-runtime";

export const run = createWorkflow(myDefinition, myBinding);