Content Addressable Store (CAS) for Git.
- Value Objects:
ManifestandChunkrepresent the structured metadata of an asset. - Services:
CasServiceimplements streaming chunking, encryption (AES-256-GCM), and manifest generation.
- GitPersistencePort: Defines how blobs and trees are saved to Git.
- CodecPort: Defines how manifests are encoded (JSON, CBOR).
- Adapters:
GitPersistenceAdapterimplementation using@git-stunts/plumbing. - Codecs:
JsonCodecandCborCodec.
- Chunk Size: Configurable, default 256KB. Minimum 1KB.
- Streaming: Encryption and chunking are fully streamed. Memory usage is constant (O(1)) relative to file size.
- Manifest Limit: Currently, all chunk metadata is stored in a single flat
manifestblob. For extremely large files (>100GB), the manifest itself may become unwieldy (linear growth). Future iterations may require a Merkle Tree structure for the manifest itself.
src/
├── domain/
│ ├── schemas/ # Zod and JSON schemas
│ ├── services/ # CasService
│ └── value-objects/ # Manifest, Chunk
├── infrastructure/
│ ├── adapters/ # GitPersistenceAdapter
│ └── codecs/ # JsonCodec, CborCodec
└── ports/ # GitPersistencePort, CodecPort