pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
Sourcepub fn activate_owner_handoff(
&mut self,
credential: &str,
id: &str,
) -> Result<SignedState>
pub fn activate_owner_handoff( &mut self, credential: &str, id: &str, ) -> Result<SignedState>
Trusted local-owner activation. All imported decisions, the durable key reference and accepted handoff commit together. No source process is used.
Source§impl Store
impl Store
Sourcepub fn start_owner_preparation(
&mut self,
credential: &str,
id: Uuid,
successor: &str,
) -> Result<Value>
pub fn start_owner_preparation( &mut self, credential: &str, id: Uuid, successor: &str, ) -> Result<Value>
Prepare streams and collect readiness only. This never stops signing; issuing a handoff remains a separate explicitly authorized local action.
pub fn owner_preparation_status( &self, credential: &str, id: Uuid, ) -> Result<Value>
Source§impl Store
impl Store
Sourcepub fn owner_handoff_manifest(
&self,
credential: &str,
id: &str,
) -> Result<Manifest>
pub fn owner_handoff_manifest( &self, credential: &str, id: &str, ) -> Result<Manifest>
Owner-only private export. Contains decision summaries, never signing keys.
pub fn owner_handoff_page( &self, credential: &str, id: &str, index: usize, ) -> Result<Vec<u8>>
pub fn begin_owner_handoff_import( &mut self, credential: &str, id: &str, authorization: &SignedOwnerTransition, manifest: &Manifest, ) -> Result<Value>
pub fn import_owner_handoff_page( &mut self, credential: &str, id: &str, index: usize, body: &[u8], ) -> Result<Value>
pub fn owner_handoff_import_status( &self, credential: &str, id: &str, ) -> Result<Value>
Source§impl Store
impl Store
Sourcepub fn owner_handoff_readiness(
&mut self,
credential: &str,
id: &str,
) -> Result<SignedReadiness>
pub fn owner_handoff_readiness( &mut self, credential: &str, id: &str, ) -> Result<SignedReadiness>
Signs only after checking the successor’s protected key, installed streams, durable reader confirmations and local bidirectional data links.
Sourcepub fn record_owner_readiness(
&mut self,
credential: &str,
candidate: &SignedOwnerCandidate,
report: &SignedReadiness,
) -> Result<()>
pub fn record_owner_readiness( &mut self, credential: &str, candidate: &SignedOwnerCandidate, report: &SignedReadiness, ) -> Result<()>
Records evidence on the source without freezing it. New authorization verifies the same evidence again at the decision’s current checkpoint.
Source§impl Store
impl Store
pub fn prepare_owner_configuration( &self, credential: &str, candidate_id: &str, request: Uuid, peer: (&str, &[u8]), ) -> Result<ConfigurationPreparation>
Authorize one exact Welcome durably. Once a handoff is issued only already committed authorizations may be returned; no new grant is signed.
pub fn install_owner_configuration( &self, credential: &str, request: Uuid, grant: &SignedConfigurationGrant, ) -> Result<ConfigurationInvitation>
Sourcepub fn receive_owner_configuration(
&self,
credential: &str,
invitation: &ConfigurationInvitation,
) -> Result<Receipt>
pub fn receive_owner_configuration( &self, credential: &str, invitation: &ConfigurationInvitation, ) -> Result<Receipt>
The receipt proves this reader installed the exact origin durably. It proves transport readiness only, never acceptance of an owner handoff.
pub fn confirm_owner_configuration( &self, credential: &str, receipt: &Receipt, ) -> Result<()>
Source§impl Store
impl Store
Sourcepub fn prepare_owner_handoff(
&mut self,
credential: &str,
id: &str,
) -> Result<SignedOwnerCandidate>
pub fn prepare_owner_handoff( &mut self, credential: &str, id: &str, ) -> Result<SignedOwnerCandidate>
Local-owner preparation API for the future handoff coordinator. No MCP operation invokes it, and it changes no active signing authority.
Irrevocable once returned or committed: no timeout clears this fence. The coordinator must finish activation, never resume the old writer.
Sourcepub fn accept_owner_handoff(
&mut self,
credential: &str,
id: &str,
authorization: &SignedOwnerTransition,
) -> Result<SignedState>
pub fn accept_owner_handoff( &mut self, credential: &str, id: &str, authorization: &SignedOwnerTransition, ) -> Result<SignedState>
Save the successor’s signature without installing its key or activating the state. Retries preserve the same result, including after expiry.
Source§impl Store
impl Store
Sourcepub fn create_invitation(
&mut self,
credential: &str,
request: &str,
can_configure: bool,
continuation: Option<&str>,
) -> Result<Zeroizing<Vec<u8>>>
pub fn create_invitation( &mut self, credential: &str, request: &str, can_configure: bool, continuation: Option<&str>, ) -> Result<Zeroizing<Vec<u8>>>
Owner-only local API. The returned bytes are for protected transfer, never an MCP response or a public account-service request.
pub fn create_invitation_with_replacement( &mut self, credential: &str, request: &str, can_configure: bool, continuation: Option<&str>, replace_node: Option<&str>, ) -> Result<Zeroizing<Vec<u8>>>
Sourcepub fn activate_invitation(&mut self, credential: &str, id: &str) -> Result<()>
pub fn activate_invitation(&mut self, credential: &str, id: &str) -> Result<()>
Called after the account service confirms the exact persisted draft. The activation itself does not make an account or cryptographic member.
pub fn revoke_invitation(&mut self, credential: &str, id: &str) -> Result<()>
pub fn begin_invitation( &mut self, id: &str, hello: &Hello, ) -> Result<(PendingSession, Vec<u8>)>
Sourcepub fn invitation_attempt_seen(&self, id: &str, attempt: &str) -> Result<bool>
pub fn invitation_attempt_seen(&self, id: &str, attempt: &str) -> Result<bool>
Scheduling hint only. Admission rechecks under the invitation lock and commits the ID before releasing a handshake response. A lost in-memory session must never be reconstructed from an already admitted Hello.
pub fn accept_invitation( &mut self, pending: PendingSession, frames: &[Vec<u8>], ) -> Result<Session>
pub fn invitation_call( &mut self, session: &mut Session, frames: &[Vec<u8>], ) -> Result<Vec<Vec<u8>>>
Source§impl Store
impl Store
Sourcepub fn install_data_link(
&mut self,
peer: &str,
outgoing: &[u8],
incoming: &[u8],
legacy: &[SignedLegacyAgentBinding],
) -> Result<()>
pub fn install_data_link( &mut self, peer: &str, outgoing: &[u8], incoming: &[u8], legacy: &[SignedLegacyAgentBinding], ) -> Result<()>
Install a previously authenticated pair of two-node directional streams.
Source§impl Store
impl Store
Sourcepub fn prepare_configuration_proposal(&self, id: &str) -> Result<Commit>
pub fn prepare_configuration_proposal(&self, id: &str) -> Result<Commit>
Reapply a retained edit against the current committed authority. Calling this again at the same head returns identical ciphertext. A changed head creates a new candidate with the same operation ID and salted intent. The transport checks for an existing service receipt before calling this.
Source§impl Store
impl Store
pub fn pending_configuration_proposals(&self) -> Result<Vec<String>>
pub fn configuration_proposal_intent( &self, id: &str, ) -> Result<Option<[u8; 32]>>
Sourcepub fn prepare_configuration_log(
&mut self,
credential: &str,
) -> Result<Bootstrap>
pub fn prepare_configuration_log( &mut self, credential: &str, ) -> Result<Bootstrap>
Trusted local administration, not an MCP operation. The runtime must finish migration acceptance before exposing this through the CLI.
pub fn configuration_log_head(&self) -> Result<Option<Head>>
pub fn configuration_log_migration(&self) -> Result<Option<Commit>>
Sourcepub fn accept_configuration_commit(
&mut self,
commit: &Commit,
) -> Result<Receipt>
pub fn accept_configuration_commit( &mut self, commit: &Commit, ) -> Result<Receipt>
Called with bytes fetched from the authenticated ordering service. A locally prepared proposal is never passed here before service commitment.
Source§impl Store
impl Store
Sourcepub fn require_provisioning_owner(&self) -> Result<()>
pub fn require_provisioning_owner(&self) -> Result<()>
Called by offline owner provisioning while holding daemon.lock. Service registration cannot turn a joined node into a cryptographic owner.
pub fn require_provisioning_member(&self) -> Result<()>
pub fn require_provisioning_joined(&self) -> Result<()>
Sourcepub fn require_service_setup_role(&self, originally_owner: bool) -> Result<()>
pub fn require_service_setup_role(&self, originally_owner: bool) -> Result<()>
Service setup records describe enrollment history. A signed handoff can change the configuration writer without changing account ownership or removing either node’s relay access.
pub fn open(home: &Path) -> Result<Self>
pub fn handle(&mut self, request: Request) -> Response
Sourcepub fn maintain(&mut self) -> Result<()>
pub fn maintain(&mut self) -> Result<()>
The owner daemon renews its lease without requiring a chat turn. Chat RPCs never bypass expiry or trigger a renewal themselves.
Sourcepub fn install_joined(
home: &Path,
node: &NodeIdentity,
state: &VerifiedState,
) -> Result<()>
pub fn install_joined( home: &Path, node: &NodeIdentity, state: &VerifiedState, ) -> Result<()>
Trusted enrollment API. The supplied authority must already be verified through protected pairing. It installs no owner signing secret.
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl !Sync for Store
impl !UnwindSafe for Store
impl Forget for Store
impl Move for Store
impl Send for Storewhere
Connection: Send,
RefCell<VecDeque<(HelperOffer, RangeInclusive<i64>)>>: Send,
Weak<Direct>: Send,
RawVecInner: Send,
NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send,
BoxRaw<(String, Vec<String>)>: Send,
NodeRef<Owned, String, RelayGrant, LeafOrInternal>: Send,
BoxRaw<(String, RelayGrant)>: Send,
NodeRef<Owned, String, AdminGrant, LeafOrInternal>: Send,
BoxRaw<(String, AdminGrant)>: Send,
NodeRef<Owned, String, GroupAdminGrant, LeafOrInternal>: Send,
BoxRaw<(String, GroupAdminGrant)>: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
NodeRef<Owned, String, NodeMember, LeafOrInternal>: Send,
BoxRaw<(String, NodeMember)>: Send,
NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send,
BoxRaw<(String, SetValZST)>: Send,
NodeRef<Owned, [u8; 32], SetValZST, LeafOrInternal>: Send,
BoxRaw<([u8; 32], SetValZST)>: Send,
Arc<Notify>: Send,
Arc<Health>: Send,
impl Unpin for Storewhere
*mut sqlite3: Unpin,
Arc<Mutex<*mut sqlite3>>: Unpin,
*const u8 is !null: Unpin,
*const Node<Arc<str>, RawStatement> is !null: Unpin,
Arc<Url>: Unpin,
*const ArcInner<Direct> is !null: Unpin,
*const LeafNode<String, Vec<String>> is !null: Unpin,
Box<(String, Vec<String>)>: Unpin,
*const LeafNode<String, RelayGrant> is !null: Unpin,
Box<(String, RelayGrant)>: Unpin,
*const LeafNode<String, AdminGrant> is !null: Unpin,
Box<(String, AdminGrant)>: Unpin,
*const LeafNode<String, GroupAdminGrant> is !null: Unpin,
Box<(String, GroupAdminGrant)>: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
*const LeafNode<String, NodeMember> is !null: Unpin,
Box<(String, NodeMember)>: Unpin,
*const LeafNode<String, SetValZST> is !null: Unpin,
Box<(String, SetValZST)>: Unpin,
*const LeafNode<[u8; 32], SetValZST> is !null: Unpin,
Box<([u8; 32], SetValZST)>: Unpin,
Arc<Notify>: Unpin,
Arc<Health>: Unpin,
impl UnsafeUnpin for Storewhere
*mut sqlite3: UnsafeUnpin,
*const ArcInner<Mutex<*mut sqlite3>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<*mut sqlite3>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<NonNull<Node<Arc<str>, RawStatement>>>: UnsafeUnpin,
*const Node<Arc<str>, RawStatement> is !null: UnsafeUnpin,
PhantomData<(HelperOffer, RangeInclusive<i64>)>: UnsafeUnpin,
*const ArcInner<Direct> is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Rule>: UnsafeUnpin,
*const LeafNode<String, Vec<String>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Vec<String>)>>: UnsafeUnpin,
*const LeafNode<String, RelayGrant> is !null: UnsafeUnpin,
PhantomData<Box<(String, RelayGrant)>>: UnsafeUnpin,
*const LeafNode<String, AdminGrant> is !null: UnsafeUnpin,
PhantomData<Box<(String, AdminGrant)>>: UnsafeUnpin,
*const LeafNode<String, GroupAdminGrant> is !null: UnsafeUnpin,
PhantomData<Box<(String, GroupAdminGrant)>>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<SignedOwnerTransition>: UnsafeUnpin,
*const LeafNode<String, NodeMember> is !null: UnsafeUnpin,
PhantomData<Box<(String, NodeMember)>>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
*const LeafNode<[u8; 32], SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<([u8; 32], SetValZST)>>: UnsafeUnpin,
*const ArcInner<Notify> is !null: UnsafeUnpin,
PhantomData<ArcInner<Notify>>: UnsafeUnpin,
*const ArcInner<Health> is !null: UnsafeUnpin,
PhantomData<ArcInner<Health>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more