Inputs

Typed workflow inputs and their host-facing contract.

The Inputs Block

The optional inputs block declares the workflow’s callee-side signature — the named values a caller (a human at the entry point, or a parent workflow via a subgraph node’s call-site binding — inputs: in dip 2, params: in dip 1) must or may supply at run start:

  inputs
    idea: text
      required: true
      prompt: "What do you want built?"
      description: "One or two sentences describing the change."
      max_length: 4000
      multiline: true
    target_branch: text
      default: main
      pattern: "^[A-Za-z0-9._/-]+$"
    risk: enum
      default: medium
      options: low, medium, high

Each entry is name: type with an optional indented block of attributes. Declaration order is significant — a host renders inputs as an ordered form — so the formatter never reorders entries.

Input Types

The six v1 types are:

TypeDescription
textFree text value
numberNumeric value
boolBoolean value
enumOne of a fixed set of options
fileA file
secretA secret value

Attributes

Each entry may carry an indented block of attributes:

AttributeDescription
requiredWhether the caller must supply this input
promptText a host shows when collecting the value
descriptionHuman-readable description of the input
defaultValue used when the caller supplies none
optionsThe allowed values for an enum
patternA regex the value must match
minMinimum value
maxMaximum value
max_lengthMaximum length
multilineWhether the value spans multiple lines

Referencing Inputs

Reference a declared input as ${inputs.name} in prompts. The inputs namespace is closed: it contains exactly the names declared in the inputs block, unlike the open ctx namespace.

Validation

Because the namespace is closed, references and declarations are checked:

  • An unrecognized type is DIP155.
  • A reference to an undeclared input is DIP156.
  • A reference inside a tool node’s command: is DIP157 (inputs never interpolate into a shell).

Introspection

The declared inputs schema is the typed, introspectable contract a host uses to collect values before a run. Print it with:

dippin inputs [--format text|json] <file>

--format json emits a stable array in declaration order — each entry with name, type, required, and any declared attributes. Defaults are typed (a number default is a JSON number), and a workflow with no inputs emits [], never null.

The same schema is surfaced by dippin inspect --format json for a .dipx bundle: the verified payload includes the entry workflow’s declared inputs schema, so a host can enumerate what to collect without unpacking.