@retion-miniapp/sdk 0.17.1 → 0.19.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/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.19.0 — 2026-11-20
6
+
7
+ ## 0.19.0 — 2026-11-20
8
+
9
+ ### Added
10
+ - Cầu nối Agent ↔ mini app (app chủ chỉ chuyển nguyên, agent và mini app tự thống nhất format):
11
+ - `onAgentMessage(listener, { app_id?, includeEcho? })`: nhận MỌI gói socket hội thoại Agent (`raw` nguyên vẹn: step, trả lời…). Tự lọc theo app (app chủ bắn xuống mọi mini app), chống trùng, mặc định bỏ echo tin chính app gửi bằng `sendPayloadMeta`.
12
+ - `sendPayloadMeta(payload_meta, { text?, agent_id?, timeout_ms? })` → `Promise<{ ok, message_mid?, fb_client_id?, error? }>`: gửi `{ text (mặc định ""), payload_meta }` lên agent.
13
+ - `onAgentStop(listener)`: người dùng dừng lượt (`source`: `'chat'` | `'miniapp'`) → mini app ngừng thao tác.
14
+ - `getAgentBridgeVersion()` / `AGENT_BRIDGE_VERSION` và hằng tên event.
15
+ - Cần app chủ dùng `@retion-miniapp/react-native` >= 0.23.0 có `bridge.agent`.
16
+
17
+ ## 0.18.0 — 2026-11-18
18
+
19
+ ### Added
20
+ - `onAgentContext(listener, { app_id? })`: nhận ngữ cảnh Agent vừa chạy cho 1 câu hỏi (event `retion.ai.context` app chủ đẩy xuống: `app_id`, `agent_id`, `fb_client_id`, `message_mid`, `message_text`, `payload_context`), vd điều kiện lọc server dùng → mini app tự lọc / điều khiển màn. Chỉ nhận event của app mình (`app_id` hoặc app_id đã truyền cho `setAgent`), chạy cả khi là app con trong iframe cùng origin của web merchant, chống báo trùng. Trả hàm huỷ nghe. Cần Terminal hỗ trợ `retion.ai.context`.
21
+
5
22
  ## 0.17.1 — 2026-11-17
6
23
 
7
24
  ### Fixed