Requirements
- The
react-native-webviewpackage - Enable Bridge Events turned on for the agent
Snippet
Message wiring
The widget posts
tars:ready twice. The bare one on mount is the cue to send tars:init, and the second carries version and capabilities. This handler answers both, and the widget ignores the repeat init.
Handle at least tars:navigate, tars:data, and tars:close: the three capabilities the bridge declares in its tars:ready reply to tars:init. Field-level payloads for every message are in the bridge events reference.
Passing end-user data
AdduserData and context to the tars:init payload, or post a tars:inject message later in the session. Both shapes are in the bridge events reference.
