pub struct FilesystemMcpServer { /* private fields */ }Expand description
MCP server backed by the unified memstead_base::Engine.
Constructed via Self::from_workspace_root.
Implementations§
Source§impl FilesystemMcpServer
impl FilesystemMcpServer
Sourcepub fn from_workspace_root(workspace_root: &Path) -> Result<Self, BootError>
pub fn from_workspace_root(workspace_root: &Path) -> Result<Self, BootError>
Construct from a workspace root. Boots the unified
Engine via Engine::from_workspace_root (lean path —
folder + archive backends only). The error envelope wraps
every layer (layout dispatch, store load, backend
instantiation, engine construction) under one BootError.
Production callers (main.rs, every test fixture) reach the server through this constructor directly.
Sourcepub fn from_engine(engine: Engine, workspace_root: PathBuf) -> Self
pub fn from_engine(engine: Engine, workspace_root: PathBuf) -> Self
Construct directly from a pre-built Engine — e.g. a sealed
read-only archive mount stood up by an embedding service. workspace_root
is consulted only by memstead_changes_since (which reads JSONL off
disk); surfaces that do not expose that tool may pass any path.
Sourcepub fn export_mem_to_bytes(&self) -> Result<Vec<u8>, EngineError>
pub fn export_mem_to_bytes(&self) -> Result<Vec<u8>, EngineError>
Export the server’s single mem as .mem archive bytes. Used by
embedding services (the session server) to hand a visitor a
self-describing copy of the mem their agent built. The server’s
engine carries exactly one mem (filesystem / session mems are
single-mem by design); this exports it.
Sourcepub fn entity_count(&self) -> usize
pub fn entity_count(&self) -> usize
Count of real (non-stub) entities across the server’s mem. Used by embedding services (the session server) to enforce a per-session resource cap before admitting a create.
Sourcepub fn with_engine<R>(&self, f: impl FnOnce(&Engine) -> R) -> R
pub fn with_engine<R>(&self, f: impl FnOnce(&Engine) -> R) -> R
Run a read closure against the locked engine. The escape hatch for
embedding services that need engine reads the tool surface does not
expose — e.g. the session server’s live graph projection and its
change-event subscription. Keeps the engine itself private; callers
get a borrow only for the duration of f.
Source§impl FilesystemMcpServer
impl FilesystemMcpServer
Sourcepub fn memstead_entity_tool_attr() -> Tool
pub fn memstead_entity_tool_attr() -> Tool
Generated tool metadata function for memstead_entity
Sourcepub fn memstead_create_tool_attr() -> Tool
pub fn memstead_create_tool_attr() -> Tool
Generated tool metadata function for memstead_create
Sourcepub fn memstead_update_tool_attr() -> Tool
pub fn memstead_update_tool_attr() -> Tool
Generated tool metadata function for memstead_update
Sourcepub fn memstead_delete_tool_attr() -> Tool
pub fn memstead_delete_tool_attr() -> Tool
Generated tool metadata function for memstead_delete
Sourcepub fn memstead_relate_tool_attr() -> Tool
pub fn memstead_relate_tool_attr() -> Tool
Generated tool metadata function for memstead_relate
Sourcepub fn memstead_search_tool_attr() -> Tool
pub fn memstead_search_tool_attr() -> Tool
Generated tool metadata function for memstead_search
Sourcepub fn memstead_health_tool_attr() -> Tool
pub fn memstead_health_tool_attr() -> Tool
Generated tool metadata function for memstead_health
Sourcepub fn memstead_schema_tool_attr() -> Tool
pub fn memstead_schema_tool_attr() -> Tool
Generated tool metadata function for memstead_schema
Sourcepub fn memstead_diff_tool_attr() -> Tool
pub fn memstead_diff_tool_attr() -> Tool
Generated tool metadata function for memstead_diff
Sourcepub fn memstead_changes_since_tool_attr() -> Tool
pub fn memstead_changes_since_tool_attr() -> Tool
Generated tool metadata function for memstead_changes_since
Sourcepub fn memstead_rename_tool_attr() -> Tool
pub fn memstead_rename_tool_attr() -> Tool
Generated tool metadata function for memstead_rename
Sourcepub fn memstead_check_tool_attr() -> Tool
pub fn memstead_check_tool_attr() -> Tool
Generated tool metadata function for memstead_check
Sourcepub fn memstead_overview_tool_attr() -> Tool
pub fn memstead_overview_tool_attr() -> Tool
Generated tool metadata function for memstead_overview
pub fn tool_router() -> ToolRouter<Self>
Trait Implementations§
Source§impl Clone for FilesystemMcpServer
impl Clone for FilesystemMcpServer
Source§fn clone(&self) -> FilesystemMcpServer
fn clone(&self) -> FilesystemMcpServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ServerHandler for FilesystemMcpServer
impl ServerHandler for FilesystemMcpServer
Source§fn get_info(&self) -> ServerInfo
fn get_info(&self) -> ServerInfo
Hand-written so instructions can be the named
FS_SERVER_INSTRUCTIONS const (the macro only accepts string
literals) and the serverInfo version is the engine’s full
build version (semver + git build sha for dev builds) by
construction — the historical hardcoded "0.1.0" cannot recur,
and two dev builds between releases stay distinguishable.
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResult, McpError>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResult, McpError>
Friction-ledger seam (agent-trust plan 08), mirroring the full flavour: every dispatched typed refusal appends one content-free ledger entry, best-effort, after the response is built.
async fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> Result<InitializeResult, McpError>
async fn list_tools( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, McpError>
fn enqueue_task( &self, _request: CallToolRequestParams, _context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CreateTaskResult, ErrorData>> + MaybeSendFuture
fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture
fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResult, ErrorData>> + MaybeSendFuture
fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + MaybeSendFuture
fn list_resources( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture
fn read_resource( &self, request: ReadResourceRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ReadResourceResult, ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture
fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_task_status( &self, params: TaskStatusNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn list_tasks( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListTasksResult, ErrorData>> + MaybeSendFuture
fn get_task_info( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task_result( &self, request: GetTaskPayloadParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskPayloadResult, ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CancelTaskResult, ErrorData>> + MaybeSendFuture
Auto Trait Implementations§
impl Freeze for FilesystemMcpServer
impl RefUnwindSafe for FilesystemMcpServer
impl Send for FilesystemMcpServer
impl Sync for FilesystemMcpServer
impl Unpin for FilesystemMcpServer
impl UnsafeUnpin for FilesystemMcpServer
impl UnwindSafe for FilesystemMcpServer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
impl<T> Fruit for 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