Stateless resolver turning environment configurations into live H.ExecutionEnv.t()
handles and plain JSON-safe environment descriptors.
Summary
Functions
Fetches the base H.ExecutionEnv.t() at its default_cwd and its descriptor.
Lists configured environment descriptors, always including "host".
Resolves {env_id, raw_cwd} against the environment registry and binds cwd
through H.ExecutionEnv.bind_cwd/2.
Types
Functions
@spec fetch_env(term(), keyword()) :: {:ok, H.ExecutionEnv.t(), descriptor()} | {:error, :unknown_environment | :workspace_unavailable}
Fetches the base H.ExecutionEnv.t() at its default_cwd and its descriptor.
@spec list_environments(keyword()) :: [descriptor()]
Lists configured environment descriptors, always including "host".
@spec resolve_workspace(nil | String.t(), nil | String.t(), keyword()) :: {:ok, %{ env_id: String.t(), kind: String.t(), cwd: String.t(), env: H.ExecutionEnv.t() }} | {:error, term()}
Resolves {env_id, raw_cwd} against the environment registry and binds cwd
through H.ExecutionEnv.bind_cwd/2.