CliSubprocessCore.ExecutionSurface (CliSubprocessCore v0.2.0)

Copy Markdown View Source

Backward-compatible execution-surface facade for downstream CLI packages.

cli_subprocess_core no longer owns the transport substrate. This module preserves the historical CliSubprocessCore.ExecutionSurface struct while delegating validation and capability lookup to ExecutionPlane.Process.Transport.Surface.

Summary

Types

boundary_class()

@type boundary_class() :: atom() | String.t() | nil

contract_version()

@type contract_version() :: String.t()

projected_t()

@type projected_t() :: %{
  contract_version: contract_version(),
  surface_kind: surface_kind(),
  transport_options: map(),
  target_id: String.t() | nil,
  lease_ref: String.t() | nil,
  surface_ref: String.t() | nil,
  boundary_class: boundary_class(),
  observability: map()
}

reserved_key()

@type reserved_key() ::
  :contract_version
  | :surface_kind
  | :transport_options
  | :target_id
  | :lease_ref
  | :surface_ref
  | :boundary_class
  | :observability

resolution_error()

@type resolution_error() :: term()

resolved()

@type resolved() :: map()

surface_kind()

@type surface_kind() :: atom()

t()

@type t() :: %CliSubprocessCore.ExecutionSurface{
  boundary_class: boundary_class(),
  contract_version: contract_version(),
  lease_ref: String.t() | nil,
  observability: map(),
  surface_kind: surface_kind(),
  surface_ref: String.t() | nil,
  target_id: String.t() | nil,
  transport_options: keyword()
}

validation_error()

@type validation_error() :: term()

Functions

capabilities(surface)

@spec capabilities(t() | struct() | atom() | keyword() | map() | nil) ::
  {:ok, term()} | {:error, term()}

contract_version()

@spec contract_version() :: contract_version()

default_surface_kind()

@spec default_surface_kind() :: surface_kind()

from_runtime_surface(surface)

@spec from_runtime_surface(struct()) :: t()

new(surface)

@spec new(keyword() | map() | t() | struct()) ::
  {:ok, t()} | {:error, validation_error()}

new!(attrs)

@spec new!(keyword() | map() | t() | struct()) :: t()

nonlocal_path_surface?(surface)

@spec nonlocal_path_surface?(t() | struct() | atom() | keyword() | map() | nil) ::
  boolean()

normalize_surface_kind(surface_kind)

@spec normalize_surface_kind(term()) :: {:ok, surface_kind()} | {:error, term()}

normalize_transport_options(options)

@spec normalize_transport_options(term()) :: {:ok, keyword()} | {:error, term()}

path_semantics(surface)

@spec path_semantics(t() | struct() | atom() | keyword() | map() | nil) ::
  atom() | nil

remote_surface?(surface)

@spec remote_surface?(t() | struct() | atom() | keyword() | map() | nil) :: boolean()

remote_surface_kind?(surface_kind)

@spec remote_surface_kind?(surface_kind()) :: boolean()

reserved_keys()

@spec reserved_keys() :: [reserved_key(), ...]

resolve(opts)

@spec resolve(keyword()) ::
  {:ok, resolved()} | {:error, validation_error() | resolution_error()}

supported_surface_kinds()

@spec supported_surface_kinds() :: [atom(), ...]

surface_metadata(surface)

@spec surface_metadata(t() | struct()) :: keyword()

to_map(surface)

@spec to_map(t() | struct()) :: projected_t()

to_runtime_surface(surface)

@spec to_runtime_surface(t() | struct()) :: struct()