Skip to content

Server: Auto-Generated A2H Forms #12

@ggondim

Description

@ggondim

Summary

Implement the auto-generated form system for A2H reply methods 3 and 4. When inline channel primitives are insufficient, OpenThreads generates a temporary web form for the human to respond.

Tasks

  • GET /form/:turnId — renders a temporary form page
  • Form generation from A2H intent schema:
    • AUTHORIZE → approve/deny buttons with context display
    • COLLECT single field → text input with label
    • COLLECT multiple fields → multi-field form
    • COLLECT closed options → radio buttons or checkboxes
    • Batch (method 4) → all intents grouped on a single page
  • Form submission: POST /form/:turnId → validate, store response, resolve blocking intent
  • TTL-based expiry: form URL expires with the ephemeral token
  • Minimal, responsive UI (Ant Design 5)
  • No authentication by default; trust layer adds WebAuthn/OTP when active
  • Loading, success, error, and expired states

Acceptance Criteria

  • AUTHORIZE intent → form with context + approve/deny buttons
  • COLLECT single field → form with labeled text input
  • COLLECT multiple fields → multi-field form with validation
  • Batch intents → single page with all questions
  • Expired form → clear error message
  • Form submit resolves the blocking intent and returns response to recipient
  • Mobile-responsive layout

Dependencies

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions