Files
united-workforce/packages/workflow-cas/README.md
T
xiaoju 064696c558 docs: update architecture docs and package READMEs for post-split structure
- Rewrite docs/architecture.md with 15-package map, dependency graph, updated engine paths
- Update CLAUDE.md monorepo structure section
- Add READMEs for: workflow-protocol, workflow-runtime, workflow-util, workflow-cas, workflow-register, workflow-execute, workflow-reactor
- Fix agent READMEs: update deps from @uncaged/workflow to actual packages
- Mark workflow-as-agent plan as outdated

Fixes #153

小橘 <xiaoju@shazhou.work>
2026-05-09 04:39:57 +00:00

1.1 KiB

@uncaged/workflow-cas

Content-addressable storage implementation, bundle hashing, and Merkle helpers.

What This Package Does

It implements CasStore from @uncaged/workflow-protocol, hashes workflow bundle bytes and strings with XXH64, and builds serializable Merkle nodes for thread/step/content payloads used when persisting execution artifacts.

Key Exports

From src/index.ts:

  • CAS: createCasStore
  • Hash: hashString, hashWorkflowBundleBytes
  • Merkle: createContentMerkleNode, getContentMerklePayload, parseMerkleNode, putContentMerkleNode, putStepMerkleNode, putThreadMerkleNode, serializeMerkleNode
  • Types: CasStore, MerkleNode, MerkleNodeType, StepMerklePayload, ThreadMerklePayload

Dependencies

  • Workspace: @uncaged/workflow-protocol (CasStore contract), @uncaged/workflow-util
  • npm: xxhashjs, yaml

Usage

import { createCasStore, hashWorkflowBundleBytes } from "@uncaged/workflow-cas";
import { getGlobalCasDir } from "@uncaged/workflow-util";

const store = createCasStore(getGlobalCasDir());
const hash = await hashWorkflowBundleBytes(esmJsBytes);