@wix/legends-platform-sdk 1.2.0 → 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.
Files changed (2) hide show
  1. package/README.md +14 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -12,7 +12,15 @@ yarn add @wix/legends-platform-sdk
12
12
 
13
13
  ## Quick Start
14
14
 
15
- Wrap your app with `LegendsPlatform` and pass your API key:
15
+ Store the raw namespace API key returned by MCP onboarding in `.env.local`:
16
+
17
+ ```bash
18
+ VITE_LEGENDS_NAMESPACE=your-namespace
19
+ VITE_LEGENDS_API_KEY=lp_your_raw_api_key
20
+ VITE_LEGENDS_CHAT_ID=your-chat-id
21
+ ```
22
+
23
+ Wrap your app with `LegendsPlatform` and pass those values:
16
24
 
17
25
  ```tsx
18
26
  import { LegendsPlatform, useConversation, useMicrophone } from '@wix/legends-platform-sdk';
@@ -40,9 +48,9 @@ function VoiceButton() {
40
48
  export default function App() {
41
49
  return (
42
50
  <LegendsPlatform
43
- chatId="your-chat-id"
44
- namespace="your-namespace"
45
- apiKey="your-api-key"
51
+ chatId={import.meta.env.VITE_LEGENDS_CHAT_ID}
52
+ namespace={import.meta.env.VITE_LEGENDS_NAMESPACE}
53
+ apiKey={import.meta.env.VITE_LEGENDS_API_KEY}
46
54
  >
47
55
  <VoiceButton />
48
56
  </LegendsPlatform>
@@ -67,6 +75,8 @@ The root context provider. Must wrap all SDK hooks and components.
67
75
 
68
76
  Either `apiKey` or `personaChatService` must be provided.
69
77
 
78
+ Pass the raw namespace key as `apiKey`, for example `lp_...`. The SDK sends it as `Authorization: Api-Key <token>`.
79
+
70
80
  ---
71
81
 
72
82
  ### Hooks
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.0",
2
+ "version": "1.3.0",
3
3
  "name": "@wix/legends-platform-sdk",
4
4
  "license": "MIT",
5
5
  "author": {
@@ -103,5 +103,5 @@
103
103
  "wallaby": {
104
104
  "autoDetect": true
105
105
  },
106
- "falconPackageHash": "51161cca6ffa39a64c4d341ca2bab0f88ebd76c57c410b9e89e4260d"
106
+ "falconPackageHash": "2912768126618e9a95930f9b3c4d70496f04a0b284513cbcb4c66fce"
107
107
  }