pub struct MemoryAuthority { /* private fields */ }Implementations§
Source§impl MemoryAuthority
impl MemoryAuthority
Sourcepub async fn append(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
namespace: String,
content: String,
source: Option<String>,
) -> Result<AuthorityReceiptV1, MemoryError>
pub async fn append( &self, permit: AuthorityPermit, caller_idempotency_key: String, namespace: String, content: String, source: Option<String>, ) -> Result<AuthorityReceiptV1, MemoryError>
Append a new fact and start a new authority lineage.
Sourcepub async fn supersede(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
target_fact_id: String,
content: String,
source: Option<String>,
) -> Result<AuthorityReceiptV1, MemoryError>
pub async fn supersede( &self, permit: AuthorityPermit, caller_idempotency_key: String, target_fact_id: String, content: String, source: Option<String>, ) -> Result<AuthorityReceiptV1, MemoryError>
Append a replacement fact and supersede the current lineage head.
Sourcepub async fn redact(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
target_fact_id: String,
reason: String,
) -> Result<AuthorityReceiptV1, MemoryError>
pub async fn redact( &self, permit: AuthorityPermit, caller_idempotency_key: String, target_fact_id: String, reason: String, ) -> Result<AuthorityReceiptV1, MemoryError>
Append a redaction tombstone and make it the current lineage head.
Sourcepub async fn forget(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
request: ForgettingClosureRequestV1,
) -> Result<ForgettingClosureReceiptV1, MemoryError>
pub async fn forget( &self, permit: AuthorityPermit, caller_idempotency_key: String, request: ForgettingClosureRequestV1, ) -> Result<ForgettingClosureReceiptV1, MemoryError>
Forget a canonical fact and every accessible derived artifact in one transaction.
Sourcepub async fn forget_governed(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
request: ForgettingClosureRequestV1,
access: GovernedAccessRequestV1,
) -> Result<ForgettingClosureReceiptV1, MemoryError>
pub async fn forget_governed( &self, permit: AuthorityPermit, caller_idempotency_key: String, request: ForgettingClosureRequestV1, access: GovernedAccessRequestV1, ) -> Result<ForgettingClosureReceiptV1, MemoryError>
Governed forgetting validates every root against the same policy evaluator before the closure planner can inspect or invalidate it. Administrative authority is an explicit, time-bounded elevation rather than an implicit consequence of a write permit.
Sourcepub async fn verify_and_commit(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
candidate: MemoryTransitionCandidateV1,
) -> Result<MemoryTransitionOutcomeV1, MemoryError>
pub async fn verify_and_commit( &self, permit: AuthorityPermit, caller_idempotency_key: String, candidate: MemoryTransitionCandidateV1, ) -> Result<MemoryTransitionOutcomeV1, MemoryError>
Deterministically verify a source-grounded candidate immediately before authority commit.
Failed verification is durably quarantined and never invokes canonical mutation. A passing verification, its immutable evidence, and the existing authority mutation commit in one SQLite transaction.
Sourcepub async fn get_transition_by_idempotency_key(
&self,
caller_idempotency_key: &str,
) -> Result<Option<MemoryTransitionRecordV1>, MemoryError>
pub async fn get_transition_by_idempotency_key( &self, caller_idempotency_key: &str, ) -> Result<Option<MemoryTransitionRecordV1>, MemoryError>
Inspect a committed or quarantined transition by caller idempotency key.
Sourcepub async fn get_forgetting_receipt_by_idempotency_key(
&self,
caller_idempotency_key: &str,
) -> Result<Option<ForgettingClosureReceiptV1>, MemoryError>
pub async fn get_forgetting_receipt_by_idempotency_key( &self, caller_idempotency_key: &str, ) -> Result<Option<ForgettingClosureReceiptV1>, MemoryError>
Load an immutable selective-forgetting receipt by caller idempotency key.
Sourcepub async fn get_receipt_by_operation_id(
&self,
operation_id: &str,
) -> Result<Option<AuthorityReceiptV1>, MemoryError>
pub async fn get_receipt_by_operation_id( &self, operation_id: &str, ) -> Result<Option<AuthorityReceiptV1>, MemoryError>
Find a committed authority receipt by operation identity.
Sourcepub async fn get_receipt_by_idempotency_key(
&self,
caller_idempotency_key: &str,
) -> Result<Option<AuthorityReceiptV1>, MemoryError>
pub async fn get_receipt_by_idempotency_key( &self, caller_idempotency_key: &str, ) -> Result<Option<AuthorityReceiptV1>, MemoryError>
Find a committed authority receipt by the caller’s idempotency key.
Load the immutable write-time origin label for a canonical fact.
Sourcepub async fn get_fact_governed(
&self,
fact_id: &str,
request: GovernedAccessRequestV1,
) -> Result<GovernedFactAccessV1, MemoryError>
pub async fn get_fact_governed( &self, fact_id: &str, request: GovernedAccessRequestV1, ) -> Result<GovernedFactAccessV1, MemoryError>
Direct-ID governed recall. Content is never returned when the decision denies access.
Sourcepub async fn export_fact_governed(
&self,
fact_id: &str,
request: GovernedAccessRequestV1,
) -> Result<GovernedFactAccessV1, MemoryError>
pub async fn export_fact_governed( &self, fact_id: &str, request: GovernedAccessRequestV1, ) -> Result<GovernedFactAccessV1, MemoryError>
Governed export uses the same decision path as direct recall.
Sourcepub async fn search_governed(
&self,
query: &str,
top_k: Option<usize>,
request: GovernedAccessRequestV1,
) -> Result<GovernedSearchResponseV1, MemoryError>
pub async fn search_governed( &self, query: &str, top_k: Option<usize>, request: GovernedAccessRequestV1, ) -> Result<GovernedSearchResponseV1, MemoryError>
Governed hybrid search filters every result after cache retrieval, preventing cache bypass.
Sourcepub async fn current_state(&self) -> Result<AuthorityStateV1, MemoryError>
pub async fn current_state(&self) -> Result<AuthorityStateV1, MemoryError>
Read the current authority snapshot and retrieval epoch for cache validation.
Sourcepub async fn search_governed_with_view(
&self,
query: &str,
top_k: Option<usize>,
request: GovernedAccessRequestV1,
view: StateView,
) -> Result<GovernedSearchResponseV1, MemoryError>
pub async fn search_governed_with_view( &self, query: &str, top_k: Option<usize>, request: GovernedAccessRequestV1, view: StateView, ) -> Result<GovernedSearchResponseV1, MemoryError>
Governed current or historical search. The candidate source is intentionally irrelevant: every returned row is passed through the same canonical evaluator used by direct access.
Sourcepub async fn list_facts_governed(
&self,
request: GovernedAccessRequestV1,
limit: usize,
offset: usize,
view: StateView,
) -> Result<GovernedFactListResponseV1, MemoryError>
pub async fn list_facts_governed( &self, request: GovernedAccessRequestV1, limit: usize, offset: usize, view: StateView, ) -> Result<GovernedFactListResponseV1, MemoryError>
Governed enumeration applies the same direct-ID policy check to every listed fact.
Sourcepub async fn resolve_memory_governed(
&self,
query: &str,
top_k: Option<usize>,
request: GovernedAccessRequestV1,
mode: StateResolutionMode,
budget: usize,
) -> Result<GovernedStateResolutionResponseV1, MemoryError>
pub async fn resolve_memory_governed( &self, query: &str, top_k: Option<usize>, request: GovernedAccessRequestV1, mode: StateResolutionMode, budget: usize, ) -> Result<GovernedStateResolutionResponseV1, MemoryError>
State resolution is candidate generation only; this wrapper removes denied assertions before an answer can leave the crate, including historical state views and cache-backed searches. The resolution receipt remains an audit record, not a content channel.
Sourcepub async fn list_graph_edges_for_node_governed(
&self,
node_id: &str,
request: GovernedAccessRequestV1,
) -> Result<GovernedGraphResponseV1, MemoryError>
pub async fn list_graph_edges_for_node_governed( &self, node_id: &str, request: GovernedAccessRequestV1, ) -> Result<GovernedGraphResponseV1, MemoryError>
Governed graph traversal authorizes every fact endpoint before returning an edge.
Sourcepub async fn replay_search_receipt_governed(
&self,
receipt_id: &str,
query: &str,
top_k: Option<usize>,
request: GovernedAccessRequestV1,
) -> Result<GovernedReplayResponseV1, MemoryError>
pub async fn replay_search_receipt_governed( &self, receipt_id: &str, query: &str, top_k: Option<usize>, request: GovernedAccessRequestV1, ) -> Result<GovernedReplayResponseV1, MemoryError>
Replay a durable receipt, then authorize every replay result for the current caller.
Sourcepub async fn revoke_origin(
&self,
permit: AuthorityPermit,
caller_idempotency_key: String,
fact_id: &str,
revocation_reference: String,
) -> Result<OriginAuthorityDecisionV1, MemoryError>
pub async fn revoke_origin( &self, permit: AuthorityPermit, caller_idempotency_key: String, fact_id: &str, revocation_reference: String, ) -> Result<OriginAuthorityDecisionV1, MemoryError>
Append an origin revocation without mutating the immutable write-time label.
Trait Implementations§
Source§impl Clone for MemoryAuthority
impl Clone for MemoryAuthority
Source§fn clone(&self) -> MemoryAuthority
fn clone(&self) -> MemoryAuthority
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more