Struct PromptContext
pub struct PromptContext<'a> {Show 15 fields
pub workspace_dir: &'a Path,
pub agent_workspace_dir: &'a Path,
pub model_name: &'a str,
pub tools: &'a [Box<dyn Tool>],
pub hidden_builtin_names: Option<&'a HashSet<String>>,
pub skills: &'a [Skill],
pub skills_prompt_mode: SkillsPromptInjectionMode,
pub identity_config: Option<&'a IdentityConfig>,
pub interaction: Option<&'a InteractionContext>,
pub dispatcher_instructions: &'a str,
pub sends_native_tool_specs: bool,
pub security_summary: Option<String>,
pub autonomy_level: AutonomyLevel,
pub inject_memory: bool,
pub shell_profile: Option<ShellProfile>,
}Fields§
§workspace_dir: &'a Path§agent_workspace_dir: &'a Path§model_name: &'a str§tools: &'a [Box<dyn Tool>]Render-time projection of unselected built-in schemas. Execution still resolves the complete policy-admitted registry.
skills: &'a [Skill]§skills_prompt_mode: SkillsPromptInjectionMode§identity_config: Option<&'a IdentityConfig>§interaction: Option<&'a InteractionContext>§dispatcher_instructions: &'a str§sends_native_tool_specs: boolTrue when the provider request carries native tool specs. In that mode the prompt must not duplicate the same tool catalog in prose.
security_summary: Option<String>Pre-rendered security policy summary for inclusion in the Safety prompt section. When present, the LLM sees the concrete constraints (allowed commands, forbidden paths, autonomy level) so it can plan tool calls without trial-and-error. See
autonomy_level: AutonomyLevelAutonomy level the prompt describes. Full autonomy omits “ask before
acting” instructions so the model executes tools directly without
simulating approval. Policy-aware builders separately supply any
always_ask exceptions without expanding this public context struct.
inject_memory: boolFalse for isolated / ACP sessions created with exclude_memory: true.
Mirrors system_prompt::build_system_prompt_with_mode_and_autonomy’s
inject_memory flag so both prompt builders enforce one policy: when
it is false, MEMORY.md is not injected into the provider-visible
system prompt.
shell_profile: Option<ShellProfile>The shell the runtime adapter will spawn, or None for a shell-less
runtime (which omits the Shell: field and the dialect guidance).
Resolved from RuntimeAdapter::shell_profile so the reported shell
cannot drift from the executed one.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PromptContext<'a>
impl<'a> !UnwindSafe for PromptContext<'a>
impl<'a> Freeze for PromptContext<'a>
impl<'a> Send for PromptContext<'a>
impl<'a> Sync for PromptContext<'a>
impl<'a> Unpin for PromptContext<'a>
impl<'a> UnsafeUnpin for PromptContext<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more