@generative-a11y/assistant-ui
v0.1.2
Published
assistant-ui accessibility adapter for messages, tools, approvals, and paced screen-reader announcements in AI interfaces.
Maintainers
Readme
@generative-a11y/assistant-ui
bindThreadRuntime() observes only the documented public ThreadRuntime
getState() and subscribe() methods from @assistant-ui/[email protected]. It
silently baselines existing history and translates later assistant text and
documented terminal statuses, tool result state, approvals, and sources into a
borrowed generative-a11y runtime. It does not render UI, access the DOM, or call
host runtime actions.
Install
npm install @generative-a11y/core @generative-a11y/assistant-ui @assistant-ui/coreBind a thread runtime
The host owns both the core runtime and assistant-ui thread; this binding
only translates documented public thread state.
import { bindThreadRuntime } from "@generative-a11y/assistant-ui";
const binding = bindThreadRuntime({ runtime, scopeId: "support", thread });
// Later: binding.dispose(); // unsubscribes only| Public evidence | Normalized event |
| ----------------------------------------------------------------- | --------------------------------------------------------------- |
| New assistant message or append-only text part | response.started / response.text.delta |
| status: complete, incomplete: cancelled, incomplete: error | response.completed, response.interrupted, response.failed |
| New tool-call, then a present result | tool.started, then tool.completed or tool.failed |
| Observed unresolved tool-call.approval, then a boolean decision | approval.requested, then approval.resolved |
| New source ID | citation.available with the tracked count |
Text is emitted only for append-only changes. A rewrite, an unknown incomplete reason, or an observer that reaches its bounded identity capacity fails closed; it never invents a stop, error, retry, or connection event.
The documented thread snapshot does not expose stable run, step, or hierarchy
lifecycle evidence. Those fidelity fields remain unavailable; the adapter
continues to report only the response, tool, and citation evidence it observes.
Tool labels are intentionally generic ("A tool"), and backend tool results and
errors are never copied into announcements. An approval is resolved only after
this binding observed that approval requested. Source IDs are counted but never
spoken.
Documentation
Related packages
@generative-a11y/corereceives the normalized lifecycle events.@generative-a11y/reactprovides browser delivery for React applications.
