PtcRunner.Kernel.Component (PtcRunner v0.14.0)

Copy Markdown View Source

A source-bearing, component-ID-addressed bundle input.

A component has one stable id, non-empty UTF-8 PTC-Lisp source, a sorted duplicate-free list of component-ID dependencies, and a bounded origin used for provenance and diagnostics. IDs match [a-z][a-z0-9._-]{0,127}.

Components describe code and dependency identity only. They do not select providers or grant runtime authority.

Summary

Functions

Validates and constructs a source component.

Types

t()

@type t() :: %PtcRunner.Kernel.Component{
  dependencies: [binary()],
  id: binary(),
  origin: binary(),
  source: binary()
}

Functions

new(opts)

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

Validates and constructs a source component.

Options are :id, :source, optional :dependencies, and optional :origin. Dependencies must already be sorted and unique. The default origin is "memory".