Input schema, and a body that calls source engines (Helm, kustomize, RGD) and aggregates resources. This page is an Akua-focused excerpt of the akua package format spec. The full spec covers engine calls, lockfile, and metadata; this page focuses on what an Akua product author touches most: the Input schema and @ui annotations.
Anatomy
Every Package is one KCL program with three typed regions:akua render writes every entry of resources as a YAML file under --out. Akua runs that render per-installation and commits the output to the installation repository.
The Input schema
The Input schema is the public contract: it declares what customers can configure. This schema is what Akua exports to JSON Schema for the install wizard.
Rules:
- The schema must be named
Input. The binding line is canonicallyinput: Input = ctx.input(). - Fields use KCL native types:
str,int,float,bool,[T],{str: T}, unions ("a" | "b" | "c"), nested schemas. - Fields without defaults are required; fields with defaults are optional.
- Use KCL docstrings (
"""...""") on each field; they become the JSON Schemadescriptionand surface in autocomplete and the install wizard. check:blocks express cross-field constraints; they run during render.- No runtime side effects (no env, no filesystem, no network). KCL’s sandbox enforces this.
@ui annotations
KCL docstrings carry the description field, but the install wizard needs more: field ordering, grouping into sections, widget hints, validation bounds. akua provides the @ui(...) decorator for this.
@ui(...) is an authoring hint that’s stripped before the source reaches KCL’s resolver and projected onto the JSON Schema property as the OpenAPI-3.1-compliant x-ui extension. Akua’s install wizard recognizes x-ui and renders accordingly; renderers that don’t, ignore it.
Recognized keys
The keyword arguments to@ui(...) are arbitrary; anything you pass becomes x-ui metadata. Akua’s wizard currently recognizes:
Unknown keys are ignored, so you can add
@ui(foo=bar) annotations for your own renderers without breaking Akua.
How @ui reaches the wizard
Composition body
The body composes resources by calling engine functions:Exporting vs rendering
Akua exports the schema once per Package version (cached) to drive the install wizard, and renders once per install and again on every input change.
Related topics
Offers
How
@ui drives the install wizard.Concepts
How Packages, Products, and Installations relate.
Customize an installation via git
Edit
inputs.yaml and package.k directly.Akua package format spec
Full spec: engines, lockfile, signing.