Skip to content

11 Storage

KepCup 开发助理 edited this page Oct 24, 2026 · 1 revision

11 Storage

Source: docs/design/11-storage.md

Data directory (D26)

~/.kepcup/ — databases, bot files, wiki git repos, wiki-store blobs, logs, caches.

Engine (D24)

better-sqlite3-multiple-ciphers + FTS5 + sqlite-vec. Rejected libSQL for missing field-level encryption / integrity properties needed here.

DB split

Typically main.db (conversations, bots, schedules, …) and runs.db (runs, steps, tool_effects). Cross-DB settlement cannot be one SQL transaction — host ordering + repair (D75).

Encryption (D25)

Master key in OS keychain; per-DB derived keys; API keys and tokens field-encrypted. LLM sees aliases / “configured” flags, not raw secrets.

Git

Used for wiki histories and workdir shadow checkpoints — not as the primary app database.

Clone this wiki locally