# Port fields

Every field an input or output port may declare, generated from the SDK validator.

## Port fields
Each input and output is a named port (a lowercase letter, then letters, numbers or underscores). Admission rejects any other field.

| Field | Meaning |
| --- | --- |
| `type` | Required. A shared StillMade type such as `text`, `image`, `shot-plan`; add `[]` for a list (`image[]`). |
| `required` | Required on every input of a new Block: `true` or `false`. A required input needs a generated control, a `context` binding or a `default`, or `pack` and import reject it. |
| `default` | A JSON value matching the type. Satisfies a required input when nothing else supplies it. |
| `min` | Lowest allowed value for a `number` or `integer` port. |
| `max` | Highest allowed value for a `number` or `integer` port. |
| `description` | Required on every input and output of a new Block. One short plain-language sentence about what the value is for. |
| `role` | Legacy distinct role (for example `character_reference`). Use only when the meaning must not mix with others; downstream roles must match exactly. Prefer `semantic`. |
| `primary` | Mark exactly one main input and one main output `true`; Project Type Steps connect primary ports automatically. |
| `context` | The project field this input reads (for example `script`); requires the matching `context.FIELD.read` permission. |
| `imageMode` | JavaScript image inputs only: `pixels` delivers decoded `{width,height,data}`; `reference` delivers the media reference without pixels. |
| `key` | Set by the host for resolver requirements. Leave unset in manifests. |
| `semantic` | Required on every input and output of a new Block. The exact meaning in lowercase snake_case or dotted form (`company_profile`, `production_shot_plan`). Downstream matching uses it; different meanings never connect. |
| `accepts` | Additional meanings this input also accepts, besides its own `semantic`. |
| `schema` | Required on every `json` or `object` port (admission rejects one without it). Not JSON Schema: a field-type word or a map of field names to field-type words, nested for objects. Words are `string`, `text`, `number`, `integer`, `boolean`, `object`, `json`; add `[]` for a list and `?` for an optional field, for example `{title:"string",tags:"string[]?",size:{width:"integer",height:"integer"}}`. |
| `sources` | Where the universal resolver may fill this input from: `upstream`, `project`, `adapter`, `chat`, `default`, `user`, `external`. Omit to allow all. `default` covers only the declared default; values a person enters in the Step or a view passes to `StillMade.run` count as `user`, so leave `user` allowed for anything the interface fills in. |
| `sensitivity` | A label for sensitive information; values marked secret, credential, password or token are never offered in chat. |
| `freshnessPolicy` | `{maxAgeMs}`: the resolver rejects values older than this. |
| `cardinality` | `one` or `many` values. |
| `batchable` | `true` when the input can run once per item of a selected media batch. |
