@rqmii_immersive/agent-react-sdk 1.0.0 → 1.0.1

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.
@@ -15,8 +15,8 @@ npm install @rqmii_immersive/agent-react-sdk
15
15
  `.env`:
16
16
 
17
17
  ```env
18
- VITE_FASTAPI_BACKEND_URL=https://api.example.com
19
- VITE_WS_AUDIO_URL=wss://realtime.example.com
18
+ VITE_AGENT_API_URL=https://api.example.com
19
+ VITE_AGENT_WS_URL=wss://realtime.example.com
20
20
  ```
21
21
 
22
22
  ### App Example
@@ -35,8 +35,8 @@ function UI() {
35
35
  export default function App() {
36
36
  return (
37
37
  <RqmiiAgentRoom
38
- wsUrl={import.meta.env.VITE_WS_AUDIO_URL}
39
- restUrl={import.meta.env.VITE_FASTAPI_BACKEND_URL}
38
+ wsUrl={import.meta.env.VITE_AGENT_WS_URL}
39
+ restUrl={import.meta.env.VITE_AGENT_API_URL}
40
40
  session={{ mode: "initialize", apiKey: "YOUR_API_KEY", language: "en" }}
41
41
  connect
42
42
  >
@@ -61,8 +61,8 @@ npm install @rqmii_immersive/agent-react-sdk
61
61
  `.env.local`:
62
62
 
63
63
  ```env
64
- NEXT_PUBLIC_FASTAPI_BACKEND_URL=https://api.example.com
65
- NEXT_PUBLIC_WS_AUDIO_URL=wss://realtime.example.com
64
+ NEXT_PUBLIC_AGENT_API_URL=https://api.example.com
65
+ NEXT_PUBLIC_AGENT_WS_URL=wss://realtime.example.com
66
66
  ```
67
67
 
68
68
  ### Client Component
@@ -94,8 +94,8 @@ function UI() {
94
94
  export default function AgentPage() {
95
95
  return (
96
96
  <RqmiiAgentRoom
97
- wsUrl={process.env.NEXT_PUBLIC_WS_AUDIO_URL}
98
- restUrl={process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}
97
+ wsUrl={process.env.NEXT_PUBLIC_AGENT_WS_URL}
98
+ restUrl={process.env.NEXT_PUBLIC_AGENT_API_URL}
99
99
  session={{ mode: "initialize", apiKey: "YOUR_API_KEY", language: "en" }}
100
100
  connect
101
101
  >
@@ -124,8 +124,8 @@ npm install @rqmii_immersive/agent-react-sdk
124
124
  `.env`:
125
125
 
126
126
  ```env
127
- REACT_APP_FASTAPI_BACKEND_URL=https://api.example.com
128
- REACT_APP_WS_AUDIO_URL=wss://realtime.example.com
127
+ REACT_APP_AGENT_API_URL=https://api.example.com
128
+ REACT_APP_AGENT_WS_URL=wss://realtime.example.com
129
129
  ```
130
130
 
131
131
  ### App Example
@@ -144,8 +144,8 @@ function UI() {
144
144
  export default function App() {
145
145
  return (
146
146
  <RqmiiAgentRoom
147
- wsUrl={process.env.REACT_APP_WS_AUDIO_URL}
148
- restUrl={process.env.REACT_APP_FASTAPI_BACKEND_URL}
147
+ wsUrl={process.env.REACT_APP_AGENT_WS_URL}
148
+ restUrl={process.env.REACT_APP_AGENT_API_URL}
149
149
  session={{ mode: "initialize", apiKey: "YOUR_API_KEY", language: "en" }}
150
150
  connect
151
151
  >
package/README.md CHANGED
@@ -1,15 +1,6 @@
1
1
  # Rqmii React Agent SDK
2
2
 
3
- Standalone React SDK for integrating React apps with:
4
-
5
- - `RqmiiAgentBackendAPI` REST endpoints (`/sessions/init`, `/sessions/join`)
6
- - `RqmiiAgentBackendJs` realtime Socket.IO server
7
-
8
- Quick navigation:
9
-
10
- - Full guide: `README.md` (this file)
11
- - Simple guide: `README.simple.md`
12
- - Framework recipes (Vite/Next.js/CRA): `README.frameworks.md`
3
+ Standalone React SDK for building realtime agent experiences in web apps.
13
4
 
14
5
  This SDK gives you a LiveKit-style integration model:
15
6
 
@@ -29,18 +20,18 @@ If you are testing locally from this mono-repo:
29
20
  npm install file:../RqmiiAgentReactSDK
30
21
  ```
31
22
 
32
- ## 2. Required Backend Configuration
23
+ ## 2. Required Configuration
33
24
 
34
25
  You must provide both URLs to the SDK:
35
26
 
36
- - `restUrl`: FastAPI backend base URL (for session init/join)
37
- - `wsUrl`: realtime coordinator Socket.IO URL
27
+ - `restUrl`: REST API base URL (for session init/join)
28
+ - `wsUrl`: realtime Socket.IO URL
38
29
 
39
30
  Typical env values:
40
31
 
41
32
  ```env
42
- VITE_FASTAPI_BACKEND_URL=https://api.example.com
43
- VITE_WS_AUDIO_URL=wss://realtime.example.com
33
+ VITE_AGENT_API_URL=https://api.example.com
34
+ VITE_AGENT_WS_URL=wss://realtime.example.com
44
35
  ```
45
36
 
46
37
  ## 3. Import Surface
@@ -109,8 +100,8 @@ function ChatUI() {
109
100
  export default function App() {
110
101
  return (
111
102
  <RqmiiAgentRoom
112
- wsUrl={import.meta.env.VITE_WS_AUDIO_URL}
113
- restUrl={import.meta.env.VITE_FASTAPI_BACKEND_URL}
103
+ wsUrl={import.meta.env.VITE_AGENT_WS_URL}
104
+ restUrl={import.meta.env.VITE_AGENT_API_URL}
114
105
  session={{ mode: "initialize", apiKey: "YOUR_API_KEY", language: "en" }}
115
106
  connect
116
107
  onError={(e) => console.error(e)}
@@ -427,4 +418,5 @@ Check:
427
418
 
428
419
  ## 14. Current Scope
429
420
 
430
- This SDK currently targets React integration and browser runtime. If you need Next.js SSR-specific wrappers or TypeScript declaration generation (`.d.ts`), add them in your package pipeline as a next step.
421
+ This SDK supports React, TypeScript (ships `.d.ts`), and Next.js client-side integration.
422
+ Use it inside client components (`"use client"`), since realtime sockets/media APIs are browser runtime features.
package/README.simple.md CHANGED
@@ -12,14 +12,14 @@ npm install @rqmii_immersive/agent-react-sdk
12
12
 
13
13
  You need:
14
14
 
15
- - `restUrl` -> FastAPI backend URL
15
+ - `restUrl` -> REST API URL
16
16
  - `wsUrl` -> realtime Socket.IO URL
17
17
 
18
18
  Example env:
19
19
 
20
20
  ```env
21
- VITE_FASTAPI_BACKEND_URL=https://api.example.com
22
- VITE_WS_AUDIO_URL=wss://realtime.example.com
21
+ VITE_AGENT_API_URL=https://api.example.com
22
+ VITE_AGENT_WS_URL=wss://realtime.example.com
23
23
  ```
24
24
 
25
25
  ## Basic Usage
@@ -55,8 +55,8 @@ function ChatUI() {
55
55
  export default function App() {
56
56
  return (
57
57
  <RqmiiAgentRoom
58
- wsUrl={import.meta.env.VITE_WS_AUDIO_URL}
59
- restUrl={import.meta.env.VITE_FASTAPI_BACKEND_URL}
58
+ wsUrl={import.meta.env.VITE_AGENT_WS_URL}
59
+ restUrl={import.meta.env.VITE_AGENT_API_URL}
60
60
  session={{ mode: "initialize", apiKey: "YOUR_API_KEY", language: "en" }}
61
61
  connect
62
62
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rqmii_immersive/agent-react-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Standalone React SDK for Rqmii Agent realtime sessions",
5
5
  "type": "module",
6
6
  "main": "./dist/rqmii-react-agent-sdk.cjs",