Skip to main content

AssistantMode

Struct AssistantMode 

Source
pub struct AssistantMode {
    pub mcp_servers: Vec<McpServerRef>,
    pub interpreters: Vec<String>,
    pub unsandboxed: bool,
    pub skills: Vec<String>,
    pub skills_dir: Option<String>,
    pub skill_commands: bool,
    pub network: AssistantNetwork,
    pub files: Vec<String>,
    pub read_only: Vec<String>,
    pub context_file: Option<String>,
    pub station_paths: Vec<String>,
}
Expand description

What an assistant Run may use besides answering: its parts, so a handler builds the harness’s settings from them rather than from one fixed set.

Fields§

§mcp_servers: Vec<McpServerRef>

The MCP servers the harness connects to and may call every tool of, and no other.

§interpreters: Vec<String>

Interpreters the harness may run inside its own sandbox (python3); empty means no shell at all. A handler that cannot confine them refuses to start, unless unsandboxed lets them run without it.

§unsandboxed: bool

Run the interpreters without the harness’s sandbox, where it has none: no file or network limit applies to them. A weakening the Station reports; false refuses interpreters a handler cannot confine.

§skills: Vec<String>

Skills the harness may load, by name, each installed in skills_dir; empty means none. A handler that cannot limit skills to a list refuses a non-empty one.

§skills_dir: Option<String>

The absolute directory the Station installed skills in, laid out as a plugin of the harness: skills/<name>/SKILL.md with each skill’s files, and a manifest .claude-plugin/plugin.json naming the plugin ai6. Required with skills.

§skill_commands: bool

Whether a skill’s injected commands (!`command`) may run, through the harness’s permission rules; false has the harness replace them with a notice.

§network: AssistantNetwork

What the harness’s own web tools and its interpreters may reach besides the MCP servers, which are always reachable.

§files: Vec<String>

Directories, relative to the working directory (personal), under which the harness may create and change files; it may read anything in the working directory. Empty means no file tool at all. A handler that cannot confine its file tools to them refuses a non-empty list.

§read_only: Vec<String>

Paths, relative to the working directory (shared, CLAUDE.md), the interpreters may not write although the rest of the working directory is theirs to write.

§context_file: Option<String>

A file outside the working directory whose text the harness gets as part of its system prompt: standing context too large for a command line. A handler that cannot pass a file refuses it.

§station_paths: Vec<String>

The Station’s own directories (its state, identity and secrets directories) the interpreters may never read, besides those a handler denies itself.

Implementations§

Source§

impl AssistantMode

Source

pub fn moneypenny() -> Self

The mode of a Moneypenny Run that has only her own tools: the Universal Exports endpoint, no interpreter and no skill.

Source

pub fn with_cables(self) -> Self

This mode with the Station’s Cable endpoint as a further server, ASSISTANT_CABLE_MCP_SERVER, reached through ASSISTANT_CABLE_MCP_ENV_PREFIX.

Source

pub fn validate(&self) -> Result<(), String>

Checks the parts: at least one server; server names of letters, digits, - and _; environment prefixes of capitals, digits and _; interpreter and skill names of letters, digits, ., - and _; a known network policy and hosts as host_pattern accepts them; writable directories of one to eight /-separated names of letters, digits, ., - and _, none starting with .; a context file and unreadable paths given as absolute paths; skills only with an absolute skills_dir. A handler checks this before building settings from the names.

§Errors

A message naming the first part out of bounds.

Trait Implementations§

Source§

impl Clone for AssistantMode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AssistantMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AssistantMode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for AssistantMode

Source§

impl FromValue for AssistantMode

Source§

const KINDS: Kinds = ::guatiao::Kinds::MAP

The kinds from_value may accept; any other is refused. Every impl in this crate and every derived one says; the default, [Kinds::ANY], claims every kind, which keeps a type that does not say out of an enum told apart by kind.
Source§

fn from_value(__value: &Value) -> Result<Self, MapError>

Performs the conversion. Read more
Source§

impl FromWalk for AssistantMode

Source§

fn from_walk<__W: Walker>(__walker: __W) -> Result<Self, MapError>

Reads Self from the one value walker holds.
Source§

impl MapRead for AssistantMode

Source§

fn read_map<__M: MapWalker>(__entries: __M) -> Result<Self, MapError>

Reads every entry.
Source§

impl PartialEq for AssistantMode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Schema for AssistantMode

Source§

fn kind(__alloc: Alloc) -> KindBuilder

The kind describing values of this type.
§

fn schema_in(alloc: Alloc) -> Result<Value, ValueError>

The whole schema: the fields a consumer fills in, as a root document with its dialect declared. Read more
§

fn schema() -> Result<Value, ValueError>

The whole schema, built through the crate’s own allocator. See schema_in.
Source§

impl Serialize for AssistantMode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AssistantMode

Source§

impl ToValue for AssistantMode

Source§

fn to_value_in(&self, __alloc: Alloc) -> Result<Value, ValueError>

Performs the conversion through alloc. A derived struct produces a map.
§

fn to_value(&self) -> Result<Value, ValueError>

Performs the conversion through the crate’s own allocator.
Source§

impl Walk for AssistantMode

Source§

fn walk<__V: Visitor>(&self, __visitor: __V) -> Result<__V::Ok, __V::Error>

Hands this value to visitor: one call for a scalar; for a list or a map, the call that opens it, then each element, then end.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoMaybeUndefined<T> for T

§

fn into_maybe_undefined(self) -> MaybeUndefined<T>

Converts this value into a three-state builder argument.
§

impl<T> IntoOption<T> for T

§

fn into_option(self) -> Option<T>

Converts this value into an optional builder argument.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more