pub struct CodingRuntimeInput { /* private fields */ }Expand description
Typed parent coding-runtime inputs shared by full and read-only variants.
The full constructor requires a ProcessBackend. The read-only
constructor intentionally has no process backend, making it impossible for
the command-generation variant to install a process session by accident.
Implementations§
Source§impl CodingRuntimeInput
impl CodingRuntimeInput
Sourcepub fn new(
session_id: SessionId,
root: impl Into<PathBuf>,
provider: Arc<dyn ModelProvider>,
model: ModelName,
process_backend: Arc<dyn ProcessBackend>,
) -> Self
pub fn new( session_id: SessionId, root: impl Into<PathBuf>, provider: Arc<dyn ModelProvider>, model: ModelName, process_backend: Arc<dyn ProcessBackend>, ) -> Self
Creates full coding-runtime inputs with a typed process backend.
Sourcepub fn read_only_workspace(self) -> Self
pub fn read_only_workspace(self) -> Self
Sets whether the workspace is writable (false keeps it read-only and
skips AGENTS.md).
Sourcepub fn session_id(&self) -> &SessionId
pub fn session_id(&self) -> &SessionId
Returns the session identifier owned by this input.
Sourcepub fn read_only(
session_id: SessionId,
root: impl Into<PathBuf>,
provider: Arc<dyn ModelProvider>,
model: ModelName,
) -> Self
pub fn read_only( session_id: SessionId, root: impl Into<PathBuf>, provider: Arc<dyn ModelProvider>, model: ModelName, ) -> Self
Creates read-only command-generation inputs without a process backend.
Sourcepub fn durable_memory(self, memory: Arc<DurableMemory>) -> Self
pub fn durable_memory(self, memory: Arc<DurableMemory>) -> Self
Attaches durable memory for this runtime and the children it spawns.
The parent maintains memory after completed user turns. Children see the same store with maintenance disabled.
Sourcepub fn with_browser_process_launcher(
self,
launcher: Arc<dyn BrowserProcessLauncher>,
) -> Self
pub fn with_browser_process_launcher( self, launcher: Arc<dyn BrowserProcessLauncher>, ) -> Self
Overrides the headless browser process launcher used by browser_tab
for this runtime and its spawned subagents (for example in rootshell
hosts that disable local browser launches or supply a custom launcher).
Sourcepub fn with_extra_tools<I>(self, tools: I) -> Selfwhere
I: IntoIterator<Item = RegisteredTool>,
pub fn with_extra_tools<I>(self, tools: I) -> Selfwhere
I: IntoIterator<Item = RegisteredTool>,
Adds provider-neutral tools owned by the calling surface or adapter.
Sourcepub fn with_automatic_compaction(self, config: CompactionConfig) -> Self
pub fn with_automatic_compaction(self, config: CompactionConfig) -> Self
Sets automatic context compaction policy.
Sourcepub fn with_history_retention(self, retention: HistoryRetention) -> Self
pub fn with_history_retention(self, retention: HistoryRetention) -> Self
Sets how compacted history is retained in memory and on disk.
Sourcepub fn with_retry_policy(self, policy: ModelRetryPolicy) -> Self
pub fn with_retry_policy(self, policy: ModelRetryPolicy) -> Self
Sets the model retry/recovery policy shared by parent and child runtimes.
Sourcepub fn with_model_role(self, role: CodingModelRoleConfig) -> Self
pub fn with_model_role(self, role: CodingModelRoleConfig) -> Self
Adds one non-primary runtime model role.
Sourcepub fn with_model_roles<I>(self, roles: I) -> Selfwhere
I: IntoIterator<Item = CodingModelRoleConfig>,
pub fn with_model_roles<I>(self, roles: I) -> Selfwhere
I: IntoIterator<Item = CodingModelRoleConfig>,
Adds model roles in the supplied deterministic order.
Sourcepub fn with_skill_roots<I, P>(self, roots: I) -> Self
pub fn with_skill_roots<I, P>(self, roots: I) -> Self
Sets the read-only skill/resource roots.
Sourcepub fn with_host_path_policy(self, policy: HostPathPolicy) -> Self
pub fn with_host_path_policy(self, policy: HostPathPolicy) -> Self
Sets the shared host path policy so in-process file tools enforce the exact same private-path and read-only session-journal boundaries as the process sandbox, inherited by parent and child runtimes.
Sourcepub fn with_subagents(self, subagents: CodingSubagentsConfig) -> Self
pub fn with_subagents(self, subagents: CodingSubagentsConfig) -> Self
Sets the parent subagent policy.
Sourcepub fn with_workspace_tool_limits(self, limits: WorkspaceToolLimits) -> Self
pub fn with_workspace_tool_limits(self, limits: WorkspaceToolLimits) -> Self
Sets the workspace tool limits for the coding profile.
Sourcepub fn with_permission_review_rules(self, rules: PermissionReviewRules) -> Self
pub fn with_permission_review_rules(self, rules: PermissionReviewRules) -> Self
Sets user-trusted custom rules for AI permission review, inherited by both parent and child coding runtimes.
Sourcepub fn with_workspace_review_notes(self, notes: Vec<String>) -> Self
pub fn with_workspace_review_notes(self, notes: Vec<String>) -> Self
Sets saved per-workspace AI review guidance notes inherited live by both parent and child coding runtimes.
Sourcepub fn with_max_parallel_tool_calls(self, limit: NonZeroUsize) -> Self
pub fn with_max_parallel_tool_calls(self, limit: NonZeroUsize) -> Self
Sets the maximum number of parallel-safe tool calls executed together in one model turn for both parent and child runtimes.
Sourcepub fn with_context_window_tokens(self, tokens: NonZeroU64) -> Self
pub fn with_context_window_tokens(self, tokens: NonZeroU64) -> Self
Sets an explicit context-window override in tokens for budget and automatic compaction calculations.