OpenWOP openwop.dev

Status: Stable.

Normative home: forms.

Why this exists

A form-content pack ships declarative form templates a host renders in its own chrome. The manifest is schemas/v2/form-content-pack-manifest.schema.json; installation and signing follow packs.md.

Conditional visibility

A field MAY carry when: <EdgeCondition>. The grammar is the WorkflowEdge.condition object { type, left, right } of schemas/v2/workflow-definition.schema.json, with the operator set of workflow-chain-packs.md §"Edge conditions". A host MUST evaluate when with its edge-condition semantics and MUST NOT accept any other expression language for visibility.

{ "id": "region", "type": "select", "label": "Region",
  "when": { "type": "equals", "left": "fields.shipping", "right": "international" } }

Instantiation

A form instantiated from a pack advertised through forms.contentPacks MUST be created through the same path a hand-authored form uses, and MUST remain editable afterwards: the pack is a starting point, not a managed object.

  • A host MUST degrade an unrecognized field type to plain text rather than failing the instantiation.
  • A host MUST NOT execute anything carried by the pack.
  • A pack-authored string, and any value collected through an instantiated template, is untrusted input. When one is interpolated into a prompt, the composition MUST record contentTrust: "untrusted" (host-services.md §Composition), so a downstream reader can tell authored text from pack-supplied text.

Localized strings

label, title, and description are localized strings. A host MUST select the rendered language by the locale-selection and fallback rules of i18n.md, and MUST treat every rendered string as untrusted: escaped for the target surface, never interpreted as markup, script, or a template directive.

Validation

ConstraintApplies toRule
requiredany typethe value MUST be present
formattext, longtextone of email, uri, date, date-time, time, or x-<format>
minLengthtext, longtexta host MUST reject a shorter value
min, maxnumbera host MUST reject a value outside the closed range
patterntext, longtexta host MUST reject a non-matching value

The five spec-reserved format values are the core set. A host that recognizes a format SHOULD apply it; one that does not MUST ignore it and accept plain text. A host MUST ignore format on any type other than text or longtext.

Sources: RFCs 0137, 0177.

Next in Core.

Edit this page on GitHub ↗

  • PacksPack manifests, the registry tree, peer-dependency identifiers, and signing. Per-kind…
  • Workflow Chain PacksA workflow-chain pack ships a reusable fragment a host expands into a concrete…
  • Host servicesNode packs call advertised host.* services through ctx. Each section states the contract…
  • InternationalizationA client asks for a locale for human-facing text (interrupt prompts, error messages,…