Skip to main content

Crate cascade_environment

Crate cascade_environment 

Source
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§

BoundedEnvironmentCommandRunner
Non-interactive runner with a hard per-command deadline.
DefaultEnvironmentCommandRenderer
Default renderer for host and WSL execution boundaries.
DetectionRequest
Complete side-effect-free input for one environment detection pass.
EnvironmentCommand
Structured command before or after environment adaptation.
EnvironmentIssue
Structured partial-detection problem suitable for CLI, TUI, and MCP output.
EnvironmentRemediationApproval
Explicit selection approved by the user for one exact remediation plan.
EnvironmentRemediationExecution
Sequential execution result. A failed command stops later commands.
EnvironmentRemediationOperation
One ordered operation proposed to make an environment ready.
EnvironmentRemediationPlan
Ordered, side-effect-free remediation proposal for one environment report.
EnvironmentRenderRequest
Complete input for one side-effect-free command adaptation.
EnvironmentReport
Environment-scoped tool readiness report.
HostEnvironmentDetector
Read-only detector for the environment running Cascade.
InteractiveEnvironmentCommandRunner
Interactive runner for approved installation commands.
ProbeOutput
Captured output from one backend probe before domain parsing.
ProcessEnvironmentCommandRunner
Standard-library runner used by real host and WSL detection backends.
RemediationExecutionStep
Auditable result for one planned remediation operation.
ResolvedExecutable
Executable resolved during environment detection.
StaticEnvironmentDetector
Deterministic detector used by init, doctor, and MCP orchestration tests.
ToolReport
Result of checking one tool requirement.
ToolRequirement
Requirement declared by a backend for a selected environment.
WslEnvironmentDetector
Read-only detector for one named WSL distribution.
WslLaunchRequest
Host-side request for launching a command inside one WSL distribution.

Enums§

EnvironmentIssueSeverity
Severity of a detection issue that did not prevent report construction.
EnvironmentKind
Execution environment selected for a workspace.
ExecutableOrigin
Origin of an executable visible from an environment.
ExecutionMode
How commands cross the selected environment boundary.
HostPlatform
Host command lookup strategy selected independently from the build host in tests.
RemediationApproval
Approval boundary for an environment remediation operation.
RemediationExecutionStatus
Outcome of one remediation operation.
RemediationInteraction
Input requirements of a remediation operation.
RequiredOrigin
Required executable origin for one tool.
ToolReadiness
Readiness state derived for a requirement.
ToolRole
Stable roles used when checking environment readiness.

Traits§

EnvironmentCommandRenderer
Side-effect-free boundary for host, WSL-native, and interoperability rendering.
EnvironmentCommandRunner
Executes one program with already-separated arguments.
EnvironmentDetector
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 -v or 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 --quiet output 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 wsl invocation for one inner command.
windows_path_to_wsl
Converts an absolute Windows path to its generic WSL mount path.