CliSubprocessCore.ExecutionSurface (CliSubprocessCore v0.1.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 and delegates validation and transport capability lookup to ExternalRuntimeTransport.ExecutionSurface.

Summary

Types

projected_t()

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

resolution_error()

resolved()

t()

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

validation_error()

Functions

capabilities(surface)

@spec capabilities(
  t()
  | ExternalRuntimeTransport.ExecutionSurface.t()
  | atom()
  | keyword()
  | map()
  | nil
) ::
  {:ok, ExternalRuntimeTransport.ExecutionSurface.Capabilities.t()}
  | {:error, term()}

contract_version()

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

See ExternalRuntimeTransport.ExecutionSurface.contract_version/0.

default_surface_kind()

@spec default_surface_kind() ::
  ExternalRuntimeTransport.ExecutionSurface.surface_kind()

See ExternalRuntimeTransport.ExecutionSurface.default_surface_kind/0.

from_external(surface)

@spec from_external(ExternalRuntimeTransport.ExecutionSurface.t()) :: t()

new(surface)

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

new!(attrs)

@spec new!(keyword() | map() | t() | ExternalRuntimeTransport.ExecutionSurface.t()) ::
  t()

nonlocal_path_surface?(surface)

@spec nonlocal_path_surface?(
  t()
  | ExternalRuntimeTransport.ExecutionSurface.t()
  | atom()
  | keyword()
  | map()
  | nil
) :: boolean()

normalize_surface_kind(surface_kind)

@spec normalize_surface_kind(term()) ::
  {:ok, ExternalRuntimeTransport.ExecutionSurface.surface_kind()}
  | {:error, {:invalid_surface_kind, term()}}

See ExternalRuntimeTransport.ExecutionSurface.normalize_surface_kind/1.

normalize_transport_options(options)

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

See ExternalRuntimeTransport.ExecutionSurface.normalize_transport_options/1.

path_semantics(surface)

remote_surface?(surface)

@spec remote_surface?(
  t()
  | ExternalRuntimeTransport.ExecutionSurface.t()
  | atom()
  | keyword()
  | map()
  | nil
) :: boolean()

remote_surface_kind?(surface_kind)

See ExternalRuntimeTransport.ExecutionSurface.remote_surface_kind?/1.

reserved_keys()

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

See ExternalRuntimeTransport.ExecutionSurface.reserved_keys/0.

resolve(opts)

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

supported_surface_kinds()

@spec supported_surface_kinds() :: [
  ExternalRuntimeTransport.ExecutionSurface.adapter_surface_kind(),
  ...
]

See ExternalRuntimeTransport.ExecutionSurface.supported_surface_kinds/0.

surface_metadata(surface)

@spec surface_metadata(t() | ExternalRuntimeTransport.ExecutionSurface.t()) ::
  keyword()

to_external(surface)

to_map(surface)