// History for a specific key
const phaseHistory = await db.state.history("phase", 10);
// [
// { id: "t1", key: "phase", value: "start", trigger: "init", timestamp: ... },
// { id: "t2", key: "phase", value: "review", trigger: "tests_passed", ... },
// ]
// All history
const allHistory = await db.state.history(undefined, 50);