Requesting input from an atom pack
Use therequestInteraction function on AtomPackContext and await the result:
confirm, select, and form. Form fields may be string, secret, number, boolean, or select. Declarative constraints include required fields, number ranges, string patterns, defaults, descriptions, and select options.
Do not pass HTML, scripts, components, callback functions, executable validators, or layout instructions. They are intentionally outside the protocol.
Lifecycle
The daemon assigns an ID and trusted source attribution, then publishes a redacted pending request. A presenter must advertise compatible capabilities and claim the request with a short lease before submitting or cancelling it. Completion happens exactly once. Foreground requests prefer the client that initiated the action. Background requests enter the shared queue and do not steal focus. A claim released by a disconnect or expired lease can be acquired by another compatible presenter; secret drafts are never retained. Cancellation reports one ofclose, escape, timeout, disconnect, or unavailable. Callers must treat every cancellation as a normal terminal result and must not assume a Web client exists.
Client behavior
- Web uses a host-owned dialog and shows the trusted source above contributed labels.
- TUI uses a host-owned modal with keyboard navigation and masked secret input.
- Interactive CLI prompts field by field and disables terminal echo for secrets.
- Non-interactive CLI emits
interaction_requiredwith the interaction ID. A user can resume withmonad approval answer <id>. - ACP bridges compatible schemas to elicitation and leaves unsupported requests pending or returns an explicit unavailable result.