Skip to content

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


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

Type Alias: TerminationPolicy

TerminationPolicy = { reasons: StopReason[]; type: "stop-reason"; } | { steps: number; type: "max-steps"; } | { predicate: (state) => boolean; type: "condition"; } | { targetUnitId: UnitId; type: "delegation"; } | { op: "and" | "or"; policies: TerminationPolicy[]; type: "composite"; }

Defined in: core/types.ts:84

Unit 终止策略:按 stopReason、最大步数、状态谓词、委托目标或组合逻辑判定是否结束该 Unit。

MIT Licensed