pub enum PromptSource {
Hook,
None,
}Expand description
Whether the person’s raw prompt can be captured below the model for one provider.
There is no connection here and there must not be: an MCP server is handed tool calls,
never the prompt that produced them. Prompt capture is provider-specific and the
declaration says so rather than pretending the connection can stand in for it.
use majordomus_cli::share::PromptSource;
assert_eq!(serde_json::from_str::<PromptSource>("\"hook\"").unwrap(), PromptSource::Hook);
assert!(serde_json::from_str::<PromptSource>("\"connection\"").is_err(),
"no connection can observe a prompt");
assert_eq!(PromptSource::default(), PromptSource::None);Variants§
Hook
The provider hands the raw prompt to a command before the model runs.
None
It does not. Nothing this tool can do makes the prompt observable.
Implementations§
Source§impl PromptSource
impl PromptSource
Trait Implementations§
Source§impl Clone for PromptSource
impl Clone for PromptSource
Source§fn clone(&self) -> PromptSource
fn clone(&self) -> PromptSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PromptSource
Source§impl Debug for PromptSource
impl Debug for PromptSource
Source§impl Default for PromptSource
impl Default for PromptSource
Source§fn default() -> PromptSource
fn default() -> PromptSource
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PromptSource
impl<'de> Deserialize<'de> for PromptSource
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 PromptSource
Source§impl JsonSchema for PromptSource
impl JsonSchema for PromptSource
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 moreSource§impl PartialEq for PromptSource
impl PartialEq for PromptSource
Source§fn eq(&self, other: &PromptSource) -> bool
fn eq(&self, other: &PromptSource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PromptSource
impl Serialize for PromptSource
impl StructuralPartialEq for PromptSource
Auto Trait Implementations§
impl Freeze for PromptSource
impl RefUnwindSafe for PromptSource
impl Send for PromptSource
impl Sync for PromptSource
impl Unpin for PromptSource
impl UnsafeUnpin for PromptSource
impl UnwindSafe for PromptSource
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.