ambleloft

Form YAML reference

Look up templates, fields, submission actions and bindings. The SDK form.schema.json and CLI semantic checks define validation.

API REFERENCE

Browse contracts, signatures, fields and examples. Unspecified defaults are not inferred.

On this page

01Template root

Use either fields or steps, never both. Unknown fields are rejected. Do not add $schema, scripts or localization keys to the YAML. Associate the schema through editor settings.

FieldTypeRequiredDefaultDescription
version1YesUnspecifiedRequired; exactly 1.
idstringYesUnspecifiedRequired; ^[a-z][a-z0-9-]{0,79}$.
title / descriptionstringtitle requiredUnspecifiedtitle: 1–120 characters; description: at most 2000.
fieldsField[]ConditionalUnspecifiedSingle-step mode: 1–100 fields.
stepsStep[]ConditionalUnspecifiedMulti-step mode: 1–20 steps; id, title and fields required, next optional.
submitobjectYesUnspecifiedRequired; kind: chat or kind: operation.

02Common field properties

Fields require name, type and label. Keep names unique in their scope and consistent with bindings. CLI validation additionally checks type-specific combinations.

FieldTypeRequiredDefaultDescription
namestringYesUnspecified^[a-z][a-z0-9-]{0,79}$.
labelstringYesUnspecified1–120 characters.
requiredbooleanNoUnspecifiedOptional boolean.
help / placeholderstringNoUnspecifiedhelp: at most 2000 characters; placeholder: at most 200.

03Seven field types

Fields are statically declared. Attachments, password inputs, remote dynamic options and conditional scripts are unsupported. Respect the declared money precision rather than accumulating financial amounts as floating-point values.

Field / APIContract
text / textareaminLength and maxLength: 0–20000.
numberminimum, maximum; integer controls integral input.
moneycurrency: three uppercase letters; scale: 0–4; use decimal strings for limits, e.g. '0.01'.
dateDate input.
select1–100 static options; each label/value is 1–120 characters.
checkboxBoolean checkbox; use required for mandatory confirmation.

04Submission actions

operation binds to a declared operation in the same extension. Input bindings and recovery targets undergo semantic validation. Writes still require host confirmation.

Field / APIContract
chatRequires kind and label; no operation or input.
operationRequires kind, label, operation and input; recovery optional.
inputAt most 100 properties, each {from: path} or {value: literal}.
recovery.operationA page-exposed read operation in the same extension, queried by submissionId.
See the complete multi-step template

05Editor and runtime validation

With a YAML-schema editor extension installed, add this to .vscode/settings.json. Static schema checks do not replace CLI binding validation or host runtime permission checks.

.vscode/settings.json
{
  "yaml.schemas": {
    "./node_modules/@ambleloft/extension-sdk/form.schema.json": [
      "skills/**/*.yaml"
    ]
  }
}
SDK / CLI 0.1.0-alpha.9 · Contract baseline Compatibility and preview notes · Sample source