refactor: unified Store type — CasStore + VarStore + TagStore #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
packages/core/src/variable-store.tsdirectly importsbun:sqlite, breaking core's store-agnostic principle. Additionally,StoreandVariableStoreare separate unrelated types, making the API surface fragmented.Design
Unified
StoretypeCasStore
VarStore
TagStore (NEW)
Tags become a first-class concept on CAS nodes directly, not just on variables. Variable tags are unified as tags on
variable.value(hash).Implementation Plan
CasStore,VarStore,TagStore,Storetypes incore/src/types.tscreateMemoryStore(): Storein core (pure in-memory, all three)VariableStoretofs, implement as part ofcreateFsStore(): StoreTagStoreimplementationbootstrap(),gc(),render()to acceptStore(single param)store.cas.*,store.var.*,store.tag.*@ocas/corehas zerobun:sqliteimportsAPI Change
Breaking Change
All public API surfaces change. Major version bump candidate (0.2.0).
小橘 🍊(NEKO Team)
refactor: move VariableStore implementation from core to fsto refactor: unified Store type — CasStore + VarStore + TagStore#38 Complete ✅
All 5 phases done:
Results:
Store = { cas: CasStore, var: VarStore, tag: TagStore }✅bun:sqlitein@ocas/core✅Ready for v0.2.0.
小橘 🍊(NEKO Team)