pub struct WorkspaceHandle {
pub cwd: PathBuf,
pub env: HashMap<String, String>,
pub previews: Vec<PreviewPlaceholder>,
pub contract: Option<WorkspaceContract>,
pub detail: Option<String>,
pub container: Option<ContainerWorkspace>,
pub remote: Option<RemoteWorkspace>,
pub gate_env: GateEnvPolicy,
}Expand description
The provisioned workspace: what sessions run against. Carries everything
readiness/teardown need, so the provider stays stateless across the
three calls (a future remote provider’s handle would carry the workspace
id / connection info instead).
Fields§
§cwd: PathBufSession cwd (the mission execution root).
env: HashMap<String, String>Extra env for sessions in this workspace — KRANZ_BASE_SHA when a
base SHA was pinned, exactly what validation-contract commands get
today. Never secret values.
previews: Vec<PreviewPlaceholder>Contract previews. Local-worktree keeps the URL templates UNFILLED
(D-E); the container provider substitutes {port} ONLY with an
actually-assigned dynamic host port (never fabricated).
contract: Option<WorkspaceContract>The contract this workspace was provisioned against, so readiness
executes exactly what provision saw.
detail: Option<String>Provider-specific detail recorded on workspace.provisioned — the
container provider’s compose project name. None for local-worktree
and for contract-less provisions.
container: Option<ContainerWorkspace>Container-provider state (compose project/file, assigned ports);
None for local-worktree and contract-less provisions.
remote: Option<RemoteWorkspace>Remote-provider state (substrate workspace id/name, takeover URL,
name-matched previews, poll outcome); None for local kinds and
contract-less provisions.
gate_env: GateEnvPolicyThe operator-owned gate env inputs, copied from the spec: the shared
gate HOME and the operator’s contractEnvPassthrough. Every gate
command lane builds its env from this plus Self::env and the
contract (see workspace_gate::gate_command_env).
Trait Implementations§
Source§impl Clone for WorkspaceHandle
impl Clone for WorkspaceHandle
Source§fn clone(&self) -> WorkspaceHandle
fn clone(&self) -> WorkspaceHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more