pub struct SessionTemplate { /* private fields */ }Expand description
What the operator said and a client cannot say for itself: which provider and endpoint, which model, whether commands are granted, the product’s own voice, how hard to think, and what to call the sessions.
The workspace is deliberately absent. Every session brings its own cwd
on session/new, so there is nothing here for it to replace — where the
old one-shot config had to carry a placeholder path because its type
demanded one.
Implementations§
Source§impl SessionTemplate
impl SessionTemplate
pub fn new() -> Self
Sourcepub fn with_provider(self, provider: BuiltinProvider) -> Self
pub fn with_provider(self, provider: BuiltinProvider) -> Self
Prefers provider over whichever API key the environment offers first.
Sourcepub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
Points every session at an OpenAI-compatible endpoint.
pub fn with_model(self, model: ModelSelector) -> Self
Sourcepub fn with_shell(self, shell: ShellAccess) -> Self
pub fn with_shell(self, shell: ShellAccess) -> Self
Grants or denies command execution for every session (ADR-0013).
Sourcepub fn with_system_prompt(self, system_prompt: SystemPrompt) -> Self
pub fn with_system_prompt(self, system_prompt: SystemPrompt) -> Self
The host’s say on top of each workspace’s own context files.
Sourcepub fn with_effort(self, effort: Effort) -> Self
pub fn with_effort(self, effort: Effort) -> Self
How hard the model should think, where the provider supports it.
pub fn with_session_name(self, session_name: impl Into<String>) -> Self
Sourcepub fn with_discovery(self, discovery: Discovery) -> Self
pub fn with_discovery(self, discovery: Discovery) -> Self
Points every session’s discovery somewhere else — see Discovery.
Sourcepub fn with_a2a_watch(self, interval: Option<Duration>) -> Self
pub fn with_a2a_watch(self, interval: Option<Duration>) -> Self
How often each workspace’s A2A files are polled for a change
(Workspace::watch_a2a, ADR-0031 §4),
or None not to watch them at all.
On by default, every basis::DEFAULT_A2A_WATCH_INTERVAL: a server
holds a workspace for as long as an editor has the repository open,
and an operator who adds an agent, rotates its credential or moves its
URL should not have to restart it to be heard.