@opencx/widget-react-headless 5.0.0-beta.2 → 5.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,6 +10,7 @@ A custom client must render question choices, collect selections or free text, a
10
10
 
11
11
  ```tsx
12
12
  <WidgetProvider
13
+ components={yourComponents}
13
14
  options={{
14
15
  token: 'YOUR_WIDGET_TOKEN',
15
16
  capabilities: { structuredQuestions: true },
@@ -20,3 +21,46 @@ A custom client must render question choices, collect selections or free text, a
20
21
  ```
21
22
 
22
23
  Omitting this capability leaves the structured question tool unavailable. Ordinary text questions remain available. The organization must also enable **Selectable questions**. The built-in `Widget` declares support automatically for its default question component. If you replace `agent_chat_questions`, explicitly declare support after implementing the replacement.
24
+
25
+ ## Delivery, activity and renderer support
26
+
27
+ These options are included in the next beta after `5.0.0-beta.1`:
28
+
29
+ ```tsx
30
+ <WidgetProvider
31
+ components={yourComponents}
32
+ options={{
33
+ token: '<WIDGET_TOKEN>',
34
+ streaming: false,
35
+ presentation: { toolActivity: 'hidden', reasoning: false },
36
+ }}
37
+ >
38
+ <YourChat />
39
+ </WidgetProvider>
40
+ ```
41
+
42
+ `streaming: false` chooses polling without changing the server's agent version.
43
+ The organization controls maximum activity visibility. An embed may narrow
44
+ `toolActivity` to `status` (name and status without inputs/results) or `hidden`,
45
+ and disable `reasoning`. It cannot override an organization restriction.
46
+ Tools still execute when their activity is hidden. The backend applies the same
47
+ limits to live replies, reconnects and history; the default is status-only
48
+ activity and hidden reasoning.
49
+
50
+ A headless client does not declare renderer support automatically. Set
51
+ `capabilities.structuredQuestions`, `capabilities.richReplies`, or
52
+ `capabilities.pageEffects` to `true` only after implementing that interaction.
53
+ These capabilities also require the organization's feature and streaming;
54
+ polling receives completed replies without structured interactions. Ordinary
55
+ clarifying questions in text do not require a selectable-question renderer.
56
+ Interactive question and highlight payloads remain available when activity is
57
+ hidden because they drive the customer-facing UI.
58
+
59
+ Changing options on an existing provider updates subsequent requests without
60
+ resetting its session. A delivery change waits for accepted messages, queued
61
+ messages and reply reconciliation to finish on their current transport.
62
+ Streaming reconnects and history fetches include the current presentation
63
+ opt-outs. Changing visibility refreshes existing history; `useAgentChatUi()`
64
+ immediately hides opted-out activity in both live and cached turns, including
65
+ while that refresh is pending or fails. Integrations keeping a separate cache
66
+ can use `applyPresentation(items, presentation)` to apply the same display rules.