pub struct Hints {
pub read_only: bool,
pub destructive: bool,
pub idempotent: bool,
pub open_world: bool,
}Expand description
What a caller may assume about a call before making it: the four facts MCP names tool annotations, held once on the model so that no projection states its own.
Classified by ExecutionPolicy::hints, never declared.
use majordomus_cli::capability::{CapabilityKind, ExecutionPolicy, Hints};
let read: Hints = ExecutionPolicy::classify(CapabilityKind::Query).hints();
assert_eq!(
serde_json::to_value(read).unwrap(),
serde_json::json!({ "read_only": true, "destructive": false, "idempotent": true, "open_world": false })
);Fields§
§read_only: boolThe call changes nothing, anywhere.
destructive: boolThe call may overwrite or remove something that outlives this process.
idempotent: boolA second identical call changes nothing the first did not.
open_world: boolThe call reaches beyond this machine. No handler of this executable does: observing the forge and talking to an advisor are commands a person runs, not capabilities.
Trait Implementations§
impl Copy for Hints
Source§impl<'de> Deserialize<'de> for Hints
impl<'de> Deserialize<'de> for Hints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Hints
Source§impl JsonSchema for Hints
impl JsonSchema for Hints
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Hints
Auto Trait Implementations§
impl Freeze for Hints
impl RefUnwindSafe for Hints
impl Send for Hints
impl Sync for Hints
impl Unpin for Hints
impl UnsafeUnpin for Hints
impl UnwindSafe for Hints
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.