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
Keeps the workspace read-only and does not load AGENTS.md.
Used when the person declined read-write access on first open. The sandbox stays in place; this does not switch to host execution.
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_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_denied_absolute_paths<I, P>(self, paths: I) -> Self
pub fn with_denied_absolute_paths<I, P>(self, paths: I) -> Self
Sets absolute host paths that in-process file tools (read_file and
apply_patch) must never read or modify, 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_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.