pub enum McpAction {
Serve {
agent: Option<String>,
wait: u64,
},
Enable {
client: Option<String>,
print: bool,
},
Disable {
client: Option<String>,
},
}Expand description
What nib mcp does.
Variants§
Serve
Serves an AI client nib’s operations as tools, over standard input.
It serves them by the Model Context Protocol, over standard input and output, until the input ends: on your library, where nib mcp enable allowed AI agents, as the client, with a key of its own named after it; or on an AI agent’s copy of the library, which nib device pair –ai-agent adds for an AI agent kept apart. It asks for nothing on a terminal, so a library protected by a passphrase needs –passphrase-file. On an AI agent’s copy, it syncs with your device that waits with nib sync –serve: when it starts, before a request if it last synced a minute before, and a few seconds after the AI agent’s changes; on your library, the program that syncs this device sends them on.
Fields
Enable
Allows AI agents on your library here, and tells the AI clients.
The AI clients on this computer are told of its server through their own commands, Claude Code’s and Codex’s: each client then works on the library with a key of its own, named after it, in your personal space and never with your secrets. A client’s session that runs already sees the server once it starts anew.
Fields
Disable
Withdraws AI agents from your library here.
It revokes the key of every AI client that worked on it, and takes its server out of the clients that nib mcp enable told.
Trait Implementations§
Source§impl FromArgMatches for McpAction
impl FromArgMatches for McpAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for McpAction
impl Subcommand for McpAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Forget for McpAction
impl Freeze for McpAction
impl Move for McpAction
impl RefUnwindSafe for McpAction
impl Send for McpAction
impl Sync for McpAction
impl Unpin for McpAction
impl UnsafeUnpin for McpAction
impl UnwindSafe for McpAction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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.