frigg 0.9.1

Frigg gives AI agents local, source-backed code search and navigation without sending whole repositories through every prompt.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shared auto-repair hooks for regenerable storage invariants.
//!
//! Repairs regenerable storage invariants when verification fails; invoked from startup gates and
//! maintenance commands.

use frigg::domain::FriggResult;
use frigg::storage::Storage;

/// Initializes storage and auto-repairs regenerable invariants when verification fails.
pub(crate) fn initialize_storage_with_auto_repair(storage: &Storage) -> FriggResult<Vec<String>> {
    storage.initialize_with_auto_repair()
}

/// Verifies storage invariants and attempts one repair pass before surfacing the original error.
pub(crate) fn verify_storage_with_auto_repair(storage: &Storage) -> FriggResult<Vec<String>> {
    storage.verify_with_auto_repair()
}