PtcRunner.Kernel.CommandRuntime (PtcRunner v0.14.0)

Copy Markdown View Source

Sealed frontend-owned choices for shared command dispatch.

The value contains only VM policy and callbacks. It never contains a host document, application source, provider credential, or artifact destination. Environment setup is invoked only when inert preparation proves that a selected installation uses an environment credential.

Summary

Functions

Runs environment setup and classifies a named environment file that failed.

Types

t()

@type t() :: %PtcRunner.Kernel.CommandRuntime{
  attestation: binary(),
  authorization_notifier: (binary() -> any()) | nil,
  authorization_targets: [binary()],
  environment_setup: (-> :ok | {:error, term()}) | nil,
  live_status: PtcRunner.LiveStatus.Target.t() | nil,
  provider_application_mode: :host_owned | :command_vm
}

Functions

new(opts \\ [])

@spec new(keyword()) :: {:ok, t()} | {:error, :invalid_command_runtime}

setup_environment_diagnostic(runtime)

@spec setup_environment_diagnostic(t()) ::
  :ok | {:error, PtcRunner.Kernel.CommandDiagnostic.t() | atom()}

Runs environment setup and classifies a named environment file that failed.

Commands share this so run and doctor answer a bad --env-file, or a project's host.env_file, with the same code instead of one of them reporting an internal failure.

standalone()

@spec standalone() :: t()

valid?(runtime)

@spec valid?(term()) :: boolean()