Expand description
Execution-environment domain model for Cascade.
This crate owns environment intent, executable-origin classification, tool requirements, detection reports, and setup-plan contracts. Detection command execution remains deferred to backend modules so these values stay portable and deterministic in tests.
Structs§
- Bounded
Environment Command Runner - Non-interactive runner with a hard per-command deadline.
- Default
Environment Command Renderer - Default renderer for host and WSL execution boundaries.
- Detection
Request - Complete side-effect-free input for one environment detection pass.
- Environment
Command - Structured command before or after environment adaptation.
- Environment
Issue - Structured partial-detection problem suitable for CLI, TUI, and MCP output.
- Environment
Remediation Approval - Explicit selection approved by the user for one exact remediation plan.
- Environment
Remediation Execution - Sequential execution result. A failed command stops later commands.
- Environment
Remediation Operation - One ordered operation proposed to make an environment ready.
- Environment
Remediation Plan - Ordered, side-effect-free remediation proposal for one environment report.
- Environment
Render Request - Complete input for one side-effect-free command adaptation.
- Environment
Report - Environment-scoped tool readiness report.
- Host
Environment Detector - Read-only detector for the environment running Cascade.
- Interactive
Environment Command Runner - Interactive runner for approved installation commands.
- Probe
Output - Captured output from one backend probe before domain parsing.
- Process
Environment Command Runner - Standard-library runner used by real host and WSL detection backends.
- Remediation
Execution Step - Auditable result for one planned remediation operation.
- Resolved
Executable - Executable resolved during environment detection.
- Static
Environment Detector - Deterministic detector used by init, doctor, and MCP orchestration tests.
- Tool
Report - Result of checking one tool requirement.
- Tool
Requirement - Requirement declared by a backend for a selected environment.
- WslEnvironment
Detector - Read-only detector for one named WSL distribution.
- WslLaunch
Request - Host-side request for launching a command inside one WSL distribution.
Enums§
- Environment
Issue Severity - Severity of a detection issue that did not prevent report construction.
- Environment
Kind - Execution environment selected for a workspace.
- Executable
Origin - Origin of an executable visible from an environment.
- Execution
Mode - How commands cross the selected environment boundary.
- Host
Platform - Host command lookup strategy selected independently from the build host in tests.
- Remediation
Approval - Approval boundary for an environment remediation operation.
- Remediation
Execution Status - Outcome of one remediation operation.
- Remediation
Interaction - Input requirements of a remediation operation.
- Required
Origin - Required executable origin for one tool.
- Tool
Readiness - Readiness state derived for a requirement.
- Tool
Role - Stable roles used when checking environment readiness.
Traits§
- Environment
Command Renderer - Side-effect-free boundary for host, WSL-native, and interoperability rendering.
- Environment
Command Runner - Executes one program with already-separated arguments.
- Environment
Detector - Read-only boundary implemented by host, WSL, and test detection backends.
Functions§
- classify_
wsl_ executable - Classifies a command path as seen from a WSL distribution.
- evaluate_
requirements - Evaluates backend requirements against environment-scoped executable facts.
- execute_
approved_ remediation - Executes only explicitly selected, executable operations.
- parse_
executable_ path - Returns the first non-empty line produced by
command -vor an equivalent probe. - parse_
host_ resolved_ executable - Builds a host executable report. A host-resolved absolute path is native to the host environment; unresolved relative output remains unknown.
- parse_
version_ output - Returns a compact first-line version without inventing provider semantics.
- parse_
wsl_ distributions - Parses
wsl --list --quietoutput without assuming PowerShell’s encoding. - parse_
wsl_ resolved_ executable - Builds a resolved WSL executable from independently captured path and version probes.
- render_
wsl_ host_ interop_ command - Adapts a host command for WSL interoperability without choosing a shell.
- render_
wsl_ launch - Renders the complete host-side
wslinvocation for one inner command. - windows_
path_ to_ wsl - Converts an absolute Windows path to its generic WSL mount path.