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

FactoryinputTypeTypical use
createTextInputFieldtextShort strings
createRawTextInputFieldraw textUnformatted multiline text
createNumberInputFieldnumberNumeric values
createSelectInputFieldselectFixed option list
createMultiSelectInputFieldmulti-selectMultiple fixed options
createDynamicSelectInputFielddynamic selectOptions loaded at runtime
createDynamicMultiSelectInputFielddynamic multi-selectMultiple dynamic options
createJsonInputFieldjsonStructured JSON
createCodeInputFieldcodeCode editor
createMarkdownFieldmarkdownDisplay-only markdown
createDateInputFielddateCalendar date
createDateTimeInputFielddatetimeDate and time
createDateRangeInputFielddate rangeStart/end dates
createFileInputFieldfileFile upload
createMapInputFieldmapKey/value map
createSwitchInputFieldswitchBoolean toggle
createNestedFieldsnestedGrouped sub-fields
createColumnFiltersInputFieldcolumn filtersTabular filter UI

Example

input-config.ts
import {  createTextInputField,  createSelectInputField,  createNumberInputField,} from '@lunnoa/toolkit';export const inputConfig = [  createTextInputField({    id: 'subject',    label: 'Subject',    description: 'Email subject line',    placeholder: 'Invoice ready',    required: {      missingMessage: 'Subject is required',      missingStatus: 'warning',    },  }),  createSelectInputField({    id: 'priority',    label: 'Priority',    selectOptions: [      { label: 'Low', value: 'low' },      { label: 'High', value: 'high' },    ],  }),  createNumberInputField({    id: 'retries',    label: 'Retries',    defaultValue: 3,  }),];

Shared field options

Most factories accept a common base shape:

  • id (required): key on configValue
  • label / description / placeholder
  • required: { missingMessage, missingStatus } when the field must be set
  • defaultValue when 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