GM-HZ/dsh-workflow--packages-catalog ↗★ 1

@gm-hz/dsh-dag-workflow-catalog

Draft, CAS, validation and immutable revision catalog for DSH workflows 核心用途是管理工作流模板的草稿、并发控制、编译验证及不可变发布版本。适合需要对工作流进行版本控制、增量构建和完整性校验的开发者。

Package
@gm-hz/dsh-dag-workflow-catalog
Compatibility
Unverified
Version
0.1.0
License
MIT
Last updated
Aug 23, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

@gm-hz/dsh-dag-workflow-catalog

Workflow Template 的 draft、乐观并发和不可变发布版本领域层。

const repository = new InMemoryWorkflowCatalogRepository()
const catalog = new WorkflowTemplateCatalog(repository, workflowNodeRegistry)

const draft = catalog.createDraft(template)
const next = catalog.updateDraft(draft.id, draft.revision, editedTemplate)
const diagnostics = catalog.validate(next.template)
const published = catalog.publish(next.id, next.revision)

语义

  • draft revision 从 1 开始,每次 update 必须携带 expectedRevision。
  • draft 可以暂时无效,便于 Agent/Canvas 增量构建;publish 必须通过完整编译校验。
  • published revision 独立单调递增,内容、节点版本、content hash 和 semantic hash 不可变。
  • semantic hash 排除 layout,content hash 包含完整模板。
  • diff() 分开报告 node、edge、layout 与 semantic 变化。
  • Repository 接口把原子 CAS/publish 交给存储 provider;内存实现用于测试,SQLite provider 单独实现。