pub struct CommSister { /* private fields */ }Expand description
Contracts-compliant Comm sister.
Wraps CommStore and implements all v0.2.0 traits.
This is the canonical “Comm as a sister” interface.
Implementations§
Source§impl CommSister
impl CommSister
Sourcepub fn from_store(store: CommStore, file_path: Option<PathBuf>) -> Self
pub fn from_store(store: CommStore, file_path: Option<PathBuf>) -> Self
Create from an existing store (for migration from SessionManager).
Sourcepub fn current_session_id(&self) -> Option<u32>
pub fn current_session_id(&self) -> Option<u32>
Get the current u32 session ID (for interop with existing code).
Trait Implementations§
Source§impl FileFormatReader for CommSister
impl FileFormatReader for CommSister
Source§fn read_file(path: &Path) -> SisterResult<Self>
fn read_file(path: &Path) -> SisterResult<Self>
Read a file with version handling
Source§fn can_read(path: &Path) -> SisterResult<FileInfo>
fn can_read(path: &Path) -> SisterResult<FileInfo>
Check if a file is readable (without full parse).
Returns file info for quick inspection
Source§fn file_version(path: &Path) -> SisterResult<Version>
fn file_version(path: &Path) -> SisterResult<Version>
Get file version without full parse
Source§impl FileFormatWriter for CommSister
impl FileFormatWriter for CommSister
Source§fn write_file(&self, path: &Path) -> SisterResult<()>
fn write_file(&self, path: &Path) -> SisterResult<()>
Write to a file path
Source§impl Grounding for CommSister
impl Grounding for CommSister
Source§fn ground(&self, claim: &str) -> SisterResult<GroundingResult>
fn ground(&self, claim: &str) -> SisterResult<GroundingResult>
Verify a claim against stored evidence. Read more
Source§fn evidence(
&self,
query: &str,
max_results: usize,
) -> SisterResult<Vec<EvidenceDetail>>
fn evidence( &self, query: &str, max_results: usize, ) -> SisterResult<Vec<EvidenceDetail>>
Get detailed evidence for a query. Read more
Source§fn suggest(
&self,
query: &str,
limit: usize,
) -> SisterResult<Vec<GroundingSuggestion>>
fn suggest( &self, query: &str, limit: usize, ) -> SisterResult<Vec<GroundingSuggestion>>
Find similar items when an exact match fails. Read more
Source§impl Queryable for CommSister
impl Queryable for CommSister
Source§fn query(&self, query: Query) -> SisterResult<QueryResult>
fn query(&self, query: Query) -> SisterResult<QueryResult>
Execute a query.
Source§fn supports_query(&self, query_type: &str) -> bool
fn supports_query(&self, query_type: &str) -> bool
Check if a query type is supported.
Source§fn query_types(&self) -> Vec<QueryTypeInfo>
fn query_types(&self) -> Vec<QueryTypeInfo>
List supported query types.
Source§fn search(&self, text: &str) -> Result<QueryResult, SisterError>
fn search(&self, text: &str) -> Result<QueryResult, SisterError>
Execute a simple search query.
Source§fn recent(&self, count: usize) -> Result<QueryResult, SisterError>
fn recent(&self, count: usize) -> Result<QueryResult, SisterError>
Get recent items.
Source§fn list(&self, limit: usize, offset: usize) -> Result<QueryResult, SisterError>
fn list(&self, limit: usize, offset: usize) -> Result<QueryResult, SisterError>
List items with pagination.
Source§impl SessionManagement for CommSister
impl SessionManagement for CommSister
Source§fn start_session(&mut self, name: &str) -> SisterResult<ContextId>
fn start_session(&mut self, name: &str) -> SisterResult<ContextId>
Start a new session. Returns the session ID.
The previous session (if any) is automatically ended
Source§fn end_session(&mut self) -> SisterResult<()>
fn end_session(&mut self) -> SisterResult<()>
End the current session.
After this, a new session must be started before operations
Source§fn current_session(&self) -> Option<ContextId>
fn current_session(&self) -> Option<ContextId>
Get the current session ID.
Returns None if no session is active
Source§fn current_session_info(&self) -> SisterResult<ContextInfo>
fn current_session_info(&self) -> SisterResult<ContextInfo>
Get info about the current session
Source§fn list_sessions(&self) -> SisterResult<Vec<ContextSummary>>
fn list_sessions(&self) -> SisterResult<Vec<ContextSummary>>
List all past sessions (most recent first)
Source§fn export_session(&self, id: ContextId) -> SisterResult<ContextSnapshot>
fn export_session(&self, id: ContextId) -> SisterResult<ContextSnapshot>
Export a session as a snapshot (for backup/transfer)
Source§fn import_session(
&mut self,
snapshot: ContextSnapshot,
) -> SisterResult<ContextId>
fn import_session( &mut self, snapshot: ContextSnapshot, ) -> SisterResult<ContextId>
Import a session from a snapshot
Source§fn start_session_with_metadata(
&mut self,
name: &str,
metadata: HashMap<String, Value>,
) -> Result<ContextId, SisterError>
fn start_session_with_metadata( &mut self, name: &str, metadata: HashMap<String, Value>, ) -> Result<ContextId, SisterError>
Start a new session with metadata
Source§fn get_session_info(&self, id: ContextId) -> Result<ContextInfo, SisterError>
fn get_session_info(&self, id: ContextId) -> Result<ContextInfo, SisterError>
Get info about a specific past session
Source§impl Sister for CommSister
impl Sister for CommSister
Source§const SISTER_TYPE: SisterType = SisterType::Comm
const SISTER_TYPE: SisterType = SisterType::Comm
The type of this sister
Source§const FILE_EXTENSION: &'static str = "acomm"
const FILE_EXTENSION: &'static str = "acomm"
File extension for this sister’s format (without dot)
Source§fn init(config: SisterConfig) -> SisterResult<Self>where
Self: Sized,
fn init(config: SisterConfig) -> SisterResult<Self>where
Self: Sized,
Initialize the sister with configuration
Source§fn health(&self) -> HealthStatus
fn health(&self) -> HealthStatus
Check health status
Source§fn shutdown(&mut self) -> SisterResult<()>
fn shutdown(&mut self) -> SisterResult<()>
Shutdown gracefully
Source§fn capabilities(&self) -> Vec<Capability>
fn capabilities(&self) -> Vec<Capability>
Get capabilities this sister provides
Source§fn sister_type(&self) -> SisterType
fn sister_type(&self) -> SisterType
Get the sister type
Source§fn file_extension(&self) -> &'static str
fn file_extension(&self) -> &'static str
Get the file extension
Source§fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if the sister is healthy
Source§fn mcp_prefix(&self) -> &'static str
fn mcp_prefix(&self) -> &'static str
Get MCP tool prefix
Auto Trait Implementations§
impl Freeze for CommSister
impl RefUnwindSafe for CommSister
impl Send for CommSister
impl Sync for CommSister
impl Unpin for CommSister
impl UnsafeUnpin for CommSister
impl UnwindSafe for CommSister
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