@opengeni/react 1.2.1-canary.37222177070001 → 1.3.0

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
@@ -98,6 +98,14 @@ import "@opengeni/react/compiled.css";
98
98
  // or one conversation: <SessionConversation baseUrl="/api/opengeni" sessionId={sessionId} />
99
99
  ```
100
100
 
101
+ Bearer-token apps pass `headers` (a function runs per request) or a custom
102
+ `fetch`; a `client` passed with `baseUrl` replaces the one the component
103
+ creates:
104
+
105
+ ```tsx
106
+ <OpenGeniChat baseUrl="/api/opengeni" headers={() => ({ Authorization: `Bearer ${getToken()}` })} />
107
+ ```
108
+
101
109
  The provider form keeps working, for example for several components sharing one
102
110
  client or the headless hooks:
103
111
 
@@ -1383,3 +1391,26 @@ Copy and the timestamp for user messages and completed assistant messages.
1383
1391
  The host owns feedback, fork authorization, and mutations; streaming assistant
1384
1392
  messages omit this slot. Use the `group/copy` hover/focus state and preserve
1385
1393
  visible touch targets when styling actions.
1394
+
1395
+ ### Portable action reviews
1396
+
1397
+ `ApprovalSurface` accepts `loadReview(approval)` and `onViewDetails(review, path)`;
1398
+ load the versioned facts with `client.getToolActionReview`. It shows one selected
1399
+ action, counts and bounded fields instead of raw argument JSON. Keep
1400
+ `selectedApprovalId` and `onSelectedApprovalChange` in the host if a full-page
1401
+ detail route unmounts the surface, so returning cannot silently select a different
1402
+ action. The native `onApprove` / `onReject` identity is unchanged and duplicate
1403
+ submission is fenced until authoritative events remove the request.
1404
+
1405
+ Render `ToolActionReviewDetails` on the host's normal page with
1406
+ `client.getToolReviewDetails`, passing the review's `actionDigest`, path and offset.
1407
+ Details are immutable, authenticated, paginated, and redact protected values.
1408
+ Restore focus to the original `data-review-path` button on return. No web-app
1409
+ imports, iframe, second confirmation, or nested scrolling pane is required.
1410
+ The standalone fallback retains bounded details for older SDK approvals.
1411
+
1412
+ Wrap `MessageTimeline` in `ToolReviewHistoryProvider` with its visible events,
1413
+ authenticated `load(approvalId)` callback and `onViewDetails` to keep recorded
1414
+ reviews readable inside the corresponding tool activity. Historical receipts
1415
+ never render decision buttons. The same semantic tokens support light/dark
1416
+ embeds; `demo/approval-review.html` is the synthetic state gallery.