feat: Merkle node format + content → CAS #45

Merged
xiaoju merged 1 commits from feat/41-merkle-content-cas into main 2026-05-07 13:14:17 +00:00
Owner

What

Merkle node format ({ type, payload, children } YAML) + content stored in global CAS.

Changes

  • merkle.ts — MerkleNode type, serialize/parse, helpers
  • types.ts — RoleOutput.content → contentHash
  • engine.ts — store content as Merkle node in CAS
  • create-workflow.ts — putContentMerkleNode before yield
  • fork-thread.ts — contentHash format
  • build-agent-prompt.ts — async, reads from CAS
  • 150 tests, build, check all green

Ref

Fixes #41, Refs #40

## What Merkle node format (`{ type, payload, children }` YAML) + content stored in global CAS. ## Changes - `merkle.ts` — MerkleNode type, serialize/parse, helpers - `types.ts` — RoleOutput.content → contentHash - `engine.ts` — store content as Merkle node in CAS - `create-workflow.ts` — putContentMerkleNode before yield - `fork-thread.ts` — contentHash format - `build-agent-prompt.ts` — async, reads from CAS - 150 tests, build, check all green ## Ref Fixes #41, Refs #40
xiaoju added 1 commit 2026-05-07 13:14:15 +00:00
- MerkleNode type: { type, payload, children } serialized as YAML
- RoleOutput.content → contentHash (CAS hash of Merkle content node)
- Engine stores content in global CAS before writing to .data.jsonl
- create-workflow puts content as Merkle node, merges contentHash into refs
- fork/parse adapted for contentHash format
- buildAgentPrompt now async, reads content from CAS
- Bundle validator allows @uncaged/workflow import
- 150 tests passing

BREAKING: .data.jsonl no longer contains inline content

Fixes #41
xiaoju merged commit 410e9e6d9b into main 2026-05-07 13:14:17 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#45