-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
CAS-001: Content store core
Parent: #271 (M13 VESSEL)
Deliverable
New module src/content.js with:
writeContent(plumbing, graph, nodeId, buffer, { mime, encoding })— writes blob viagit hash-object -w --stdin, sets_content.*properties on node via patchreadContent(plumbing, graph, nodeId)— reads_content.shaproperty, retrieves blob viagit cat-file blob <sha>, verifies SHA integrity on readgetContentMeta(graph, nodeId)— returns{ sha, mime, size, encoding }from node propertieshasContent(graph, nodeId)— boolean check for_content.shapropertydeleteContent(graph, nodeId)— removes_content.*properties via patch
Design
- Property convention:
_content.sha,_content.mime,_content.size,_content.encoding - SHA integrity: verify blob SHA matches stored
_content.shaon read - Fails if node doesn't exist in graph
- Overwriting content updates properties; old blob stays in git object store
- Requires plumbing instance —
graph.jsrefactored to expose it fromloadGraph()
Exports
Added to src/index.js public API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request