26cf51366f
- Add buildThreadContext(headHash, cas) to workflow-runtime
- Expand extract phase to return { meta, contentPayload, refs[] }
- Add parseCasThreadNode() to workflow-cas for node type parsing
- Update createWorkflow to write ContentMerkleNode with artifact refs
- Tests: 4 pass (build-context + extract-refs)
- Biome format pass on all files
Refs #155, closes #158
小橘 <xiaoju@shazhou.work>
10 lines
214 B
TypeScript
10 lines
214 B
TypeScript
import type { Result } from "./types.js";
|
|
|
|
export function ok<T>(value: T): Result<T, never> {
|
|
return { ok: true, value };
|
|
}
|
|
|
|
export function err<E>(error: E): Result<never, E> {
|
|
return { ok: false, error };
|
|
}
|