Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / WorkflowYamlDocument

Interface: WorkflowYamlDocument ​

Defined in: yaml/types.ts:8

Workflow YAML 文档的类型化形态(apiVersion: uniflow/v1)。 与 schemas/uniflow.workflow.schema.json 对齐;通常由 validateWorkflowYamlSource 产出。

Properties ​

apiVersion ​

apiVersion: "uniflow/v1"

Defined in: yaml/types.ts:10

API 版本,必须为 uniflow/v1。


kind ​

kind: "Workflow"

Defined in: yaml/types.ts:12

资源种类,固定为 Workflow。


metadata ​

metadata: object

Defined in: yaml/types.ts:14

工作流元数据。

description? ​

optional description?: string

可选人类可读说明。

id ​

id: string

工作流稳定 ID,对应引擎的 workflowId。


spec ​

spec: object

Defined in: yaml/types.ts:21

拓扑与策略主体。

entry? ​

optional entry?: string

可选入口提示;多数 flow 类型由 flow 自身决定调度。

flow ​

flow: YamlFlow

ControlFlow 拓扑(sequential / parallel / router / loop / dag / delegation)。

policy? ​

optional policy?: YamlPolicy

工作流级默认策略(重试、超时、预算等)。

units ​

units: YamlUnit[]

Unit 列表;每项通过 uses 解析插件。

MIT Licensed