v0.6.0

儲存

找出 KuraDB 在 ~/.config/kuradb/ 下保存的每個檔案,並分辨哪些具權威性、哪些可以重建。

儲存拓撲

持久 store

Store 權威性 內容
db.json 持久 registry 資料庫名稱與 UTC 建立時間
config.json 持久設定 可選的固定 HTTP port 與 remote MCP 開關
{db}/data.db Source of truth(權威資料源) file_data row:source、chunk 序號與總數、內容、embedding、embed 與 dismiss 旗標
global.db 持久快取 store query_cache row:query 文字對應 embedding blob

每個資料庫另有被監控的資料夾 {db}/inbox/,以符號連結 ~/Kura_{db} 對外提供。

程序與 watcher 狀態

檔案 權威性 內容
{db}/record.json Watcher snapshot 每個 inbox entry 的大小、mtime、目錄旗標與 child snapshot
runtime.uid 暫時程序狀態 UID、PID 與啟動時間;關閉時移除
endpoint 暫時服務發現 目前本機 HTTP base URL;關閉時移除
daemon.log 操作日誌 Daemon stdout 與 stderr,跨次執行附加寫入

記憶體快取

vector.Cache(每個資料庫一個 bucket,存 chunk 與 source 向量)與 openai.Cache(query 文字對應 embedding)是加速器,不是權威 store。Vector cache 在啟動時由 file_data.embedding 重建,query cache 由 global.db 預載;兩者都必須可由 SQLite 重建。

寫入如何維持這些 store 一致,見資料一致性。

EN