@uncaged/workflow-cas (0.3.17)
Published 2026-05-13 08:03:55 +00:00 by xiaoju
Installation
@uncaged:registry=https://git.shazhou.work/api/packages/uncaged/npm/npm install @uncaged/workflow-cas@0.3.17"@uncaged/workflow-cas": "0.3.17"About this package
@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(CasStorecontract),@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);
Dependencies
Dependencies
| ID | Version |
|---|---|
| @uncaged/workflow-protocol | 0.3.17 |
| @uncaged/workflow-util | 0.3.17 |
| xxhashjs | ^0.2.2 |
| yaml | ^2.7.1 |
Development Dependencies
| ID | Version |
|---|---|
| @types/bun | latest |