PtcRunner.Kernel.CommandEngine (PtcRunner v0.14.0)

Copy Markdown View Source

Shared command parser and dispatch router.

The engine owns the single argv grammar and returns only sealed terminal outcomes. Cohesive acquisition, doctor, destination, and run-dispatch components own their respective phase ranges. Shared code never writes process streams, halts the VM, or renders arbitrary failures.

Frontend-owned switches such as --envelope are accepted only through a CommandEntry; the direct prepare/1 and dispatch/1 APIs reject them.

Provider-free and provider-backed run commands complete through the same owner-backed execution and publication path. Provider-free runs retain ExecutionSessionOwner while omitting only the provider session. doctor --connect remains its own active operation. models projects only public installation declarations and invokes no provider runtime service. init validates its fixed memory scaffold before atomically publishing a complete directory without replacing an existing target.

Summary

Functions

Executes one stable command and returns its sealed terminal outcome.

Authorizes a prepared run's destinations at the phase-6 boundary.

Types

Functions

dispatch(argv)

@spec dispatch([binary()]) ::
  {:ok, PtcRunner.Kernel.CommandOutcome.t()}
  | {:error, PtcRunner.Kernel.CommandOutcome.t()}

Executes one stable command and returns its sealed terminal outcome.

preflight(preparation)

Authorizes a prepared run's destinations at the phase-6 boundary.

prepare(argv)

@spec prepare([binary()]) ::
  {:ok, prepared()}
  | {:error, PtcRunner.Kernel.CommandOutcome.t() | :entropy_unavailable}