Input config
Build action, trigger, and connection forms with toolkit field factories.
Input config is the declarative form schema for actions, triggers, and connections. Users fill these fields in the workflow builder and agent tool UIs. Field id values become keys on configValue in your run handlers.
Build fields with factories from @lunnoa/toolkit, then pass the array as inputConfig.
Common field factories
| Factory | inputType | Typical use |
|---|---|---|
createTextInputField | text | Short strings |
createRawTextInputField | raw text | Unformatted multiline text |
createNumberInputField | number | Numeric values |
createSelectInputField | select | Fixed option list |
createMultiSelectInputField | multi-select | Multiple fixed options |
createDynamicSelectInputField | dynamic select | Options loaded at runtime |
createDynamicMultiSelectInputField | dynamic multi-select | Multiple dynamic options |
createJsonInputField | json | Structured JSON |
createCodeInputField | code | Code editor |
createMarkdownField | markdown | Display-only markdown |
createDateInputField | date | Calendar date |
createDateTimeInputField | datetime | Date and time |
createDateRangeInputField | date range | Start/end dates |
createFileInputField | file | File upload |
createMapInputField | map | Key/value map |
createSwitchInputField | switch | Boolean toggle |
createNestedFields | nested | Grouped sub-fields |
createColumnFiltersInputField | column filters | Tabular filter UI |
Example
input-config.ts
Shared field options
Most factories accept a common base shape:
id(required): key onconfigValuelabel/description/placeholderrequired:{ missingMessage, missingStatus }when the field must be setdefaultValuewhen a sensible default exists- Visibility and conditional helpers where the field type supports them
Keep id values stable. Renaming an id breaks existing workflow configurations that already store that key.
Pair with aiSchema
For actions, every configurable inputConfig id should appear on aiSchema. See Actions.
Next
- Actions: attach
inputConfigtocreateAction - Triggers: configure how workflows start
- Connections: connection-specific fields