pub struct NativeGitStorage;Expand description
Git-native session storage using gix.
Stores session data (HAIL JSONL + metadata JSON) as blobs on an explicit hidden ledger ref without touching the working directory.
Implementations§
Source§impl NativeGitStorage
impl NativeGitStorage
Sourcepub fn store_session_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
session_id: &str,
hail_jsonl: &[u8],
meta_json: &[u8],
commit_shas: &[String],
) -> Result<StoredSessionRecord>
pub fn store_session_at_ref( &self, repo_path: &Path, ref_name: &str, session_id: &str, hail_jsonl: &[u8], meta_json: &[u8], commit_shas: &[String], ) -> Result<StoredSessionRecord>
Store a session at an explicit ref name.
Stores body and metadata blobs plus per-commit index entries:
v1/index/commits/<sha>/<session_id>.json.
Sourcepub fn store_summary_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
record: &SessionSummaryLedgerRecord,
) -> Result<StoredSummaryRecord>
pub fn store_summary_at_ref( &self, repo_path: &Path, ref_name: &str, record: &SessionSummaryLedgerRecord, ) -> Result<StoredSummaryRecord>
Store a session semantic summary at an explicit ref.
Paths:
v1/summaries/<prefix>/<session_id>.summary.jsonv1/summaries/<prefix>/<session_id>.summary.meta.json
Sourcepub fn load_summary_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
session_id: &str,
) -> Result<Option<SessionSummaryLedgerRecord>>
pub fn load_summary_at_ref( &self, repo_path: &Path, ref_name: &str, session_id: &str, ) -> Result<Option<SessionSummaryLedgerRecord>>
Load a session semantic summary from an explicit ref.
Sourcepub fn delete_summary_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
session_id: &str,
) -> Result<bool>
pub fn delete_summary_at_ref( &self, repo_path: &Path, ref_name: &str, session_id: &str, ) -> Result<bool>
Delete a session semantic summary from an explicit ref.
Returns true when the ref was rewritten, false when no summary existed.
Sourcepub fn prune_summaries_by_age_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
keep_days: u32,
) -> Result<PruneStats>
pub fn prune_summaries_by_age_at_ref( &self, repo_path: &Path, ref_name: &str, keep_days: u32, ) -> Result<PruneStats>
Prune expired semantic summaries from a specific summary ref by age (days).
Sourcepub fn prune_by_age_at_ref(
&self,
repo_path: &Path,
ref_name: &str,
keep_days: u32,
) -> Result<PruneStats>
pub fn prune_by_age_at_ref( &self, repo_path: &Path, ref_name: &str, keep_days: u32, ) -> Result<PruneStats>
Prune expired sessions from a specific ledger ref by age (days).
Auto Trait Implementations§
impl Freeze for NativeGitStorage
impl RefUnwindSafe for NativeGitStorage
impl Send for NativeGitStorage
impl Sync for NativeGitStorage
impl Unpin for NativeGitStorage
impl UnsafeUnpin for NativeGitStorage
impl UnwindSafe for NativeGitStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more