uncaged

AI Agent 项目开发

@uncaged/workflow-runtime (0.3.0)

Published 2026-05-11 10:52:00 +00:00 by xiaoju

Installation

@uncaged:registry=https://git.shazhou.work/api/packages/uncaged/npm/
npm install @uncaged/workflow-runtime@0.3.0
"@uncaged/workflow-runtime": "0.3.0"

About this package

@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);

Dependencies

Dependencies

ID Version
@uncaged/workflow-cas workspace:*
@uncaged/workflow-protocol workspace:*

Development Dependencies

ID Version
zod ^4.0.0

Peer Dependencies

ID Version
zod ^4.0.0
Details
npm
2026-05-11 10:52:00 +00:00
0
4.9 KiB
Assets (1)
Versions (20) View all
0.4.3 2026-05-13
0.4.2 2026-05-13
0.4.1 2026-05-13
0.3.24 2026-05-13
0.3.22 2026-05-13