Documentation
¶
Overview ¶
Package compiler provides a reusable compilation pipeline for PromptKit packs. It extracts the core compilation logic from the packc CLI so it can be used programmatically by other tools and libraries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSkillErrors ¶
ValidateSkillErrors returns blocking errors for skill configuration in the pack.
Types ¶
type CompileResult ¶
type CompileResult struct {
// Pack is the compiled prompt pack.
Pack *prompt.Pack
// JSON is the pack serialized as indented JSON.
JSON []byte
// Warnings contains non-fatal warnings from the compilation process.
Warnings []string
}
CompileResult contains the output of a successful compilation.
func Compile ¶
func Compile(configFile string, opts ...Option) (*CompileResult, error)
Compile loads an arena config file and compiles all prompts into a single pack. It performs media validation, skill validation, workflow validation, and schema validation (unless skipped). Errors are returned rather than printed or causing os.Exit.
type Option ¶
type Option func(*compileOptions)
Option configures the compilation behavior.
func WithCompilerVersion ¶
WithCompilerVersion sets the compiler version string embedded in the pack. If not provided, defaults to "compiler-dev".
func WithPackID ¶
WithPackID sets the pack identifier. If not provided, a default is derived from the config file's parent directory name.
func WithSkipSchemaValidation ¶
func WithSkipSchemaValidation() Option
WithSkipSchemaValidation disables JSON schema validation of the compiled pack.