PtcRunner.Kernel.WorkflowEnvironment (PtcRunner v0.15.0)

Copy Markdown View Source

Frozen authority for the trusted outer workflow.

The workflow environment contains an optional compiled bundle, explicit host capabilities, and JSON-like data. The Kernel adds reserved runtime routes such as subordinate evaluation and workflow annotation during a run; callers cannot replace those names.

Construction validates the bundle attestation, duplicate or reserved capability names, JSON-like data, and every tool requirement recorded by the bundle. An optional :catalog is attested with the bundle so source cannot be paired with a different compiled graph. :inspect_only is attested with the environment: a compile-and-inspect assembly that skipped tool requirements cannot be placed in an ordinary runnable configuration. It never imports capabilities from a mission environment. A verified workflow override of the shipped agent.core retains that library's fixed private diagnostic routes; other local or replacement components cannot acquire them.

Summary

Functions

Assembles a workflow environment from optional :bundle, :capabilities, JSON-like :data, :catalog, :shipped_component_ids, and :inspect_only options. :shipped_component_ids records the shipped library selections represented by the bundle for exact diagnostic misses. Unknown options are rejected. :inspect_only skips recorded tool-requirement checks so a compile-and-inspect session can attach source without installing capabilities. The resulting environment attests that mode; RunConfig refuses it unless inspect_only is also true.

Types

t()

@type t() :: %PtcRunner.Kernel.WorkflowEnvironment{
  attestation: binary(),
  bundle: PtcRunner.Kernel.FrozenBundle.t() | nil,
  capabilities: %{required(binary()) => PtcRunner.Kernel.Capability.t()},
  catalog: PtcRunner.Kernel.ComponentCatalog.t(),
  data: map(),
  inspect_only: boolean(),
  private_capabilities: [binary()],
  shipped_component_ids: [binary()]
}

Functions

new(opts)

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

Assembles a workflow environment from optional :bundle, :capabilities, JSON-like :data, :catalog, :shipped_component_ids, and :inspect_only options. :shipped_component_ids records the shipped library selections represented by the bundle for exact diagnostic misses. Unknown options are rejected. :inspect_only skips recorded tool-requirement checks so a compile-and-inspect session can attach source without installing capabilities. The resulting environment attests that mode; RunConfig refuses it unless inspect_only is also true.