pub struct VisionSessionManager { /* private fields */ }Expand description
Manages the visual memory lifecycle, file I/O, and session state.
Implementations§
Source§impl VisionSessionManager
impl VisionSessionManager
Sourcepub fn open(path: &str, model_path: Option<&str>) -> McpResult<Self>
pub fn open(path: &str, model_path: Option<&str>) -> McpResult<Self>
Open or create a vision file at the given path.
Sourcepub fn store(&self) -> &VisualMemoryStore
pub fn store(&self) -> &VisualMemoryStore
Get the visual memory store.
Sourcepub fn workspace_manager(&self) -> &VisionWorkspaceManager
pub fn workspace_manager(&self) -> &VisionWorkspaceManager
Get the workspace manager (immutable).
Sourcepub fn workspace_manager_mut(&mut self) -> &mut VisionWorkspaceManager
pub fn workspace_manager_mut(&mut self) -> &mut VisionWorkspaceManager
Get the workspace manager (mutable).
Sourcepub fn current_session_id(&self) -> u32
pub fn current_session_id(&self) -> u32
Current session ID.
Sourcepub fn start_session(&mut self, explicit_id: Option<u32>) -> McpResult<u32>
pub fn start_session(&mut self, explicit_id: Option<u32>) -> McpResult<u32>
Start a new session.
Sourcepub fn end_session(&mut self) -> McpResult<u32>
pub fn end_session(&mut self) -> McpResult<u32>
End the current session.
Sourcepub fn capture(
&mut self,
source_type: &str,
source_data: &str,
mime: Option<&str>,
labels: Vec<String>,
description: Option<String>,
_extract_ocr: bool,
) -> McpResult<CaptureResult>
pub fn capture( &mut self, source_type: &str, source_data: &str, mime: Option<&str>, labels: Vec<String>, description: Option<String>, _extract_ocr: bool, ) -> McpResult<CaptureResult>
Capture an image from a file or base64 source.
Sourcepub fn capture_screenshot(
&mut self,
region: Option<Rect>,
labels: Vec<String>,
description: Option<String>,
_extract_ocr: bool,
) -> McpResult<CaptureResult>
pub fn capture_screenshot( &mut self, region: Option<Rect>, labels: Vec<String>, description: Option<String>, _extract_ocr: bool, ) -> McpResult<CaptureResult>
Capture a screenshot and store it in visual memory.
Sourcepub fn capture_clipboard(
&mut self,
labels: Vec<String>,
description: Option<String>,
_extract_ocr: bool,
) -> McpResult<CaptureResult>
pub fn capture_clipboard( &mut self, labels: Vec<String>, description: Option<String>, _extract_ocr: bool, ) -> McpResult<CaptureResult>
Capture an image from the clipboard and store it in visual memory.
Sourcepub fn compare(&self, id_a: u64, id_b: u64) -> McpResult<f32>
pub fn compare(&self, id_a: u64, id_b: u64) -> McpResult<f32>
Compare two captures by cosine similarity.
Sourcepub fn find_similar(
&self,
capture_id: u64,
top_k: usize,
min_similarity: f32,
) -> McpResult<Vec<SimilarityMatch>>
pub fn find_similar( &self, capture_id: u64, top_k: usize, min_similarity: f32, ) -> McpResult<Vec<SimilarityMatch>>
Find similar captures.
Sourcepub fn find_similar_by_embedding(
&self,
embedding: &[f32],
top_k: usize,
min_similarity: f32,
) -> Vec<SimilarityMatch>
pub fn find_similar_by_embedding( &self, embedding: &[f32], top_k: usize, min_similarity: f32, ) -> Vec<SimilarityMatch>
Find similar by raw embedding.
Sourcepub fn diff(&self, id_a: u64, id_b: u64) -> McpResult<VisualDiff>
pub fn diff(&self, id_a: u64, id_b: u64) -> McpResult<VisualDiff>
Compute visual diff between two captures.
Sourcepub fn link(&mut self, capture_id: u64, memory_node_id: u64) -> McpResult<()>
pub fn link(&mut self, capture_id: u64, memory_node_id: u64) -> McpResult<()>
Link a capture to a memory node.
Sourcepub fn last_temporal_capture_id(&self) -> Option<u64>
pub fn last_temporal_capture_id(&self) -> Option<u64>
ID of the last node in the temporal chain for this session.
Sourcepub fn advance_temporal_chain(&mut self, id: u64)
pub fn advance_temporal_chain(&mut self, id: u64)
Advance the temporal chain pointer to a new node.
Sourcepub fn log_tool_call(&mut self, record: ToolCallRecord)
pub fn log_tool_call(&mut self, record: ToolCallRecord)
Record a tool call with context.
Sourcepub fn add_observation_note(&mut self, note: ObservationNote) -> u64
pub fn add_observation_note(&mut self, note: ObservationNote) -> u64
Add an observation context note. Returns the note ID.
Sourcepub fn observation_notes(&self) -> &[ObservationNote]
pub fn observation_notes(&self) -> &[ObservationNote]
Access the observation notes for this session.
Sourcepub fn tool_call_log(&self) -> &[ToolCallRecord]
pub fn tool_call_log(&self) -> &[ToolCallRecord]
Access the tool call log for this session.
Sourcepub fn temporal_chain(&self) -> &[(u64, u64)]
pub fn temporal_chain(&self) -> &[(u64, u64)]
Access the temporal chain for this session.
pub fn file_path(&self) -> &PathBuf
pub fn storage_budget_status(&self) -> VisionStorageBudgetStatus
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VisionSessionManager
impl !RefUnwindSafe for VisionSessionManager
impl Send for VisionSessionManager
impl Sync for VisionSessionManager
impl Unpin for VisionSessionManager
impl UnsafeUnpin for VisionSessionManager
impl !UnwindSafe for VisionSessionManager
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
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