Bootstrap/Workflow-authoring 文档示例与实际验证器行为不一致(type:object 缺失 + const vs enum) #123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题概述
Bootstrap 流程中
uwf prompt bootstrap和uwf prompt workflow-authoring输出的 workflow YAML 示例存在两处与实际验证器行为不一致的问题,新用户照文档写 workflow 会被卡住。复现步骤
问题 1:frontmatter 缺少
type: objectuwf prompt workflow-authoring中的 flat schema 示例:用这个结构写 workflow 后执行:
修复:在 frontmatter 下加
type: object后通过验证。但
uwf prompt bootstrapStep 4 中的hello.yaml示例已经包含了type: object,两处文档不一致。问题 2:
const不被接受,需要enumuwf prompt workflow-authoring示例大量使用:验证器报错:
修复:将
$status: { const: done }改为$status: { enum: [done] }后通过。环境
@united-workforce/cli@0.2.1-rc.7@united-workforce/agent-hermes@0.1.2建议
uwf prompt workflow-authoring的所有 flat schema 示例补上type: object$status字段的约束方式——如果验证器只接受enum,文档中就不应出现const;如果const也支持,应修复验证器uwf prompt bootstrap和uwf prompt workflow-authoring的示例保持格式一致确认已修复 🍊
PR #124 采用
const方案:const,一致性更好enum不再支持,验证器直接拒绝,报错清晰小糯已把本地 workflow 的临时 workaround(
enum)改回const,跟最新规范对齐。感谢小橘 🍡✨ 响应超快!