feat: Phase 1 — CAS thread storage types + helpers

- Add StartNode, StateNode, ContentMerkleNode types to workflow-protocol
- Add collectRefs() to workflow-cas — extracts CAS hashes from StateNode payload
- Add findReachableHashes() to workflow-cas — recursive mark traversal via refs[]
- Tests: 7 pass (collect-refs + reachable)

Refs #155, closes #156

小橘 <xiaoju@shazhou.work>
This commit is contained in:
2026-05-09 07:30:47 +00:00
parent 8f78a00063
commit 6f000512d2
9 changed files with 280 additions and 34 deletions
+3
View File
@@ -2,6 +2,9 @@
"name": "@uncaged/workflow-cas",
"version": "0.1.0",
"type": "module",
"scripts": {
"test": "bun test"
},
"exports": {
".": {
"types": "./dist/index.d.ts",