#[non_exhaustive]pub enum SystemPromptMode {
Append,
Override,
Other(String),
}unstable_protocol_v2 and unstable_session_system_prompt only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
How the Agent combines a client-provided system prompt with its own instructions.
Unknown modes parse as SystemPromptMode::Other so they can be stored,
proxied, or forwarded. An Agent MUST return an error for a mode it does not
support rather than treating it as append or override.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Append
Add the content to the Agent’s own instructions rather than replacing them.
Every Agent that advertises session.systemPrompt supports this mode.
Agents SHOULD give the content system-level precedence, for example in the
model’s system prompt or developer instructions rather than in user-turn
content. Where it is placed and how it is formatted is implementation-defined.
Override
Replace the Agent’s built-in default instructions with the content.
This does not change tool availability, MCP servers, permissions, or session
configuration. Context the Agent supplies from the workspace or environment
MAY still be included. Clients that use this mode take responsibility for any
tool guidance or safety instructions the Agent’s default instructions
provided, and MUST only use it when the Agent advertises
session.systemPrompt.mode.override.
Other(String)
Custom or future system prompt mode.
Values beginning with _ are reserved for implementation-specific
extensions. Unknown values that do not begin with _ are reserved for
future ACP variants.
Trait Implementations§
Source§impl Clone for SystemPromptMode
impl Clone for SystemPromptMode
Source§impl Debug for SystemPromptMode
impl Debug for SystemPromptMode
Source§impl Default for SystemPromptMode
impl Default for SystemPromptMode
Source§impl<'de> Deserialize<'de> for SystemPromptMode
impl<'de> Deserialize<'de> for SystemPromptMode
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>,
impl Eq for SystemPromptMode
Source§impl JsonSchema for SystemPromptMode
Available on crate feature schemars only.
impl JsonSchema for SystemPromptMode
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SystemPromptMode
impl PartialEq for SystemPromptMode
Source§impl Serialize for SystemPromptMode
impl Serialize for SystemPromptMode
impl StructuralPartialEq for SystemPromptMode
Auto Trait Implementations§
impl Freeze for SystemPromptMode
impl RefUnwindSafe for SystemPromptMode
impl Send for SystemPromptMode
impl Sync for SystemPromptMode
impl Unpin for SystemPromptMode
impl UnsafeUnpin for SystemPromptMode
impl UnwindSafe for SystemPromptMode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.